- //
- // 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 '',
-tax_ident VARCHAR(255) NOT NULL DEFAULT '',
-gender 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) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."',
-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 '€',
-KEY(refid),
-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` (
-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,
-KEY (payid),
-KEY (regid),
-KEY (aid),
-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` (
-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_min_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
-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` (
-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_name VARCHAR(255) NOT NULL DEFAULT 'Mails',
-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` (
-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 (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` (
-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,
-KEY(ext_name),
-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` (
-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) UNSIGNED NOT NULL DEFAULT 0,
-status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
-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` (
-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) 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)
-)TYPE=MyISAM";
- //
- // 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,
-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 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,
-status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
-KEY(aid),
-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` (
-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),
-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` (
-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` (
-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),
-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_CURRENT_ADMIN_ID().",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','list_urls','URL-Verwaltung','N', 4)";
- $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_sponsor_menu` (`action`, `what`, `title`, `active`, `sort`) VALUES ('main','list_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";
+ //
+ // Sponsor data
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_data`');
+ addExtensionSql("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 '',
+`tax_ident` VARCHAR(255) NOT NULL DEFAULT '',
+`gender` 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` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`last_online` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
+`last_change` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
+`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 '".(getConfig('ONE_DAY')*7)."',
+`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) NULL DEFAULT NULL,
+`last_payment` FLOAT(7,2) UNSIGNED NOT NULL DEFAULT 0.00,
+`last_currency` VARCHAR(255) NOT NULL DEFAULT '€',
+INDEX (`refid`),
+INDEX (`email`),
+UNIQUE KEY (`hash`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Sponsor orders
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_orders`');
+ addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_orders` (
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`regid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`payment_id` 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` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`pay_done` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
+INDEX (`payment_id`),
+INDEX (`regid`),
+INDEX (`admin_id`),
+INDEX (`sponsor_id`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Pay-types
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_paytypes`');
+ addExtensionSql("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_min_count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
+`pay_currency` VARCHAR(255) NOT NULL DEFAULT '€',
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Points-to-action converting
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_action_convert`');
+ addExtensionSql("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_name` VARCHAR(255) NOT NULL DEFAULT 'Mails',
+INDEX (`ext_name`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Sponsor menu system (default)
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_menu`');
+ addExtensionSql("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,
+INDEX (`action`),
+UNIQUE KEY `action_what` (`action`,`what`),
+UNIQUE KEY (`what`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Registry for performable actions by your sponsors
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_registry`');
+ addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_registry` (
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`admin_id` 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` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+INDEX (`ext_name`),
+INDEX (`admin_id`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // URLs from the sponsors
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_urls`');
+ addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_urls` (
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`sponsor_id` 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,
+`status` ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
+INDEX (`sponsor_id`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Banners of any size from the sponsors
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_banner`');
+ addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_banner` (
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`url` VARCHAR(255) NOT NULL DEFAULT 'http://',
+`alternate` VARCHAR(255) NOT NULL DEFAULT '',
+`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',
+INDEX (`sponsor_id`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Campaigns
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaigns`');
+ addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_campaigns` (
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`campaign_name` VARCHAR(255) NOT NULL DEFAULT '',
+`campaign_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`campaign_start` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
+`campaign_end` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
+`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` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
+`locked_reason` TINYTEXT,
+`locked_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
+`status` ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
+INDEX (`admin_id`),
+INDEX (`sponsor_id`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Campaigns + URLs + Banner
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns`');
+ addExtensionSql("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,
+INDEX (`bannerid`),
+INDEX (`urlid`),
+INDEX (`campaignid`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Allowed data to display (administrative)
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_admin_data`');
+ addExtensionSql("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={?_TABLE_TYPE?}");
+ //
+ // Allowed data to display (sponsor-side)
+ //
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_display_data`');
+ addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_display_data` (
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`data_row` VARCHAR(255) NOT NULL DEFAULT '',
+`display` ENUM('Y','N') NOT NULL DEFAULT 'N',
+INDEX (`sponsor_id`),
+PRIMARY KEY (`id`)
+) TYPE={?_TABLE_TYPE?}");
+ //
+ // Default allowed data to display
+ //
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('id','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('company','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('position','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('tax_ident','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('gender','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('surname','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('family','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('street_nr1','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('street_nr2','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('zip','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('city','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('country','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('phone','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('fax','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('email','Y')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('url','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('password','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('remote_addr','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('sponsor_created','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_online','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_change','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('status','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('receive_warnings','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('warning_interval','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('points_amount','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('points_used','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('refid','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('ref_count','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('hash','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_payment','N')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_currency','N')");
+ //
+ // Add default entries
+ //
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_registry` (`ext_name`, `is_active`, `admin_id`, `stamp_added`) VALUES ('sponsor','N',".getCurrentAdminId().",NOW())");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_action_convert` (`ext_name`, `conv_rate`, `conv_name`) VALUES ('sponsor','10','Mails')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Standart-Paket', 5, 1000.00000, '€')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Spar-Paket', 1, 200.00000, '€')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Power-Paket', 10, 2000.00000, '€')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')");
+ //
+ // Admin menu
+ //
+ addAdminMenuSql('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7);
+ addAdminMenuSql('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1);
+ addAdminMenuSql('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2);
+ addAdminMenuSql('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3);
+ addAdminMenuSql('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4);
+ addAdminMenuSql('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5);
+ addAdminMenuSql('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6);
+ addAdminMenuSql('sponsor','sponsor_contct','Sponsor kontaktieren','Kontaktieren Sie Sponsoren komfortabel über dieses {?TITLE?}.', 7);
+ addAdminMenuSql('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 8);
+ addAdminMenuSql('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 9);
+ addAdminMenuSql('sponsor','list_sponsor_campaigns','Kampagnen...','Management aller von Ihren Sponsoren eingerichteten Kampagnen.', 10);
+ addAdminMenuSql('sponsor','list_sponsor_urls','URL-Management','Management (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11);
+ addAdminMenuSql('sponsor','list_sponsor_banner','Banner-Management','Management (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12);
+ addAdminMenuSql('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13);
+ addAdminMenuSql('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Pakete kaufen. Hier können Sie diese verwalten.', 14);
+ addAdminMenuSql('sponsor','list_sponsor_conv','{OPEN_CONFIG}POINTS{CLOSE_CONFIG} umwandeln...','Mit den vom Sponsor gekauften {OPEN_CONFIG}POINTS{CLOSE_CONFIG} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {OPEN_CONFIG}POINTS{CLOSE_CONFIG} nach Sponsoraktionen um. Beispiel: 1 {OPEN_CONFIG}POINTS{CLOSE_CONFIG} = 10 Mails.', 15);
+ addAdminMenuSql('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16);
+ addAdminMenuSql('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5);
+ //
+ // Menu system (still admin menu)
+ //
+ addAdminMenuSql('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7);
+ addAdminMenuSql('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
+ //
+ addGuestMenuSql('sponsor', NULL, 'Sponsoren','N','Y', 2);
+ addGuestMenuSql('sponsor','sponsor_reg','Anmeldung','N','Y', 1);
+ addGuestMenuSql('sponsor','sponsor_login','Einloggen','N','Y', 2);
+ addGuestMenuSql('sponsor','sponsor_infos','Infos/Preise','N','Y', 3);
+ addGuestMenuSql('sponsor','sponsor_agb','AGBs','N','Y', 4);
+ //
+ // Member menu
+ //
+ addMemberMenuSql('main','sponsor_list','Unsere Sponsoren','N','Y',8);
+ addMemberMenuSql('main','sponsor_reg','Sponsor werden','N','Y',9);
+ //
+ // Add default menus to sponsor menu
+ //
+ addSponsorMenuSql('main', NULL, 'Hauptauswahl','N', 1);
+ addSponsorMenuSql('main','welcome','Willkommen','N', 1);
+ addSponsorMenuSql('main','account','Ihr Account','N', 2);
+ addSponsorMenuSql('main','campaigns','Kampagnen','N', 3);
+ addSponsorMenuSql('main','list_urls','URL-Management','N', 4);
+ addSponsorMenuSql('main','list_banner','Banner-Management','N', 5);
+ addSponsorMenuSql('main','settings','Einstellungen','N', 6);
+ addSponsorMenuSql('main','fillup','Konto auffüllen','N', 7);
+ addSponsorMenuSql('main','stats','Statistiken','N', 8);
+ addSponsorMenuSql('main','inquiry','Kontaktanfrage','N', 9);
+ addSponsorMenuSql('main','refid','Referal-Link','N', 10);
+ addSponsorMenuSql('actions', NULL, 'Sponsorenaktionen','N', 2);
+ addSponsorMenuSql('actions','mail','Sponsor-Mail','N', 1);
+ addSponsorMenuSql('actions','banner','Banner buchen','N', 2);
+ addSponsorMenuSql('actions','text','Textlink buchen','N', 3);
+ addSponsorMenuSql('logout', NULL, 'Ausloggen','N', 3);
+ addSponsorMenuSql('logout','logout','Ausloggen','N', 1);
+ addSponsorMenuSql('logout','guest','Zum Gastbereich','N', 2);
+ //
+ // General configuration stuff
+ //
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `sponsor_ref_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `sponsor_min_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000");
+ //
+ // Register module
+ //
+ addModuleSql('sponsor','Y','Y','N','N');
+ addModuleSql('sponsor_confirm','Y','Y','N','N');
+ addModuleSql('sponsor_ref','Y','Y','N','N');