<?php
$db_update['data'][2]['settings_labels'] = "
INSERT IGNORE INTO`settings_labels` (`c_active`, `language`, `label`, `text`) VALUES
('1', 'de', 'LABEL_VERSION', 'Version'),
('1', 'de', 'LABEL_UPDATE', 'Update'),
('1', 'de', 'LABEL_INSTALL', 'Installieren');";

$db_update['data'][5]['settings_labels'] = "
UPDATE `settings_labels` SET `text` = 'Anmelden' WHERE `label` = 'LABEL_LOGIN' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Bearbeiten' WHERE `label` = 'LABEL_EDIT' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Abmelden' WHERE `label` = 'LABEL_LOGOUT' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Filtern' WHERE `label` = 'LABEL_DO_FILTER' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Schnell bearbeiten' WHERE `label` = 'LABEL_QUICK_EDIT' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Neuer Eintrag' WHERE `label` = 'LABEL_NEW_ENTRY' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Deaktivieren' WHERE `label` = 'LABEL_DEACTIVATE' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Aktivieren' WHERE `label` = 'LABEL_ACTIVATE' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Kopieren' WHERE `label` = 'LABEL_COPY' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Löschen' WHERE `label` = 'LABEL_DELETE' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Speichern' WHERE `label` = 'LABEL_SAVE' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Vergrößern' WHERE `label` = 'LABEL_ENLARGE' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Entfernen' WHERE `label` = 'LABEL_REMOVE' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Übernehmen' WHERE `label` = 'LABEL_ADOPT' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Zurück' WHERE `label` = 'LABEL_BACK' AND `language` = 'de';
DELETE FROM `settings_labels` WHERE `label` = 'LABEL_OUTER' AND `language` = 'de';
DELETE FROM `settings_labels` WHERE `label` = 'LABEL_INNER' AND `language` = 'de';";


$db_update['data'][8]['settings_labels'] = "
UPDATE `settings_labels` SET `text` = 'Nein' WHERE `label` = 'LABEL_NO' AND `language` = 'de';
UPDATE `settings_labels` SET `text` = 'Ja' WHERE `label` = 'LABEL_YES' AND `language` = 'de';";


$db_update['data'][9]['settings_labels'] = "INSERT IGNORE INTO`settings_labels` (`c_active`, `language`, `label`, `text`) VALUES ('1', 'de', 'LABEL_GERMAN', 'deutsch');";

$db_update['data'][11]['settings_labels'] = "INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES ('1', 'de', 'LABEL_LINKS', 'Links');";
$db_update['data'][13]['settings_labels'] = "INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES ('1', 'de', 'LABEL_OPTIONS_LIGHTBOX', 'Lightbox');";

$db_update['data'][14]['settings_labels'] = "INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_SEO', 'SEO'),
('1', 'de', 'LABEL_META_TITLE', 'Meta Title'),
('1', 'de', 'LABEL_META_DESCRIPTION', 'Meta Description');";


$db_update['data'][15]['settings_options'] = "
INSERT IGNORE INTO`settings_options` (`c_public`, `title`, `value`) VALUES
('1', 'meta_title', ''),
('1', 'meta_description', '');";


$db_update['data'][16]['settings_labels'] = "INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_EXPORT', 'Export');";

$db_update['data'][21]['settings_options'] = "UPDATE `settings_options` SET `value` = '1' WHERE `title` = 'c_modules';";


$db_update['data'][22]['settings_labels'] = "
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES
('1', 'de', 'LABEL_OPTIONS_C_LIGHTBOX_WATERMARK', 'Lightbox'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_LT', 'Links oben'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_LB', 'Links unten'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_RB', 'Rechts unten'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_RT', 'Rechts oben'),
('1', 'de', 'LABEL_OPTIONS_C_THUMBNAILS_WATERMARK', 'Thumbnails'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_POSITION', 'Position'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK', 'Wasserzeichen'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_TOP', 'Abstand oben'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_RIGHT', 'Abstand rechts'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_BOTTOM', 'Abstand unten'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_LEFT', 'Abstand links');";

$db_update['data'][22]['settings_options'] = "ALTER TABLE `settings_options` ADD UNIQUE(`title`);";

$db_update['data'][23]['settings_options'] = "
INSERT IGNORE INTO`settings_options` (`c_public`, `title`, `value`) VALUES
('0', 'c_lightbox_watermark', '0'),
('0', 'c_thumbnails_watermark', '0'),
('0', 'watermark_position', 'LT'),
('0', 'watermark_top', '0'),
('0', 'watermark_right', '0'),
('0', 'watermark_bottom', '0'),
('0', 'watermark_left', '0');";


$db_update['data'][24]['settings_labels'] = "
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES
('1', 'de', 'LABEL_PHOTOGRAPHER', 'Fotograf'),
('1', 'de', 'LABEL_LIGHTBOX_WATERMARK', 'Lightbox Wasserzeichen'),
('1', 'de', 'LABEL_THUMBNAILS_WATERMARK', 'Thumbnails Wasserzeichen')";


