From: Roland Häder Date: Sat, 13 Aug 2011 16:10:08 +0000 (+0000) Subject: Extension ext-network continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e3d32ba51d2faa9d771ba684520a7cfa87fbf577;p=mailer.git Extension ext-network continued: - All button language ids renamed to better naming convention, suffix is _SUBMIT because the language id will be placed on a submit button - Also many other language id renamed - Referral link and 88x31 button added, now the webmaster (you!) can enter his or her referral link and a 88x31 formatted banner which are planned to be displayed in guest and member area (not yet finished) - TODOs.txt updated --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index aa52e1d15e..662189be18 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -54,8 +54,8 @@ ./inc/functions.php:2197: // @TODO Rename column data_type to e.g. mail_status ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter ./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); -./inc/language/de.php:1073: // @TODO Rewrite these two constants -./inc/language/de.php:1089: // @TODO Rewrite these three constants +./inc/language/de.php:1074: // @TODO Rewrite these two constants +./inc/language/de.php:1090: // @TODO Rewrite these three constants ./inc/language/de.php:758:// @TODO Are these constants longer used? ./inc/language-functions.php:255: // @TODO These are all valid languages, again hard-coded ./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function. diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index b3dd951dc0..be072e7d4d 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -110,12 +110,12 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_handle`)", `network_param_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`request_param_key` VARCHAR(20) NOT NULL DEFAULT 'invalid', -`request_param_value` VARCHAR(20) NOT NULL DEFAULT 'invalid', -`request_param_default` VARCHAR(255) NULL DEFAULT NULL, +`network_request_param_key` VARCHAR(20) NOT NULL DEFAULT 'invalid', +`network_request_param_value` VARCHAR(20) NOT NULL DEFAULT 'invalid', +`network_request_param_default` VARCHAR(255) NULL DEFAULT NULL, PRIMARY KEY (`network_param_id`), -UNIQUE INDEX `provider_type_key` (`network_id`,`network_type_id`,`request_param_key`), -UNIQUE INDEX `provider_type_value` (`network_id`,`network_type_id`,`request_param_value`)", +UNIQUE INDEX `provider_type_key` (`network_id`,`network_type_id`,`network_request_param_key`), +UNIQUE INDEX `provider_type_value` (`network_id`,`network_type_id`,`network_request_param_value`)", 'Request parameters for GET/POST request'); // Error status codes @@ -165,13 +165,15 @@ INDEX (`sort`)", addDropTableSql('network_api_config'); addCreateTableSql('network_api_config', " `network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`network_affiliate_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_api_affiliate_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_api_password` VARCHAR(255) NOT NULL DEFAULT '', -`network_site_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_api_site_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_api_active` ENUM('Y','N') NOT NULL DEFAULT 'Y', +`network_api_referral_link` VARCHAR(255) NULL DEFAULT NULL, +`network_api_referral_button` VARCHAR(255) NULL DEFAULT NULL, PRIMARY KEY (`network_id`), -UNIQUE INDEX `network_affiliate` (`network_id`,`network_affiliate_id`), -UNIQUE INDEX `affiliate_site` (`network_affiliate_id`,`network_site_id`)", +UNIQUE INDEX `network_affiliate` (`network_id`,`network_api_affiliate_id`), +UNIQUE INDEX `affiliate_site` (`network_api_affiliate_id`,`network_api_site_id`)", 'API configuration data'); // Configuration data for e.g. reload-time @@ -180,11 +182,11 @@ UNIQUE INDEX `affiliate_site` (`network_affiliate_id`,`network_site_id`)", `network_data_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`max_reload_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`min_waiting_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`min_remain_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`min_payment` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, -`allow_erotic` VARCHAR(10) NOT NULL DEFAULT '', +`network_max_reload_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_min_waiting_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_min_remain_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_min_payment` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +`network_allow_erotic` VARCHAR(10) NOT NULL DEFAULT '', PRIMARY KEY (`network_data_id`), UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", 'Configuration data for every type (e.g. reload-time)'); @@ -720,7 +722,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (166, 23, 'lead', 'http://www.yoomedia.de/interface_2.0/out_lead.php', 'http://www.yoomedia.de/code/lead.php?id=%CID%&sid=%SID%', NULL)"); // Request parameters per type handler - A3H - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (1, 1, 'id', 'id', NULL), (1, 1, 'minimum_stay', 'ma', NULL), (1, 1, 'password', 'pw', NULL), @@ -801,7 +803,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (1, 11, 'type', 'typ', 'html')"); // Request parameters per type handler - AbisZED-Netz - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (2, 187, 'id', 'id', NULL), (2, 187, 'password', 'pw', NULL), (2, 187, 'reload', 'reload', NULL), @@ -912,7 +914,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (2, 201, 'sid', 'sid', NULL)"); // Request parameters per type handler - Ad-Hit - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (31, 302, 'extra', 'typ', 'forcedbanner'), (31, 302, 'id', 'id', NULL), (31, 302, 'password', 'pw', NULL), @@ -997,7 +999,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", // Request parameters per type handler - Ad-Magnet // Request parameters per type handler - AdCity.eu - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`, `network_type_id`, `request_param_key`, `request_param_value`, `request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`, `network_type_id`, `network_request_param_key`, `network_request_param_value`, `network_request_param_default`) VALUES (32, 312, 'extra', 'typ', 'forcedbanner'), (32, 312, 'id', 'id', NULL), (32, 312, 'password', 'pw', NULL), @@ -1072,7 +1074,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", // Request parameters per type handler - AdCocktail // Request parameters per type handler - AdConvention - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (30, 292, 'extra', 'typ', 'forcedbanner'), (30, 292, 'id', 'id', NULL), (30, 292, 'minimum_stay', 'ma', NULL), @@ -1145,7 +1147,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (30, 301, 'reward', 'verguetung', NULL)"); // Request parameters per type handler - AdPaid - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (5, 177, 'id', 'id', NULL), (5, 177, 'password', 'pw', NULL), (5, 177, 'reload', 'reload', NULL), @@ -1218,7 +1220,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (5, 186, 'sid', 'sid', NULL)"); // Request parameters per type handler - Ads4 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (6, 14, 'currency', 'waehrung', NULL), (6, 14, 'extra', 'mediatype', 'forced_banner'), (6, 14, 'id', 'id', NULL), @@ -1253,7 +1255,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (6, 119, 'reward', 'verg', NULL)"); // Request parameters per type handler - Ads4Webbis - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (7, 17, 'extra', 'typ', 'forcedbanner'), (7, 17, 'id', 'id', NULL), (7, 17, 'password', 'pw', NULL), @@ -1318,7 +1320,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (7, 120, 'reward', 'verguetung', NULL)"); // Request parameters per type handler - Ads4World - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (8, 26, 'extra', 'typ', 'forcedbanner'), (8, 26, 'id', 'id', NULL), (8, 26, 'password', 'pw', NULL), @@ -1385,7 +1387,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", // Request parameters per type handler - Affiliblatt // Request parameters per type handler - AllAds4You - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (10, 167, 'extra', 'typ', 'forcedbanner'), (10, 167, 'id', 'id', NULL), (10, 167, 'password', 'pw', NULL), @@ -1458,7 +1460,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (10, 176, 'sid', 'sid', NULL)"); // Request parameters per type handler - Alster-Marketing - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (11, 35, 'id', 'id', NULL), (11, 35, 'password', 'pw', NULL), (11, 35, 'reload', 'reload', NULL), @@ -1569,7 +1571,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (11, 49, 'type', 'typ', 'view')"); // Request parameters per type handler - BonusSponsor - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (12, 50, 'id', 'id', NULL), (12, 50, 'password', 'pw', NULL), (12, 50, 'reload', 'reload', NULL), @@ -1664,7 +1666,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (12, 62, 'sid', 'sid', NULL)"); // Request parameters per type handler - City-Ads - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (24, 212, 'extra', 'typ', 'forcedbanner'), (24, 212, 'id', 'id', NULL), (24, 212, 'password', 'pw', NULL), @@ -1737,7 +1739,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (24, 221, 'minimum_stay', 'ma', NULL)"); // Request parameters per type handler - doubleads - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (26, 232, 'id', 'id', NULL), (26, 232, 'password', 'pw', NULL), (26, 232, 'reload', 'reload', NULL), @@ -1848,7 +1850,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (26, 246, 'sid', 'sid', NULL)"); // Request parameters per type handler - FuCoExSponsor.net - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (29, 273, 'extra', 'art', 'bannerklick'), (29, 273, 'id', 'uid', NULL), (29, 273, 'password', 'pw', NULL), @@ -1976,7 +1978,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (29, 289, 'sid', 'sid', NULL)"); // Request parameters per type handler - Fusion-Ads - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (13, 290, 'extra', 'art', 'Forcedbanner'), (13, 290, 'id', 'uid', NULL), (13, 290, 'password', 'pw', NULL), @@ -1993,7 +1995,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (13, 291, 'sid', 'sid', NULL)"); // Request parameters per type handler - GigapPromo - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (14, 102, 'id', 'id', NULL), (14, 102, 'password', 'pw', NULL), (14, 102, 'reload', 'reload', NULL), @@ -2044,7 +2046,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (14, 108, 'sid', 'aid', NULL)"); // Request parameters per type handler - Gold-Sponsor - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (25, 222, 'extra', 'typ', 'forcedbanner'), (25, 222, 'id', 'id', NULL), (25, 222, 'minimum_stay', 'ma', NULL), @@ -2117,7 +2119,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (25, 231, 'reward', 'verguetung', NULL)"); // Request parameters per type handler - homeADS - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (28, 260, 'id', 'id', NULL), (28, 260, 'password', 'pw', NULL), (28, 260, 'reload', 'reload', NULL), @@ -2212,7 +2214,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (28, 272, 'sid', 'sid', NULL)"); // Request parameters per type handler - HPSponsor - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (15, 135, 'extra', 'typ', 'forcedbanner'), (15, 135, 'id', 'id', NULL), (15, 135, 'password', 'pw', NULL), @@ -2277,7 +2279,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (15, 144, 'reward', 'verguetung', NULL)"); // Request parameters per type handler - Make-Euros - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (16, 63, 'id', 'id', NULL), (16, 63, 'password', 'pw', NULL), (16, 63, 'reload', 'reload', NULL), @@ -2388,7 +2390,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (16, 77, 'sid', 'sid', NULL)"); // Request parameters per type handler - Mega-Ad - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (17, 109, 'extra', 'typ', 'forcedbanner'), (17, 109, 'id', 'id', NULL), (17, 109, 'password', 'pw', NULL), @@ -2451,7 +2453,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (17, 123, 'reward', 'verguetung', NULL)"); // Request parameters per type handler - Power-Promo - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (18, 78, 'id', 'id', NULL), (18, 78, 'password', 'pw', NULL), (18, 78, 'reload', 'reload', NULL), @@ -2562,7 +2564,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (18, 92, 'sid', 'sid', NULL)"); // Request parameters per type handler - SeCash - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (19, 93, 'extra', 'typ', 'forcedbanner'), (19, 93, 'id', 'id', NULL), (19, 93, 'password', 'pw', NULL), @@ -2627,7 +2629,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (19, 124, 'reward', 'verguetung', NULL)"); // Request parameters per type handler - Swizerland - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (20, 202, 'extra', 'typ', 'forcedbanner'), (20, 202, 'id', 'id', NULL), (20, 202, 'password', 'pw', NULL), @@ -2692,7 +2694,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (20, 211, 'reward', 'verguetung', NULL)"); // Request parameters per type handler - UltraPROMO - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (21, 125, 'extra', 'typ', 'bannerklick'), (21, 125, 'id', 'id', NULL), (21, 125, 'password', 'pw', NULL), @@ -2757,7 +2759,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (21, 134, 'reward', 'verguetung', NULL)"); // Request parameters per type handler - VIPads.de - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (27, 247, 'extra', 'art', 'bannerklick'), (27, 247, 'id', 'uid', NULL), (27, 247, 'password', 'pw', NULL), @@ -2856,7 +2858,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (27, 259, 'sid', 'sid', NULL)"); // Request parameters per type handler - Der Werbepartner.cc - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (22, 145, 'extra', 'art', 'Textlinkklick'), (22, 145, 'id', 'uid', NULL), (22, 145, 'password', 'pw', NULL), @@ -2936,7 +2938,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (22, 155, 'sid', 'sid', NULL)"); // Request parameters per type handler - Yoo!Media - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (23, 156, 'erotic', 'erotik', NULL), (23, 156, 'id', 'id', NULL), (23, 156, 'password', 'pw', NULL), diff --git a/inc/language/network_de.php b/inc/language/network_de.php index a0d6a38dec..b2382733e8 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -67,40 +67,40 @@ addMessages(array( 'ADMIN_NETWORK_API_TRANSLATION_NOT_ADDED' => "Die Array-Element-Übersetzung %s wurde nicht hinzugefügt.", 'ADMIN_NETWORK_API_TRANSLATION_ALREADY_ADDED' => "Eine Array-Element-Übersetzung %s existiert bereits.", // - Form titles - 'ADMIN_NETWORK_ADD_TITLE' => "Neues Werbenetzwerk hinzufügen - Allgemeine Daten", + 'ADMIN_ADD_NETWORK_TITLE' => "Neues Werbenetzwerk hinzufügen - Allgemeine Daten", 'ADMIN_EDIT_NETWORK_DATA_TITLE' => "Werbenetzwerk editieren - Allgemeine Daten", 'ADMIN_DELETE_NETWORK_DATA_TITLE' => "Werbenetzwerk löschen - Allgemeine Daten", - 'ADMIN_NETWORK_SELECT_TITLE' => "Bitte wählen Sie ein Werbenetzwerk aus", - 'ADMIN_NETWORK_TYPE_SELECT_TITLE' => "Bitte wählen Sie einen Werbeart-Handler aus", - 'ADMIN_NETWORK_TYPES_ADD_TITLE' => "Werbenetzwerk verwalten - Neue Werbeart hinzufügen", + 'ADMIN_SELECT_NETWORK_TITLE' => "Bitte wählen Sie ein Werbenetzwerk aus", + 'ADMIN_SELECT_NETWORK_TYPE_TITLE' => "Bitte wählen Sie einen Werbeart-Handler aus", + 'ADMIN_ADD_NETWORK_TYPE_TITLE' => "Werbenetzwerk verwalten - Neue Werbeart hinzufügen", 'ADMIN_NETWORK_TYPES_LIST_TITLE' => "Werbeart-Handler auflisten und verwalten", - 'ADMIN_NETWORK_TYPES_EDIT_TITLE' => "Werbeart-Handler editieren", + 'ADMIN_EDIT_NETWORK_TYPES_TITLE' => "Werbeart-Handler editieren", 'ADMIN_NETWORK_TYPES_DELETE_TITLE' => "Werbeart-Handle löschen", - 'ADMIN_NETWORK_REQUEST_PARAMETER_ADD_TITLE' => "Werbenetzwerk verwalten - Neuen API-Parameter hinzufügen", + 'ADMIN_ADD_NETWORK_REQUEST_PARAMETER_TITLE' => "Werbenetzwerk verwalten - Neuen API-Parameter hinzufügen", 'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_TITLE' => "API-Parameter auflisten und verwalten", 'ADMIN_NETWORK_REQUEST_PARAMETER_EDIT_TITLE' => "API-Parameter editieren", 'ADMIN_NETWORK_REQUEST_PARAMETER_DELETE_TITLE' => "API-Parameter löschen", - 'ADMIN_NETWORK_API_TRANSLATION_ADD_TITLE' => "Werbenetzwerk verwalten - Neues API-Arrayelement hinzufügen", - 'ADMIN_NETWORK_API_TRANSLATION_LIST_TITLE' => "API-Arrayelemente auflisten und verwalten", + 'ADMIN_ADD_NETWORK_API_TRANSLATION_TITLE' => "Werbenetzwerk verwalten - Neues API-Arrayelement hinzufügen", + 'ADMIN_LIST_NETWORK_API_TRANSLATION_TITLE' => "API-Arrayelemente auflisten und verwalten", // - Link titles 'ADMIN_NETWORK_CONFIG_LINK_TITLE' => "Weiter zur API-Konfiguration", - 'ADMIN_NETWORK_LIST_TYPES_LINK_TITLE' => "Weiter zu den Werbearten", - 'ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE' => "Weiter zu den API-Parametern", - 'ADMIN_NETWORK_LIST_API_TRANSLATION_LINK_TITLE' => "Weiter zu den Übersetzungen zum Antwort-Arrayn", - 'ADMIN_NETWORK_LIST_ERROR_CODES_LINK_TITLE' => "Weiter zu den Fehlercodes", + 'ADMIN_LIST_NETWORK_TYPES_LINK_TITLE' => "Weiter zu den Werbearten", + 'ADMIN_LIST_NETWORK_PARAMS_LINK_TITLE' => "Weiter zu den API-Parametern", + 'ADMIN_LIST_NETWORK_API_TRANSLATION_LINK_TITLE' => "Weiter zu den Übersetzungen zum Antwort-Arrayn", + 'ADMIN_LIST_NETWORK_ERROR_CODES_LINK_TITLE' => "Weiter zu den Fehlercodes", // - Buttons - 'ADMIN_NETWORK_ADD' => "Allgemeine Daten anlegen", - 'ADMIN_NETWORK_CHANGE' => "Daten ändern", - 'ADMIN_NETWORK_REMOVE' => "Daten entfernen", - 'ADMIN_NETWORK_CHOOSE' => "Werbenetzwerk auswählen", - 'ADMIN_NETWORK_TYPE_CHOOSE' => "Werbeart-Handler auswählen", - 'ADMIN_NETWORK_TYPES_ADD' => "Werbeart hinzufügen", - 'ADMIN_NETWORK_TYPES_CHANGE' => "Handler ändern", - 'ADMIN_NETWORK_TYPES_REMOVE' => "Handler entfernen", - 'ADMIN_NETWORK_REQUEST_PARAMETER_ADD' => "API-Parameter hinzufügen", - 'ADMIN_NETWORK_REQUEST_PARAMETER_CHANGE' => "API-Parameter ändern", - 'ADMIN_NETWORK_REQUEST_PARAMETER_REMOVE' => "API-Parameter entfernen", - 'ADMIN_NETWORK_API_TRANSLATION_ADD' => "API-Arrayelement hinzufügen", + 'ADMIN_ADD_NETWORK_SUBMIT' => "Allgemeine Daten anlegen", + 'ADMIN_CHANGE_NETWORK_SUBMIT' => "Daten ändern", + 'ADMIN_REMOVE_NETWORK_SUBMIT' => "Daten entfernen", + 'ADMIN_CHOOSE_NETWORK_SUBMIT' => "Werbenetzwerk auswählen", + 'ADMIN_CHOOSE_NETWORK_TYPE_SUBMIT' => "Werbeart-Handler auswählen", + 'ADMIN_ADD_NETWORK_TYPE_SUBMIT' => "Werbeart hinzufügen", + 'ADMIN_CHANGE_NETWORK_TYPE_SUBMIT' => "Handler ändern", + 'ADMIN_REMOVE_NETWORK_TYPE_SUBMIT' => "Handler entfernen", + 'ADMIN_ADD_NETWORK_REQUEST_PARAMETER_SUBMIT' => "API-Parameter hinzufügen", + 'ADMIN_CHANGE_NETWORK_REQUEST_PARAMETER_SUBMIT' => "API-Parameter ändern", + 'ADMIN_REMOVE_NETWORK_REQUEST_PARAMETER_SUBMIT' => "API-Parameter entfernen", + 'ADMIN_ADD_NETWORK_API_TRANSLATION_SUBMIT' => "API-Arrayelement hinzufügen", // - Success titles 'ADMIN_NETWORK_ADDED_TITLE' => "Allgemeine Werbenetzwerkdaten hinzugefügt", 'ADMIN_NETWORK_TYPES_ADDED_TITLE' => "Werbeart-Handler hinzugefügt", @@ -114,18 +114,20 @@ addMessages(array( 'ADMIN_NETWORK_TYPES_REMOVED' => "Es wurden %s Werbeart-Handler gelöscht.", 'ADMIN_NETWORK_REQUEST_PARAMETER_REMOVED' => "Es wurden %s API-Parameter gelöscht.", // - Form notes - 'ADMIN_NETWORK_ADD_NOTE' => "Mehr Datenschutz bei POST-Abfragen bedeutet, dass die von den Internetanbietern betriebenen Caches (Proxy) die POST-Daten nicht mitloggen (so eine Art Kodex). Der Zeichensatz ist meistens ISO-8859-1 oder WINDOWS-1252.", - 'ADMIN_NETWORK_LIST_NOTE' => "Seien Sie mit dem Löschen und Editieren vonallgemeinen Daten der Werbenetzwerke sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten.", - 'ADMIN_NETWORK_TYPES_ADD_NOTE' => "Fügen Sie hier weitere Werbearten dem ausgwählten Werbenetzwerk hinzu. Die Klick- und Banner-URL müssen dabei Platzhalter enthalten, die Sie der Dokumentation und dem Forum entnehmen können. Die API-URL muss nur bis zum Fragezeichen eingegeben werden. Richtig: http://www.some-sponsor.invalid/inteface/script.php, falsch: http://www.some-sponsor.invalid/inteface/script.php?uid=123&pw=xyzxyzxyz", + 'ADMIN_ADD_NETWORK_NOTE' => "Mehr Datenschutz bei POST-Abfragen bedeutet, dass die von den Internetanbietern betriebenen Caches (Proxy) die POST-Daten nicht mitloggen (so eine Art Kodex). Der Zeichensatz ist meistens ISO-8859-1 oder WINDOWS-1252.", + 'ADMIN_LIST_NETWORK_NOTE' => "Seien Sie mit dem Löschen und Editieren vonallgemeinen Daten der Werbenetzwerke sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten.", + 'ADMIN_LIST_NETWORK_REFERRAL_LINK_NOTE' => "Wenn Sie Ihren Referral-Link eingeben, verwenden Sie bitte nicht dieses Formular, sondern das unter [API-Zugangsdaten]. Sollten Sie hier Ihren Referral-Link eingetragen haben, ist dies nicht weiter schlimm, er wird jedoch nicht veröffentlicht.", + 'ADMIN_ADD_NETWORK_TYPE_NOTE' => "Fügen Sie hier weitere Werbearten dem ausgwählten Werbenetzwerk hinzu. Die Klick- und Banner-URL müssen dabei Platzhalter enthalten, die Sie der Dokumentation und dem Forum entnehmen können. Die API-URL muss nur bis zum Fragezeichen eingegeben werden. Richtig: http://www.some-sponsor.invalid/inteface/script.php, falsch: http://www.some-sponsor.invalid/inteface/script.php?uid=123&pw=xyzxyzxyz", 'ADMIN_NETWORK_TYPES_LIST_NOTE' => "Seien Sie mit dem Löschen und Editieren von Werbeart-Handlern sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten. Dokumentation zu den Platzhaltern (%FOO%, %BAR% usw.) finden Sie in der Dokumentation DOCs/de/network/README.txt.", - 'ADMIN_NETWORK_REQUEST_PARAMETER_ADD_NOTE' => "Fügen Sie hier weitere API-Parameter dem ausgwählten Werbenetzwerk hinzu. Geben Sie keine Werte an, wie z.B. 5 Sekunden oder 30 Mails, geben Sie bei API-Parameter den GET- bzw. POST-Parameternamen an.", + 'ADMIN_ADD_NETWORK_REQUEST_PARAMETER_NOTE' => "Fügen Sie hier weitere API-Parameter dem ausgwählten Werbenetzwerk hinzu. Geben Sie keine Werte an, wie z.B. 5 Sekunden oder 30 Mails, geben Sie bei API-Parameter den GET- bzw. POST-Parameternamen an.", 'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_NOTE' => "Seien Sie mit dem Löschen und Editieren von API-Parameter sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten. Dokumentation zu den Abfragenamen (%FOO%, %BAR% usw.) finden Sie in der Dokumentation DOCs/de/network/README.txt.", - 'ADMIN_NETWORK_API_TRANSLATION_ADD_NOTE' => "Fügen Sie hier weitere Array-Element-Übersetzungen zu dem ausgewählten Netzwerk und Werbeart-Handler ein.", - 'ADMIN_NETWORK_API_TRANSLATION_LIST_NOTE' => "Seien Sie mit dem Editieren bzw. Löschen von Array-Elementen sehr vorsichtig, die API-Abfrage köntte unerwartete Ergebnisse bzw. Fehler zurückliefern.", + 'ADMIN_ADD_NETWORK_API_TRANSLATION_NOTE' => "Fügen Sie hier weitere Array-Element-Übersetzungen zu dem ausgewählten Netzwerk und Werbeart-Handler ein.", + 'ADMIN_LIST_NETWORK_API_TRANSLATION_NOTE' => "Seien Sie mit dem Editieren bzw. Löschen von Array-Elementen sehr vorsichtig, die API-Abfrage köntte unerwartete Ergebnisse bzw. Fehler zurückliefern.", 'ADMIN_NETWORK_REQUIRE_ID_CARD_NOTICE' => "Unter {--ADMIN_NETWORK_REQUIRE_ID_CARD--} ist das durch den Webnetzwerkbetreiber Verlangen einerPersonalausweiskopie bzw. Gerwerbescheins zu verstehen. Mehr dazu erfahen Sie im Forum.", + 'ADMIN_NCONFIG_NETWORK_API_NOTE' => "Geben Sie unter {--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_BUTTON--} einen Button im Format 88x31 ein. Sollte das Werbenetzwerk keinen anbieten, lassen Sie dieses Feld einfach leer. Andere Formate als 88x31 werden auf 88x31 geschrumpft dargestellt. Bitte geben Sie nur die URLs und keinen HTML-Code ein.", // - Other messages 'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE' => "Es wurden nur die API-Parameter des ausgewählten Werbeart-Handlers angezeigt.", - 'ADMIN_NETWORK_API_TRANSLATION_LIST_LIMITED_TO_TYPE' => "Es wurden nur die Array-Element-Übersetzungen des ausgewählten Werbeart-Handlers angezeigt.", + 'ADMIN_LIST_NETWORK_API_TRANSLATION_LIMITED_TO_TYPE' => "Es wurden nur die Array-Element-Übersetzungen des ausgewählten Werbeart-Handlers angezeigt.", // - Advertise types 'ADMIN_NETWORK_TYPES_BANNER' => "Banner-Klick/-View", 'ADMIN_NETWORK_TYPES_BANNER_CLICK' => "Banner-Klick", @@ -178,7 +180,7 @@ addMessages(array( 'ADMIN_NETWORK_TYPES_CLICK_URL' => "Klick-URL der Werbeart", 'ADMIN_NETWORK_TYPES_BANNER_URL' => "Banner-URL der Werbeart", // - API request parameter - 'ADMIN_NETWORK_TYPE_SELECT' => "Werbeart-Handler auswählen", + 'ADMIN_SELECT_NETWORK_TYPE' => "Werbeart-Handler auswählen", 'ADMIN_NETWORK_REQUEST_PARAMETER_KEY' => "Abfragename", 'ADMIN_NETWORK_REQUEST_PARAMETER_VALUE' => "API-Parameter", 'ADMIN_NETWORK_REQUEST_PARAMETER_DEFAULT' => "Ausgangswert", @@ -207,6 +209,8 @@ addMessages(array( 'ADMIN_CONFIG_NETWORK_API_ENTER_API_PASSWORD' => "Ihr Interface-Kennwort:", 'ADMIN_CONFIG_NETWORK_API_ENTER_SITE_ID' => "Webseiten-Id Ihres {?MT_WORD2?}:", 'ADMIN_CONFIG_NETWORK_API_SELECT_API_ACTIVE' => "Soll dieses Interface abgefragt werden?", + 'ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_LINK' => "Ihr Referral-Link:", + 'ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_BUTTON' => "Optionaler 88x31 Werbebutton:", 'ADMIN_CONFIG_NETWORK_API_TITLE' => "Einrichtung des API-Zugangs zum Werbenetzwerk %s:", 'ADMIN_CONFIG_NETWORK_API_SAVE_BUTTON' => "API-Konfiguration speichern", 'ADMIN_CONFIG_NETWORK_API_SAVED' => "API-Konfiguration gespeichert.", diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index 6d6e3b7e66..592ee41feb 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -126,7 +126,7 @@ function isNetworkTypeHandleValid ($type, $networkId) { // Checks wether the given network request parameter is already used (valid) function isNetworkRequestElementValid ($key, $type, $networkId) { // Query for it - $result = SQL_QUERY_ESC("SELECT `network_param_id` FROM `{?_MYSQL_PREFIX?}_network_request_params` WHERE `network_id`=%s AND `network_type_id`=%s AND `request_param_key`='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `network_param_id` FROM `{?_MYSQL_PREFIX?}_network_request_params` WHERE `network_id`=%s AND `network_type_id`=%s AND `network_request_param_key`='%s' LIMIT 1", array($networkId, $type, $key), __FUNCTION__, __LINE__); // Does it exist? @@ -328,9 +328,9 @@ function getNetworkRequestParamsDataById ($networkId) { `network_param_id`, `network_id`, `network_type_id`, - `request_param_key`, - `request_param_value`, - `request_param_default` + `network_request_param_key`, + `network_request_param_value`, + `network_request_param_default` FROM `{?_MYSQL_PREFIX?}_network_request_params` WHERE @@ -818,13 +818,7 @@ function doAdminNetworkProcessAddNetwork () { unsetPostRequestElement('ok'); // Add the whole request to database - SQL_QUERY('INSERT INTO - `{?_MYSQL_PREFIX?}_network_data` -( - `' . implode('`,`', array_keys(postRequestArray())) . "` -) VALUES ( - '" . implode("','", array_values(postRequestArray())) . "' -)", __FUNCTION__, __LINE__); + SQL_QUERY(getInsertSqlFromArray(postRequestArray(), 'network_data'), __FUNCTION__, __LINE__); // Add the id for output only setPostRequestElement('network_id', SQL_INSERTID()); @@ -1096,13 +1090,7 @@ function doAdminNetworkProcessAddNetworkType () { } // END - if // Add the whole request to database - SQL_QUERY('INSERT INTO - `{?_MYSQL_PREFIX?}_network_types` -( - `' . implode('`,`', array_keys(postRequestArray())) . "` -) VALUES ( - '" . implode("','", array_values(postRequestArray())) . "' -)", __FUNCTION__, __LINE__); + SQL_QUERY(getInsertSqlFromArray(postRequestArray(), 'network_types'), __FUNCTION__, __LINE__); // Output message if (!SQL_HASZEROAFFECTED()) { @@ -1194,8 +1182,8 @@ function doAdminNetworkProcessChangeNetworkParam () { debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); } // END - if - // Fix empty request_param_default to NULL - if (($key == 'request_param_default') && (trim($entry[$networkId]) == '')) { + // Fix empty network_request_param_default to NULL + if (($key == 'network_request_param_default') && (trim($entry[$networkId]) == '')) { // Set it to NULL $entry[$networkId] = NULL; } // END - if @@ -1277,9 +1265,9 @@ function doAdminNetworkProcessRemoveNetworkParam () { // Adds a request parameter to given network and type function doAdminNetworkProcessAddNetworkParam () { // Is the request parameter already used with given network? - if (isNetworkRequestElementValid(postRequestElement('request_param_key'), postRequestElement('network_type_id'), getRequestElement('network'))) { + if (isNetworkRequestElementValid(postRequestElement('network_request_param_key'), postRequestElement('network_type_id'), getRequestElement('network'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED=' . postRequestElement('request_param_key') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED=' . postRequestElement('network_request_param_key') . '%}'); // ... so abort here return false; @@ -1291,28 +1279,22 @@ function doAdminNetworkProcessAddNetworkParam () { // Add id setPostRequestElement('network_id', bigintval(getRequestElement('network'))); - // Is request_param_default set? - if (postRequestElement('request_param_default') == '') { + // Is network_request_param_default set? + if (postRequestElement('network_request_param_default') == '') { // Remove empty value to get a NULL for an optional entry - unsetPostRequestElement('request_param_default'); + unsetPostRequestElement('network_request_param_default'); } // END - if // Add the whole request to database - SQL_QUERY('INSERT INTO - `{?_MYSQL_PREFIX?}_network_request_params` -( - `' . implode('`,`', array_keys(postRequestArray())) . "` -) VALUES ( - '" . implode("','", array_values(postRequestArray())) . "' -)", __FUNCTION__, __LINE__); + SQL_QUERY(getInsertSqlFromArray(postRequestArray(), 'network_request_params'), __FUNCTION__, __LINE__); // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added - loadTemplate('admin_network_request_param_added', false, postRequestArray()); + loadTemplate('admin_network_network_request_param_added', false, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED=' . postRequestElement('request_param_key') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED=' . postRequestElement('network_request_param_key') . '%}'); } } @@ -1344,13 +1326,7 @@ function doAdminNetworkProcessAddNetworkApiTranslation () { ) + 1)); // Add the whole request to database - SQL_QUERY('INSERT INTO - `{?_MYSQL_PREFIX?}_network_api_translation` -( - `' . implode('`,`', array_keys(postRequestArray())) . "` -) VALUES ( - '" . implode("','", array_values(postRequestArray())) . "' -)", __FUNCTION__, __LINE__); + SQL_QUERY(getInsertSqlFromArray(postRequestArray(), 'network_api_translation'), __FUNCTION__, __LINE__); // Output message if (!SQL_HASZEROAFFECTED()) { @@ -1376,13 +1352,7 @@ function doAdminNetworkProcessNetworkApiConfig () { $SQL = getUpdateSqlFromArray(postRequestArray(), 'network_api_config', 'network_id', postRequestElement('network_id'), array('network_id')); } else { // Insert new entry - $SQL = 'INSERT INTO - `{?_MYSQL_PREFIX?}_network_api_config` -( - `' . implode('`,`', array_keys(postRequestArray())) . "` -) VALUES ( - '" . implode("','", array_values(postRequestArray())) . "' -)"; + $SQL = getInsertSqlFromArray(postRequestArray(), 'network_api_config'); } // Run the query diff --git a/inc/modules/admin/what-config_network_api.php b/inc/modules/admin/what-config_network_api.php index 8af40d0128..3711063bbf 100644 --- a/inc/modules/admin/what-config_network_api.php +++ b/inc/modules/admin/what-config_network_api.php @@ -64,10 +64,12 @@ if (isGetRequestElementSet('network')) { `network_title`, `network_reflink`, `network_query_amount`, - NULL AS `network_affiliate_id`, + NULL AS `network_api_affiliate_id`, NULL AS `network_api_password`, - NULL AS `network_site_id`, - NULL AS `network_api_active` + NULL AS `network_api_site_id`, + NULL AS `network_api_active`, + NULL AS `network_api_referral_link`, + NULL AS `network_api_referral_button` FROM `{?_MYSQL_PREFIX?}_network_data` WHERE @@ -84,10 +86,12 @@ LIMIT 1', // Query for config table $result_config = SQL_QUERY_ESC('SELECT - `network_affiliate_id`, + `network_api_affiliate_id`, `network_api_password`, - `network_site_id`, - `network_api_active` + `network_api_site_id`, + `network_api_active`, + `network_api_referral_link`, + `network_api_referral_button` FROM `{?_MYSQL_PREFIX?}_network_api_config` WHERE diff --git a/inc/modules/admin/what-list_network_api_translation.php b/inc/modules/admin/what-list_network_api_translation.php index aeba4b4482..4645fb0f95 100644 --- a/inc/modules/admin/what-list_network_api_translation.php +++ b/inc/modules/admin/what-list_network_api_translation.php @@ -82,7 +82,7 @@ if (isGetRequestElementSet('network')) { $networkData['network_type_id'] = bigintval(postRequestElement('network_type_id')); // Display message - displayMessage('{--ADMIN_NETWORK_API_TRANSLATION_LIST_LIMITED_TO_TYPE--}'); + displayMessage('{--ADMIN_LIST_NETWORK_API_TRANSLATION_LIMITED_TO_TYPE--}'); } // END - if // Load all advert codes for given network diff --git a/inc/modules/admin/what-list_network_params.php b/inc/modules/admin/what-list_network_params.php index 134cd88753..459ce98193 100644 --- a/inc/modules/admin/what-list_network_params.php +++ b/inc/modules/admin/what-list_network_params.php @@ -85,7 +85,12 @@ if (isGetRequestElementSet('network')) { // Load all advert types for given network $result = SQL_QUERY_ESC("SELECT - p.`network_param_id`, t.`network_type_id`, t.`network_type_handle`, p.`request_param_key`, p.`request_param_value`, p.`request_param_default` + p.`network_param_id`, + t.`network_type_id`, + t.`network_type_handle`, + p.`network_request_param_key`, + p.`network_request_param_value`, + p.`network_request_param_default` FROM `{?_MYSQL_PREFIX?}_network_request_params` AS p INNER JOIN @@ -107,11 +112,11 @@ ORDER BY // Add it to network if the type matches selected if ($row['network_type_id'] == postRequestElement('network_type_id')) { // Matches, then add it for disabling this entry - $GLOBALS['network_params_disabled'][$row['request_param_key']] = true; + $GLOBALS['network_params_disabled'][$row['network_request_param_key']] = true; } // END - if // Is default value empty or null? - $row['request_param_default'] = fixNullEmptyToDashes($row['request_param_default'], 3); + $row['network_request_param_default'] = fixNullEmptyToDashes($row['network_request_param_default'], 3); // Add row template and switch color $OUT .= loadTemplate('admin_list_network_params_row', true, $row); diff --git a/inc/sql-functions.php b/inc/sql-functions.php index 6298ed43f4..5ec4bee18c 100644 --- a/inc/sql-functions.php +++ b/inc/sql-functions.php @@ -171,5 +171,39 @@ function getUpdateSqlFromArray ($array, $tableName, $whereColumn, $whereData, $e return $SQL; } +// "Getter" for an "INSERT INTO" SQL query +function getInsertSqlFromArray ($array, $tableName, $excludedFields = array('ok', 'add', 'do_edit')) { + // Init SQL + $SQL = 'INSERT INTO +`{?_MYSQL_PREFIX?}_' . $tableName . '` +( +`' . implode('`,`', array_keys(postRequestArray())) . '` +) VALUES ('; + + // Walk through all entries + foreach (postRequestArray() as $key=>$value) { + // Add all entries + if (is_null($value)) { + // Add NULL + $SQL .= 'NULL,'; + } elseif ((bigintval($value, true, false) == $value)) { + // Number detected, no need for ticks (') + $SQL .= bigintval($value) . ','; + } elseif ('' . (float)$value . '' == $value) { + // Float number detected + $SQL .= sprintf('%01.5f', $value); + } else { + // Everything else might be a string, so add ticks around it + $SQL .= "'" . SQL_ESCAPE($value) . "',"; + } + } // END - foreach + + // Finish SQL query + $SQL .= ')'; + + // Return SQL query + return $SQL; +} + // [EOF] ?> diff --git a/templates/de/html/admin/admin_add_network.tpl b/templates/de/html/admin/admin_add_network.tpl index 19332e2f08..242e1415eb 100644 --- a/templates/de/html/admin/admin_add_network.tpl +++ b/templates/de/html/admin/admin_add_network.tpl @@ -3,7 +3,7 @@ @@ -59,7 +59,7 @@
- {--ADMIN_NETWORK_ADD_TITLE--} + {--ADMIN_ADD_NETWORK_TITLE--}
@@ -67,5 +67,5 @@
- {--ADMIN_NETWORK_ADD_NOTE--} + {--ADMIN_ADD_NETWORK_NOTE--}
diff --git a/templates/de/html/admin/admin_add_network_api_translation.tpl b/templates/de/html/admin/admin_add_network_api_translation.tpl index 3de93e54dd..9c90964a0d 100644 --- a/templates/de/html/admin/admin_add_network_api_translation.tpl +++ b/templates/de/html/admin/admin_add_network_api_translation.tpl @@ -3,14 +3,14 @@ - +
- {--ADMIN_NETWORK_API_TRANSLATION_ADD_TITLE--} + {--ADMIN_ADD_NETWORK_API_TRANSLATION_TITLE--}
{--ADMIN_NETWORK_TYPE_SELECT--}:{--ADMIN_SELECT_NETWORK_TYPE--}:
@@ -36,5 +36,5 @@
- {--ADMIN_NETWORK_API_TRANSLATION_ADD_NOTE--} + {--ADMIN_ADD_NETWORK_API_TRANSLATION_NOTE--}
diff --git a/templates/de/html/admin/admin_add_network_params.tpl b/templates/de/html/admin/admin_add_network_params.tpl index 8c9873dea4..f1670d09d4 100644 --- a/templates/de/html/admin/admin_add_network_params.tpl +++ b/templates/de/html/admin/admin_add_network_params.tpl @@ -3,14 +3,14 @@ - + @@ -28,19 +28,19 @@
- {--ADMIN_NETWORK_REQUEST_PARAMETER_ADD_TITLE--} + {--ADMIN_ADD_NETWORK_REQUEST_PARAMETER_TITLE--}
{--ADMIN_NETWORK_TYPE_SELECT--}:{--ADMIN_SELECT_NETWORK_TYPE--}:
{--ADMIN_NETWORK_REQUEST_PARAMETER_KEY--}: - {%pipe,generateNetworkRequestKeyOptions%}
{--ADMIN_NETWORK_REQUEST_PARAMETER_VALUE--}: - +
{--ADMIN_NETWORK_REQUEST_PARAMETER_DEFAULT--}: - +
@@ -48,5 +48,5 @@
- {--ADMIN_NETWORK_REQUEST_PARAMETER_ADD_NOTE--} + {--ADMIN_ADD_NETWORK_REQUEST_PARAMETER_NOTE--}
diff --git a/templates/de/html/admin/admin_add_network_type.tpl b/templates/de/html/admin/admin_add_network_type.tpl index dc1e40b262..88d04697d4 100644 --- a/templates/de/html/admin/admin_add_network_type.tpl +++ b/templates/de/html/admin/admin_add_network_type.tpl @@ -3,7 +3,7 @@
- {--ADMIN_NETWORK_TYPES_ADD_TITLE--} + {--ADMIN_ADD_NETWORK_TYPE_TITLE--} @@ -38,7 +38,7 @@
@@ -46,5 +46,5 @@
- {--ADMIN_NETWORK_TYPES_ADD_NOTE--} + {--ADMIN_ADD_NETWORK_TYPE_NOTE--}
diff --git a/templates/de/html/admin/admin_config_network_api.tpl b/templates/de/html/admin/admin_config_network_api.tpl index 3bf7cb59ff..fcb9fe9ec1 100644 --- a/templates/de/html/admin/admin_config_network_api.tpl +++ b/templates/de/html/admin/admin_config_network_api.tpl @@ -9,17 +9,17 @@ {--ADMIN_CONFIG_NETWORK_API_ENTER_AFFILIATE_ID--}
- + {--ADMIN_CONFIG_NETWORK_API_ENTER_SITE_ID--}
- + {--ADMIN_CONFIG_NETWORK_API_ENTER_API_PASSWORD--}
- + {--ADMIN_CONFIG_NETWORK_API_SELECT_API_ACTIVE--}
@@ -28,6 +28,16 @@ + + + {--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_LINK--}
+ + + + {--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_BUTTON--}
+ + + @@ -36,4 +46,8 @@ + +
+ {--ADMIN_NCONFIG_NETWORK_API_NOTE--} +
diff --git a/templates/de/html/admin/admin_delete_network_params.tpl b/templates/de/html/admin/admin_delete_network_params.tpl index 9c413fcb30..afe17d0725 100644 --- a/templates/de/html/admin/admin_delete_network_params.tpl +++ b/templates/de/html/admin/admin_delete_network_params.tpl @@ -15,7 +15,7 @@ - + diff --git a/templates/de/html/admin/admin_delete_network_params_row.tpl b/templates/de/html/admin/admin_delete_network_params_row.tpl index 418ed8e4fa..dc189e0618 100644 --- a/templates/de/html/admin/admin_delete_network_params_row.tpl +++ b/templates/de/html/admin/admin_delete_network_params_row.tpl @@ -8,18 +8,18 @@ {--ADMIN_NETWORK_REQUEST_PARAMETER_KEY--}: - $content[request_param_key] + $content[network_request_param_key] {--ADMIN_NETWORK_REQUEST_PARAMETER_VALUE--}: - $content[request_param_value] + $content[network_request_param_value] {--ADMIN_NETWORK_REQUEST_PARAMETER_DEFAULT--}: - {%pipe,fixEmptyContentToDashes=$content[request_param_default]%} + {%pipe,fixEmptyContentToDashes=$content[network_request_param_default]%} diff --git a/templates/de/html/admin/admin_delete_network_types.tpl b/templates/de/html/admin/admin_delete_network_types.tpl index fc581314a4..b7eafbc3df 100644 --- a/templates/de/html/admin/admin_delete_network_types.tpl +++ b/templates/de/html/admin/admin_delete_network_types.tpl @@ -15,7 +15,7 @@ - + diff --git a/templates/de/html/admin/admin_delete_networks.tpl b/templates/de/html/admin/admin_delete_networks.tpl index b46097a157..888e8a9772 100644 --- a/templates/de/html/admin/admin_delete_networks.tpl +++ b/templates/de/html/admin/admin_delete_networks.tpl @@ -10,13 +10,13 @@ - +
- {--ADMIN_NETWORK_LIST_NOTE--} + {--ADMIN_LIST_NETWORK_NOTE--}
diff --git a/templates/de/html/admin/admin_edit_network_params.tpl b/templates/de/html/admin/admin_edit_network_params.tpl index 5095dae520..26aa5bfa6f 100644 --- a/templates/de/html/admin/admin_edit_network_params.tpl +++ b/templates/de/html/admin/admin_edit_network_params.tpl @@ -15,7 +15,7 @@ - + diff --git a/templates/de/html/admin/admin_edit_network_params_row.tpl b/templates/de/html/admin/admin_edit_network_params_row.tpl index dcb9814422..410381991e 100644 --- a/templates/de/html/admin/admin_edit_network_params_row.tpl +++ b/templates/de/html/admin/admin_edit_network_params_row.tpl @@ -10,7 +10,7 @@ {--ADMIN_NETWORK_REQUEST_PARAMETER_KEY--}: - {%pipe,generateNetworkRequestKeyOptions=$content[network_param_key]%} @@ -18,12 +18,12 @@ {--ADMIN_NETWORK_REQUEST_PARAMETER_VALUE--}: - + {--ADMIN_NETWORK_REQUEST_PARAMETER_DEFAULT--}: - + diff --git a/templates/de/html/admin/admin_edit_network_types.tpl b/templates/de/html/admin/admin_edit_network_types.tpl index 6da26978d3..dabd34c6ab 100644 --- a/templates/de/html/admin/admin_edit_network_types.tpl +++ b/templates/de/html/admin/admin_edit_network_types.tpl @@ -4,7 +4,7 @@
- {--ADMIN_NETWORK_TYPES_EDIT_TITLE--} + {--ADMIN_EDIT_NETWORK_TYPES_TITLE--}
({%network,getNetworkDataById,network_title=%network%%}) @@ -15,7 +15,7 @@ - + diff --git a/templates/de/html/admin/admin_edit_networks.tpl b/templates/de/html/admin/admin_edit_networks.tpl index 911012552b..b6320d3490 100644 --- a/templates/de/html/admin/admin_edit_networks.tpl +++ b/templates/de/html/admin/admin_edit_networks.tpl @@ -1,4 +1,8 @@
+
+ {--ADMIN_LIST_NETWORK_REFERRAL_LINK_NOTE--} +
+
@@ -10,13 +14,13 @@
- {--ADMIN_NETWORK_LIST_NOTE--} + {--ADMIN_LIST_NETWORK_NOTE--}
diff --git a/templates/de/html/admin/admin_list_network_api_translation.tpl b/templates/de/html/admin/admin_list_network_api_translation.tpl index 0e41203dd9..dacbd9c82e 100644 --- a/templates/de/html/admin/admin_list_network_api_translation.tpl +++ b/templates/de/html/admin/admin_list_network_api_translation.tpl @@ -4,7 +4,7 @@
- {--ADMIN_NETWORK_API_TRANSLATION_LIST_TITLE--} + {--ADMIN_LIST_NETWORK_API_TRANSLATION_TITLE--}
({%network,getNetworkDataById,network_title=%network%%}) @@ -29,6 +29,6 @@
- {--ADMIN_NETWORK_API_TRANSLATION_LIST_NOTE--} + {--ADMIN_LIST_NETWORK_API_TRANSLATION_NOTE--}
diff --git a/templates/de/html/admin/admin_list_network_params_row.tpl b/templates/de/html/admin/admin_list_network_params_row.tpl index 187e3f7c71..e100a7d129 100644 --- a/templates/de/html/admin/admin_list_network_params_row.tpl +++ b/templates/de/html/admin/admin_list_network_params_row.tpl @@ -6,12 +6,12 @@ {%pipe,translateNetworkTypeHandler=$content[network_type_handle]%} - {%pipe,translateNetworkRequestElement=$content[request_param_key]%} + {%pipe,translateNetworkRequestElement=$content[network_request_param_key]%} - $content[request_param_value] + $content[network_request_param_value] - $content[request_param_default] + $content[network_request_param_default] diff --git a/templates/de/html/admin/admin_list_networks.tpl b/templates/de/html/admin/admin_list_networks.tpl index 4968debcef..1e9c34472d 100644 --- a/templates/de/html/admin/admin_list_networks.tpl +++ b/templates/de/html/admin/admin_list_networks.tpl @@ -30,7 +30,7 @@
- {--ADMIN_NETWORK_LIST_NOTE--} + {--ADMIN_LIST_NETWORK_NOTE--}
diff --git a/templates/de/html/admin/admin_list_networks_row.tpl b/templates/de/html/admin/admin_list_networks_row.tpl index e57d2e72a6..4d27bfdabf 100644 --- a/templates/de/html/admin/admin_list_networks_row.tpl +++ b/templates/de/html/admin/admin_list_networks_row.tpl @@ -6,10 +6,10 @@ $content[network_short_name]:
[C|T|P|RC|EC] + href="{%url=modules.php?module=admin&what=list_network_types&network=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_TYPES_LINK_TITLE--}">T|P|RC|EC] [$content[network_title]] diff --git a/templates/de/html/admin/admin_network_request_param_added.tpl b/templates/de/html/admin/admin_network_request_param_added.tpl index aa56d9da7b..dbe8e0b127 100644 --- a/templates/de/html/admin/admin_network_request_param_added.tpl +++ b/templates/de/html/admin/admin_network_request_param_added.tpl @@ -5,7 +5,7 @@ {--ADMIN_NETWORK_REQUEST_PARAM_ADDED_TITLE--}
- Der API-Abfrageparameter $content[request_param_key]/$content[request_param_value] + Der API-Abfrageparameter $content[network_request_param_key]/$content[network_request_param_value] wurde soeben hinzugefügt. Sie sollten nun als nächstes die API-Arrayelemente hinzufügen.
diff --git a/templates/de/html/select/select_network_box.tpl b/templates/de/html/select/select_network_box.tpl index 9b91802ea8..7ac4659829 100644 --- a/templates/de/html/select/select_network_box.tpl +++ b/templates/de/html/select/select_network_box.tpl @@ -4,7 +4,7 @@
- {--ADMIN_NETWORK_SELECT_TITLE--} + {--ADMIN_SELECT_NETWORK_TITLE--}
@@ -12,7 +12,7 @@
diff --git a/templates/de/html/select/select_network_type_box.tpl b/templates/de/html/select/select_network_type_box.tpl index 719a5011df..ea431d1268 100644 --- a/templates/de/html/select/select_network_type_box.tpl +++ b/templates/de/html/select/select_network_type_box.tpl @@ -6,7 +6,7 @@
- {--ADMIN_NETWORK_TYPE_SELECT_TITLE--} + {--ADMIN_SELECT_NETWORK_TYPE_TITLE--}
@@ -21,7 +21,7 @@
diff --git a/templates/de/html/select/select_network_type_title_box.tpl b/templates/de/html/select/select_network_type_title_box.tpl index 7142fdf0e4..93f91a02b8 100644 --- a/templates/de/html/select/select_network_type_title_box.tpl +++ b/templates/de/html/select/select_network_type_title_box.tpl @@ -5,7 +5,7 @@
- {--ADMIN_NETWORK_TYPE_SELECT_TITLE--} + {--ADMIN_SELECT_NETWORK_TYPE_TITLE--}
@@ -14,7 +14,7 @@