define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "594");
+define('CURR_SVN_REVISION', "595");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
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 FLOAT(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'),
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 FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
PRIMARY KEY (id),
UNIQUE KEY (pin),
INDEX `uid_type` (uid, account_type),
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,
+points_amount FLOAT(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,
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,
+account_fee FLOAT(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,
+transfer_fee FLOAT(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,
+first_payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+free_account_income FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
free_account_stuff TINYTEXT null,
tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (id)
$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."_config` ADD beg_points FLOAT(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` (
break;
case "0.0.3": // SQL queries for v0.0.3
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points_max DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})";
$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 FLOAT(21,5) UNSIGNED 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')";
$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 FLOAT(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";
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_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus FLOAT(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";
// 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 FLOAT(20,3) NOT NULL DEFAULT 0.000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus FLOAT(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";
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',
+points FLOAT(20,3) NOT NULL DEFAULT '0.000',
timemark VARCHAR(32) NOT NULL DEFAULT 0,
PRIMARY KEY(id),
KEY mail_id (mail_id),
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 FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "5 Nachkommastellen implementiert";
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_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats FLOAT(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 FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats FLOAT(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!)
$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 FLOAT(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";
// Drop/create table for user bookings
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_book`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_book`(
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`subject` VARCHAR(255) NOT NULL DEFAULT 'missing',
`mode` ENUM('add','sub') NOT NULL DEFAULT 'add',
-`points` DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.0000,
+`points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.0000,
INDEX (`userid`),
PRIMARY KEY(`id`)
) TYPE=MyISAM COMMENT='Member points booking table'";
{
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."_config ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT '3600'";
+ $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) UNSIGNED 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;
// Table for debug log entries
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_log`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_log` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-`sender_id` BIGINT(20) NOT NULL DEFAULT 0,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
`file` VARCHAR(255) NOT NULL DEFAULT '',
`line` MEDIUMINT NOT NOT NULL DEFAULT 0,
// Table against debug log abuse
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_log_abuse`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_log_abuse` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-`client_id` BIGINT(20) NOT NULL DEFAULT 0,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
`raw_data` LONGTEXT,
`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
// Table on relay/server for client exchanges
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_client`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_client` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`key` VARCHAR(255) NOT NULL DEFAULT 'SELF',
`url` VARCHAR(255) NOT NULL DEFAULT '',
`webmaster` VARCHAR(255) NOT NULL DEFAULT '',
// Table for debug log <-> client connection
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_client_log`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_client_log` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-`client_id` BIGINT(20) NOT NULL DEFAULT 1,
-`log_id` BIGINT(20) NOT NULL DEFAULT 0,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
+`log_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX `client_log` (`client_id`,`log_id`),
UNIQUE (`log_id`),
PRIMARY KEY (`id`)
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)";
// Config entries
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_id` BIGINT(20) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_reject_log` BIGINT(20) NOT NULL DEFAULT ".($_CONFIG['one_day'] * 30)."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day'] * 30)."";
break;
case "remove": // Do stuff when removing extension
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,
+points FLOAT(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',
// --- 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 FLOAT(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 FLOAT(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";
// Charge for doubling points which goes to the webmaster (shreddered in fact!)
// 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";
// 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 FLOAT(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'";
// 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";
// 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 FLOAT(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";
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 FLOAT(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.";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_payouts (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-payout_total DOUBLE(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
+payout_total FLOAT(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,
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_payout_types (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
type VARCHAR(255) NOT NULL DEFAULT '',
-rate DOUBLE(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
+rate FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(id)
) TYPE=MyISAM";
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 FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payout_types CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt.";
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
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_amount FLOAT(20,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,
) TYPE=MyISAM";
// Confiuration
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''";
break;
case "0.0.2": // SQL queries for v0.0.2
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users ADD curr_points DOUBLE(23,3) NOT NULL DEFAULT '0.000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Aktueller {!POINTS!}-Stand wird beachtet.";
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 FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "5 Nachkommastellen implementiert.";
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_refs`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_refs` (
-`id` bigint(20) NOT NULL auto_increment,
-`userid` bigint(20) NOT NULL DEFAULT 0,
-`level` smallint(6) NOT NULL DEFAULT 0,
-`refid` bigint(20) NOT NULL DEFAULT 0,
+`id` BIGINT(20) UNSIGNED NOT NULL auto_increment,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0,
+`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`refback` float(4,1) NOT NULL DEFAULT 0.0,
`points` FLOAT( 20,5) DEFAULT 0.00000 NOT NULL,
PRIMARY KEY (`id`),
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,
+points_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+points_used FLOAT(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 '',
$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_rate FLOAT(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)
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',
+width INT(7) UNSIGNED NOT NULL DEFAULT 468,
+height INT(7) UNSIGNED NOT NULL DEFAULT 60,
views BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
KEY(sponsorid),
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_amount FLOAT(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,
-locked_reason tinyblob,
+locked_reason TINYBLOB,
locked_timestamp VARCHAR(10) NOT NULL DEFAULT 0,
status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
KEY(aid),
//
// 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 FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000";
// Load CSS file
$EXT_CSS = "Y";
$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 <STRONG>"._MYSQL_PREFIX."_config</STRONG> musste die Spalte <STRONG>auto_purge</STRONG> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)";
+ $UPDATE_NOTES = "In der Tabelle <STRONG>"._MYSQL_PREFIX."_config</STRONG> musste die Spalte <STRONG>auto_purge</STRONG> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)";
break;
case "0.0.3": // SQL queries for v0.0.3
case "0.1.1": // SQL queries for v0.1.1
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT '-1'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT '31536000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*365)."";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Sie können nun <A href=\"".URL."/modules.php?module=admin&`what`=config_home\">hier</A> die Verzögerungszeit in der <A href=\"".URL."/index.php\">Eingangsseite</A> einstellen.";
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 FLOAT(20,5) UNSIGNED 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 FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price FLOAT(20,5) UNSIGNED 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 FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "5 Nachkommastellen implementiert";
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) UNSIGNED 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.";
case "0.5.6": // SQL queries for v0.5.6
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_stats_data`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_stats_data` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-`userid` BIGINT(20) NOT NULL DEFAULT 0,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown',
`stats_data` VARCHAR(255) NOT NULL DEFAULT '',
`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_warn_low_points` BIGINT(20) NOT NULL DEFAULT 100";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_low_interval` BIGINT(20) NOT NULL DEFAULT ".$_CONFIG['one_day']."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".$_CONFIG['one_day']."";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'";
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
$SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='surfbar' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
$SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_mod_reg` SET locked='Y' WHERE module='surfbar' LIMIT 1";
break;
case "update": // Update an extension
- switch ($EXT_VER)
- {
+ switch ($EXT_VER) {
case "0.0.1": // SQL queries for v0.0.1
$SQLs[] = "";
switch ($EXT_VER)
{
case "0.1": // SQL queries for v0.1
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_limit` INT(7) NOT NULL DEFAULT 20";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Seitenweises Anzeigen der User-Liste ist nun möglich.";
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
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_amount FLOAT(20,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,
case "0.0.1": // SQL queries for v0.0.1
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_factor DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_factor DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
{
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."_config` ADD `yoomedia_id` BIGINT(20) NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_sid` BIGINT(20) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8)."";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 60";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_total` SMALLINT(6) NOT NULL DEFAULT 200";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8)."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200";
// Admin menu
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)";
// Reload lock table
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_yoomedia_reload`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_yoomedia_reload` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` VARCHAR(255) NOT NULL DEFAULT 'general',
-`y_id` BIGINT(20) NOT NULL DEFAULT 0,
-`y_reload` SMALLINT(6) NOT NULL DEFAULT 0,
+`y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0,
`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE `y_type` (`type`,`y_id`)
// Still no luck or empty title?
if (empty($name)) {
// No name found
- $name = LANG_UNKNOWN_MODULE." (".$mod.")";
+ $name = sprintf("%s (%s)", LANG_UNKNOWN_MODULE, $mod);
if (SQL_NUMROWS($result) == 0) {
// Add module to database
$dummy = CHECK_MODULE($mod);
}
// Check validity of a given module name (no file extension)
-function CHECK_MODULE($mod) {
+function CHECK_MODULE ($mod) {
// We need them now here...
global $cacheArray, $_CONFIG, $cacheInstance;
// Load hash
$result_main = SQL_QUERY_ESC("SELECT password FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
- array($GLOBALS['userid']), __FILE__, __LINE__);
+ array($GLOBALS['userid']), __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) == 1) {
// Load hash from database
list($hashDB) = SQL_FETCHROW($result_main);
if (($hash == get_session('u_hash')) || ($_POST['pass1'] == $_POST['pass2'])) {
// Load user's data
$result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND password='%s' LIMIT 1",
- array($GLOBALS['userid'], $hashDB), __FILE__, __LINE__);
+ array($GLOBALS['userid'], $hashDB), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load the data
$DATA = SQL_FETCHROW($result);
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode));
$content = MEMBER_UNKNOWN_MODE.": ".$mode."\n\n";
break;
- }
+ } // END - switch
} // END - if
if (EXT_IS_ACTIVE("country")) {
// Replace code with description
$DATA[4] = COUNTRY_GENERATE_INFO($_POST['country_code']);
- }
+ } // END - if
// Load template
$msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, $GLOBALS['userid']);
$sub_mem = MEMBER_CHANGED_DATA;
// Output success message
- $content = "<STRONG><SPAN class=\"member_done\">".MYDATA_MAIL_SENT."</SPAN></STRONG>";
+ $content = "<SPAN class=\"member_done\">".MYDATA_MAIL_SENT."</SPAN>";
break;
default:
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod));
- $content = "<STRONG><SPAN class=\"member_failed\">".UNKNOWN_MODULE."</SPAN></STRONG>";
+ $content = "<SPAN class=\"member_failed\">".UNKNOWN_MODULE."</SPAN>";
break;
- }
+ } // END - switch
} else {
// Could not load profile data
- $content = "<STRONG><SPAN class=\"member_failed\">".MEMBER_CANNOT_LOAD_PROFILE."</SPAN></STRONG>";
+ $content = "<SPAN class=\"member_failed\">".MEMBER_CANNOT_LOAD_PROFILE."</SPAN>";
}
} else {
// Passwords mismatch
- $content = "<STRONG><SPAN class=\"member_failed\">".MEMBER_PASSWORD_ERROR."</SPAN></STRONG>";
+ $content = "<SPAN class=\"member_failed\">".MEMBER_PASSWORD_ERROR."</SPAN>";
}
} else {
// Could not load profile
- $content = "<STRONG><SPAN class=\"member_failed\">".MEMBER_CANNOT_LOAD_PROFILE."</SPAN></STRONG>";
+ $content = "<SPAN class=\"member_failed\">".MEMBER_CANNOT_LOAD_PROFILE."</SPAN>";
}
// Send email to user if required
if ((!empty($sub_mem)) && (!empty($msg))) {
// Send member mail
SEND_EMAIL($DATA[7], $sub_mem, $msg);
- }
+ } // END - if
// Send only if no other error has occured
if (empty($content)) {
$content = CANNOT_SEND_ADMIN_MAILS;
} else {
// No mail to admin
- $content = "<STRONG><SPAN class=\"member_done\">".MYDATA_MAIL_SENT."</SPAN></STRONG>";
+ $content = "<SPAN class=\"member_done\">".MYDATA_MAIL_SENT."</SPAN>";
}
- }
+ } // END - if
// Load template
LOAD_TEMPLATE("admin_settings_saved", false, $content);
}
// Update module counter
-function COUNT_MODULE($mod)
-{
- if ($mod != "css")
- {
+function COUNT_MODULE($mod) {
+ if ($mod != "css") {
// Do count all other modules but not accesses on CSS file css.php!
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mod_reg SET clicks=clicks+1 WHERE module='%s' LIMIT 1",
- array($mod), __FILE__, __LINE__);
- }
+ array($mod), __FILE__, __LINE__);
+ } // END - if
}
// Get action value from mode (admin/guest/member) and what-value
function GET_ACTION ($MODE, &$wht)
`what` VARCHAR(255) NULL DEFAULT NULL,\r
`title` VARCHAR(50) NOT NULL DEFAULT '',\r
`sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
- `descr` blob NOT NULL,\r
+ `descr` BLOB NOT NULL,\r
PRIMARY KEY (`id`)\r
) TYPE=MyISAM;\r
\r
`payment_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
`data_type` ENUM('TEMP','SEND','NEW','ADMIN') NOT NULL DEFAULT 'TEMP',\r
`timestamp` VARCHAR(10) NOT NULL DEFAULT 0,\r
- `url` tinytext NOT NULL,\r
+ `url` TINYTEXT NOT NULL,\r
`target_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
PRIMARY KEY (`id`)\r
`ref_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`total_logins` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`gender` ENUM('M','F') NOT NULL DEFAULT 'M',\r
- `used_points` DOUBLE(22,3) NOT NULL DEFAULT '0.000',\r
+ `used_points` FLOAT(22,3) NOT NULL DEFAULT '0.000',\r
`emails_sent` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
PRIMARY KEY (`userid`)\r
) TYPE=MyISAM;\r
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
`userid` BIGINT(22) NOT NULL DEFAULT 0,\r
`ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
- `points` DOUBLE(22,3) NOT NULL DEFAULT '0.000',\r
+ `points` FLOAT(22,3) NOT NULL DEFAULT '0.000',\r
PRIMARY KEY (`id`)\r
) TYPE=MyISAM;\r
\r
ALTER TABLE `mxchange_config` ADD `auto_purge` TINYINT(3) UNSIGNED NOT NULL DEFAULT '14';\r
ALTER TABLE `mxchange_config` ADD `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
\r
-ALTER TABLE `mxchange_pool` MODIFY `url` tinytext NOT NULL;\r
-ALTER TABLE `mxchange_pool` CHANGE `url` `url` tinyblob NOT NULL;\r
+ALTER TABLE `mxchange_pool` MODIFY `url` TINYTEXT NOT NULL;\r
+ALTER TABLE `mxchange_pool` CHANGE `url` `url` TINYBLOB NOT NULL;\r
ALTER TABLE `mxchange_pool` MODIFY `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP';\r
\r
DROP TABLE IF EXISTS `mxchange_user_links`;\r
`cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`payment_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`subject` VARCHAR(200) NOT NULL DEFAULT '',\r
- `url` tinyblob NOT NULL,\r
+ `url` TINYBLOB NOT NULL,\r
`max_rec` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`timestamp_ordered` VARCHAR(10) NOT NULL DEFAULT '',\r
`pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
ALTER TABLE `mxchange_refbanner` ADD `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0;\r
ALTER TABLE `mxchange_config` ADD `online_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800';\r
\r
-ALTER TABLE `mxchange_config` ADD `mad_timestamp` VARCHAR(10) NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_config` ADD `mad_timestamp` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0;\r
ALTER TABLE `mxchange_config` ADD `mad_count` BIGINT(20) UNSIGNED NOT NULL;\r
ALTER TABLE `mxchange_config` ADD `profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '15768000';\r
ALTER TABLE `mxchange_config` ADD `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
DROP TABLE IF EXISTS `mxchange_jackpot`;\r
CREATE TABLE `mxchange_jackpot` (\r
`ok` CHAR(2) NOT NULL DEFAULT 'ok',\r
- `points` DOUBLE(23,3) NOT NULL DEFAULT '0.000',\r
+ `points` FLOAT(20,3) NOT NULL DEFAULT '0.000',\r
PRIMARY KEY (`ok`)\r
) TYPE=MyISAM;\r
\r
ADD_FATAL(MYSQL_ERRORS);
}
-if ($MOD_VALID) {
+if (($MOD_VALID) && (defined('__MODULE'))) {
/////////////////////////////////////////////
// Main including line DO NOT REMOVE/EDIT! //
/////////////////////////////////////////////
-<FORM action="{!URL!}/modules.php?module=admin&what=config_mods"
- method="POST">
-<TABLE border="0" cellspacing="0" cellpadding="0" width="680"
- class="admin_table dashed">
+<FORM action="{!URL!}/modules.php?module=admin&what=config_mods" method="POST">
+<TABLE border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed">
<TR>
<TD align="center" class="admin_title bottom2 right2" height="25"><STRONG>{--ID_SELECT--}</STRONG></TD>
<TD align="center" class="admin_title bottom2 right2"><STRONG>{--MODS_NAME--}</STRONG></TD>
<TD align="center" class="admin_title bottom2 right2"><STRONG>{--MODS_IS_LOCKED--}</STRONG></TD>
<TD align="center" class="admin_title bottom2 right2"><STRONG>{--MODS_IS_HIDDEN--}</STRONG></TD>
<TD align="center" class="admin_title bottom2 right2"><STRONG>{--MODS_IS_ADMIN--}</STRONG></TD>
- <TD align="center" class="admin_title bottom2 right2"><STRONG>{--MODS_IS_MEMBER--}</STRONG></TD>
+ <TD align="center" class="admin_title bottom2"><STRONG>{--MODS_IS_MEMBER--}</STRONG></TD>
</TR>
{!__MODS_ROWS!}
<TR>
- <TD colspan="7" class="admin_footer"><INPUT
- type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
- <INPUT type="submit" name="edit" class="admin_submit"
- value="{--MODS_EDIT--}" /></TD>
+ <TD colspan="7" class="admin_footer">
+ <INPUT type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
+ <INPUT type="submit" name="edit" class="admin_submit" value="{--MODS_EDIT--}" />
+ </TD>
</TR>
</TABLE>
</FORM>
-<DIV class="admin_note">{--MODS_ADMIN_EDIT_NOTE--}</DIV>
+<DIV class="admin_note">
+ {--MODS_ADMIN_EDIT_NOTE--}
+</DIV>
$content[title]
</TD>
<TD class="switch_sw$content[sw] bottom2 right2" align="center">
- $content[locked]
+ $content[locked]
</TD>
<TD class="switch_sw$content[sw] bottom2 right2" align="center">
- $content[hidden]
+ $content[hidden]
</TD>
<TD class="switch_sw$content[sw] bottom2 right2" align="center">
- $content[admin]
+ $content[admin]
</TD>
- <TD class="switch_sw$content[sw] bottom2 right2" align="center">
- $content[mem]
+ <TD class="switch_sw$content[sw] bottom2" align="center">
+ $content[mem]
</TD>
</TR>
{
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."_config` ADD `affliliblatt_id` BIGINT(20) NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_sid` BIGINT(20) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_passwd` VARCHAR(255) NOT NULL DEFAULT ''";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8)."";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 60";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_total` SMALLINT(6) NOT NULL DEFAULT 200";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8)."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200";
// Admin menu
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_affliliblatt','AffiliBlatt Interface 2.0','Einstellungen zum AffiliBlatt Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)";
// Reload lock table
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_affliliblatt_reload`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_affliliblatt_reload` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` VARCHAR(255) NOT NULL DEFAULT 'general',
-`y_id` BIGINT(20) NOT NULL DEFAULT 0,
-`y_reload` SMALLINT(6) NOT NULL DEFAULT 0,
+`y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0,
`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE `y_type` (`type`,`y_id`)
{
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."_config` ADD `gollox_id` BIGINT(20) NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_sid` BIGINT(20) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_passwd` VARCHAR(255) NOT NULL DEFAULT ''";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8)."";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 60";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_total` SMALLINT(6) NOT NULL DEFAULT 200";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8)."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200";
// Admin menu
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_gollox','GolloX Interface 2.0','Einstellungen zum GolloX Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)";
// Reload lock table
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_gollox_reload`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_gollox_reload` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` VARCHAR(255) NOT NULL DEFAULT 'general',
-`y_id` BIGINT(20) NOT NULL DEFAULT 0,
-`y_reload` SMALLINT(6) NOT NULL DEFAULT 0,
+`y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0,
`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE `y_type` (`type`,`y_id`)