From 3df5cfd765d32de200a4db2a21a04cb2fde40b23 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 2 Dec 2008 16:53:12 +0000 Subject: [PATCH] Templates rewritten/fixed, surfbar extended with per-entry reload lock - A lot templates with checkboxes rewritten to display id number in title tag - Some HTML fixes in templates - More numeric default values in SQL queries without quotes (') - Surfbar now supports reload lock for URL entered by admin (still not editable) - Some minor improvements/fixes --- inc/autopurge/purge-general.php | 2 +- inc/config.php | 2 +- inc/databases.php | 2 +- inc/db/lib-mysql3.php | 9 ++- inc/extensions/ext-active.php | 2 +- inc/extensions/ext-admins.php | 4 +- inc/extensions/ext-autopurge.php | 4 +- inc/extensions/ext-bank.php | 42 +++++----- inc/extensions/ext-beg.php | 24 +++--- inc/extensions/ext-birthday.php | 10 +-- inc/extensions/ext-bonus.php | 72 ++++++++--------- inc/extensions/ext-cache.php | 6 +- inc/extensions/ext-country.php | 2 +- inc/extensions/ext-doubler.php | 38 ++++----- inc/extensions/ext-holiday.php | 10 +-- inc/extensions/ext-mediadata.php | 2 +- inc/extensions/ext-newsletter.php | 4 +- inc/extensions/ext-online.php | 6 +- inc/extensions/ext-order.php | 4 +- inc/extensions/ext-payout.php | 12 +-- inc/extensions/ext-primera.php | 6 +- inc/extensions/ext-rallye.php | 22 +++--- inc/extensions/ext-refback.php | 2 +- inc/extensions/ext-sponsor.php | 78 +++++++++---------- inc/extensions/ext-sql_patches.php | 40 +++++----- inc/extensions/ext-surfbar.php | 28 +++---- inc/extensions/ext-top10.php | 2 +- inc/extensions/ext-transfer.php | 20 ++--- inc/extensions/ext-wernis.php | 8 +- inc/language/de.php | 1 + inc/libs/surfbar_functions.php | 45 ++++++++--- inc/modules/admin/admin-inc.php | 2 +- inc/modules/admin/what-add_surfbar_url.php | 4 +- .../de/html/admin/admin_add_surfbar_url.tpl | 5 ++ .../admin/admin_admins_mails_list_row.tpl | 12 +-- .../de/html/admin/admin_config_admins_row.tpl | 17 ++-- .../de/html/admin/admin_config_cats_row.tpl | 15 ++-- .../de/html/admin/admin_config_email_row.tpl | 12 +-- .../html/admin/admin_config_payouts_row.tpl | 22 ++++-- .../admin/admin_config_rallye_prices_row.tpl | 18 +++-- .../admin/admin_del_bank_packages_row.tpl | 2 +- .../de/html/admin/admin_del_transfer_row.tpl | 26 +++++-- .../de/html/admin/admin_extensions_row.tpl | 26 +++++-- .../de/html/admin/admin_list_admins_row.tpl | 24 +++--- .../admin/admin_list_bank_package_row.tpl | 26 ++++--- .../de/html/admin/admin_list_country_row.tpl | 15 ++-- .../de/html/admin/admin_list_holiday_row.tpl | 30 ++++--- .../admin/admin_list_sponsor_pay_del_row.tpl | 32 ++++---- .../html/admin/admin_list_sponsor_pay_row.tpl | 32 ++++---- .../admin/admin_list_surfbar_actions_row.tpl | 2 +- .../admin/admin_list_surfbar_urls_row.tpl | 2 +- .../html/admin/admin_list_task_ext_rows.tpl | 28 +++++-- .../de/html/admin/admin_list_task_rows.tpl | 28 +++++-- .../de/html/admin/admin_menu_overview_row.tpl | 25 +++--- .../de/html/admin/admin_mods_list_row.tpl | 24 +++--- .../admin/admin_overview_list_ext_rows.tpl | 28 +++++-- .../html/admin/admin_overview_list_rows.tpl | 28 +++++-- .../de/html/admin/admin_payments_list_row.tpl | 18 +++-- templates/de/html/admin/admin_points_row.tpl | 12 +-- .../de/html/admin/admin_refbanner_row.tpl | 28 ++++--- .../de/html/admin/admin_theme_edit_row.tpl | 36 +++++---- .../de/html/admin/admin_unlock_emails_row.tpl | 36 +++++---- .../html/admin/admin_unlock_sponsor_row.tpl | 24 +++--- .../admin/admin_unlock_surfbar_urls_row.tpl | 2 +- templates/de/html/ext/ext_surfbar.tpl | 7 +- 65 files changed, 680 insertions(+), 477 deletions(-) diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php index 3ee13256e9..cdd1f262a6 100644 --- a/inc/autopurge/purge-general.php +++ b/inc/autopurge/purge-general.php @@ -49,7 +49,7 @@ if (($_CONFIG['auto_purge_active'] == "Y") && ($_CONFIG['auto_purge'] > 0)) { if (function_exists('CREATE_TIME_SELECTIONS')) { $PURGE = $_CONFIG['auto_purge']; } else { - $PURGE = $_CONFIG['auto_purge'] * 24 * 60 * 60; + $PURGE = $_CONFIG['auto_purge'] * $_CONFIG['one_day']; } // Init variables diff --git a/inc/config.php b/inc/config.php index b01adc6810..536cae8378 100644 --- a/inc/config.php +++ b/inc/config.php @@ -52,7 +52,7 @@ if (function_exists('date_default_timezone_set')) { define('VERSION', "v0.2.1"); define('AUTHOR' , "Roland Häder"); define('TITLE', "MXChange - Mail Exchange"); -define('COPY', "© 2003 - 2008, by Roland Häder"); +define('COPY', "© 2003 - 2008, by Roland Häder"); // CFG: ERROR_REPORTING @error_reporting(0); diff --git a/inc/databases.php b/inc/databases.php index 963f18b87c..c7a46a17cd 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "581"); +define('CURR_SVN_REVISION', "582"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 2f060bbe72..221e75955f 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -244,10 +244,13 @@ function SQL_QUERY_ESC($qstring, $data, $file, $line, $run=true, $strip=true) { // // Debugging // - //$fp = fopen(PATH."inc/cache/escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!"); - //fwrite($fp, $file."(".$line."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n"); - //fclose($fp); + //* DEBUG: */ $fp = fopen(PATH."inc/cache/escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!"); + //* DEBUG: */ fwrite($fp, $file."(".$line."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n"); + //* DEBUG: */ fclose($fp); + + // Run the code @eval($eval); + // Was the eval() command fine? if (empty($query)) { // Something went wrong? diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 7d49d419ed..32f082d319 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -96,7 +96,7 @@ case "update": // Update an extension break; case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8)"; // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index f1e3cca8b5..ddbaedfd21 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -98,7 +98,7 @@ case "update": // Update an extension $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_acls"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_acls ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, action_menu VARCHAR(255) NOT NULL DEFAULT '', what_menu VARCHAR(255) NOT NULL DEFAULT '', access_mode ENUM('deny','allow') NOT NULL DEFAULT 'deny', @@ -118,7 +118,7 @@ PRIMARY KEY (id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_mails"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_mails ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, mail_template VARCHAR(255) NOT NULL, KEY (admin_id), PRIMARY KEY (id) diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index fb44ddd0c9..acff4c2128 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -89,7 +89,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt."; @@ -128,7 +128,7 @@ case "update": // Update an extension case "0.1.9": // SQL queries for v0.1.9 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*7)."'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*7)."'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).

