]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-sponsor.php
- Surfbar extended with dynamic percentage (only config)
[mailer.git] / inc / extensions / ext-sponsor.php
index adf4452b006bdca164cf25ee1450196a9e105429..f53ee49b63bcbcd5f1a9c28328ab6ae0a9b2677f 100644 (file)
@@ -62,38 +62,38 @@ 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,
-company varchar(255) not null default '',
-position varchar(255) not null default '',
-tax_ident varchar(255) not null default '',
-salut enum('M', 'F', 'C') not null default 'M',
-surname varchar(255) not null default '',
-family varchar(255) not null default '',
-street_nr1 varchar(255) not null default '',
-street_nr2 varchar(255) not null default '',
-zip varchar(6) not null default '',
-city varchar(255) not null default '',
-country char(2) not null default 'DE',
-phone varchar(255) not null default '',
-fax varchar(255) not null default '',
-cell varchar(255) not null default '',
-email varchar(255) not null default '',
-url varchar(255) not null default '',
-password varchar(255) not null default '',
-remote_addr varchar(15) not null default '0.0.0.0',
-sponsor_created varchar(10) not null default '0',
-last_online varchar(10) not null default '0',
-last_change varchar(10) not null default '0',
-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',
-hash varchar(32) not null default '',
-last_pay float(7,2) not null default '0.00',
-last_curr varchar(255) not null default '€',
+id BIGINT(20) NOT NULL AUTO_INCREMENT,
+company VARCHAR(255) NOT NULL DEFAULT '',
+position VARCHAR(255) NOT NULL DEFAULT '',
+tax_ident VARCHAR(255) NOT NULL DEFAULT '',
+salut ENUM('M', 'F', 'C') NOT NULL DEFAULT 'M',
+surname VARCHAR(255) NOT NULL DEFAULT '',
+family VARCHAR(255) NOT NULL DEFAULT '',
+street_nr1 VARCHAR(255) NOT NULL DEFAULT '',
+street_nr2 VARCHAR(255) NOT NULL DEFAULT '',
+zip VARCHAR(6) NOT NULL DEFAULT '',
+city VARCHAR(255) NOT NULL DEFAULT '',
+country CHAR(2) NOT NULL DEFAULT 'DE',
+phone VARCHAR(255) NOT NULL DEFAULT '',
+fax VARCHAR(255) NOT NULL DEFAULT '',
+cell VARCHAR(255) NOT NULL DEFAULT '',
+email VARCHAR(255) NOT NULL DEFAULT '',
+url VARCHAR(255) NOT NULL DEFAULT '',
+password VARCHAR(255) NOT NULL DEFAULT '',
+remote_addr VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
+sponsor_created VARCHAR(10) NOT NULL DEFAULT '0',
+last_online VARCHAR(10) NOT NULL DEFAULT '0',
+last_change VARCHAR(10) NOT NULL DEFAULT '0',
+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',
+hash VARCHAR(32) NOT NULL DEFAULT '',
+last_pay FLOAT(7,2) NOT NULL DEFAULT '0.00',
+last_curr VARCHAR(255) NOT NULL DEFAULT '€',
 KEY(refid),
 KEY(email),
 PRIMARY KEY(id)
@@ -103,15 +103,15 @@ 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',
-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',
+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',
+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',
 KEY (payid),
 KEY (regid),
 KEY (aid),
@@ -123,11 +123,11 @@ 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,
-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_currency varchar(255) not null default '€',
+id BIGINT(20) 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_currency VARCHAR(255) NOT NULL DEFAULT '€',
 PRIMARY KEY(id)
 )TYPE=MyISAM";
                //
@@ -135,10 +135,10 @@ 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,
-ext_name varchar(255) not null default 'sponsor',
-conv_rate bigint(20) not null default '0',
-conv_name varchar(255) not null default 'Mails',
+id BIGINT(20) NOT NULL AUTO_INCREMENT,
+ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor',
+conv_rate BIGINT(20) NOT NULL DEFAULT '0',
+conv_name VARCHAR(255) NOT NULL DEFAULT 'Mails',
 KEY (ext_name),
 PRIMARY KEY(id)
 )TYPE=MyISAM";
