- Major change in menu system. You need to rewrite/update your member and guest
authorRoland Häder <roland@mxchange.org>
Sun, 14 Sep 2008 02:51:21 +0000 (02:51 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 14 Sep 2008 02:51:21 +0000 (02:51 +0000)
  menu template or else you will see "Array" in all menus.
- Withdraw functionality re-added to wernis extension
- Some minor fixes

64 files changed:
.gitattributes
inc/databases.php
inc/extensions/ext-active.php
inc/extensions/ext-admins.php
inc/extensions/ext-autopurge.php
inc/extensions/ext-beg.php
inc/extensions/ext-birthday.php
inc/extensions/ext-bonus.php
inc/extensions/ext-cache.php
inc/extensions/ext-country.php
inc/extensions/ext-doubler.php
inc/extensions/ext-holiday.php
inc/extensions/ext-html_mail.php
inc/extensions/ext-maintenance.php
inc/extensions/ext-mediadata.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-nickname.php
inc/extensions/ext-online.php
inc/extensions/ext-optimize.php
inc/extensions/ext-order.php
inc/extensions/ext-other.php
inc/extensions/ext-primera.php
inc/extensions/ext-rallye.php
inc/extensions/ext-sponsor.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-surfbar.php
inc/extensions/ext-top10.php
inc/extensions/ext-transfer.php
inc/extensions/ext-user.php
inc/extensions/ext-wernis.php
inc/functions.php
inc/language/wernis_de.php
inc/libs/sponsor_functions.php
inc/libs/wernis_functions.php
inc/modules/admin/what-add_sponsor.php
inc/modules/admin/what-config_sponsor.php
inc/modules/admin/what-config_wernis.php
inc/modules/admin/what-unlock_sponsor.php
inc/modules/guest/what-sponsor_infos.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/member/what-transfer.php
inc/modules/member/what-wernis.php
inc/modules/sponsor/account.php
inc/mysql-manager.php
install/tables.sql
templates/de/emails/confirm-member.tpl
templates/de/html/admin/admin_config_wernis.tpl
templates/de/html/admin/admin_list_wernis_main.tpl
templates/de/html/ext/ext_primera.tpl
templates/de/html/ext/ext_wernis.tpl
templates/de/html/guest/guest_menu_bottom.tpl
templates/de/html/guest/guest_menu_row.tpl
templates/de/html/guest/guest_menu_title.tpl
templates/de/html/member/member_menu_bottom.tpl
templates/de/html/member/member_menu_row.tpl
templates/de/html/member/member_menu_title.tpl
templates/de/html/member/member_wernis_form.tpl
templates/de/html/member/member_wernis_mode_choose.tpl [new file with mode: 0644]
templates/de/html/member/member_wernis_mode_list.tpl
templates/de/html/member/member_wernis_mode_list_row.tpl
templates/de/html/member/member_wernis_mode_pay.tpl [deleted file]
templates/de/html/member/member_wernis_mode_payout.tpl [new file with mode: 0644]
templates/de/html/member/member_wernis_mode_withdraw.tpl [new file with mode: 0644]

index c757d3301aac223f8fe9a5626511db15e57c4e43..49b0ff6bf40af77db00ad373464cdd5a2cb0a4cd 100644 (file)
@@ -1309,9 +1309,11 @@ templates/de/html/member/member_welcome_footer.tpl -text
 templates/de/html/member/member_welcome_header.tpl -text
 templates/de/html/member/member_wernis.tpl -text
 templates/de/html/member/member_wernis_form.tpl -text
+templates/de/html/member/member_wernis_mode_choose.tpl -text
 templates/de/html/member/member_wernis_mode_list.tpl -text
 templates/de/html/member/member_wernis_mode_list_row.tpl -text
-templates/de/html/member/member_wernis_mode_pay.tpl -text
+templates/de/html/member/member_wernis_mode_payout.tpl -text
+templates/de/html/member/member_wernis_mode_withdraw.tpl -text
 templates/de/html/member/member_wernis_row.tpl -text
 templates/de/html/message.tpl -text
 templates/de/html/metadata.tpl -text
index 74de24b765ab31333f03d5bd8b95e75cadb25ba6..67b179c029de38a042ec9ff49cdb7911808188a9 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "324");
+define('CURR_SVN_REVISION', "325");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index cef68ef7847110e4fc3450c7854fe9a5de7a1a82..47849445dead1d98014b7070fe262c2a7fc5fe50 100644 (file)
@@ -97,7 +97,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) 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 (<STRONG>Heute Online</STRONG> im Gastbereich) vornehmen.', 8)";
 
                // Update notes (these will be set as task text!)
index b23f0f1377ff800405fc2dc5bd11f08b732f828e..119c33010fe288cd938c1fe5cd754bb659abda75 100644 (file)
@@ -99,8 +99,8 @@ case "update": // Update an extension
                $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admins SET default_acl='allow' WHERE login='".get_session('admin_login')."' LIMIT 1";
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_acls";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_acls (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-admin_id BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+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',
@@ -113,14 +113,14 @@ PRIMARY KEY (id)
                break;
 
        case "0.3.1": // SQL queries for v0.3.1
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins_acls MODIFY id BIGINT(20) NOT NULL AUTO_INCREMENT";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins_acls MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT";
                break;
 
        case "0.4.0": // SQL queries for v0.4.0
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_mails";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_mails (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-admin_id BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
 mail_template VARCHAR(255) NOT NULL,
 KEY (admin_id),
 PRIMARY KEY (id)
index 24c2364a6edec21857b242a81be08ca46bd630fb..d029ba56fbbb9739cda0e050481ce3dff1cbcccc 100644 (file)
@@ -51,25 +51,20 @@ switch ($EXT_LOAD_MODE)
 {
 case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
        // SQL commands to run
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_pool modify data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'";
        if (EXT_IS_ACTIVE("bonus"))
        {
-               $SQLs[] = "alter table "._MYSQL_PREFIX."_bonus modify data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'";
        }
        break;
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_pool modify data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'";
        if (EXT_IS_ACTIVE("bonus"))
        {
-               $SQLs[] = "alter table "._MYSQL_PREFIX."_bonus modify data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'";
        }
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP autopurge_inactive";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP autopurge_unconfirmed";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP ap_inactive_since";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP ap_inactive_time";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP ap_unconfirmed_time";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='setup' AND what='config_autopurge' LIMIT 1";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='user' AND what='list_autopurge' LIMIT 1";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP ap_notified";
@@ -91,12 +86,12 @@ case "update": // Update an extension
        case "0.1": // SQL queries for v0.1
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_inactive ENUM('Y', 'N') NOT NULL DEFAULT 'Y'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_unconfirmed ENUM('Y', 'N') NOT NULL DEFAULT 'Y'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_inactive_since BIGINT(20) NOT NULL DEFAULT '2592000'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_inactive_time BIGINT(20) NOT NULL DEFAULT '25200'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_unconfirmed_time BIGINT(20) NOT NULL DEFAULT '432000'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'";
+               $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&ouml;schung', 'Automatisch inaktive oder nicht best&auml;tigte Accounts l&ouml;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&auml;glichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gel&ouml;scht werden.', '10')";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD ap_notified BIGINT(20) 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&ouml:schen von inaktiven bzw. nicht best&auml;tigten Accounts hinzugef&uuml;gt.";
@@ -135,7 +130,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) NOT NULL DEFAULT '".(60*60*24*7)."'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*7)."'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Bereinigung von zu l&ouml;schenden Aufgaben klappt wieder. Zeitlimit f&uuml;r genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><U>Bitte aktualisieren Sie auch die Admin-Templates!</U>";
@@ -213,7 +208,7 @@ case "update": // Update an extension
        case "0.3.3": // SQL queries for v0.3.3
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_del_mails ENUM('Y', 'N') NOT NULL DEFAULT 'Y'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_notify ENUM('Y', 'N') NOT NULL DEFAULT 'Y'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_timeout BIGINT(20) NOT NULL DEFAULT '86400'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Von bereits gel&ouml;schten Mitgliedern die Mails l&ouml;schen integriert.";
index 068d91db641bdc914b69107ced2624196a1fb055..310d5cf4251c15015d1006abe14c1939d1d4813d 100644 (file)
@@ -54,14 +54,14 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_beg', 'Bettel-Link', 'IP-Sperre, {!POINTS!}-Verg&uuml;tung usw. k&ouml;nnen Sie hier einstellen.', 10)";
        $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) NOT NULL DEFAULT '600'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_uid_timeout BIGINT(20) NOT NULL DEFAULT '1800'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_points DOUBLE(20,5) NOT NULL DEFAULT '0.00100'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_clicks BIGINT(20) NOT NULL DEFAULT '0'";
+       $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[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_beg_ips";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_beg_ips (
-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',
 remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
 timeout VARCHAR(10) NOT NULL DEFAULT '',
 KEY (userid),
@@ -108,7 +108,7 @@ case "update": // Update an extension
                break;
 
        case "0.0.3": // SQL queries for v0.0.3
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_points_max DOUBLE(20,5) NOT NULL DEFAULT '0.10000'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_points_max DOUBLE(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!})";
@@ -125,14 +125,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) 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 <U>admin_config_beg.tpl</U> (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) 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&uuml;gt.";
@@ -156,7 +156,7 @@ 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) 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'";
@@ -195,11 +195,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) NOT NULL DEFAULT '0.00000'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_notify_wait BIGINT(20) NOT NULL DEFAULT '30'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_notify BIGINT(20) NOT NULL DEFAULT '0'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_en_notify BIGINT(20) NOT NULL DEFAULT '0'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_di_notify BIGINT(20) NOT NULL DEFAULT '0'";
+               $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'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Die Mitglieder k&ouml;nnen nun optional automatisch &uuml;ber eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen k&ouml;nnen Sie unter <STRONG>Einstellungen --&gt; Bettel-Link/-rallye</STRONG> seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll.";
index 661e55e8b3e18a396cb3d0ea111d483aeeedd788..48008a6e61bbfbe7cc636405a67b0938d922747e 100644 (file)
@@ -81,12 +81,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) 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) NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) NOT NULL DEFAULT '0',
-points BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+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)
index 54fbe20ffcb9729e44620e0776d504515b173176..c3db49da19ef9782033c657ac315eef71e8cf149 100644 (file)
@@ -55,37 +55,37 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y', '', 0)";
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-cat_id BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+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) NOT NULL DEFAULT '0',
-time TINYINT(3) 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',
 url VARCHAR(255) NOT NULL DEFAULT '',
-target_send BIGINT(20) NOT NULL DEFAULT '0',
-clicks BIGINT(20) NOT NULL DEFAULT '0',
-mails_sent BIGINT(20) 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) NOT NULL DEFAULT '0'";
+       $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 INDEX (bonus_id)";
 
        // Run this SQL when html or html_mail extension is installed
-       if (EXT_IS_ACTIVE("html_mail")) $SQLs[] = "alter table "._MYSQL_PREFIX."_bonus add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
+       if (EXT_IS_ACTIVE("html_mail")) $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
        break;
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='bonus' OR what='config_bonus' OR what='send_bonus' OR what='list_bonus' LIMIT 4";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus') LIMIT 4";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='bonus' LIMIT 1";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='bonus' LIMIT 1";
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_user_links modify link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_user_links drop bonus_id";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links DROP bonus_id";
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_urls";
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_customer";
@@ -126,9 +126,9 @@ case "update": // Update an extension
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x&#39;ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zus&auml;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) NOT NULL DEFAULT '86400'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'";
                $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) 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'";
@@ -142,11 +142,11 @@ case "update": // Update an extension
        case "0.2.2": // SQL queries for v0.2.2
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_turbo";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus_turbo (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) NOT NULL DEFAULT '0',
-mail_id BIGINT(20) NOT NULL DEFAULT '0',
-bonus_id BIGINT(20) NOT NULL DEFAULT '0',
-level BIGINT(20) NOT NULL DEFAULT '0',
+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',
 points DOUBLE(20,3) NOT NULL DEFAULT '0.000',
 timemark VARCHAR(32) NOT NULL DEFAULT '0',
 PRIMARY KEY(id),
@@ -236,7 +236,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) 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&ouml;nnen nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden.";
@@ -263,8 +263,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) NOT NULL DEFAULT '".(ONE_DAY * 7)."'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines BIGINT(20) NOT NULL DEFAULT '10'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(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&ouml;schen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Eintr&auml;gen hinzugef&uuml;gt.";
@@ -286,13 +286,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) NOT NULL DEFAULT '15.00000'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref DOUBLE(20,5) NOT NULL DEFAULT '100.00000'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats DOUBLE(20,5) NOT NULL DEFAULT '5.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) NOT NULL DEFAULT '0.00000'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref DOUBLE(20,5) NOT NULL DEFAULT '0.00000'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats DOUBLE(20,5) 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!)
@@ -474,11 +474,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) NOT NULL DEFAULT '0.00000'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait BIGINT(20) NOT NULL DEFAULT '30'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify BIGINT(20) NOT NULL DEFAULT '0'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify BIGINT(20) NOT NULL DEFAULT '0'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify BIGINT(20) NOT NULL DEFAULT '0'";
+               $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'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Optionale automatische Benachrichtigung &uuml;ber aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.";
index c13a330d372b0fe97778647c43aeccf90514d4f2..6ce6c3fa27d82a10d721aab8ac96c91b39ab7194 100644 (file)
@@ -52,7 +52,7 @@ switch ($EXT_LOAD_MODE)
 {
 case "register": // Do stuff when installtion 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) 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[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_cache', 'Cache-Einstellungen', 'Update-Interval des Caches usw. k&ouml;nnen Sie hier &auml;ndern.', 9)";
@@ -115,8 +115,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) NOT NULL DEFAULT '0'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_hits BIGINT(20) 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!)
index 0a28c5b1f59754f47c8fe018efc100d3b032ab36..10af68b4f74bccd1666a51d3571067703dd2adba 100644 (file)
@@ -53,7 +53,7 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_countries";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_countries (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 code CHAR(2) NOT NULL DEFAULT 'DE',
 descr VARCHAR(255) NOT NULL DEFAULT 'Deutschland',
 is_active ENUM('Y', 'N') NOT NULL DEFAULT 'N',
@@ -67,7 +67,7 @@ PRIMARY KEY(id)
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('country', 'list_country', 'Verwalten', 'Hinzuf&uuml;gen, &Auml;ndern und L&ouml;schen von L&auml;ndercodes.', 1)";
 
        // Add entry to user table
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD country_code BIGINT(20) 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
index 0b3aff3158a23ee800c36a47ae4ab6e2f63a587c..afb8f39fcf98125b25622f30b9bdc164db44126f 100644 (file)
@@ -53,10 +53,10 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        // Doubler table
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_doubler (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) NOT NULL DEFAULT '0',
-refid BIGINT(20) NOT NULL DEFAULT '0',
-points DOUBLE(20,5) NOT NULL DEFAULT '0.00000',
+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',
 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',
@@ -70,36 +70,36 @@ PRIMARY KEY(id)
        // --- SETTINGS ---
        //
        // Minimum points to double
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_min DOUBLE(20,5) 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) 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) 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,3) NOT NULL DEFAULT '0.030'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.030'";
        // Referral percents
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_ref FLOAT(7,3) NOT NULL DEFAULT '0.020'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.020'";
        // 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) 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) 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) NOT NULL DEFAULT '".(60*60*24*7)."'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*7)."'";
        // Number of newest entries to display
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_new TINYINT(3) 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) 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) 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) 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) NOT NULL DEFAULT '0'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
 
        //
        // --- MENU SYSTEMS ---
@@ -148,7 +148,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) 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&uuml;hr wird vom Verdoppler-Pott abgezogen.";
@@ -173,8 +173,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) NOT NULL DEFAULT '1'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_group_sent TINYINT(3) 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!)
index e64a7576b18dc138f1475e3628c926e8da80e376..9387596d95468894c636ca2f3aa24939fb588814 100644 (file)
@@ -53,8 +53,8 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        // Create database
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_holidays";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_holidays (
-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',
 holiday_start VARCHAR(10) NOT NULL DEFAULT '0',
 holiday_end VARCHAR(10) NOT NULL DEFAULT '0',
 comments LONGBLOB NOT NULL,
