From: Roland Häder Date: Mon, 29 Aug 2011 21:45:40 +0000 (+0000) Subject: Extension ext-network continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cc356117082319cd963082c5b60a2be542c3e7db;p=mailer.git Extension ext-network continued: - Advertising network 'Adminlose.de' added - Added SQL exports (part dumps, won't work with phpMyAdmin) for easy maintenance of all networks - Renamed all 'api translation' related templates, scripts, database columns, database table and language ids to 'array translation' for better naming - TODOs.txt updated --- diff --git a/.gitattributes b/.gitattributes index ebc68c07dc..2670175e6f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -542,6 +542,7 @@ inc/modules/admin/what-list_forced_costs.php svneol=native#text/plain inc/modules/admin/what-list_holiday.php svneol=native#text/plain inc/modules/admin/what-list_links.php svneol=native#text/plain inc/modules/admin/what-list_network_api_translation.php svneol=native#text/plain +inc/modules/admin/what-list_network_array_translation.php svneol=native#text/plain inc/modules/admin/what-list_network_params.php svneol=native#text/plain inc/modules/admin/what-list_network_types.php svneol=native#text/plain inc/modules/admin/what-list_networks.php svneol=native#text/plain @@ -1050,6 +1051,7 @@ templates/de/html/admin/admin_add_max.tpl svneol=native#text/plain templates/de/html/admin/admin_add_member_menu.tpl svneol=native#text/plain templates/de/html/admin/admin_add_network.tpl svneol=native#text/plain templates/de/html/admin/admin_add_network_api_translation.tpl svneol=native#text/plain +templates/de/html/admin/admin_add_network_array_translation.tpl svneol=native#text/plain templates/de/html/admin/admin_add_network_params.tpl svneol=native#text/plain templates/de/html/admin/admin_add_network_type.tpl svneol=native#text/plain templates/de/html/admin/admin_add_payment.tpl svneol=native#text/plain @@ -1248,6 +1250,10 @@ templates/de/html/admin/admin_email_archiv.tpl svneol=native#text/plain templates/de/html/admin/admin_email_archiv_row.tpl svneol=native#text/plain templates/de/html/admin/admin_email_nav_row.tpl svneol=native#text/plain templates/de/html/admin/admin_expert_settings_form.tpl svneol=native#text/plain +templates/de/html/admin/admin_export_network_array_translation.tpl svneol=native#text/plain +templates/de/html/admin/admin_export_network_data.tpl svneol=native#text/plain +templates/de/html/admin/admin_export_network_request_params.tpl svneol=native#text/plain +templates/de/html/admin/admin_export_network_types.tpl svneol=native#text/plain templates/de/html/admin/admin_extension_notes.tpl svneol=native#text/plain templates/de/html/admin/admin_extension_reg_form.tpl svneol=native#text/plain templates/de/html/admin/admin_extension_sql_row.tpl svneol=native#text/plain @@ -1329,6 +1335,8 @@ templates/de/html/admin/admin_list_mods_stats2_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_mods_stats_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_network_api_translation.tpl svneol=native#text/plain templates/de/html/admin/admin_list_network_api_translation_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_network_array_translation.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_network_array_translation_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_network_config.tpl svneol=native#text/plain templates/de/html/admin/admin_list_network_config_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_network_params.tpl svneol=native#text/plain @@ -1433,6 +1441,7 @@ templates/de/html/admin/admin_mods_stats2_row.tpl svneol=native#text/plain templates/de/html/admin/admin_mods_stats_row.tpl svneol=native#text/plain templates/de/html/admin/admin_network_added.tpl svneol=native#text/plain templates/de/html/admin/admin_network_api_translation_added.tpl svneol=native#text/plain +templates/de/html/admin/admin_network_array_translation_added.tpl svneol=native#text/plain templates/de/html/admin/admin_network_request_param_added.tpl svneol=native#text/plain templates/de/html/admin/admin_network_type_added.tpl svneol=native#text/plain templates/de/html/admin/admin_newsletter.tpl svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 4eeb522f47..4719b5d159 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -183,7 +183,7 @@ ./inc/template-functions.php:1543:// @TODO Lame description for this function ./inc/template-functions.php:1565: // @TODO Move this in a filter ./inc/template-functions.php:193: * @TODO On some pages this is buggy -./inc/template-functions.php:282: // @TODO Remove this sanity-check if all is fine +./inc/template-functions.php:281: // @TODO Remove these sanity checks if all is fine ./inc/template-functions.php:608:// @TODO $simple/$constants are deprecated ./inc/wrapper-functions.php:512:// @TODO Do some more sanity check here ./inc/xml-functions.php:189: // @TODO Handle characters @@ -241,6 +241,7 @@ ./inc/modules/admin/what-config_admins.php:2:// @DEPRECATED ./inc/modules/admin/what-config_email.php:2:// @DEPRECATED ./inc/modules/admin/what-config_networks.php:2:// @DEPRECATED +./inc/modules/admin/what-list_network_api_translation.php:2:// @DEPRECATED ./inc/modules/member/what-earnings.php:2:// @DEPRECATED ./inc/modules/member/what-surfbar_book.php:2:// @DEPRECATED ./inc/modules/member/what-surfbar_start.php:2:// @DEPRECATED @@ -289,6 +290,7 @@ ./templates/de/emails/register-member.tpl:1:@DEPRECATED ./templates/de/emails/sub-points.tpl:1:@DEPRECATED ./templates/de/emails/unlock-user.tpl:1:@DEPRECATED +./templates/de/html/admin/admin_add_network_api_translation.tpl:1: ./templates/de/html/admin/admin_admins_contct_select.tpl:1: ./templates/de/html/admin/admin_config_admins_del_row.tpl:1: ./templates/de/html/admin/admin_config_admins_del.tpl:1: @@ -319,6 +321,8 @@ ./templates/de/html/admin/admin_list_chk_reg.tpl:1: ./templates/de/html/admin/admin_list_country_del_row.tpl:1: ./templates/de/html/admin/admin_list_country_edit_row.tpl:1: +./templates/de/html/admin/admin_list_network_api_translation_row.tpl:1: +./templates/de/html/admin/admin_list_network_api_translation.tpl:1: ./templates/de/html/admin/admin_list_network_config_row.tpl:1: ./templates/de/html/admin/admin_list_network_config.tpl:1: ./templates/de/html/admin/admin_list_refs2.tpl:1: @@ -328,6 +332,7 @@ ./templates/de/html/admin/admin_mods_stats2.tpl:1: ./templates/de/html/admin/admin_mods_stats_row.tpl:1: ./templates/de/html/admin/admin_mods_stats.tpl:1: +./templates/de/html/admin/admin_network_api_translation_added.tpl:1: ./templates/de/html/admin/admin_payout_add_new.tpl:1: ./templates/de/html/admin/admin_reset_pass_done.tpl:1: ./templates/de/html/admin/admin_send_reset_link.tpl:1: diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 825fc944d9..f651ba3109 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -145,15 +145,15 @@ UNIQUE (`network_translation_name`)", 'Translations for array keys, generic data, DO NOT ALTER!'); // Array-Element translation tables per type/provider - addDropTableSql('network_api_translation'); - addCreateTableSql('network_api_translation', " -`network_api_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, + addDropTableSql('network_array_translation'); + addCreateTableSql('network_array_translation', " +`network_array_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, -`network_api_index` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0, +`network_array_index` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0, `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -PRIMARY KEY (`network_api_id`), -UNIQUE INDEX `provider_type_key` (`network_id`,`network_type_id`,`network_api_index`), +PRIMARY KEY (`network_array_id`), +UNIQUE INDEX `provider_type_key` (`network_id`,`network_type_id`,`network_array_index`), INDEX (`sort`)", 'Translation of API responses, generic data, DO NOT ALTER!'); @@ -291,7 +291,8 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", ('ad-hit', 'Ad-Hit.de', 'http://www.ad-hit.de?ref=41', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), ('adcity', 'AdCity.eu', 'http://www.adcity.eu?ref=38', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200), ('adgain', 'adgain.de', 'http://www.adgain.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 150), -('adkracher', 'ADkracher', 'http://www.adkracher.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 350)"); +('adkracher', 'ADkracher', 'http://www.adkracher.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 350), +('adminlose', 'Adminlose.de', 'http://www.adminlose.de/index.php?ref=2148', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200)"); // Network type handlers - A3H addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`,`network_id`,`network_type_handle`,`network_type_api_url`,`network_type_click_url`,`network_type_banner_url`,`network_type_reload_time_unit`) VALUES @@ -404,6 +405,17 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (347, 34, 'textlink_view', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/sc_textview.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h'), (348, 34, 'traffic', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h')"); + // Network type handlers - Adminlose.de + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`,`network_id`,`network_type_handle`,`network_type_api_url`,`network_type_click_url`,`network_type_banner_url`,`network_type_reload_time_unit`) VALUES +(349, 35, 'banner_view', 'http://www.adminlose.de/interface/output_bannerviews.php', 'http://www.adminlose.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adminlose.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'), +(350, 35, 'textlink_view', 'http://www.adminlose.de/interface/output_textlinkviews.php', 'http://www.adminlose.de/lose/viewtextlink.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'), +(351, 35, 'forcedbanner', 'http://www.adminlose.de/interface/output_forcedbanner.php', 'http://www.adminlose.de/lose/forcedclickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adminlose.de/lose/forcedviewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'), +(352, 35, 'forcedtextlink', 'http://www.adminlose.de/interface/output_forcedtextlink.php', 'http://www.adminlose.de/lose/forcedclicktextlink.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'), +(353, 35, 'textmail', 'http://www.adminlose.de/interface/output_paidmails.php', 'http://www.adminlose.de/lose/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'), +(354, 35, 'traffic', 'http://www.adminlose.de/interface/output_traffic.php', 'http://www.adminlose.de/lose/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'), +(355, 35, 'popup', 'http://www.adminlose.de/interface/output_popup.php', 'http://www.adminlose.de/lose/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'), +(356, 35, 'popdown', 'http://www.adminlose.de/interface/output_popup.php', 'http://www.adminlose.de/lose/popdown.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')"); + // Network type handlers - AdPaid addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`,`network_id`,`network_type_handle`,`network_type_api_url`,`network_type_click_url`,`network_type_banner_url`,`network_type_reload_time_unit`) VALUES (177, 5, 'banner', 'http://www.adpaid.de/interface/out_banner.php', 'http://www.adpaid.de/bannerklf.php?id=%CID%', 'http://www.adpaid.de/banner.php?id=%CID%', 'h'), @@ -1370,6 +1382,55 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (34, 348, 'reward', 'verguetung', NULL), (34, 348, 'sid', 'sid', NULL)"); + // Request parameters per type handler - Adminlose.de + 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 +(35, 349, 'id', 'id', 'NULL), +(35, 349, 'password', 'pw', 'NULL), +(35, 349, 'reload', 'reload', 'NULL), +(35, 349, 'reward', 'verguetung', 'NULL), +(35, 349, 'remain', 'uebrig', 'NULL), +(35, 349, 'type', 'typ', 'view'), +(35, 350, 'id', 'id', 'NULL), +(35, 350, 'password', 'pw', 'NULL), +(35, 350, 'reload', 'reload', 'NULL), +(35, 350, 'reward', 'verguetung', 'NULL), +(35, 350, 'remain', 'uebrig', 'NULL), +(35, 350, 'type', 'typ', 'view'), +(35, 351, 'id', 'id', 'NULL), +(35, 351, 'password', 'pw', 'NULL), +(35, 351, 'reload', 'reload', 'NULL), +(35, 351, 'reward', 'verguetung', 'NULL), +(35, 351, 'remain', 'uebrig', 'NULL), +(35, 352, 'id', 'id', 'NULL), +(35, 352, 'password', 'pw', 'NULL), +(35, 352, 'reload', 'reload', 'NULL), +(35, 352, 'reward', 'verguetung', 'NULL), +(35, 352, 'type', 'uebrig', 'NULL), +(35, 353, 'id', 'id', 'NULL), +(35, 353, 'password', 'pw', 'NULL), +(35, 353, 'reward', 'verguetung', 'NULL), +(35, 353, 'remain', 'uebrig', 'NULL), +(35, 353, 'minimum_stay', 'ma', 'NULL), +(35, 354, 'id', 'id', 'NULL), +(35, 354, 'password', 'pw', 'NULL), +(35, 354, 'reload', 'reload', 'NULL), +(35, 354, 'reward', 'verguetung', 'NULL), +(35, 354, 'remain', 'uebrig', 'NULL), +(35, 355, 'id', 'id', 'NULL), +(35, 355, 'password', 'pw', 'NULL), +(35, 355, 'reload', 'reload', 'NULL), +(35, 355, 'reward', 'verguetung', 'NULL), +(35, 355, 'remain', 'uebrig', 'NULL), +(35, 355, 'minimum_stay', 'ma', 'NULL), +(35, 355, 'type', 'typ', 'popup'), +(35, 356, 'id', 'id', 'NULL), +(35, 356, 'password', 'pw', 'NULL), +(35, 356, 'reload', 'reload', 'NULL), +(35, 356, 'reward', 'verguetung', 'NULL), +(35, 356, 'remain', 'uebrig', 'NULL), +(35, 356, 'minimum_stay', 'ma', 'NULL), +(35, 356, 'type', 'typ', 'popdown')"); + // Request parameters per type handler - AdPaid 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), @@ -3249,7 +3310,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (23, 166, 'sid', 'sid', NULL)"); // API array elements - A3H - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (1, 1, 7, 1), (1, 1, 2, 2), (1, 1, 3, 3), @@ -3326,7 +3387,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (1, 10, 25, 10)"); // API array elements - AbisZED-Netz - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (2, 187, 7, 1), (2, 187, 2, 2), (2, 187, 3, 3), @@ -3436,7 +3497,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (2, 201, 25, 10)"); // API array elements - Ad-Hit.de - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (31, 302, 1, 1), (31, 302, 2, 2), (31, 302, 4, 3), @@ -3521,7 +3582,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", // API array elements - AD-Magnet // API array elements - ADCity.eu - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (32, 312, 1, 1), (32, 312, 2, 2), (32, 312, 4, 3), @@ -3579,7 +3640,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", // API array elements - ADCocktail // API array elements - AdConvention - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (30, 292, 1, 1), (30, 292, 2, 2), (30, 292, 4, 3), @@ -3638,7 +3699,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (30, 301, 9, 7)"); // API array elements - adgain.de - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (33, 322, 1, 1), (33, 322, 2, 2), (33, 322, 5, 3), @@ -3723,7 +3784,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (33, 335, 9, 6)"); // API array elements - adgain.de - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (34, 336, 1, 1), (34, 336, 2, 2), (34, 336, 5, 3), @@ -3802,8 +3863,58 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (34, 348, 6, 5), (34, 348, 10, 6)"); + // API array elements - Adminlose.de + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES +(35, 349, 1, 1), +(35, 349, 2, 2), +(35, 349, 4, 3), +(35, 349, 5, 4), +(35, 349, 6, 5), +(35, 349, 10, 6), +(35, 350, 1, 1), +(35, 350, 2, 2), +(35, 350, 4, 3), +(35, 350, 5, 4), +(35, 350, 6, 5), +(35, 350, 9, 6), +(35, 351, 1, 1), +(35, 351, 2, 2), +(35, 351, 4, 3), +(35, 351, 5, 4), +(35, 351, 6, 5), +(35, 352, 1, 1), +(35, 352, 2, 2), +(35, 352, 4, 3), +(35, 352, 5, 4), +(35, 352, 6, 5), +(35, 352, 9, 6), +(35, 353, 1, 1), +(35, 353, 2, 2), +(35, 353, 5, 3), +(35, 353, 6, 4), +(35, 353, 10, 5), +(35, 353, 37, 6), +(35, 353, 9, 7), +(35, 354, 1, 1), +(35, 354, 2, 2), +(35, 354, 4, 3), +(35, 354, 5, 4), +(35, 354, 6, 5), +(35, 355, 1, 1), +(35, 355, 2, 2), +(35, 355, 4, 3), +(35, 355, 5, 4), +(35, 355, 6, 5), +(35, 355, 10, 6), +(35, 356, 1, 1), +(35, 356, 2, 2), +(35, 356, 4, 3), +(35, 356, 5, 4), +(35, 356, 6, 5), +(35, 356, 10, 6)"); + // API array elements - AdPaid - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (5, 177, 7, 1), (5, 177, 2, 2), (5, 177, 3, 3), @@ -3862,7 +3973,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (5, 185, 9, 9)"); // API array elements - Ads4.de - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (6, 14, 7, 1), (6, 14, 2, 2), (6, 14, 6, 3), @@ -3889,7 +4000,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (6, 119, 10, 6)"); // API array elements - Ads4Webbis - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (7, 17, 1, 1), (7, 17, 2, 2), (7, 17, 4, 3), @@ -3972,7 +4083,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (7, 120, 27, 8)"); // API array elements - Ads4World - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (8, 26, 1, 1), (8, 26, 2, 2), (8, 26, 4, 3), @@ -4030,7 +4141,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", // API array elements - Affiliblatt // API array elements - AllAds4You - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (10, 167, 1, 1), (10, 167, 2, 2), (10, 167, 4, 3), @@ -4104,7 +4215,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (10, 176, 40, 8)"); // API array elements - Alster-Marketing - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (11, 35, 7, 1), (11, 35, 2, 2), (11, 35, 3, 3), @@ -4214,7 +4325,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (11, 49, 6, 5)"); // API array elements - BonusSponsor - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (12, 50, 7, 1), (12, 50, 2, 2), (12, 50, 3, 3), @@ -4272,7 +4383,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (12, 62, 9, 19)"); // API array elements - City-Ads - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (24, 212, 1, 1), (24, 212, 2, 2), (24, 212, 4, 3), @@ -4355,7 +4466,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (24, 221, 27, 8)"); // API array elements - doubleads - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (26, 232, 1, 1), (26, 232, 2, 2), (26, 232, 3, 3), @@ -4465,7 +4576,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (26, 246, 25, 10)"); // API array elements - FuCoExSponsor.net - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (29, 273, 7, 1), (29, 273, 2, 2), (29, 273, 5, 3), @@ -4566,7 +4677,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (29, 289, 10, 6)"); // API array elements - Fusion-Ads - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (13, 290, 1, 1), (13, 290, 2, 2), (13, 290, 6, 3), @@ -4585,7 +4696,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (13, 291, 10, 8)"); // API array elements - GigaPromo - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (14, 102, 7, 1), (14, 102, 2, 2), (14, 102, 4, 3), @@ -4635,7 +4746,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (14, 122, 6, 5)"); // API array elements - Gold-Sponsor - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (25, 222, 1, 1), (25, 222, 2, 2), (25, 222, 4, 3), @@ -4691,7 +4802,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (25, 231, 9, 7)"); // API array elements - homeADS - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (28, 260, 1, 1), (28, 260, 2, 2), (28, 260, 3, 3), @@ -4787,7 +4898,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (28, 272, 5, 10)"); // API array elements - HPSponsor - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (15, 135, 1, 1), (15, 135, 2, 2), (15, 135, 4, 3), @@ -4870,7 +4981,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (15, 144, 27, 8)"); // API array elements - Make-Euros.de - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (16, 63, 7, 1), (16, 63, 2, 2), (16, 63, 3, 3), @@ -4968,7 +5079,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (16, 76, 9, 9)"); // API array elements - Mega-Ad - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (17, 109, 1, 1), (17, 109, 2, 2), (17, 109, 4, 3), @@ -5024,7 +5135,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (17, 123, 6, 5)"); // API array elements - Power-Promo - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (18, 78, 7, 1), (18, 78, 2, 2), (18, 78, 3, 3), @@ -5134,7 +5245,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (18, 92, 25, 10)"); // API array elements - SeCash - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (19, 93, 1, 1), (19, 93, 2, 2), (19, 93, 4, 3), @@ -5190,7 +5301,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (19, 124, 6, 5)"); // API array elements - The Swizerland Ad Network - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (20, 200, 6, 5), (20, 202, 1, 1), (20, 202, 2, 2), @@ -5273,7 +5384,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (20, 211, 27, 8)"); // API array elements - UltraPOMO - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (21, 125, 1, 1), (21, 125, 2, 2), (21, 125, 4, 3), @@ -5329,7 +5440,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (21, 134, 6, 5)"); // API array elements - VIPads - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (27, 247, 7, 1), (27, 247, 2, 2), (27, 247, 5, 3), @@ -5407,7 +5518,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (27, 259, 10, 6)"); // API array elements - Der Werbepartner.cc - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (22, 145, 1, 1), (22, 145, 2, 2), (22, 145, 6, 3), @@ -5487,7 +5598,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (22, 155, 10, 7)"); // API array elements - Yoo!Media - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`,`network_type_id`,`network_api_index`,`sort`) VALUES + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (23, 156, 1, 1), (23, 156, 2, 2), (23, 156, 3, 3), @@ -5571,7 +5682,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", addAdminMenuSql('network', 'list_networks', 'Auflisten/Verwalten', 'Entwicklereinstellungen! Hier ändern Sie die Einstellungen an den Grunddaten (Stammdaten) des jeweiligen Werbenetzwerks ab. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.', 6); addAdminMenuSql('network', 'list_network_types', 'Werbearten-Handler', 'Entwicklereinstellungen! Hier ändern Sie die Einstellungen zu den Werbearten-Handler pro Werbenetzwerken. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.', 7); addAdminMenuSql('network', 'list_network_params', 'Abfrageparameter', 'Entwicklereinstellungen! Hier stellen Sie die Abfrageparameter (wie sie genannt werden müssen, um das API-Script korrekt aufrufen zu können) ein, pro Werbenetzwerk. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.', 8); - addAdminMenuSql('network', 'list_network_api_translation', 'Antwort-Array', 'Entwicklereinstellungen! Hier stellen Sie die Zuweisungen der aus der analysierten API-Antwort Array-Elementen zu den Datenspalten ein. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.', 10); + addAdminMenuSql('network', 'list_network_array_translation', 'Antwort-Array', 'Entwicklereinstellungen! Hier stellen Sie die Zuweisungen der aus der analysierten API-Antwort Array-Elementen zu den Datenspalten ein. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.', 10); addAdminMenuSql('network', 'list_network_error_codes', 'Fehlercodes', 'Entwicklereinstellungen! Hier stellen Sie die Fehlercodes ein, die im Falle eines Fehlers pro API-Script kommen können. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.', 11); // Configuration entries @@ -5584,7 +5695,7 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", addDropTableSql('network_types'); addDropTableSql('network_request_params'); addDropTableSql('network_error_codes'); - addDropTableSql('network_api_translation'); + addDropTableSql('network_array_translation'); addDropTableSql('network_api_config'); addDropTableSql('network_types_config'); addDropTableSql('network_cache'); diff --git a/inc/language/de.php b/inc/language/de.php index 4a85b71a06..368014099e 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -1165,6 +1165,7 @@ addMessages(array( // Admin actions - submit buttons 'ADMIN_ACTION_EDIT_SUBMIT' => "Bearbeiten", + 'ADMIN_ACTION_EXPORT_SUBMIT' => "Exportieren", 'ADMIN_ACTION_CHANGE_SUBMIT' => "Editierungen ausführen", 'ADMIN_ACTION_DELETE_SUBMIT' => "Löschen", 'ADMIN_ACTION_REMOVE_SUBMIT' => "Einträge löschen", diff --git a/inc/language/network_de.php b/inc/language/network_de.php index 6d841c0138..b7456ae882 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -63,9 +63,9 @@ addMessages(array( 'ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED' => "Der API-Parameter %s wurde nicht hinzugefügt.", 'ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_CHANGED' => "Es wurden keine Änderungen an den API-Parametern ausgeführt.", 'ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_REMOVED' => "Es wurden keine API-Parameter gelöscht.", - 'ADMIN_NETWORK_API_TRANSLATION_404' => "Es wurden keine Übersetzungen zum Antwort-Array zum Werbenetzwerk %s gefunden.", - '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.", + 'ADMIN_NETWORK_ARRAY_TRANSLATION_404' => "Es wurden keine Übersetzungen zum Antwort-Array zum Werbenetzwerk %s gefunden.", + 'ADMIN_NETWORK_ARRAY_TRANSLATION_NOT_ADDED' => "Die Array-Element-Übersetzung %s wurde nicht hinzugefügt.", + 'ADMIN_NETWORK_ARRAY_TRANSLATION_ALREADY_ADDED' => "Eine Array-Element-Übersetzung %s existiert bereits.", 'ADMIN_NETWORK_TYPE_HANDLER_ALREADY_CONFIGURED' => "Kann Daten des ausgewählten Werbeart-Handlers nicht hinzufügen, da bereits Daten vorhanden sind. Haben Sie das Formular ein zweites Mal versendet?", // - Form titles 'ADMIN_ADD_NETWORK_TITLE' => "Neues Werbenetzwerk hinzufügen - Allgemeine Daten", @@ -81,8 +81,8 @@ addMessages(array( '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_ADD_NETWORK_API_TRANSLATION_TITLE' => "Werbenetzwerk verwalten - Neues API-Arrayelement hinzufügen", - 'ADMIN_LIST_NETWORK_API_TRANSLATION_TITLE' => "API-Arrayelemente auflisten und verwalten", + 'ADMIN_ADD_NETWORK_ARRAY_TRANSLATION_TITLE' => "Werbenetzwerk verwalten - Neues API-Arrayelement hinzufügen", + 'ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_TITLE' => "API-Arrayelemente auflisten und verwalten", 'ADMIN_ADD_CONFIG_NETWORK_TYPE_TITLE' => "Werbeart-Handler einrichten - {%%pipe,translateNetworkTypeHandler=%s%%}", 'ADMIN_SHOW_CONFIG_NETWORK_TYPE_TITLE' => "Eingerichteter Werbeart-Handler - {%%pipe,translateNetworkTypeHandler=%s%%}", 'ADMIN_CONFIG_NETWORK_TYPES_TITLE' => "Werbeart-Handler einrichten", @@ -92,7 +92,7 @@ addMessages(array( 'ADMIN_NETWORK_TYPES_CONFIG_LINK_TITLE' => "Weiter zur Werbart-Handler-Konfiguration", '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_ARRAY_TRANSLATION_LINK_TITLE' => "Weiter zu den Übersetzungen zum Antwort-Arrayn", 'ADMIN_LIST_NETWORK_ERROR_CODES_LINK_TITLE' => "Weiter zu den Fehlercodes", // - Buttons 'ADMIN_ADD_NETWORK_SUBMIT' => "Allgemeine Daten anlegen", @@ -106,7 +106,7 @@ addMessages(array( '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", + 'ADMIN_ADD_NETWORK_ARRAY_TRANSLATION_SUBMIT' => "API-Arrayelement hinzufügen", 'ADMIN_ADD_CONFIG_NETWORK_TYPE_SUBMIT' => "Jetzt den Werbeart-Handler einrichten", 'ADMIN_ADD_CONFIG_NETWORK_TYPE_FORM_SUBMIT' => "Werbeart-Handlerdaten hinzufügen", 'ADMIN_EDIT_CONFIG_NETWORK_TYPE_SUBMIT' => "Konfiguration ändern", @@ -115,7 +115,7 @@ addMessages(array( 'ADMIN_NETWORK_ADDED_TITLE' => "Allgemeine Werbenetzwerkdaten hinzugefügt", 'ADMIN_NETWORK_TYPES_ADDED_TITLE' => "Werbeart-Handler hinzugefügt", 'ADMIN_NETWORK_REQUEST_PARAM_ADDED_TITLE' => "API-Parameter hinzugefügt", - 'ADMIN_NETWORK_API_TRANSLATION_ADDED_TITLE' => "Array-Element-Übersetzung hinzugefügt", + 'ADMIN_NETWORK_ARRAY_TRANSLATION_ADDED_TITLE' => "Array-Element-Übersetzung hinzugefügt", // - Success nots 'ADMIN_NETWORK_UPDATED' => "Es wurden %s Einträge in den allgemeinen Daten aktualisiert.", 'ADMIN_NETWORK_REMOVED' => "Es wurden %s Einträge aus den allgemeinen Daten gelöscht.", @@ -131,8 +131,8 @@ addMessages(array( '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_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_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_ADD_NETWORK_ARRAY_TRANSLATION_NOTE' => "Fügen Sie hier weitere Array-Element-Übersetzungen zu dem ausgewählten Netzwerk und Werbeart-Handler ein.", + 'ADMIN_LIST_NETWORK_ARRAY_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_NOTE' => "Unter {--ADMIN_NETWORK_REQUIRE_ID_CARD--} ist das durch den Webnetzwerkbetreiber Verlangen einer Kopie des Personalausweises bzw. Gewerbescheins zu verstehen. Mehr dazu erfahen Sie im Forum.", 'ADMIN_CONFIG_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.", 'ADMIN_CONFIG_NETWORK_TYPES_NOTE' => "Für jede Werbeart sind unterschiedliche Reloadsperren, Mindestauffenthalte und mehr einstellbar. Damit ist es möglich, dass Sie z.B. für Forced-Banner eine kürzere/längere Reloadsperre eingeben können als für Paidmails.", @@ -140,7 +140,7 @@ addMessages(array( 'ADMIN_EDIT_CONFIG_NETWORK_TYPE_FORM_NOTE' => "{--ADMIN_ADD_CONFIG_NETWORK_TYPE_FORM_NOTE--}", // - Other messages 'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE' => "Es wurden nur die API-Parameter 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.", + 'ADMIN_LIST_NETWORK_ARRAY_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", @@ -207,7 +207,7 @@ addMessages(array( 'ADMIN_NETWORK_REQUEST_PARAMETER_MINIMUM_STAY' => "Mindestauffenthalt", 'ADMIN_NETWORK_REQUEST_PARAMETER_MAXIMUM_STAY' => "Maximaler Auffenthalt", 'ADMIN_NETWORK_REQUEST_PARAMETER_CURRENCY' => "Währung", - 'ADMIN_NETWORK_REQUEST_PARAMETER_TYPE' => "Typ (z.B. klick/view/html/text)", + 'ADMIN_NETWORK_REQUEST_PARAMETER_TYPE' => "Typ (z.B. click/view)", 'ADMIN_NETWORK_REQUEST_PARAMETER_REMAIN' => "Mindestanzahl der restlichen Klicks", 'ADMIN_NETWORK_REQUEST_PARAMETER_REWARD' => "Mindestvergütung", 'ADMIN_NETWORK_REQUEST_PARAMETER_SIZE' => "Werbemittelgrösse", @@ -215,10 +215,10 @@ addMessages(array( 'ADMIN_NETWORK_REQUEST_PARAMETER_EXTRA' => "Extra-Parameter", 'ADMIN_NETWORK_REQUEST_PARAMETER_COUNTRY' => "Ländercode", // - API array index translation - 'ADMIN_NETWORK_API_TRANSLATION_INDEX' => "Neuen Array-Index eintragen", - 'ADMIN_NETWORK_API_TRANSLATION_INDEX_TRANSLATION' => "Index-Übersetzung auswählen", - 'ADMIN_NETWORK_API_INDEX_TRANSLATION' => "Index-Übersetzung", - 'ADMIN_NETWORK_API_INDEX_SORTING' => "Index-Reihenfolge", + 'ADMIN_NETWORK_ARRAY_TRANSLATION_INDEX' => "Neuen Array-Index eintragen", + 'ADMIN_NETWORK_ARRAY_TRANSLATION_INDEX_TRANSLATION' => "Index-Übersetzung auswählen", + 'ADMIN_NETWORK_ARRAY_INDEX_TRANSLATION' => "Index-Übersetzung", + 'ADMIN_NETWORK_ARRAY_INDEX_SORTING' => "Index-Reihenfolge", // Network API configuration 'ADMIN_CONFIG_NETWORK_API_ENTER_AFFILIATE_ID' => "Ihre Affiliate oder User-Id:", 'ADMIN_CONFIG_NETWORK_API_ENTER_API_PASSWORD' => "Ihr Interface-Kennwort:", @@ -245,6 +245,16 @@ addMessages(array( 'ADMIN_CONFIG_NETWORK_TYPE_HANDLER_NOT_SAVED' => "Werbeart-Handler wurde NICHT gespeichert.", 'ADMIN_NETWORK_TYPE_HANDLER_NOT_CONFIGURED' => "Werart-Handler wurde noch nicht eingerichtet. Bitte verwenden Sie dazu das passende Formular.", 'ADMIN_CONFIG_NETWORK_TYPE_HANDLER_NOT_CHANGED' => "Werbeart-Handler wurde NICHT geändert.", + // SQL export for all network tables + 'ADMIN_EXPORT_NETWORK_NOTE' => "Verwenden Sie diesen SQL-Befehl nicht in phpMyAdmin oder anderen SQL-Clients, dieser SQL-Befehl ist zum Einfügen in das Script ext-network.php konzipiert.", + 'ADMIN_EXPORT_ALL_NETWORK_DATA_LINK' => "Gesamte Tabelle network_data zum Einfügen in ext-network.php exportieren", + 'ADMIN_EXPORT_NETWORK_DATA_TITLE' => "Tabellenexport - Netzwerkgrunddaten", + 'ADMIN_EXPORT_NETWORK_TYPES_LINK' => "Werbeart-Handler des aktuell angezeigten Werbenetzwerkes exportieren", + 'ADMIN_EXPORT_NETWORK_TYPES_TITLE' => "Tabellenexport - Werbeart-Handlerdaten", + 'ADMIN_EXPORT_NETWORK_PARAMS_LINK' => "Abfrageparameter des aktuell angezeigten Werbenetzwerkes exportieren", + 'ADMIN_EXPORT_NETWORK_REQUEST_PARAMS_TITLE' => "Tabellenexport - Abfrage-Parameter", + 'ADMIN_EXPORT_NETWORK_ARRAY_TRANSLATION_LINK' => "Antwort-Array-Elemente des aktuell angezeigten Werbenetzwerkes exportieren", + 'ADMIN_EXPORT_NETWORK_ARRAY_TRANSLATION_TITLE' => "Tabellenexport - Arrayfeldübersetzungen", // Error codes 'ADMIN_NETWORK_AFF_ID_PASS_WRONG_ERROR_CODE' => "Affiliate-Id oder -Passwort falsch", 'ADMIN_NETWORK_SITE_ID_NOT_ASSIGNED_ERROR_CODE' => "Seiten-Id nicht zugewiesen/ungültig", diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index 5c9515f24a..449e5c3b5b 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -50,34 +50,53 @@ function getCurrentNetworkId () { return $GLOBALS['current_network_id']; } -// Handle a (maybe) sent form here -function doNetworkHandleForm () { - // Was the form sent? - if ((isFormSent()) || (isFormSent('edit')) || (isFormSent('delete')) || (isFormSent('do_edit')) || (isFormSent('do_delete'))) { - // Do we have a 'do'? - if (isGetRequestElementSet('do')) { - // Process the request - doAdminNetworkProcessForm(); - } else { - // No 'do' found - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_DO_404--}'); - } +// Detects if a supported form has been sent +function detectNetworkProcessForm () { + // 'do' must be provided in URL + if (!isGetRequestElementSet('do')) { + // Not provided! + debug_report_bug(__FUNCTION__, __LINE__, 'No "do" has been provided. Please fix your templates.'); + } // END - if + + // Default is invalid + $GLOBALS['network_form_name'] = 'invalid'; + + // Now search all valid + foreach (array('ok', 'edit', 'delete', 'do_edit', 'do_delete') as $form) { + // Is it detected + if (isFormSent($form)) { + // Use this form name + $GLOBALS['network_form_name'] = $form; + + // Abort loop + break; + } // END - if + } // END - foreach + + // Has the form being detected? + if ($GLOBALS['network_form_name'] == 'invalid') { + // Not supported + debug_report_bug(__FUNCTION__, __LINE__, 'POST form could not be detected.'); } // END - if } -// Processes an admin form -function doAdminNetworkProcessForm () { - // Form really sent? - if ((!isFormSent()) && (!isFormSent('edit')) && (!isFormSent('delete')) && (!isFormSent('do_edit')) && (!isFormSent('do_delete'))) { - // Abort here - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_FORM_NOT_SENT--}'); - return; +// Handle a (maybe) sent form here +function doNetworkHandleForm () { + // Do we have a form sent? + if (countRequestPost() > 0) { + // Detect sent POST form + detectNetworkProcessForm(); } elseif (!isGetRequestElementSet('do')) { - // No 'do' found - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_DO_404--}'); + // Skip any further requests return; } + // Process the request + doAdminNetworkProcessForm(); +} + +// Processes an admin form +function doAdminNetworkProcessForm () { // Create function name $functionName = sprintf("doAdminNetworkProcess%s", capitalizeUnderscoreString(getRequestElement('do'))); @@ -111,7 +130,10 @@ function isNetworkNameValid ($name) { function isNetworkTypeHandleValid ($type, $networkId) { // Query for it $result = SQL_QUERY_ESC("SELECT `network_type_id` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE `network_id`=%s AND `network_type_handle`='%s' LIMIT 1", - array($networkId, $type), __FUNCTION__, __LINE__); + array( + $networkId, + $type + ), __FUNCTION__, __LINE__); // Does it exist? $isValid = (SQL_NUMROWS($result) == 1); @@ -127,7 +149,11 @@ function isNetworkTypeHandleValid ($type, $networkId) { function isNetworkRequestElementValid ($key, $type, $networkId) { // Query for it $result = SQL_QUERY_ESC("SELECT `network_request_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__); + array( + $networkId, + $type, + $key + ), __FUNCTION__, __LINE__); // Does it exist? $isValid = (SQL_NUMROWS($result) == 1); @@ -140,10 +166,14 @@ function isNetworkRequestElementValid ($key, $type, $networkId) { } // Checks wether the given network API array translation -function isNetworkApiTranslationValid ($key, $type, $networkId) { +function isNetworkArrayTranslationValid ($key, $type, $networkId) { // Query for it - $result = SQL_QUERY_ESC("SELECT `network_api_id` FROM `{?_MYSQL_PREFIX?}_network_api_translation` WHERE `network_id`=%s AND `network_type_id`=%s AND `network_api_index`='%s' LIMIT 1", - array($networkId, $type, $key), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `network_array_id` FROM `{?_MYSQL_PREFIX?}_network_array_translation` WHERE `network_id`=%s AND `network_type_id`=%s AND `network_array_index`='%s' LIMIT 1", + array( + $networkId, + $type, + $key + ), __FUNCTION__, __LINE__); // Does it exist? $isValid = (SQL_NUMROWS($result) == 1); @@ -172,7 +202,7 @@ function getNetworkDataById ($networkId, $column = '') { $GLOBALS['network_data'][$networkId] = array(); // Query for the network data - $result = SQL_QUERY_ESC("SELECT + $result = SQL_QUERY_ESC('SELECT `network_id`, `network_short_name`, `network_title`, @@ -187,7 +217,7 @@ FROM `{?_MYSQL_PREFIX?}_network_data` WHERE `network_id`=%s -LIMIT 1", +LIMIT 1', array(bigintval($networkId)), __FUNCTION__, __LINE__); // Do we have an entry? @@ -227,7 +257,7 @@ function getNetworkDataByTypeId ($networkId, $column = '') { $GLOBALS['network_data'][$networkId] = array(); // Query for the network data - $result = SQL_QUERY_ESC("SELECT + $result = SQL_QUERY_ESC('SELECT d.`network_id`, d.`network_short_name`, d.`network_title`, @@ -250,7 +280,7 @@ ON d.`network_id`=t.`network_id` WHERE t.`network_type_id`=%s -LIMIT 1", +LIMIT 1', array(bigintval($networkId)), __FUNCTION__, __LINE__); // Do we have an entry? @@ -285,8 +315,8 @@ function getNetworkTypeDataById ($networkId) { $GLOBALS['network_type_data'][$networkId] = array(); // Query for the network data - $result = SQL_QUERY_ESC("SELECT - `network_type_id` + $result = SQL_QUERY_ESC('SELECT + `network_type_id`, `network_id`, `network_type_handle`, `network_type_api_url`, @@ -296,7 +326,7 @@ FROM `{?_MYSQL_PREFIX?}_network_types` WHERE `network_type_id`=%s -LIMIT 1", +LIMIT 1', array(bigintval($networkId)), __FUNCTION__, __LINE__); // Do we have an entry? @@ -324,7 +354,7 @@ function getNetworkRequestParamsDataById ($networkId) { $networkRequestData = array(); // Query for the network data - $result = SQL_QUERY_ESC("SELECT + $result = SQL_QUERY_ESC('SELECT `network_request_param_id`, `network_id`, `network_type_id`, @@ -335,7 +365,7 @@ FROM `{?_MYSQL_PREFIX?}_network_request_params` WHERE `network_request_param_id`=%s -LIMIT 1", +LIMIT 1', array(bigintval($networkId)), __FUNCTION__, __LINE__); // Do we have an entry? @@ -391,7 +421,12 @@ function doNetworkUpdateParamsByArray ($networkId, $networkParamData) { function doAdminRemoveNetworkEntry ($table, $column, $networkId, $limit = 1) { // Remove the entry SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_network_%s` WHERE `%s`=%s LIMIT %s", - array($table, $column, $networkId, $limit), __FUNCTION__, __LINE__); + array( + $table, + $column, + $networkId, + $limit + ), __FUNCTION__, __LINE__); // Return affected rows return SQL_AFFECTEDROWS(); @@ -444,14 +479,15 @@ function generateAdminNetworkTypeList ($networkId) { $content = ''; // Query all types of this network - $result = SQL_QUERY_ESC("SELECT - `network_type_id`,`network_type_handle` + $result = SQL_QUERY_ESC('SELECT + `network_type_id`, + `network_type_handle` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE `network_id`=%s ORDER BY - `network_type_handle` ASC", + `network_type_handle` ASC', array( bigintval($networkId) ), __FUNCTION__, __LINE__); @@ -725,19 +761,21 @@ function translateNetworkRequestElement ($param) { // Translates API index function translateNetworkApiIndex ($index) { // Do we have cache? - if (!isset($GLOBALS['network_api_index'])) { + if (!isset($GLOBALS['network_array_index'])) { // Get an array of all API array indexes - $GLOBALS['network_api_index'] = array(); + $GLOBALS['network_array_index'] = array(); // Get all entries $result = SQL_QUERY('SELECT - `network_api_id`,`network_api_index`,`network_translation_name` + `network_array_id`, + `network_array_index`, + `network_translation_name` FROM - `{?_MYSQL_PREFIX?}_network_api_translation` + `{?_MYSQL_PREFIX?}_network_array_translation` INNER JOIN `{?_MYSQL_PREFIX?}_network_translations` ON - `network_api_index`=`network_translation_id` + `network_array_index`=`network_translation_id` ORDER BY `sort` ASC', __FUNCTION__, __LINE__); @@ -746,7 +784,7 @@ ORDER BY // Get all entries while ($row = SQL_FETCHARRAY($result)) { // Add it to our global array - $GLOBALS['network_api_index'][$row['network_api_index']] = $row; + $GLOBALS['network_array_index'][$row['network_array_index']] = $row; } // END - while } // END - if @@ -758,9 +796,9 @@ ORDER BY $name = 'unknown'; // Is the entry there? - if (isset($GLOBALS['network_api_index'][$index])) { + if (isset($GLOBALS['network_array_index'][$index])) { // Then get the name - $name = $GLOBALS['network_api_index'][$index]['network_translation_name']; + $name = $GLOBALS['network_array_index'][$index]['network_translation_name']; } // END - if // Return translation @@ -868,16 +906,8 @@ function doAdminNetworkProcessHandleNetwork () { // Do we have found the network? if (count($networkData) > 0) { - if (isFormSent('edit')) { - // Add row template for editing - $OUT .= loadTemplate('admin_edit_networks_row', true, $networkData); - } elseif (isFormSent('delete')) { - // Add row template for deleting - $OUT .= loadTemplate('admin_delete_networks_row', true, $networkData); - } else { - // Problem! - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); - } + // Add row template with given form name + $OUT .= loadTemplate('admin_' . $GLOBALS['network_form_name'] . '_networks_row', true, $networkData); } // END - if } // END - if } // END - foreach @@ -885,14 +915,7 @@ function doAdminNetworkProcessHandleNetwork () { // If we have no rows, we don't need to display the edit form if (!empty($OUT)) { // Output main template - if (isFormSent('edit')) { - loadTemplate('admin_edit_networks', false, $OUT); - } elseif (isFormSent('delete')) { - loadTemplate('admin_delete_networks', false, $OUT); - } else { - // Problem! - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); - } + loadTemplate('admin_' . $GLOBALS['network_form_name'] . '_networks', false, $OUT); // Don't display the list/add new form $GLOBALS['network_display'] = false; @@ -1320,11 +1343,11 @@ function doAdminNetworkProcessAddNetworkParam () { } // Adds a API response array entry -function doAdminNetworkProcessAddNetworkApiTranslation () { +function doAdminNetworkProcessAddNetworkArrayTranslation () { // Is the request parameter already used with given network? - if (isNetworkApiTranslationValid(postRequestElement('network_api_index'), postRequestElement('network_type_id'), getRequestElement('network_id'))) { + if (isNetworkArrayTranslationValid(postRequestElement('network_array_index'), postRequestElement('network_type_id'), getRequestElement('network_id'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_API_TRANSLATION_ALREADY_ADDED=' . postRequestElement('network_api_index') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_ALREADY_ADDED=' . postRequestElement('network_array_index') . '%}'); // ... so abort here return false; @@ -1339,23 +1362,23 @@ function doAdminNetworkProcessAddNetworkApiTranslation () { // Add sorting setPostRequestElement('sort', (countSumTotalData( bigintval(postRequestElement('network_id')), - 'network_api_translation', - 'network_api_id', + 'network_array_translation', + 'network_array_id', 'network_id', true, sprintf(" AND `network_type_id`=%s", bigintval(postRequestElement('network_type_id'))) ) + 1)); // Add the whole request to database - SQL_QUERY(getInsertSqlFromArray(postRequestArray(), 'network_api_translation'), __FUNCTION__, __LINE__); + SQL_QUERY(getInsertSqlFromArray(postRequestArray(), 'network_array_translation'), __FUNCTION__, __LINE__); // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added - loadTemplate('admin_network_api_translation_added', false, postRequestArray()); + loadTemplate('admin_network_array_translation_added', false, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_API_TRANSLATION_NOT_ADDED=' . postRequestElement('network_api_index') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_NOT_ADDED=' . postRequestElement('network_array_index') . '%}'); } } @@ -1527,5 +1550,263 @@ function doExpressionNetwork ($data) { return $code; } +// ---------------------------------------------------------------------------- +// Call-back functions for exporting data +// ---------------------------------------------------------------------------- + +// Callback function to export network tables +function doAdminNetworkProcessExport () { + // Init table with all valid what->table entries + $validExports = array( + // General network data + 'list_networks' => 'network_data', + // Network type handler + 'list_network_types' => 'network_types', + // Network request parameter + 'list_network_params' => 'network_request_params', + // Network API response array index translation + 'list_network_array_translation' => 'network_array_translation', + ); + + // Is the 'what' key valid? + if (!isset($validExports[getWhat()])) { + // Not valid + debug_report_bug(__FUNCTION__, __LINE__, 'what=' . getWhat() . ' - not supported'); + } // END - if + + // Generate call-back, some tables require to export not all columns + $callbackName = 'doAdminNetworkExport' . capitalizeUnderscoreString($validExports[getWhat()]); + + // Is the call-back function there? + if (!function_exists($callbackName)) { + // No, this is really bad + debug_report_bug(__FUNCTION__, __LINE__, 'Invalid call-back function ' . $callbackName . ' detected.'); + } elseif (isset($GLOBALS[__FUNCTION__][$callbackName])) { + // Already called! + debug_report_bug(__FUNCTION__, __LINE__, 'Double-call of export function ' . $callbackName . ' detected.'); + } + + // Call the function + call_user_func($callbackName); + + // Mark it as called + $GLOBALS[__FUNCTION__][$callbackName] = true; + + // Don't display the list/add new form + $GLOBALS['network_display'] = false; +} + +// Exports (and displays) the table 'network_data' +function doAdminNetworkExportNetworkData () { + // Query for all networks + $result = SQL_QUERY('SELECT + `network_short_name`, + `network_title`, + `network_reflink`, + `network_data_separator`, + `network_row_separator`, + `network_request_type`, + `network_charset`, + `network_require_id_card`, + `network_query_amount` +FROM + `{?_MYSQL_PREFIX?}_network_data` +ORDER BY + `network_id` ASC', + __FUNCTION__, __LINE__); + + // Start an empty SQL query + $SQL = ''; + + // Load all entries + while ($content = SQL_FETCHARRAY($result)) { + // Add row + $SQL .= "
('" .
+			$content['network_short_name'] . "', '" .
+			$content['network_title'] . "', '" .
+			$content['network_reflink'] . "', '" .
+			$content['network_data_separator'] . "', '" .
+			$content['network_row_separator'] . "', '" .
+			$content['network_request_type'] . "', '" .
+			$content['network_charset'] . "', '" .
+			$content['network_require_id_card'] . "', " .
+			$content['network_query_amount'] . '),
'; + } // END - while + + // Remove last commata and close braces + $SQL = substr($SQL, 0, -7) . ''; + + // Free result + SQL_FREERESULT($result); + + // Output the SQL query + loadTemplate('admin_export_network_data', false, $SQL); +} + +// Exports (and displays) the table 'network_types' +function doAdminNetworkExportNetworkTypes () { + // 'network_id' must be set + if (!isGetRequestElementSet('network_id')) { + // Only network handlers of one network will be exported per time + debug_report_bug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); + } // END - if + + // Get all network types of given network + $result = SQL_QUERY_ESC('SELECT + `network_type_id`, + `network_id`, + `network_type_handle`, + `network_type_api_url`, + `network_type_click_url`, + `network_type_banner_url` +FROM + `{?_MYSQL_PREFIX?}_network_types` +WHERE + `network_id`=%s +ORDER BY + `network_type_id` ASC', + array( + bigintval(getRequestElement('network_id')) + ), __FUNCTION__, __LINE__); + + // Start an empty SQL query + $SQL = "
INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`,`network_id`,`network_type_handle`,`network_type_api_url`,`network_type_click_url`,`network_type_banner_url`) VALUES\n";
+
+	// Load all entries
+	while ($content = SQL_FETCHARRAY($result)) {
+		// Add row
+		$SQL .= '(' .
+			$content['network_type_id'] . ', ' .
+			$content['network_id'] . ", '" .
+			$content['network_type_handle'] . "', '" .
+			$content['network_type_api_url'] . "', '" .
+			$content['network_type_click_url'] . "', ";
+		
+		// Is the column NULL?
+		if (is_null($content['network_type_banner_url'])) {
+			// Column is NULL
+			$SQL .= "NULL),\n";
+		} else {
+			// Column is set
+			$SQL .= $content['network_type_banner_url'] . "'),\n";
+		}
+	} // END - while
+
+	// Remove last commata and close braces
+	$SQL = substr($SQL, 0, -1) . '
'; + + // Free result + SQL_FREERESULT($result); + + // Output the SQL query + loadTemplate('admin_export_network_types', false, $SQL); +} + +// Exports (and displays) the table 'network_request_params' +function doAdminNetworkExportNetworkRequestParams () { + // 'network_id' must be set + if (!isGetRequestElementSet('network_id')) { + // Only network request parameters of one network will be exported per time + debug_report_bug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); + } // END - if + + // Get all network types of given network + $result = SQL_QUERY_ESC('SELECT + `network_id`, + `network_type_id`, + `network_request_param_key`, + `network_request_param_value`, + `network_request_param_default` +FROM + `{?_MYSQL_PREFIX?}_network_request_params` +WHERE + `network_id`=%s +ORDER BY + `network_type_id` ASC , + `network_request_param_id` ASC', + array( + bigintval(getRequestElement('network_id')) + ), __FUNCTION__, __LINE__); + + // Start an empty SQL query + $SQL = "
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\n";
+
+	// Load all entries
+	while ($content = SQL_FETCHARRAY($result)) {
+		// Add row
+		$SQL .= '(' .
+			$content['network_id'] . ', ' .
+			$content['network_type_id'] . ", '" .
+			$content['network_request_param_key'] . "', '" .
+			$content['network_request_param_value'] . "', '";
+		
+		// Is the column NULL?
+		if (is_null($content['network_request_param_default'])) {
+			// Column is NULL
+			$SQL .= "NULL),\n";
+		} else {
+			// Column is set
+			$SQL .= $content['network_request_param_default'] . "'),\n";
+		}
+	} // END - while
+
+	// Remove last commata and close braces
+	$SQL = substr($SQL, 0, -2) . '
'; + + // Free result + SQL_FREERESULT($result); + + // Output the SQL query + loadTemplate('admin_export_network_request_params', false, $SQL); +} + +// Exports (and displays) the table 'network_array_translation' +function doAdminNetworkExportNetworkArrayTranslation () { + // 'network_id' must be set + if (!isGetRequestElementSet('network_id')) { + // Only network API array index translations of one network will be exported per time + debug_report_bug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); + } // END - if + + // Get all network types of given network + $result = SQL_QUERY_ESC('SELECT + `network_id`, + `network_type_id`, + `network_array_index`, + `sort` +FROM + `{?_MYSQL_PREFIX?}_network_array_translation` +WHERE + `network_id`=%s +ORDER BY + `network_type_id` ASC, + `sort` ASC', + array( + bigintval(getRequestElement('network_id')) + ), __FUNCTION__, __LINE__); + + // Start an empty SQL query + $SQL = "
INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES\n";
+
+	// Load all entries
+	while ($content = SQL_FETCHARRAY($result)) {
+		// Add row
+		$SQL .= '(' .
+			$content['network_id'] . ', ' .
+			$content['network_type_id'] . ', ' .
+			$content['network_array_index'] . ', ' .
+			$content['sort'] . "),\n";
+	} // END - while
+
+	// Remove last commata and close braces
+	$SQL = substr($SQL, 0, -2) . '
'; + + // Free result + SQL_FREERESULT($result); + + // Output the SQL query + loadTemplate('admin_export_network_array_translation', false, $SQL); +} + // [EOF] ?> diff --git a/inc/modules/admin/what-list_network_api_translation.php b/inc/modules/admin/what-list_network_api_translation.php index aebd427023..f551ef47b7 100644 --- a/inc/modules/admin/what-list_network_api_translation.php +++ b/inc/modules/admin/what-list_network_api_translation.php @@ -1,140 +1,3 @@ diff --git a/inc/modules/admin/what-list_network_array_translation.php b/inc/modules/admin/what-list_network_array_translation.php new file mode 100644 index 0000000000..c8c16af5ef --- /dev/null +++ b/inc/modules/admin/what-list_network_array_translation.php @@ -0,0 +1,144 @@ + diff --git a/inc/template-functions.php b/inc/template-functions.php index 06fd3db008..fca5522892 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -278,14 +278,18 @@ function outputRawCode ($htmlCode) { // Load a template file and return it's content (only it's name; do not use ' or ") function loadTemplate ($template, $return = false, $content = array(), $compileCode = true) { + // @TODO Remove these sanity checks if all is fine if (!is_bool($return)) { - // @TODO Remove this sanity-check if all is fine + // $return has to be boolean debug_report_bug(__FUNCTION__, __LINE__, 'return[] is not bool (' . gettype($return) . ')'); } elseif (!is_string($template)) { // $template has to be string debug_report_bug(__FUNCTION__, __LINE__, 'template[] is not string (' . gettype($template) . ')'); } + // Init returned content + $ret = ''; + // Set current template $GLOBALS['current_template'] = $template; @@ -297,9 +301,6 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC // Make all template names lowercase $template = strtolower($template); - // Init some data - $ret = ''; - // Base directory $basePath = sprintf("%stemplates/%s/html/", getPath(), getLanguage()); $extraPath = detectExtraTemplatePath($template); @@ -322,7 +323,6 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC $GLOBALS['tpl_content'][$template] = readFromFile($FQFN); // Do we have to compile the code? - $ret = ''; if ((isInString('$', $GLOBALS['tpl_content'][$template])) || (isInString('{--', $GLOBALS['tpl_content'][$template])) || (isInString('{?', $GLOBALS['tpl_content'][$template])) || (isInString('{%', $GLOBALS['tpl_content'][$template]))) { // Normal HTML output? if ((isHtmlOutputMode()) && (substr($template, 0, 3) != 'js_')) { 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 367d53e5ed..11f5d85d80 100644 --- a/templates/de/html/admin/admin_add_network_api_translation.tpl +++ b/templates/de/html/admin/admin_add_network_api_translation.tpl @@ -1,40 +1 @@ -
-
- - - - - - - - - - - - - - - -
- {--ADMIN_ADD_NETWORK_API_TRANSLATION_TITLE--} - -
{--ADMIN_SELECT_NETWORK_TYPE--}: - -
{--ADMIN_NETWORK_API_TRANSLATION_INDEX_TRANSLATION--}: - -
-
-
- -
- {--ADMIN_ADD_NETWORK_API_TRANSLATION_NOTE--} -
+ diff --git a/templates/de/html/admin/admin_add_network_array_translation.tpl b/templates/de/html/admin/admin_add_network_array_translation.tpl new file mode 100644 index 0000000000..8c30155e63 --- /dev/null +++ b/templates/de/html/admin/admin_add_network_array_translation.tpl @@ -0,0 +1,40 @@ +
+
+ + + + + + + + + + + + + + + +
+ {--ADMIN_ADD_NETWORK_ARRAY_TRANSLATION_TITLE--} + +
{--ADMIN_SELECT_NETWORK_TYPE--}: + +
{--ADMIN_NETWORK_ARRAY_TRANSLATION_INDEX_TRANSLATION--}: + +
+
+
+ +
+ {--ADMIN_ADD_NETWORK_ARRAY_TRANSLATION_NOTE--} +
diff --git a/templates/de/html/admin/admin_export_network_array_translation.tpl b/templates/de/html/admin/admin_export_network_array_translation.tpl new file mode 100644 index 0000000000..2cfec08031 --- /dev/null +++ b/templates/de/html/admin/admin_export_network_array_translation.tpl @@ -0,0 +1,17 @@ +
+
+ +
+ {--ADMIN_EXPORT_NETWORK_ARRAY_TRANSLATION_TITLE--} +
+ +
+ $content +
+ + + +
+
diff --git a/templates/de/html/admin/admin_export_network_data.tpl b/templates/de/html/admin/admin_export_network_data.tpl new file mode 100644 index 0000000000..e9ed6aacef --- /dev/null +++ b/templates/de/html/admin/admin_export_network_data.tpl @@ -0,0 +1,17 @@ +
+
+ +
+ {--ADMIN_EXPORT_NETWORK_DATA_TITLE--} +
+ +
+ $content +
+ + + +
+
diff --git a/templates/de/html/admin/admin_export_network_request_params.tpl b/templates/de/html/admin/admin_export_network_request_params.tpl new file mode 100644 index 0000000000..6f14727656 --- /dev/null +++ b/templates/de/html/admin/admin_export_network_request_params.tpl @@ -0,0 +1,17 @@ +
+
+ +
+ {--ADMIN_EXPORT_NETWORK_REQUEST_PARAMS_TITLE--} +
+ +
+ $content +
+ + + +
+
diff --git a/templates/de/html/admin/admin_export_network_types.tpl b/templates/de/html/admin/admin_export_network_types.tpl new file mode 100644 index 0000000000..8525040578 --- /dev/null +++ b/templates/de/html/admin/admin_export_network_types.tpl @@ -0,0 +1,17 @@ +
+
+ +
+ {--ADMIN_EXPORT_NETWORK_TYPES_TITLE--} +
+ +
+ $content +
+ + + +
+
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 41e47eabc7..11f5d85d80 100644 --- a/templates/de/html/admin/admin_list_network_api_translation.tpl +++ b/templates/de/html/admin/admin_list_network_api_translation.tpl @@ -1,34 +1 @@ -
-
- - - - - - - - - - - $content - - - -
-
- {--ADMIN_LIST_NETWORK_API_TRANSLATION_TITLE--} -
- -
{--ID_SELECT--}{--ADMIN_NETWORK_TYPES_HANDLE--}{--ADMIN_NETWORK_API_INDEX_TRANSLATION--}{--ADMIN_NETWORK_API_INDEX_SORTING--}
-
- -
- {--ADMIN_LIST_NETWORK_API_TRANSLATION_NOTE--} -
-
+ diff --git a/templates/de/html/admin/admin_list_network_api_translation_row.tpl b/templates/de/html/admin/admin_list_network_api_translation_row.tpl index 9aa47268fe..11f5d85d80 100644 --- a/templates/de/html/admin/admin_list_network_api_translation_row.tpl +++ b/templates/de/html/admin/admin_list_network_api_translation_row.tpl @@ -1,14 +1 @@ - - - - - - {%pipe,translateNetworkTypeHandler=$content[network_type_handle]%} - - - {%pipe,translateNetworkApiIndex=$content[network_api_index]%} - - - $content[sort] - - + diff --git a/templates/de/html/admin/admin_list_network_array_translation.tpl b/templates/de/html/admin/admin_list_network_array_translation.tpl new file mode 100644 index 0000000000..8c85ec6c2b --- /dev/null +++ b/templates/de/html/admin/admin_list_network_array_translation.tpl @@ -0,0 +1,38 @@ +
+
+ + + + + + + + + + + $content + + + +
+
+ {--ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_TITLE--} +
+ +
{--ID_SELECT--}{--ADMIN_NETWORK_TYPES_HANDLE--}{--ADMIN_NETWORK_ARRAY_INDEX_TRANSLATION--}{--ADMIN_NETWORK_ARRAY_INDEX_SORTING--}
+
+ + + +
+ {--ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_NOTE--} +
+
diff --git a/templates/de/html/admin/admin_list_network_array_translation_row.tpl b/templates/de/html/admin/admin_list_network_array_translation_row.tpl new file mode 100644 index 0000000000..201a4bfad5 --- /dev/null +++ b/templates/de/html/admin/admin_list_network_array_translation_row.tpl @@ -0,0 +1,14 @@ + + + + + + {%pipe,translateNetworkTypeHandler=$content[network_type_handle]%} + + + {%pipe,translateNetworkApiIndex=$content[network_array_index]%} + + + $content[sort] + + diff --git a/templates/de/html/admin/admin_list_network_params.tpl b/templates/de/html/admin/admin_list_network_params.tpl index 4e8752151f..bb75968374 100644 --- a/templates/de/html/admin/admin_list_network_params.tpl +++ b/templates/de/html/admin/admin_list_network_params.tpl @@ -29,6 +29,10 @@ +
+ {--ADMIN_EXPORT_NETWORK_PARAMS_LINK--} +
+
{--ADMIN_NETWORK_REQUEST_PARAMETER_LIST_NOTE--}
diff --git a/templates/de/html/admin/admin_list_network_types.tpl b/templates/de/html/admin/admin_list_network_types.tpl index 7396820553..f62f937072 100644 --- a/templates/de/html/admin/admin_list_network_types.tpl +++ b/templates/de/html/admin/admin_list_network_types.tpl @@ -30,6 +30,10 @@ +
+ {--ADMIN_EXPORT_NETWORK_TYPES_LINK--} +
+
{--ADMIN_NETWORK_TYPES_LIST_NOTE--}
diff --git a/templates/de/html/admin/admin_list_networks.tpl b/templates/de/html/admin/admin_list_networks.tpl index 3a5c50c491..b9e5f01463 100644 --- a/templates/de/html/admin/admin_list_networks.tpl +++ b/templates/de/html/admin/admin_list_networks.tpl @@ -34,6 +34,10 @@ $content +
+ {--ADMIN_EXPORT_ALL_NETWORK_DATA_LINK--} +
+
{--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 08dd3e33ed..4648a759e1 100644 --- a/templates/de/html/admin/admin_list_networks_row.tpl +++ b/templates/de/html/admin/admin_list_networks_row.tpl @@ -9,7 +9,7 @@ href="{%url=modules.php?module=admin&what=config_network_types&network_id=$content[network_id]%}" title="{--ADMIN_NETWORK_TYPES_CONFIG_LINK_TITLE--}">TC|T|P|RC|RC|EC] diff --git a/templates/de/html/admin/admin_network_api_translation_added.tpl b/templates/de/html/admin/admin_network_api_translation_added.tpl index b363121c97..11f5d85d80 100644 --- a/templates/de/html/admin/admin_network_api_translation_added.tpl +++ b/templates/de/html/admin/admin_network_api_translation_added.tpl @@ -1,15 +1 @@ -
- -
-
- {--ADMIN_NETWORK_API_TRANSLATION_ADDED_TITLE--} -
-
- Die Array-Element-Übersetzung $content[network_api_index] wurde - soeben hinzugefügt. Sie sollten nun als nächstes die Fehlercodes - hinzufügen. -
-
- -
+ diff --git a/templates/de/html/admin/admin_network_array_translation_added.tpl b/templates/de/html/admin/admin_network_array_translation_added.tpl new file mode 100644 index 0000000000..26c39fda43 --- /dev/null +++ b/templates/de/html/admin/admin_network_array_translation_added.tpl @@ -0,0 +1,15 @@ +
+ +
+
+ {--ADMIN_NETWORK_ARRAY_TRANSLATION_ADDED_TITLE--} +
+
+ Die Array-Element-Übersetzung $content[network_array_index] wurde + soeben hinzugefügt. Sie sollten nun als nächstes die Fehlercodes + hinzufügen. +
+
+ +
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 0a6f8f8116..759b43578a 100644 --- a/templates/de/html/admin/admin_network_request_param_added.tpl +++ b/templates/de/html/admin/admin_network_request_param_added.tpl @@ -7,7 +7,7 @@
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. + API-Arrayelemente hinzufügen.