]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-sponsor.php
- Major change in menu system. You need to rewrite/update your member and guest
[mailer.git] / inc / extensions / ext-sponsor.php
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 '€',
 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 '€',
 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";