@@ -63,7 +63,7 @@ PRIMARY KEY(id)
 ) TYPE=MyISAM";
 
        // Add default values to config
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_max BIGINT(20) NOT NULL DEFAULT '30'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'";
 
        // Add member menu
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('main', 'holiday', 'Urlaubsschaltung', '4', 'Y', 'Y')";
@@ -158,7 +158,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) NOT NULL DEFAULT '".(60*60*24*2)."'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*2)."'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <STRONG>Urlaub</STRONG> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie &quot;freigegeben&quot; sind!";
@@ -179,7 +179,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) 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&uuml;gt.";
index 821b0592ebb8237695fe29a7eeb7d30b86782727..6ffd774e150ff298074399e72cfa6b057cf987b4 100644 (file)
@@ -51,17 +51,17 @@ switch ($EXT_LOAD_MODE)
 {
 case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
        // SQL commands to run
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_user_data add html ENUM('Y','N') NOT NULL DEFAULT 'Y'";
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_bonus add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_pool add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('main', 'html_mail', 'HTML-Empfang', '3', 'Y', 'Y')";
        break;
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_user_data drop html";
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_bonus drop html_msg";
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_pool drop html_msg";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP html";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus DROP html_msg";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool DROP html_msg";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='main' AND what='html_mail' LIMIT 1";
        break;
 
index 835d898d57b6fe350ac8a9962395358fe91d9155..c03dc6eb73abf834d71e8a4540b1e06f55af2697 100644 (file)
@@ -51,12 +51,8 @@ switch ($EXT_LOAD_MODE)
 {
 case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
        // SQL commands to run
-       $SQLs[] = "alter table "._MYSQL_PREFIX."_config add maintenance ENUM('Y', 'N') NOT NULL DEFAULT 'N';";
-       if (SQL_NUMROWS(SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE what='maintenance' LIMIT 1", __FILE__, __LINE__)) == 0)
-       {
-               // Insert menu only when not exists
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'maintenance', 'Wartungsmodus', 'Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben k&ouml;nnen.', '10')";
-       }
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD maintenance ENUM('Y', 'N') NOT NULL DEFAULT 'N';";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'maintenance', 'Wartungsmodus', 'Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben k&ouml;nnen.', '10')";
        break;
 
 case "remove": // Do stuff when removing extension
index efd1986f878926b84da6a070b39b71a681c6c8d6..7c0aebd8bb3ae4c912666dd933114b3a10e00b38 100644 (file)
@@ -112,8 +112,8 @@ 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) NOT NULL DEFAULT '0'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_stage BIGINT(20) NOT NULL DEFAULT '500'";
+               $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)";
 
                // Update notes (these will be set as task text!)
index 84dd50d1edd4a0794fe4223dd3d61a37613a5d8f..f82a4989b678ff96c56e5124c06b980fa6458e56 100644 (file)
@@ -79,7 +79,7 @@ case "update": // Update an extension
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('newsletter', 'config_newsletter', 'Einstellungen', 'Geb&uuml;hr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)";
                $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='newsletter', what='send_newsletter', title='Versenden', sort='1' WHERE what='newsletter' LIMIT 1";
                $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) NOT NULL DEFAULT '5.00'";
+               $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'";
index 9cd792f5b04b94faa7d7c27d3ec1d315912428c1..6a0dc98d9c804f049d5f7c34f7ff91f32e9e511e 100644 (file)
@@ -104,7 +104,7 @@ case "update": // Update an extension
                break;
 
        case "0.0.6": // SQL queries for v0.0.6
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nickname_len TINYINT(3) NOT NULL DEFAULT '5'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'";
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_nickname', 'Nicknamen', 'Stellen Sie minimale Nicknamenl&auml;nge, sowie erlaubte Zeichen hier ein.', 12)";
@@ -176,6 +176,18 @@ case "update": // Update an extension
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert.";
                break;
+
+       case "0.1.9": // SQL queries for v0.1.9
+               $SQLs[] = "DROP TABLE "._MYSQL_PREFIX."_nickname_history";
+               $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_nickname_history (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+PRIMARY KEY(id)
+) TYPE=MyISAM COMMENT='History of used nicknames'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Historie eingegebener Nicknames hinzugef&uuml;gt. Mitglied kann auf bereits verwendeter zur&uuml;ckgreifen und Liste selbst l&ouml;schen.";
+               break;
        }
        break;
 
index bb240f2a0e1fbf16ced3dc301044efcc14c18113..b08ea40e9469bf5979cf174b9dc1c5dc1e12cdbb 100644 (file)
@@ -53,11 +53,11 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_online";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_online (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 sid VARCHAR(32) NOT NULL DEFAULT '',
 ip VARCHAR(15) NOT NULL DEFAULT '',
-userid BIGINT(20) NOT NULL DEFAULT '0',
-refid BIGINT(20) 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 '',
index 3eca7ee90c6b50f1335c30998a5817152e798e47..fe54048880baadfe47f3c9bd5290fd94735a6eef 100644 (file)
@@ -52,7 +52,7 @@ switch ($EXT_LOAD_MODE)
 case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
        // SQL commands to run
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_optimize_gain(
-  id BIGINT(20) NOT NULL AUTO_INCREMENT,
+  id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
   gain decimal(10,3) NOT NULL DEFAULT '0.000',
   PRIMARY KEY(id)
 ) TYPE=MyISAM";
index 4582e18254728677ac5923e3daee4e60f82476a4..077e192a30dfcb0c30f8ac19228945be7051b09e 100644 (file)
@@ -85,7 +85,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) 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&auml;ndigt (Admin-Bereich und im Buchungsformular selber).";
@@ -142,7 +142,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) 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&auml;nger pro Mailbuchung einstellbar. Standart: 10 Empf&auml;nger";
index 1ebdc23b2a526791b15c60250652128902a5b470..2b658190c881851ff210f6248d213a114e639766 100644 (file)
@@ -88,7 +88,7 @@ case "update": // Update an extension
                break;
 
        case "0.0.4": // SQL queries for v0.0.4
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD max_comma TINYINT(3) NOT NULL DEFAULT '3'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Angezeigte Kommastellen k&ouml;nnen zwischen 0 und 5 eingestellt werden.";
index cc860240fab33b9b4a48a0487d260522226be743..4995184559b6cba43b1fe93f791bb4baae0fe0f8 100644 (file)
@@ -66,8 +66,8 @@ PRIMARY KEY(id)
 ) TYPE=MyISAM";
 
        // Confiuration
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_payout BIGINT(20) NOT NULL DEFAULT '40000'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_withdraw BIGINT(20) 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 ''";
 
index a398cc62d7694ec465311b6e8a70258d4d1bbebf..e5406153ffda493be109d8f6ae1320501abe9afa 100644 (file)
@@ -55,8 +55,8 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_rallye_prices";
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_rallye_users";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_rallye_data (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-admin_id BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+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 '',
@@ -70,19 +70,19 @@ KEY (admin_id),
 PRIMARY KEY (id)
 ) TYPE=MyISAM";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_rallye_prices (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-rallye_id BIGINT(20) NOT NULL DEFAULT '0',
-price_level BIGINT(20) NOT NULL DEFAULT '0',
-points BIGINT(20) NOT NULL DEFAULT '0',
+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',
 info LONGBLOB NOT NULL,
 KEY (rallye_id),
 PRIMARY KEY(id)
 ) TYPE=MyISAM";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_rallye_users (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-rallye_id BIGINT(20) NOT NULL DEFAULT '0',
-userid BIGINT(20) NOT NULL DEFAULT '0',
-refs BIGINT(20) NOT NULL DEFAULT '0',
+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',
 KEY (rallye_id),
 KEY (userid),
 PRIMARY KEY(id)
@@ -210,8 +210,8 @@ 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) NOT NULL DEFAULT '0'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_prices BIGINT(20) NOT NULL DEFAULT '3'";
+               $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!)
                $UPDATE_NOTES = "Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <STRONG>templates/de/emails/member/member_rallye_notifty.tpl</STRONG> folgende zwei Zeilen ein:<br />
index 3622ce3f86601a356b40c7f0833cd5c5b25abc1d..75d85830b09e209017c79d235111210a094ec602 100644 (file)
@@ -62,7 +62,7 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_data";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_data (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 company VARCHAR(255) NOT NULL DEFAULT '',
 position VARCHAR(255) NOT NULL DEFAULT '',
 tax_ident VARCHAR(255) NOT NULL DEFAULT '',
@@ -86,13 +86,13 @@ 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) NOT NULL DEFAULT '".(ONE_DAY*7)."',
-points_amount DOUBLE(20,5) NOT NULL DEFAULT '0.00000',
-points_used DOUBLE(20,5) NOT NULL DEFAULT '0.00000',
-refid BIGINT(20) NOT NULL DEFAULT '0',
-ref_count BIGINT(20) NOT NULL DEFAULT '0',
+warning_interval BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(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',
 hash VARCHAR(32) NOT NULL DEFAULT '',
-last_pay FLOAT(7,2) NOT NULL DEFAULT '0.00',
+last_pay FLOAT(7,2) UNSIGNED NOT NULL DEFAULT '0.00',
 last_curr VARCHAR(255) NOT NULL DEFAULT '&euro;',
 KEY(refid),
 KEY(email),
@@ -103,12 +103,12 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_orders";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_orders (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) NOT NULL DEFAULT '0',
-aid BIGINT(20) NOT NULL DEFAULT '0',
-regid BIGINT(20) NOT NULL DEFAULT '0',
-payid BIGINT(20) NOT NULL DEFAULT '0',
-pay_count BIGINT(20) NOT NULL DEFAULT '0',
+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',
 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',
@@ -123,10 +123,10 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_paytypes";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_paytypes (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 pay_name VARCHAR(255) NOT NULL DEFAULT '',
-pay_rate DOUBLE(20,5) NOT NULL DEFAULT '0.00000',
-pay_min_count BIGINT(20) 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 '&euro;',
 PRIMARY KEY(id)
 )TYPE=MyISAM";
@@ -135,9 +135,9 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_action_convert";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_action_convert (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor',
-conv_rate BIGINT(20) 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)
@@ -147,12 +147,12 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_menu";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_menu (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 action VARCHAR(255) NOT NULL DEFAULT '',
 what  VARCHAR(255) NOT NULL DEFAULT '',
 title VARCHAR(255) NOT NULL DEFAULT '',
 active ENUM('Y', 'N') NOT NULL DEFAULT 'N',
-sort BIGINT(20) NOT NULL DEFAULT '0',
+sort BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
 KEY(what),
 KEY(action),
 PRIMARY KEY(id)
@@ -162,8 +162,8 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_registry";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_registry (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-aid BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+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',
@@ -176,11 +176,11 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_urls";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_urls (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
 url VARCHAR(255) NOT NULL DEFAULT 'http://',
 title VARCHAR(255) NOT NULL DEFAULT '',
-clicks BIGINT(20) 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,13 +190,13 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_banner";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_banner (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+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) 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,13 +206,13 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaigns";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_campaigns (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) NOT NULL DEFAULT '0',
-aid BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+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) NOT NULL DEFAULT '0.00000',
+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',
@@ -228,12 +228,12 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaign_assigns";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_campaign_assigns (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-campaignid BIGINT(20) NOT NULL DEFAULT '0',
-urlid BIGINT(20) NOT NULL DEFAULT '0',
-bannerid BIGINT(20) NOT NULL DEFAULT '0',
-clicks BIGINT(20) NOT NULL DEFAULT '0',
-views BIGINT(20) NOT NULL DEFAULT '0',
+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',
 KEY(bannerid),
 KEY(urlid),
 KEY(campaignid),
@@ -244,7 +244,7 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_admin_data";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_admin_data (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 data_row VARCHAR(255) NOT NULL DEFAULT '',
 display ENUM('Y', 'N') NOT NULL DEFAULT 'N',
 PRIMARY KEY(id)
@@ -254,8 +254,8 @@ PRIMARY KEY(id)
                //
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_display_data";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_display_data (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+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),
@@ -366,8 +366,8 @@ PRIMARY KEY(id)
                //
                // General configuration stuff
                //
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_ref_points DOUBLE(20,5) NOT NULL DEFAULT '100.00000'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points DOUBLE(20,5) 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";
index e7821b302615e11efd495390d54c9aeccf9cf52f..c387d98aa6f3110722ac7de46d0126ada673427a 100644 (file)
@@ -109,7 +109,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) NOT NULL DEFAULT '1209600'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT '1209600'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "In der Tabelle <STRONG>mxchange_config</STRONG> musste die Spalte <STRONG>auto_purge</STRONG> (autom. L&ouml;schen von Best&auml;tigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)";
@@ -123,7 +123,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) 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 <STRONG>EMail-Details ansehen</STRONG> und <STRONG>EMail-Archiv</STRONG> hinzugef&uuml;gt.";
@@ -174,8 +174,8 @@ case "update": // Update an extension
 
        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&uuml;punkt (what-welcome ist Standart) als Einstiegspunkt in das Men&uuml;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) NOT NULL DEFAULT '-1'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie BIGINT(20) NOT NULL DEFAULT '31536000'";
+               $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'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Sie k&ouml;nnen nun <A href=\"".URL."/modules.php?module=admin&amp;what=config_home\">hier</A> die Verz&ouml;gerungszeit in der <A href=\"".URL."/index.php\">Eingangsseite</A> einstellen.";
@@ -183,7 +183,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 Referral-Link Ihren Mailtausch aufgerufen hat.', 7)";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD def_refid BIGINT(20) 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 Referral-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)";
@@ -206,7 +206,7 @@ case "update": // Update an extension
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('themes', NULL, 'Design-Auswahl', 3, 'Y', 'N')";
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_themes (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 theme_path VARCHAR(255) NOT NULL DEFAULT '',
 theme_active ENUM('Y', 'N') NOT NULL DEFAULT 'N',
 theme_ver VARCHAR(255) NOT NULL DEFAULT '0.0',
@@ -300,8 +300,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) NOT NULL DEFAULT '0'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE max_mails max_mails BIGINT(20) 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 <U>max_mails</U> und <U>receive_mails</U> auf BIGINT(20) gesetzt.";
@@ -317,7 +317,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) VALUES ('main', 'themes', 'Designs', 6)";
                $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) 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!)
@@ -394,7 +394,7 @@ PRIMARY KEY(id)
                // Connection table between the menu system and the "logical area" system
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 la_id VARCHAR(255) NOT NULL DEFAULT '',
 la_action VARCHAR(255) NOT NULL DEFAULT '',
 la_what VARCHAR(255) NOT NULL DEFAULT '',
@@ -406,11 +406,11 @@ PRIMARY KEY(id)
                // All "logical areas" together
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las_data (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
+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) NOT NULL DEFAULT '0',
-la_posy BIGINT(20) 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),
@@ -433,10 +433,10 @@ PRIMARY KEY(id)
                // The statistics table
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_stats (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-aid BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+aid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
 type ENUM('la', 'action', 'what') NOT NULL DEFAULT 'what',
-clicks BIGINT(20) NOT NULL DEFAULT '0',
+clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
 INDEX (aid),
 PRIMARY KEY (id)
 ) TYPE=MyISAM";
@@ -470,12 +470,12 @@ PRIMARY KEY (id)
                break;
 
        case "0.3.6": // SQL queries for v0.3.6
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD salt_length TINYINT(3) NOT NULL DEFAULT '9'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''";
                $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) 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";
