//
$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)
//
$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),
//
$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";
//
//
$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";
//
$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)
//
$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)
//
$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";
//
$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";
//
$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)
//
$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),
//
$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";
//
//
$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";
//
// Admin menu
//
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('sponsor', '', 'Sponsorenbereich', 'Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('sponsor', NULL, 'Sponsorenbereich', 'Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('sponsor', 'add_sponsor', 'Neuer Sponsor', 'Neues Sponsorenaccount hinzufügen.', 1)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('sponsor', 'unlock_sponsor', 'Sponsor freischalten', 'Sponsorenaccounts freigeben / sperren.', 2)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('sponsor', 'list_sponsor', 'Sponsoren auflisten', 'Listet alle verfügbaren Sponsorenaccounts auf.', 3)";
//
// Guest menu
//
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor', '', 'Sponsoren', 2)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor', NULL, 'Sponsoren', 2)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor', 'sponsor_reg', 'Anmeldung', 1)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor', 'sponsor_login', 'Einloggen', 2)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor', 'sponsor_infos', 'Infos/Preise', 3)";
//
// Add default menus to sponsor menu
//
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main', '', 'Hauptauswahl', 'N', 1)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main', NULL, 'Hauptauswahl', 'N', 1)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main', 'welcome', 'Willkommen', 'N', 1)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main', 'account', 'Ihr Account', 'N', 2)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main', 'campaigns', 'Kampagnen', 'N', 3)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main', 'stats', 'Statistiken', 'N', 8)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main', 'inquiry', 'Kontaktanfrage', 'N', 9)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main', 'refid', 'Referral-Link', 'N', 10)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('actions', '', 'Sponsorenaktionen', 'N', 2)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('actions', NULL, 'Sponsorenaktionen', 'N', 2)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('actions', 'mail', 'Sponsor-Mail', 'N', 1)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('actions', 'banner', 'Banner buchen', 'N', 2)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('actions', 'text', 'Textlink buchen', 'N', 3)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('logout', '', 'Ausloggen', 'N', 3)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('logout', NULL, 'Ausloggen', 'N', 3)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('logout', 'logout', 'Ausloggen', 'N', 1)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('logout', 'guest', 'Zum Gastbereich', 'N', 2)";
//
// 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";
default: // Do stuff when extension is loaded
$dummy = LOAD_CONFIG();
- $_CONFIG = array_merge($_CONFIG, $dummy);
+ $_CONFIG = merge_array($_CONFIG, $dummy);
unset($dummy);
break;
}