]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-wernis.php
- Surfbar extended with dynamic percentage (only config)
[mailer.git] / inc / extensions / ext-wernis.php
index bde8ccb19decc70fdee49b7470e3989a3facaacc..97c0b4ce9d0eefc772c41fdc30906b89eb7765fa 100644 (file)
@@ -53,23 +53,25 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_wernis";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_wernis (
-id bigint(20) NOT NULL auto_increment,
-userid bigint(20) NOT NULL default '0',
-wernis_account varchar(255) NOT NULL default '',
-wernis_amount double(22,5) NOT NULL default '0.00000',
-wernis_timestamp varchar(10) NOT NULL default '0',
-wernis_type ENUM('IN','OUT') NOT NULL default 'OUT',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+wernis_account VARCHAR(255) NOT NULL DEFAULT '',
+wernis_amount DOUBLE(22,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+wernis_timestamp VARCHAR(10) NOT NULL DEFAULT '0',
+wernis_type ENUM('IN','OUT', 'FAILED') NOT NULL DEFAULT 'FAILED',
+wernis_api_message TINYTEXT,
+wernis_api_status VARCHAR(255) NULL DEFAULT NULL,
 KEY(userid),
 PRIMARY KEY(id)
 ) TYPE=MyISAM";
-       $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_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 ''";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD wernis_userid varchar(6) not null default ''";
-       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', '', '{!POINTS!}-Management', 'Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)";
+       $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_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 ''";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', NULL, '{!POINTS!}-Management', 'Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)";
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', 'config_wernis', 'WDS66-API-Einstellungen', 'Konfiguration zur WDS66-API einstellen.', 1)";
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', 'list_wernis', '{!POINTS!}-Anfragen auflisten', 'Listet alle {!POINTS!}-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)";
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES('main', 'wernis', '{!POINTS!}-Ein-/Auszahlungen', 'N', 'N', '11')";
@@ -103,21 +105,21 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $DUMMY = LOAD_CONFIG("0");
-       $_CONFIG['wernis_min_payout']           = $DUMMY['wernis_min_payout'];
-       $_CONFIG['wernis_min_withdraw'] = $DUMMY['wernis_min_withdraw'];
-       $_CONFIG['wernis_api_id']                       = $DUMMY['wernis_api_id'];
-       $_CONFIG['wernis_api_md5']                      = $DUMMY['wernis_api_md5'];
-       $_CONFIG['wernis_api_url']                      = $DUMMY['wernis_api_url'];
-       $_CONFIG['wernis_refid']                        = $DUMMY['wernis_refid'];
-       unset($DUMMY);
+       $dummy = LOAD_CONFIG();
+       $_CONFIG['wernis_min_payout']           = $dummy['wernis_min_payout'];
+       $_CONFIG['wernis_min_withdraw'] = $dummy['wernis_min_withdraw'];
+       $_CONFIG['wernis_api_id']                       = $dummy['wernis_api_id'];
+       $_CONFIG['wernis_api_md5']                      = $dummy['wernis_api_md5'];
+       $_CONFIG['wernis_api_url']                      = $dummy['wernis_api_url'];
+       $_CONFIG['wernis_refid']                        = $dummy['wernis_refid'];
+       unset($dummy);
        break;
 }
 // Language file prefix
 $EXT_LANG_PREFIX = "wernis";
 
 // Extension is always active?
-$EXT_ALWAYS_ACTIVE = 'N';
+$EXT_ALWAYS_ACTIVE = "N";
 
 // Init array
 global $WERNIS;