index 4550e539acae0077752afe536d0288fb77b436ff..6151ba4a98004075a7772ce54a134dc7ec7b5307 100644 (file)
@@ -70,7 +70,7 @@ UNIQUE KEY `userid_url` (`userid`, `url`)
        // Reload locks
        $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`";
        $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_locks` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`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',
 `last_surfed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -82,7 +82,7 @@ INDEX (`url_id`)
        // Surfbar salts
        $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_salts`";
        $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_salts` (
-`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`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',
 `last_salt` VARCHAR(255) NOT NULL DEFAULT '',
index e21a58a0821ec1a64f1cc7ff96b8a07a33e704e8..c764d09346913cb1060bcc269f23075f46b525e5 100644 (file)
@@ -53,7 +53,7 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        // 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&auml;tze angezeigt werden sollen.', 8)";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD top10_max TINYINT(3) 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";
index 7431b2166e7014ef597538def55fa8c6349afb89..3d7905dfdfe86289dd5d2de52e53e348b4eb41df 100644 (file)
@@ -56,10 +56,10 @@ case "register": // Do stuff when installtion is running
 
        // Transfer from a member
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_in (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) NOT NULL DEFAULT '0',
-from_uid BIGINT(20) NOT NULL DEFAULT '0',
-points BIGINT(20) NOT NULL DEFAULT '0',
+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',
 reason VARCHAR(255) NOT NULL DEFAULT '',
 time_trans VARCHAR(14) NOT NULL DEFAULT '0',
 trans_id VARCHAR(12) NOT NULL DEFAULT '',
@@ -70,10 +70,10 @@ PRIMARY KEY(id)
 
        // Transfers to a member
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_out (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) NOT NULL DEFAULT '0',
-to_uid BIGINT(20) NOT NULL DEFAULT '0',
-points BIGINT(20) NOT NULL DEFAULT '0',
+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',
 reason VARCHAR(255) NOT NULL DEFAULT '',
 time_trans VARCHAR(14) NOT NULL DEFAULT '0',
 trans_id VARCHAR(12) NOT NULL DEFAULT '',
@@ -92,11 +92,11 @@ PRIMARY KEY(id)
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES ('main', 'transfer', '{!POINTS!}-Transfer', 'Y', 'Y', 5)";
 
        // Add config values
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_max BIGINT(20) NOT NULL DEFAULT '50'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_age BIGINT(20) NOT NULL DEFAULT '".(ONE_DAY*28)."'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_timeout BIGINT(20) NOT NULL DEFAULT '".ONE_DAY."'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_balance BIGINT(20) NOT NULL DEFAULT '100'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_code BIGINT(20) NOT NULL DEFAULT '5'";
+       $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 '".(ONE_DAY*28)."'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".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'";
 
        // Add row(s) to user's data
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD opt_in ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
index b93a2731ebbc9a9f26d4f3639261de009c07a2e1..c10a34665a449f98cfe8357c2e85490c3a4e21ff 100644 (file)
@@ -89,7 +89,7 @@ case "update": // Update an extension
                $UPDATE_NOTES = "CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.";
 
        case "0.1.2": // SQL queries for v0.1.2
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mails_confirmed BIGINT(20) NOT NULL DEFAULT '0'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mails_confirmed BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Dem Mitglied wird nun angezeigt, wie viele Mails er best&auml;tigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr ber&uuml;cksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.";
@@ -101,7 +101,7 @@ case "update": // Update an extension
                break;
 
        case "0.1.4": // SQL queries for v0.1.4
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD emails_received BIGINT(20) NOT NULL DEFAULT '0'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD emails_received BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. <BIG>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</BIG>";
@@ -138,7 +138,7 @@ case "update": // Update an extension
                break;
 
        case "0.2.1": // SQL queries for v0.2.1
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_alpha TINYINT(3) NOT NULL DEFAULT '10'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_alpha TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'";
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_user', 'Mitgliederliste', 'Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)";
 
                // Update notes (these will be set as task text!)
index bc2c925691433f8bf43c4cdf34dca7d4c4fdd46a..24634ea2c2798c7435a825c9895d7d0c507f19b1 100644 (file)
@@ -39,13 +39,13 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 }
 
 // Version of this extension
-$EXT_VERSION = "0.0";
+$EXT_VERSION = "0.0.1";
 
 // Auto-set extension version
 if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
 
 // Version history array (add more with , "0.1" and so on)
-$EXT_VER_HISTORY = array("0.0");
+$EXT_VER_HISTORY = array("0.0", "0.0.1");
 
 switch ($EXT_LOAD_MODE)
 {
@@ -66,9 +66,9 @@ PRIMARY KEY(id)
 ) TYPE=MyISAM";
 
        // Confiuration
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_payout BIGINT(20) NOT NULL DEFAULT '40000'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_withdraw BIGINT(20) NOT NULL DEFAULT '5000'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id BIGINT(20) NOT NULL DEFAULT '0'";
+       $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_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 ''";
@@ -110,8 +110,17 @@ case "update": // Update an extension
        switch ($EXT_VER)
        {
        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_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";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "";
+               $UPDATE_NOTES = "Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}-&gt;Wernis versehen. Prozentualer Abzug als &quot;Betreibergeb&uuml;hr hinzugef&uuml;gt, was z.B. f&uuml;r Wechselstuben interessant ist.";
                break;
        }
        break;
index 59e8c8c4a9d556b0bdd13fc09e0daa10003af04b..cc64df1b28519495857eed577b0e920cf0128865 100644 (file)
@@ -2420,7 +2420,26 @@ function CONVERT_SELECTIONS_TO_TIMESTAMP(&$POST, &$DATA, &$id, &$skip) {
 }
 // Reverts the german decimal comma into Computer decimal dot
 function REVERT_COMMA ($str) {
-       $float = (float)str_replace(",", ".", $str);
+       // Default float is not a float... ;-)
+       $float = false;
+
+       // Which language is selected?
+       switch (GET_LANGUAGE()) {
+               case "de": // German language
+                       // Remove german thousand dots first
+                       $str = str_replace(".", "", $str);
+
+                       // Replace german commata with decimal dot and cast it
+                       $float = (float)str_replace(",", ".", $str);
+                       break;
+
+               default: // US and so on
+                       // Remove thousand dots first and cast
+                       $float = (float)str_replace(",", "", $str);
+                       break;
+       }
+
+       // Return float
        return $float;
 }
 //