@@ -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,
-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',
+id BIGINT(20) 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',
 KEY(what),
 KEY(action),
 PRIMARY KEY(id)
@@ -162,11 +162,11 @@ 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',
-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',
+id BIGINT(20) NOT NULL AUTO_INCREMENT,
+aid BIGINT(20) 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',
 KEY(ext_name),
 KEY(aid),
 PRIMARY KEY(id)
@@ -176,12 +176,12 @@ 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',
-url varchar(255) not null default 'http://',
-title varchar(255) not null default '',
-clicks bigint(20) not null default '0',
-status enum('PENDING', 'ACTIVE', 'LOCKED') not null default 'PENDING',
+id BIGINT(20) NOT NULL AUTO_INCREMENT,
+sponsorid BIGINT(20) NOT NULL DEFAULT '0',
+url VARCHAR(255) NOT NULL DEFAULT 'http://',
+title VARCHAR(255) NOT NULL DEFAULT '',
+clicks BIGINT(20) NOT NULL DEFAULT '0',
+status ENUM('PENDING', 'ACTIVE', 'LOCKED') NOT NULL DEFAULT 'PENDING',
 KEY(sponsorid),
 PRIMARY KEY(id)
 )TYPE=MyISAM";
@@ -190,14 +190,14 @@ 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',
-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',
-status enum('PENDING', 'ACTIVE', 'LOCKED') not null default 'PENDING',
+id BIGINT(20) NOT NULL AUTO_INCREMENT,
+sponsorid BIGINT(20) 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',
+status ENUM('PENDING', 'ACTIVE', 'LOCKED') NOT NULL DEFAULT 'PENDING',
 KEY(sponsorid),
 PRIMARY KEY(id)
 )TYPE=MyISAM";
@@ -206,19 +206,19 @@ 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',
-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_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',
+id BIGINT(20) NOT NULL AUTO_INCREMENT,
+sponsorid BIGINT(20) NOT NULL DEFAULT '0',
+aid BIGINT(20) 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_expired ENUM('Y', 'N') NOT NULL DEFAULT 'N',
+campaign_locked ENUM('Y', 'N') NOT NULL DEFAULT 'Y',
+campaign_ended VARCHAR(10) NOT NULL DEFAULT '0',
 locked_reason tinyblob,
-locked_timestamp varchar(10) not null default '0',
-status enum('PENDING', 'ACTIVE', 'LOCKED') not null default 'PENDING',
+locked_timestamp VARCHAR(10) NOT NULL DEFAULT '0',
+status ENUM('PENDING', 'ACTIVE', 'LOCKED') NOT NULL DEFAULT 'PENDING',
 KEY(aid),
 KEY(sponsorid),
 PRIMARY KEY(id)
@@ -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) 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',
 KEY(bannerid),
 KEY(urlid),
 KEY(campaignid),
@@ -244,9 +244,9 @@ 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,
-data_row varchar(255) not null default '',
-display enum('Y', 'N') not null default 'N',
+id BIGINT(20) NOT NULL AUTO_INCREMENT,
+data_row VARCHAR(255) NOT NULL DEFAULT '',
+display ENUM('Y', 'N') NOT NULL DEFAULT 'N',
 PRIMARY KEY(id)
 )TYPE=MyISAM";
                //
@@ -254,10 +254,10 @@ 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',
-data_row varchar(255) not null default '',
-display enum('Y', 'N') not null default 'N',
+id BIGINT(20) NOT NULL AUTO_INCREMENT,
+sponsorid BIGINT(20) NOT NULL DEFAULT '0',
+data_row VARCHAR(255) NOT NULL DEFAULT '',
+display ENUM('Y', 'N') NOT NULL DEFAULT 'N',
 KEY(sponsorid),
 PRIMARY KEY(id)
 )TYPE=MyISAM";
@@ -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) NOT NULL DEFAULT '100.00000'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points DOUBLE(20,5) NOT NULL DEFAULT '1000.00000'";
 
                // Load CSS file
                $EXT_CSS = "Y";