switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
//
// SQL commands to run
//
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',
+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) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['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',
+points_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+points_used FLOAT(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) UNSIGNED NOT NULL DEFAULT '0.00',
last_curr VARCHAR(255) NOT NULL DEFAULT '€',
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_orders";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_orders (
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',
+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',
+pay_ordered VARCHAR(10) NOT NULL DEFAULT 0,
+pay_done VARCHAR(10) NOT NULL DEFAULT 0,
KEY (payid),
KEY (regid),
KEY (aid),
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_paytypes (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
pay_name VARCHAR(255) NOT NULL DEFAULT '',
-pay_rate DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000',
-pay_min_count BIGINT(20) UNSIGNED NOT NULL DEFAULT '1',
+pay_rate FLOAT(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";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_action_convert (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor',
-conv_rate BIGINT(20) UNSIGNED 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)
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_menu (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
action VARCHAR(255) NOT NULL DEFAULT '',
-what VARCHAR(255) NOT NULL DEFAULT '',
+what VARCHAR(255) NULL DEFAULT NULL,
title VARCHAR(255) NOT NULL DEFAULT '',
active ENUM('Y','N') NOT NULL DEFAULT 'N',
-sort BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+sort BIGINT(20) UNSIGNED 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) UNSIGNED NOT NULL AUTO_INCREMENT,
-aid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+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',
+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) UNSIGNED NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
url VARCHAR(255) NOT NULL DEFAULT 'http://',
title VARCHAR(255) NOT NULL DEFAULT '',
-clicks BIGINT(20) UNSIGNED 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)
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_banner";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_banner (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+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) UNSIGNED NOT NULL DEFAULT '0',
+width INT(7) UNSIGNED NOT NULL DEFAULT 468,
+height INT(7) UNSIGNED NOT NULL DEFAULT 60,
+views BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
KEY(sponsorid),
PRIMARY KEY(id)
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaigns";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_campaigns (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-aid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+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) UNSIGNED NOT NULL DEFAULT '0.00000',
+campaign_start VARCHAR(10) NOT NULL DEFAULT 0,
+campaign_end VARCHAR(10) NOT NULL DEFAULT 0,
+campaign_amount FLOAT(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',
-locked_reason tinyblob,
-locked_timestamp VARCHAR(10) NOT NULL DEFAULT '0',
+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',
KEY(aid),
KEY(sponsorid),
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaign_assigns";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_campaign_assigns (
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',
+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),
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_display_data";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_display_data (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+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),
// Add default entries
//
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_registry (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N','".GET_ADMIN_ID(get_session('admin_login'))."','UNIX_TIMESTAMP()')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_action_convert (ext_name, conv_rate, conv_name) VALUES('sponsor','10','Mails')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_action_convert (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '€')";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '€')";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '€')";
//
// Add default menus to sponsor menu
//
- $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','urls','URL-Verwaltung','N', 4)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main','banner','Banner-Verwaltung','N', 5)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main','settings','Einstellungen','N', 6)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES('main','fillup','Konto auffüllen','N', 7)";
- $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', 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', 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)";
+ $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','urls','URL-Verwaltung','N', 4)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES ('main','banner','Banner-Verwaltung','N', 5)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES ('main','settings','Einstellungen','N', 6)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_menu (action, what, title, active, sort) VALUES ('main','fillup','Konto auffüllen','N', 7)";
+ $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','Referal-Link','N', 10)";
+ $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', 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) 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'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000";
// Load CSS file
$EXT_CSS = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "sponsor";
-
//
?>