//
// SQL commands to run
//
- //if (EXT_IS_ACTIVE("repair"))
- //{
- // Try to make it depend on repair
- $EXT_UPDATE_DEPENDS = "repair";
+ // Try to make it depend on repair
+ $EXT_UPDATE_DEPENDS = "repair";
- //
- // Sponsor data
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_data";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_data (
+ //
+ // Sponsor data
+ //
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_data";
+ $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_data (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
company VARCHAR(255) NOT NULL DEFAULT '',
position VARCHAR(255) NOT NULL DEFAULT '',
KEY(email),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Sponsor orders
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_orders";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_orders (
+ //
+ // Sponsor orders
+ //
+ $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,
KEY (sponsorid),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Pay-types
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_paytypes";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_paytypes (
+ //
+ // Pay-types
+ //
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_paytypes";
+ $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_paytypes (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
pay_name VARCHAR(255) NOT NULL DEFAULT '',
pay_rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
pay_currency VARCHAR(255) NOT NULL DEFAULT '€',
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Points-to-action converting
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_action_convert";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_action_convert (
+ //
+ // Points-to-action converting
+ //
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_action_convert";
+ $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,
KEY (ext_name),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Sponsor menu system (default)
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_menu";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_menu (
+ //
+ // Sponsor menu system (default)
+ //
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_menu";
+ $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_menu (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
action 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,
-KEY(what),
-KEY(action),
+KEY (action),
+UNIQUE KEY (what),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Registry for performable actions by your sponsors
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_registry";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_registry (
+ //
+ // Registry for performable actions by your sponsors
+ //
+ $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,
ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor',
KEY(aid),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // URLs from the sponsors
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_urls";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_urls (
+ //
+ // URLs from the sponsors
+ //
+ $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,
url VARCHAR(255) NOT NULL DEFAULT 'http://',
KEY(sponsorid),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Banners of any size from the sponsors
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_banner";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_banner (
+ //
+ // Banners of any size from the sponsors
+ //
+ $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,
url VARCHAR(255) NOT NULL DEFAULT 'http://',
KEY(sponsorid),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Campaigns
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaigns";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_campaigns (
+ //
+ // Campaigns
+ //
+ $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,
KEY(sponsorid),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Campaigns + URLs + Banner
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaign_assigns";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_campaign_assigns (
+ //
+ // Campaigns + URLs + Banner
+ //
+ $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,
KEY(campaignid),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Allowed data to display (administrative)
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_admin_data";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_admin_data (
+ //
+ // Allowed data to display (administrative)
+ //
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_admin_data";
+ $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_admin_data (
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)
)TYPE=MyISAM";
- //
- // Allowed data to display (sponsor-side)
- //
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_display_data";
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_display_data (
+ //
+ // Allowed data to display (sponsor-side)
+ //
+ $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,
data_row VARCHAR(255) NOT NULL DEFAULT '',
KEY(sponsorid),
PRIMARY KEY(id)
)TYPE=MyISAM";
- //
- // Default allowed data to display
- //
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('id','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('company','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('position','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('tax_ident','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('gender','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('surname','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('family','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('street_nr1','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('street_nr2','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('zip','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('city','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('country','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('phone','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('fax','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('email','Y')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('url','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('password','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('remote_addr','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('sponsor_created','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('last_online','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('last_change','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('status','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('receive_warnings','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('warning_interval','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('points_amount','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('points_used','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('refid','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('ref_count','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('hash','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('last_pay','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('last_curr','N')";
- //
- // 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_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, '€')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')";
- //
- // Admin menu
- //
- $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)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {!POINTS!}-Pakete kaufen. Hier können Sie diese verwalten.', 14)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)";
- //
- // Menu system (still admin menu)
- //
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)";
- //
- // Guest menu
- //
- $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)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor','sponsor_agb','AGBs', 4)";
- //
- // Member menu
- //
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort) VALUES ('main','sponsor','Unsere Sponsoren', 8)";
- //
- // 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','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 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";
+ //
+ // Default allowed data to display
+ //
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('id','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('company','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('position','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('tax_ident','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('gender','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('surname','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('family','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('street_nr1','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('street_nr2','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('zip','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('city','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('country','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('phone','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('fax','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('email','Y')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('url','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('password','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('remote_addr','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('sponsor_created','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('last_online','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('last_change','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('status','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('receive_warnings','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('warning_interval','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('points_amount','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('points_used','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('refid','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('ref_count','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('hash','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('last_pay','N')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_admin_data (data_row, display) VALUES ('last_curr','N')";
+ //
+ // 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_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, '€')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')";
+ //
+ // Admin menu
+ //
+ $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)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {!POINTS!}-Pakete kaufen. Hier können Sie diese verwalten.', 14)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)";
+ //
+ // Menu system (still admin menu)
+ //
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)";
+ //
+ // Guest menu
+ //
+ $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)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor','sponsor_agb','AGBs', 4)";
+ //
+ // Member menu
+ //
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort) VALUES ('main','sponsor','Unsere Sponsoren', 8)";
+ //
+ // 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','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 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";
- //}
- // else
- //{
- // // Sponsor extension depends now on repair extension!
- // $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='sponsor' LIMIT 1";
- //}
+ // Load CSS file
+ $EXT_CSS = "Y";
break;
case "remove": // Do stuff when removing extension