Bitte aktualisieren Sie auch die Admin-Templates!"; diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index 0e0c75c424..a6f79aedda 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -53,23 +53,23 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_accounts ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -account_locked BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +account_locked BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, locked_reason TINYTEXT, status ENUM('NEW','ACTIVE','LOCKED') NOT NULL DEFAULT 'NEW', -account_balance DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +account_balance DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, output_mode ENUM('LOGIN','EMAIL','DISABLED'), pin VARCHAR(50) NOT NULL DEFAULT '', tan_mode ENUM('NORMAL','INDEXED'), tan_list_status ENUM('PENDING','ACTIVE','INVALID','LOCKED') NOT NULL DEFAULT 'PENDING', tan_key VARCHAR(50) NOT NULL DEFAULT '', -month_transfered BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +month_transfered BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, last_tan VARCHAR(5) NOT NULL DEFAULT '00000', -last_tan_stamp BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +last_tan_stamp BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, last_tan_purpose TINYTEXT, account_type ENUM('CHECK','SAVING') NOT NULL DEFAULT 'CHECK', -overdraft_credit DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +overdraft_credit DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, PRIMARY KEY (id), UNIQUE KEY (pin), INDEX `uid_type` (uid, account_type), @@ -80,9 +80,9 @@ INDEX (last_tan_stamp) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_transfers"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_transfers ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -points_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +points_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, day_bookkeeping CHAR(4) NOT NULL DEFAULT '0000', day_available CHAR(4) NOT NULL DEFAULT '0000', transfer_purpose TINYTEXT, @@ -95,19 +95,19 @@ INDEX (day_bookkeeping, day_available) id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL DEFAULT '', description TINYTEXT, -account_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', -free_transfers INT(7) UNSIGNED NOT NULL DEFAULT '0', -transfer_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +account_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +free_transfers INT(7) UNSIGNED NOT NULL DEFAULT 0, +transfer_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, available TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, output_system_mode ENUM('LOGIN','EMAIL','DISABLED'), package_active ENUM('Y','N') NOT NULL DEFAULT 'N', -free_months_no_fee TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', -interest_plus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.00000', -interest_minus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.00000', -first_payment DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', -free_account_income DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +free_months_no_fee TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, +interest_plus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.00000, +interest_minus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.00000, +first_payment DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +free_account_income DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, free_account_stuff TINYTEXT null, -tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', +tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) ) TYPE=MyISAM"; // free_account_stuff will be a list of columns of the table _bank_packages @@ -117,8 +117,8 @@ PRIMARY KEY (id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_tanlist"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_tanlist ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -idx TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', -account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +idx TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, +account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, tan VARCHAR(50) NOT NULL DEFAULT '', used ENUM('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (id), diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index 70d6e8066a..d68b263e81 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -54,13 +54,13 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')"; $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00100'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_beg_ips`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_beg_ips` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', timeout VARCHAR(10) NOT NULL DEFAULT '', KEY (userid), @@ -124,14 +124,14 @@ case "update": // Update an extension break; case "0.0.6": // SQL queries for v0.0.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template admin_config_beg.tpl (und pro!) nicht vergessen, zu aktualisieren."; break; case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Zeitsperre gegen die selbe IP-Nummer hinzugefügt."; @@ -155,10 +155,10 @@ case "update": // Update an extension case "0.1.2": // SQL queries for v0.1.2 $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_points DOUBLE(21,5) NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_points DOUBLE(21,5) NOT NULL DEFAULT 0.00000"; $VIS = "N"; $LOCKED = "Y"; if (EXT_IS_ACTIVE("beg")) { $VIS = "Y"; $LOCKED = "N"; } $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')"; @@ -194,11 +194,11 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_notify_bonus DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_notify_bonus DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter Einstellungen --> Bettel-Link/-rallye seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."; diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index 4042647e28..f7a7264477 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -50,7 +50,7 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0"; break; case "remove": // Do stuff when removing extension @@ -79,12 +79,12 @@ case "update": // Update an extension break; case "0.2": // SQL queries for v0.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_birthday"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_birthday ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, chk_value VARCHAR(255) NOT NULL DEFAULT '', KEY(userid), PRIMARY KEY(id) @@ -181,7 +181,7 @@ PRIMARY KEY(id) case "0.3.9": // SQL queries for v0.3.9 $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01', CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01', -CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT '1970'"; +CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT 1970"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL."; diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index d2cdcb1c2e..3cabd44217 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -55,23 +55,23 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, subject VARCHAR(255) NOT NULL DEFAULT '', text LONGBLOB NOT NULL, receivers LONGBLOB NOT NULL, -points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -time TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', +points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +time TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW', -timestamp VARCHAR(10) NOT NULL DEFAULT '0', +timestamp VARCHAR(10) NOT NULL DEFAULT 0, url VARCHAR(255) NOT NULL DEFAULT '', -target_send BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +target_send BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, KEY(cat_id), PRIMARY KEY (id) )TYPE=MyISAM"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD INDEX (bonus_id)"; // Run this SQL when html or html_mail extension is installed @@ -123,14 +123,14 @@ case "update": // Update an extension case "0.2.1": // SQL queries for v0.2.1 $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_bonus' LIMIT 1"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT '10.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT '100.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT 10.000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT 100.000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".$_CONFIG['one_day'].""; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Use actual month for this update - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT '0.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT '0.000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT 0.000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT 0.000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1"; @@ -142,12 +142,12 @@ case "update": // Update an extension $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_turbo"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus_turbo ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -level BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, points DOUBLE(20,3) NOT NULL DEFAULT '0.000', -timemark VARCHAR(32) NOT NULL DEFAULT '0', +timemark VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY(id), KEY mail_id (mail_id), KEY bonus_id (bonus_id), @@ -191,11 +191,11 @@ KEY userid (userid) case "0.2.8": // SQL queries for v0.2.8 $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET timestamp='0' WHERE timestamp='0000000000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "5 Nachkommastellen implementiert"; @@ -235,7 +235,7 @@ KEY userid (userid) case "0.3.5": // SQL queries for v0.3.5 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden."; @@ -262,8 +262,8 @@ KEY userid (userid) break; case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*7)."'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*7).""; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Automatisches Löschen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."; @@ -285,13 +285,13 @@ KEY userid (userid) break; case "0.4.4": // SQL queries for v0.4.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '15.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '100.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) @@ -473,11 +473,11 @@ WHERE last_online < ".$mark." ORDER BY userid"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."; diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index b5acab720e..8998dd5724 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -53,7 +53,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // SQL commands to run $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT '3600'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_tested tinyint(1) NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_tested tinyint(1) NOT NULL DEFAULT 0"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)"; break; @@ -111,8 +111,8 @@ case "update": // Update an extension break; case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)"; // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 17bda731fe..a74596f2ac 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -66,7 +66,7 @@ PRIMARY KEY(id) $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)"; // Add entry to user table - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT '1'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1"; break; case "remove": // Do stuff when removing extension diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index a55144659a..97160da4ea 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -53,9 +53,9 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_doubler ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -refid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', timemark VARCHAR(10) NOT NULL DEFAULT '', completed ENUM('Y','N') NOT NULL DEFAULT 'N', @@ -69,36 +69,36 @@ PRIMARY KEY(id) // --- SETTINGS --- // // Minimum points to double - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_min DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '100.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_min DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; // Maximum points to double - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '10000.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"; // Points left on users account after doubling - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT '1000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"; // Charge for doubling points which goes to the webmaster (shreddered in fact!) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.030'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"; // Referal percents - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.020'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000"; // Shall I use the jackpot to take points from? (Y/N, default=Y) $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // A user account to take points from (default: 0->none) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Total payed out points from your doublers - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Sending mode of mails (immediately/daily reset) // --> This also means who fast the doubled points will be payed out! $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"; // Timeout for entries to be purged (default: one week) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*7)."'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*7).""; // Number of newest entries to display - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Number of entries which will be payed out soon - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Number of entries which are already payed out - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Points used by every member - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Counter for usage of the doubler - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // // --- MENU SYSTEMS --- @@ -147,7 +147,7 @@ case "update": // Update an extension case "0.0.2": // SQL queries for v0.0.2 // Total used points - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Gebühr wird vom Verdoppler-Pott abgezogen."; @@ -172,8 +172,8 @@ case "update": // Update an extension break; case "0.0.6": // SQL queries for v0.0.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT '1'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT '1'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index c12bd04a3e..4d28464e97 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -53,9 +53,9 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_holidays"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_holidays ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -holiday_start VARCHAR(10) NOT NULL DEFAULT '0', -holiday_end VARCHAR(10) NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +holiday_start VARCHAR(10) NOT NULL DEFAULT 0, +holiday_end VARCHAR(10) NOT NULL DEFAULT 0, comments LONGBLOB NOT NULL, KEY (userid), PRIMARY KEY(id) @@ -157,7 +157,7 @@ case "update": // Update an extension case "0.1.3": // SQL queries for v0.1.3 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*2)."'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*2)."'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf Urlaub geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"; @@ -178,7 +178,7 @@ case "update": // Update an extension break; case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Fehlende Tabellenspalte hinzugefügt."; diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index 3b3e7149ef..5d9be462b0 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -111,7 +111,7 @@ PRIMARY KEY(media_key) break; case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)"; diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index 877e6ee7ce..b23a58c42d 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -80,8 +80,8 @@ case "update": // Update an extension $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nl_until VARCHAR(10) NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Vor der eigentlichen Freigabe dieser Erweiterungen habe ich sie versehendlich im Archiv mit auf den Server hochgeladen. Diese Version fügt die bereits angekündigte Funktionalitäten, wie zum Beispiel das Einstellen der Abschaltgebühr."; diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index f213def8a7..47a1a96383 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -55,14 +55,14 @@ case "register": // Do stuff when installation is running (modules.php?module=ad id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sid VARCHAR(32) NOT NULL DEFAULT '', ip VARCHAR(15) NOT NULL DEFAULT '', -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -refid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, module VARCHAR(255) NOT NULL DEFAULT '', action VARCHAR(255) NOT NULL DEFAULT '', what VARCHAR(255) NOT NULL DEFAULT '', is_admin ENUM('Y','N') NOT NULL DEFAULT 'N', is_member ENUM('Y','N') NOT NULL DEFAULT 'N', -timestamp VARCHAR(10) NOT NULL DEFAULT '0', +timestamp VARCHAR(10) NOT NULL DEFAULT 0, PRIMARY KEY(id), KEY(userid), KEY(refid) diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 1ea7c1913b..eeb4f31388 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -84,7 +84,7 @@ case "update": // Update an extension case "0.1.1": // SQL queries for v0.1.1 $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_order' LIMIT 1"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber)."; @@ -141,7 +141,7 @@ case "update": // Update an extension break; case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger"; diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index 5eb38ef5ab..2b7ec55630 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -53,12 +53,12 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_payouts"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_payouts ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, payout_total DOUBLE(22,3) UNSIGNED NOT NULL DEFAULT '0.000', target_account VARCHAR(255) NOT NULL DEFAULT '', target_bank VARCHAR(255) NOT NULL DEFAULT '', -payout_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -payout_timestamp VARCHAR(10) NOT NULL DEFAULT '0', +payout_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +payout_timestamp VARCHAR(10) NOT NULL DEFAULT 0, status ENUM('NEW','ACCEPTED','REJECTED') NOT NULL DEFAULT 'NEW', KEY(userid), KEY(payout_id), @@ -69,7 +69,7 @@ PRIMARY KEY(id) id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, type VARCHAR(255) NOT NULL DEFAULT '', rate DOUBLE(22,3) UNSIGNED NOT NULL DEFAULT '0.000', -min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY(id) ) TYPE=MyISAM"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')"; @@ -143,8 +143,8 @@ case "update": // Update an extension break; case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_payouts CHANGE payout_total payout_total DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payout_types CHANGE rate rate DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_payouts CHANGE payout_total payout_total DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payout_types CHANGE rate rate DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php index 6610a3a104..e831d9ae14 100644 --- a/inc/extensions/ext-primera.php +++ b/inc/extensions/ext-primera.php @@ -53,10 +53,10 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_primera"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_primera ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, primera_account VARCHAR(255) NOT NULL DEFAULT '', -primera_amount DOUBLE(22,5) UNSIGNED NOT NULL DEFAULT '0.00000', -primera_timestamp VARCHAR(10) NOT NULL DEFAULT '0', +primera_amount DOUBLE(22,5) UNSIGNED NOT NULL DEFAULT 0.00000, +primera_timestamp VARCHAR(10) NOT NULL DEFAULT 0, primera_type ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED', primera_api_message TINYTEXT, primera_api_status VARCHAR(255) NULL DEFAULT NULL, diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index 541692f87f..5d8d1c54a9 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -55,12 +55,12 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_rallye_users"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_rallye_data ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, title VARCHAR(255) NOT NULL DEFAULT '', descr LONGBLOB NOT NULL, template VARCHAR(255) NOT NULL DEFAULT '', -start_time VARCHAR(10) NOT NULL DEFAULT '0', -end_time VARCHAR(10) NOT NULL DEFAULT '0', +start_time VARCHAR(10) NOT NULL DEFAULT 0, +end_time VARCHAR(10) NOT NULL DEFAULT 0, auto_add_new_user ENUM('Y','N') NOT NULL DEFAULT 'Y', is_active ENUM('Y','N') NOT NULL DEFAULT 'N', send_notify ENUM('Y','N') NOT NULL DEFAULT 'Y', @@ -70,18 +70,18 @@ PRIMARY KEY (id) ) TYPE=MyISAM"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_rallye_prices ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -price_level BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +price_level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, info LONGBLOB NOT NULL, KEY (rallye_id), PRIMARY KEY(id) ) TYPE=MyISAM"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_rallye_users ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -refs BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +refs BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, KEY (rallye_id), KEY (userid), PRIMARY KEY(id) @@ -157,7 +157,7 @@ case "update": // Update an extension break; case "0.1.0": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users CHANGE curr_points curr_points DOUBLE(23,5) NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users CHANGE curr_points curr_points DOUBLE(23,5) NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "5 Nachkommastellen implementiert."; @@ -209,7 +209,7 @@ case "update": // Update an extension break; case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'"; // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index 164616d768..b375fd641e 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -57,7 +57,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad `level` smallint(6) NOT NULL DEFAULT 0, `refid` bigint(20) NOT NULL DEFAULT 0, `refback` float(4,1) NOT NULL DEFAULT 0.0, -`points` FLOAT( 20,5) DEFAULT '0.00000' NOT NULL, +`points` FLOAT( 20,5) DEFAULT 0.00000 NOT NULL, PRIMARY KEY (`id`), UNIQUE `user_refid` (`userid`,`level`,`refid`), KEY (`level`), diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index 29e9f64872..e8a3dfbc48 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -80,16 +80,16 @@ email VARCHAR(255) NOT NULL DEFAULT '', url VARCHAR(255) NOT NULL DEFAULT '', password VARCHAR(255) NOT NULL DEFAULT '', remote_addr VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', -sponsor_created VARCHAR(10) NOT NULL DEFAULT '0', -last_online VARCHAR(10) NOT NULL DEFAULT '0', -last_change VARCHAR(10) NOT NULL DEFAULT '0', +sponsor_created VARCHAR(10) NOT NULL DEFAULT 0, +last_online VARCHAR(10) NOT NULL DEFAULT 0, +last_change VARCHAR(10) NOT NULL DEFAULT 0, status ENUM('UNCONFIRMED','PENDING','CONFIRMED','LOCKED') NOT NULL DEFAULT 'UNCONFIRMED', receive_warnings ENUM('Y','N') NOT NULL DEFAULT 'Y', warning_interval BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*7)."', -points_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', -points_used DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', -refid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -ref_count BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +points_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +points_used DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +ref_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, hash VARCHAR(32) NOT NULL DEFAULT '', last_pay FLOAT(7,2) UNSIGNED NOT NULL DEFAULT '0.00', last_curr VARCHAR(255) NOT NULL DEFAULT '€', @@ -103,14 +103,14 @@ PRIMARY KEY(id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_orders"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_orders ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -aid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -regid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -payid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -pay_count BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +regid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +payid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +pay_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, pay_status ENUM('PENDING','PAYED','UNPAYED','DELETED') NOT NULL DEFAULT 'PENDING', -pay_ordered VARCHAR(10) NOT NULL DEFAULT '0', -pay_done VARCHAR(10) NOT NULL DEFAULT '0', +pay_ordered VARCHAR(10) NOT NULL DEFAULT 0, +pay_done VARCHAR(10) NOT NULL DEFAULT 0, KEY (payid), KEY (regid), KEY (aid), @@ -124,8 +124,8 @@ PRIMARY KEY(id) $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_paytypes ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, pay_name VARCHAR(255) NOT NULL DEFAULT '', -pay_rate DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', -pay_min_count BIGINT(20) UNSIGNED NOT NULL DEFAULT '1', +pay_rate DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +pay_min_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 1, pay_currency VARCHAR(255) NOT NULL DEFAULT '€', PRIMARY KEY(id) )TYPE=MyISAM"; @@ -136,7 +136,7 @@ PRIMARY KEY(id) $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_action_convert ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor', -conv_rate BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +conv_rate BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, conv_name VARCHAR(255) NOT NULL DEFAULT 'Mails', KEY (ext_name), PRIMARY KEY(id) @@ -151,7 +151,7 @@ action VARCHAR(255) NOT NULL DEFAULT '', what VARCHAR(255) NULL DEFAULT NULL, title VARCHAR(255) NOT NULL DEFAULT '', active ENUM('Y','N') NOT NULL DEFAULT 'N', -sort BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +sort BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, KEY(what), KEY(action), PRIMARY KEY(id) @@ -162,10 +162,10 @@ PRIMARY KEY(id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_registry"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_registry ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -aid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor', is_active ENUM('Y','N') NOT NULL DEFAULT 'N', -stamp_added VARCHAR(10) NOT NULL DEFAULT '0', +stamp_added VARCHAR(10) NOT NULL DEFAULT 0, KEY(ext_name), KEY(aid), PRIMARY KEY(id) @@ -176,10 +176,10 @@ PRIMARY KEY(id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_urls"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_urls ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, url VARCHAR(255) NOT NULL DEFAULT 'http://', title VARCHAR(255) NOT NULL DEFAULT '', -clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', KEY(sponsorid), PRIMARY KEY(id) @@ -190,12 +190,12 @@ PRIMARY KEY(id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_banner"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_banner ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, url VARCHAR(255) NOT NULL DEFAULT 'http://', alternate VARCHAR(255) NOT NULL DEFAULT '', width INT(7) NOT NULL DEFAULT '468', height INT(7) NOT NULL DEFAULT '60', -views BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +views BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', KEY(sponsorid), PRIMARY KEY(id) @@ -206,17 +206,17 @@ PRIMARY KEY(id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaigns"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_campaigns ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -aid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, campaign_name VARCHAR(255) NOT NULL DEFAULT '', -campaign_start VARCHAR(10) NOT NULL DEFAULT '0', -campaign_end VARCHAR(10) NOT NULL DEFAULT '0', -campaign_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +campaign_start VARCHAR(10) NOT NULL DEFAULT 0, +campaign_end VARCHAR(10) NOT NULL DEFAULT 0, +campaign_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, campaign_expired ENUM('Y','N') NOT NULL DEFAULT 'N', campaign_locked ENUM('Y','N') NOT NULL DEFAULT 'Y', -campaign_ended VARCHAR(10) NOT NULL DEFAULT '0', +campaign_ended VARCHAR(10) NOT NULL DEFAULT 0, locked_reason tinyblob, -locked_timestamp VARCHAR(10) NOT NULL DEFAULT '0', +locked_timestamp VARCHAR(10) NOT NULL DEFAULT 0, status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', KEY(aid), KEY(sponsorid), @@ -228,11 +228,11 @@ PRIMARY KEY(id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaign_assigns"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_campaign_assigns ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -campaignid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -urlid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -bannerid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -views BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +campaignid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +urlid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +bannerid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +views BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, KEY(bannerid), KEY(urlid), KEY(campaignid), @@ -254,7 +254,7 @@ PRIMARY KEY(id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_display_data"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_display_data ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, data_row VARCHAR(255) NOT NULL DEFAULT '', display ENUM('Y','N') NOT NULL DEFAULT 'N', KEY(sponsorid), @@ -365,8 +365,8 @@ PRIMARY KEY(id) // // General configuration stuff // - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_ref_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '100.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '1000.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_ref_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000"; // Load CSS file $EXT_CSS = "Y"; diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 54cf355174..d8a8920f89 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -152,7 +152,7 @@ case "update": // Update an extension break; case "0.0.2": // SQL queries for v0.0.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT '1209600'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*14).""; // Update notes (these will be set as task text!) $UPDATE_NOTES = "In der Tabelle "._MYSQL_PREFIX."_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)"; @@ -166,7 +166,7 @@ case "update": // Update an extension break; case "0.0.4": // SQL queries for v0.0.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Anzahl Mails pro Seite in EMail-Details ansehen und EMail-Archiv hinzugefügt."; @@ -226,7 +226,7 @@ case "update": // Update an extension case "0.1.2": // SQL queries for v0.1.2 $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"; @@ -296,14 +296,14 @@ PRIMARY KEY(id) break; case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_jackpot CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_jackpot CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE used_points used_points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE used_points used_points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "5 Nachkommastellen implementiert"; @@ -343,8 +343,8 @@ PRIMARY KEY(id) break; case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Spalten max_mails und receive_mails auf BIGINT(20) gesetzt."; @@ -360,7 +360,7 @@ PRIMARY KEY(id) case "0.2.7": // SQL queries for v0.2.7 $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"; // Update notes (these will be set as task text!) @@ -371,7 +371,7 @@ PRIMARY KEY(id) break; case "0.2.8": // SQL queries for v0.2.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD last_login VARCHAR(10) NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD last_login VARCHAR(10) NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Letzter Login wird gespeichert, Cache wird bei installierter Cache-Erweiterung bei Sprachenänderung aufgefrischt."; @@ -452,8 +452,8 @@ PRIMARY KEY(id) id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, la_id VARCHAR(255) NOT NULL DEFAULT '', la_title VARCHAR(255) NOT NULL DEFAULT '', -la_posx BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -la_posy BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +la_posx BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +la_posy BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, UNIQUE KEY (la_id), INDEX (la_posx), INDEX (la_posy), @@ -477,9 +477,9 @@ PRIMARY KEY(id) $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_stats ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -aid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, type ENUM('la','action','what') NOT NULL DEFAULT 'what', -clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, INDEX (aid), PRIMARY KEY (id) ) TYPE=MyISAM"; @@ -515,7 +515,7 @@ PRIMARY KEY (id) $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY user_hash VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1"; @@ -572,7 +572,7 @@ PRIMARY KEY (id) case "0.4.3": // SQL queries for v0.4.3 $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)"; @@ -654,7 +654,7 @@ PRIMARY KEY (id) break; case "0.5.2": // SQL queries for v0.5.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refdepths` CHANGE `percents` `percents` FLOAT(8,5) NOT NULL DEFAULT '0.00000'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refdepths` CHANGE `percents` `percents` FLOAT(8,5) NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein."; diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index e9bc3d7f79..d1db394b53 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -53,17 +53,18 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_urls`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_urls` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url` VARCHAR(255) NOT NULL DEFAULT '', `last_salt` VARCHAR(255) NOT NULL DEFAULT '', -`views_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -`views_max` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -`views_allowed` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +`views_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`views_max` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`views_allowed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NOT NULL DEFAULT 'PENDING', `registered` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_locked` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', `lock_reason` VARCHAR(255) NOT NULL DEFAULT '', `reject_reason` VARCHAR(255) NOT NULL DEFAULT '', +`fixed_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY(`id`), UNIQUE KEY `userid_url` (`userid`,`url`), INDEX `status_userid` (`status`,`userid`), @@ -73,11 +74,11 @@ INDEX `status_userid` (`status`,`userid`), $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_locks` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `last_surfed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(`id`), -INDEX (`userid`), +UNIQUE KEY `userid_url` (`userid`,`url_id`), INDEX (`url_id`) ) TYPE=MyISAM COMMENT='Surfbar reload locks'"; @@ -85,11 +86,11 @@ INDEX (`url_id`) $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_salts`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_salts` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `last_salt` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY(`id`), -INDEX (`userid`), +UNIQUE KEY `userid_url` (`userid`,`url_id`), INDEX (`url_id`) ) TYPE=MyISAM COMMENT='Surfbar last used salts'"; @@ -102,18 +103,19 @@ INDEX (`url_id`) `count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `last_online` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), -INDEX (`userid`,`url_id`) +UNIQUE KEY `userid_url` (`userid`,`url_id`), +INDEX (`url_id`) ) TYPE=MyISAM COMMENT='Surfbar Statistics'"; // Member actions pending on status $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_actions`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_actions` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NOT NULL DEFAULT 'PENDING', +`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL, `action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL, `new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL, PRIMARY KEY (`id`), -INDEX (`status`) +UNIQUE KEY `status_action` (`status`,`action`) ) TYPE=MyISAM COMMENT='Surfbar Member Actions'"; // Member actions diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index 03c9a3de69..909be12a81 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -52,7 +52,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // SQL commands to run $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Load CSS file? $EXT_CSS = "Y"; diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index a1b3d2c095..daf80dc657 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -56,11 +56,11 @@ case "register": // Do stuff when installation is running // Transfer from a member $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_in ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, reason VARCHAR(255) NOT NULL DEFAULT '', -time_trans VARCHAR(14) NOT NULL DEFAULT '0', +time_trans VARCHAR(14) NOT NULL DEFAULT 0, trans_id VARCHAR(12) NOT NULL DEFAULT '', KEY (userid), KEY (from_uid), @@ -70,11 +70,11 @@ PRIMARY KEY(id) // Transfers to a member $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_out ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, reason VARCHAR(255) NOT NULL DEFAULT '', -time_trans VARCHAR(14) NOT NULL DEFAULT '0', +time_trans VARCHAR(14) NOT NULL DEFAULT 0, trans_id VARCHAR(12) NOT NULL DEFAULT '', KEY (userid), KEY (to_uid), @@ -94,8 +94,8 @@ PRIMARY KEY(id) $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*28)."'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".$_CONFIG['one_day']."'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT '100'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT '5'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"; // Add row(s) to user's data $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"; diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index 6fd0478df3..d457bc937a 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -53,10 +53,10 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_wernis"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_wernis ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, wernis_account VARCHAR(255) NOT NULL DEFAULT '', -wernis_amount DOUBLE(22,5) UNSIGNED NOT NULL DEFAULT '0.00000', -wernis_timestamp VARCHAR(10) NOT NULL DEFAULT '0', +wernis_amount DOUBLE(22,5) UNSIGNED NOT NULL DEFAULT 0.00000, +wernis_timestamp VARCHAR(10) NOT NULL DEFAULT 0, wernis_type ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED', wernis_api_message TINYTEXT, wernis_api_status VARCHAR(255) NULL DEFAULT NULL, @@ -67,7 +67,7 @@ PRIMARY KEY(id) // Confiuration $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_refid VARCHAR(6) NOT NULL DEFAULT ''"; diff --git a/inc/language/de.php b/inc/language/de.php index 529da02db8..5239c5cac2 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -1193,6 +1193,7 @@ define('LOCK_REASON', "Sperrgrund"); define('LOCK_TIMESTAMP', "Sperrzeitpunkt"); define('EXTENSION', "Erweiterung"); define('MOD_REWRITE_ERROR', "Sie müssen mod_rewrite in Apache aktiviert haben um die Erweiterung rewrite nutzen zu können."); +define('ADMIN_BUILD_STATUS_HANDLER', "Status-Handler"); define('MEMBER_MAIL_BONUS_CONFIRMED_ON', "Sie haben diese Bonusmail %s bestätigt."); define('MEMBER_MAIL_NORMAL_CONFIRMED_ON', "Sie haben diese Klickmail %s bestätigt."); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index e1de2d3bd5..164813300e 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -42,7 +42,7 @@ if (!defined('__SECURITY')) { // ----------------------------------------------------------------------------- // // Admin has added an URL with given user id and so on -function SURFBAR_ADMIN_ADD_URL ($url, $limit) { +function SURFBAR_ADMIN_ADD_URL ($url, $limit, $reload) { // Do some pre-checks if (!IS_ADMIN()) { // Not an admin @@ -59,10 +59,13 @@ function SURFBAR_ADMIN_ADD_URL ($url, $limit) { } elseif ("".($limit + 0)."" != "".$limit."") { // Invalid amount entered return false; + } elseif ("".($reload + 0)."" != "".$reload."") { + // Invalid amount entered + return false; } // Register the new URL - return SURFBAR_REGISTER_URL($url, "0", "ACTIVE", "unlock", $limit); + return SURFBAR_REGISTER_URL($url, "0", "ACTIVE", "unlock", array('limit' => $limit, 'reload' => $reload)); } // Admin unlocked an email so we can migrate the URL function SURFBAR_ADMIN_MIGRATE_URL ($url, $uid) { @@ -164,7 +167,7 @@ function SURFBAR_MEMBER_ADD_URL ($url, $limit) { } // Register the new URL - return SURFBAR_REGISTER_URL($url, $GLOBALS['userid'], "PENDING", "reg", $limit); + return SURFBAR_REGISTER_URL($url, $GLOBALS['userid'], "PENDING", "reg", array('limit' => $limit)); } // Create list of actions depending on status for the user function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { @@ -539,7 +542,7 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="AS } // END - if // Look up the record - $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, views_max, views_allowed, status, registered, last_locked, lock_reason, views_max, views_allowed + $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, views_max, views_allowed, status, registered, last_locked, lock_reason, views_max, views_allowed, fixed_reload FROM "._MYSQL_PREFIX."_surfbar_urls WHERE %s='%s'".$add." ORDER BY %s %s @@ -568,20 +571,23 @@ ORDER BY %s %s return $lastUrlData; } // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first! -function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $limit=0) { +function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $extraFields = array()) { global $_CONFIG; // Make sure by the user registered URLs are always pending if ($addMode == "reg") $status = "PENDING"; // Prepare content - $content = array( + $content = array_merge($extraFields, array( 'url' => $url, 'frametester' => FRAMETESTER($url), 'uid' => $uid, 'status' => $status, - 'limit' => $limit - ); + )); + + // Is limit/reload set? + if (!isset($config['limit'])) $content['limit'] = 0; + if (!isset($config['reload'])) $content['reload'] = 0; // Insert the URL into database $content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content); @@ -616,13 +622,14 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) { if (empty($uid)) $uid = 0; // Just run the insert query for now - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid,url,status,views_max,views_allowed) VALUES (%s,'%s','%s',%s,%s)", + SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)", array( $uid, $urlData['url'], $urlData['status'], $urlData['limit'], - $urlData['limit'] + $urlData['limit'], + $urlData['reload'] ), __FILE__, __LINE__ ); @@ -1177,6 +1184,15 @@ GROUP BY userid", function SURFBAR_DETERMINE_WAIT_TIME () { global $_CONFIG; + // Get fixed reload lock + $fixed = SURFBAR_GET_FIXED_RELOAD(); + + // Is the fixed reload time set? + if ($fixed > 0) { + // Return it + return $fixed; + } // END - if + // Static time is default $time = $_CONFIG['surfbar_static_time']; @@ -1511,7 +1527,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) { // And query the database //DEBUG_LOG(__FUNCTION__, __LINE__, "randNum={$randNum},maxRand={$maxRand},surfLock=".SURFBAR_GET_DATA('surf_lock')."", false); - $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed + $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed, sbu.fixed_reload FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs ON sbu.id=sbs.url_id @@ -1525,7 +1541,7 @@ LIMIT %s,1", ); } else { // Get data from specified id number - $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed + $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed, sbu.fixed_reload FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs ON sbu.id=sbs.url_id @@ -1658,5 +1674,10 @@ function SURFBAR_GET_ALLOWED_VIEWS () { // Get data element and return its contents return SURFBAR_GET_DATA('views_allowed'); } +// Getter for fixed reload +function SURFBAR_GET_FIXED_RELOAD () { + // Get data element and return its contents + return SURFBAR_GET_DATA('fixed_reload'); +} // ?> diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index b6fa6a83dd..ea7df656ea 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -972,7 +972,7 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct } // END - if } elseif (isset($content[$column])) { // Unfinished! - mxchange_die("{--".__FUNCTION__."--}:UNFINISHED: id={$id}/{$column}[".gettype($statusInfo)."] = {$content[$column]}"); + mxchange_die("{--".__FUNCTION__."--}:".__LINE__.":UNFINISHED: id={$id}/{$column}[".gettype($statusInfo)."] = {$content[$column]}"); } } // END - foreach diff --git a/inc/modules/admin/what-add_surfbar_url.php b/inc/modules/admin/what-add_surfbar_url.php index cfa7b7b7f1..bfe1425c55 100644 --- a/inc/modules/admin/what-add_surfbar_url.php +++ b/inc/modules/admin/what-add_surfbar_url.php @@ -41,9 +41,9 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR("admin", __FILE__); // Was an URL added? -if ((isset($_POST['add'])) && (!empty($_POST['url']))) { +if ((isset($_POST['add'])) && (!empty($_POST['url'])) && (!empty($_POST['limit']))) { // Then add this URL - if (SURFBAR_ADMIN_ADD_URL($_POST['url'], $_POST['limit'])) { + if (SURFBAR_ADMIN_ADD_URL($_POST['url'], $_POST['limit'], $_POST['reload'])) { // URL was added LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_URL_ADDED); } else { diff --git a/templates/de/html/admin/admin_add_surfbar_url.tpl b/templates/de/html/admin/admin_add_surfbar_url.tpl index 5bac569fd4..c45e3fa62d 100644 --- a/templates/de/html/admin/admin_add_surfbar_url.tpl +++ b/templates/de/html/admin/admin_add_surfbar_url.tpl @@ -13,6 +13,11 @@ (0 = Unbegrenzt) +
+ Reloadsperre: {--_SECONDS--}
+ (0 = Standarteinstellungen) +
+
diff --git a/templates/de/html/admin/admin_admins_mails_list_row.tpl b/templates/de/html/admin/admin_admins_mails_list_row.tpl index e2de5525fa..9e9eb9ae85 100644 --- a/templates/de/html/admin/admin_admins_mails_list_row.tpl +++ b/templates/de/html/admin/admin_admins_mails_list_row.tpl @@ -1,9 +1,11 @@ - - $content[tpl] + + + + $content[tpl] + - $content[alnk] + $content[alnk] + diff --git a/templates/de/html/admin/admin_config_admins_row.tpl b/templates/de/html/admin/admin_config_admins_row.tpl index 481d57e012..21be99f123 100644 --- a/templates/de/html/admin/admin_config_admins_row.tpl +++ b/templates/de/html/admin/admin_config_admins_row.tpl @@ -1,12 +1,17 @@ - - $content[admin] + + - $content[action] + $content[admin] + - $content[what] + $content[action] + + + $content[what] + - $content[mode] + $content[mode] + diff --git a/templates/de/html/admin/admin_config_cats_row.tpl b/templates/de/html/admin/admin_config_cats_row.tpl index 4459fd9f3a..cff985ae62 100644 --- a/templates/de/html/admin/admin_config_cats_row.tpl +++ b/templates/de/html/admin/admin_config_cats_row.tpl @@ -1,11 +1,14 @@ - + + + -  $content[cat]  +  $content[cat]  + - $content[vis] + $content[vis] + - $content[sort] + $content[sort] + diff --git a/templates/de/html/admin/admin_config_email_row.tpl b/templates/de/html/admin/admin_config_email_row.tpl index 34db1de2bb..facf5df1be 100644 --- a/templates/de/html/admin/admin_config_email_row.tpl +++ b/templates/de/html/admin/admin_config_email_row.tpl @@ -1,9 +1,11 @@ - + + + -  $content[value]  +  $content[value]  + -  $content[comment]  +  $content[comment]  + diff --git a/templates/de/html/admin/admin_config_payouts_row.tpl b/templates/de/html/admin/admin_config_payouts_row.tpl index 7981c58863..44d498859a 100644 --- a/templates/de/html/admin/admin_config_payouts_row.tpl +++ b/templates/de/html/admin/admin_config_payouts_row.tpl @@ -1,9 +1,17 @@ - -  $content[from] -  $content[type] -  $content[rate] -  $content[mpoi] + + + + +  $content[from] + + +  $content[type] + + +  $content[rate] + + +  $content[mpoi] + diff --git a/templates/de/html/admin/admin_config_rallye_prices_row.tpl b/templates/de/html/admin/admin_config_rallye_prices_row.tpl index 2bd757fc4d..0a13f45cd5 100644 --- a/templates/de/html/admin/admin_config_rallye_prices_row.tpl +++ b/templates/de/html/admin/admin_config_rallye_prices_row.tpl @@ -1,8 +1,14 @@ - - $content[level] -  $content[points] -  $content[infos] + + + + + $content[level] + + +  $content[points] + + +  $content[infos] + diff --git a/templates/de/html/admin/admin_del_bank_packages_row.tpl b/templates/de/html/admin/admin_del_bank_packages_row.tpl index 46ff45d661..309e66a208 100644 --- a/templates/de/html/admin/admin_del_bank_packages_row.tpl +++ b/templates/de/html/admin/admin_del_bank_packages_row.tpl @@ -1,6 +1,6 @@ - + $content[id] diff --git a/templates/de/html/admin/admin_del_transfer_row.tpl b/templates/de/html/admin/admin_del_transfer_row.tpl index 7c818aa322..af6918d8e9 100644 --- a/templates/de/html/admin/admin_del_transfer_row.tpl +++ b/templates/de/html/admin/admin_del_transfer_row.tpl @@ -1,10 +1,20 @@ - - $content[stamp] - $content[uid_from] - $content[uid_to] - $content[reason] - $content[points] + + + + + $content[stamp] + + + $content[uid_from] + + + $content[uid_to] + + + $content[reason] + + + $content[points] + diff --git a/templates/de/html/admin/admin_extensions_row.tpl b/templates/de/html/admin/admin_extensions_row.tpl index 01f5a98713..d8b98cb15d 100644 --- a/templates/de/html/admin/admin_extensions_row.tpl +++ b/templates/de/html/admin/admin_extensions_row.tpl @@ -1,10 +1,20 @@ - - -   $content[name] -   $content[lang] - $content[css] - $content[active] -   v$content[ver] + + + + +   $content[name] + + +   $content[lang] + + + $content[css] + + + $content[active] + + +   v$content[ver] + diff --git a/templates/de/html/admin/admin_list_admins_row.tpl b/templates/de/html/admin/admin_list_admins_row.tpl index 24aa46bfbd..27f7e0b34b 100644 --- a/templates/de/html/admin/admin_list_admins_row.tpl +++ b/templates/de/html/admin/admin_list_admins_row.tpl @@ -1,11 +1,17 @@ - -   $content[login] -   $content[email] -   $content[mode] -   $content[la_mode] + + + + +   $content[login] + + +   $content[email] + + +   $content[mode] + + +   $content[la_mode] + diff --git a/templates/de/html/admin/admin_list_bank_package_row.tpl b/templates/de/html/admin/admin_list_bank_package_row.tpl index 5a1c9d297e..6d5e84824a 100644 --- a/templates/de/html/admin/admin_list_bank_package_row.tpl +++ b/templates/de/html/admin/admin_list_bank_package_row.tpl @@ -1,18 +1,26 @@ - - $content[id] + + - $content[title] + $content[id] + - $content[description] + $content[title] + - $content[fee] {!POINTS!} + $content[description] + - $content[plus]% + $content[fee] {!POINTS!} + - $content[minus]% + $content[plus]% + + + $content[minus]% + - $content[active] + $content[active] + diff --git a/templates/de/html/admin/admin_list_country_row.tpl b/templates/de/html/admin/admin_list_country_row.tpl index 4354d26411..4734d8cbd2 100644 --- a/templates/de/html/admin/admin_list_country_row.tpl +++ b/templates/de/html/admin/admin_list_country_row.tpl @@ -1,11 +1,14 @@ - - $content[code] + + - $content[name] + $content[code] + + + $content[name] + - $content[active] + $content[active] + diff --git a/templates/de/html/admin/admin_list_holiday_row.tpl b/templates/de/html/admin/admin_list_holiday_row.tpl index 8c90ec0b36..1af87b9c9f 100644 --- a/templates/de/html/admin/admin_list_holiday_row.tpl +++ b/templates/de/html/admin/admin_list_holiday_row.tpl @@ -1,11 +1,23 @@ - - $content[uid] - $content[start] - $content[end] -
$content[comments]
- $content[status] - $content[last] + + + + + $content[uid] + + + $content[start] + + + $content[end] + + +
$content[comments]
+ + + $content[status] + + + $content[last] + diff --git a/templates/de/html/admin/admin_list_sponsor_pay_del_row.tpl b/templates/de/html/admin/admin_list_sponsor_pay_del_row.tpl index 566dfb685e..65671494ca 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_del_row.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_del_row.tpl @@ -1,17 +1,17 @@ - - - - -  $content[name] - - -  $content[rate] - - -  $content[min] - - -  $content[curr] - - \ No newline at end of file + + + + +  $content[name] + + +  $content[rate] + + +  $content[min] + + +  $content[curr] + + diff --git a/templates/de/html/admin/admin_list_sponsor_pay_row.tpl b/templates/de/html/admin/admin_list_sponsor_pay_row.tpl index 777fabbd22..468cbc6119 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_row.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_row.tpl @@ -1,17 +1,17 @@ - - - - -  $content[name] - - -  $content[rate] - - -  $content[min] - - -  $content[currency] - - \ No newline at end of file + + + + +  $content[name] + + +  $content[rate] + + +  $content[min] + + +  $content[currency] + + diff --git a/templates/de/html/admin/admin_list_surfbar_actions_row.tpl b/templates/de/html/admin/admin_list_surfbar_actions_row.tpl index 5eca3a2ae6..39c40091c9 100644 --- a/templates/de/html/admin/admin_list_surfbar_actions_row.tpl +++ b/templates/de/html/admin/admin_list_surfbar_actions_row.tpl @@ -1,6 +1,6 @@ - + $content[status] diff --git a/templates/de/html/admin/admin_list_surfbar_urls_row.tpl b/templates/de/html/admin/admin_list_surfbar_urls_row.tpl index 4f69f7852f..4210adcd6b 100644 --- a/templates/de/html/admin/admin_list_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_list_surfbar_urls_row.tpl @@ -1,6 +1,6 @@ - + $content[userid] diff --git a/templates/de/html/admin/admin_list_task_ext_rows.tpl b/templates/de/html/admin/admin_list_task_ext_rows.tpl index f5dca425a7..4f7d4ed00c 100644 --- a/templates/de/html/admin/admin_list_task_ext_rows.tpl +++ b/templates/de/html/admin/admin_list_task_ext_rows.tpl @@ -1,11 +1,23 @@ - - - $content[admin] - {--ADMIN_REGISTER_EXTENSION--} - $content[infos] - $content[uid] - $content[type] - $content[created]] + + + + $content[admin] + + + {--ADMIN_REGISTER_EXTENSION--} + + + $content[infos] + + + $content[uid] + + + $content[type] + + + $content[created]] + diff --git a/templates/de/html/admin/admin_list_task_rows.tpl b/templates/de/html/admin/admin_list_task_rows.tpl index 83dceaf70d..8ff1655f91 100644 --- a/templates/de/html/admin/admin_list_task_rows.tpl +++ b/templates/de/html/admin/admin_list_task_rows.tpl @@ -1,11 +1,23 @@ - - - $content[admin] - --- - $content[infos] - $content[uid] - $content[type] - $content[created]] + + + + $content[admin] + + + --- + + + $content[infos] + + + $content[uid] + + + $content[type] + + + $content[created]] + diff --git a/templates/de/html/admin/admin_menu_overview_row.tpl b/templates/de/html/admin/admin_menu_overview_row.tpl index f6f438a77b..14ccc9dd60 100644 --- a/templates/de/html/admin/admin_menu_overview_row.tpl +++ b/templates/de/html/admin/admin_menu_overview_row.tpl @@ -1,10 +1,17 @@ - - $content[action] - $content[what] -   $content[title] -   $content[navi] - \ No newline at end of file + + + + + $content[action] + + + $content[what] + + +   $content[title] + + +   $content[navi] + + diff --git a/templates/de/html/admin/admin_mods_list_row.tpl b/templates/de/html/admin/admin_mods_list_row.tpl index 5326ec2d59..1ea2fc05ef 100644 --- a/templates/de/html/admin/admin_mods_list_row.tpl +++ b/templates/de/html/admin/admin_mods_list_row.tpl @@ -1,17 +1,23 @@ - + + + -  $content[mod] +  $content[mod] + -  $content[title] +  $content[title] + -  $content[locked] +  $content[locked] + -  $content[hidden] +  $content[hidden] + -  $content[admin] +  $content[admin] + -  $content[mem] +  $content[mem] + diff --git a/templates/de/html/admin/admin_overview_list_ext_rows.tpl b/templates/de/html/admin/admin_overview_list_ext_rows.tpl index f5dca425a7..4f7d4ed00c 100644 --- a/templates/de/html/admin/admin_overview_list_ext_rows.tpl +++ b/templates/de/html/admin/admin_overview_list_ext_rows.tpl @@ -1,11 +1,23 @@ - - - $content[admin] - {--ADMIN_REGISTER_EXTENSION--} - $content[infos] - $content[uid] - $content[type] - $content[created]] + + + + $content[admin] + + + {--ADMIN_REGISTER_EXTENSION--} + + + $content[infos] + + + $content[uid] + + + $content[type] + + + $content[created]] + diff --git a/templates/de/html/admin/admin_overview_list_rows.tpl b/templates/de/html/admin/admin_overview_list_rows.tpl index 83dceaf70d..8ff1655f91 100644 --- a/templates/de/html/admin/admin_overview_list_rows.tpl +++ b/templates/de/html/admin/admin_overview_list_rows.tpl @@ -1,11 +1,23 @@ - - - $content[admin] - --- - $content[infos] - $content[uid] - $content[type] - $content[created]] + + + + $content[admin] + + + --- + + + $content[infos] + + + $content[uid] + + + $content[type] + + + $content[created]] + diff --git a/templates/de/html/admin/admin_payments_list_row.tpl b/templates/de/html/admin/admin_payments_list_row.tpl index d09da5bcf8..7045c34895 100644 --- a/templates/de/html/admin/admin_payments_list_row.tpl +++ b/templates/de/html/admin/admin_payments_list_row.tpl @@ -1,13 +1,17 @@ - - $content[time] {--_SECONDS--} + + - $content[pay] + $content[time] {--_SECONDS--} + - $content[price] + $content[pay] + + + $content[price] + - $content[title] + $content[title] + diff --git a/templates/de/html/admin/admin_points_row.tpl b/templates/de/html/admin/admin_points_row.tpl index ffb7f6b4c2..a94496b542 100644 --- a/templates/de/html/admin/admin_points_row.tpl +++ b/templates/de/html/admin/admin_points_row.tpl @@ -1,9 +1,11 @@ - - $content[lvl] + + + + $content[lvl] + - $content[per]% + $content[per]% + diff --git a/templates/de/html/admin/admin_refbanner_row.tpl b/templates/de/html/admin/admin_refbanner_row.tpl index b7aa39b8b6..d344bbba6c 100644 --- a/templates/de/html/admin/admin_refbanner_row.tpl +++ b/templates/de/html/admin/admin_refbanner_row.tpl @@ -1,12 +1,20 @@ - - $content[alt] - $content[alt] - $content[cnt] - $content[clx] - $content[vis] + + + + + $content[alt] + + + $content[alt] + + + $content[cnt] + + + $content[clx] + + + $content[vis] + diff --git a/templates/de/html/admin/admin_theme_edit_row.tpl b/templates/de/html/admin/admin_theme_edit_row.tpl index 410541331b..5939f66836 100644 --- a/templates/de/html/admin/admin_theme_edit_row.tpl +++ b/templates/de/html/admin/admin_theme_edit_row.tpl @@ -1,16 +1,24 @@ - - $content[link] - $content[name] - $content[is_act] - $content[email] - $content[url_title] - v$content[ver] + + + + + + $content[link] + + + $content[name] + + + $content[is_act] + + + $content[email] + + + $content[url_title] + + + v$content[ver] + diff --git a/templates/de/html/admin/admin_unlock_emails_row.tpl b/templates/de/html/admin/admin_unlock_emails_row.tpl index 4b00859d3f..ef3b2e1eeb 100644 --- a/templates/de/html/admin/admin_unlock_emails_row.tpl +++ b/templates/de/html/admin/admin_unlock_emails_row.tpl @@ -1,18 +1,28 @@ - - $content[u_link] - $content[subj] - {--ADMIN_TEST_URL--} + + + + - $content[cat_link] + $content[u_link] + + + $content[subj] + + + {--ADMIN_TEST_URL--} + + + $content[cat_link] + - $content[pay_link] - $content[ordered] - $content[tsend] + $content[pay_link] + + + $content[ordered] + + + $content[tsend] + diff --git a/templates/de/html/admin/admin_unlock_sponsor_row.tpl b/templates/de/html/admin/admin_unlock_sponsor_row.tpl index 6ca9d3fe99..342088e018 100644 --- a/templates/de/html/admin/admin_unlock_sponsor_row.tpl +++ b/templates/de/html/admin/admin_unlock_sponsor_row.tpl @@ -1,14 +1,14 @@ - - - - - $content[gender] $content[surname] $content[family] - - - $content[remote] - - - $content[created] - + + + + + $content[gender] $content[surname] $content[family] + + + $content[remote] + + + $content[created] + diff --git a/templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl b/templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl index 516e5409e9..d04298d636 100644 --- a/templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl @@ -1,6 +1,6 @@ - + $content[userid] diff --git a/templates/de/html/ext/ext_surfbar.tpl b/templates/de/html/ext/ext_surfbar.tpl index fe4b05e703..1d33ee81ce 100644 --- a/templates/de/html/ext/ext_surfbar.tpl +++ b/templates/de/html/ext/ext_surfbar.tpl @@ -14,8 +14,11 @@ dynamischen Gutschriften werden prozentual errechnet und gemeinsam mit der Basisvergütung gutgeschrieben. Die prozentuale Ref-Vergütung wird jedoch nur von der Basisvergütung berechnet.

-Es können auch URLs direkt und nur in die Surfbar gebucht werden. Hier -gilt jedoch ein einstellbarer Festpreis.
+Es können auch URLs direkt und nur in die Surfbar gebucht werden. Sie +können zudem eigene URLs (nur aus Sponsorennetzwerken nehmen, wo das +Einbinden der URL in eine Surfbar erlaubt ist!) aus dem Adminbereich +hinzufügen und dabei eine Reload-Sperre unabhängig von den +Standarteinstellungen in Sekunden angeben.

Die Wartezeit ist ebenfalls entweder statisch einstellbar, wenn Sie statische Vergütung eingestellt haben oder dynamisch. Dabei richtet sich ebenfalls -- 2.39.5