index 7be49074c6da55df3d764fedc79da2da643bbaf0..df862d63d1280648ff561b909d796179f4773d71 100644 (file)
@@ -40,6 +40,18 @@ if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) {
 // Language definitions
 define('TASK_ADMIN_LIST_WERNIS_ALL', "Alle Wernis-Ein-/Auszahlungen");
 define('TASK_ADMIN_LIST_WERNIS_ALL_TITLE', "Listet alle Wernis-Ein- und Auszahlungen auf.");
+define('MEMBER_WERNIS_MODE_WITHDRAW', "Wernis einzahlen");
+define('MEMBER_WERNIS_MODE_PAYOUT', "Wernis auszahlen");
+define('WERNIS_STATUS_UNKNWOWN', "Wernis-Typ <u>%s</u> unbekannt.");
+define('WERNIS_STATUS_WITHDRAW', "Einzahlung von WDS66");
+define('WERNIS_STATUS_PAYOUT', "Auszahlung an WDS66");
+define('WERNIS_STATUS_FAILED', "Fehlgeschlagen");
+define('WERNIS_TIMESTAMP', "Buchungszeitmarke");
+define('WERNIS_ACCOUNT', "WDS66-Hauptaccount");
+define('WERNIS_TOTAL_WERNIS', "Gesamt &uuml;berwiesen");
+define('WERNIS_MEMBER_LIST_WERNIS', "&Uuml;berweisungsliste von/an WDS66-Hauptaccount");
+
+// Admin messages
 define('WERNIS_ADMIN_CONFIG_TITLE', "Einstellungen zum WDS66-Hauptaccount:");
 define('WERNIS_ADMIN_MIN_PAYOUT', "Minimumguthaben f&uuml;r Auszahlungen.");
 define('WERNIS_ADMIN_MIN_WITHDRAW', "Minimumguthaben f&uuml;r Einzahlungen.");
@@ -47,7 +59,7 @@ define('WERNIS_ADMIN_API_ID', "WDS66-API-ID (api_id=x)");
 define('WERNIS_ADMIN_API_MD5', "WDS66-API-Key (api_md5=xxxxx; 32-stellig)");
 define('WERNIS_ADMIN_API_URL', "Basis-URL der API-Skripte");
 define('WERNIS_ADMIN_REFID', "Ihre Referral-ID bei WDS66-Portal (= Ihr Username!)");
-define('WERNIS_ADMIN_CONFIG_NOTE', "<A href=\"http://www.wds66.com/ref.php?refid=10437\" target=\"_blank\">Hier</A> k&ouml;nnen Sie schon f&uuml;r <strong>5,00&euro;</strong>=<strong>25.000 Abfragen</strong> ein API-Account beantragen (dazu ist ein <strong>kostenloses</strong> Wernis-Account dennoch n&ouml;tig!) <strong>Geben Sie immer Ihren Usernamen von WDS66-Hauptaccount ein und &uuml;berpr&uuml;fen Sie diesen mehrmals! Er wird zum &Uuml;berweisen von Wernis/Wernis ben&ouml;tigt.");
+define('WERNIS_ADMIN_CONFIG_NOTE', "<A href=\"http://www.wds66.com/ref.php?refid=10437\" target=\"_blank\">Hier</A> k&ouml;nnen Sie schon f&uuml;r <strong>5,00&euro;</strong>=<strong>25.000 Abfragen</strong> ein API-Account beantragen (dazu ist ein <strong>kostenloses</strong> Wernis-Account dennoch n&ouml;tig!) Geben Sie immer Ihren Usernamen von WDS66-Hauptaccount ein und &uuml;berpr&uuml;fen Sie diesen mehrmals! Er wird zum &Uuml;berweisen von und nach WDS66-Wernis-Portal ben&ouml;tigt. Die Betreibergeb&uuml;hren und Umrechnungsfaktoren sind f&uuml;r den Betrieb Ihres {!MT_WORD2!} komplett in Wernis ausgelegt, diese m&uuml;ssen Sie also noch anpassen, wenn Sie z.B. Punkte haben und in Wernis auszahlen lassen wollen.");
 define('WERNIS_ADMIN_NO_TRANSFERS', "Derzeit keine Wernis transferiert!");
 define('WERNIS_ADMIN_WDS66_ACCOUNT', "Account bei WDS66-Portal");
 define('WERNIS_ADMIN_TRANSFERED', "Wernis transferiert");
@@ -55,16 +67,14 @@ define('WERNIS_ADMIN_TIMESTAMP', "Zeitpunkt &Uuml;berweisung");
 define('WERNIS_ADMIN_TYPE', "&Uuml;berweisungsrichtung");
 define('WERNIS_ADMIN_API_MESSAGE', "Nachricht von WDS66-API");
 define('WERNIS_ADMIN_API_STATUS', "Status von WDS66-API");
-define('MEMBER_WERNIS_MODE_WITHDRAW', "Wernis einzahlen");
-define('MEMBER_WERNIS_MODE_PAYOUT', "Wernis auszahlen");
-define('WERNIS_STATUS_UNKNWOWN', "Wernis-Typ <u>%s</u> unbekannt.");
-define('WERNIS_STATUS_WITHDRAW', "Einzahlung von WDS66");
-define('WERNIS_STATUS_PAYOUT', "Auszahlung an WDS66");
-define('WERNIS_STATUS_FAILED', "Fehlgeschlagen");
-define('WERNIS_TIMESTAMP', "Buchungszeitmarke");
-define('WERNIS_ACCOUNT', "WDS66-Hauptaccount");
-define('WERNIS_TOTAL_WERNIS', "Gesamt &uuml;berwiesen");
-define('WERNIS_MEMBER_LIST_WERNIS', "&Uuml;berweisungsliste von/an WDS66-Hauptaccount");
+define('WERNIS_ADMIN_PAYOUT_ACTIVE', "Auszahlungen zum WDS66-Portal aktiviert?");
+define('WERNIS_ADMIN_WITHDRAW_ACTIVE', "Einzahlungen vom WDS66-Portal aktiviert?");
+define('WERNIS_ADMIN_PAYOUT_FACTOR', "Umrechnungsfaktor von {!POINTS!} in Wernis f&uuml;r Auszahlungen");
+define('WERNIS_ADMIN_WITHDRAW_FACTOR', "Umrechnungsfaktor von Wernis in {!POINTS!} f&uuml;r Einzahlungen");
+define('WERNIS_ADMIN_PAYOUT_FEE_PERCENT', "Prozentuale Betreibergeb&uuml;hr f&uuml;r Auszahlungen");
+define('WERNIS_ADMIN_WITHDRAW_FEE_PERCENT', "Prozentuale Betreibergeb&uuml;hr f&uuml;r Einzahlungen");
+define('WERNIS_ADMIN_PAYOUT_FEE_FIX', "Fixe Betreibergeb&uuml;hr f&uuml;r Auszahlungen");
+define('WERNIS_ADMIN_WITHDRAW_FEE_FIX', "Fixe Betreibergeb&uuml;hr f&uuml;r Einzahlungen");
 
 // API messages
 define('WERNIS_API_REQUEST_DATA_INVALID', "Interner Fehler: Abfragedaten sind defekt!");
@@ -84,9 +94,11 @@ define('WERNIS_ERROR_STATUS', "Fehler-Status <u>%s</u> erhalten.");
 define('WERNIS_UNKNOWN_ERROR', "Unbekannter Fehler aufgetreten!");
 
 // Member messages
+define('MEMBER_WERNIS_MODE_CHOOSE', "M&ouml;chten Sie Wernis zu Ihrem WDS66-Hauptaccount ausbezahlt bekommen oder Wernis hier einzahlen?");
+define('MEMBER_WERNIS_MODE_CHOOSE2', "Hier klicken um neue &Uuml;berweisung zu starten...");
 define('WERNIS_MEMBER_NO_ACCOUNT', "Noch kein WDS66-Account? Hier entlang!");
 define('WERNIS_MEMBER_API_DATA_MISSING', "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten m&uuml;ssen.");
-define('WERNIS_MEMBER_MIN_PAYOUT_PAYOUT', "Sie haben nicht gen&uuml;gend Wernis zum Auszahlen! Mindestens: <u>%s</u> Wernis.");
+define('WERNIS_MEMBER_MIN_PAYOUT', "Sie haben nicht gen&uuml;gend Wernis zum Auszahlen! Mindestens: <u>%s</u> Wernis.");
 define('WERNIS_MEMBER_WITHDRAW_TITLE', "Wernis bei {!MAIN_TITLE!} einzahlen:");
 define('WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT', "Wernis hier im Account:");
 define('WERNIS_MEMBER_WITHDRAW_MIN_POINTS', "Mindest einzuzahlendes Wernis-Guthaben:");
@@ -112,6 +124,8 @@ define('WERNIS_MEMBER_WITHDRAW_DONE', "Einzahlung auf Ihr {!MAIN_TITLE!} Konto e
 define('WERNIS_MEMBER_PAYOUT_DONE', "Auszahlung auf WDS66-Hauptaccount erfolgreich abgeschlossen. :-)");
 define('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED', "Sie k&ouml;nnen nicht <u>%s</u> Wernis auszahlen, da Sie nur <u>%s</u> &uuml;brig haben.");
 define('WERNIS_MEMBER_STATUS', "&Uuml;berweisungsart");
+define('WERNIS_MEMBER_PAYOUT_DISABLED', "Auszahlung wurde administrativ deaktiviert.");
+define('WERNIS_MEMBER_WITHDRAW_DISABLED', "Einzahlung wurde administrativ deaktiviert.");
 
 //
 ?>
index 7bc398f5b505c2bf14a3eed1389e069bf64beaa0..3b17afa3ff4a09849eb29e4f7b7c5cd4b6176dd7 100644 (file)
@@ -420,7 +420,7 @@ ORDER BY sort", array($action), __FILE__, __LINE__);
 //
 function GENERATE_SPONSOR_CONTENT($what)
 {
-       global $HTTP_POST_VARS, $_GET, $CONFIG;
+       global $_CONFIG;
        $OUT = "";
        $FILE = sprintf("%sinc/modules/sponsor/%s.php", PATH, $what);
        if (FILE_READABLE($FILE)) {
@@ -437,14 +437,14 @@ function GENERATE_SPONSOR_CONTENT($what)
 //
 function UPDATE_SPONSOR_LOGIN()
 {
-       global $_COOKIE, $CONFIG;
+       global $_COOKIE, $_CONFIG;
 
        // Check if cookies are set
        if ((empty($_COOKIE['sponsorid'])) || (empty($_COOKIE['sponsorpass']))) return false;
 
        // Calculate cookie lifetime, maybe we have to change this so the admin can setup a
        // seperate timeout for these two cookies?
-       $life = (time() + $CONFIG['online_timeout']);
+       $life = (time() + $_CONFIG['online_timeout']);
 
        // Is confirmed so both is fine and we can continue with login procedure
        $login = ((setcookie("sponsorid"  , bigintval($_COOKIE['sponsorid']), $life, COOKIE_PATH)) &&
index 6a3725ac021a8ffcffd921aa32fdbe6de882be9a..64bcddf27d284f15687bb42d2a99244ffe571327 100644 (file)
@@ -95,7 +95,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
 
        // Add more request data
        $requestData['api_id']  = bigintval($_CONFIG['wernis_api_id']);
-       $requestData['api_key'] = $_CONFIG['wernis_api_key'];
+       $requestData['api_key'] = $_CONFIG['wernis_api_md5'];
 
        // Construct the request string
        $requestString = $_CONFIG['wernis_api_url'] . $scriptName;
@@ -325,11 +325,86 @@ function WERNIS_TRANSFER_STATUS ($status) {
        return $return;
 }
 
-function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = null, $status = null) {
+// Log the transfer
+function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = "", $status = "") {
        // Register this wernis movement
        $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_wernis (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES(%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
                array($GLOBALS['userid'], bigintval($wdsId), bigintval($amount), $type, $message, $status), __FILE__, __LINE__);
 }
 
+// Take fees and factor
+function WERNIS_TAKE_FEE ($points, $mode) {
+       global $_CONFIG;
+
+       // Payout or withdraw are allowed modes!
+       //* DEBUG: */ echo "mode={$mode},points={$points}<br />\n";
+       if (!in_array($mode, array('payout', 'withdraw'))) {
+               // Log error and abort
+               DEBUG_LOG(__FUNCTION__.":uid={$GLOBALS['userid']},mode={$mode},points={$points}");
+               return false;
+       } // END - if
+
+       // Is there a percentage or fixed fee?
+       if ($_CONFIG['wernis_'.$mode.'_fee_percent'] > 0) {
+               // Percentage fee
+               $points -= $points * $_CONFIG['wernis_'.$mode.'_fee_percent'] / 100;
+       } elseif ($_CONFIG['wernis_'.$mode.'_fee_fix'] > 0) {
+               // Fixed fee
+               $points -= $_CONFIG['wernis_'.$mode.'_fee_fix'];
+       }
+
+       // Divide/multiply the factor
+       if ($mode == "payout") {
+               // Divide for payout
+               $points = $points / $_CONFIG['wernis_payout_factor'];
+       } else {
+               // Multiply for withdraw
+               $points = $points * $_CONFIG['wernis_withdraw_factor'];
+       }
+
+       // Return value
+       //* DEBUG: */ echo "mode={$mode},points={$points}<br />\n";
+       return $points;
+}
+
+// Add withdraw fees and factor
+function WERNIS_ADD_WITHDRAW_FEE ($points) {
+       global $_CONFIG;
+
+       // Is there a percentage or fixed fee?
+       if ($_CONFIG['wernis_withdraw_fee_percent'] > 0) {
+               // Percentage fee
+               $points += $points * $_CONFIG['wernis_withdraw_fee_percent'] / 100;
+       } elseif ($_CONFIG['wernis_withdraw_fee_fix'] > 0) {
+               // Fixed fee
+               $points += $_CONFIG['wernis_withdraw_fee_fix'];
+       }
+
+       // Return value
+       return $points;
+}
+
+// Add all fees to the array
+function WERNIS_ADD_FEES_TO_ARRAY (&$array) {
+       global $_CONFIG;
+
+       // Is the array an array? ;-)
+       if (!is_array($array)) {
+               // Log error and return
+               DEBUG_LOG(__FUNCTION__.": Type ".gettype($array)." != array.");
+               return;
+       } // END - if
+
+       // Add both factors
+       $array['payout_factor']        = TRANSLATE_COMMA($_CONFIG['wernis_payout_factor']);
+       $array['withdraw_factor']      = TRANSLATE_COMMA($_CONFIG['wernis_withdraw_factor']);
+
+       // Add all fees
+       $array['payout_fee_percent']   = TRANSLATE_COMMA($_CONFIG['wernis_payout_fee_percent']);
+       $array['withdraw_fee_percent'] = TRANSLATE_COMMA($_CONFIG['wernis_withdraw_fee_percent']);
+       $array['payout_fee_fix']       = TRANSLATE_COMMA($_CONFIG['wernis_payout_fee_fix']);
+       $array['withdraw_fee_fix']     = TRANSLATE_COMMA($_CONFIG['wernis_withdraw_fee_fix']);
+}
+
 //
 ?>
index 2d056ebce741d85f908585cb97931c512681077f..08da77df9f2ace09b680724948d26b5c97799dc5 100644 (file)
@@ -44,7 +44,7 @@ if (isset($_POST['ok'])) {
        SPONSOR_HANDLE_SPONSOR($_POST);
 } else {
        // Prepare constants for the template
-       define('__SPONSOR_MIN_VALUE', $CONFIG['sponsor_min_points']);
+       define('__SPONSOR_MIN_VALUE', $_CONFIG['sponsor_min_points']);
 
        // Output form
        LOAD_TEMPLATE("admin_add_sponsor");
index dc81d948a91d5c1daafd365d73bd19b072128c4c..70a64890fc21991bbee5d764ab2698ea1794f54d 100644 (file)
@@ -48,8 +48,8 @@ if (isset($_POST['ok'])) {
        ADMIN_SAVE_SETTINGS($_POST);
 } else {
        // Remember config data in constants for the template
-       define('__SPONSOR_MIN_POINTS', $CONFIG['sponsor_min_points']);
-       define('__SPONSOR_REF_POINTS', $CONFIG['sponsor_ref_points']);
+       define('__SPONSOR_MIN_POINTS', $_CONFIG['sponsor_min_points']);
+       define('__SPONSOR_REF_POINTS', $_CONFIG['sponsor_ref_points']);
 
        // Load template
        LOAD_TEMPLATE("admin_config_sponsor");
index 9f1fa093f5a5c6ccc5d0d5f840229abc0c7fde43..c5478c8ce7692c00fec710d9cf2de05ca10a7aef 100644 (file)
@@ -46,6 +46,11 @@ if (isset($_POST['ok'])) {
 
        // Let's test the API first (hold your horses here, cowboy! Thanks. :) )
        if (WERNIS_TEST_API()) {
+               // Revert german commata
+               foreach (array('payout_factor', 'withdraw_factor', 'payout_fee_percent', 'withdraw_fee_percent') as $revert) {
+                       $_POST['wernis_'.$revert] = REVERT_COMMA($_POST['wernis_'.$revert]);
+               } // END - if
+
                // Save settings
                ADMIN_SAVE_SETTINGS($_POST);
        } else {
@@ -55,14 +60,42 @@ if (isset($_POST['ok'])) {
 }  else {
        // Prepare data for template output
        $content = array(
-               'min_payout'    => bigintval($_CONFIG['wernis_min_payout']),
-               'min_withdraw'  => bigintval($_CONFIG['wernis_min_withdraw']),
-               'api_id'                => bigintval($_CONFIG['wernis_api_id']),
-               'api_md5'               => $_CONFIG['wernis_api_md5'],
-               'api_url'               => $_CONFIG['wernis_api_url'],
-               'refid'                 => bigintval($_CONFIG['wernis_refid'])
+               'min_payout'           => bigintval($_CONFIG['wernis_min_payout']),
+               'min_withdraw'         => bigintval($_CONFIG['wernis_min_withdraw']),
+               'api_id'               => bigintval($_CONFIG['wernis_api_id']),
+               'api_md5'              => $_CONFIG['wernis_api_md5'],
+               'api_url'              => $_CONFIG['wernis_api_url'],
+               'refid'                => bigintval($_CONFIG['wernis_refid']),
+               'payout_factor'        => TRANSLATE_COMMA($_CONFIG['wernis_payout_factor']),
+               'withdraw_factor'      => TRANSLATE_COMMA($_CONFIG['wernis_withdraw_factor']),
+               'payout_fee_percent'   => TRANSLATE_COMMA($_CONFIG['wernis_payout_fee_percent']),
+               'withdraw_fee_percent' => TRANSLATE_COMMA($_CONFIG['wernis_withdraw_fee_percent']),
+               'payout_fee_fix'       => bigintval($_CONFIG['wernis_payout_fee_fix']),
+               'withdraw_fee_fix'     => bigintval($_CONFIG['wernis_withdraw_fee_fix'])
        );
 
+       // Prepare payout Y/N selection
+       if ($_CONFIG['wernis_payout_active'] == "Y") {
+               // Payout allowed
+               define('__CFG_WERNIS_PAYOUT_ACTIVE_Y', " checked=\"checked\"");
+               define('__CFG_WERNIS_PAYOUT_ACTIVE_N', "");
+       } else {
+               // Payout disabled
+               define('__CFG_WERNIS_PAYOUT_ACTIVE_Y', "");
+               define('__CFG_WERNIS_PAYOUT_ACTIVE_N', " checked=\"checked\"");
+       }
+
+       // Prepare withdraw Y/N selection
+       if ($_CONFIG['wernis_withdraw_active'] == "Y") {
+               // Payout allowed
+               define('__CFG_WERNIS_WITHDRAW_ACTIVE_Y', " checked=\"checked\"");
+               define('__CFG_WERNIS_WITHDRAW_ACTIVE_N', "");
+       } else {
+               // Payout disabled
+               define('__CFG_WERNIS_WITHDRAW_ACTIVE_Y', "");
+               define('__CFG_WERNIS_WITHDRAW_ACTIVE_N', " checked=\"checked\"");
+       }
+
        // Load template
        LOAD_TEMPLATE("admin_config_wernis", false, $content);
 }
index c3894d99a6da88f5d699ff12edadf32396be9716..a66577b270e0a175317848523d18797fe36c4521 100644 (file)
@@ -109,7 +109,7 @@ WHERE id='%s' AND status='PENDING' LIMIT 1",
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data
 SET points_amount=points_amount+%s, ref_count=ref_count+1
 WHERE id='%s' LIMIT 1",
- array($CONFIG['sponsor_ref_points'], bigintval($refid)), __FILE__, __LINE__);
+ array($_CONFIG['sponsor_ref_points'], bigintval($refid)), __FILE__, __LINE__);
 
                                // Whas that update fine?
                                if (SQL_AFFECTEDROWS() == 1) {
@@ -125,7 +125,7 @@ WHERE id='%s' LIMIT 1",
                                        if ($REFERRAL['receive_warnings'] == "Y") {
                                                // Translate some data
                                                $REFERRAL['points']     = TRANSLATE_COMMA($REFERRAL['points']);
-                                               $REFERRAL['ref_points'] = TRANSLATE_COMMA($CONFIG['sponsor_ref_points']);
+                                               $REFERRAL['ref_points'] = TRANSLATE_COMMA($_CONFIG['sponsor_ref_points']);
                                                $REFERRAL['gender']      = TRANSLATE_GENDER($REFERRAL['gender']);
 
                                                // Send notification to referral
index 01a0f202b4d4ce41da3b38f3a3521f625d1ad719..a47c9567da87068fa177ba7419fc600c3c141950 100644 (file)
@@ -92,7 +92,7 @@ if ($num_act > 0)
                        if (!ereg(",", $content['price']))
                        {
                                // Add missing zeros
-                               $content['price'] .= ",".str_repeat("0", $CONFIG['max_comma']);
+                               $content['price'] .= ",".str_repeat("0", $_CONFIG['max_comma']);
                        }
 
                        // Load row template and switch color
index 6da3f8aa85afe0833ce4d9f7e9767bc284bf103e..b70f75f38bc6369fc3deb502968610fb3b75ab2d 100644 (file)
@@ -258,7 +258,7 @@ WHERE id='%s' AND password='%s' LIMIT 1",
                {
                        // Calculate cookie lifetime, maybe we have to change this so the admin can setup a
                        // seperate timeout for these two cookies?
-                       $life = (time() + $CONFIG['online_timeout']);
+                       $life = (time() + $_CONFIG['online_timeout']);
 
                        // Is confirmed so both is fine and we can continue with login procedure
                        $login = ((setcookie("sponsorid"  , bigintval($_POST['sponsorid']), $life, COOKIE_PATH)) &&
index ec788933bfdd2679157cacaa67ebdb79333a1301..e013faa9de175dc3f70e463959ae557dfc5ff9a7 100644 (file)
@@ -193,7 +193,7 @@ if (isset($_POST['ok'])) {
                }
        }
        // Is the password long enough?
-        elseif (strlen($_POST['pass1']) < $CONFIG['pass_len'])
+        elseif (strlen($_POST['pass1']) < $_CONFIG['pass_len'])
        {
                // Too short!
                $FORM_ERRORS[] = SPONSOR_PASSWORD_TOO_SHORT;
index baa8aad018854c07cc30c10eb17fe8385f58f67d..59d36bc655c7eeef9a58ca7d21c3ed6ba0a2203a 100644 (file)
@@ -422,8 +422,8 @@ case "list_all": // List all transactions
        // First of all create the temporary table
        $result = SQL_QUERY("CREATE TEMPORARY TABLE "._MYSQL_PREFIX."_transfers_tmp (
 trans_id VARCHAR(12) NOT NULL DEFAULT '',
-party_uid BIGINT(20) NOT NULL DEFAULT '0',
-points BIGINT(20) NOT NULL DEFAULT '0',
+party_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(10) NOT NULL DEFAULT '0',
 trans_type ENUM('IN', 'OUT') NOT NULL DEFAULT 'IN',
index 5edf6ac7a63150580d7e1a47c9bf60ce46649fce..3c48c8640b0b801c5d2f3a27ff845cc563e9573c 100644 (file)
@@ -52,15 +52,16 @@ if ((empty($_CONFIG['wernis_api_id'])) || (empty($_CONFIG['wernis_api_md5']))) {
        // Something important is missing...
        LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_API_DATA_MISSING);
        return;
-}
+} // END - if
 
 // Init the content array and points
 $content = array(); $points = false;
 
-// Is the mode set (payout only!)
-if (!isset($_GET['mode'])) {
-       // Get referal id
-       $content['refid'] = bigintval($_CONFIG['wernis_refid']);
+// Is the mode set (withdraw or payout)
+if ((!isset($_GET['mode'])) || ($_GET['mode'] == "choose")) {
+       // Let the user choose what he wants to do
+       $content['refid']    = bigintval($_CONFIG['wernis_refid']);
+       $content['wds66_id'] = 0;
 
        // Get WDS66 id
        $result = SQL_QUERY_ESC("SELECT wernis_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
@@ -70,7 +71,7 @@ if (!isset($_GET['mode'])) {
        if (SQL_NUMROWS($result) == 1) {
                // Fetch ID
                list($content['wds66_id']) = SQL_FETCHROW($result);
-       }
+       } // END - if
 
        // Free result
        SQL_FREERESULT($result);
@@ -89,12 +90,12 @@ if (!isset($_GET['mode'])) {
                while ($data = SQL_FETCHARRAY($result)) {
                        // Prepare data for output
                        $rowContent = array(
-                               'stamp'                 => MAKE_DATETIME($data['wernis_timestamp'], "2"),
-                               'points'                => TRANSLATE_COMMA($data['wernis_amount']),
-                               'acc'                   => bigintval($data['wernis_account']),
-                               'status'                => WERNIS_TRANSFER_STATUS($data['wernis_type']),
-                               'raw_type'              => strtolower($data['wernis_type']),
-                               'sw'                    => $SW,
+                               'stamp'    => MAKE_DATETIME($data['wernis_timestamp'], "2"),
+                               'points'   => TRANSLATE_COMMA($data['wernis_amount']),
+                               'acc'      => bigintval($data['wernis_account']),
+                               'status'   => WERNIS_TRANSFER_STATUS($data['wernis_type']),
+                               'raw_type' => strtolower($data['wernis_type']),
+                               'sw'       => $SW,
                        );
 
                        // Load row template
@@ -105,31 +106,52 @@ if (!isset($_GET['mode'])) {
                // Free result
                SQL_FREERESULT($result);
        } else {
-               // Mode pay
-               $_GET['mode'] = "pay";
+               // Default links are not active!
+               $content['payout_link']   = "<em>".WERNIS_MEMBER_PAYOUT_DISABLED."</em>";
+               $content['withdraw_link'] = "<em>".WERNIS_MEMBER_WITHDRAW_DISABLED."</em>";
+
+               // Is the payout mode active?
+               if ($_CONFIG['wernis_payout_active'] == "Y") {
+                       // Add link
+                       $content['payout_link'] = "<a class=\"menu_blur\" style=\"height: 40px\" href=\"".URL."/modules.php?module=login&amp;what=wernis&amp;mode=payout\"><div style=\"padding-top: 10px\">".MEMBER_WERNIS_MODE_PAYOUT."</div></a>";
+               } // END - if
+
+               // Is the withdraw mode active?
+               if ($_CONFIG['wernis_withdraw_active'] == "Y") {
+                       // Add link
+                       $content['withdraw_link'] = "<a class=\"menu_blur\" style=\"height: 40px\" href=\"".URL."/modules.php?module=login&amp;what=wernis&amp;mode=withdraw\"><div style=\"padding-top: 10px\">".MEMBER_WERNIS_MODE_WITHDRAW."</div></a>";
+               } // END - if
+
+               // Mode chooser! ;-)
+               $_GET['mode'] = "choose";
        }
-}
-if ($_GET['mode'] == "pay") {
+} elseif (($_GET['mode'] == "payout") && ($_CONFIG['wernis_payout_active'] == "Y")) {
        // Get total points and check if the user can request a payout
        $points = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points");
 
-       // No dots here...
-       $points = explode(".", $points);
-       $points = bigintval($points[0]);
-
        // Remove the registration fee
        $points = $points - $_CONFIG['points_register'];
 
+       // Is there a percentage or fixed fee?
+       $points = WERNIS_TAKE_FEE($points, "payout");
+
        // Is this enougth for a payout?
        if ($points < $_CONFIG['wernis_min_payout']) {
                // No, then abort here
-               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MIN_PAYOUT_PAYOUT, TRANSLATE_COMMA($_CONFIG['wernis_min_payout'])));
+               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MIN_PAYOUT, TRANSLATE_COMMA($_CONFIG['wernis_min_payout'])));
                return;
-       }
+       } // END - if
+
+       // No dots here...
+       $points = explode(".", $points);
+       $points = bigintval($points[0]);
 
        // Add points to content array
-       $content['points']              = $points;
-       $content['min_points']  = TRANSLATE_COMMA($_CONFIG['wernis_min_payout']);
+       $content['points']     = TRANSLATE_COMMA($points);
+       $content['min_points'] = TRANSLATE_COMMA($_CONFIG['wernis_min_payout']);
+
+       // Add fees to array
+       WERNIS_ADD_FEES_TO_ARRAY($content);
 
        // Get WDS66 id
        $content['wds66_id'] = "";
@@ -140,7 +162,31 @@ if ($_GET['mode'] == "pay") {
        if (SQL_NUMROWS($result) == 1) {
                // Fetch ID
                list($content['wds66_id']) = SQL_FETCHROW($result);
-       }
+       } // END - if
+
+       // Free result
+       SQL_FREERESULT($result);
+} elseif (($_GET['mode'] == "withdraw") && ($_CONFIG['wernis_withdraw_active'] == "Y")) {
+       // Get total points for just displaying them
+       $points = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points");
+
+       // Prepare data for the template
+       $content['points']     = TRANSLATE_COMMA($points);
+       $content['min_points'] = TRANSLATE_COMMA($_CONFIG['wernis_min_withdraw']);
+       $content['wds66_id']   = "";
+
+       // Add fees to array
+       WERNIS_ADD_FEES_TO_ARRAY($content);
+
+       // Get WDS66 id
+       $result = SQL_QUERY_ESC("SELECT wernis_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+               array($GLOBALS['userid']), __FILE__, __LINE__);
+
+       // Are there some entries?
+       if (SQL_NUMROWS($result) == 1) {
+               // Fetch ID
+               list($content['wds66_id']) = SQL_FETCHROW($result);
+       } // END - if
 
        // Free result
        SQL_FREERESULT($result);
@@ -152,76 +198,101 @@ if ($_GET['mode'] == "pay") {
 
 // Is the formular sent?
 if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
-       // Check input data depending on the mode and execute the requested mode
-       switch ($_GET['mode']) {
-               case "pay": // Payout this exchange -> WDS66
-                       // Is the user ID and password set?
-                       if (empty($_POST['wds66_id'])) {
-                               // Nothing entered in WDS66 user ID
-                               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_USERNAME);
-                               OUTPUT_HTML("<br />");
-                       } elseif (empty($_POST['wds66_password'])) {
-                               // Nothing entered in WDS66 password
-                               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_PASSWORD);
-                               OUTPUT_HTML("<br />");
-                       } elseif (empty($_POST['amount'])) {
-                               // Nothing entered in amount
-                               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_AMOUNT);
-                               OUTPUT_HTML("<br />");
-                       } elseif ($_POST['wds66_id'] != bigintval($_POST['wds66_id'])) {
-                               // Only numbers in account ID!
-                               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_USERNAME);
-                               OUTPUT_HTML("<br />");
-                       } elseif ($_POST['amount'] != bigintval($_POST['amount'])) {
-                               // Only numbers in amount!
-                               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT);
-                               OUTPUT_HTML("<br />");
-                       } elseif ($_POST['amount'] < $_CONFIG['wernis_min_payout']) {
-                               // Not enougth entered!
-                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_payout'])));
-                               OUTPUT_HTML("<br />");
-                       } elseif ($_POST['amount'] > $points) {
-                               // Not enougth points left!
-                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED, bigintval($_POST['amount']), bigintval($points)));
-                               OUTPUT_HTML("<br />");
-                       } else {
-                               // All is fine here so do the payout
-                               $success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']);
-                               if ($success) {
-                                       // Default is locked!
-                                       $locked = true;
-
-                                       // Shall I "pay" the referral points imidiately?
-                                       if ($_CONFIG['ref_payout'] == "0") {
-                                               // Yes, "pay" it now
-                                               $locked = false;
-                                       }
+       // Is the user ID and password set?
+       if (empty($_POST['wds66_id'])) {
+               // Nothing entered in WDS66 user ID
+               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_USERNAME);
+               OUTPUT_HTML("<br />");
+       } elseif (empty($_POST['wds66_password'])) {
+               // Nothing entered in WDS66 password
+               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_PASSWORD);
+               OUTPUT_HTML("<br />");
+       } elseif (empty($_POST['amount'])) {
+               // Nothing entered in amount
+               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_AMOUNT);
+               OUTPUT_HTML("<br />");
+       } elseif ($_POST['wds66_id'] != bigintval($_POST['wds66_id'])) {
+               // Only numbers in account ID!
+               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_USERNAME);
+               OUTPUT_HTML("<br />");
+       } elseif ($_POST['amount'] != bigintval($_POST['amount'])) {
+               // Only numbers in amount!
+               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT);
+               OUTPUT_HTML("<br />");
+       } else {
+               // Check input data depending on the mode and execute the requested mode
+               switch ($_GET['mode']) {
+                       case "withdraw": // Widthdraws WDS66 -> This exchange
+                               if ($_POST['amount'] < $_CONFIG['wernis_min_withdraw']) {
+                                       // Not enougth entered!
+                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_withdraw'])));
+                                       OUTPUT_HTML("<br />");
+                               } else {
+                                       // All is fine here so do the withdraw
+                                       $success = WERNIS_EXECUTE_WITHDRAW($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']);
+                                       if ($success) {
+                                               // Add it to this amount
+                                               $DEPTH = 0;
+                                               ADD_POINTS_REFSYSTEM($GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct");
 
-                                       // Sub points
-                                       SUB_POINTS($GLOBALS['userid'], $_POST['amount']);
+                                               // Update the user data as well..
+                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
+                                                       array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__);
 
-                                       // Update WDS66 id
-                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
-                                               array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__);
+                                               // All done!
+                                               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_WITHDRAW_DONE);
+                                               return;
+                                       } elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed")) {
+                                               // Wrong login data
+                                               LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
+                                               OUTPUT_HTML("<br />");
+                                       } else {
+                                               // Something went wrong
+                                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE()));
+                                               OUTPUT_HTML("<br />");
+                                       }
+                               }
+                               break;
 
-                                       // All done!
-                                       LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_PAYOUT_DONE);
-                                       return;
-                               } elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed") || (GET_WERNIS_ERROR_CODE() == "api_amount_failed")) {
-                                       // Wrong login data
-                                       LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
+                       case "payout": // Payout this exchange -> WDS66
+                               if ($_POST['amount'] < $_CONFIG['wernis_min_payout']) {
+                                       // Not enougth entered!
+                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_payout'])));
                                        OUTPUT_HTML("<br />");
-                               } else {
-                                       // Something went wrong
-                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_PAYOUT_FAILED, GET_WERNIS_ERROR_MESSAGE()));
+                               } elseif ($_POST['amount'] > $points) {
+                                       // Not enougth points left!
+                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED, bigintval($_POST['amount']), bigintval($points)));
                                        OUTPUT_HTML("<br />");