$db_update['data'][25]['settings_options'] = "
INSERT IGNORE INTO`settings_options` (`c_public`, `title`, `value`) VALUES
('0', 'watermark_width', ''),
('0', 'watermark_height', ''),
('0', 'watermark_ratio', '');";

$db_update['data'][26]['settings_labels'] = "
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES
('1', 'de', 'LABEL_OPTIONS_WATERMARK_WIDTH', 'Breite'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_HEIGHT', 'Höhe'),
('1', 'de', 'LABEL_OPTIONS_WATERMARK_RATIO', 'Verhältnis');";


$db_update['data']['1.0.1']['settings_labels'] = "
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES
('1', 'de', 'LABEL_LIGHTBOX', 'Lightbox');";


$db_update['data']['1.0.2']['settings_labels'] = "
DELETE FROM `settings_labels` WHERE `label` IN ('LABEL_LIGHTBOX_WATERMARK', 'LABEL_THUMBNAILS_WATERMARK');";


$db_update['data']['1.0.10']['settings_labels'] = "
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES
('1', 'de', 'LABEL_CLASS', 'Class');";



$db_update['data']['1.0.11']['settings_options'] = "
INSERT IGNORE INTO`settings_options` (`c_public`, `title`, `value`) VALUES
('1', 'default_guidv4', ''),
('1', 'default_language', '');";


$db_update['data']['1.0.11']['settings_labels'] = "
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES
('1', 'de', 'LABEL_DEFAULT_GUIDV4', 'Startseite'),
('1', 'de', 'LABEL_DEFAULT_LANGUAGE', 'Standardsprache');";


$db_update['data']['1.0.12']['settings_labels'] = "
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES
('1', 'de', 'LABEL_OPTIONS_C_TEMPLATES', 'Templates'),
('1', 'de', 'LABEL_OPTIONS_C_LINKS', 'Links'),
('1', 'de', 'LABEL_OPTIONS_C_PERIOD', 'Zeitraumfilter');";


$db_update['data']['1.0.12']['settings_options'] = "
INSERT IGNORE INTO`settings_options` (`c_public`, `title`, `value`) VALUES
('1', 'c_period', '0');";

$db_update['data']['1.0.13']['settings_options'] = "
UPDATE `settings_options` SET `title` = 'difference_days_from' WHERE `title` = 'difference_days';
INSERT IGNORE INTO`settings_options` (`c_public`, `title`, `value`) VALUES
('1', 'difference_days_to', '365');";


$db_update['data']['1.0.13']['settings_labels'] = "
UPDATE `settings_labels` SET `label` = 'LABEL_OPTIONS_DIFFERENCE_DAYS_FROM', `text` = 'Differenz Suche von' WHERE `label` = 'LABEL_OPTIONS_DIFFERENCE_DAYS';
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_OPTIONS_DIFFERENCE_DAYS_TO', 'Differenz Suche bis');";


$db_update['data']['1.0.14']['settings_options'] = "
UPDATE `settings_options` SET `id` = '99' WHERE `title` = 'c_modules';
UPDATE `settings_options` SET `id` = '4' WHERE `title` = 'difference_days_to';";



$db_update['data']['1.0.17']['settings_users'] = "
ALTER TABLE `settings_users`
  DROP `addressline1`,
  DROP `addressline2`,
  DROP `zip`,
  DROP `city`,
  DROP `state`,
  DROP `country`,
  DROP IF EXISTS `addressline1_hash`,
  DROP IF EXISTS `addressline1_plain`,
  DROP IF EXISTS `addressline2_hash`,
  DROP IF EXISTS `addressline2_plain`,
  DROP IF EXISTS `zip_hash`,
  DROP IF EXISTS `zip_plain`,
  DROP IF EXISTS `city_hash`,
  DROP IF EXISTS `city_plain`,
  DROP IF EXISTS `state_hash`,
  DROP IF EXISTS `state_plain`,
  DROP IF EXISTS `country_hash`,
  DROP IF EXISTS `country_plain`;";
  
$db_update['data']['1.0.17']['settings_labels'] = "
UPDATE `settings_labels` SET `label` = 'LABEL_STATE', `text` = 'Bundesland/Kanton' WHERE `label` = 'LABEL_STATE';";


$db_update['data']['1.0.18']['settings_labels'] = "
UPDATE `settings_labels` SET `label` = 'LABEL_VIEWER', `text` = 'Betrachter' WHERE `label` = 'LABEL_MONITOR';";


$db_update['data']['1.0.21']['settings_labels'] = "
INSERT IGNORE INTO `settings_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_OPTIONS_C_SHOW_DATETIME', 'Datum anzeigen'),
('1', 'de', 'LABEL_OPTIONS_C_SHOW_SORTORDER', 'Folge anzeigen');";