+                               } else {
+                                       // All is fine here so do the withdraw
+                                       $success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']);
+                                       if ($success) {
+                                               // Sub points
+                                               SUB_POINTS($GLOBALS['userid'], $_POST['amount']);
+
+                                               // Update WDS66 id
+                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
+                                                       array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__);
+
+                                               // All done!
+                                               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_PAYOUT_DONE);
+                                               return;
+                                       } elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed") || (GET_WERNIS_ERROR_CODE() == "api_amount_failed")) {
+                                               // Wrong login data
+                                               LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
+                                               OUTPUT_HTML("<br />");
+                                       } else {
+                                               // Something went wrong
+                                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE()));
+                                               OUTPUT_HTML("<br />");
+                                       }
                                }
-                       }
-                       break;
+                               break;
 
-               default: // Invalid mode!
-                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, SQL_ESCAPE($_GET['mode'])));
-                       return;
+                       default: // Invalid mode!
+                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, SQL_ESCAPE($_GET['mode'])));
+                               return;
+               }
        }
 }
 
index f9912e53d9788a4bd9b1d9d1496cbd3511ba9a4d..b23ec6a99a906fa86a3fe80f997a1ba1a7ab522a 100644 (file)
@@ -73,9 +73,9 @@ if (SQL_NUMROWS($result) == 1) {
                        } elseif ((!empty($_POST['pass1'])) && (empty($_POST['pass2']))) {
                                // No password two entered
                                $MSG = SPONSOR_PASSWORD_TWO_EMPTY;
-                       } elseif ((!empty($_POST['pass1'])) && (strlen($_POST['pass1']) < $CONFIG['pass_len'])) {
+                       } elseif ((!empty($_POST['pass1'])) && (strlen($_POST['pass1']) < $_CONFIG['pass_len'])) {
                                // Too short password
-                               $MSG = SPONSOR_PASSWORD_TOO_SHORT_1.$CONFIG['pass_len'].SPONSOR_PASSWORD_TOO_SHORT_2;
+                               $MSG = SPONSOR_PASSWORD_TOO_SHORT_1.$_CONFIG['pass_len'].SPONSOR_PASSWORD_TOO_SHORT_2;
                        } else {
                                // Default is we don't want to change password!
                                $PASS_AND = ""; $PASS_DATA = "";
index 19750af9c41acb72a38086ba10f01a8176f5017f..96e7cfb9d57cf5ce8a912b67f1c61bd1aa861abc 100644 (file)
@@ -314,9 +314,17 @@ function ADD_MENU($MODE, $act, $wht) {
                // There are menus available, so we simply display them... :)
                while (list($main_title, $main_action) = SQL_FETCHROW($result_main)) {
                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$main_action."/".$sub_what.":".$GLOBALS['what']."*<br />\n";
-                       // Load menu header template
+                       // Init variables
                        $BLOCK_MODE = false; $act = $main_action;
-                       LOAD_TEMPLATE($MODE."_menu_title", false, $main_title);
+
+                       // Prepare content
+                       $content = array(
+                               'action' => $main_action,
+                               'title'  => $main_title
+                       );
+
+                       // Load menu header template
+                       LOAD_TEMPLATE($MODE."_menu_title", false, $content);
 
                        $result_sub = SQL_QUERY_ESC("SELECT title, what FROM "._MYSQL_PREFIX."_%s_menu WHERE action='%s' AND what != '' ".$AND." ORDER BY sort",
                         array($MODE, $main_action), __FILE__, __LINE__);
@@ -355,6 +363,13 @@ function ADD_MENU($MODE, $act, $wht) {
                                                $content .= "</STRONG>";
                                        }
                                        $wht = $sub_what; $cnt++;
+                                       // Prepare array
+                                       $content =  array(
+                                               'menu' => $content,
+                                               'what' => $sub_what
+                                       );
+
+                                       // Add regular menu row or bottom row?
                                        if ($cnt < $ctl) {
                                                LOAD_TEMPLATE($MODE."_menu_row", false, $content);
                                        } else {
index cbcca3921bc2e4d83cb12e31cf30eb248befc42a..dd1a805a2386b3ff2081a09e631432072ced3925 100644 (file)
@@ -4,14 +4,14 @@ CREATE TABLE `mxchange_admin_menu` (
   `action` VARCHAR(255) NOT NULL DEFAULT '',\r
   `what` VARCHAR(255) NOT NULL DEFAULT '',\r
   `title` VARCHAR(50) NOT NULL DEFAULT '',\r
-  `sort` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `descr` blob NOT NULL,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_admins`;\r
 CREATE TABLE `mxchange_admins` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
   `login` VARCHAR(100) NOT NULL DEFAULT '',\r
   `password` VARCHAR(40) NOT NULL DEFAULT '',\r
   PRIMARY KEY  (`id`)\r
@@ -22,23 +22,23 @@ CREATE TABLE `mxchange_cats` (
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
   `cat` VARCHAR(255) NOT NULL DEFAULT '',\r
   `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
-  `sort` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_config`;\r
 CREATE TABLE `mxchange_config` (\r
-  `config` tinyint(1) NOT NULL DEFAULT '0',\r
-  `pass_len` TINYINT(3) NOT NULL DEFAULT '5',\r
-  `points_register` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `points_ref` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `least_cats` TINYINT(3) NOT NULL DEFAULT '5',\r
+  `config` tinyint(1) NOT NULL DEFAULT 0,\r
+  `pass_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,\r
+  `points_register` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `points_ref` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `least_cats` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,\r
   `check_double_email` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
   `check_double_pass` ENUM('Y','N') NOT NULL DEFAULT 'N',\r
   `admin_notify` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
-  `url_tlock` BIGINT(20) NOT NULL DEFAULT '86400',\r
+  `url_tlock` BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400',\r
   `test_text` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
-  `max_tlength` BIGINT(20) NOT NULL DEFAULT '1000',\r
+  `max_tlength` BIGINT(20) UNSIGNED NOT NULL DEFAULT '1000',\r
   `test_subj` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
   `autosend_active` ENUM('Y','N') NOT NULL DEFAULT 'N',\r
   PRIMARY KEY  (`config`)\r
@@ -52,17 +52,17 @@ CREATE TABLE `mxchange_guest_menu` (
   `action` VARCHAR(20) NOT NULL DEFAULT '',\r
   `what` VARCHAR(20) NOT NULL DEFAULT '',\r
   `title` VARCHAR(50) NOT NULL DEFAULT '',\r
-  `sort` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
   `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
-  `counter` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_max_receive`;\r
 CREATE TABLE `mxchange_max_receive` (\r
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
-  `value` MEDIUMINT(9) NOT NULL DEFAULT '0',\r
+  `value` MEDIUMINT(9) NOT NULL DEFAULT 0,\r
   `comment` VARCHAR(255) NOT NULL DEFAULT '',\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
@@ -73,24 +73,24 @@ CREATE TABLE `mxchange_member_menu` (
   `action` VARCHAR(20) NOT NULL DEFAULT '',\r
   `what` VARCHAR(20) NOT NULL DEFAULT '',\r
   `title` VARCHAR(50) NOT NULL DEFAULT '',\r
-  `sort` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
   `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
   `descr` blob NOT NULL,\r
-  `counter` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_mod_reg`;\r
 CREATE TABLE `mxchange_mod_reg` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
   `module` VARCHAR(50) NOT NULL DEFAULT '',\r
   `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
   `hidden` ENUM('Y','N') NOT NULL DEFAULT 'N',\r
   `admin_only` ENUM('Y','N') NOT NULL DEFAULT 'N',\r
   `title` VARCHAR(200) NOT NULL DEFAULT '',\r
   `mem_only` ENUM('Y','N') NOT NULL DEFAULT 'N',\r
-  `clicks` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -104,27 +104,27 @@ INSERT INTO `mxchange_mod_reg` VALUES (8,'order','N','N','N','','N',0);
 \r
 DROP TABLE IF EXISTS `mxchange_payments`;\r
 CREATE TABLE `mxchange_payments` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
-  `time` INT(7) NOT NULL DEFAULT '0',\r
-  `payment` FLOAT(5,3) NOT NULL DEFAULT '0.000',\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `time` INT(7) NOT NULL DEFAULT 0,\r
+  `payment` FLOAT(5,3) UNSIGNED NOT NULL DEFAULT '0.000',\r
   `mail_title` VARCHAR(255) NOT NULL DEFAULT '',\r
-  `price` FLOAT(5,3) NOT NULL DEFAULT '0.000',\r
+  `price` FLOAT(5,5) UNSIGNED NOT NULL DEFAULT '0.00000',\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_pool`;\r
 CREATE TABLE `mxchange_pool` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
-  `sender` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `sender` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `subject` VARCHAR(200) NOT NULL DEFAULT '',\r
   `text` LONGBLOB NOT NULL,\r
   `receivers` LONGBLOB NOT NULL,\r
-  `payment_id` TINYINT(3) NOT NULL DEFAULT '0',\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
+  `timestamp` VARCHAR(10) NOT NULL DEFAULT 0,\r
   `url` tinytext NOT NULL,\r
-  `target_send` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `cat_id` BIGINT(20) NOT NULL DEFAULT '0',\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
 ) TYPE=MyISAM;\r
 \r
@@ -134,15 +134,15 @@ CREATE TABLE `mxchange_refbanner` (
   `url` TEXT NOT NULL,\r
   `alternate` TEXT NOT NULL,\r
   `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
-  `counter` BIGINT(22) NOT NULL DEFAULT '0',\r
+  `counter` BIGINT(22) NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_refdepths`;\r
 CREATE TABLE `mxchange_refdepths` (\r
-  `id` TINYINT(3) NOT NULL AUTO_INCREMENT,\r
-  `level` TINYINT(3) NOT NULL DEFAULT '0',\r
-  `percents` TINYINT(3) NOT NULL DEFAULT '0',\r
+  `id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
+  `percents` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -156,17 +156,17 @@ INSERT INTO `mxchange_refdepths` VALUES (6,5,5);
 DROP TABLE IF EXISTS `mxchange_refsystem`;\r
 CREATE TABLE `mxchange_refsystem` (\r
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
-  `userid` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `level` TINYINT(3) NOT NULL DEFAULT '0',\r
-  `counter` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
+  `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_user_cats`;\r
 CREATE TABLE `mxchange_user_cats` (\r
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
-  `userid` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `cat_id` TINYINT(3) NOT NULL DEFAULT '0',\r
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -184,67 +184,67 @@ CREATE TABLE `mxchange_user_data` (
   `birth_month` CHAR(2) NOT NULL DEFAULT '01',\r
   `birth_year` VARCHAR(4) NOT NULL DEFAULT '1970',\r
   `password` VARCHAR(32) NOT NULL DEFAULT '',\r
-  `max_mails` INT(7) NOT NULL DEFAULT '0',\r
-  `receive_mails` INT(7) NOT NULL DEFAULT '0',\r
-  `refid` BIGINT(22) NOT NULL DEFAULT '0',\r
+  `max_mails` INT(7) NOT NULL DEFAULT 0,\r
+  `receive_mails` INT(7) NOT NULL DEFAULT 0,\r
+  `refid` BIGINT(22) NOT NULL DEFAULT 0,\r
   `status` ENUM('UNCONFIRMED','CONFIRMED','LOCKED') NOT NULL DEFAULT 'UNCONFIRMED',\r
   `user_hash` VARCHAR(32) NOT NULL DEFAULT '',\r
   `REMOTE_ADDR` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',\r
-  `last_online` VARCHAR(10) NOT NULL DEFAULT '0',\r
+  `last_online` VARCHAR(10) NOT NULL DEFAULT 0,\r
   `last_module` VARCHAR(20) NOT NULL DEFAULT '',\r
-  `ref_clicks` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `total_logins` BIGINT(20) NOT NULL DEFAULT '0',\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
-  `emails_sent` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `emails_sent` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`userid`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_user_points`;\r
 CREATE TABLE `mxchange_user_points` (\r
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
-  `userid` BIGINT(22) NOT NULL DEFAULT '0',\r
-  `ref_depth` TINYINT(3) NOT NULL DEFAULT '0',\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
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
-alter table `mxchange_config` add `max_send` TINYINT(3) NOT NULL DEFAULT '100';\r
-alter table `mxchange_config` add `url_blacklist` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
-alter table `mxchange_config` add `auto_purge` TINYINT(3) NOT NULL DEFAULT '14';\r
-alter table `mxchange_config` add `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
+ALTER TABLE `mxchange_config` ADD `max_send` TINYINT(3) UNSIGNED NOT NULL DEFAULT '100';\r
+ALTER TABLE `mxchange_config` ADD `url_blacklist` ENUM('Y','N') NOT NULL DEFAULT 'Y';\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 `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP';\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
 CREATE TABLE `mxchange_user_links` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
-  `stats_id` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `userid` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `link_type` ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL',\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
 DROP TABLE IF EXISTS `mxchange_user_stats`;\r
 CREATE TABLE `mxchange_user_stats` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
-  `userid` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `cat_id` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `payment_id` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\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
-  `max_rec` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `max_rec` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `timestamp_ordered` VARCHAR(10) NOT NULL DEFAULT '',\r
-  `pool_id` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `timestamp_sstart` VARCHAR(10) NOT NULL DEFAULT '',\r
   `timestamp_send` VARCHAR(10) NOT NULL DEFAULT '',\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
-alter table `mxchange_user_data` add `joined` VARCHAR(10) NOT NULL DEFAULT '0';\r
-alter table `mxchange_config` add `last_update` VARCHAR(10) NOT NULL DEFAULT '0';\r
+ALTER TABLE `mxchange_user_data` ADD `joined` VARCHAR(10) NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_config` ADD `last_update` VARCHAR(10) NOT NULL DEFAULT 0;\r
 \r
 UPDATE `mxchange_member_menu` SET `locked` = 'N' WHERE 'id'='12' OR 'id'='11' LIMIT 1;\r
 \r
@@ -252,37 +252,37 @@ UPDATE `mxchange_guest_menu` SET `counter`=0;
 UPDATE `mxchange_member_menu` SET `counter`=0;\r
 \r
 INSERT INTO `mxchange_mod_reg` VALUES (NULL,'chk_login','N','N','N','','N',0);\r
-alter table `mxchange_pool` modify `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP';\r
-alter table `mxchange_config` add `unconfirmed` BIGINT(20) NOT NULL DEFAULT '100';\r
-alter table `mxchange_config` add `profile_lock` BIGINT(20) NOT NULL DEFAULT '86400';\r
-alter table `mxchange_user_data` add `last_update` VARCHAR(10) NOT NULL DEFAULT '0';\r
-alter table `mxchange_refbanner` add `clicks` BIGINT(20) NOT NULL DEFAULT '0';\r
-alter table `mxchange_config` add `online_timeout` BIGINT(20) NOT NULL DEFAULT '1800';\r
+ALTER TABLE `mxchange_pool` MODIFY `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP';\r
+ALTER TABLE `mxchange_config` ADD `unconfirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT '100';\r
+ALTER TABLE `mxchange_config` ADD `profile_lock` BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400';\r
+ALTER TABLE `mxchange_user_data` ADD `last_update` VARCHAR(10) 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_count` BIGINT(20) NOT NULL;\r
-alter table `mxchange_config` add `profile_update` BIGINT(20) NOT NULL DEFAULT '15768000';\r
-alter table `mxchange_config` add `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
-alter table `mxchange_config` add `resend_profile_update` BIGINT(20) NOT NULL DEFAULT '172800';\r
+ALTER TABLE `mxchange_config` ADD `mad_timestamp` VARCHAR(10) 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
+ALTER TABLE `mxchange_config` ADD `resend_profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '172800';\r
 \r
-alter table `mxchange_user_data` add `last_profile_sent` VARCHAR(10) NOT NULL DEFAULT '0';\r
-alter table `mxchange_user_data` add `notified` ENUM('Y','N') NOT NULL DEFAULT 'N';\r
+ALTER TABLE `mxchange_user_data` ADD `last_profile_sent` VARCHAR(10) NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_user_data` ADD `notified` ENUM('Y','N') NOT NULL DEFAULT 'N';\r
 \r
-alter table `mxchange_config` add `patch_level` VARCHAR(100) NOT NULL DEFAULT '78';\r
-alter table `mxchange_config` add `patch_ctime` VARCHAR(10) NOT NULL DEFAULT '0';\r
+ALTER TABLE `mxchange_config` ADD `patch_level` VARCHAR(100) NOT NULL DEFAULT '78';\r
+ALTER TABLE `mxchange_config` ADD `patch_ctime` VARCHAR(10) NOT NULL DEFAULT 0;\r
 \r
-alter table `mxchange_admins` add `email` VARCHAR(255) NOT NULL;\r
+ALTER TABLE `mxchange_admins` ADD `email` VARCHAR(255) NOT NULL;\r
 \r
 DROP TABLE IF EXISTS `mxchange_task_system`;\r
 CREATE TABLE `mxchange_task_system` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
-  `assigned_admin` BIGINT(20) NOT NULL DEFAULT '0',\r
-  `userid` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `assigned_admin` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `status` ENUM('NEW','OPEN','SOLVED','CLOSED','DELETED') NOT NULL DEFAULT 'NEW',\r
   `task_type` ENUM('FIRST_USER','SUPPORT_MEMBER','SUPPORT_ADMIN','OTHERS', 'EXTENSION', 'EXTENSION_UPDATE') NOT NULL DEFAULT 'FIRST_USER',\r
   `subject` VARCHAR(255) NOT NULL DEFAULT '',\r
   `text` LONGBLOB NOT NULL,\r
-  `task_created` VARCHAR(10) NOT NULL DEFAULT '0',\r
+  `task_created` VARCHAR(10) NOT NULL DEFAULT 0,\r
   KEY (`assigned_admin`),\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
@@ -304,20 +304,20 @@ ALTER TABLE `mxchange_user_stats` ADD INDEX (`cat_id`);
 ALTER TABLE `mxchange_user_stats` ADD INDEX (`payment_id`);\r
 ALTER TABLE `mxchange_user_stats` ADD INDEX (`pool_id`);\r
 \r
-alter table `mxchange_user_stats` add `clicks` BIGINT(20) NOT NULL;\r
-alter table `mxchange_config` add `code_length` TINYINT(3) NOT NULL DEFAULT '5';\r
-alter table `mxchange_config` add `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS';\r
-alter table `mxchange_config` add `ref_payout` TINYINT(3) NOT NULL DEFAULT '5';\r
-alter table `mxchange_user_data` add `ref_payout` TINYINT(3) NOT NULL DEFAULT '0';\r
-alter table `mxchange_user_points` add `locked_points` BIGINT(20) NOT NULL DEFAULT '0';\r
+ALTER TABLE `mxchange_user_stats` ADD `clicks` BIGINT(20) UNSIGNED NOT NULL;\r
+ALTER TABLE `mxchange_config` ADD `code_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5;\r
+ALTER TABLE `mxchange_config` ADD `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS';\r
+ALTER TABLE `mxchange_config` ADD `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5;\r
+ALTER TABLE `mxchange_user_data` ADD `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_user_points` ADD `locked_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0;\r
 \r
 DROP TABLE IF EXISTS `mxchange_extensions`;\r
 CREATE TABLE `mxchange_extensions` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
   `ext_name` VARCHAR(255) NOT NULL DEFAULT '',\r
   `ext_lang_file` VARCHAR(255) NOT NULL DEFAULT '',\r
   `ext_active` ENUM('Y','N') NOT NULL DEFAULT 'N',\r
-  `ext_version` VARCHAR(255) NOT NULL DEFAULT '0.',\r
+  `ext_version` VARCHAR(255) NOT NULL DEFAULT 'INVALID',\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -328,19 +328,19 @@ CREATE TABLE `mxchange_jackpot` (
   PRIMARY KEY  (`ok`)\r
 ) TYPE=MyISAM;\r
 \r
-alter table `mxchange_config` add `activate_xchange` BIGINT(20) NOT NULL DEFAULT '100';\r
-alter table `mxchange_config` add `order_multi_page` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
-alter table `mxchange_config` add `display_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
-alter table `mxchange_config` add `ip_timeout` BIGINT(20) NOT NULL DEFAULT '86400';\r
-alter table `mxchange_pool` add `zip` VARCHAR(6) NOT NULL DEFAULT '';\r
-\r
-alter table `mxchange_task_system` change `task_type` `task_type` VARCHAR(255)  NOT NULL DEFAULT 'FIRST_USER';\r
-alter table `mxchange_user_data` modify `zip` VARCHAR(6) NOT NULL DEFAULT '';\r
-alter table `mxchange_admin_menu` modify `action` VARCHAR(255) NOT NULL DEFAULT '';\r
-alter table `mxchange_admin_menu` modify `what` VARCHAR(255) NOT NULL DEFAULT '';\r
-alter table `mxchange_user_data` modify `last_module` VARCHAR(255) NOT NULL DEFAULT '';\r
-alter table `mxchange_config` add `allow_direct_pay` ENUM('N', 'Y') NOT NULL DEFAULT 'N';\r
-alter table `mxchange_user_data` modify `last_profile_sent` VARCHAR(10)  NOT NULL DEFAULT '0';\r
-alter table `mxchange_user_data` modify `last_update` VARCHAR(10)  NOT NULL DEFAULT '0';\r
-alter table `mxchange_user_data` modify `joined` VARCHAR(10)  NOT NULL DEFAULT '0';\r
-alter table `mxchange_user_data` modify `last_online` VARCHAR(10)  NOT NULL DEFAULT '0';\r
+ALTER TABLE `mxchange_config` ADD `activate_xchange` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100;\r
+ALTER TABLE `mxchange_config` ADD `order_multi_page` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
+ALTER TABLE `mxchange_config` ADD `display_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
+ALTER TABLE `mxchange_config` ADD `ip_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400;\r
+ALTER TABLE `mxchange_pool` ADD `zip` VARCHAR(6) NOT NULL DEFAULT '';\r
+\r
+ALTER TABLE `mxchange_task_system` CHANGE `task_type` `task_type` VARCHAR(255)  NOT NULL DEFAULT 'FIRST_USER';\r
+ALTER TABLE `mxchange_user_data` MODIFY `zip` VARCHAR(6) NOT NULL DEFAULT '';\r
+ALTER TABLE `mxchange_admin_menu` MODIFY `action` VARCHAR(255) NOT NULL DEFAULT '';\r
+ALTER TABLE `mxchange_admin_menu` MODIFY `what` VARCHAR(255) NOT NULL DEFAULT '';\r
+ALTER TABLE `mxchange_user_data` MODIFY `last_module` VARCHAR(255) NOT NULL DEFAULT '';\r
+ALTER TABLE `mxchange_config` ADD `allow_direct_pay` ENUM('N', 'Y') NOT NULL DEFAULT 'N';\r
+ALTER TABLE `mxchange_user_data` MODIFY `last_profile_sent` VARCHAR(10)  NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_user_data` MODIFY `last_update` VARCHAR(10)  NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_user_data` MODIFY `joined` VARCHAR(10)  NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_user_data` MODIFY `last_online` VARCHAR(10)  NOT NULL DEFAULT 0;\r
index a6145704c8a8f3ae0ffab15b0e3d247480153c23..889ff57ba28987dd6ddfab1834aee99eafc583a9 100644 (file)
@@ -7,7 +7,7 @@ Sie k&ouml;nnen sich nun hier einloggen:
 Ihre Login-ID lautet: $UID
 URL zum Login: {!URL!}/login.php
 
-f&uuml;r Ihre Anmeldung werden wir Ihnen als Willkommensgutschrift $content[points] {!POINTS!} gutschreiben, sobald Sie $CONFIG[ref_payout] Mails best&auml;tigt haben. Erst dann k&ouml;nnen Sie Mails an die anderen Mitglieder verschicken!
+f&uuml;r Ihre Anmeldung werden wir Ihnen als Willkommensgutschrift $content[points] {!POINTS!} gutschreiben, sobald Sie $_CONFIG[ref_payout] Mails best&auml;tigt haben. Erst dann k&ouml;nnen Sie Mails an die anderen Mitglieder verschicken!
 
 Wir w&uuml;nschen Ihnen viel Spass und Erfolg beim Mail-Versand!
 
index 9f45d205802fbc4d8bebc87b732a93134c71c251..a8853f04f9cd67e164f2854aed927bc58411b10b 100644 (file)
@@ -8,7 +8,7 @@
                <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
        </TR>
        <TR>
-               <TD width="300" align="right">{--WERNIS_ADMIN_API_ID--}:</TD>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_API_ID--}:</TD>
                <TD class="seperator" width="10">&nbsp;</TD>
                <TD width="270"><INPUT type="text" name="wernis_api_id"
                        class="admin_normal" value="$content[api_id]" size="2"
                <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
        </TR>
        <TR>
-               <TD width="300" align="right">{--WERNIS_ADMIN_API_MD5--}:</TD>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_API_MD5--}:</TD>
                <TD class="seperator" width="10">&nbsp;</TD>
                <TD width="270"><INPUT type="text" name="wernis_api_md5"
-                       class="admin_normal" value="$content[api_md5]" size="33"
+                       class="admin_normal" value="$content[api_md5]" size="32"
                        maxlength="32" /></TD>
        </TR>
        <TR>
                <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
        </TR>
        <TR>
-               <TD width="300" align="right">{--WERNIS_ADMIN_API_URL--}:</TD>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_API_URL--}:</TD>
                <TD class="seperator" width="10">&nbsp;</TD>
                <TD width="270"><INPUT type="text" name="wernis_api_url"
                        class="admin_normal" value="$content[api_url]" size="25"
                <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
        </TR>
        <TR>
-               <TD width="300" align="right">{--WERNIS_ADMIN_REFID--}:</TD>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_REFID--}:</TD>
                <TD class="seperator" width="10">&nbsp;</TD>
-               <TD width="270"><INPUT type="text" name="wernis_refid"
-                       class="admin_normal" value="$content[refid]" size="5"
-                       maxlength="20" /></TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_refid" class="admin_normal" value="$content[refid]" size="5" maxlength="20" />
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="bottom2 seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_MIN_PAYOUT--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_min_payout" class="admin_normal" value="$content[min_payout]" size="5" maxlength="20" /> Wernis
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_MIN_WITHDRAW--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_min_withdraw" class="admin_normal" value="$content[min_withdraw]" size="5" maxlength="20" /> Wernis
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_PAYOUT_FACTOR--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_payout_factor" class="admin_normal" value="$content[payout_factor]" size="5" maxlength="20" />
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_WITHDRAW_FACTOR--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_withdraw_factor" class="admin_normal" value="$content[withdraw_factor]" size="5" maxlength="20" />
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_PAYOUT_FEE_PERCENT--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_payout_fee_percent" class="admin_normal" value="$content[payout_fee_percent]" size="5" maxlength="20" />
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_WITHDRAW_FEE_PERCENT--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_withdraw_fee_percent" class="admin_normal" value="$content[withdraw_fee_percent]" size="5" maxlength="20" />%
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_PAYOUT_FEE_FIX--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_payout_fee_fix" class="admin_normal" value="$content[payout_fee_fix]" size="5" maxlength="20" /> {!POINTS!}
+               </TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_WITHDRAW_FEE_FIX--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270">
+                       <INPUT type="text" name="wernis_withdraw_fee_fix" class="admin_normal" value="$content[withdraw_fee_fix]" size="5" maxlength="20" /> {!POINTS!}
+               </TD>
        </TR>
        <TR>
                <TD colspan="3" class="bottom2 seperator" height="5">&nbsp;</TD>
                <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
        </TR>
        <TR>
-               <TD width="300" align="right">{--WERNIS_ADMIN_MIN_PAYOUT--}:</TD>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_PAYOUT_ACTIVE--}</TD>
                <TD class="seperator" width="10">&nbsp;</TD>
-               <TD width="270"><INPUT type="text" name="wernis_min_payout"
-                       class="admin_normal" value="$content[min_payout]" size="5"
-                       maxlength="20" /> Wernis</TD>
+               <TD width="270">
+                       <INPUT type="radio" name="wernis_payout_active" value="Y"{!__CFG_WERNIS_PAYOUT_ACTIVE_Y!} />&nbsp;{--YES--}
+                       <INPUT type="radio" name="wernis_payout_active" value="N"{!__CFG_WERNIS_PAYOUT_ACTIVE_N!} />&nbsp;{--NO--}
+               </TD>
        </TR>
        <TR>
                <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
        </TR>
        <TR>
-               <TD width="300" align="right">{--WERNIS_ADMIN_MIN_WITHDRAW--}:</TD>
+               <TD width="300" height="30" align="right">{--WERNIS_ADMIN_WITHDRAW_ACTIVE--}</TD>
                <TD class="seperator" width="10">&nbsp;</TD>
-               <TD width="270"><INPUT type="text" name="wernis_min_withdraw"
-                       class="admin_normal" value="$content[min_withdraw]" size="5"
-                       maxlength="20" /> Wernis</TD>
+               <TD width="270">
+                       <INPUT type="radio" name="wernis_withdraw_active" value="Y"{!__CFG_WERNIS_WITHDRAW_ACTIVE_Y!} />&nbsp;{--YES--}
+                       <INPUT type="radio" name="wernis_withdraw_active" value="N"{!__CFG_WERNIS_WITHDRAW_ACTIVE_N!} />&nbsp;{--NO--}
+               </TD>
        </TR>
        <TR>
                <TD colspan="3" class="seperator bottom2" height="5">&nbsp;</TD>
index f2c2a5ce5313913f031ee7cb50bd2fc604f3c1f4..1fbacac849e8204b1461caafd300058c4d7d0a68 100644 (file)
@@ -2,12 +2,12 @@
 <TR>
        <TD class="admin_header bottom2 right2" align="center" width="60"><STRONG>{--ID_SELECT--}</STRONG></TD>
        <TD class="admin_header bottom2 right2" align="center" width="90"><STRONG>{--_UID--}</STRONG></TD>
-       <TD class="admin_header bottom2 right2" align="center"><STRONG>{--WERNIS_ADMIN_WDS66_ACCOUNT--}</STRONG></TD>
-       <TD class="admin_header bottom2 right2" align="center"><STRONG>{--WERNIS_ADMIN_TRANSFERED--}</STRONG></TD>
-       <TD class="admin_header bottom2 right2" align="center" width="160"><STRONG>{--WERNIS_ADMIN_TIMESTAMP--}</STRONG></TD>
-       <TD class="admin_header bottom2 right2" align="center" width="160"><STRONG>{--WERNIS_ADMIN_TYPE--}</STRONG></TD>
-       <TD class="admin_header bottom2 right2" align="center" width="160"><STRONG>{--WERNIS_ADMIN_API_MESSAGE--}</STRONG></TD>
-       <TD class="admin_header bottom2" align="center" width="160"><STRONG>{--WERNIS_ADMIN_API_STATUS--}</STRONG></TD>
+       <TD class="admin_header bottom2 right2" align="center"><STRONG>{--ADMIN_WERNISWDS66_ACCOUNT--}</STRONG></TD>
+       <TD class="admin_header bottom2 right2" align="center"><STRONG>{--ADMIN_WERNISTRANSFERED--}</STRONG></TD>
+       <TD class="admin_header bottom2 right2" align="center" width="160"><STRONG>{--ADMIN_WERNISTIMESTAMP--}</STRONG></TD>
+       <TD class="admin_header bottom2 right2" align="center" width="160"><STRONG>{--ADMIN_WERNISTYPE--}</STRONG></TD>
+       <TD class="admin_header bottom2 right2" align="center" width="160"><STRONG>{--ADMIN_WERNISAPI_MESSAGE--}</STRONG></TD>
+       <TD class="admin_header bottom2" align="center" width="160"><STRONG>{--ADMIN_WERNISAPI_STATUS--}</STRONG></TD>
 </TR>
 $content
 <TR>
index 565f7bdb2fedd43a6af4a424387f43fef040f39a..a757416c715b7470fb5781c02d388e4ab2356e74 100644 (file)
@@ -1,10 +1,10 @@
 Mit dieser Erweiterung k&ouml;nnen Sie Ihren Mitgliedern eine Auszahlung
-ihrer Internet-W&auml;hrung
-<A href="http://www.primusportal.de/r/Quix0r" target="_blank">Primera</A>
-auf ihr Primera-Account &uuml;berweisen lassen. Sie als Primera-Anbieter
-brauchen dazu selbstverst&auml;ndlich ein Primera-Account. Mehr dazu auf
-<A href="http://www.primusportal.de/r/Quix0r"
- target="_blank">www.primusportal.de</A>. Damit Ihr System einheitlicher
-ist, sollten Sie unter <A  href="{!URL!}/modules.php?module=admin&amp;what=config_other"
- target="_blank">Sonstige Einstellungen</A> die W&auml;hrung Ihres {!MT_WORD2!}
-von {!POINTS!} auf Primera umstellen.
+ihrer Internet-W&auml;hrung <A href="http://www.primusportal.de/r/Quix0r"
+ target="_blank">Primera</A> auf ihr Primera-Account &uuml;berweisen
+lassen. Sie als Primera-Anbieter brauchen dazu selbstverst&auml;ndlich
+ein Primera-Account. Mehr dazu auf <A href="http://www.primusportal.de/r/Quix0r"
+ target="_blank">www.primusportal.de</A>. Wenn Sie m&ouml;chten, k&ouml;nnen Sie
+auch ganz zu Primera wechseln. Sie unter <A target="_blank"
+ href="{!URL!}/modules.php?module=admin&amp;what=config_other">Sonstige
+Einstellungen</A> die W&auml;hrung Ihres {!MT_WORD2!} von {!POINTS!} auf Primera
+umstellen.
index 908914395b33940c60f732eedb769db70ae00f8c..b5f47ff62e12ee51bc3f74fab8cd95b0a38212af 100644 (file)
@@ -1,11 +1,11 @@
 Mit dieser Erweiterung k&ouml;nnen Sie Ihren Mitgliedern eine Auszahlung
-ihrer Internet-W&auml;hrung
-<A href="http://www.wds66.com/ref.php?refid=10437" target="_blank">Wernis</A>
-auf ihr WDS66-Hauptaccount &uuml;berweisen lassen. Sie als
-Wernis-Anbieter brauchen dazu selbstverst&auml;ndlich ein Wernis-Account
-mit einem API-Account. Mehr dazu auf
-<A href="http://www.wds66.com/ref.php?refid=10437" target="_blank">www.wds66.com</A>
-. Damit Ihr System einheitlicher ist, sollten Sie unter
-<A href="{!URL!}/modules.php?module=admin&amp;what=config_other"
-       target="_blank">Sonstige Einstellungen</A>
-die W&auml;hrung Ihres {!MT_WORD2!} von {!POINTS!} auf Wernis umstellen.
+ihrer Internet-W&auml;hrung <A target="_blank"
+ href="http://www.wds66.com/ref.php?refid=10437">Wernis</A> auf ihr
+WDS66-Hauptaccount &uuml;berweisen lassen. Sie als Wernis-Anbieter brauchen
+dazu selbstverst&auml;ndlich ein Wernis-Account mit einem API-Account. Mehr
+dazu auf <A href="http://www.wds66.com/ref.php?refid=10437"
+ target="_blank">www.wds66.com</A>. Wenn Sie m&ouml;chten, k&ouml;nnen Sie auch
+ganz zu Wernis wechseln. Sie unter <A target="_blank"
+ href="{!URL!}/modules.php?module=admin&amp;what=config_other">Sonstige
+Einstellungen</A> die W&auml;hrung Ihres {!MT_WORD2!} von {!POINTS!} auf Wernis
+umstellen.
index 700c71c5244582020325c1af4e1fe58518a647e4..cff0c9a227bee710c3718cb3468c89abf83666e8 100644 (file)
@@ -1,3 +1,3 @@
-<TR>
-       <TD class="guest_menu_bottom menu_$WHAT">$content</TD>
-</TR>
\ No newline at end of file
+<tr>
+       <td class="guest_menu_bottom" id="guest_menu_what_$content[what]">$content[menu]</td>
+</tr>
index af1c144a80f3bdf9208bd360177af5e2359e1c7b..856c660ab2c8b8c3826bdd84cf9f04be80da0c85 100644 (file)
@@ -1,3 +1,3 @@
-<TR>
-       <TD class="guest_menu_row menu_$WHAT">$content</TD>
-</TR>
\ No newline at end of file
+<tr>
+       <td class="guest_menu_row" id="guest_menu_what_$content[what]">$content[menu]</td>
+</tr>
index 518f4e585b0fef8bed50041853630bd667a85b11..f40a066e99c1c8658697074bad4db585f43b6a8d 100644 (file)
@@ -1,4 +1,5 @@
-<TR>
-       <TD align="center" colspan="2" class="guest_menu_title"><STRONG>:::&nbsp;$content&nbsp;:::</STRONG>
-       </TD>
-</TR>
\ No newline at end of file
+<tr>
+       <td align="center" colspan="2" class="guest_menu_title" id="guest_menu_action_$content[action]">
+               <strong>:::&nbsp;$content[title]&nbsp;:::</strong>
+       </td>
+</tr>
index 17830d522d211858f9b971dfe31e80b582c56404..f17f94675c12e781394b558f02eedf7648ca2a53 100644 (file)
@@ -1,3 +1,3 @@
 <TR>
-       <TD class="member_menu_bottom menu_$WHAT">$content</TD>
-</TR>
\ No newline at end of file
+       <TD class="member_menu_bottom" id="member_menu_what_$content[what]">$content[menu]</TD>
+</TR>
index c0ee533a784dc9ee7ce1109399cf564caa3190f2..9dc45d750be5d36eb382217acc9e2682f9e2ff72 100644 (file)
@@ -1,3 +1,3 @@
-<TR>
-       <TD class="member_menu_row menu_$WHAT">$content</TD>
-</TR>
\ No newline at end of file
+<tr>
+       <td class="member_menu_row" id="member_menu_what_$content[what]">$content[menu]</td>
+</tr>
index 4836b9fde039130c123cdf00a3ee31183cabb158..db1d0fd7a2cc6e16141db5f9ac8e95ce75f85c50 100644 (file)
@@ -1,4 +1,5 @@
-<TR>
-       <TD align="center" colspan="2" class="member_menu_title"><STRONG>:::&nbsp;$content&nbsp;:::</STRONG>
-       </TD>
-</TR>
\ No newline at end of file
+<tr>
+       <td align="center" colspan="2" class="member_menu_title" id="member_menu_action_$content[action]">
+               <strong>:::&nbsp;$content[title]&nbsp;:::</strong>
+       </td>
+</tr>
index b9de6fa55f9a440574fca2225d10b6e1596d78d6..3909da6654ad10d770a194a5053c0aff10c3c8cd 100644 (file)
@@ -1,48 +1,48 @@
-<FORM action="{!URL!}/modules.php?module=login&amp;what=wernis&amp;wernis=$_GET[wernis]" method="POST" style="margin-bottom: 0px">
-<TABLE border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
-       <TR>
-               <TD colspan="3" align="center" class="member_title2 bottom2"
-                       height="30"><STRONG>{--WERNIS_NOW_TITLE--}</STRONG></TD>
-       </TR>
-       <TR>
-               <TD colspan="3" height="3" class="seperator">&nbsp;</TD>
-       </TR>
-       <TR>
-               <TD height="25" align="right">{--WERNIS_MAX_WERNIS--}:</TD>
-               <TD class="seperator" width="10">&nbsp;</TD>
-               <TD><STRONG>{!WERNIS_MAX_VALUE!}</STRONG></TD>
-       </TR>
-       <TR>
-               <TD height="25" align="right">{--WERNIS_WANT_WERNIS--}:</TD>
-               <TD class="seperator" width="10">&nbsp;</TD>
-               <TD><INPUT type="text" name="wernis" class="member_normal"
-                       size="10" maxlength="255" value="{--WERNIS_MAX_VALUE!}"></TD>
-       </TR>
-       <TR>
-               <TD height="25" align="right">{--WERNIS_TARGET_ACCOUNT--}:</TD>
-               <TD class="seperator" width="10">&nbsp;</TD>
-               <TD><INPUT type="text" name="account" class="member_normal"
-                       size="20" maxlength="255"></TD>
-       </TR>
-       <TR>
-               <TD height="25" align="right">{--WERNIS_OPTIONAL_PASSWORD--}:</TD>
-               <TD class="seperator" width="10">&nbsp;</TD>
-               <TD><INPUT type="password" name="pass" class="member_normal"
-                       size="10" maxlength="255"></TD>
-       </TR>
-       <TR>
-               <TD colspan="3" height="3" class="seperator bottom2">&nbsp;</TD>
-       </TR>
-       <TR>
-               <TD colspan="3" align="center" class="member_footer">
-                       <INPUT type="reset" class="member_reset" value="{--CLEAR_FORM--}" />&nbsp;*
-                       <INPUT type="submit" name="ok" class="member_submit" value="{--WERNIS_SEND_NOW--}" />
-               </TD>
-       </TR>
-</TABLE>
-</FORM>
+<form action="{!URL!}/modules.php?module=login&amp;what=wernis&amp;wernis=$_GET[wernis]" method="POST" style="margin-bottom: 0px">
+<table border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
+       <tr>
+               <td colspan="3" align="center" class="member_title2 bottom2"
+                       height="30"><strong>{--WERNIS_NOW_TITLE--}</strong></td>
+       </tr>
+       <tr>
+               <td colspan="3" height="3" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td height="25" align="right">{--WERNIS_MAX_WERNIS--}:</td>
+               <td class="seperator" width="10">&nbsp;</td>
+               <td><strong>{!WERNIS_MAX_VALUE!}</strong></td>
+       </tr>
+       <tr>
+               <td height="25" align="right">{--WERNIS_WANT_WERNIS--}:</td>
+               <td class="seperator" width="10">&nbsp;</td>
+               <td><input type="text" name="wernis" class="member_normal"
+                       size="10" maxlength="255" value="{--WERNIS_MAX_VALUE!}" /></td>
+       </tr>
+       <tr>
+               <td height="25" align="right">{--WERNIS_TARGET_ACCOUNT--}:</td>
+               <td class="seperator" width="10">&nbsp;</td>
+               <td><input type="text" name="account" class="member_normal"
+                       size="20" maxlength="255" /></td>
+       </tr>
+       <tr>
+               <td height="25" align="right">{--WERNIS_OPTIONAL_PASSWORD--}:</td>
+               <td class="seperator" width="10">&nbsp;</td>
+               <td><input type="password" name="pass" class="member_normal"
+                       size="10" maxlength="255" /></td>
+       </tr>
+       <tr>
+               <td colspan="3" height="3" class="seperator bottom2">&nbsp;</td>
+       </tr>
+       <tr>
+               <td colspan="3" align="center" class="member_footer">
+                       <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" />&nbsp;*
+                       <input type="submit" name="ok" class="member_submit" value="{--WERNIS_SEND_NOW--}" />
+               </td>
+       </tr>
+</table>
+</form>
 
-<DIV class="member_note">{--WERNIS_MEMBER_NOTE--}<br />
+<div class="member_note">{--WERNIS_MEMBER_NOTE--}<br />
 <br />
-<A href="{!URL!}/agb.php" target="_blank">{--WERNIS_REMEMBER_TERMS--}</A>
-</DIV>
+<a href="{!URL!}/agb.php" target="_blank">{--WERNIS_REMEMBER_TERMS--}</a>
+</div>
diff --git a/templates/de/html/member/member_wernis_mode_choose.tpl b/templates/de/html/member/member_wernis_mode_choose.tpl
new file mode 100644 (file)
index 0000000..b5ba087
--- /dev/null
@@ -0,0 +1,18 @@
+<table border="0" cellspacing="0" cellpadding="0" class="member_table dashed">
+       <tr>
+               <td class="member_title2 bottom2" style="padding: 5px" colspan="2">
+               {--MEMBER_WERNIS_MODE_CHOOSE--}</td>
+       </tr>
+       <tr>
+               <td width="50%" align="center" class="right2" height="40">
+                       $content[withdraw_link]
+               </td>
+               <td width="50%" align="center">
+                       $content[payout_link]
+               </td>
+       </tr>
+</table>
+
+<p align="center">
+       <a href="http://www.wds66.com/ref.php?refid=$content[refid]" target="_blank">{--WERNIS_MEMBER_NO_ACCOUNT--}</a>
+</p>
index 4eca22651d663f9a19800651ef59baf2f75714c5..aa0e8e62cfc1447a1ea0311401aa2f6b5b626141 100644 (file)
@@ -1,20 +1,19 @@
-<TABLE border="0" cellspacing="0" cellpadding="0" width="680"
-       class="member_table dashed" align="center">
-       <TR>
-               <TD colspan="4" align="center" class="member_title2" height="30">
-                       <STRONG>{--WERNIS_MEMBER_LIST_WERNIS--}</STRONG>
-               </TD>
-       </TR>
-       <TR>
-               <TD width="180" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_TOTAL_WERNIS--}</STRONG></TD>
-               <TD width="130" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_ACCOUNT--}</STRONG></TD>
-               <TD width="150" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_TIMESTAMP--}</STRONG></TD>
-               <TD width="120" align="center" class="member_title2 bottom2"><STRONG>{--WERNIS_MEMBER_STATUS--}</STRONG></TD>
-       </TR>
+<table border="0" cellspacing="0" cellpadding="0" width="680" class="member_table dashed" align="center">
+       <tr>
+               <td colspan="4" align="center" class="member_title2" height="30">
+                       <strong>{--WERNIS_MEMBER_LIST_WERNIS--}</strong>
+               </td>
+       </tr>
+       <tr>
+               <td width="180" align="center" class="member_title2 bottom2 right2"><strong>{--WERNIS_TOTAL_WERNIS--}</strong></td>
+               <td width="130" align="center" class="member_title2 bottom2 right2"><strong>{--WERNIS_ACCOUNT--}</strong></td>
+               <td width="150" align="center" class="member_title2 bottom2 right2"><strong>{--WERNIS_TIMESTAMP--}</strong></td>
+               <td width="120" align="center" class="member_title2 bottom2"><strong>{--WERNIS_MEMBER_STATUS--}</strong></td>
+       </tr>
        $content[rows]
-       <TR>
-               <TD colspan="4" class="member_footer" align="center">
+       <tr>
+               <td colspan="4" class="member_footer" align="center">
                        <a href="{!URL!}/modules.php?module=login&amp;what=wernis&amp;mode=choose">{--MEMBER_WERNIS_MODE_CHOOSE2--}</a>
-               </TD>
-       </TR>
-</TABLE>
+               </td>
+       </tr>
+</table>
index 976dcfb0a467716ba9e5b2309e6f752719807217..121a4a4c5a8ad7b09bc007983aa3045a062bbfe1 100644 (file)
@@ -1,6 +1,6 @@
-<TR>
-       <TD align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom2 right2">$content[points] Wernis</TD>
-       <TD align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom2 right2">$content[acc]</TD>
-       <TD align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom2 right2">$content[stamp]</TD>
-       <TD align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom2">$content[status]</TD>
-</TR>
+<tr>
+       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom2 right2">$content[points] Wernis</td>
+       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom2 right2">$content[acc]</td>
+       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom2 right2">$content[stamp]</td>
+       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom2">$content[status]</td>
+</tr>
diff --git a/templates/de/html/member/member_wernis_mode_pay.tpl b/templates/de/html/member/member_wernis_mode_pay.tpl
deleted file mode 100644 (file)
index 061c395..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<FORM action="{!URL!}/modules.php?module=login&amp;what=wernis&amp;mode=pay" method="POST" style="margin-bottom: 0px">
-<TABLE border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
-       <TR>
-               <TD colspan="3" align="center" class="member_title2 bottom2"
-                       height="30"><STRONG>{--WERNIS_MEMBER_PAYOUT_TITLE--}</STRONG></TD>
-       </TR>
-       <TR>
-               <TD width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_PAYOUT_POINTS--}</TD>
-               <TD width="10" class="seperator bottom2">&nbsp;</TD>
-               <TD width="115" class="bottom2"><strong>$content[points]</strong> Wernis</TD>
-       </TR>
-       <TR>
-               <TD width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_PAYOUT_MIN_POINTS--}</TD>
-               <TD width="10" class="seperator bottom2">&nbsp;</TD>
-               <TD width="115" class="bottom2"><strong>$content[min_points]</strong> Wernis</TD>
-       </TR>
-       <TR>
-               <TD colspan="3" height="3" class="seperator">&nbsp;</TD>
-       </TR>
-       <TR>
-               <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_ID--}</TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD width="115"><INPUT type="text" name="wds66_id" size="6" maxlength="5" value="$content[wds66_id]" /></TD>
-       </TR>
-       <TR>
-               <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_PASSWORD--}</TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD width="115"><INPUT type="password" name="wds66_password" size="10" maxlength="255" /></TD>
-       </TR>
-       <TR>
-               <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_AMOUNT--}</TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD width="115"><INPUT type="text" name="amount" size="10" maxlength="255" /></TD>
-       </TR>
-       <TR>
-               <TD colspan="3" height="3" class="seperator bottom2">&nbsp;</TD>
-       </TR>
-       <TR>
-               <TD colspan="3" align="center" class="member_footer">
-                       <INPUT type="reset" class="member_reset" value="{--CLEAR_FORM--}">&nbsp;*
-                       <INPUT type="submit" name="ok" class="member_submit" value="{--WERNIS_MEMBER_PAYOUT_SUBMIT--}">
-               </TD>
-       </TR>
-</TABLE>
-<br />
-<STRONG class="member_note"> {--WERNIS_MEMBER_PAYOUT_NOTE--}</STRONG>
-</FORM>
diff --git a/templates/de/html/member/member_wernis_mode_payout.tpl b/templates/de/html/member/member_wernis_mode_payout.tpl
new file mode 100644 (file)
index 0000000..9047c5b
--- /dev/null
@@ -0,0 +1,55 @@
+<form action="{!URL!}/modules.php?module=login&amp;what=wernis&amp;mode=pay" method="POST" style="margin-bottom: 0px">
+<table border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
+       <tr>
+               <td colspan="3" align="center" class="member_title2 bottom2"
+                       height="30"><strong>{--WERNIS_MEMBER_PAYOUT_TITLE--}</strong></td>
+       </tr>
+       <tr>
+               <td width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_PAYOUT_POINTS--}</td>
+               <td width="10" class="seperator bottom2">&nbsp;</td>
+               <td width="115" class="bottom2"><strong>$content[points]</strong> Wernis</td>
+       </tr>
+       <tr>
+               <td width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_PAYOUT_MIN_POINTS--}</td>
+               <td width="10" class="seperator bottom2">&nbsp;</td>
+               <td width="115" class="bottom2"><strong>$content[min_points]</strong> Wernis</td>
+       </tr>
+       <tr>
+               <td colspan="3" height="3" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_ID--}</td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td width="115"><input type="text" name="wds66_id" size="6" maxlength="5" value="$content[wds66_id]" /></td>
+       </tr>
+       <tr>
+               <td width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_PASSWORD--}</td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td width="115"><input type="password" name="wds66_password" size="10" maxlength="255" /></td>
+       </tr>
+       <tr>
+               <td width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_AMOUNT--}</td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td width="115"><input type="text" name="amount" size="10" maxlength="255" /></td>
+       </tr>
+       <tr>
+               <td colspan="3" height="3" class="seperator bottom2">&nbsp;</td>
+       </tr>
+       <tr>
+               <td colspan="3" align="center" class="member_footer">
+                       <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" />&nbsp;*
+                       <input type="submit" name="ok" class="member_submit" value="{--WERNIS_MEMBER_PAYOUT_SUBMIT--}" />
+               </td>
+       </tr>
+</table>
+<br />
+<strong class="member_note">{--WERNIS_MEMBER_PAYOUT_NOTE--}</strong>
+</form>
+
+<div class="member_note">
+       Die Umrechnung von {!POINTS!} in Wernis enspricht derzeit <strong>$content[payout_factor]:1</strong>.
+       Das auszahlungsf&auml;hige {!POINTS!}-Guthaben ist entweder um eine
+       prozentuale Geb&uuml;hr von <strong>$content[payout_fee_percent]%</strong>
+       oder um einen fixen Betrag von <strong>$content[payout_fee_fix] {!POINTS!}</strong>
+       bereits reduziert.
+</div>
diff --git a/templates/de/html/member/member_wernis_mode_withdraw.tpl b/templates/de/html/member/member_wernis_mode_withdraw.tpl
new file mode 100644 (file)
index 0000000..2557a47
--- /dev/null
@@ -0,0 +1,51 @@
+<form action="{!URL!}/modules.php?module=login&amp;what=wernis&amp;mode=withdraw" method="POST" style="margin-bottom: 0px">
+<table border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
+       <tr>
+               <td colspan="3" align="center" class="member_title2 bottom2" height="30">
+                       <strong>{--WERNIS_MEMBER_WITHDRAW_TITLE--}</strong>
+               </td>
+       </tr>
+       <tr>
+               <td width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT--}</td>
+               <td width="10" class="seperator bottom2">&nbsp;</td>
+               <td width="115" class="bottom2"><strong>$content[points]</strong> Wernis</td>
+       </tr>
+       <tr>
+               <td width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_WITHDRAW_MIN_POINTS--}</td>
+               <td width="10" class="seperator bottom2">&nbsp;</td>
+               <td width="115" class="bottom2"><strong>$content[min_points]</strong> Wernis</td>
+       </tr>
+       <tr>
+               <td colspan="3" height="3" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_ID--}</td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td width="115"><input type="text" name="wds66_id" size="6" maxlength="5" value="$content[wds66_id]" /></td>
+       </tr>
+       <tr>
+               <td width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_PASSWORD--}</td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td width="115"><input type="password" name="wds66_password" size="10" maxlength="255" /></td>
+       </tr>
+       <tr>
+               <td width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_AMOUNT--}</td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td width="115"><input type="text" name="amount" size="10" maxlength="255" /></td>
+       </tr>
+       <tr>
+               <td colspan="3" height="3" class="seperator bottom2">&nbsp;</td>
+       </tr>
+       <tr>
+               <td colspan="3" align="center" class="member_footer">
+                       <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" />&nbsp;*
+                       <input type="submit" name="ok" class="member_submit" value="{--WERNIS_MEMBER_WITHDRAW_SUBMIT--}" />
+               </td>
+       </tr>
+</table>
+<br />
+<strong class="member_note">{--WERNIS_MEMBER_WITHDRAW_NOTE--}</strong>
+</form>
+
+<div class="member_note">
+</div>