Mailer project rwritten:
authorRoland Häder <roland@mxchange.org>
Sun, 6 Jan 2013 20:25:35 +0000 (20:25 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 6 Jan 2013 20:25:35 +0000 (20:25 +0000)
- Extension ext-network continued:
  + More missing type handlers added
  + Also array element translations added
  + Made API query generally working
  + Added missing what-config_network.php to allow configuration
  + Many other improvements
- Used correct MIME type for JavaScripts (text/javascript)
- Many other rewrites
- TODOs.txt updated

190 files changed:
.gitattributes
DOCS/TODOs.txt
DOCS/de/network/README.txt
api.php [new file with mode: 0644]
beg.php
birthday_confirm.php
doubler.php
inc/ajax/ajax_
inc/ajax/ajax_admin.php
inc/ajax/ajax_installer.php
inc/callback-functions.php
inc/classes/primera_api.class.php
inc/classes/rdf.class.php
inc/config-functions.php
inc/config-global.php
inc/db/lib-mysql3.php
inc/email-functions.php
inc/expression-functions.php
inc/extensions-functions.php
inc/extensions/ext-network.php
inc/filter/coupon_filter.php
inc/filters.php
inc/functions.php
inc/http-functions.php
inc/js/js-admin_ajax.php
inc/js/js-install_ajax.php
inc/js/js-surfbar_frame_top.php
inc/js/js-surfbar_member_edit.php
inc/language-functions.php
inc/language/de.php
inc/language/network_de.php
inc/libs/admins_functions.php
inc/libs/autopurge_functions.php
inc/libs/beg_functions.php
inc/libs/bonus_functions.php
inc/libs/doubler_functions.php
inc/libs/forced_functions.php
inc/libs/network_functions.php
inc/libs/rallye_functions.php
inc/libs/refback_functions.php
inc/libs/register_functions.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/libs/task_functions.php
inc/libs/user_functions.php
inc/libs/wernis_functions.php
inc/libs/yoomedia_functions.php
inc/module-functions.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_holiday.php
inc/modules/admin/what-config_network.php [new file with mode: 0644]
inc/modules/admin/what-config_network_api.php
inc/modules/admin/what-config_network_types.php
inc/modules/admin/what-config_order.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-config_refid.php
inc/modules/admin/what-config_removeip.php
inc/modules/admin/what-config_surfbar.php
inc/modules/admin/what-config_yoomedia.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-list_autopurge.php
inc/modules/admin/what-list_network_array_translation.php
inc/modules/admin/what-list_network_request_params.php
inc/modules/admin/what-list_network_types.php
inc/modules/admin/what-list_network_vcheck_params.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-query_network_apis.php
inc/modules/admin/what-unlock_sponsor.php
inc/modules/admin/what-updates.php
inc/modules/admin/what-user_contct.php
inc/modules/admin/what-usr_online.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/member/what-book_surfbar.php
inc/modules/member/what-order.php
inc/modules/member/what-reflinks.php
inc/modules/member/what-transfer.php
inc/modules/member/what-unconfirmed.php
inc/monthly/monthly_beg.php
inc/mysql-manager.php
inc/pool/pool-user.php
inc/purge/purge-general.php
inc/purge/purge-inact.php
inc/referral-functions.php
inc/revision-functions.php
inc/session-functions.php
inc/sql-functions.php
inc/template-functions.php
inc/wrapper-functions.php
inc/xml-functions.php
install/tables.sql
js/admin-network-query-api.js [new file with mode: 0644]
js/ajax-common.js
js/ajax-loader.js
js/ajax-test.js
js/core-common.js
js/install-common.js
js/menu-common.js
mailid.php
mailid_top.php
ref.php
show_bonus.php
surfbar.php
templates/de/emails/guest/guest_register_done.tpl
templates/de/emails/guest/guest_request_confirm.tpl
templates/de/emails/member/member_bonus_pool_normal.tpl
templates/de/emails/member/member_order_accepted.tpl
templates/de/emails/member/member_order_deleted.tpl
templates/de/emails/member/member_order_normal.tpl
templates/de/emails/member/member_order_rejected.tpl
templates/de/emails/member/member_profile.tpl
templates/de/emails/member/member_user_deleted.tpl
templates/de/emails/member/member_user_locked.tpl
templates/de/emails/member/member_user_pool_done.tpl
templates/de/emails/member/member_user_pool_normal.tpl
templates/de/emails/member/member_user_unlocked.tpl
templates/de/emails/sponsor/sponsor_deleted.tpl
templates/de/emails/sponsor/sponsor_locked.tpl
templates/de/html/admin/admin_add_config_network_type_form.tpl
templates/de/html/admin/admin_add_network_array_translation.tpl
templates/de/html/admin/admin_add_network_request_param.tpl
templates/de/html/admin/admin_add_network_type.tpl
templates/de/html/admin/admin_add_network_vcheck_param.tpl
templates/de/html/admin/admin_ajax_main.tpl
templates/de/html/admin/admin_ajax_windows.tpl [new file with mode: 0644]
templates/de/html/admin/admin_config_network.tpl [new file with mode: 0644]
templates/de/html/admin/admin_config_network_api.tpl
templates/de/html/admin/admin_config_network_types.tpl
templates/de/html/admin/admin_delete_network_array_translation.tpl
templates/de/html/admin/admin_delete_network_request_params.tpl
templates/de/html/admin/admin_delete_network_types.tpl
templates/de/html/admin/admin_delete_network_types_row.tpl
templates/de/html/admin/admin_edit_config_network_type_form.tpl
templates/de/html/admin/admin_edit_network_array_translation.tpl
templates/de/html/admin/admin_edit_network_request_params.tpl
templates/de/html/admin/admin_edit_network_types.tpl
templates/de/html/admin/admin_list_network_array_translation.tpl
templates/de/html/admin/admin_list_network_data.tpl
templates/de/html/admin/admin_list_network_data_row.tpl
templates/de/html/admin/admin_list_network_query_api.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_network_query_api_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_network_request_params.tpl
templates/de/html/admin/admin_list_network_types.tpl
templates/de/html/admin/admin_list_network_types_row.tpl
templates/de/html/admin/admin_list_network_vcheck_params.tpl
templates/de/html/admin/admin_show_config_network_type.tpl
templates/de/html/install/install_main_ajax.tpl
templates/de/html/install/install_selector.tpl
templates/de/html/js/js_ [new file with mode: 0644]
templates/de/html/js/js_admin_ajax.tpl
templates/de/html/js/js_install_ajax.tpl
templates/de/html/js/js_surfbar_frame_top.tpl
templates/de/html/js/js_surfbar_member_edit.tpl
templates/de/html/js/js_surfbar_stopped.tpl
templates/de/html/select/select_network_configured_box.tpl [new file with mode: 0644]
templates/de/html/select/select_network_configured_option.tpl [new file with mode: 0644]
templates/de/html/select/select_network_type_box.tpl
templates/de/html/select/select_network_unconfigured_box.tpl [new file with mode: 0644]
templates/de/html/select/select_network_unconfigured_option.tpl [new file with mode: 0644]
templates/xml/admin/admin_list_booking.xml
templates/xml/admin/admin_list_forced_ads.xml
templates/xml/admin/admin_list_forced_campaigns.xml
templates/xml/admin/admin_list_forced_costs.xml
templates/xml/admin/admin_list_grade_data.xml
templates/xml/admin/admin_list_network_query_api_config.xml [new file with mode: 0644]
templates/xml/admin/admin_list_nickname_history.xml
templates/xml/admin/admin_list_point_accounts.xml
templates/xml/admin/admin_list_referral_levels.xml
templates/xml/admin/admin_list_server_name_log.xml
templates/xml/admin/admin_list_surfbar_actions.xml
templates/xml/admin/admin_list_surfbar_packages.xml
templates/xml/admin/admin_list_surfbar_urls.xml
templates/xml/admin/admin_list_user_subid.xml
templates/xml/admin/admin_list_user_subid_stats.xml
templates/xml/admin_list_data_template.xml
templates/xml/member/member_list_booking.xml
templates/xml/member/member_list_subid.xml
templates/xml/member/member_list_subid_stats.xml
theme/business/css/ajax.css
theme/business/css/general.css
theme/default/css/ajax.css
theme/default/css/general.css
theme/desert/css/ajax.css
theme/desert/css/general.css
theme/org/css/ajax.css
theme/org/css/general.css
theme/schleuder/css/ajax.css
theme/ship-simu/css/ajax.css [new file with mode: 0644]

index 2acb04059b3b71b4b943cf3ea2ad6dbef8baccca..4af5150e2194e7d40e665cc036d671492f0b1314 100644 (file)
@@ -90,6 +90,7 @@ DOCS/tpl-validator.php svneol=native#text/plain
 /admin.php svneol=native#text/plain
 /agb.php svneol=native#text/plain
 /ajax.php svneol=native#text/plain
+/api.php svneol=native#text/plain
 /autoreg.php svneol=native#text/plain
 /beg.php svneol=native#text/plain
 /birthday_confirm.php svneol=native#text/plain
@@ -528,6 +529,7 @@ inc/modules/admin/what-config_imprint.php svneol=native#text/plain
 inc/modules/admin/what-config_mediadata.php svneol=native#text/plain
 inc/modules/admin/what-config_menu.php svneol=native#text/plain
 inc/modules/admin/what-config_mods.php svneol=native#text/plain
+inc/modules/admin/what-config_network.php svneol=native#text/plain
 inc/modules/admin/what-config_network_api.php svneol=native#text/plain
 inc/modules/admin/what-config_network_types.php svneol=native#text/plain
 inc/modules/admin/what-config_newsletter.php svneol=native#text/plain
@@ -864,21 +866,22 @@ inc/xml-functions.php svneol=native#text/plain
 /install.php svneol=native#text/plain
 /js.php svneol=native#text/plain
 js/.js svneol=native#text/plain
-js/admin-common.js svneol=native#text/plain
-js/admin-data.js svneol=native#text/plain
-js/ajax-common.js svneol=native#text/plain
-js/ajax-loader.js svneol=native#text/plain
-js/ajax-test.js svneol=native#text/plain
-js/core-common.js svneol=native#text/plain
-js/install-common.js svneol=native#text/plain
-js/install-data.js svneol=native#text/plain
-js/jquery-ui.custom.js svneol=native#text/plain
-js/jquery-ui.js svneol=native#text/plain
-js/jquery-ui.uncompressed.js svneol=native#text/plain
-js/jquery-uncompressed.js svneol=native#text/plain
-js/jquery.js svneol=native#text/plain
-js/jquery.uncompressed.js svneol=native#text/plain
-js/menu-common.js svneol=native#text/plain
+js/admin-common.js svneol=native#text/javascript
+js/admin-data.js svneol=native#text/javascript
+js/admin-network-query-api.js svneol=native#text/javascript
+js/ajax-common.js svneol=native#text/javascript
+js/ajax-loader.js svneol=native#text/javascript
+js/ajax-test.js svneol=native#text/javascript
+js/core-common.js svneol=native#text/javascript
+js/install-common.js svneol=native#text/javascript
+js/install-data.js svneol=native#text/javascript
+js/jquery-ui.custom.js svneol=native#text/javascript
+js/jquery-ui.js svneol=native#text/javascript
+js/jquery-ui.uncompressed.js svneol=native#text/javascript
+js/jquery-uncompressed.js svneol=native#text/javascript
+js/jquery.js svneol=native#text/javascript
+js/jquery.uncompressed.js svneol=native#text/javascript
+js/menu-common.js svneol=native#text/javascript
 /lead-confirm.php svneol=native#text/plain
 /login.php svneol=native#text/plain
 /mailid.php svneol=native#text/plain
@@ -1206,6 +1209,7 @@ templates/de/html/admin/admin_admins_mails_edit_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_admins_mails_list.tpl svneol=native#text/plain
 templates/de/html/admin/admin_admins_mails_list_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_ajax_main.tpl svneol=native#text/plain
+templates/de/html/admin/admin_ajax_windows.tpl svneol=native#text/plain
 templates/de/html/admin/admin_cache_stats.tpl svneol=native#text/plain
 templates/de/html/admin/admin_config_ svneol=native#text/plain
 templates/de/html/admin/admin_config_active.tpl svneol=native#text/plain
@@ -1228,6 +1232,7 @@ templates/de/html/admin/admin_config_home_main.tpl svneol=native#text/plain
 templates/de/html/admin/admin_config_home_settings_pro.tpl svneol=native#text/plain
 templates/de/html/admin/admin_config_mediadata.tpl svneol=native#text/plain
 templates/de/html/admin/admin_config_menu.tpl svneol=native#text/plain
+templates/de/html/admin/admin_config_network.tpl svneol=native#text/plain
 templates/de/html/admin/admin_config_network_api.tpl svneol=native#text/plain
 templates/de/html/admin/admin_config_network_types.tpl svneol=native#text/plain
 templates/de/html/admin/admin_config_network_types_row.tpl svneol=native#text/plain
@@ -1486,6 +1491,8 @@ templates/de/html/admin/admin_list_network_array_translation.tpl svneol=native#t
 templates/de/html/admin/admin_list_network_array_translation_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_network_data.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_network_data_row.tpl svneol=native#text/plain
+templates/de/html/admin/admin_list_network_query_api.tpl svneol=native#text/plain
+templates/de/html/admin/admin_list_network_query_api_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_network_request_params.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_network_request_params_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_network_types.tpl svneol=native#text/plain
@@ -1898,6 +1905,7 @@ templates/de/html/install/install_warning_previous.tpl svneol=native#text/plain
 templates/de/html/install/install_warning_tab.tpl svneol=native#text/plain
 templates/de/html/install/install_welcome.tpl svneol=native#text/plain
 templates/de/html/js/.htaccess svneol=native#text/plain
+templates/de/html/js/js_ svneol=native#text/plain
 templates/de/html/js/js_admin_ajax.tpl svneol=native#text/plain
 templates/de/html/js/js_cookies_disabled.tpl svneol=native#text/plain
 templates/de/html/js/js_install_ajax.tpl svneol=native#text/plain
@@ -2138,11 +2146,15 @@ templates/de/html/select/select_forced_costs_id_option.tpl svneol=native#text/pl
 templates/de/html/select/select_forced_costs_visibility_box.tpl svneol=native#text/plain
 templates/de/html/select/select_forced_costs_visibility_option.tpl svneol=native#text/plain
 templates/de/html/select/select_network_box.tpl svneol=native#text/plain
+templates/de/html/select/select_network_configured_box.tpl svneol=native#text/plain
+templates/de/html/select/select_network_configured_option.tpl svneol=native#text/plain
 templates/de/html/select/select_network_option.tpl svneol=native#text/plain
 templates/de/html/select/select_network_type_box.tpl svneol=native#text/plain
 templates/de/html/select/select_network_type_option.tpl svneol=native#text/plain
 templates/de/html/select/select_network_type_title_box.tpl svneol=native#text/plain
 templates/de/html/select/select_network_type_title_option.tpl svneol=native#text/plain
+templates/de/html/select/select_network_unconfigured_box.tpl svneol=native#text/plain
+templates/de/html/select/select_network_unconfigured_option.tpl svneol=native#text/plain
 templates/de/html/select/select_points_locked_mode_box.tpl svneol=native#text/plain
 templates/de/html/select/select_points_locked_mode_option.tpl svneol=native#text/plain
 templates/de/html/select/select_points_payment_method_box.tpl svneol=native#text/plain
@@ -2244,6 +2256,7 @@ templates/xml/admin/admin_list_forced_ads.xml svneol=native#text/plain
 templates/xml/admin/admin_list_forced_campaigns.xml svneol=native#text/plain
 templates/xml/admin/admin_list_forced_costs.xml svneol=native#text/plain
 templates/xml/admin/admin_list_grade_data.xml svneol=native#text/plain
+templates/xml/admin/admin_list_network_query_api_config.xml svneol=native#text/plain
 templates/xml/admin/admin_list_nickname_history.xml svneol=native#text/plain
 templates/xml/admin/admin_list_point_accounts.xml svneol=native#text/plain
 templates/xml/admin/admin_list_referral_levels.xml svneol=native#text/plain
@@ -2320,6 +2333,7 @@ theme/schleuder/images/menu/menu_title_rals.jpg -text svneol=unset#image/jpeg
 theme/schleuder/images/menu/menu_title_stats.jpg -text svneol=unset#image/jpeg
 theme/schleuder/images/menu/menu_title_themes.jpg -text svneol=unset#image/jpeg
 theme/schleuder/theme.php svneol=native#text/plain
+theme/ship-simu/css/ajax.css -text
 theme/ship-simu/css/bonus.css -text
 theme/ship-simu/images/code_bg.jpg -text svneol=unset#image/jpeg
 theme/ship-simu/images/code_bg.png -text svneol=unset#image/png
index 27b58fc3e90956a14fc0068f9c2ac47c0a76af3f..91ca493d0688c691075fe2fae759b094e586e189 100644 (file)
@@ -1,5 +1,6 @@
 ### WARNING: THIS FILE IS AUTO-GENERATED BY ../../contrib/todo-builder.sh (uid=/user=quix0r) ###
 ### DO NOT EDIT THIS FILE. ###
+./api.php:68:// @TODO Do stuff here
 ./autoreg.php:58:// @TODO Add processing of request here
 ./beg.php:175:                 // @TODO Opps, what is missing here???
 ./inc/classes/cachesystem.class.php:516:       // @TODO Add support for more types which break in last else-block
 ./inc/expression-functions.php:46:     // @TODO is escapeQuotes() enough for strings with single/double quotes?
 ./inc/extensions/ext-html_mail.php:136:                // @TODO Move these arrays into config
 ./inc/extensions/ext-menu.php:52:              // @TODO Convert menu-Id to one coding-standard. admin(edit|_add) => admin_menu_(edit|add), mem(edit|_add) => (edit|add)_(admin|guest|member)_menu
-./inc/extensions/ext-network.php:100:          // @TODO network_type_handler is an internal name and needs documentation
-./inc/extensions/ext-network.php:18: * @TODO Ad-Magnet: Layer(klick?). Layerviews.Skybannerklick/-view,     *
-./inc/extensions/ext-network.php:19: * @TODO Ad-Magnet: Banner-View, Textlink-Klick/-View. Page-Peel        *
-./inc/extensions/ext-network.php:20: * @TODO ADCocktail: All request parameters, BIDausKAS, WIDausKAS???    *
-./inc/extensions/ext-network.php:21: * @TODO ADCocktail: Zero array element is return code!                 *
-./inc/extensions/ext-network.php:22: * @TODO adgain.de: Textlink-View is a JavaScript URL                   *
-./inc/extensions/ext-network.php:23: * @TODO ADkracher: Textlink-View is a JavaScript URL                   *
-./inc/extensions/ext-network.php:24: * @TODO Admono.de: highforcedbanner, traffic from abroad               *
-./inc/extensions/ext-network.php:25: * @TODO Affiliblatt: Layer requires script in head                     *
-./inc/extensions/ext-network.php:26: * @TODO Affiliblatt: Textlinks, popup, popunder, HTML mail, lead       *
-./inc/extensions/ext-network.php:27: * @TODO AllAds4You: Traffic from abroad, High-Forced banner            *
-./inc/extensions/ext-network.php:28: * @TODO eu-ADS/WeltPromotion: Text for banner/buttons?                 *
-./inc/extensions/ext-network.php:29: * @TODO FuCoExSponsor: Textlink-View is JavaScript!                    *
-./inc/extensions/ext-network.php:30: * @TODO Fusion-Ads: Has click/banner URL in API response               *
-./inc/extensions/ext-network.php:31: * @TODO GeldSponsor.de Requires ID card copy/business reg.             *
-./inc/extensions/ext-network.php:32: * @TODO GolloX: Which charset?                                         *
-./inc/extensions/ext-network.php:33: * @TODO paid4ad: Which URLs for click and banner?                      *
-./inc/extensions/ext-network.php:34: * @TODO SuperPromo24: HighForced banner, leader board, mini/page layer *
-./inc/extensions/ext-network.php:35: * @TODO SuperPromo24: Textlink view is a JavaScript                    *
-./inc/extensions/ext-network.php:36: * @TODO Der Werbepartner.cc: Banner click/view is JavaScript!          *
-./inc/extensions/ext-network.php:37: * @TODO Der Werbepartner.cc: Forced textlink not correct               *
-./inc/extensions/ext-network.php:38: * @TODO Der Werbepartner.cc: Layer not correct                         *
-./inc/extensions/ext-network.php:39: * @TODO Der Werbepartner.cc: Sky banner is JavaScript!                 *
-./inc/extensions/ext-network.php:40: * @TODO Der Werbepartner.cc: Surfbar click not correct                 *
-./inc/extensions/ext-network.php:41: * @TODO Der Werbepartner.cc: Textlink not not correct                  *
-./inc/extensions/ext-network.php:42: * @TODO Xijide: Lead/Sale (together) unsupported (no target URL)       *
-./inc/extensions/ext-network.php:43: * @TODO Yoo!Media: What is LayerAd compared to Layer click?            *
+./inc/extensions/ext-network.php:18: * @TODO ADCocktail: All request parameters, BIDausKAS, WIDausKAS???    *
+./inc/extensions/ext-network.php:19: * @TODO ADCocktail: Zero array element is return code!                 *
+./inc/extensions/ext-network.php:20: * @TODO adgain.de: Textlink-View is a JavaScript URL                   *
+./inc/extensions/ext-network.php:21: * @TODO ADkracher: Textlink-View is a JavaScript URL                   *
+./inc/extensions/ext-network.php:22: * @TODO Admono.de: highforcedbanner, traffic from abroad               *
+./inc/extensions/ext-network.php:23: * @TODO Affiliblatt: Layer requires script in head                     *
+./inc/extensions/ext-network.php:24: * @TODO Affiliblatt: Textlinks, popup, popunder, HTML mail, lead       *
+./inc/extensions/ext-network.php:25: * @TODO AllAds4You: Traffic from abroad, High-Forced banner            *
+./inc/extensions/ext-network.php:26: * @TODO eu-ADS/WeltPromotion: Text for banner/buttons?                 *
+./inc/extensions/ext-network.php:27: * @TODO FuCoExSponsor: Textlink-View is JavaScript!                    *
+./inc/extensions/ext-network.php:28: * @TODO Fusion-Ads: Has click/banner URL in API response               *
+./inc/extensions/ext-network.php:29: * @TODO GeldSponsor.de Requires ID card copy/business reg.             *
+./inc/extensions/ext-network.php:30: * @TODO GolloX: Which charset?                                         *
+./inc/extensions/ext-network.php:31: * @TODO paid4ad: Which URLs for click and banner?                      *
+./inc/extensions/ext-network.php:32: * @TODO SuperPromo24: HighForced banner, leader board, mini/page layer *
+./inc/extensions/ext-network.php:33: * @TODO SuperPromo24: Textlink view is a JavaScript                    *
+./inc/extensions/ext-network.php:34: * @TODO Der Werbepartner.cc: Banner click/view is JavaScript!          *
+./inc/extensions/ext-network.php:35: * @TODO Der Werbepartner.cc: Forced textlink not correct               *
+./inc/extensions/ext-network.php:36: * @TODO Der Werbepartner.cc: Layer not correct                         *
+./inc/extensions/ext-network.php:37: * @TODO Der Werbepartner.cc: Sky banner is JavaScript!                 *
+./inc/extensions/ext-network.php:38: * @TODO Der Werbepartner.cc: Surfbar click not correct                 *
+./inc/extensions/ext-network.php:39: * @TODO Der Werbepartner.cc: Textlink not not correct                  *
+./inc/extensions/ext-network.php:40: * @TODO Xijide: Lead/Sale (together) unsupported (no target URL)       *
+./inc/extensions/ext-network.php:41: * @TODO Yoo!Media: What is LayerAd compared to Layer click?            *
+./inc/extensions/ext-network.php:98:           // @TODO network_type_handler is an internal name and needs documentation
 ./inc/extensions/ext-newsletter.php:218:               // @TODO Move these into configuration
 ./inc/extensions/ext-nickname.php:52:          // @TODO NOT NULL DEFAULT '' is bad practice, use NULL
 ./inc/extensions/ext-yoomedia.php:121:         // @TODO Can this be moved into a database table?
 ./inc/filter/bonus_filter.php:56:              // @TODO This query isn't right, it will only update if the user was for a longer time away!
 ./inc/filter/cache_filter.php:94:              // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
 ./inc/filter/forced_filter.php:73:             // @TODO This part is unfinished
-./inc/filters.php:1310:                // @TODO No banner found, output some default banner
-./inc/functions.php:1106:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
-./inc/functions.php:1192:                      // @TODO Are these convertions still required?
-./inc/functions.php:1213:// @TODO Rewrite this function to use readFromFile() and writeToFile()
-./inc/functions.php:1822:      // @TODO Find a way to cache this
-./inc/functions.php:1926:      // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2130:      // @TODO Rename column data_type to e.g. mail_status
-./inc/functions.php:2480:// @TODO cacheFiles is not yet supported
+./inc/filters.php:1319:                // @TODO No banner found, output some default banner
+./inc/functions.php:1126:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:1212:                      // @TODO Are these convertions still required?
+./inc/functions.php:1233:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:1842:      // @TODO Find a way to cache this
+./inc/functions.php:1946:      // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2150:      // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:2500:// @TODO cacheFiles is not yet supported
 ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
 ./inc/header.php:66:// @TODO Find a way to not use direct module comparison
 ./inc/install-functions.php:446:       // @TODO Comparing with DEFAULT_MAIN_TITLE doesn't work
 ./inc/install-functions.php:97:        // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
-./inc/language/de.php:1147:    // @TODO Rewrite these two constants
-./inc/language/de.php:1163:    // @TODO Rewrite these three constants
+./inc/language/de.php:1154:    // @TODO Rewrite these two constants
+./inc/language/de.php:1170:    // @TODO Rewrite these three constants
 ./inc/language/de.php:46:      // @TODO Please sort these language elements
-./inc/language/de.php:741:// @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.
+./inc/language/de.php:742:// @TODO Are these constants longer used?
+./inc/language-functions.php:254:      // @TODO These are all valid languages, again hard-coded
 ./inc/language/install_de.php:142:     // @TODO Move this to e.g. ext-smtp
 ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no       *
 ./inc/language/order_de.php:70:        // @TODO Find better text
 ./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings             *
 ./inc/language/refback_de.php:51:      // @TODO Rewrite these constants to one
-./inc/libs/admins_functions.php:528:           // @TODO This can be, somehow, rewritten
+./inc/libs/admins_functions.php:537:           // @TODO This can be, somehow, rewritten
 ./inc/libs/bonus_functions.php:195:            // @TODO Move this HTML to a template
 ./inc/libs/doubler_functions.php:44:// @TODO Lame description
 ./inc/libs/doubler_functions.php:96:                   // @TODO Can't this be moved into EL?
 ./inc/libs/forced_functions.php:457:// @TODO Can't we use our new expression language instead of this ugly code?
 ./inc/libs/mailid_functions.php:47:            // @TODO Rewrite this to a dynamic include or so
-./inc/libs/network_functions.php:1124: // @TODO Implement this function, don't forget to set HTTP status back to '200 OK' if everything went fine
+./inc/libs/network_functions.php:1182: // @TODO Implement this function, don't forget to set HTTP status back to '200 OK' if everything went fine
 ./inc/libs/order_functions.php:46:     // @TODO Move this array into a filter
 ./inc/libs/rallye_functions.php:771:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
 ./inc/libs/rallye_functions.php:838:   $EXPIRE = 3; // @TODO The hard-coded value...
 ./inc/modules/member/what-unconfirmed.php:178: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/member/what-unconfirmed.php:247:                         // @TODO This 'userid' cannot be saved because of encapsulated EL code
 ./inc/modules/order.php:78:            // @TODO Unused: 2,4
-./inc/mysql-manager.php:1450:          // @TODO Rewrite these lines to a filter
-./inc/mysql-manager.php:1474:  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1780:                  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1977:                          // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided
-./inc/mysql-manager.php:2100:                  // @TODO Used generic 'userid' here
-./inc/mysql-manager.php:2321:// @TODO cacheFiles is not yet supported
+./inc/mysql-manager.php:1492:          // @TODO Rewrite these lines to a filter
+./inc/mysql-manager.php:1516:  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1822:                  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1990:                          // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided
+./inc/mysql-manager.php:2113:                  // @TODO Used generic 'userid' here
+./inc/mysql-manager.php:2334:// @TODO cacheFiles is not yet supported
 ./inc/mysql-manager.php:408:   // @TODO Try to rewrite this to one or more functions
 ./inc/mysql-manager.php:44:// @TODO Can we cache this?
 ./inc/purge/purge-inact.php:55:        // @TODO Rewrite these if() blocks to a filter
 ./inc/revision-functions.php:168:// @TODO This function does also set and get in 'cache_array'
-./inc/template-functions.php:1142:                     // @TODO Deprecate this thing
-./inc/template-functions.php:1153:                     // @TODO Deprecate this thing
-./inc/template-functions.php:1275:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/template-functions.php:1324:             // @TODO Add a little more infos here
-./inc/template-functions.php:1705:// @TODO Lame description for this function
-./inc/template-functions.php:1727:                     // @TODO Move this in a filter
-./inc/template-functions.php:200:       * @TODO On some pages this is buggy
-./inc/template-functions.php:2361:     // @TODO Is this needed for e.g. $GLOBALS['template_content'] ? $this->setRawTemplateData($compactedContent);
-./inc/template-functions.php:288:      // @TODO Remove these sanity checks if all is fine
-./inc/template-functions.php:731:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
+./inc/template-functions.php:1040:                             // @TODO <label for="' . $prefix . '_' . $field . '"></<label> not working here
+./inc/template-functions.php:1095:                     // @TODO Deprecate this thing
+./inc/template-functions.php:1106:                     // @TODO Deprecate this thing
+./inc/template-functions.php:1228:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/template-functions.php:1277:             // @TODO Add a little more infos here
+./inc/template-functions.php:1658:// @TODO Lame description for this function
+./inc/template-functions.php:1680:                     // @TODO Move this in a filter
+./inc/template-functions.php:209:       * @TODO On some pages this is buggy
+./inc/template-functions.php:2320:     // @TODO Is this needed for e.g. $GLOBALS['template_content'] ? $this->setRawTemplateData($compactedContent);
+./inc/template-functions.php:298:      // @TODO Remove these sanity checks if all is fine
+./inc/template-functions.php:747:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
 ./inc/wrapper-functions.php:3197:      // @TODO Find a way to not use direct module comparison
 ./inc/wrapper-functions.php:512:// @TODO Do some more sanity check here
 ./inc/xml-functions.php:240:   // @TODO Handle characters
-./mailid.php:102:              // @TODO Rewrite this to a filter
-./mailid.php:145:                                      // @TODO Rewrite this to a filter
-./mailid_top.php:112:          // @TODO Rewrite this to a filter/function
-./mailid_top.php:149:                                  // @TODO Rewrite this to a filter
+./mailid.php:101:              // @TODO Rewrite this to a filter
+./mailid.php:144:                                      // @TODO Rewrite this to a filter
+./mailid_top.php:111:          // @TODO Rewrite this to a filter/function
+./mailid_top.php:148:                                  // @TODO Rewrite this to a filter
 ./mailid_top.php:18: * @TODO Merge this script with mailid.php                              *
-./mailid_top.php:199:                                                  // @TODO Rewrite this to a filter
-./mailid_top.php:206:                                                                  // @TODO Rewrite this to a filter
-./mailid_top.php:241:                                                                  // @TODO Rewrite these blocks to filter
+./mailid_top.php:198:                                                  // @TODO Rewrite this to a filter
+./mailid_top.php:205:                                                                  // @TODO Rewrite this to a filter
+./mailid_top.php:240:                                                                  // @TODO Rewrite these blocks to filter
 ./templates/de/html/admin/admin_add_country.tpl:24:                    <!-- @TODO Rewrite this selection box to our generic functions //-->
 ./templates/de/html/admin/admin_config_other.tpl:79:                   <!-- @TODO Rewrite this selection to one of our functions //-->
 ./templates/de/html/admin/admin_config_rewrite.tpl:4:  <!-- @TODO No title here? //-->
 ./templates/de/html/member/member_list_unconfirmed_nopoints.tpl:12:            <!-- @TODO Nothing to say here? //-->
 ./templates/de/html/surfbar/surfbar_frameset.tpl:4:    // @TODO This redirect kills our own frameset
 ./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5:             <!-- @TODO These are static lines and should be replaced by a filter (see ext-network/ext-sponsor) //-->
+./js/admin-network-query-api.js:72:// @TODO Add support for checkboxes
+./js/admin-network-query-api.js:73:// @TODO Make progress window working
+./js/install-common.js:112:    // @TODO Progress bar is out-of-order: + '<div id="progressbar"></div>'
 ./.htaccess:10:        # @TODO When ext-imprint is finished RewriteRule ^modules.php?module=index&what=impressum$ modules.php?module=index&what=imprint [L]
 ./.htaccess:11:        # @TODO When ext-terms is finished RewriteRule ^cms/index/wht/agb$                 modules.php?module=index&what=terms [L]
 ./.htaccess:12:        # @TODO When ext-terms is finished RewriteRule ^modules.php?module=index&what=agb$ modules.php?module=index&what=terms [L]
 ./templates/de/html/theme_one.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/theme_select_box.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/theme_select_form.tpl:1:<!-- @DEPRECATED //-->
+./js/jquery-ui.custom.js:1:// @DEPRECATED
+./js/jquery-uncompressed.js:1:// @DEPRECATED
 ### ### template-warnings.log follows: ### ###
 PHP Warning:  DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/menu/menu_what_end.tpl, line: 1 in 
 PHP Warning:  DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/menu/menu_what_end.tpl, line: 2 in 
index 42267daf5d42a631baa47dfddf95627642778d6c..9c59806923dd0662a2520b0127621c8671b270b3 100644 (file)
@@ -17,6 +17,8 @@ SID = Die Seiten-Id Ihrer eingetragenen Webseite (SiteID)
 BID = Banner-Id (z.B. bei Forcedbanner oder Bannerklick/-view, BannerID)
 CID = Kampagnen-Id (z.B. Textmail-Id aus Textmails, CampaignID)
 TID = Track-Id oder Sub-Id (z.B. lokale User-Id von dem klickenden Mitglied)
+VPC = VisualPayCheck-Support (meistens 1 setzen um es zu verwenden)
+DAT = Aktuelles Datum im deutschen Format (tt.mm.jjjj)
 
 Beispiel:
 http://www.anbieter-name.example/code/t-mail.php?id=%UID%&sid=%SID%&trackid=%TID%
@@ -25,28 +27,30 @@ http://www.anbieter-name.example/code/t-mail.php?id=%UID%&sid=%SID%&trackid=%TID
 
 Verwendete Abfrageparameter:
 ----------------------------
-currency     = Waehrung
-erotic       = Ob Erotik-Kampagnen erlaubt oder nicht, oder exklusiv Erotik-Kampagnen holen
-extra        = Extra-Parameter, der sonst oben nicht passt
-id           = Kundennummer (Merchant-Id oder Account-Id)
-maximum_stay = Maximale Auffenthaltszeit
-minimum_stay = Minimale Auffenthaltszeit
-password     = Interface-Passwort (nicht Account-Passwort)
-reload       = Maximale Reloadsperre in Sekunden (!) nach der gesucht werden soll
-remain       = Mindestanzahl an Klicks nach der gesucht werden soll
-reward       = Mindestverguetung nach der gesucht werden soll
-sid          = Webseiten-Id (Ihrer angemeldeten Webseite zugeordnete Id-Nummer)
-size         = Groesse des Werbemittels (bei Bannern, Buttons, evtl. Popup/-down)
-type         = Typ (z.B. text,html,view,klick); darf nicht NULL sein
+currency      = Waehrung
+id            = Kundennummer (Merchant-Id oder Account-Id)
+sid           = Webseiten-Id (Ihrer angemeldeten Webseite zugeordnete Id-Nummer)
+password      = Interface-Passwort (nicht Account-Passwort)
+type          = Typ (z.B. text,html,view,klick); darf nicht NULL sein
+maximum_stay  = Maximale Auffenthaltszeit
+minimum_stay  = Minimale Auffenthaltszeit
+reload        = Maximale Reloadsperre in Sekunden (!) nach der gesucht werden soll
+remain_budget = Mindestanzahl am Restbudget nach dem gesucht werden soll
+remain_clicks = Mindestanzahl an Klicks nach der gesucht werden soll
+reward        = Mindestverguetung nach der gesucht werden soll
+size          = Groesse des Werbemittels (bei Bannern, Buttons, evtl. Popup/-down)
+erotic        = Ob Erotik-Kampagnen erlaubt oder nicht, oder exklusiv Erotik-Kampagnen holen
+extra         = Extra-Parameter, der sonst oben nicht passt
 
 -------------------------------------------------------------------------------
 
 Referral-Links:
 ---------------
-Die eingebundenen Referral-Links bleiben bitte erhalten, auch nach der Anmeldung
-beim jeweiligen Werbenetzwerk brauchen Sie diese nicht aendern, da keiner
-veroeffentlicht wird. Der einizge Grund, weshalb diese vorhanden sind ist der,
-dass ich dies als indirekte Bezahlung meiner "Arbeitszeiten" am Script verstehe.
+Die von mir eingebundenen Referral-Links bleiben bitte erhalten, auch nach der
+Anmeldung beim jeweiligen Werbenetzwerk brauchen Sie diese nicht aendern, da
+keiner veroeffentlicht wird. Der einizge Grund, weshalb diese vorhanden sind ist
+der, dass ich dies als indirekte Bezahlung meiner "Arbeitszeiten" am Script
+verstehe.
 
 Deshalb moechte ich Sie auch bitten, meine Referral-Links zum Anmelden zu
 verwenden. Wenn Sie selber das Werbenetzwerk bewerben wollen, koennen Sie
@@ -65,4 +69,4 @@ http://www.anbieter-name.example/?ref=xxxx
 Den genauen Link erfahren Sie im Zugangsbereich des Werbenetzwerkes meistens
 unter "Werbebanner" oder "Ref-Center". Bitte kopieren Sie jedoch keinen
 HTML-Code in das Formular. Dieser fuehrt zu Darstellungsfehlern (HTML-Fehler)
-was dann nicht zur Verlinkung Ihres Referral-Linkes fuehrt.
+was dann Ihren Referral-Link nicht verlinkt.
diff --git a/api.php b/api.php
new file mode 100644 (file)
index 0000000..cb26739
--- /dev/null
+++ b/api.php
@@ -0,0 +1,74 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 01/03/2013 *
+ * ===================                          Last change: 01/03/2013 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : api.php                                          *
+ * -------------------------------------------------------------------- *
+ * Short description : Generic API script                               *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Allgemeines API-Script                           *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// XDEBUG call
+//* DEBUG: */ xdebug_start_trace();
+
+// Load security system
+require('inc/libs/security_functions.php');
+
+// Init start time
+$GLOBALS['__start_time'] = microtime(TRUE);
+
+/*
+ * Set output to "AJAX mode", proper module and prevent HTML headers/footers
+ * being sent.
+ */
+$GLOBALS['__output_mode'] = -2;
+$GLOBALS['__module']      = 'api';
+$GLOBALS['__header_sent'] = 2;
+$GLOBALS['__footer_sent'] = 2;
+
+// Load config file
+require('inc/config-global.php');
+
+// Load special API library
+//loadIncludeOnce('inc/ajax-functions.php');
+
+// Init API request (including HTTP status code)
+//initAjax();
+
+// Load header here
+loadIncludeOnce('inc/header.php');
+
+// @TODO Do stuff here
+
+// Footer
+loadIncludeOnce('inc/footer.php');
+
+// [EOF]
+?>
diff --git a/beg.php b/beg.php
index bd6e262d5c9ae9d31cebf9a7123d0ecf46a52169..58d12841ea679fe832554fa3786d9fba1894ff4b 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -96,7 +96,7 @@ if (isGetRequestElementSet('userid')) {
        } // END - if
 
        // User id valid and not webmaster's id?
-       if ((isValidUserId(getUserData('userid'))) && (getBegUserid() != getUserData('userid'))) {
+       if ((isValidId(getUserData('userid'))) && (getBegUserid() != getUserData('userid'))) {
                // Update counter
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `beg_clicks`=`beg_clicks`+1 WHERE `userid`=%s LIMIT 1",
                        array(getUserData('userid')), __FILE__, __LINE__);
@@ -188,7 +188,7 @@ if (isGetRequestElementSet('userid')) {
        } elseif ((getUserData('status') != 'CONFIRMED') && (getUserData('status') != 'failed')) {
                // Maybe locked/unconfirmed account?
                $errorCode = generateErrorCodeFromUserStatus();
-       } elseif ((getUserData('userid') == '0') || (getUserData('status') == 'failed')) {
+       } elseif ((!isValidId(getUserData('userid'))) || (getUserData('status') == 'failed')) {
                // Inalid or locked account, so let's find out
                if (fetchUserData(getRequestElement('userid'), 'nickname')) {
                        // Locked account
index 469104d454243cbbd4804577dd0b36451e998d28..20e2f6eeab7065aea291d77ce3a555f5a724d2a6 100644 (file)
@@ -118,10 +118,10 @@ $GLOBALS['__module'] = 'birthday_confirm';
 loadIncludeOnce('inc/header.php');
 
 // Load birthday header template (for your banners, e.g.?)
-$content['header'] =  loadTemplate('birthday_header', TRUE);
+$content['header'] = loadTemplate('birthday_header', TRUE);
 
 // Load birthday footer template (for your banners, e.g.?)
-$content['footer'] =  loadTemplate('birthday_footer', TRUE);
+$content['footer'] = loadTemplate('birthday_footer', TRUE);
 
 // Load final template and output it
 loadTemplate('birthday_confirm', FALSE, $content);
index a9ab0c8ac952287c985acd9c704b3cb9571408de..e3e4d073ccc7e59713b0aa966de0640dce3d4288 100644 (file)
@@ -116,7 +116,7 @@ if (isFormSent()) {
                                incrementConfigEntry('doubler_points', $points);
 
                                // Add second line for the referral but only when userid != refid
-                               if ((isValidUserId(determineReferralId())) && (determineReferralId() != getUserData('userid'))) {
+                               if ((isValidId(determineReferralId())) && (determineReferralId() != getUserData('userid'))) {
                                        // Okay add a refid line and apply refid percents
                                        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,0,%s,'%s',UNIX_TIMESTAMP(),'N','Y')",
                                                array(
index 84b5c7f2b7502d0d6a2e7e9c85013a00bdd41e09..ceb0cab4852e496e4a4379a33edf01f22c9ba9a7 100644 (file)
@@ -37,7 +37,8 @@
 
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAjaxOutputMode())) {
-       die();
+       header('HTTP/1.1 403 Forbidden');
+       die(json_encode(array('reply_content' => 'Access forbidden'), JSON_FORCE_OBJECT));
 } // END - if
 
 // [EOF]
index f8db0fdd0eb68df9c71f80dbebb9bae465e0b399..e93830cba66da6138fa31cccc8679a9ea27a7045 100644 (file)
@@ -37,7 +37,8 @@
 
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAjaxOutputMode()) || (!isAdmin())) {
-       die();
+       header('HTTP/1.1 403 Forbidden');
+       die(json_encode(array('reply_content' => 'Access forbidden'), JSON_FORCE_OBJECT));
 } // END - if
 
 // "Generates" admin content by loading a message template
index 055d00270adb4890f715c3dcc112cb4113991b5b..f1e7eb7aaa5d0f55b8119a98cac4fd560e08a8cd 100644 (file)
@@ -37,7 +37,8 @@
 
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAjaxOutputMode()) || (!isInstallationPhase())) {
-       die();
+       header('HTTP/1.1 403 Forbidden');
+       die(json_encode(array('reply_content' => 'Access forbidden'), JSON_FORCE_OBJECT));
 } // END - if
 
 //-----------------------------------------------------------------------------
@@ -248,7 +249,7 @@ function doAjaxInstallerChangeWarning () {
                // Is it an extension?
                if (substr($element, 0, 4) == 'ext_') {
                        // Add row for extension
-                       $OUT .= '<li>{%message=INSTALLER_CHANGED_ELEMENT_EXTENSION=' . str_replace('_', '-', $element) . '%}</li>';
+                       $OUT .= '<li>{%message,INSTALLER_CHANGED_ELEMENT_EXTENSION=' . str_replace('_', '-', $element) . '%}</li>';
                } else {
                        // Add generic row
                        $OUT .= '<li>{--INSTALLER_CHANGED_ELEMENT_' . strtoupper($element) . '--}</li>';
index d22e6ee36b26337a3d90f6f6d322082f69c3207b..965e545d9348b6390ad20cd3ad4aa37d147df3c5 100644 (file)
@@ -793,10 +793,168 @@ function doXmlDataTable ($resource, $attributes) {
                reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'] = array();
+
        // Add the entry to the array
        addXmlValueToCallbackAttributes('data_table', $attributes);
 }
 
+// Handles the XML node 'table-join-condition'
+function doXmlTableJoinCondition ($resource, $attributes) {
+       // There should be no attributes
+       if (count($attributes) > 0) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+       } // END - if
+}
+
+// Handles the XML node 'table-join-type'
+function doXmlTableJoinType ($resource, $attributes) {
+       if (count($attributes) != 1) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 1 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_type'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node table-join-type already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_type'] = array();
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('table_join_type', $attributes);
+}
+
+// Handles the XML node 'table-join-name'
+function doXmlTableJoinName ($resource, $attributes) {
+       if (count($attributes) != 2) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['ALIAS'])) {
+               // 'ALIAS' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_name'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node table-join-name already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_name'] = array();
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('table_join_name', $attributes);
+}
+
+// Handles the XML node 'join-on'
+function doXmlJoinOn ($resource, $attributes) {
+       // There should be no attributes
+       if (count($attributes) > 0) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+       } // END - if
+}
+
+// Handles the XML node 'join-on-left-table'
+function doXmlJoinOnLeftTable ($resource, $attributes) {
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['COLUMN'])) {
+               // 'COLUMN' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['NAME'])) {
+               // 'NAME' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute NAME does not validate. NAME=' . $attributes['NAME']);
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['COLUMN'])) {
+               // 'COLUMN' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute COLUMN does not validate. COLUMN=' . $attributes['COLUMN']);
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_left_table'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-left-table already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_left_table'] = array();
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('join_on_left_table', $attributes);
+}
+
+// Handles the XML node 'join-on-right-table'
+function doXmlJoinOnRightTable ($resource, $attributes) {
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['COLUMN'])) {
+               // 'COLUMN' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['NAME'])) {
+               // 'NAME' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute NAME does not validate. NAME=' . $attributes['NAME']);
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['COLUMN'])) {
+               // 'COLUMN' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute COLUMN does not validate. COLUMN=' . $attributes['COLUMN']);
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_right_table'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-right-table already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_right_table'] = array();
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('join_on_right_table', $attributes);
+}
+
+// Handles the XML node 'join-on-condition'
+function doXmlJoinOnCondition ($resource, $attributes) {
+       if (count($attributes) != 2) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isset($attributes['CONDITION'])) {
+               // 'CONDITION' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
+               // 'CONDITION' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
+       } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
+               // 'CONDITION' is not known
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. CONDITION=' . $attributes['CONDITION']);
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_condition'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-condition already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_condition'] = array();
+
+       // Add the entry to the array
+       //die('<pre>'.print_r($attributes,true).'</pre>');
+       addXmlValueToCallbackAttributes('join_on_condition', $attributes);
+}
+
 // Handles the XML node 'select-data-from-list'
 function doXmlSelectDataFromList ($resource, $attributes) {
        // There should be no attributes
@@ -901,7 +1059,7 @@ function doXmlWhereSelectFromListEntry ($resource, $attributes) {
                reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
        } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
                // 'CONDITION' is not known
-               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. CONDITION=' . $attributes['CONDITION']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
                // doXmlCallbackFunction is missing
                reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
@@ -926,6 +1084,12 @@ function doXmlWhereCondition ($resource, $attributes) {
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
                reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
+               // 'CONDITION' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
+       } elseif ((!empty($attributes['CONDITION'])) && (!isXmlConditionValid($attributes['CONDITION']))) {
+               // 'CONDITION' is not known
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. CONDITION=' . $attributes['CONDITION']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
                // doXmlCallbackFunction is missing
                reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
@@ -1229,18 +1393,18 @@ function isXmlTypeCallback ($value) {
 function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '', $key = '') {
        //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',key=' . $key . ' - ENTERED!');
        // Is it boolean type?
-       if (($attributes['TYPE'] == 'bool') && (isset($attributes['VALUE']))) {
+       if ((isset($attributes['TYPE'])) && ($attributes['TYPE'] == 'bool') && (isset($attributes['VALUE']))) {
                // Then convert VALUE
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element . ' - CONVERTING!');
                $attributes['VALUE'] = convertStringToBoolean($attributes['VALUE']);
-       } elseif ($attributes['TYPE'] == 'callback') {
+       } elseif ((isset($attributes['TYPE'])) && ($attributes['TYPE'] == 'callback')) {
                // It is a simple call-back type
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element . ' - CALLING!');
                $attributes['VALUE'] = call_user_func($attributes['VALUE']);
        }
 
        // What do we need to add?
-       if ($attributes['TYPE'] == 'array') {
+       if ((isset($attributes['TYPE'])) && ($attributes['TYPE'] == 'array')) {
                // Another nested array
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element);
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['VALUE'] . '_list'] = array();
@@ -1275,7 +1439,7 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                } // END - if
 
                // Init array
-               $array =  array(
+               $array = array(
                        'column'   => trim($attributes['VALUE']),
                        'alias'    => trim($attributes['ALIAS']),
                        'function' => trim($attributes['FUNCTION']),
@@ -1289,10 +1453,26 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                        $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element] = array();
                } // END - if
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
+       } elseif ((isset($attributes['NAME'])) && (isset($attributes['ALIAS']))) {
+               // NAME/ALIAS detected
+               $array = array(
+                       'name'  => trim($attributes['NAME']),
+                       'alias' => trim($attributes['ALIAS'])
+               );
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',NAME=' . $attributes['NAME'] . ',ALIAS[' . gettype($attributes['ALIAS']) . ']=' . $attributes['ALIAS']);
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
+       } elseif ((isset($attributes['VALUE'])) && (isset($attributes['ALIAS']))) {
+               // NAME/ALIAS detected
+               $array = array(
+                       'value' => trim($attributes['VALUE']),
+                       'alias' => trim($attributes['ALIAS'])
+               );
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',NAME=' . $attributes['VALUE'] . ',ALIAS[' . gettype($attributes['ALIAS']) . ']=' . $attributes['ALIAS']);
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
        } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['LOOK-FOR']))) {
                // CONDITION/LOOK-FOR detected
                // Init array
-               $array =  array(
+               $array = array(
                        'column'    => trim($attributes['VALUE']),
                        'table'     => trim($attributes['TABLE']),
                        'condition' => convertXmlContion(trim($attributes['CONDITION'])),
@@ -1306,8 +1486,12 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
        } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['NAME']))) {
                // CONDITION/NAME detected
-               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - CONDITION!');
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - CONDITION-NAME!');
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['CONDITION'];
+       } elseif (isset($attributes['CONDITION'])) {
+               // CONDITION detected
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ' - CONDITION!');
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = convertXmlContion(trim($attributes['CONDITION']));
        } elseif (isset($attributes['CALLBACK'])) {
                // CALLBACK/VALUE detected
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CALLBACK[' . gettype($attributes['CALLBACK']) . ']=' . $attributes['CALLBACK'] . ' - CALLBACK! (VALUE=' . $attributes['VALUE'] . ')');
@@ -1316,6 +1500,15 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                // ORDER/TABLE detected
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',ORDER[' . gettype($attributes['ORDER']) . ']=' . $attributes['ORDER'] . ' - ORDER! (VALUE=' . $attributes['VALUE'] . ')');
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['ORDER']][$attributes['TABLE']] = $attributes['VALUE'];
+       } elseif ((isset($attributes['TYPE'])) && (isset($attributes['NAME'])) && (isset($attributes['COLUMN']))) {
+               // TYPE/NAME/COLUMN detected
+               // Init array
+               $array = array(
+                       'name'   => trim($attributes['NAME']),
+                       'column' => trim($attributes['COLUMN'])
+               );
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - TYPE-COLUMN! (COLUMN=' . $attributes['COLUMN'] . ')');
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
        } elseif (isset($attributes['COLUMN'])) {
                // COLUMN/VALUE detected
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ',COLUMN[' . gettype($attributes['COLUMN']) . ']=' . $attributes['COLUMN'] . ' - COLUMN!');
@@ -1323,13 +1516,17 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                        $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']] = array();
                } // END - if
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']])] = $attributes['VALUE'];
-       } elseif ((!isset($attributes['NAME'])) || (trim($attributes['NAME']) == '')) {
+       } elseif (((!isset($attributes['NAME'])) || (trim($attributes['NAME']) == '')) && (isset($attributes['VALUE']))) {
                // Numerical index
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NUMERICAL!');
                if (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])) {
                        $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element] = array();
                } // END - if
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $attributes['VALUE'];
+       } elseif ((count($attributes) == 1) && (isset($attributes['TYPE']))) {
+               // Only TYPE found
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',TYPE[' . gettype($attributes['TYPE']) . ']=' . $attributes['TYPE'] . ' - TYPE-ONLY!');
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $attributes['TYPE'];
        } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']])) {
                // Already created
                reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=<pre>' . print_r($attributes, TRUE) . '</pre>');
index 25e18681c40f3885097773c036f28d9fbdc3ffa8..707d9a3afb1e4a1a274e22899e1bdb5df28e7724 100644 (file)
@@ -139,7 +139,7 @@ class PrimeraApi {
                $data['PrimusInterface_Password'] = base64_encode($this->password);
 
                // Send POST request
-               $return = sendPostRequest($this->host.$this->path, $data);
+               $return = sendHttpPostRequest($this->host.$this->path, $data);
 
                // Convert the array into a full string
                $returnStr = implode(chr(10), $return);
index aaf125e5b2cef89da9adf7b0a571e7ec69bf6946..2e2aa980cefb402edd79b6095922e87c5459bbda 100644 (file)
@@ -1294,9 +1294,9 @@ class fase4_rdf {
         */
        function _rdf_data()
        {
-               if (defined('__SECURITY') && function_exists('sendGetRequest')) {
+               if (defined('__SECURITY') && function_exists('sendHttpGetRequest')) {
                        // Use mailer-project instead (see http://mxchange.org)
-                       $useable_data = sendGetRequest($this->_remote_file, array(), TRUE);
+                       $useable_data = sendHttpGetRequest($this->_remote_file, array(), TRUE);
                } elseif ($this->_use_proxy == TRUE) {
                        // we need a raw socket here to connect to proxy
                        $fp = fsockopen($this->_phost,$this->_pport);
index aaa1472e200f0ff278db761bee95e64d06cd8ed0..527508c8d732047db7b12b420fc406012de40aad 100644 (file)
@@ -421,5 +421,37 @@ function FILTER_LOAD_CONFIGURATION ($no = '0') {
        }
 }
 
+// "Getter" for "checked" configuration entries
+function getCheckedConfig ($configEntries) {
+       // Add entries
+       $content = getConfigEntries($configEntries, ' checked="checked"');
+
+       // Return it
+       return $content;
+}
+
+// "Getter" for "selected" configuration entries
+function getSelectedConfig ($configEntries) {
+       // Add entries
+       $content = getConfigEntries($configEntries, ' selected="selected"');
+
+       // Return it
+       return $content;
+}
+
+// "Getter" for configuration entries
+function getConfigEntries ($configEntries, $value) {
+       // Init content
+       $content = array();
+
+       // "Walk" through all entries
+       foreach ($configEntries as $entry) {
+               $content[$entry . '_' . strtolower(getConfig($entry))] = $value;
+       } // END - foreach
+
+       // Return it
+       return $content;
+}
+
 // [EOF]
 ?>
index c798121d321559420e8687bcff91367fe53172aa..6f0a13063bb8e9da64c48a805d175d13efcfb5d9 100644 (file)
@@ -80,6 +80,9 @@ initConfig();
 // Init HTTP handling
 initHttp();
 
+// CFG: FLOAT-MASK
+setConfigEntry('FLOAT_MASK', '%01.5f');
+
 // CFG: HOST-URL (without trailing '/' !)
 setConfigEntry('URL', $URL);
 
index c32c8f2b869e57347fd3d97c5692bdd927a1a5a4..48415aa28abc4cf97b638fc6bae1af3f8b8b2563 100644 (file)
@@ -159,7 +159,7 @@ function SQL_NUMROWS ($resource) {
 }
 
 // SQL affected rows
-function SQL_AFFECTEDROWS() {
+function SQL_AFFECTEDROWS () {
        // Valid link resource?
        if (!SQL_IS_LINK_UP()) return FALSE;
 
index e477edac1b790c209be0958b073173bfb152071e..a793b45e7859eaa437e887fc9269292b85fade2a 100644 (file)
@@ -81,7 +81,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        } // END - if
 
        // Debug mode enabled?
-       if (isDebugModeEnabled()) {
+       if ((isDebugModeEnabled()) && (!isAjaxOutputMode())) {
                // Init content array
                $content = array(
                        'headers' => htmlentities(trim($mailHeader)),
@@ -227,7 +227,7 @@ function sendGenericBuildMails ($mode, $tableName, $content, $id, $subjectPart =
        } // END - if
 
        // Is the raw userid set?
-       if (isValidUserId(postRequestElement($userIdColumn[0], $id))) {
+       if (isValidId(postRequestElement($userIdColumn[0], $id))) {
                // Set it in content
                $content[$userIdColumn[0]] = bigintval(postRequestElement($userIdColumn[0], $id));
 
index 6c586deb53b1db9dcda2e6acad8af47420d78b5e..4e78a9bd13e464177dc30b04dcd7227634c249eb 100644 (file)
@@ -281,7 +281,7 @@ function doExpressionMessage ($data) {
 // Expression call-back for template functions
 function doExpressionTemplate ($data) {
        // Construct call-back function name
-       $callbackFunction = 'doTemplate' . $data['callback'];
+       $callbackFunction = 'doTemplate' . ucfirst($data['callback']);
 
        // Init replacer
        $replacer = '<!-- [' . __FUNCTION__ . ':' . __LINE__.'] Call-back function ' . $callbackFunction  . ' does not exist. //-->';
index 526552cd5bcec4aa2f16e65abec342f8737fba1c..85fb7581958d4c843b0d61cda954b04aaf133f8f 100644 (file)
@@ -216,17 +216,17 @@ function registerExtension ($ext_name, $taskId, $isDryRun = FALSE, $ignoreUpdate
        } // END - if
 
        // Is the task id zero? Then we need to auto-fix it here
-       if ((!isTaskIdValid($taskId)) && (!isInstallationPhase())) {
+       if ((!isValidId($taskId)) && (!isInstallationPhase())) {
                // Try to find the task
                $taskId = determineExtensionTaskId(getCurrentExtensionName());
 
                // Still zero and not in dry-run?
-               if ((!isTaskIdValid($taskId)) && (!isExtensionDryRun())) {
+               if ((!isValidId($taskId)) && (!isExtensionDryRun())) {
                        // Now try to create a new task
                        $taskId = createNewExtensionTask(getCurrentExtensionName());
 
                        // Is it still zero?
-                       if (!isTaskIdValid($taskId)) {
+                       if (!isValidId($taskId)) {
                                // Then request a bug report
                                reportBug(__FUNCTION__, __LINE__, sprintf("%s: task_id is still zero after determineExtensionTaskId/createNewExtensionTask(%s)",
                                        __FUNCTION__,
@@ -295,7 +295,7 @@ function registerExtension ($ext_name, $taskId, $isDryRun = FALSE, $ignoreUpdate
 
                                        // Entry found?
                                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'updateTaskId=' . $updateTaskId . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ',currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ' - CHECKING!');
-                                       if (($updateTaskId > 0) || (isInstallationPhase())) {
+                                       if ((isValidId($updateTaskId)) || (isInstallationPhase())) {
                                                // Try to register the extension
                                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ',updateTaskId=' . $updateTaskId . ',isExtensionDryRun()=' . intval(isExtensionDryRun()));
                                                $processResult = registerExtension($ext_update, $updateTaskId, isExtensionDryRun(), TRUE, $ext_name);
@@ -426,7 +426,7 @@ function registerExtension ($ext_name, $taskId, $isDryRun = FALSE, $ignoreUpdate
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName());
                        $ret = FALSE;
                }
-       } elseif (($taskId > 0) && (getCurrentExtensionName() != '')) {
+       } elseif ((isValidId($taskId)) && (getCurrentExtensionName() != '')) {
                // Remove task from system when id and extension's name is valid
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s AND `status`='NEW' LIMIT 1",
@@ -542,7 +542,7 @@ function isExtensionInstalled ($ext_name) {
                $ext_id = getExtensionId($ext_name);
 
                // Is there a record?
-               $isInstalled = ($ext_id > 0);
+               $isInstalled = isValidId($ext_id);
 
                // Log debug message
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_id=' . $ext_id . ',isInstalled=' . intval($isInstalled));
@@ -1044,7 +1044,7 @@ function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) {
        // Is the extension there?
        if (isExtensionInstalled($ext_name)) {
                // Check if task is not there
-               if ($taskId == '0') {
+               if (!isValidId($taskId)) {
                        // Create extension update-task
                        $taskId = createNewTask($subject, $notes, 'EXTENSION_UPDATE', 0, $adminId);
                } // END - if
@@ -1067,7 +1067,7 @@ function createNewExtensionTask ($ext_name) {
 
        // Not installed and do we have created a task for the admin?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId[' . gettype($taskId) . ']=' . $taskId);
-       if ((!isTaskIdValid($taskId)) && (!isExtensionInstalled($ext_name))) {
+       if ((!isValidId($taskId)) && (!isExtensionInstalled($ext_name))) {
                // Set default message if ext-foo is missing
                $message = '{%message,ADMIN_EXTENSION_TEXT_FILE_MISSING=' . $ext_name . '%}';
 
@@ -1105,7 +1105,7 @@ function createExtensionDeactivationTask ($ext_name) {
 
        // Not installed and do we have created a task for the admin?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId[' . gettype($taskId) . ']=' . $taskId);
-       if ((!isTaskIdValid($taskId)) && (isExtensionInstalled($ext_name))) {
+       if ((!isValidId($taskId)) && (isExtensionInstalled($ext_name))) {
                // Task not created so add it
                $taskId = createNewTask($subject, SQL_ESCAPE(loadTemplate('task_EXTENSION_deactivated', TRUE, $ext_name)), 'EXTENSION_DEACTIVATION');
        } // END - if
@@ -2304,19 +2304,6 @@ function copyExtensionDataToCacheArray ($ext_name, $ext_id) {
        $GLOBALS['cache_array']['extension']['ext_deprecated'][$ext_name] = 'N';
 }
 
-// Checks if given task id is valid
-function isTaskIdValid ($taskId) {
-       // Is there cache?
-       if (!isset($GLOBALS[__FUNCTION__][$taskId])) {
-               // Determine it
-               $GLOBALS[__FUNCTION__][$taskId] = ((!is_null($taskId)) && ($taskId > 0));
-       } // END - if
-
-       // Return "cached" value
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'taskId[' . gettype($taskId) . ']=' . intval($taskId) . ',isValid=' . intval($GLOBALS[__FUNCTION__][$taskId]));
-       return $GLOBALS[__FUNCTION__][$taskId];
-}
-
 // "Getter" for "checked="checked" from given session data
 function getExtensionSelectedFromSession ($ext_name, $sessionName, $separator = ':') {
        // Get the data and explode it
index fcbbb39b7dc87254cbd06fd24aff8ca2c5295ab7..98d97aacb929542d079669e4e42fcc937a73e8af 100644 (file)
@@ -15,8 +15,6 @@
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
- * @TODO Ad-Magnet: Layer(klick?). Layerviews.Skybannerklick/-view,     *
- * @TODO Ad-Magnet: Banner-View, Textlink-Klick/-View. Page-Peel        *
  * @TODO ADCocktail: All request parameters, BIDausKAS, WIDausKAS???    *
  * @TODO ADCocktail: Zero array element is return code!                 *
  * @TODO adgain.de: Textlink-View is a JavaScript URL                   *
@@ -104,7 +102,7 @@ UNIQUE INDEX (`network_short_name`)",
 `network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `network_type_handler` VARCHAR(255) NOT NULL DEFAULT '',
 `network_type_api_url` VARCHAR(255) NOT NULL DEFAULT '',
-`network_type_click_url` VARCHAR(255) NOT NULL DEFAULT '',
+`network_type_click_url` VARCHAR(255) NULL DEFAULT NULL,
 `network_type_banner_url` VARCHAR(255) NULL DEFAULT NULL,
 `network_type_reload_time_unit` ENUM('s','m','h','D','W') NOT NULL DEFAULT 'h',
 `network_text_encoding` ENUM('NONE','BASE64') NOT NULL DEFAULT 'NONE',
@@ -123,7 +121,9 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_handler`)",
 `network_request_param_default` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`network_request_param_id`),
 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`)",
+UNIQUE INDEX `provider_type_value` (`network_id`, `network_type_id`, `network_request_param_value`),
+INDEX (`network_id`),
+INDEX (`network_type_id`)",
                        'Request parameters for GET/POST request');
 
                // Payment check ("vcheck") for all advertising networks
@@ -136,7 +136,8 @@ UNIQUE INDEX `provider_type_value` (`network_id`, `network_type_id`, `network_re
 `network_vcheck_param_default` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`network_vcheck_param_id`),
 UNIQUE INDEX `provider_key` (`network_id`, `network_vcheck_param_key`),
-UNIQUE INDEX `provider_value` (`network_id`, `network_vcheck_param_value`)",
+UNIQUE INDEX `provider_value` (`network_id`, `network_vcheck_param_value`),
+INDEX (`network_id`)",
                        'Payment check (vcheck) parameters per network');
 
                // Network handler error codes
@@ -160,7 +161,8 @@ INDEX (`network_type_id`)",
 `network_vcheck_error_type` VARCHAR(100) NOT NULL DEFAULT 'INVALID_TYPE',
 PRIMARY KEY (`network_vcheck_error_id`),
 UNIQUE INDEX `provider_value` (`network_id`, `network_vcheck_error_value`),
-UNIQUE INDEX `provider_type` (`network_id`, `network_vcheck_error_type`)",
+UNIQUE INDEX `provider_type` (`network_id`, `network_vcheck_error_type`),
+INDEX (`network_id`)",
                        'Error codes for all payment checks');
 
                // Valid translation keys (we hate hard-coded arrays, you see?)
@@ -182,7 +184,9 @@ UNIQUE INDEX (`network_translation_name`)",
 `network_array_sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`network_array_id`),
 UNIQUE INDEX `provider_type_key` (`network_id`, `network_type_id`, `network_array_index`),
-INDEX (`network_array_sort`)",
+INDEX (`network_array_sort`),
+INDEX (`network_id`),
+INDEX (`network_type_id`)",
                        'Translation of API responses, generic data, DO NOT ALTER!');
 
                // Data from the webmaster (you!)
@@ -196,6 +200,7 @@ INDEX (`network_array_sort`)",
 `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,
+`network_api_remaining_requests` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`network_api_id`),
 UNIQUE INDEX (`network_id`),
 UNIQUE INDEX `network_affiliate` (`network_id`, `network_api_affiliate_id`),
@@ -203,16 +208,20 @@ UNIQUE INDEX `affiliate_site` (`network_api_affiliate_id`, `network_api_site_id`
                        'API configuration data');
 
                // Configuration data for e.g. reload-time
-               addDropTableSql('network_types_config');
-               addCreateTableSql('network_types_config', "
+               addDropTableSql('network_handler_config');
+               addCreateTableSql('network_handler_config', "
 `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,
 `network_max_reload_time` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
 `network_min_waiting_time` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
+`network_max_waiting_time` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
 `network_min_remain_clicks` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
+`network_min_remain_budget` FLOAT(20,5) UNSIGNED NULL DEFAULT NULL,
 `network_min_payment` FLOAT(20,5) UNSIGNED NULL DEFAULT NULL,
 `network_allow_erotic` VARCHAR(10) NULL DEFAULT NULL,
+`network_media_size` VARCHAR(10) NULL DEFAULT NULL,
+`network_media_output` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`network_data_id`),
 UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
                        'Configuration data for every type (e.g. reload-time)');
@@ -240,8 +249,12 @@ UNIQUE INDEX (`network_vcheck_key`)",
 `network_cache_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_cache_data` MEDIUMBLOB,
-`network_cache_timestamp` TIMESTAMP NULL DEFAULT NULL,
+`network_cache_data` MEDIUMTEXT NOT NULL,
+`network_cache_body` MEDIUMBLOB NOT NULL,
+`network_cache_type` ENUM('MANUAL','CRON','UNKNOWN') NOT NULL DEFAULT 'UNKNOWN',
+`network_cache_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`network_cache_updated` TIMESTAMP NULL DEFAULT NULL,
+`network_cache_admin_id` BIGINT(20) NULL DEFAULT NULL,
 PRIMARY KEY (`network_cache_id`),
 UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
                        'Cache for all queried APIs');
@@ -253,18 +266,32 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 `network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `network_reload_lock` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
-`network_inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`network_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`network_reload_id`),
 UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
                        'Reload locks');
 
+               // Header logging (mostly for debugging)
+               addDropTableSql('network_header_logging');
+               addCreateTableSql('network_header_logging', "
+`network_header_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_http_status_code` VARCHAR(255) NOT NULL DEFAULT '',
+`network_http_headers` MEDIUMTEXT NOT NULL,
+`network_logging_type` ENUM('MANUAL','CRON','UNKNOWN') NOT NULL DEFAULT 'UNKNOWN',
+`network_header_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+PRIMARY KEY (`network_header_id`),
+INDEX `provider_type` (`network_id`, `network_type_id`)",
+                       'HTTP header logging');
+
                // Insert API response array translations, these will be used for calling the right filter function
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES
 ('campaign_id'),
 ('name'),
 ('alternate_text'),
 ('reload'),
-('remain'),
+('remain_clicks'),
 ('reward'),
 ('banner_id'),
 ('size'),
@@ -305,156 +332,196 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
                // Sponsor networks
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_data` (`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`, `network_active`) VALUES
 ('a3h', 'A3H', 'http://www.a3h.de?ref=1447', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
-('abiszed', 'AbisZED-Netz', 'http://abiszed-netz.de/index.php?ref=557', '|', '|', 'GET', 'ISO-8859-1', 'Y', 150, 'Y'),
-('admagnet', 'AD-Magnet', 'http://www.ad-magnet.de/index.php?ref=495', '|', '|', 'GET', 'ISO-8859-1', 'N', 300, 'Y'),
-('adcocktail', 'ADCocktail', 'http://www.adcocktail.com/?rid=2596', '|', '|', 'GET', 'WINDOWS-1252', 'N', 500, 'Y'),
-('adpaid', 'AdPaid', 'http://www.adpaid.de?ref=1464', '|', '|', 'GET', 'ISO-8859-1', 'N', 0, 'N'),
+('abiszed', 'AbisZED-Netz', 'http://www.abiszed-netz.de?ref=1438', '|', '|', 'GET', 'ISO-8859-1', 'Y', 150, 'Y'),
+('ad_magnet', 'AD-Magnet', 'http://www.ad-magnet.de/?ref=1060', '|', '|', 'GET', 'ISO-8859-1', 'N', 500, 'Y'),
+('ad_cocktail', 'ADCocktail', 'http://www.adcocktail.com/?rid=2596', '|', '|', 'GET', 'WINDOWS-1252', 'N', 500, 'Y'),
+('ad_paid', 'AdPaid', 'http://www.adpaid.de?ref=1464', '|', '|', 'GET', 'ISO-8859-1', 'N', 0, 'N'),
 ('ads4', 'Ads4.de', 'http://www.ads4.de/?werber=Quix0r', '|', '|', 'GET', 'WINDOWS-1252', 'N', 96, 'Y'),
 ('ads4webbis', 'Ads4Webbis', 'http://www.ads4webbis.de?ref=835', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'N'),
 ('ads4world', 'Ads4World', 'http://www.ads4world.de?ref=252', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0, 'N'),
 ('affiliblatt', 'Affiliblatt', 'http://www.affiliblatt.de/?sid=MTAzNQ==&site=home', '|', '|', 'GET', 'ISO-8859-1', 'N', 0, 'Y'),
-('allads4you', 'AllAds4You', 'http://www.allads4you.de?ref=1146', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'Y'),
-('alstermarketing', 'Alster-Marketing', 'http://www.alstermarketing.de?ref=1851', '|', '|', 'GET', 'ISO-8859-16', 'N', 350, 'N'),
-('bonus', 'BonusSponsor', 'http://www.bonussponsor.de?ref=1286', '|', '|', 'GET', 'WINDOWS-1252', 'N', 150, 'Y'),
-('fusion', 'Fusion-Ads', 'http://www.fusion-ads.de/?ref=84', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'N'),
-('gigapromo', 'GigaPromo', 'http://www.gigapromo.de/index.php?ref=953', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
-('hpsponsor', 'HPSponsor', 'http://hpsponsor.at?ref=29', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
-('make-euros', 'Make-Euros.de', 'http://www.make-euros.de?ref=1184', '|', '|', 'GET', 'ISO-8859-1', 'Y', 150, 'N'),
-('megad', 'Mega-Ad', 'http://www.mega-ad.de/?ref=303', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
+('all_ads4you', 'AllAds4You', 'http://www.allads4you.de?ref=1146', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'Y'),
+('alster_marketing', 'Alster-Marketing', 'http://www.alstermarketing.de?ref=1851', '|', '|', 'GET', 'ISO-8859-16', 'N', 350, 'N'),
+('bonus_sponsor', 'BonusSponsor', 'http://www.bonussponsor.de?ref=1286', '|', '|', 'GET', 'WINDOWS-1252', 'N', 150, 'Y'),
+('fusion_ads', 'Fusion-Ads', 'http://www.fusion-ads.de/?ref=84', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'N'),
+('giga_promo', 'GigaPromo', 'http://www.gigapromo.de/index.php?ref=953', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
+('hp_sponsor', 'HPSponsor', 'http://hpsponsor.at?ref=29', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
+('make-euros', 'Make-Euros.de', 'http://www.make-euros.de?ref=1184', '|', '|', 'GET', 'ISO-8859-1', 'Y', 150, 'Y'),
+('mega_ad', 'Mega-Ad', 'http://www.mega-ad.de/?ref=303', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
 ('power-promo', 'Power-Promo', 'http://www.power-promo.de?ref=1231', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
-('secash', 'SeCash', 'http://www.secash.de?ref=758', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
-('weltpromotion', 'WeltPromotion', 'http://www.weltpromotion.de?ref=3', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
-('ultrapromo', 'UltraPROMO', 'http://www.ultrapromo.eu?ref=485', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
-('werbepartnercc', 'DerWerbepartner.cc', 'http://www.werbepartner.cc/sponsor/?ref=696', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
-('yoomedia', 'Yoo!Media', 'http://www.yoomedia.de?ref=1715', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
-('cityads', 'City-Ads', 'http://www.city-ads.de?ref=221', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
-('goldsponsor', 'Gold-Sponsor', 'http://www.gold-sponsor.de?ref=42', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'N'),
-('doubleads', 'doubleads.de', 'http://www.doubleads.de?ref=1063', '|', '|', 'GET', 'ISO-8859-1','Y', 150, 'Y'),
-('vipads', 'VIPads.de', 'http://vipads.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 100, 'Y'),
-('homeads', 'homeADS', 'http://www.homeads.de/?ref=1540', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0, 'N'),
-('fucoexsponsor', 'FuCoExSponsor.net', 'http://fucoexsponsor.net/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 100, 'N'),
-('adconvention', 'AdConvention', 'http://www.adconvention.de?ref=233', '|', '|', 'GET', 'WINDOWS-1252', 'N', 300, 'Y'),
+('se_cash', 'SeCash', 'http://www.secash.de?ref=758', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
+('welt_promotion', 'WeltPromotion', 'http://www.the-switzerland-ad-network.ch?ref=3', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
+('ultra_promo', 'UltraPROMO', 'http://www.ultrapromo.eu?ref=485', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
+('werbe_partner_cc', 'DerWerbepartner.cc', 'http://www.werbepartner.cc/sponsor/?ref=696', '|', '|', 'GET', 'WINDOWS-1252', 'N', 100, 'Y'),
+('yoo_media', 'Yoo!Media', 'http://www.yoomedia.de?ref=1715', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
+('city_ads', 'City-Ads', 'http://www.city-ads.de?ref=221', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
+('gold_sponsor', 'Gold-Sponsor', 'http://www.gold-sponsor.de?ref=42', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'N'),
+('double_ads', 'doubleads.de', 'http://www.doubleads.de?ref=1063', '|', '|', 'GET', 'ISO-8859-1','Y', 150, 'Y'),
+('vip_ads', 'VIPads.de', 'http://vipads.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 100, 'Y'),
+('home_ads', 'homeADS', 'http://www.homeads.de/?ref=1540', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0, 'N'),
+('fucoex_sponsor', 'FuCoExSponsor.net', 'http://fucoexsponsor.net/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 100, 'N'),
+('ad_convention', 'AdConvention', 'http://www.adconvention.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'WINDOWS-1252', 'N', 300, 'Y'),
 ('ad-hit', 'Ad-Hit.de', 'http://www.ad-hit.de?ref=41', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
-('adcity', 'AdCity.eu', 'http://www.adcity.eu?ref=38', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
-('adgain', 'adgain.de', 'http://www.adgain.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'Y'),
-('adkracher', 'ADkracher', 'http://www.adkracher.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 350, 'Y'),
-('adminlose', 'Adminlose.de', 'http://www.adminlose.de/index.php?ref=2148', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
-('admono', 'Admono.de', 'http://www.admono.de/?ref=92', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'Y'),
+('ad_city', 'AdCity.eu', 'http://www.adcity.eu?ref=38', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
+('ad_gain', 'adgain.de', 'http://www.adgain.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'Y'),
+('ad_kracher', 'ADkracher', 'http://www.adkracher.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 350, 'Y'),
+('admin_lose', 'Adminlose.de', 'http://www.adminlose.de/index.php?ref=2148', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
+('ad_mono', 'Admono.de', 'http://www.admono.de/?ref=92', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'Y'),
 ('ad-promotion-net', 'Ad-Promotion.net', 'http://ad-promotion.net?ref=10194', '|', '|', 'GET', 'WINDOWS-1252', 'N', 150, 'Y'),
-('adprovi', 'Adprovi.de', 'http://www.adprovi.de?ref=439', '|', '|', 'GET', 'ISO-8859-1', 'N', 200, 'Y'),
+('ad_provi', 'Adprovi.de', 'http://www.adprovi.de?ref=439', '|', '|', 'GET', 'ISO-8859-1', 'N', 200, 'Y'),
 ('ads2earn', 'Ads2Earn', 'http://www.ads2earn.de?ref=1294', '|', '|', 'GET', 'ISO-8859-1', 'N', 150, 'Y'),
 ('ads2webbi', 'Ads2Webbi', 'http://www.ads2webbi.de?ref=79', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200, 'Y'),
-('superpromo24', 'SuperPromo24', 'http://www.superpromo24.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 300, 'Y'),
-('euads', 'eu-ADS.de', 'http://www.eu-ads.de?ref=411', '|', '|', 'GET', 'ISO-8859-1', 'N', 200, 'Y'),
+('super_promo24', 'SuperPromo24', 'http://www.superpromo24.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 300, 'Y'),
+('eu_ads', 'eu-ADS.de', 'http://www.eu-ads.de?ref=411', '|', '|', 'GET', 'ISO-8859-1', 'N', 200, 'Y'),
 ('xiji', 'Xiji.de', 'http://www.xiji.de/index.php?ref=7715', '|', '|', 'GET', 'ISO-8859-1', 'N', 100, 'Y')");
 
                // Network type handlers - A3H
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(1, 1, 'banner_click', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h'),
-(387, 1, 'banner_view', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h'),
-(2, 1, 'textlink_click', 'http://www.a3h.de/interface/out_textlink.php', 'http://www.a3h.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(390, 1, 'textlink_view', 'http://www.a3h.de/interface/out_textlink.php', 'http://www.a3h.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(3, 1, 'surfbar_click', 'http://www.a3h.de/interface/out_sbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h'),
-(389, 1, 'surfbar_view', 'http://www.a3h.de/interface/out_sbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h'),
-(4, 1, 'forcedbanner', 'http://www.a3h.de/interface/out_fbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h'),
-(5, 1, 'textmail', 'http://www.a3h.de/interface/out_paidmail.php', 'http://www.a3h.de/emailf.php?id=%CID%', NULL, 'h'),
-(6, 1, 'layer_click', 'http://www.a3h.de/interface/out_layer.php', 'http://www.a3h.de/layer.php?id=%CID%', NULL, 'h'),
-(388, 1, 'layer_view', 'http://www.a3h.de/interface/out_layer.php', 'http://www.a3h.de/layer.php?id=%CID%', NULL, 'h'),
-(7, 1, 'popup', 'http://www.a3h.de/interface/out_popup.php', 'http://www.a3h.de/popup.php?id=%CID%', NULL, 'h'),
-(8, 1, 'popdown', 'http://www.a3h.de/interface/out_popdown.php', 'http://www.a3h.de/popdown.php?id=%CID%', NULL, 'h'),
-(9, 1, 'lead', 'http://www.a3h.de/interface/out_lead.php', 'http://www.a3h.de/lead.php?id=%CID%', NULL, 'h'),
-(10, 1, 'sale', 'http://www.a3h.de/interface/out_sale.php', 'http://www.a3h.de/sale.php?id=%CID%', NULL, 'h'),
-(11, 1, 'htmlmail', 'http://www.a3h.de/interface/out_paidmail.php', 'http://www.a3h.de/emailf.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(1, 1, 'banner_click', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(2, 1, 'textlink_click', 'http://www.a3h.de/interface/out_textlink.php', 'http://www.a3h.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(3, 1, 'surfbar_click', 'http://www.a3h.de/interface/out_sbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(4, 1, 'forced_banner', 'http://www.a3h.de/interface/out_fbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(5, 1, 'textmail', 'http://www.a3h.de/interface/out_paidmail.php', 'http://www.a3h.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(6, 1, 'layer_click', 'http://www.a3h.de/interface/out_layer.php', 'http://www.a3h.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(7, 1, 'popup', 'http://www.a3h.de/interface/out_popup.php', 'http://www.a3h.de/popup.php?id=%CID%', NULL, 'h', 'NONE'),
+(8, 1, 'popdown', 'http://www.a3h.de/interface/out_popdown.php', 'http://www.a3h.de/popdown.php?id=%CID%', NULL, 'h', 'NONE'),
+(9, 1, 'lead', 'http://www.a3h.de/interface/out_lead.php', 'http://www.a3h.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(10, 1, 'sale', 'http://www.a3h.de/interface/out_sale.php', 'http://www.a3h.de/sale.php?id=%CID%', NULL, 'h', 'NONE'),
+(11, 1, 'htmlmail', 'http://www.a3h.de/interface/out_paidmail.php', 'http://www.a3h.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(387, 1, 'banner_view', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(388, 1, 'layer_view', 'http://www.a3h.de/interface/out_layer.php', 'http://www.a3h.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(389, 1, 'surfbar_view', 'http://www.a3h.de/interface/out_sbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(390, 1, 'textlink_view', 'http://www.a3h.de/interface/out_textlink.php', 'http://www.a3h.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(461, 1, 'button_click', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(462, 1, 'button_view', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(463, 1, 'skyscraper_click', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(464, 1, 'skyscraper_view', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(465, 1, 'halfbanner_click', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(466, 1, 'halfbanner_view', 'http://www.a3h.de/interface/out_banner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(467, 1, 'forced_button', 'http://www.a3h.de/interface/out_fbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(468, 1, 'forced_half_banner', 'http://www.a3h.de/interface/out_fbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE'),
+(469, 1, 'forced_skyscraper', 'http://www.a3h.de/interface/out_fbanner.php', 'http://www.a3h.de/bannerklf.php?id=%CID%', 'http://www.a3h.de/banner.php?id=%CID%', 'h', 'NONE')");
 
                // Network type handlers - AbisZED-Netz
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(187, 2, 'banner_click', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h'),
-(188, 2, 'banner_view', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h'),
-(189, 2, 'textlink_click', 'http://www.abiszed-netz.de/interface/out_textlink.php', 'http://www.abiszed-netz.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(190, 2, 'textlink_view', 'http://www.abiszed-netz.de/interface/out_textlink.php', 'http://www.abiszed-netz.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(191, 2, 'surfbar_click', 'http://www.abiszed-netz.de/interface/out_sbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h'),
-(192, 2, 'surfbar_view', 'http://www.abiszed-netz.de/interface/out_sbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h'),
-(193, 2, 'forcedbanner', 'http://www.abiszed-netz.de/interface/out_fbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h'),
-(194, 2, 'textmail', 'http://www.abiszed-netz.de/interface/out_paidmail.php', 'http://www.abiszed-netz.de/emailf.php?id=%CID%', NULL, 'h'),
-(195, 2, 'htmlmail', 'http://www.abiszed-netz.de/interface/out_paidmail.php', 'http://www.abiszed-netz.de/emailf.php?id=%CID%', NULL, 'h'),
-(196, 2, 'layer_click', 'http://www.abiszed-netz.de/interface/out_layer.php', 'http://www.abiszed-netz.de/layer.php?id=%CID%', NULL, 'h'),
-(197, 2, 'layer_view', 'http://www.abiszed-netz.de/interface/out_layer.php', 'http://www.abiszed-netz.de/layer.php?id=%CID%', NULL, 'h'),
-(198, 2, 'popup', 'http://www.abiszed-netz.de/interface/out_popup.php', 'http://www.abiszed-netz.de/popup.php?id=%CID%', NULL, 'h'),
-(199, 2, 'popdown', 'http://www.abiszed-netz.de/interface/out_popdown.php', 'http://www.abiszed-netz.de/popdown.php?id=%CID%', NULL, 'h'),
-(200, 2, 'lead', 'http://www.abiszed-netz.de/interface/out_lead.php', 'http://www.abiszed-netz.de/lead.php?id=%CID%', NULL, 'h'),
-(201, 2, 'sale', 'http://www.abiszed-netz.de/interface/out_sale.php', 'http://www.abiszed-netz.de/sale.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(187, 2, 'banner_click', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(188, 2, 'banner_view', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(189, 2, 'textlink_click', 'http://www.abiszed-netz.de/interface/out_textlink.php', 'http://www.abiszed-netz.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(190, 2, 'textlink_view', 'http://www.abiszed-netz.de/interface/out_textlink.php', 'http://www.abiszed-netz.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(191, 2, 'surfbar_click', 'http://www.abiszed-netz.de/interface/out_sbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(192, 2, 'surfbar_view', 'http://www.abiszed-netz.de/interface/out_sbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(193, 2, 'forced_banner', 'http://www.abiszed-netz.de/interface/out_fbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(194, 2, 'textmail', 'http://www.abiszed-netz.de/interface/out_paidmail.php', 'http://www.abiszed-netz.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(195, 2, 'htmlmail', 'http://www.abiszed-netz.de/interface/out_paidmail.php', 'http://www.abiszed-netz.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(196, 2, 'layer_click', 'http://www.abiszed-netz.de/interface/out_layer.php', 'http://www.abiszed-netz.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(197, 2, 'layer_view', 'http://www.abiszed-netz.de/interface/out_layer.php', 'http://www.abiszed-netz.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(198, 2, 'popup', 'http://www.abiszed-netz.de/interface/out_popup.php', 'http://www.abiszed-netz.de/popup.php?id=%CID%', NULL, 'h', 'NONE'),
+(199, 2, 'popdown', 'http://www.abiszed-netz.de/interface/out_popdown.php', 'http://www.abiszed-netz.de/popdown.php?id=%CID%', NULL, 'h', 'NONE'),
+(200, 2, 'lead', 'http://www.abiszed-netz.de/interface/out_lead.php', 'http://www.abiszed-netz.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(201, 2, 'sale', 'http://www.abiszed-netz.de/interface/out_sale.php', 'http://www.abiszed-netz.de/sale.php?id=%CID%', NULL, 'h', 'NONE'),
+(470, 2, 'button_click', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(471, 2, 'button_view', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(472, 2, 'halfbanner_click', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(473, 2, 'halfbanner_view', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(474, 2, 'skyscraper_click', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(475, 2, 'skyscraper_view', 'http://www.abiszed-netz.de/interface/out_banner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(476, 2, 'forced_button', 'http://www.abiszed-netz.de/interface/out_fbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(477, 2, 'forced_half_banner', 'http://www.abiszed-netz.de/interface/out_fbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE'),
+(478, 2, 'forced_skyscraper', 'http://www.abiszed-netz.de/interface/out_fbanner.php', 'http://www.abiszed-netz.de/bannerklf.php?id=%CID%', 'http://www.abiszed-netz.de/banner.php?id=%CID%', 'h', 'NONE')");
 
                // Network type handlers - Ad-Hit.de
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(302, 31, 'forcedbanner', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.ad-hit.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(303, 31, 'forcedtextlink', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(304, 31, 'banner_view', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ad-hit.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(305, 31, 'banner_click', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.ad-hit.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(306, 31, 'skybanner_view', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.ad-hit.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(307, 31, 'button_view', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.ad-hit.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(308, 31, 'textlink_view', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(309, 31, 'traffic', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(310, 31, 'popup', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(311, 31, 'textmail', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(302, 31, 'forced_banner', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ad-hit.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(303, 31, 'forced_textlink', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(304, 31, 'banner_view', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ad-hit.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(305, 31, 'banner_click', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ad-hit.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(306, 31, 'skyscraper_view', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ad-hit.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(307, 31, 'button_view', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ad-hit.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(308, 31, 'textlink_view', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(309, 31, 'traffic', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(310, 31, 'popup', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(311, 31, 'textmail', 'http://www.ad-hit.de/interface/api_2.php', 'http://www.ad-hit.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Ad-Magnet
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(483, 3, 'banner_click', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(484, 3, 'banner_view', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(485, 3, 'surfbar_click', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(486, 3, 'surfbar_view', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(487, 3, 'forced_banner', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(488, 3, 'textlink_click', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(489, 3, 'textlink_view', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(490, 3, 'layer_click', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(491, 3, 'layer_view', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(492, 3, 'popup', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(493, 3, 'popdown', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(494, 3, 'htmlmail', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(495, 3, 'textmail', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(496, 3, 'pagepeel_click', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(497, 3, 'pagepeel_view', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(498, 3, 'lead', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE'),
+(499, 3, 'sale', 'http://www.ad-magnet.de/interface/output.php', NULL, NULL, 'h', 'NONE')");
 
                // Network type handlers - Ad-Promotion.net
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(367, 37, 'forcedbanner', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://ad-promotion.net/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(368, 37, 'forcedtextlink', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(369, 37, 'banner_view', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://ad-promotion.net/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(370, 37, 'banner_click', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://ad-promotion.net/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(371, 37, 'skybanner_view', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://ad-promotion.net/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(372, 37, 'button_view', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://ad-promotion.net/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(373, 37, 'textlink_view', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(374, 37, 'traffic', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(375, 37, 'popup', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(376, 37, 'textmail', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(367, 37, 'forced_banner', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://ad-promotion.net/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(368, 37, 'forced_textlink', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(369, 37, 'banner_view', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://ad-promotion.net/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(370, 37, 'banner_click', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://ad-promotion.net/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(371, 37, 'skyscraper_view', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://ad-promotion.net/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(372, 37, 'button_view', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://ad-promotion.net/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(373, 37, 'textlink_view', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(374, 37, 'traffic', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(375, 37, 'popup', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(376, 37, 'textmail', 'http://ad-promotion.net/interface/api_2.php', 'http://ad-promotion.net/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - AdCity.eu
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(312, 32, 'forcedbanner', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(313, 32, 'forcedtextlink', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(314, 32, 'banner_view', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(315, 32, 'banner_click', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(316, 32, 'skybanner_view', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(317, 32, 'button_view', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(318, 32, 'textlink_view', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(319, 32, 'traffic', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(320, 32, 'popup', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(321, 32, 'textmail', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(312, 32, 'forced_banner', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(313, 32, 'forced_textlink', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(314, 32, 'banner_view', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(315, 32, 'banner_click', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(316, 32, 'skyscraper_view', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(317, 32, 'button_view', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adcity.eu/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(318, 32, 'textlink_view', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(319, 32, 'traffic', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(320, 32, 'popup', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(321, 32, 'textmail', 'http://www.adcity.eu/interface/', 'http://www.adcity.eu/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - AdCocktail
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(13, 4, 'forcedbanner', 'http://www.adcocktail.com/sc/kas/kas_fk.php', 'http://fk.adcocktail.com/fk_k.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'http://fk.adcocktail.com/fk_v.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'h'),
-(12, 4, 'textmail', 'http://www.adcocktail.com/sc/kas/kas_pm.php', 'http://pm.adcocktail.com/pm.php?uid=%UID%&wid=%CID%&wsid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(12, 4, 'textmail', 'http://www.adcocktail.com/sc/kas/kas_pm.php', 'http://pm.adcocktail.com/pm.php?uid=%UID%&wid=%CID%&wsid=%SID%', NULL, 'h', 'NONE'),
+(13, 4, 'forced_banner', 'http://www.adcocktail.com/sc/kas/kas_fk.php', 'http://fk.adcocktail.com/fk_k.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'http://fk.adcocktail.com/fk_v.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'h', 'NONE'),
+(479, 4, 'traffic', 'http://www.adcocktail.com/sc/kas/kas_tt.php', 'http://tt.adcocktail.com/tt.php?uid=%UID%&wid=%CID%&wsid=%SID%', NULL, 'h', 'NONE'),
+(480, 4, 'forced_button', 'http://www.adcocktail.com/sc/kas/kas_fk.php', 'http://fk.adcocktail.com/fk_k.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'http://fk.adcocktail.com/fk_v.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'h', 'NONE'),
+(481, 4, 'forced_half_banner', 'http://www.adcocktail.com/sc/kas/kas_fk.php', 'http://fk.adcocktail.com/fk_k.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'http://fk.adcocktail.com/fk_v.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'h', 'NONE'),
+(482, 4, 'forced_skyscraper', 'http://www.adcocktail.com/sc/kas/kas_fk.php', 'http://fk.adcocktail.com/fk_k.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'http://fk.adcocktail.com/fk_v.php?uid=%UID%&wid=%CID%&wsid=%SID%', 'h', 'NONE')");
 
                // Network type handlers - AdConvention
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(295, 30, 'banner_click', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(294, 30, 'banner_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%CID%', 'http://www.adconvention.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(297, 30, 'button_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(292, 30, 'forcedbanner', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(293, 30, 'forcedtextlink', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SI%', NULL, 'h'),
-(300, 30, 'popup', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(296, 30, 'skybanner_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(298, 30, 'textlink_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(301, 30, 'textmail', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(299, 30, 'traffic', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(295, 30, 'banner_click', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(294, 30, 'banner_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%CID%', 'http://www.adconvention.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(297, 30, 'button_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(292, 30, 'forced_banner', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(293, 30, 'forced_textlink', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SI%', NULL, 'h', 'NONE'),
+(300, 30, 'popup', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(296, 30, 'skyscraper_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.adconvention.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(298, 30, 'textlink_view', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(301, 30, 'textmail', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(299, 30, 'traffic', 'http://www.adconvention.de/interface/', 'http://www.adconvention.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - adgain.de
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
 (322, 33, 'banner_click', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
 (323, 33, 'banner_view', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
-(324, 33, 'forcedbanner', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
-(325, 33, 'forcedtextlink', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(324, 33, 'forced_banner', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(325, 33, 'forced_textlink', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
 (326, 33, 'htmlmail', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'BASE64'),
 (327, 33, 'layer', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/sc_layer.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
 (328, 33, 'textmail', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
 (329, 33, 'popup', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/sc_popup.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
-(330, 33, 'skybanner_click', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
-(331, 33, 'skybanner_view', 'http://www.adgain.de/int/get.phap', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(330, 33, 'skyscraper_click', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(331, 33, 'skyscraper_view', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
 (332, 33, 'surfbar_click', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
 (333, 33, 'surfbar_view', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adgain.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
 (334, 33, 'textlink_click', 'http://www.adgain.de/int/get.php', 'http://www.adgain.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
@@ -464,418 +531,415 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
 (336, 34, 'banner_click', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adkracher.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
 (337, 34, 'banner_view', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adkracher.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
-(338, 34, 'forcedbanner', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adkracher.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
-(339, 34, 'forcedtextlink', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(338, 34, 'forced_banner', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adkracher.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(339, 34, 'forced_textlink', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
 (340, 34, 'htmlmail', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'BASE64'),
 (341, 34, 'layer', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/sc_layer.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
 (342, 34, 'textmail', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
 (343, 34, 'popup', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/sc_popup.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
-(344, 34, 'skybanner_click', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adkracher.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
-(345, 34, 'skybanner_view', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adkracher.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(344, 34, 'skyscraper_click', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adkracher.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(345, 34, 'skyscraper_view', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.adkracher.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
 (346, 34, 'textlink_click', 'http://www.adkracher.de/int/get.php', 'http://www.adkracher.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
 (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', 'NONE'),
 (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', 'NONE')");
 
                // Network type handlers - Adminlose.de
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `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')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) 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', 'NONE'),
+(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', 'NONE'),
+(351, 35, 'forced_banner', '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', 'NONE'),
+(352, 35, 'forced_textlink', 'http://www.adminlose.de/interface/output_forcedtextlink.php', 'http://www.adminlose.de/lose/forcedclicktextlink.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(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', 'NONE'),
+(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', 'NONE'),
+(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', 'NONE'),
+(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', 'NONE')");
 
                // Network type handlers - Admono.de
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`) VALUES
-(357, 36, 'forcedbanner', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%'),
-(358, 36, 'forcedtextlink', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL),
-(359, 36, 'banner_view', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%'),
-(360, 36, 'banner_click', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%'),
-(361, 36, 'skybanner_view', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%'),
-(362, 36, 'button_view', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%'),
-(363, 36, 'textlink_view', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL),
-(364, 36, 'traffic', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL),
-(365, 36, 'popup', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL),
-(366, 36, 'textmail', 'http://www.admono.de/interface/', 'http://www.admono.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL)");
+(357, 36, 'forced_banner', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%'),
+(358, 36, 'forced_textlink', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL),
+(359, 36, 'banner_view', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%'),
+(360, 36, 'banner_click', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%'),
+(361, 36, 'skyscraper_view', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%'),
+(362, 36, 'button_view', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.admono.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%'),
+(363, 36, 'textlink_view', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL),
+(364, 36, 'traffic', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL),
+(365, 36, 'popup', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL),
+(366, 36, 'textmail', 'http://www.admono.de/interface/get_v3.php', 'http://www.admono.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL)");
 
                // Network type handlers - AdPaid
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(177, 5, 'banner_click', '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'),
-(391, 5, 'banner_view', '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'),
-(178, 5, 'textlink_click', 'http://www.adpaid.de/interface/out_textlink.php', 'http://www.adpaid.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(394, 5, 'textlink_view', 'http://www.adpaid.de/interface/out_textlink.php', 'http://www.adpaid.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(393, 5, 'surfbar_view', 'http://www.adpaid.de/interface/out_sbanner.php', 'http://www.adpaid.de/bannerklf.php?id=%CID%', 'http://www.adpaid.de/banner.php?id=%CID%', 'h'),
-(179, 5, 'surfbar_click', 'http://www.adpaid.de/interface/out_sbanner.php', 'http://www.adpaid.de/bannerklf.php?id=%CID%', 'http://www.adpaid.de/banner.php?id=%CID%', 'h'),
-(180, 5, 'forcedbanner', 'http://www.adpaid.de/interface/out_fbanner.php', 'http://www.adpaid.de/bannerklf.php?id=%CID%', 'http://www.adpaid.de/banner.php?id=%CID%', 'h'),
-(181, 5, 'textmail', 'http://www.adpaid.de/interface/out_paidmail.php', 'http://www.adpaid.de/emailf.php?id=%CID%', NULL, 'h'),
-(182, 5, 'layer_click', 'http://www.adpaid.de/interface/out_layer.php', 'http://www.adpaid.de/layer.php?id=%CID%', NULL, 'h'),
-(392, 5, 'layer_view', 'http://www.adpaid.de/interface/out_layer.php', 'http://www.adpaid.de/layer.php?id=%CID%', NULL, 'h'),
-(183, 5, 'popup', 'http://www.adpaid.de/interface/out_popup.php', 'http://www.adpaid.de/popup.php?id=%CID%', NULL, 'h'),
-(184, 5, 'popdown', 'http://www.adpaid.de/interface/out_popdown.php', 'http://www.adpaid.de/popdown.php?id=%CID%', NULL, 'h'),
-(185, 5, 'lead', 'http://www.adpaid.de/interface/out_lead.php', 'http://www.adpaid.de/lead.php?id=%CID%', NULL, 'h'),
-(186, 5, 'sale', 'http://www.adpaid.de/interface/out_sale.php', 'http://www.adpaid.de/sale.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(177, 5, 'banner_click', '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', 'NONE'),
+(391, 5, 'banner_view', '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', 'NONE'),
+(178, 5, 'textlink_click', 'http://www.adpaid.de/interface/out_textlink.php', 'http://www.adpaid.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(394, 5, 'textlink_view', 'http://www.adpaid.de/interface/out_textlink.php', 'http://www.adpaid.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(393, 5, 'surfbar_view', 'http://www.adpaid.de/interface/out_sbanner.php', 'http://www.adpaid.de/bannerklf.php?id=%CID%', 'http://www.adpaid.de/banner.php?id=%CID%', 'h', 'NONE'),
+(179, 5, 'surfbar_click', 'http://www.adpaid.de/interface/out_sbanner.php', 'http://www.adpaid.de/bannerklf.php?id=%CID%', 'http://www.adpaid.de/banner.php?id=%CID%', 'h', 'NONE'),
+(180, 5, 'forced_banner', 'http://www.adpaid.de/interface/out_fbanner.php', 'http://www.adpaid.de/bannerklf.php?id=%CID%', 'http://www.adpaid.de/banner.php?id=%CID%', 'h', 'NONE'),
+(181, 5, 'textmail', 'http://www.adpaid.de/interface/out_paidmail.php', 'http://www.adpaid.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(182, 5, 'layer_click', 'http://www.adpaid.de/interface/out_layer.php', 'http://www.adpaid.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(392, 5, 'layer_view', 'http://www.adpaid.de/interface/out_layer.php', 'http://www.adpaid.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(183, 5, 'popup', 'http://www.adpaid.de/interface/out_popup.php', 'http://www.adpaid.de/popup.php?id=%CID%', NULL, 'h', 'NONE'),
+(184, 5, 'popdown', 'http://www.adpaid.de/interface/out_popdown.php', 'http://www.adpaid.de/popdown.php?id=%CID%', NULL, 'h', 'NONE'),
+(185, 5, 'lead', 'http://www.adpaid.de/interface/out_lead.php', 'http://www.adpaid.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(186, 5, 'sale', 'http://www.adpaid.de/interface/out_sale.php', 'http://www.adpaid.de/sale.php?id=%CID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - AdProvi
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(377, 38, 'forcedbanner', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.adprovi.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(378, 38, 'forcedtextlink', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(379, 38, 'banner_view', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.adprovi.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(380, 38, 'banner_click', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.adprovi.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(381, 38, 'skybanner_view', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.adprovi.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(382, 38, 'button_view', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.adprovi.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(383, 38, 'textlink_view', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(384, 38, 'traffic', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(385, 38, 'popup', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(386, 38, 'textmail', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(377, 38, 'forced_banner', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.adprovi.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(378, 38, 'forced_textlink', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(379, 38, 'banner_view', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.adprovi.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(380, 38, 'banner_click', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.adprovi.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(381, 38, 'skyscraper_view', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.adprovi.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(382, 38, 'button_view', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.adprovi.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(383, 38, 'textlink_view', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(384, 38, 'traffic', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(385, 38, 'popup', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(386, 38, 'textmail', 'http://www.adprovi.de/interface/api_2.php', 'http://www.adprovi.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Ads2Earn
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(395, 39, 'banner_click', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%','h'),
-(396, 39, 'banner_view', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%','h'),
-(397, 39, 'textlink_click', 'http://www.ads2earn.de/interface/out_textlink.php', 'http://www.ads2earn.de/textlinkklick.php?id=%CID%', NULL,'h'),
-(398, 39, 'textlink_view', 'http://www.ads2earn.de/interface/out_textlink.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', NULL,'h'),
-(399, 39, 'forcedbanner', 'http://www.ads2earn.de/interface/out_fbanner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%','h'),
-(400, 39, 'htmlmail', 'http://www.ads2earn.de/interface/out_paidmail.php', 'http://www.ads2earn.de/emailf.php?id=%CID%', NULL,'h'),
-(401, 39, 'textmail', 'http://www.ads2earn.de/interface/out_paidmail.php', 'http://www.ads2earn.de/emailf.php?id=%CID%', NULL,'h'),
-(402, 39, 'button_click', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%','h'),
-(403, 39, 'button_view', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%','h'),
-(404, 39, 'skybanner_click', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%','h'),
-(405, 39, 'skybanner_view', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%','h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(395, 39, 'banner_click', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%', 'h', 'NONE'),
+(396, 39, 'banner_view', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%', 'h', 'NONE'),
+(397, 39, 'textlink_click', 'http://www.ads2earn.de/interface/out_textlink.php', 'http://www.ads2earn.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(398, 39, 'textlink_view', 'http://www.ads2earn.de/interface/out_textlink.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', NULL, 'h', 'NONE'),
+(399, 39, 'forced_banner', 'http://www.ads2earn.de/interface/out_fbanner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%', 'h', 'NONE'),
+(400, 39, 'htmlmail', 'http://www.ads2earn.de/interface/out_paidmail.php', 'http://www.ads2earn.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(401, 39, 'textmail', 'http://www.ads2earn.de/interface/out_paidmail.php', 'http://www.ads2earn.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(402, 39, 'button_click', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%', 'h', 'NONE'),
+(403, 39, 'button_view', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%', 'h', 'NONE'),
+(404, 39, 'skyscraper_click', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%', 'h', 'NONE'),
+(405, 39, 'skyscraper_view', 'http://www.ads2earn.de/interface/out_banner.php', 'http://www.ads2earn.de/bannerklf.php?id=%CID%', 'http://www.ads2earn.de/banner.php?id=%CID%', 'h', 'NONE')");
 
                // Network type handlers - Ads2Webbi
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(406, 40, 'forcedbanner', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%','h'),
-(407, 40, 'forcedtextlink', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h'),
-(408, 40, 'banner_view', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%','h'),
-(409, 40, 'banner_click', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h'),
-(410, 40, 'skybanner_view', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%','h'),
-(411, 40, 'button_view', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%','h'),
-(412, 40, 'textlink_view', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h'),
-(413, 40, 'traffic', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h'),
-(414, 40, 'popup', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h'),
-(415, 40, 'textmail', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(406, 40, 'forced_banner', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(407, 40, 'forced_textlink', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(408, 40, 'banner_view', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(409, 40, 'banner_click', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(410, 40, 'skyscraper_view', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(411, 40, 'button_view', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads2webbi.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(412, 40, 'textlink_view', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(413, 40, 'traffic', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(414, 40, 'popup', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(415, 40, 'textmail', 'http://www.ads2webbi.de/interface/', 'http://www.ads2webbi.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Ads4
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(14, 6, 'forcedbanner', 'http://www.ads4.de/interface/interface.php', 'http://www.ads4.de/forced_click.php?fb_id=%CID%&sid=%SID%', 'http://www.ads4.de/forced_view.php?fb_id=%CID%&sid=%SID%', 'h'),
-(16, 6, 'htmlmail', 'http://www.ads4.de/interface/interface.php', 'http://www.ads4.de/paidmail_click.php?pm=%CID%&sid=%SID%', NULL, 'h'),
-(15, 6, 'textmail', 'http://www.ads4.de/interface/interface.php', 'http://www.ads4.de/paidmail_click.php?pm=%CID%&sid=%SID%', NULL, 'h'),
-(119, 6, 'traffic', 'http://www.ads4.de/interface/interface.php', 'http://www.ads4.de/traffic_click.php?tr_id=%CID%&sid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(14, 6, 'forced_banner', 'http://www.ads4.de/interface/interface.php', 'http://www.ads4.de/forced_click.php?fb_id=%CID%&sid=%SID%', 'http://www.ads4.de/forced_view.php?fb_id=%CID%&sid=%SID%', 'h', 'NONE'),
+(16, 6, 'htmlmail', 'http://www.ads4.de/interface/interface.php', 'http://www.ads4.de/paidmail_click.php?pm=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(15, 6, 'textmail', 'http://www.ads4.de/interface/interface.php', 'http://www.ads4.de/paidmail_click.php?pm=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(119, 6, 'traffic', 'http://www.ads4.de/interface/interface.php', 'http://www.ads4.de/traffic_click.php?tr_id=%CID%&sid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Ads4Webbis
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(20, 7, 'banner_click', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.ads4webbis.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(19, 7, 'banner_view', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4webbis.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(22, 7, 'button_view', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.ads4webbis.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(17, 7, 'forcedbanner', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.ads4webbis.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(18, 7, 'forcedtextlink', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(24, 7, 'popup', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(21, 7, 'skybanner_view', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.ads4webbis.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(23, 7, 'textlink_view', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(25, 7, 'textmail', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(120, 7, 'traffic', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(20, 7, 'banner_click', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ads4webbis.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(19, 7, 'banner_view', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4webbis.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(22, 7, 'button_view', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ads4webbis.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(17, 7, 'forced_banner', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ads4webbis.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(18, 7, 'forced_textlink', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(24, 7, 'popup', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(21, 7, 'skyscraper_view', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ads4webbis.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(23, 7, 'textlink_view', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(25, 7, 'textmail', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(120, 7, 'traffic', 'http://www.ads4webbis.de/interface/api_2.php', 'http://www.ads4webbis.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Ads4World
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(29, 8, 'banner_click', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(28, 8, 'banner_view', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(31, 8, 'button_view', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(26, 8, 'forcedbanner', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(27, 8, 'forcedtextlink', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(33, 8, 'popup', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(30, 8, 'skybanner_view', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(32, 8, 'textlink_view', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(34, 8, 'textmail', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(121, 8, 'traffic', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(29, 8, 'banner_click', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(28, 8, 'banner_view', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(31, 8, 'button_view', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(26, 8, 'forced_banner', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(27, 8, 'forced_textlink', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(33, 8, 'popup', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(30, 8, 'skyscraper_view', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ads4world.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(32, 8, 'textlink_view', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(34, 8, 'textmail', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(121, 8, 'traffic', 'http://www.ads4world.de/interface/', 'http://www.ads4world.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Affiliblatt
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
-(441, 9, 'banner_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(442, 9, 'banner_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(443, 9, 'surfbar_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(444, 9, 'surfbar_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(445, 9, 'signature_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(446, 9, 'signature_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(447, 9, 'forcedbanner', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(448, 9, 'textmail', 'http://www.affiliblatt.de/lose/interface/output_paidmail2.php', 'http://www.affiliblatt.de/lose/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h','NONE'),
-(449, 9, 'traffic', 'http://www.affiliblatt.de/lose/interface/output_traffic.php', 'http://www.affiliblatt.de/lose/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h','NONE')");
+(441, 9, 'banner_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(442, 9, 'banner_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(443, 9, 'surfbar_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(444, 9, 'surfbar_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(445, 9, 'signature_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(446, 9, 'signature_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(447, 9, 'forced_banner', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(448, 9, 'textmail', 'http://www.affiliblatt.de/lose/interface/output_paidmail2.php', 'http://www.affiliblatt.de/lose/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(449, 9, 'traffic', 'http://www.affiliblatt.de/lose/interface/output_traffic.php', 'http://www.affiliblatt.de/lose/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(500, 9, 'button_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(501, 9, 'button_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(502, 9, 'halfbanner_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(503, 9, 'halfbanner_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(504, 9, 'skyscraper_click', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(505, 9, 'skyscraper_view', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(506, 9, 'forced_button', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(507, 9, 'forced_half_banner', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(508, 9, 'forced_skyscraper', 'http://www.affiliblatt.de/lose/interface/output_kampagne.php', 'http://www.affiliblatt.de/lose/clickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.affiliblatt.de/lose/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE')");
 
                // Network type handlers - AllAds4You
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(167, 10, 'forcedbanner', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(168, 10, 'forcedtextlink', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(169, 10, 'banner_view', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(170, 10, 'banner_click', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(171, 10, 'skybanner_view', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(172, 10, 'button_view', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(173, 10, 'textlink_view', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(174, 10, 'traffic', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(175, 10, 'popup', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(176, 10, 'textmail', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(167, 10, 'forced_banner', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(168, 10, 'forced_textlink', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(169, 10, 'banner_view', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(170, 10, 'banner_click', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(171, 10, 'skyscraper_view', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(172, 10, 'button_view', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.allads4you.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(173, 10, 'textlink_view', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(174, 10, 'traffic', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(175, 10, 'popup', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(176, 10, 'textmail', 'http://www.allads4you.de/interface/get_v3.php', 'http://www.allads4you.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Alster-Marketing
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(35, 11, 'banner_click', 'http://if.alstermarketing.de/interface/out_banner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h'),
-(45, 11, 'banner_view', 'http://if.alstermarketing.de/interface/out_banner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h'),
-(38, 11, 'forcedbanner', 'http://if.alstermarketing.de/interface/out_fbanner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h'),
-(48, 11, 'htmlmail', 'http://if.alstermarketing.de/interface/out_paidmail.php', 'http://www.alstermarketing.de/emailf.php?id=%CID%', NULL, 'h'),
-(40, 11, 'layer_click', 'http://if.alstermarketing.de/interface/out_layer.php', 'http://www.alstermarketing.de/layer.php?id=%CID%', NULL, 'h'),
-(49, 11, 'layer_view', 'http://if.alstermarketing.de/interface/out_layer.php', 'http://www.alstermarketing.de/layer.php?id=%CID%', NULL, 'h'),
-(43, 11, 'lead', 'http://if.alstermarketing.de/interface/out_lead.php', 'http://www.alstermarketing.de/lead.php?id=%CID%', NULL, 'h'),
-(42, 11, 'popdown', 'http://if.alstermarketing.de/interface/out_popdown.php', 'http://www.alstermarketing.de/popdown.php?id=%CID%', NULL, 'h'),
-(41, 11, 'popup', 'http://if.alstermarketing.de/interface/out_popup.php', 'http://www.alstermarketing.de/popup.php?id=%CID%', NULL, 'h'),
-(44, 11, 'sale', 'http://if.alstermarketing.de/interface/out_sale.php', 'http://www.alstermarketing.de/sale.php?id=%CID%', NULL, 'h'),
-(37, 11, 'surfbar_click', 'http://if.alstermarketing.de/interface/out_sbanner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h'),
-(47, 11, 'surfbar_view', 'http://if.alstermarketing.de/interface/out_sbanner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h'),
-(36, 11, 'textlink_click', 'http://if.alstermarketing.de/interface/out_textlink.php', 'http://www.alstermarketing.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(46, 11, 'textlink_view', 'http://if.alstermarketing.de/interface/out_textlink.php', 'http://www.alstermarketing.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(39, 11, 'textmail', 'http://if.alstermarketing.de/interface/out_paidmail.php', 'http://www.alstermarketing.de/emailf.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(35, 11, 'banner_click', 'http://if.alstermarketing.de/interface/out_banner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h', 'NONE'),
+(45, 11, 'banner_view', 'http://if.alstermarketing.de/interface/out_banner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h', 'NONE'),
+(38, 11, 'forced_banner', 'http://if.alstermarketing.de/interface/out_fbanner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h', 'NONE'),
+(48, 11, 'htmlmail', 'http://if.alstermarketing.de/interface/out_paidmail.php', 'http://www.alstermarketing.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(40, 11, 'layer_click', 'http://if.alstermarketing.de/interface/out_layer.php', 'http://www.alstermarketing.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(49, 11, 'layer_view', 'http://if.alstermarketing.de/interface/out_layer.php', 'http://www.alstermarketing.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(43, 11, 'lead', 'http://if.alstermarketing.de/interface/out_lead.php', 'http://www.alstermarketing.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(42, 11, 'popdown', 'http://if.alstermarketing.de/interface/out_popdown.php', 'http://www.alstermarketing.de/popdown.php?id=%CID%', NULL, 'h', 'NONE'),
+(41, 11, 'popup', 'http://if.alstermarketing.de/interface/out_popup.php', 'http://www.alstermarketing.de/popup.php?id=%CID%', NULL, 'h', 'NONE'),
+(44, 11, 'sale', 'http://if.alstermarketing.de/interface/out_sale.php', 'http://www.alstermarketing.de/sale.php?id=%CID%', NULL, 'h', 'NONE'),
+(37, 11, 'surfbar_click', 'http://if.alstermarketing.de/interface/out_sbanner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h', 'NONE'),
+(47, 11, 'surfbar_view', 'http://if.alstermarketing.de/interface/out_sbanner.php', 'http://www.alstermarketing.de/bannerklf.php?id=%CID%', 'http://www.alstermarketing.de/banner.php?id=%CID%', 'h', 'NONE'),
+(36, 11, 'textlink_click', 'http://if.alstermarketing.de/interface/out_textlink.php', 'http://www.alstermarketing.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(46, 11, 'textlink_view', 'http://if.alstermarketing.de/interface/out_textlink.php', 'http://www.alstermarketing.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(39, 11, 'textmail', 'http://if.alstermarketing.de/interface/out_paidmail.php', 'http://www.alstermarketing.de/emailf.php?id=%CID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - BonusSponsor
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(50, 12, 'banner_click', 'http://www.bonussponsor.de/interface/out_banner.php', 'http://www.bonussponsor.de/bannerklf.php?id=%CID%', 'http://www.bonussponsor.de/banner.php?id=%CID%', 'h'),
-(51, 12, 'banner_view', 'http://www.bonussponsor.de/interface/out_banner.php', 'http://www.bonussponsor.de/bannerklf.php?id=%CID%', 'http://www.bonussponsor.de/banner.php?id=%CID%', 'h'),
-(54, 12, 'forcedbanner', 'http://www.bonussponsor.de/interface/out_fbanner.php', 'http://www.bonussponsor.de/bannerklf.php?id=%CID%', 'http://www.bonussponsor.de/banner.php?id=%CID%', 'h'),
-(56, 12, 'htmlmail', 'http://www.bonussponsor.de/interface/out_paidmail.php', 'http://www.bonussponsor.de/emailf.php?id=%CID%', NULL, 'h'),
-(57, 12, 'layer_click', 'http://www.bonussponsor.de/interface/out_layer.php', 'http://www.bonussponsor.de/layer.php?id=%CID%', NULL, 'h'),
-(58, 12, 'layer_view', 'http://www.bonussponsor.de/interface/out_layer.php', 'http://www.bonussponsor.de/layer.php?id=%CID%', NULL, 'h'),
-(61, 12, 'lead', 'http://www.bonussponsor.de/interface/out_lead.php', 'http://www.bonussponsor.de/lead.php?id=%CID%', NULL, 'h'),
-(60, 12, 'popdown', 'http://www.bonussponsor.de/interface/out_popdown.php', 'http://www.bonussponsor.de/popdown.php?id=%CID%', NULL, 'h'),
-(59, 12, 'popup', 'http://www.bonussponsor.de/interface/out_popup.php', 'http://www.bonussponsor.de/popup.php?id=%CID%', NULL, 'h'),
-(62, 12, 'sale', 'http://www.bonussponsor.de/interface/out_sale.php', 'http://www.bonussponsor.de/sale.php?id=%CID%', NULL, 'h'),
-(52, 12, 'textlink_click', 'http://www.bonussponsor.de/interface/out_textlink.php', 'http://www.bonussponsor.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(53, 12, 'textlink_view', 'http://www.bonussponsor.de/interface/out_textlink.php', 'http://www.bonussponsor.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(55, 12, 'textmail', 'http://www.bonussponsor.de/interface/out_paidmail.php', 'http://www.bonussponsor.de/emailf.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(61, 12, 'lead', 'http://www.bonussponsor.de/interface/out_lead.php', 'http://www.bonussponsor.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(62, 12, 'sale', 'http://www.bonussponsor.de/interface/out_sale.php', 'http://www.bonussponsor.de/sale.php?id=%CID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - City-Ads
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(215, 24, 'banner_click', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.city-ads.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(214, 24, 'banner_view', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.city-ads.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(217, 24, 'button_view', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.city-ads.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(212, 24, 'forcedbanner', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.city-ads.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(213, 24, 'forcedtextlink', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(220, 24, 'popup', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(216, 24, 'skybanner_view', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.city-ads.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(218, 24, 'textlink_view', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(221, 24, 'textmail', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(219, 24, 'traffic', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(215, 24, 'banner_click', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.city-ads.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(214, 24, 'banner_view', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.city-ads.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(217, 24, 'button_view', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.city-ads.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(212, 24, 'forced_banner', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.city-ads.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(213, 24, 'forced_textlink', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(220, 24, 'popup', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(216, 24, 'skyscraper_view', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.city-ads.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(218, 24, 'textlink_view', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(221, 24, 'textmail', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(219, 24, 'traffic', 'http://www.city-ads.de/interface/api_2.php', 'http://www.city-ads.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - doubleads
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(232, 26, 'banner_click', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h'),
-(233, 26, 'banner_view', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h'),
-(234, 26, 'textlink_click', 'http://www.doubleads.de/interface/out_textlink.php', 'http://www.doubleads.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(235, 26, 'textlink_view', 'http://www.doubleads.de/interface/out_textlink.php', 'http://www.doubleads.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(236, 26, 'surfbar_click', 'http://www.doubleads.de/interface/out_sbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h'),
-(237, 26, 'surfbar_view', 'http://www.doubleads.de/interface/out_sbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h'),
-(238, 26, 'forcedbanner', 'http://www.doubleads.de/interface/out_fbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h'),
-(239, 26, 'textmail', 'http://www.doubleads.de/interface/out_paidmail.php', 'http://www.doubleads.de/emailf.php?id=%CID%', NULL, 'h'),
-(240, 26, 'htmlmail', 'http://www.doubleads.de/interface/out_paidmail.php', 'http://www.doubleads.de/emailf.php?id=%CID%', NULL, 'h'),
-(241, 26, 'layer_click', 'http://www.doubleads.de/interface/out_layer.php', 'http://www.doubleads.de/layer.php?id=%CID%', NULL, 'h'),
-(242, 26, 'layer_view', 'http://www.doubleads.de/interface/out_layer.php', 'http://www.doubleads.de/layer.php?id=%CID%', NULL, 'h'),
-(243, 26, 'popup', 'http://www.doubleads.de/interface/out_popup.php', 'http://www.doubleads.de/popup.php?id=%CID%', NULL, 'h'),
-(244, 26, 'popdown', 'http://www.doubleads.de/interface/out_popdown.php', 'http://www.doubleads.de/popdown.php?id=%CID%', NULL, 'h'),
-(245, 26, 'lead', 'http://www.doubleads.de/interface/out_lead.php', 'http://www.doubleads.de/lead.php?id=%CID%', NULL, 'h'),
-(246, 26, 'sale', 'http://www.doubleads.de/interface/out_sale.php', 'http://www.doubleads.de/sale.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(232, 26, 'banner_click', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(233, 26, 'banner_view', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(234, 26, 'textlink_click', 'http://www.doubleads.de/interface/out_textlink.php', 'http://www.doubleads.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(235, 26, 'textlink_view', 'http://www.doubleads.de/interface/out_textlink.php', 'http://www.doubleads.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(236, 26, 'surfbar_click', 'http://www.doubleads.de/interface/out_sbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(237, 26, 'surfbar_view', 'http://www.doubleads.de/interface/out_sbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(238, 26, 'forced_banner', 'http://www.doubleads.de/interface/out_fbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(239, 26, 'textmail', 'http://www.doubleads.de/interface/out_paidmail.php', 'http://www.doubleads.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(240, 26, 'htmlmail', 'http://www.doubleads.de/interface/out_paidmail.php', 'http://www.doubleads.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(241, 26, 'layer_click', 'http://www.doubleads.de/interface/out_layer.php', 'http://www.doubleads.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(242, 26, 'layer_view', 'http://www.doubleads.de/interface/out_layer.php', 'http://www.doubleads.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(243, 26, 'popup', 'http://www.doubleads.de/interface/out_popup.php', 'http://www.doubleads.de/popup.php?id=%CID%', NULL, 'h', 'NONE'),
+(244, 26, 'popdown', 'http://www.doubleads.de/interface/out_popdown.php', 'http://www.doubleads.de/popdown.php?id=%CID%', NULL, 'h', 'NONE'),
+(245, 26, 'lead', 'http://www.doubleads.de/interface/out_lead.php', 'http://www.doubleads.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(246, 26, 'sale', 'http://www.doubleads.de/interface/out_sale.php', 'http://www.doubleads.de/sale.php?id=%CID%', NULL, 'h', 'NONE'),
+(509, 26, 'button_click', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(510, 26, 'button_view', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(511, 26, 'halfbanner_click', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(512, 26, 'halfbanner_view', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(513, 26, 'skyscraper_click', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(514, 26, 'skyscraper_view', 'http://www.doubleads.de/interface/out_banner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(515, 26, 'forced_button', 'http://www.doubleads.de/interface/out_fbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(516, 26, 'forced_half_banner', 'http://www.doubleads.de/interface/out_fbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(517, 26, 'forced_skyscraper', 'http://www.doubleads.de/interface/out_fbanner.php', 'http://www.doubleads.de/bannerklf.php?id=%CID%', 'http://www.doubleads.de/banner.php?id=%CID%', 'h', 'NONE')");
 
                // Network type handlers - eu-ADS.de
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
-(431, 42, 'forcedbanner', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.eu-ads.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(432, 42, 'forcedtextlink', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL,'h','NONE'),
-(433, 42, 'banner_view', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.eu-ads.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(434, 42, 'banner_click', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.eu-ads.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(435, 42, 'skybanner_view', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.eu-ads.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(436, 42, 'button_view', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.eu-ads.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(437, 42, 'textlink_view', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL,'h','NONE'),
-(438, 42, 'traffic', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL,'h','NONE'),
-(439, 42, 'popup', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL,'h','NONE'),
-(440, 42, 'textmail', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL,'h','NONE')");
+(431, 42, 'forced_banner', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.eu-ads.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(432, 42, 'forced_textlink', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(433, 42, 'banner_view', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.eu-ads.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(434, 42, 'banner_click', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.eu-ads.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(435, 42, 'skyscraper_view', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.eu-ads.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(436, 42, 'button_view', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.eu-ads.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(437, 42, 'textlink_view', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(438, 42, 'traffic', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(439, 42, 'popup', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(440, 42, 'textmail', 'http://www.eu-ads.de/interface/api_2.php', 'http://www.eu-ads.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - FuCoExSponsor.net
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
-(273, 29, 'banner_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(274, 29, 'banner_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(275, 29, 'button_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(276, 29, 'button_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(277, 29, 'forcedbanner', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(278, 29, 'forcedtextlink', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', NULL, 'h', 'NONE'),
-(279, 29, 'htmlmail', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', NULL, 'h', 'BASE64'),
-(280, 29, 'layer', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/sc_layer.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', NULL, 'h', 'NONE'),
-(281, 29, 'textmail', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', NULL, 'h', 'NONE'),
-(282, 29, 'popup', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/sc_popup.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', NULL, 'h', 'NONE'),
-(283, 29, 'skybanner_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(284, 29, 'skybanner_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(285, 29, 'surfbar_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(286, 29, 'surfbar_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', 'h', 'NONE'),
-(287, 29, 'textlink_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', NULL, 'h', 'NONE'),
-(288, 29, 'textlink_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/sc_textview.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', NULL, 'h', 'NONE'),
-(289, 29, 'traffic', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%', NULL, 'h', 'NONE')");
+(273, 29, 'banner_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(274, 29, 'banner_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(275, 29, 'button_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(276, 29, 'button_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(277, 29, 'forced_banner', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(278, 29, 'forced_textlink', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(279, 29, 'htmlmail', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', NULL, 'h', 'BASE64'),
+(280, 29, 'layer', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/sc_layer.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(281, 29, 'textmail', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(282, 29, 'popup', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/sc_popup.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(283, 29, 'skyscraper_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(284, 29, 'skyscraper_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(285, 29, 'surfbar_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(286, 29, 'surfbar_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'http://fucoexsponsor.net/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', 'h', 'NONE'),
+(287, 29, 'textlink_click', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(288, 29, 'textlink_view', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/sc_textview.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(289, 29, 'traffic', 'http://fucoexsponsor.net/int/get.php', 'http://fucoexsponsor.net/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%&subid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Fusion-Ads
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(290, 13, 'forcedbanner', 'http://www.fusion-ads.de/data/get.php', 'http://www.fusion-ads.de/data/werbung.php?uid=%UID%&kid=%CID%&sid=%SID%&art=32&step=1', 'http://www.fusion-ads.de/data/werbung.php?uid=%UID%&kid=%CID%&sid=%SID%&art=32', 'h'),
-(291, 13, 'textmail', 'http://www.fusion-ads.de/data/get.php', 'ttp://www.fusion-ads.de/data/werbung.php?uid=%UID%&kid=%CID%&sid=%SID%&art=33', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(290, 13, 'forced_banner', 'http://www.fusion-ads.de/data/get.php', 'http://www.fusion-ads.de/data/werbung.php?uid=%UID%&kid=%CID%&sid=%SID%&art=32&step=1', 'http://www.fusion-ads.de/data/werbung.php?uid=%UID%&kid=%CID%&sid=%SID%&art=32', 'h', 'NONE'),
+(291, 13, 'textmail', 'http://www.fusion-ads.de/data/get.php', 'ttp://www.fusion-ads.de/data/werbung.php?uid=%UID%&kid=%CID%&sid=%SID%&art=33', NULL, 'h', 'NONE')");
 
                // Network type handlers - GigaPromo
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(102, 14, 'banner_view', 'http://www.gigapromo.de/interface/output_viewbanner.php', 'http://www.gigapromo.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gigapromo.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(104, 14, 'forcedbanner', 'http://www.gigapromo.de/interface/output_forcedbanner.php', 'http://www.gigapromo.de/view/forcedclickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gigapromo.de/view/forcedviewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(105, 14, 'forcedtextlink', 'http://www.gigapromo.de/interface/output_forcedtextlink.php', 'http://www.gigapromo.de/view/forcedclicktextlink.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(103, 14, 'layer_view', 'http://www.gigapromo.de/interface/output_layerviews.php', 'http://www.gigapromo.de/view/layer.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(108, 14, 'popdown', 'http://www.gigapromo.de/interface/output_popdown.php', 'http://www.gigapromo.de/view/popdown.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(107, 14, 'popup', 'http://www.gigapromo.de/interface/output_popup.php', 'http://www.gigapromo.de/view/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(106, 14, 'textmail', 'http://www.gigapromo.de/interface/output_paidmails.php', 'http://www.gigapromo.de/view/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(122, 14, 'traffic', 'http://www.gigapromo.de/interface/output_traffic.php', 'http://www.gigapromo.de/view/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(102, 14, 'banner_view', 'http://www.gigapromo.de/interface/output_viewbanner.php', 'http://www.gigapromo.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gigapromo.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(104, 14, 'forced_banner', 'http://www.gigapromo.de/interface/output_forcedbanner.php', 'http://www.gigapromo.de/view/forcedclickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gigapromo.de/view/forcedviewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(105, 14, 'forced_textlink', 'http://www.gigapromo.de/interface/output_forcedtextlink.php', 'http://www.gigapromo.de/view/forcedclicktextlink.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(103, 14, 'layer_view', 'http://www.gigapromo.de/interface/output_layerviews.php', 'http://www.gigapromo.de/view/layer.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(108, 14, 'popdown', 'http://www.gigapromo.de/interface/output_popdown.php', 'http://www.gigapromo.de/view/popdown.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(107, 14, 'popup', 'http://www.gigapromo.de/interface/output_popup.php', 'http://www.gigapromo.de/view/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(106, 14, 'textmail', 'http://www.gigapromo.de/interface/output_paidmails.php', 'http://www.gigapromo.de/view/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(122, 14, 'traffic', 'http://www.gigapromo.de/interface/output_traffic.php', 'http://www.gigapromo.de/view/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(519, 14, 'button_view', 'http://www.gigapromo.de/interface/output_viewbanner.php', 'http://www.gigapromo.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gigapromo.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(521, 14, 'halfbanner_view', 'http://www.gigapromo.de/interface/output_viewbanner.php', 'http://www.gigapromo.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gigapromo.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(522, 14, 'skyscraper_view', 'http://www.gigapromo.de/interface/output_viewbanner.php', 'http://www.gigapromo.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gigapromo.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE')");
 
                // Network type handlers - Gold-Sponsor
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(225, 25, 'banner_click', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(224, 25, 'banner_view', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(227, 25, 'button_view', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(222, 25, 'forcedbanner', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(223, 25, 'forcedtextlink', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(230, 25, 'popup', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(226, 25, 'skybanner_view', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(228, 25, 'textlink_view', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(231, 25, 'textmail', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(229, 25, 'traffic', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(225, 25, 'banner_click', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(224, 25, 'banner_view', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(227, 25, 'button_view', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(222, 25, 'forced_banner', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(223, 25, 'forced_textlink', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(230, 25, 'popup', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(226, 25, 'skyscraper_view', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.gold-sponsor.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(228, 25, 'textlink_view', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(231, 25, 'textmail', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(229, 25, 'traffic', 'http://www.gold-sponsor.de/interface/', 'http://www.gold-sponsor.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - homeADS
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(260, 28, 'banner_click', 'http://www.homeads.de/interface/out_banner.php', 'http://www.homeads.de/bannerklf.php?id=%CID%', 'http://www.homeads.de/banner.php?id=%CID%', 'h'),
-(261, 28, 'banner_view', 'http://www.homeads.de/interface/out_banner.php', 'http://www.homeads.de/bannerklf.php?id=%CID%', 'http://www.homeads.de/banner.php?id=%CID%', 'h'),
-(264, 28, 'forcedbanner', 'http://www.homeads.de/interface/out_fbanner.php', 'http://www.homeads.de/bannerklf.php?id=%CID%', 'http://www.homeads.de/banner.php?id=%CID%', 'h'),
-(266, 28, 'htmlmail', 'http://www.homeads.de/interface/out_paidmail.php', 'http://www.homeads.de/emailf.php?id=%CID%', NULL, 'h'),
-(267, 28, 'layer_click', 'http://www.homeads.de/interface/out_layer.php', 'http://www.homeads.de/layer.php?id=%CID%', NULL, 'h'),
-(268, 28, 'layer_view', 'http://www.homeads.de/interface/out_layer.php', 'http://www.homeads.de/layer.php?id=%CID%', NULL, 'h'),
-(271, 28, 'lead', 'http://www.homeads.de/interface/out_lead.php', 'http://www.homeads.de/lead.php?id=%CID%', NULL, 'h'),
-(270, 28, 'popdown', 'http://www.homeads.de/interface/out_popdown.php', 'http://www.homeads.de/popdown.php?id=%CID%', NULL, 'h'),
-(269, 28, 'popup', 'http://www.homeads.de/interface/out_popup.php', 'http://www.homeads.de/popup.php?id=%CID%', NULL, 'h'),
-(272, 28, 'sale', 'http://www.homeads.de/interface/out_sale.php', 'http://www.homeads.de/sale.php?id=%CID%', NULL, 'h'),
-(262, 28, 'textlink_click', 'http://www.homeads.de/interface/out_textlink.php', 'http://www.homeads.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(263, 28, 'textlink_view', 'http://www.homeads.de/interface/out_textlink.php', 'http://www.homeads.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(265, 28, 'textmail', 'http://www.homeads.de/interface/out_paidmail.php', 'http://www.homeads.de/emailf.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(260, 28, 'banner_click', 'http://www.homeads.de/interface/out_banner.php', 'http://www.homeads.de/bannerklf.php?id=%CID%', 'http://www.homeads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(261, 28, 'banner_view', 'http://www.homeads.de/interface/out_banner.php', 'http://www.homeads.de/bannerklf.php?id=%CID%', 'http://www.homeads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(264, 28, 'forced_banner', 'http://www.homeads.de/interface/out_fbanner.php', 'http://www.homeads.de/bannerklf.php?id=%CID%', 'http://www.homeads.de/banner.php?id=%CID%', 'h', 'NONE'),
+(266, 28, 'htmlmail', 'http://www.homeads.de/interface/out_paidmail.php', 'http://www.homeads.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(267, 28, 'layer_click', 'http://www.homeads.de/interface/out_layer.php', 'http://www.homeads.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(268, 28, 'layer_view', 'http://www.homeads.de/interface/out_layer.php', 'http://www.homeads.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(271, 28, 'lead', 'http://www.homeads.de/interface/out_lead.php', 'http://www.homeads.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(270, 28, 'popdown', 'http://www.homeads.de/interface/out_popdown.php', 'http://www.homeads.de/popdown.php?id=%CID%', NULL, 'h', 'NONE'),
+(269, 28, 'popup', 'http://www.homeads.de/interface/out_popup.php', 'http://www.homeads.de/popup.php?id=%CID%', NULL, 'h', 'NONE'),
+(272, 28, 'sale', 'http://www.homeads.de/interface/out_sale.php', 'http://www.homeads.de/sale.php?id=%CID%', NULL, 'h', 'NONE'),
+(262, 28, 'textlink_click', 'http://www.homeads.de/interface/out_textlink.php', 'http://www.homeads.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(263, 28, 'textlink_view', 'http://www.homeads.de/interface/out_textlink.php', 'http://www.homeads.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(265, 28, 'textmail', 'http://www.homeads.de/interface/out_paidmail.php', 'http://www.homeads.de/emailf.php?id=%CID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - HPSponsor
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(135, 15, 'banner_click', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://hpsponsor.at/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(136, 15, 'banner_view', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://hpsponsor.at/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(137, 15, 'button_view', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://hpsponsor.at/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(138, 15, 'forcedbanner', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://hpsponsor.at/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(139, 15, 'forcedtextlink', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(140, 15, 'popup', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(141, 15, 'skybanner_view', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://hpsponsor.at/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(142, 15, 'textlink_view', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(143, 15, 'textmail', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(144, 15, 'traffic', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/traffic.php?id=%UID%&bid=%CID%&aid=%CID%&trackid=%TID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(135, 15, 'banner_click', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://hpsponsor.at/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(136, 15, 'banner_view', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://hpsponsor.at/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(137, 15, 'button_view', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://hpsponsor.at/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(138, 15, 'forced_banner', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://hpsponsor.at/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(139, 15, 'forced_textlink', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(140, 15, 'popup', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(141, 15, 'skyscraper_view', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://hpsponsor.at/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(142, 15, 'textlink_view', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(143, 15, 'textmail', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(144, 15, 'traffic', 'http://hpsponsor.at/interface/api_2.php', 'http://hpsponsor.at/codes/traffic.php?id=%UID%&bid=%CID%&aid=%CID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Make-Euros
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(63, 16, 'banner_click', 'http://www.make-euros.de/interface/out_banner.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h'),
-(64, 16, 'banner_view', 'http://www.make-euros.de/interface/out_banner.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h'),
-(68, 16, 'forcedbanner', 'http://www.make-euros.de/interface/out_fbanner.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h'),
-(71, 16, 'htmlmail', 'http://www.make-euros.de/interface/out_paidmail.php', 'http://www.make-euros.de/emailf.php?id=%CID%', NULL, 'h'),
-(72, 16, 'layer_click', 'http://www.make-euros.de/interface/out_layer.php', 'http://www.make-euros.de/layer.php?id=%CID%', NULL, 'h'),
-(73, 16, 'layer_view', 'http://www.make-euros.de/interface/out_layer.php', 'http://www.make-euros.de/layer.php?id=%CID%', NULL, 'h'),
-(76, 16, 'lead', 'http://www.make-euros.de/interface/out_lead.php', 'http://www.make-euros.de/lead.php?id=%CID%', NULL, 'h'),
-(75, 16, 'popdown', 'http://www.make-euros.de/interface/out_popdown.php', 'http://www.make-euros.de/popdown.php?id=%CID%', NULL, 'h'),
-(74, 16, 'popup', 'http://www.make-euros.de/interface/out_popup.php', 'http://www.make-euros.de/popup.php?id=%CID%', NULL, 'h'),
-(77, 16, 'sale', 'http://www.make-euros.de/interface/out_sale.php', 'http://www.make-euros.de/sale.php?id=%CID%', NULL, 'h'),
-(67, 16, 'surfbar_click', 'http://www.make-euros.de/interface/out_sbanner.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h'),
-(69, 16, 'surfbar_view', 'http://www.make-euros.de/interface/out_sbanner.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h'),
-(65, 16, 'textlink_click', 'http://www.make-euros.de/interface/out_textlink.php', 'http://www.make-euros.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(66, 16, 'textlink_view', 'http://www.make-euros.de/interface/out_textlink.php', 'http://www.make-euros.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(70, 16, 'textmail', 'http://www.make-euros.de/interface/out_paidmail.php', 'http://www.make-euros.de/emailf.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(63, 16, 'banner_click', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h', 'NONE'),
+(64, 16, 'banner_view', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h', 'NONE'),
+(65, 16, 'textlink_click', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(66, 16, 'textlink_view', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(67, 16, 'surfbar_click', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h', 'NONE'),
+(68, 16, 'forced_banner', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h', 'NONE'),
+(69, 16, 'surfbar_view', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/bannerklf.php?id=%CID%', 'http://www.make-euros.de/banner.php?id=%CID%', 'h', 'NONE'),
+(70, 16, 'textmail', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(71, 16, 'htmlmail', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(72, 16, 'layer_click', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(73, 16, 'layer_view', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(74, 16, 'popup', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/popup.php?id=%CID%', NULL, 'h', 'NONE'),
+(75, 16, 'popdown', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/popdown.php?id=%CID%', NULL, 'h', 'NONE'),
+(76, 16, 'lead', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(77, 16, 'sale', 'http://www.make-euros.de/interface/output.php', 'http://www.make-euros.de/sale.php?id=%CID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Mega-Ad
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(112, 17, 'banner_click', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/view.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(111, 17, 'banner_view', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(114, 17, 'button_view', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(109, 17, 'forcedbanner', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(110, 17, 'forcedtextlink', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(116, 17, 'popup', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(113, 17, 'skybanner_view', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(115, 17, 'textlink_view', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(117, 17, 'textmail', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(123, 17, 'traffic', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(112, 17, 'banner_click', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/view.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(111, 17, 'banner_view', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(114, 17, 'button_view', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(109, 17, 'forced_banner', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(110, 17, 'forced_textlink', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(116, 17, 'popup', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(113, 17, 'skyscraper_view', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.mega-ad.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(115, 17, 'textlink_view', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(117, 17, 'textmail', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(123, 17, 'traffic', 'http://www.mega-ad.de/interface/', 'http://www.mega-ad.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - Power-Promo
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(78, 18, 'banner_click', 'http://www.power-promo.de/interface/out_banner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h'),
-(79, 18, 'banner_view', 'http://www.power-promo.de/interface/out_banner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h'),
-(84, 18, 'forcedbanner', 'http://www.power-promo.de/interface/out_fbanner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h'),
-(86, 18, 'htmlmail', 'http://www.power-promo.de/interface/out_paidmail.php', 'http://www.power-promo.de/emailf.php?id=%CID%', NULL, 'h'),
-(87, 18, 'layer_click', 'http://www.power-promo.de/interface/out_layer.php', 'http://www.power-promo.de/layer.php?id=%CID%', NULL, 'h'),
-(88, 18, 'layer_view', 'http://www.power-promo.de/interface/out_layer.php', 'http://www.power-promo.de/layer.php?id=%CID%', NULL, 'h'),
-(91, 18, 'lead', 'http://www.power-promo.de/interface/out_lead.php', 'http://www.power-promo.de/lead.php?id=%CID%', NULL, 'h'),
-(90, 18, 'popdown', 'http://www.power-promo.de/interface/out_popdown.php', 'http://www.power-promo.de/popdown.php?id=%CID%', NULL, 'h'),
-(89, 18, 'popup', 'http://www.power-promo.de/interface/out_popup.php', 'http://www.power-promo.de/popup.php?id=%CID%', NULL, 'h'),
-(92, 18, 'sale', 'http://www.power-promo.de/interface/out_sale.php', 'http://www.power-promo.de/sale.php?id=%CID%', NULL, 'h'),
-(82, 18, 'surfbar_click', 'http://www.power-promo.de/interface/out_sbanner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h'),
-(83, 18, 'surfbar_view', 'http://www.power-promo.de/interface/out_sbanner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h'),
-(80, 18, 'textlink_click', 'http://www.power-promo.de/interface/out_textlink.php', 'http://www.power-promo.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(81, 18, 'textlink_view', 'http://www.power-promo.de/interface/out_textlink.php', 'http://www.power-promo.de/textlinkklick.php?id=%CID%', NULL, 'h'),
-(85, 18, 'textmail', 'http://www.power-promo.de/interface/out_paidmail.php', 'http://www.power-promo.de/emailf.php?id=%CID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(78, 18, 'banner_click', 'http://www.power-promo.de/interface/out_banner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h', 'NONE'),
+(79, 18, 'banner_view', 'http://www.power-promo.de/interface/out_banner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h', 'NONE'),
+(84, 18, 'forced_banner', 'http://www.power-promo.de/interface/out_fbanner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h', 'NONE'),
+(86, 18, 'htmlmail', 'http://www.power-promo.de/interface/out_paidmail.php', 'http://www.power-promo.de/emailf.php?id=%CID%', NULL, 'h', 'NONE'),
+(87, 18, 'layer_click', 'http://www.power-promo.de/interface/out_layer.php', 'http://www.power-promo.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(88, 18, 'layer_view', 'http://www.power-promo.de/interface/out_layer.php', 'http://www.power-promo.de/layer.php?id=%CID%', NULL, 'h', 'NONE'),
+(91, 18, 'lead', 'http://www.power-promo.de/interface/out_lead.php', 'http://www.power-promo.de/lead.php?id=%CID%', NULL, 'h', 'NONE'),
+(90, 18, 'popdown', 'http://www.power-promo.de/interface/out_popdown.php', 'http://www.power-promo.de/popdown.php?id=%CID%', NULL, 'h', 'NONE'),
+(89, 18, 'popup', 'http://www.power-promo.de/interface/out_popup.php', 'http://www.power-promo.de/popup.php?id=%CID%', NULL, 'h', 'NONE'),
+(92, 18, 'sale', 'http://www.power-promo.de/interface/out_sale.php', 'http://www.power-promo.de/sale.php?id=%CID%', NULL, 'h', 'NONE'),
+(82, 18, 'surfbar_click', 'http://www.power-promo.de/interface/out_sbanner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h', 'NONE'),
+(83, 18, 'surfbar_view', 'http://www.power-promo.de/interface/out_sbanner.php', 'http://www.power-promo.de/bannerklf.php?id=%CID%', 'http://www.power-promo.de/banner.php?id=%CID%', 'h', 'NONE'),
+(80, 18, 'textlink_click', 'http://www.power-promo.de/interface/out_textlink.php', 'http://www.power-promo.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(81, 18, 'textlink_view', 'http://www.power-promo.de/interface/out_textlink.php', 'http://www.power-promo.de/textlinkklick.php?id=%CID%', NULL, 'h', 'NONE'),
+(85, 18, 'textmail', 'http://www.power-promo.de/interface/out_paidmail.php', 'http://www.power-promo.de/emailf.php?id=%CID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - SeCash
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(93, 19, 'forcedbanner', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.secash.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(94, 19, 'forcedtextlink', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(95, 19, 'banner_view', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.secash.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(96, 19, 'banner_click', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.secash.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(97, 19, 'skybanner_view', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.secash.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(98, 19, 'button_view', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.secash.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(99, 19, 'textlink_view', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(100, 19, 'popup', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(101, 19, 'textmail', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(124, 19, 'traffic', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(93, 19, 'forced_banner', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.secash.de/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(94, 19, 'forced_textlink', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(95, 19, 'banner_view', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.secash.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(96, 19, 'banner_click', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.secash.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(97, 19, 'skyscraper_view', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.secash.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(98, 19, 'button_view', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.secash.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(99, 19, 'textlink_view', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(100, 19, 'popup', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(101, 19, 'textmail', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(124, 19, 'traffic', 'http://www.secash.de/interface/api_2.php', 'http://www.secash.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - SuperPromo24
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
-(416, 41, 'banner_click', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%','h','NONE'),
-(417, 41, 'banner_view', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%','h','NONE'),
-(418, 41, 'button_click', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%','h','NONE'),
-(419, 41, 'button_view', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%','h','NONE'),
-(420, 41, 'forcedbanner', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%','h','NONE'),
-(421, 41, 'forcedtextlink', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL,'h','NONE'),
-(422, 41, 'htmlmail', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL,'h','BASE64'),
-(423, 41, 'layer', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/sc_layer.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL,'h','NONE'),
-(424, 41, 'pagepeel', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%','h','NONE'),
-(425, 41, 'textmail', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL,'h','NONE'),
-(426, 41, 'popup', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/sc_popup.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL,'h','NONE'),
-(427, 41, 'skybanner_click', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%','h','NONE'),
-(428, 41, 'skybanner_view', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%','h','NONE'),
-(429, 41, 'textlink_click', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL,'h','NONE'),
-(430, 41, 'traffic', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL,'h','NONE')");
-
-               // Network type handlers - WeltPromotion
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(205, 20, 'banner_click', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.weltpromotion.de/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(204, 20, 'banner_view', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.weltpromotion.de/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(207, 20, 'button_view', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.weltpromotion.de/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(202, 20, 'forcedbanner', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.weltpromotion.de/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(203, 20, 'forcedtextlink', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(210, 20, 'popup', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(206, 20, 'skybanner_view', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', 'http://www.weltpromotion.de/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(208, 20, 'textlink_view', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(211, 20, 'textmail', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h'),
-(209, 20, 'traffic', 'http://www.weltpromotion.de/interface/api_2.php', 'http://www.weltpromotion.de/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%', NULL, 'h')");
+(416, 41, 'banner_click', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(417, 41, 'banner_view', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(418, 41, 'button_click', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(419, 41, 'button_view', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(420, 41, 'forced_banner', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(421, 41, 'forced_textlink', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(422, 41, 'htmlmail', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h','BASE64'),
+(423, 41, 'layer', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/sc_layer.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(424, 41, 'pagepeel', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(425, 41, 'textmail', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(426, 41, 'popup', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/sc_popup.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(427, 41, 'skyscraper_click', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(428, 41, 'skyscraper_view', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', 'http://www.superpromo24.de/kamp/b_view.php?uid=%UID%&bid=%CID%&sid=%SID%', 'h', 'NONE'),
+(429, 41, 'textlink_click', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(430, 41, 'traffic', 'http://www.superpromo24.de/int/get.php', 'http://www.superpromo24.de/kamp/ziel.php?uid=%UID%&bid=%CID%&sid=%SID%', NULL, 'h', 'NONE')");
 
                // Network type handlers - UltraPROMO
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(125, 21, 'banner_click', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ultrapromo.eu/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(126, 21, 'banner_view', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ultrapromo.eu/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(127, 21, 'button_view', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ultrapromo.eu/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(128, 21, 'forcedbanner', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/forcedbannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ultrapromo.eu/codes/forcedbannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(129, 21, 'forcedtextlink', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/forcedtextlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(130, 21, 'popup', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(131, 21, 'skybanner_view', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.ultrapromo.eu/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h'),
-(132, 21, 'textlink_view', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(133, 21, 'textmail', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h'),
-(134, 21, 'traffic', 'http://www.ultrapromo.eu/interface/', 'http://www.ultrapromo.eu/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(125, 21, 'banner_click', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ultrapromo.eu/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(126, 21, 'banner_view', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ultrapromo.eu/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(127, 21, 'button_view', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/buttonklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ultrapromo.eu/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(128, 21, 'forced_banner', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ultrapromo.eu/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(129, 21, 'forced_textlink', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(130, 21, 'popup', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(131, 21, 'skyscraper_view', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.ultrapromo.eu/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(132, 21, 'textlink_view', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(133, 21, 'textmail', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(134, 21, 'traffic', 'http://www.ultrapromo.eu/interface/api_2.php', 'http://www.ultrapromo.eu/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
 
                // Network type handlers - VIPads.de
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
@@ -883,57 +947,83 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (248, 27, 'banner_view', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
 (249, 27, 'button_click', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
 (250, 27, 'button_view', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
-(251, 27, 'forcedbanner', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
+(251, 27, 'forced_banner', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
 (252, 27, 'htmlmail', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', NULL, 'h', 'BASE64'),
 (253, 27, 'layer', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/sc_layer.php?uid=%UID%&bid=%BID%&sid=%SID%', NULL, 'h', 'NONE'),
 (255, 27, 'popup', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/sc_popup.php?uid=%UID%&bid=%BID%&sid=%SID%', NULL, 'h', 'NONE'),
-(256, 27, 'skybanner_click', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
-(257, 27, 'skybanner_view', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
+(256, 27, 'skyscraper_click', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
+(257, 27, 'skyscraper_view', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', 'http://vipads.de/kamp/b_view.php?uid=%UID%&bid=%BID%&sid=%SID%', 'h', 'NONE'),
 (258, 27, 'textlink_click', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', NULL, 'h', 'NONE'),
 (254, 27, 'textmail', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', NULL, 'h', 'NONE'),
 (259, 27, 'traffic', 'http://vipads.de/int/get.php', 'http://vipads.de/kamp/ziel.php?uid=%UID%&bid=%BID%&sid=%SID%', NULL, 'h', 'NONE')");
 
+               // Network type handlers - WeltPromotion
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(205, 20, 'banner_click', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.the-switzerland-ad-network.ch/codes/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(204, 20, 'banner_view', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.the-switzerland-ad-network.ch/codes/bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(207, 20, 'button_view', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.the-switzerland-ad-network.ch/codes/buttonview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(202, 20, 'forced_banner', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/forced_bannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.the-switzerland-ad-network.ch/codes/forced_bannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(203, 20, 'forced_textlink', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/forced_textlinkklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(210, 20, 'popup', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/popup.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(206, 20, 'skyscraper_view', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/skybannerklick.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', 'http://www.the-switzerland-ad-network.ch/codes/skybannerview.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(208, 20, 'textlink_view', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/textlinkview.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(211, 20, 'textmail', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE'),
+(209, 20, 'traffic', 'http://www.the-switzerland-ad-network.ch/interface/api_2.php', 'http://www.the-switzerland-ad-network.ch/codes/traffic.php?id=%UID%&bid=%CID%&aid=%SID%&trackid=%TID%&vc=%VPC%', NULL, 'h', 'NONE')");
+
                // Network type handlers - Der Werbepartner.cc
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(145, 22, 'textlink_click', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/werbung.php', NULL, 'h'),
-(146, 22, 'forcedbanner', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/werbung.php', 'http://www.werbepartner.cc/sponsor/data/werbung.php', 'h'),
-(147, 22, 'textmail', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/werbung.php', NULL, 'h'),
-(148, 22, 'layer', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h'),
-(149, 22, 'skybanner_click', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'h'),
-(150, 22, 'surfbar_click', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h'),
-(151, 22, 'banner_view', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'h'),
-(152, 22, 'popup', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h'),
-(153, 22, 'banner_click', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'h'),
-(154, 22, 'forcedtextlink', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h'),
-(155, 22, 'traffic', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(145, 22, 'textlink_click', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/werbung.php', NULL, 'h', 'NONE'),
+(146, 22, 'forced_banner', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/werbung.php', 'http://www.werbepartner.cc/sponsor/data/werbung.php', 'h', 'NONE'),
+(147, 22, 'textmail', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/werbung.php', NULL, 'h', 'NONE'),
+(148, 22, 'layer', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h', 'NONE'),
+(149, 22, 'skyscraper_click', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'h', 'NONE'),
+(150, 22, 'surfbar_click', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h', 'NONE'),
+(151, 22, 'banner_view', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'h', 'NONE'),
+(152, 22, 'popup', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h', 'NONE'),
+(153, 22, 'banner_click', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', 'h', 'NONE'),
+(154, 22, 'forced_textlink', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h', 'NONE'),
+(155, 22, 'traffic', 'http://www.werbepartner.cc/sponsor/data/get.php', 'http://www.werbepartner.cc/sponsor/data/get.php', NULL, 'h', 'NONE')");
 
                // Network type handlers - Xiji.de
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
-(450, 43, 'textmail', 'http://www.xiji.de/interface/output_paidmails.php', 'http://www.xiji.de/view/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h','NONE'),
-(451, 43, 'banner_view', 'http://www.xiji.de/interface/output_viewbanner.php', 'http://www.xiji.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(452, 43, 'forcedbanner', 'http://www.xiji.de/interface/output_forcedbanner.php', 'http://www.xiji.de/view/forcedclickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/forcedviewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(453, 43, 'popup', 'http://www.xiji.de/interface/output_popup.php', 'http://www.xiji.de/view/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h','NONE'),
-(454, 43, 'layer_view', 'http://www.xiji.de/interface/output_layerviews.php', 'http://www.xiji.de/view/layer.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h','NONE'),
-(455, 43, 'forcedtextlink', 'http://www.xiji.de/interface/output_forcedtextlink.php', 'http://www.xiji.de/view/forcedclicktextlink.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h','NONE'),
-(456, 43, 'traffic', 'http://www.xiji.de/interface/output_traffic.php', 'http://www.xiji.de/view/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h','NONE'),
-(457, 43, 'popdown', 'http://www.xiji.de/interface/output_popdown.php', 'http://www.xiji.de/view/popdown.php?id=%UID%&bid=%CID%&aid=%SID%', NULL,'h','NONE'),
-(458, 43, 'button_view', 'http://www.xiji.de/interface/output_viewbanner.php', 'http://www.xiji.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(459, 43, 'skybanner_view', 'http://www.xiji.de/interface/output_viewbanner.php', 'http://www.xiji.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE'),
-(460, 43, 'halfbanner_view', 'http://www.xiji.de/interface/output_viewbanner.php', 'http://www.xiji.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%','h','NONE')");
+(450, 43, 'textmail', 'http://www.xiji.de/interface/output_paidmails.php', 'http://www.xiji.de/view/paidmail.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(451, 43, 'banner_view', 'http://www.xiji.de/interface/output_viewbanner.php', 'http://www.xiji.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(452, 43, 'forced_banner', 'http://www.xiji.de/interface/output_forcedbanner.php', 'http://www.xiji.de/view/forcedclickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/forcedviewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(453, 43, 'popup', 'http://www.xiji.de/interface/output_popup.php', 'http://www.xiji.de/view/popup.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(454, 43, 'layer_view', 'http://www.xiji.de/interface/output_layerviews.php', 'http://www.xiji.de/view/layer.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(455, 43, 'forced_textlink', 'http://www.xiji.de/interface/output_forcedtextlink.php', 'http://www.xiji.de/view/forcedclicktextlink.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(456, 43, 'traffic', 'http://www.xiji.de/interface/output_traffic.php', 'http://www.xiji.de/view/traffic.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(457, 43, 'popdown', 'http://www.xiji.de/interface/output_popdown.php', 'http://www.xiji.de/view/popdown.php?id=%UID%&bid=%CID%&aid=%SID%', NULL, 'h', 'NONE'),
+(458, 43, 'button_view', 'http://www.xiji.de/interface/output_viewbanner.php', 'http://www.xiji.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(459, 43, 'skyscraper_view', 'http://www.xiji.de/interface/output_viewbanner.php', 'http://www.xiji.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE'),
+(460, 43, 'halfbanner_view', 'http://www.xiji.de/interface/output_viewbanner.php', 'http://www.xiji.de/view/klickbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'http://www.xiji.de/view/viewbanner.php?id=%UID%&bid=%CID%&aid=%SID%', 'h', 'NONE')");
 
                // Network type handlers - Yoo!Media
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`) VALUES
-(156, 23, 'banner_click', 'http://www.yoomedia.de/interface_2.0/out_banner.php', 'http://www.yoomedia.de/code/z-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h'),
-(157, 23, 'textlink_click', 'http://www.yoomedia.de/interface_2.0/out_textlink.php', 'http://www.yoomedia.de/code/t-textlink.php?id=%CID%&sid=%SID%', NULL, 'h'),
-(158, 23, 'surfbar_click', 'http://www.yoomedia.de/interface_2.0/out_sbanner.php', 'http://www.yoomedia.de/code/s-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/s-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h'),
-(159, 23, 'forcedbanner', 'http://www.yoomedia.de/interface_2.0/out_fbanner.php', 'http://www.yoomedia.de/code/f-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/f-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h'),
-(160, 23, 'pagepeel', 'http://www.yoomedia.de/interface_2.0/out_pagepeel.php', 'http://www.yoomedia.de/code/p-peel.php?id=%CID%&sid=%SID%', NULL, 'h'),
-(161, 23, 'textmail', 'http://www.yoomedia.de/interface_2.0/out_textmail.php', 'http://www.yoomedia.de/code/t-mail.php?id=%CID%&sid=%SID%', NULL, 'h'),
-(162, 23, 'htmlmail', 'http://www.yoomedia.de/interface_2.0/out_htmlmail.php', 'http://www.yoomedia.de/code/h-mail.php?id=%CID%&sid=%SID%', NULL, 'h'),
-(163, 23, 'layer_click', 'http://www.yoomedia.de/interface_2.0/out_layer.php', 'http://www.yoomedia.de/code/l-layer.php?id=%CID%&sid=%SID%', NULL, 'h'),
-(164, 23, 'popup', 'http://www.yoomedia.de/interface_2.0/out_popup.php', 'http://www.yoomedia.de/code/p-popup.php?id=%CID%&sid=%SID%', NULL, 'h'),
-(165, 23, 'popdown', 'http://www.yoomedia.de/interface_2.0/out_popdown.php', 'http://www.yoomedia.de/code/p-popdown.php?id=%CID%&sid=%SID%', NULL, 'h'),
-(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, 'h')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES
+(156, 23, 'banner_click', 'http://www.yoomedia.de/interface_2.0/out_banner.php', 'http://www.yoomedia.de/code/z-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(157, 23, 'textlink_click', 'http://www.yoomedia.de/interface_2.0/out_textlink.php', 'http://www.yoomedia.de/code/t-textlink.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(158, 23, 'surfbar_click', 'http://www.yoomedia.de/interface_2.0/out_sbanner.php', 'http://www.yoomedia.de/code/s-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/s-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(159, 23, 'forced_banner', 'http://www.yoomedia.de/interface_2.0/out_fbanner.php', 'http://www.yoomedia.de/code/f-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/f-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(160, 23, 'pagepeel', 'http://www.yoomedia.de/interface_2.0/out_pagepeel.php', 'http://www.yoomedia.de/code/p-peel.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(161, 23, 'textmail', 'http://www.yoomedia.de/interface_2.0/out_textmail.php', 'http://www.yoomedia.de/code/t-mail.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(162, 23, 'htmlmail', 'http://www.yoomedia.de/interface_2.0/out_htmlmail.php', 'http://www.yoomedia.de/code/h-mail.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(163, 23, 'layer_click', 'http://www.yoomedia.de/interface_2.0/out_layer.php', 'http://www.yoomedia.de/code/l-layer.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(164, 23, 'popup', 'http://www.yoomedia.de/interface_2.0/out_popup.php', 'http://www.yoomedia.de/code/p-popup.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(165, 23, 'popdown', 'http://www.yoomedia.de/interface_2.0/out_popdown.php', 'http://www.yoomedia.de/code/p-popdown.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(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, 'h', 'NONE'),
+(525, 23, 'button_click', 'http://www.yoomedia.de/interface_2.0/out_banner.php', 'http://www.yoomedia.de/code/z-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(526, 23, 'halfbanner_click', 'http://www.yoomedia.de/interface_2.0/out_banner.php', 'http://www.yoomedia.de/code/z-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(527, 23, 'skyscraper_click', 'http://www.yoomedia.de/interface_2.0/out_banner.php', 'http://www.yoomedia.de/code/z-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(528, 23, 'forced_button', 'http://www.yoomedia.de/interface_2.0/out_fbanner.php', 'http://www.yoomedia.de/code/f-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/f-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(529, 23, 'forced_half_banner', 'http://www.yoomedia.de/interface_2.0/out_fbanner.php', 'http://www.yoomedia.de/code/f-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/f-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(530, 23, 'forced_skyscraper', 'http://www.yoomedia.de/interface_2.0/out_fbanner.php', 'http://www.yoomedia.de/code/f-bannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/f-banner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(531, 23, 'banner_view', 'http://www.yoomedia.de/interface_2.0/out_z-vbanner.php', 'http://www.yoomedia.de/code/z-vbannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-vbanner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(532, 23, 'button_view', 'http://www.yoomedia.de/interface_2.0/out_z-vbanner.php', 'http://www.yoomedia.de/code/z-vbannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-vbanner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(533, 23, 'halfbanner_view', 'http://www.yoomedia.de/interface_2.0/out_z-vbanner.php', 'http://www.yoomedia.de/code/z-vbannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-vbanner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(534, 23, 'skyscraper_view', 'http://www.yoomedia.de/interface_2.0/out_z-vbanner.php', 'http://www.yoomedia.de/code/z-vbannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/z-vbanner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(535, 23, 'surfbar_view', 'http://www.yoomedia.de/interface_2.0/out_s-vbanner.php', 'http://www.yoomedia.de/code/s-vbannerklf.php?id=%CID%&sid=%SID%', 'http://www.yoomedia.de/code/s-vbanner.php?id=%CID%&sid=%SID%&bid=%BID%', 'h', 'NONE'),
+(536, 23, 'textlink_view', 'http://www.yoomedia.de/interface_2.0/out_t-vtextlink.php', 'http://www.yoomedia.de/code/t-vtextlink.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE'),
+(537, 23, 'layer_view', 'http://www.yoomedia.de/interface_2.0/out_l-vlayer.php', 'http://www.yoomedia.de/code/l-vlayer.php?id=%CID%&sid=%SID%', NULL, 'h', 'NONE')");
 
                // Request parameters per type handler - A3H
                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
@@ -941,528 +1031,847 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (1, 1, 'minimum_stay', 'ma', NULL),
 (1, 1, 'password', 'pw', NULL),
 (1, 1, 'reload', 'reload', NULL),
-(1, 1, 'remain', 'uebrig', NULL),
+(1, 1, 'remain_clicks', 'uebrig', NULL),
 (1, 1, 'reward', 'verguetung', NULL),
-(1, 1, 'sid', 'sid', NULL),
-(1, 1, 'size', 'size', NULL),
+(1, 1, 'site_id', 'sid', NULL),
+(1, 1, 'size', 'size', '468x60'),
 (1, 1, 'type', 'typ', 'klick'),
 (1, 2, 'affiliate_id', 'id', NULL),
 (1, 2, 'password', 'pw', NULL),
 (1, 2, 'reload', 'reload', NULL),
-(1, 2, 'remain', 'uebrig', NULL),
+(1, 2, 'remain_clicks', 'uebrig', NULL),
 (1, 2, 'reward', 'verguetung', NULL),
-(1, 2, 'sid', 'sid', NULL),
+(1, 2, 'site_id', 'sid', NULL),
 (1, 2, 'type', 'typ', 'klick'),
 (1, 3, 'affiliate_id', 'id', NULL),
 (1, 3, 'password', 'pw', NULL),
 (1, 3, 'reload', 'reload', NULL),
-(1, 3, 'remain', 'uebrig', NULL),
+(1, 3, 'remain_clicks', 'uebrig', NULL),
 (1, 3, 'reward', 'verguetung', NULL),
-(1, 3, 'sid', 'sid', NULL),
-(1, 3, 'size', 'size', NULL),
+(1, 3, 'site_id', 'sid', NULL),
+(1, 3, 'size', 'size', 'all'),
 (1, 3, 'type', 'typ', 'klick'),
 (1, 4, 'affiliate_id', 'id', NULL),
 (1, 4, 'minimum_stay', 'ma', NULL),
 (1, 4, 'password', 'pw', NULL),
 (1, 4, 'reload', 'reload', NULL),
-(1, 4, 'remain', 'uebrig', NULL),
+(1, 4, 'remain_clicks', 'uebrig', NULL),
 (1, 4, 'reward', 'verguetung', NULL),
-(1, 4, 'sid', 'sid', NULL),
-(1, 4, 'size', 'size', NULL),
+(1, 4, 'site_id', 'sid', NULL),
+(1, 4, 'size', 'size', '468x60'),
 (1, 5, 'affiliate_id', 'id', NULL),
 (1, 5, 'minimum_stay', 'ma', NULL),
 (1, 5, 'password', 'pw', NULL),
 (1, 5, 'reload', 'reload', NULL),
-(1, 5, 'remain', 'uebrig', NULL),
+(1, 5, 'remain_clicks', 'uebrig', NULL),
 (1, 5, 'reward', 'verguetung', NULL),
-(1, 5, 'sid', 'sid', NULL),
+(1, 5, 'site_id', 'sid', NULL),
 (1, 5, 'type', 'typ', 'text'),
 (1, 6, 'affiliate_id', 'id', NULL),
 (1, 6, 'password', 'pw', NULL),
 (1, 6, 'reload', 'reload', NULL),
-(1, 6, 'remain', 'uebrig', NULL),
+(1, 6, 'remain_clicks', 'uebrig', NULL),
 (1, 6, 'reward', 'verguetung', NULL),
-(1, 6, 'sid', 'sid', NULL),
+(1, 6, 'site_id', 'sid', NULL),
 (1, 6, 'type', 'typ', 'klick'),
 (1, 7, 'affiliate_id', 'id', NULL),
 (1, 7, 'minimum_stay', 'ma', NULL),
 (1, 7, 'password', 'pw', NULL),
 (1, 7, 'reload', 'reload', NULL),
-(1, 7, 'remain', 'uebrig', NULL),
+(1, 7, 'remain_clicks', 'uebrig', NULL),
 (1, 7, 'reward', 'verguetung', NULL),
-(1, 7, 'sid', 'sid', NULL),
+(1, 7, 'site_id', 'sid', NULL),
 (1, 8, 'affiliate_id', 'id', NULL),
 (1, 8, 'minimum_stay', 'ma', NULL),
 (1, 8, 'password', 'pw', NULL),
 (1, 8, 'reload', 'reload', NULL),
-(1, 8, 'remain', 'uebrig', NULL),
+(1, 8, 'remain_clicks', 'uebrig', NULL),
 (1, 8, 'reward', 'verguetung', NULL),
-(1, 8, 'sid', 'sid', NULL),
+(1, 8, 'site_id', 'sid', NULL),
 (1, 9, 'affiliate_id', 'id', NULL),
 (1, 9, 'password', 'pw', NULL),
-(1, 9, 'remain', 'uebrig', NULL),
+(1, 9, 'remain_clicks', 'uebrig', NULL),
 (1, 9, 'reward', 'verguetung', NULL),
-(1, 9, 'sid', 'sid', NULL),
+(1, 9, 'site_id', 'sid', NULL),
 (1, 10, 'affiliate_id', 'id', NULL),
 (1, 10, 'password', 'pw', NULL),
-(1, 10, 'remain', 'uebrig', NULL),
+(1, 10, 'remain_clicks', 'uebrig', NULL),
 (1, 10, 'reward', 'verguetung', NULL),
-(1, 10, 'sid', 'sid', NULL),
+(1, 10, 'site_id', 'sid', NULL),
 (1, 11, 'affiliate_id', 'id', NULL),
 (1, 11, 'minimum_stay', 'ma', NULL),
 (1, 11, 'password', 'pw', NULL),
 (1, 11, 'reload', 'reload', NULL),
-(1, 11, 'remain', 'uebrig', NULL),
+(1, 11, 'remain_clicks', 'uebrig', NULL),
 (1, 11, 'reward', 'verguetung', NULL),
-(1, 11, 'sid', 'sid', NULL),
+(1, 11, 'site_id', 'sid', NULL),
 (1, 11, 'type', 'typ', 'html'),
 (1, 387, 'affiliate_id', 'id', NULL),
 (1, 387, 'minimum_stay', 'ma', NULL),
 (1, 387, 'password', 'pw', NULL),
 (1, 387, 'reload', 'reload', NULL),
-(1, 387, 'remain', 'uebrig', NULL),
+(1, 387, 'remain_clicks', 'uebrig', NULL),
 (1, 387, 'reward', 'verguetung', NULL),
-(1, 387, 'sid', 'sid', NULL),
-(1, 387, 'size', 'size', NULL),
+(1, 387, 'site_id', 'sid', NULL),
+(1, 387, 'size', 'size', '468x60'),
 (1, 387, 'type', 'typ', 'view'),
 (1, 388, 'affiliate_id', 'id', NULL),
 (1, 388, 'password', 'pw', NULL),
 (1, 388, 'reload', 'reload', NULL),
-(1, 388, 'remain', 'uebrig', NULL),
+(1, 388, 'remain_clicks', 'uebrig', NULL),
 (1, 388, 'reward', 'verguetung', NULL),
-(1, 388, 'sid', 'sid', NULL),
+(1, 388, 'site_id', 'sid', NULL),
 (1, 388, 'type', 'typ', 'view'),
 (1, 389, 'affiliate_id', 'id', NULL),
 (1, 389, 'password', 'pw', NULL),
 (1, 389, 'reload', 'reload', NULL),
-(1, 389, 'remain', 'uebrig', NULL),
+(1, 389, 'remain_clicks', 'uebrig', NULL),
 (1, 389, 'reward', 'verguetung', NULL),
-(1, 389, 'sid', 'sid', NULL),
+(1, 389, 'site_id', 'sid', NULL),
 (1, 389, 'size', 'size', NULL),
 (1, 389, 'type', 'typ', 'view'),
 (1, 390, 'affiliate_id', 'id', NULL),
 (1, 390, 'password', 'pw', NULL),
 (1, 390, 'reload', 'reload', NULL),
-(1, 390, 'remain', 'uebrig', NULL),
+(1, 390, 'remain_clicks', 'uebrig', NULL),
 (1, 390, 'reward', 'verguetung', NULL),
-(1, 390, 'sid', 'sid', NULL),
-(1, 390, 'type', 'typ', 'view')");
+(1, 390, 'site_id', 'sid', NULL),
+(1, 390, 'type', 'typ', 'view'),
+(1, 461, 'affiliate_id', 'id', NULL),
+(1, 461, 'minimum_stay', 'ma', NULL),
+(1, 461, 'password', 'pw', NULL),
+(1, 461, 'reload', 'reload', NULL),
+(1, 461, 'remain_clicks', 'uebrig', NULL),
+(1, 461, 'reward', 'verguetung', NULL),
+(1, 461, 'site_id', 'sid', NULL),
+(1, 461, 'size', 'size', '88x31'),
+(1, 461, 'type', 'typ', 'klick'),
+(1, 462, 'affiliate_id', 'id', NULL),
+(1, 462, 'minimum_stay', 'ma', NULL),
+(1, 462, 'password', 'pw', NULL),
+(1, 462, 'reload', 'reload', NULL),
+(1, 462, 'remain_clicks', 'uebrig', NULL),
+(1, 462, 'reward', 'verguetung', NULL),
+(1, 462, 'site_id', 'sid', NULL),
+(1, 462, 'size', 'size', '88x31'),
+(1, 462, 'type', 'typ', 'view'),
+(1, 463, 'affiliate_id', 'id', NULL),
+(1, 463, 'minimum_stay', 'ma', NULL),
+(1, 463, 'password', 'pw', NULL),
+(1, 463, 'reload', 'reload', NULL),
+(1, 463, 'remain_clicks', 'uebrig', NULL),
+(1, 463, 'reward', 'verguetung', NULL),
+(1, 463, 'site_id', 'sid', NULL),
+(1, 463, 'size', 'size', '120x600'),
+(1, 463, 'type', 'typ', 'klick'),
+(1, 464, 'affiliate_id', 'id', NULL),
+(1, 464, 'minimum_stay', 'ma', NULL),
+(1, 464, 'password', 'pw', NULL),
+(1, 464, 'reload', 'reload', NULL),
+(1, 464, 'remain_clicks', 'uebrig', NULL),
+(1, 464, 'reward', 'verguetung', NULL),
+(1, 464, 'site_id', 'sid', NULL),
+(1, 464, 'size', 'size', '120x600'),
+(1, 464, 'type', 'typ', 'view'),
+(1, 465, 'affiliate_id', 'id', NULL),
+(1, 465, 'minimum_stay', 'ma', NULL),
+(1, 465, 'password', 'pw', NULL),
+(1, 465, 'reload', 'reload', NULL),
+(1, 465, 'remain_clicks', 'uebrig', NULL),
+(1, 465, 'reward', 'verguetung', NULL),
+(1, 465, 'site_id', 'sid', NULL),
+(1, 465, 'size', 'size', '234x60'),
+(1, 465, 'type', 'typ', 'klick'),
+(1, 466, 'affiliate_id', 'id', NULL),
+(1, 466, 'minimum_stay', 'ma', NULL),
+(1, 466, 'password', 'pw', NULL),
+(1, 466, 'reload', 'reload', NULL),
+(1, 466, 'remain_clicks', 'uebrig', NULL),
+(1, 466, 'reward', 'verguetung', NULL),
+(1, 466, 'site_id', 'sid', NULL),
+(1, 466, 'size', 'size', '234x60'),
+(1, 466, 'type', 'typ', 'view'),
+(1, 467, 'affiliate_id', 'id', NULL),
+(1, 467, 'minimum_stay', 'ma', NULL),
+(1, 467, 'password', 'pw', NULL),
+(1, 467, 'reload', 'reload', NULL),
+(1, 467, 'remain_clicks', 'uebrig', NULL),
+(1, 467, 'reward', 'verguetung', NULL),
+(1, 467, 'site_id', 'sid', NULL),
+(1, 467, 'size', 'size', '88x31'),
+(1, 468, 'affiliate_id', 'id', NULL),
+(1, 468, 'minimum_stay', 'ma', NULL),
+(1, 468, 'password', 'pw', NULL),
+(1, 468, 'reload', 'reload', NULL),
+(1, 468, 'remain_clicks', 'uebrig', NULL),
+(1, 468, 'reward', 'verguetung', NULL),
+(1, 468, 'site_id', 'sid', NULL),
+(1, 468, 'size', 'size', '234x60'),
+(1, 469, 'affiliate_id', 'id', NULL),
+(1, 469, 'minimum_stay', 'ma', NULL),
+(1, 469, 'password', 'pw', NULL),
+(1, 469, 'reload', 'reload', NULL),
+(1, 469, 'remain_clicks', 'uebrig', NULL),
+(1, 469, 'reward', 'verguetung', NULL),
+(1, 469, 'site_id', 'sid', NULL),
+(1, 469, 'size', 'size', '120x600')");
 
                // Request parameters per type handler - AbisZED-Netz
                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, 'affiliate_id', 'id', NULL),
 (2, 187, 'password', 'pw', NULL),
 (2, 187, 'reload', 'reload', NULL),
-(2, 187, 'remain', 'uebrig', NULL),
+(2, 187, 'remain_clicks', 'uebrig', NULL),
 (2, 187, 'reward', 'verguetung', NULL),
-(2, 187, 'sid', 'sid', NULL),
-(2, 187, 'size', 'size', NULL),
+(2, 187, 'site_id', 'sid', NULL),
+(2, 187, 'size', 'size', '468x60'),
 (2, 187, 'type', 'typ', 'klick'),
 (2, 188, 'affiliate_id', 'id', NULL),
 (2, 188, 'password', 'pw', NULL),
 (2, 188, 'reload', 'reload', NULL),
-(2, 188, 'remain', 'uebrig', NULL),
+(2, 188, 'remain_clicks', 'uebrig', NULL),
 (2, 188, 'reward', 'verguetung', NULL),
-(2, 188, 'sid', 'sid', NULL),
-(2, 188, 'size', 'size', NULL),
+(2, 188, 'site_id', 'sid', NULL),
+(2, 188, 'size', 'size', '468x60'),
 (2, 188, 'type', 'typ', 'view'),
 (2, 189, 'affiliate_id', 'id', NULL),
 (2, 189, 'password', 'pw', NULL),
 (2, 189, 'reload', 'reload', NULL),
-(2, 189, 'remain', 'uebrig', NULL),
+(2, 189, 'remain_clicks', 'uebrig', NULL),
 (2, 189, 'reward', 'verguetung', NULL),
-(2, 189, 'sid', 'sid', NULL),
+(2, 189, 'site_id', 'sid', NULL),
 (2, 189, 'type', 'typ', 'klick'),
 (2, 190, 'affiliate_id', 'id', NULL),
 (2, 190, 'password', 'pw', NULL),
 (2, 190, 'reload', 'reload', NULL),
-(2, 190, 'remain', 'uebrig', NULL),
+(2, 190, 'remain_clicks', 'uebrig', NULL),
 (2, 190, 'reward', 'verguetung', NULL),
-(2, 190, 'sid', 'sid', NULL),
+(2, 190, 'site_id', 'sid', NULL),
 (2, 190, 'type', 'typ', 'view'),
 (2, 191, 'affiliate_id', 'id', NULL),
 (2, 191, 'password', 'pw', NULL),
 (2, 191, 'reload', 'reload', NULL),
-(2, 191, 'remain', 'uebrig', NULL),
+(2, 191, 'remain_clicks', 'uebrig', NULL),
 (2, 191, 'reward', 'verguetung', NULL),
-(2, 191, 'sid', 'sid', NULL),
+(2, 191, 'site_id', 'sid', NULL),
 (2, 191, 'size', 'size', NULL),
 (2, 191, 'type', 'typ', 'klick'),
 (2, 192, 'affiliate_id', 'id', NULL),
 (2, 192, 'password', 'pw', NULL),
 (2, 192, 'reload', 'reload', NULL),
-(2, 192, 'remain', 'uebrig', NULL),
+(2, 192, 'remain_clicks', 'uebrig', NULL),
 (2, 192, 'reward', 'verguetung', NULL),
-(2, 192, 'sid', 'sid', NULL),
+(2, 192, 'site_id', 'sid', NULL),
 (2, 192, 'size', 'size', NULL),
 (2, 192, 'type', 'typ', 'view'),
 (2, 193, 'affiliate_id', 'id', NULL),
 (2, 193, 'minimum_stay', 'ma', NULL),
 (2, 193, 'password', 'pw', NULL),
 (2, 193, 'reload', 'reload', NULL),
-(2, 193, 'remain', 'uebrig', NULL),
+(2, 193, 'remain_clicks', 'uebrig', NULL),
 (2, 193, 'reward', 'verguetung', NULL),
-(2, 193, 'sid', 'sid', NULL),
-(2, 193, 'size', 'size', NULL),
+(2, 193, 'site_id', 'sid', NULL),
+(2, 193, 'size', 'size', '468x60'),
 (2, 194, 'affiliate_id', 'id', NULL),
 (2, 194, 'minimum_stay', 'ma', NULL),
 (2, 194, 'password', 'pw', NULL),
 (2, 194, 'reload', 'reload', NULL),
-(2, 194, 'remain', 'uebrig', NULL),
+(2, 194, 'remain_clicks', 'uebrig', NULL),
 (2, 194, 'reward', 'verguetung', NULL),
-(2, 194, 'sid', 'sid', NULL),
+(2, 194, 'site_id', 'sid', NULL),
 (2, 194, 'type', 'typ', 'text'),
 (2, 195, 'affiliate_id', 'id', NULL),
 (2, 195, 'minimum_stay', 'ma', NULL),
 (2, 195, 'password', 'pw', NULL),
 (2, 195, 'reload', 'reload', NULL),
-(2, 195, 'remain', 'uebrig', NULL),
+(2, 195, 'remain_clicks', 'uebrig', NULL),
 (2, 195, 'reward', 'verguetung', NULL),
-(2, 195, 'sid', 'sid', NULL),
+(2, 195, 'site_id', 'sid', NULL),
 (2, 195, 'type', 'typ', 'html'),
 (2, 196, 'affiliate_id', 'id', NULL),
 (2, 196, 'password', 'pw', NULL),
 (2, 196, 'reload', 'reload', NULL),
-(2, 196, 'remain', 'uebrig', NULL),
+(2, 196, 'remain_clicks', 'uebrig', NULL),
 (2, 196, 'reward', 'verguetung', NULL),
-(2, 196, 'sid', 'sid', NULL),
+(2, 196, 'site_id', 'sid', NULL),
 (2, 196, 'type', 'typ', 'klick'),
 (2, 197, 'affiliate_id', 'id', NULL),
 (2, 197, 'password', 'pw', NULL),
 (2, 197, 'reload', 'reload', NULL),
-(2, 197, 'remain', 'uebrig', NULL),
+(2, 197, 'remain_clicks', 'uebrig', NULL),
 (2, 197, 'reward', 'verguetung', NULL),
-(2, 197, 'sid', 'sid', NULL),
+(2, 197, 'site_id', 'sid', NULL),
 (2, 197, 'type', 'typ', 'view'),
 (2, 198, 'affiliate_id', 'id', NULL),
 (2, 198, 'minimum_stay', 'ma', NULL),
 (2, 198, 'password', 'pw', NULL),
 (2, 198, 'reload', 'reload', NULL),
-(2, 198, 'remain', 'uebrig', NULL),
+(2, 198, 'remain_clicks', 'uebrig', NULL),
 (2, 198, 'reward', 'verguetung', NULL),
-(2, 198, 'sid', 'sid', NULL),
+(2, 198, 'site_id', 'sid', NULL),
 (2, 199, 'affiliate_id', 'id', NULL),
 (2, 199, 'maximum_stay', 'ma', NULL),
 (2, 199, 'password', 'pw', NULL),
 (2, 199, 'reload', 'reload', NULL),
-(2, 199, 'remain', 'uebrig', NULL),
+(2, 199, 'remain_clicks', 'uebrig', NULL),
 (2, 199, 'reward', 'verguetung', NULL),
-(2, 199, 'sid', 'sid', NULL),
+(2, 199, 'site_id', 'sid', NULL),
 (2, 200, 'affiliate_id', 'id', NULL),
 (2, 200, 'password', 'pw', NULL),
-(2, 200, 'remain', 'uebrig', NULL),
+(2, 200, 'remain_clicks', 'uebrig', NULL),
 (2, 200, 'reward', 'verguetung', NULL),
-(2, 200, 'sid', 'sid', NULL),
+(2, 200, 'site_id', 'sid', NULL),
 (2, 201, 'affiliate_id', 'id', NULL),
 (2, 201, 'password', 'pw', NULL),
-(2, 201, 'remain', 'uebrig', NULL),
+(2, 201, 'remain_clicks', 'uebrig', NULL),
 (2, 201, 'reward', 'verguetung', NULL),
-(2, 201, 'sid', 'sid', NULL)");
+(2, 201, 'site_id', 'sid', NULL),
+(2, 470, 'affiliate_id', 'id', NULL),
+(2, 470, 'password', 'pw', NULL),
+(2, 470, 'reload', 'reload', NULL),
+(2, 470, 'remain_clicks', 'uebrig', NULL),
+(2, 470, 'reward', 'verguetung', NULL),
+(2, 470, 'site_id', 'sid', NULL),
+(2, 470, 'size', 'size', '88x31'),
+(2, 470, 'type', 'typ', 'klick'),
+(2, 471, 'affiliate_id', 'id', NULL),
+(2, 471, 'password', 'pw', NULL),
+(2, 471, 'reload', 'reload', NULL),
+(2, 471, 'remain_clicks', 'uebrig', NULL),
+(2, 471, 'reward', 'verguetung', NULL),
+(2, 471, 'site_id', 'sid', NULL),
+(2, 471, 'size', 'size', '88x31'),
+(2, 471, 'type', 'typ', 'view'),
+(2, 472, 'affiliate_id', 'id', NULL),
+(2, 472, 'password', 'pw', NULL),
+(2, 472, 'reload', 'reload', NULL),
+(2, 472, 'remain_clicks', 'uebrig', NULL),
+(2, 472, 'reward', 'verguetung', NULL),
+(2, 472, 'site_id', 'sid', NULL),
+(2, 472, 'size', 'size', '234x60'),
+(2, 472, 'type', 'typ', 'klick'),
+(2, 473, 'affiliate_id', 'id', NULL),
+(2, 473, 'password', 'pw', NULL),
+(2, 473, 'reload', 'reload', NULL),
+(2, 473, 'remain_clicks', 'uebrig', NULL),
+(2, 473, 'reward', 'verguetung', NULL),
+(2, 473, 'site_id', 'sid', NULL),
+(2, 473, 'size', 'size', '234x60'),
+(2, 473, 'type', 'typ', 'view'),
+(2, 474, 'affiliate_id', 'id', NULL),
+(2, 474, 'password', 'pw', NULL),
+(2, 474, 'reload', 'reload', NULL),
+(2, 474, 'remain_clicks', 'uebrig', NULL),
+(2, 474, 'reward', 'verguetung', NULL),
+(2, 474, 'site_id', 'sid', NULL),
+(2, 474, 'size', 'size', '120x600'),
+(2, 474, 'type', 'typ', 'klick'),
+(2, 475, 'affiliate_id', 'id', NULL),
+(2, 475, 'password', 'pw', NULL),
+(2, 475, 'reload', 'reload', NULL),
+(2, 475, 'remain_clicks', 'uebrig', NULL),
+(2, 475, 'reward', 'verguetung', NULL),
+(2, 475, 'site_id', 'sid', NULL),
+(2, 475, 'size', 'size', '120x600'),
+(2, 475, 'type', 'typ', 'view'),
+(2, 476, 'affiliate_id', 'id', NULL),
+(2, 476, 'minimum_stay', 'ma', NULL),
+(2, 476, 'password', 'pw', NULL),
+(2, 476, 'reload', 'reload', NULL),
+(2, 476, 'remain_clicks', 'uebrig', NULL),
+(2, 476, 'reward', 'verguetung', NULL),
+(2, 476, 'site_id', 'sid', NULL),
+(2, 476, 'size', 'size', '88x31'),
+(2, 477, 'affiliate_id', 'id', NULL),
+(2, 477, 'minimum_stay', 'ma', NULL),
+(2, 477, 'password', 'pw', NULL),
+(2, 477, 'reload', 'reload', NULL),
+(2, 477, 'remain_clicks', 'uebrig', NULL),
+(2, 477, 'reward', 'verguetung', NULL),
+(2, 477, 'site_id', 'sid', NULL),
+(2, 477, 'size', 'size', '234x60'),
+(2, 478, 'affiliate_id', 'id', NULL),
+(2, 478, 'minimum_stay', 'ma', NULL),
+(2, 478, 'password', 'pw', NULL),
+(2, 478, 'reload', 'reload', NULL),
+(2, 478, 'remain_clicks', 'uebrig', NULL),
+(2, 478, 'reward', 'verguetung', NULL),
+(2, 478, 'site_id', 'sid', NULL),
+(2, 478, 'size', 'size', '120x600')");
 
                // Request parameters per type handler - Ad-Hit
                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, 'extra', 'typ', 'forced_banner'),
 (31, 302, 'affiliate_id', 'id', NULL),
 (31, 302, 'password', 'pw', NULL),
-(31, 302, 'remain', 'uebrig', NULL),
+(31, 302, 'remain_clicks', 'uebrig', NULL),
 (31, 302, 'reload', 'reload', NULL),
 (31, 302, 'reward', 'verguetung', NULL),
-(31, 302, 'sid', 'siteid', NULL),
+(31, 302, 'site_id', 'siteid', NULL),
 (31, 302, 'minimum_stay', 'ma', NULL),
-(31, 303, 'extra', 'typ', 'forcedtextlink'),
+(31, 303, 'extra', 'typ', 'forced_textlink'),
 (31, 303, 'affiliate_id', 'id', NULL),
 (31, 303, 'password', 'pw', NULL),
-(31, 303, 'remain', 'uebrig', NULL),
+(31, 303, 'remain_clicks', 'uebrig', NULL),
 (31, 303, 'reload', 'reload', NULL),
 (31, 303, 'reward', 'verguetung', NULL),
-(31, 303, 'sid', 'siteid', NULL),
+(31, 303, 'site_id', 'siteid', NULL),
 (31, 303, 'minimum_stay', 'ma', NULL),
 (31, 304, 'extra', 'typ', 'bannerview'),
 (31, 304, 'affiliate_id', 'id', NULL),
 (31, 304, 'password', 'pw', NULL),
-(31, 304, 'remain', 'uebrig', NULL),
+(31, 304, 'remain_clicks', 'uebrig', NULL),
 (31, 304, 'reload', 'reload', NULL),
 (31, 304, 'reward', 'verguetung', NULL),
-(31, 304, 'sid', 'siteid', NULL),
+(31, 304, 'site_id', 'siteid', NULL),
 (31, 304, 'minimum_stay', 'ma', NULL),
 (31, 305, 'extra', 'typ', 'bannerklick'),
 (31, 305, 'affiliate_id', 'id', NULL),
 (31, 305, 'password', 'pw', NULL),
-(31, 305, 'remain', 'uebrig', NULL),
+(31, 305, 'remain_clicks', 'uebrig', NULL),
 (31, 305, 'reload', 'reload', NULL),
 (31, 305, 'reward', 'verguetung', NULL),
-(31, 305, 'sid', 'siteid', NULL),
+(31, 305, 'site_id', 'siteid', NULL),
 (31, 305, 'minimum_stay', 'ma', NULL),
 (31, 306, 'extra', 'typ', 'skybannerview'),
 (31, 306, 'affiliate_id', 'id', NULL),
 (31, 306, 'password', 'pw', NULL),
-(31, 306, 'remain', 'uebrig', NULL),
+(31, 306, 'remain_clicks', 'uebrig', NULL),
 (31, 306, 'reload', 'reload', NULL),
 (31, 306, 'reward', 'verguetung', NULL),
-(31, 306, 'sid', 'siteid', NULL),
+(31, 306, 'site_id', 'siteid', NULL),
 (31, 306, 'minimum_stay', 'ma', NULL),
 (31, 307, 'extra', 'typ', 'buttonview'),
 (31, 307, 'affiliate_id', 'id', NULL),
 (31, 307, 'password', 'pw', NULL),
-(31, 307, 'remain', 'uebrig', NULL),
+(31, 307, 'remain_clicks', 'uebrig', NULL),
 (31, 307, 'reload', 'reload', NULL),
 (31, 307, 'reward', 'verguetung', NULL),
-(31, 307, 'sid', 'siteid', NULL),
+(31, 307, 'site_id', 'siteid', NULL),
 (31, 307, 'minimum_stay', 'ma', NULL),
 (31, 308, 'extra', 'typ', 'textview'),
 (31, 308, 'affiliate_id', 'id', NULL),
 (31, 308, 'password', 'pw', NULL),
-(31, 308, 'remain', 'uebrig', NULL),
+(31, 308, 'remain_clicks', 'uebrig', NULL),
 (31, 308, 'reload', 'reload', NULL),
 (31, 308, 'reward', 'verguetung', NULL),
-(31, 308, 'sid', 'siteid', NULL),
+(31, 308, 'site_id', 'siteid', NULL),
 (31, 308, 'minimum_stay', 'ma', NULL),
 (31, 309, 'extra', 'typ', 'traffic'),
 (31, 309, 'affiliate_id', 'id', NULL),
 (31, 309, 'password', 'pw', NULL),
-(31, 309, 'remain', 'uebrig', NULL),
+(31, 309, 'remain_clicks', 'uebrig', NULL),
 (31, 309, 'reload', 'reload', NULL),
 (31, 309, 'reward', 'verguetung', NULL),
-(31, 309, 'sid', 'siteid', NULL),
+(31, 309, 'site_id', 'siteid', NULL),
 (31, 309, 'minimum_stay', 'ma', NULL),
 (31, 310, 'extra', 'typ', 'popup'),
 (31, 310, 'affiliate_id', 'id', NULL),
 (31, 310, 'password', 'pw', NULL),
-(31, 310, 'remain', 'uebrig', NULL),
+(31, 310, 'remain_clicks', 'uebrig', NULL),
 (31, 310, 'reload', 'reload', NULL),
 (31, 310, 'reward', 'verguetung', NULL),
-(31, 310, 'sid', 'siteid', NULL),
+(31, 310, 'site_id', 'siteid', NULL),
 (31, 310, 'minimum_stay', 'ma', NULL),
 (31, 311, 'extra', 'typ', 'paidmail'),
 (31, 311, 'affiliate_id', 'id', NULL),
 (31, 311, 'password', 'pw', NULL),
-(31, 311, 'remain', 'uebrig', NULL),
+(31, 311, 'remain_clicks', 'uebrig', NULL),
 (31, 311, 'reload', 'reload', NULL),
 (31, 311, 'reward', 'verguetung', NULL),
-(31, 311, 'sid', 'siteid', NULL),
+(31, 311, 'site_id', 'siteid', NULL),
 (31, 311, 'minimum_stay', 'ma', NULL)");
 
                // Request parameters per type handler - Ad-Magnet
+               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
+(3, 483, 'affiliate_id', 'aid', NULL),
+(3, 483, 'site_id', 'sid', NULL),
+(3, 483, 'password', 'ipw', NULL),
+(3, 483, 'remain_budget', 'budget', NULL),
+(3, 483, 'minimum_stay', 'ma', NULL),
+(3, 483, 'reward', 'verguetung', NULL),
+(3, 483, 'reload', 'reload', NULL),
+(3, 483, 'extra', 'art', 'bannerklick'),
+(3, 484, 'affiliate_id', 'aid', NULL),
+(3, 484, 'site_id', 'sid', NULL),
+(3, 484, 'password', 'ipw', NULL),
+(3, 484, 'remain_budget', 'budget', NULL),
+(3, 484, 'minimum_stay', 'ma', NULL),
+(3, 484, 'reward', 'verguetung', NULL),
+(3, 484, 'reload', 'reload', NULL),
+(3, 484, 'extra', 'art', 'bannerview'),
+(3, 485, 'affiliate_id', 'aid', NULL),
+(3, 485, 'site_id', 'sid', NULL),
+(3, 485, 'password', 'ipw', NULL),
+(3, 485, 'remain_budget', 'budget', NULL),
+(3, 485, 'minimum_stay', 'ma', NULL),
+(3, 485, 'reward', 'verguetung', NULL),
+(3, 485, 'reload', 'reload', NULL),
+(3, 485, 'extra', 'art', 'surfbarklick'),
+(3, 486, 'affiliate_id', 'aid', NULL),
+(3, 486, 'site_id', 'sid', NULL),
+(3, 486, 'password', 'ipw', NULL),
+(3, 486, 'remain_budget', 'budget', NULL),
+(3, 486, 'minimum_stay', 'ma', NULL),
+(3, 486, 'reward', 'verguetung', NULL),
+(3, 486, 'reload', 'reload', NULL),
+(3, 486, 'extra', 'art', 'surfbarview'),
+(3, 487, 'affiliate_id', 'aid', NULL),
+(3, 487, 'site_id', 'sid', NULL),
+(3, 487, 'password', 'ipw', NULL),
+(3, 487, 'remain_budget', 'budget', NULL),
+(3, 487, 'minimum_stay', 'ma', NULL),
+(3, 487, 'reward', 'verguetung', NULL),
+(3, 487, 'reload', 'reload', NULL),
+(3, 487, 'extra', 'art', 'forcedklick'),
+(3, 488, 'affiliate_id', 'aid', NULL),
+(3, 488, 'site_id', 'sid', NULL),
+(3, 488, 'password', 'ipw', NULL),
+(3, 488, 'remain_budget', 'budget', NULL),
+(3, 488, 'minimum_stay', 'ma', NULL),
+(3, 488, 'reward', 'verguetung', NULL),
+(3, 488, 'reload', 'reload', NULL),
+(3, 488, 'extra', 'art', 'textlinkklick'),
+(3, 489, 'affiliate_id', 'aid', NULL),
+(3, 489, 'site_id', 'sid', NULL),
+(3, 489, 'password', 'ipw', NULL),
+(3, 489, 'remain_budget', 'budget', NULL),
+(3, 489, 'minimum_stay', 'ma', NULL),
+(3, 489, 'reward', 'verguetung', NULL),
+(3, 489, 'reload', 'reload', NULL),
+(3, 489, 'extra', 'art', 'textlinkview'),
+(3, 490, 'affiliate_id', 'aid', NULL),
+(3, 490, 'site_id', 'sid', NULL),
+(3, 490, 'password', 'ipw', NULL),
+(3, 490, 'remain_budget', 'budget', NULL),
+(3, 490, 'minimum_stay', 'ma', NULL),
+(3, 490, 'reward', 'verguetung', NULL),
+(3, 490, 'reload', 'reload', NULL),
+(3, 490, 'extra', 'art', 'layerklick'),
+(3, 491, 'affiliate_id', 'aid', NULL),
+(3, 491, 'site_id', 'sid', NULL),
+(3, 491, 'password', 'ipw', NULL),
+(3, 491, 'remain_budget', 'budget', NULL),
+(3, 491, 'minimum_stay', 'ma', NULL),
+(3, 491, 'reward', 'verguetung', NULL),
+(3, 491, 'reload', 'reload', NULL),
+(3, 491, 'extra', 'art', 'layerview'),
+(3, 492, 'affiliate_id', 'aid', NULL),
+(3, 492, 'site_id', 'sid', NULL),
+(3, 492, 'password', 'ipw', NULL),
+(3, 492, 'remain_budget', 'budget', NULL),
+(3, 492, 'minimum_stay', 'ma', NULL),
+(3, 492, 'reward', 'verguetung', NULL),
+(3, 492, 'reload', 'reload', NULL),
+(3, 492, 'extra', 'art', 'popup'),
+(3, 493, 'affiliate_id', 'aid', NULL),
+(3, 493, 'site_id', 'sid', NULL),
+(3, 493, 'password', 'ipw', NULL),
+(3, 493, 'remain_budget', 'budget', NULL),
+(3, 493, 'minimum_stay', 'ma', NULL),
+(3, 493, 'reward', 'verguetung', NULL),
+(3, 493, 'reload', 'reload', NULL),
+(3, 493, 'extra', 'art', 'popdown'),
+(3, 494, 'affiliate_id', 'aid', NULL),
+(3, 494, 'site_id', 'sid', NULL),
+(3, 494, 'password', 'ipw', NULL),
+(3, 494, 'remain_budget', 'budget', NULL),
+(3, 494, 'minimum_stay', 'ma', NULL),
+(3, 494, 'reward', 'verguetung', NULL),
+(3, 494, 'reload', 'reload', NULL),
+(3, 494, 'extra', 'art', 'html_paidmail'),
+(3, 495, 'affiliate_id', 'aid', NULL),
+(3, 495, 'site_id', 'sid', NULL),
+(3, 495, 'password', 'ipw', NULL),
+(3, 495, 'remain_budget', 'budget', NULL),
+(3, 495, 'minimum_stay', 'ma', NULL),
+(3, 495, 'reward', 'verguetung', NULL),
+(3, 495, 'reload', 'reload', NULL),
+(3, 495, 'extra', 'art', 'text_paidmail'),
+(3, 496, 'affiliate_id', 'aid', NULL),
+(3, 496, 'site_id', 'sid', NULL),
+(3, 496, 'password', 'ipw', NULL),
+(3, 496, 'remain_budget', 'budget', NULL),
+(3, 496, 'minimum_stay', 'ma', NULL),
+(3, 496, 'reward', 'verguetung', NULL),
+(3, 496, 'reload', 'reload', NULL),
+(3, 496, 'extra', 'art', 'pagepeelklick'),
+(3, 497, 'affiliate_id', 'aid', NULL),
+(3, 497, 'site_id', 'sid', NULL),
+(3, 497, 'password', 'ipw', NULL),
+(3, 497, 'remain_budget', 'budget', NULL),
+(3, 497, 'minimum_stay', 'ma', NULL),
+(3, 497, 'reward', 'verguetung', NULL),
+(3, 497, 'reload', 'reload', NULL),
+(3, 497, 'extra', 'art', 'pagepeelview'),
+(3, 498, 'affiliate_id', 'aid', NULL),
+(3, 498, 'site_id', 'sid', NULL),
+(3, 498, 'password', 'ipw', NULL),
+(3, 498, 'remain_budget', 'budget', NULL),
+(3, 498, 'minimum_stay', 'ma', NULL),
+(3, 498, 'reward', 'verguetung', NULL),
+(3, 498, 'reload', 'reload', NULL),
+(3, 498, 'extra', 'art', 'lead'),
+(3, 498, 'type', 'typ', NULL),
+(3, 499, 'affiliate_id', 'aid', NULL),
+(3, 499, 'site_id', 'sid', NULL),
+(3, 499, 'password', 'ipw', NULL),
+(3, 499, 'remain_budget', 'budget', NULL),
+(3, 499, 'minimum_stay', 'ma', NULL),
+(3, 499, 'reward', 'verguetung', NULL),
+(3, 499, 'reload', 'reload', NULL),
+(3, 499, 'extra', 'art', 'sale'),
+(3, 499, 'type', 'typ', NULL)");
 
                // Request parameters per type handler - Ad-Promotion.net
                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
-(37, 367, 'extra', 'typ', 'forcedbanner'),
+(37, 367, 'extra', 'typ', 'forced_banner'),
 (37, 367, 'affiliate_id', 'id', NULL),
 (37, 367, 'password', 'pw', NULL),
-(37, 367, 'remain', 'uebrig', NULL),
+(37, 367, 'remain_clicks', 'uebrig', NULL),
 (37, 367, 'reload', 'reload', NULL),
 (37, 367, 'reward', 'verguetung', NULL),
-(37, 367, 'sid', 'siteid', NULL),
-(37, 368, 'extra', 'typ', 'forcedtextlink'),
+(37, 367, 'site_id', 'siteid', NULL),
+(37, 368, 'extra', 'typ', 'forced_textlink'),
 (37, 368, 'affiliate_id', 'id', NULL),
 (37, 368, 'password', 'pw', NULL),
-(37, 368, 'remain', 'uebrig', NULL),
+(37, 368, 'remain_clicks', 'uebrig', NULL),
 (37, 368, 'reload', 'reload', NULL),
 (37, 368, 'reward', 'verguetung', NULL),
-(37, 368, 'sid', 'siteid', NULL),
+(37, 368, 'site_id', 'siteid', NULL),
 (37, 369, 'extra', 'typ', 'bannerview'),
 (37, 369, 'affiliate_id', 'id', NULL),
 (37, 369, 'password', 'pw', NULL),
-(37, 369, 'remain', 'uebrig', NULL),
+(37, 369, 'remain_clicks', 'uebrig', NULL),
 (37, 369, 'reload', 'reload', NULL),
 (37, 369, 'reward', 'verguetung', NULL),
-(37, 369, 'sid', 'siteid', NULL),
+(37, 369, 'site_id', 'siteid', NULL),
 (37, 370, 'extra', 'typ', 'bannerklick'),
 (37, 370, 'affiliate_id', 'id', NULL),
 (37, 370, 'password', 'pw', NULL),
-(37, 370, 'remain', 'uebrig', NULL),
+(37, 370, 'remain_clicks', 'uebrig', NULL),
 (37, 370, 'reload', 'reload', NULL),
 (37, 370, 'reward', 'verguetung', NULL),
-(37, 370, 'sid', 'siteid', NULL),
+(37, 370, 'site_id', 'siteid', NULL),
 (37, 371, 'extra', 'typ', 'skybannerview'),
 (37, 371, 'affiliate_id', 'id', NULL),
 (37, 371, 'password', 'pw', NULL),
-(37, 371, 'remain', 'uebrig', NULL),
+(37, 371, 'remain_clicks', 'uebrig', NULL),
 (37, 371, 'reload', 'reload', NULL),
 (37, 371, 'reward', 'verguetung', NULL),
-(37, 371, 'sid', 'siteid', NULL),
+(37, 371, 'site_id', 'siteid', NULL),
 (37, 372, 'extra', 'typ', 'buttonview'),
 (37, 372, 'affiliate_id', 'id', NULL),
 (37, 372, 'password', 'pw', NULL),
-(37, 372, 'remain', 'uebrig', NULL),
+(37, 372, 'remain_clicks', 'uebrig', NULL),
 (37, 372, 'reload', 'reload', NULL),
 (37, 372, 'reward', 'verguetung', NULL),
-(37, 372, 'sid', 'siteid', NULL),
+(37, 372, 'site_id', 'siteid', NULL),
 (37, 373, 'extra', 'typ', 'textview'),
 (37, 373, 'affiliate_id', 'id', NULL),
 (37, 373, 'password', 'pw', NULL),
-(37, 373, 'remain', 'uebrig', NULL),
+(37, 373, 'remain_clicks', 'uebrig', NULL),
 (37, 373, 'reload', 'reload', NULL),
 (37, 373, 'reward', 'verguetung', NULL),
-(37, 373, 'sid', 'siteid', NULL),
+(37, 373, 'site_id', 'siteid', NULL),
 (37, 374, 'extra', 'typ', 'traffic'),
 (37, 374, 'affiliate_id', 'id', NULL),
 (37, 374, 'password', 'pw', NULL),
-(37, 374, 'remain', 'uebrig', NULL),
+(37, 374, 'remain_clicks', 'uebrig', NULL),
 (37, 374, 'reload', 'reload', NULL),
 (37, 374, 'reward', 'verguetung', NULL),
-(37, 374, 'sid', 'siteid', NULL),
+(37, 374, 'site_id', 'siteid', NULL),
 (37, 375, 'extra', 'typ', 'popup'),
 (37, 375, 'affiliate_id', 'id', NULL),
 (37, 375, 'password', 'pw', NULL),
-(37, 375, 'remain', 'uebrig', NULL),
+(37, 375, 'remain_clicks', 'uebrig', NULL),
 (37, 375, 'reload', 'reload', NULL),
 (37, 375, 'reward', 'verguetung', NULL),
-(37, 375, 'sid', 'siteid', NULL),
+(37, 375, 'site_id', 'siteid', NULL),
 (37, 376, 'extra', 'typ', 'paidmail'),
 (37, 376, 'affiliate_id', 'id', NULL),
 (37, 376, 'password', 'pw', NULL),
-(37, 376, 'remain', 'uebrig', NULL),
+(37, 376, 'remain_clicks', 'uebrig', NULL),
 (37, 376, 'reload', 'reload', NULL),
 (37, 376, 'reward', 'verguetung', NULL),
-(37, 376, 'sid', 'siteid', NULL)");
+(37, 376, 'site_id', 'siteid', NULL)");
 
                // Request parameters per type handler - AdCity.eu
                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, 'extra', 'typ', 'forced_banner'),
 (32, 312, 'affiliate_id', 'id', NULL),
 (32, 312, 'password', 'pw', NULL),
-(32, 312, 'remain', 'uebrig', NULL),
+(32, 312, 'remain_clicks', 'uebrig', NULL),
 (32, 312, 'reload', 'reload', NULL),
 (32, 312, 'reward', 'verguetung', NULL),
 (32, 312, 'minimum_stay', 'ma', NULL),
-(32, 313, 'extra', 'typ', 'forcedtextlink'),
+(32, 313, 'extra', 'typ', 'forced_textlink'),
 (32, 313, 'affiliate_id', 'id', NULL),
 (32, 313, 'password', 'pw', NULL),
-(32, 313, 'remain', 'uebrig', NULL),
+(32, 313, 'remain_clicks', 'uebrig', NULL),
 (32, 313, 'reload', 'reload', NULL),
 (32, 313, 'reward', 'verguetung', NULL),
 (32, 313, 'minimum_stay', 'ma', NULL),
 (32, 314, 'extra', 'typ', 'bannerview'),
 (32, 314, 'affiliate_id', 'id', NULL),
 (32, 314, 'password', 'pw', NULL),
-(32, 314, 'remain', 'uebrig', NULL),
+(32, 314, 'remain_clicks', 'uebrig', NULL),
 (32, 314, 'reload', 'reload', NULL),
 (32, 314, 'reward', 'verguetung', NULL),
 (32, 314, 'minimum_stay', 'ma', NULL),
 (32, 315, 'extra', 'typ', 'bannerklick'),
 (32, 315, 'affiliate_id', 'id', NULL),
 (32, 315, 'password', 'pw', NULL),
-(32, 315, 'remain', 'uebrig', NULL),
+(32, 315, 'remain_clicks', 'uebrig', NULL),
 (32, 315, 'reload', 'reload', NULL),
 (32, 315, 'reward', 'verguetung', NULL),
 (32, 315, 'minimum_stay', 'ma', NULL),
 (32, 316, 'extra', 'typ', 'skyview'),
 (32, 316, 'affiliate_id', 'id', NULL),
 (32, 316, 'password', 'pw', NULL),
-(32, 316, 'remain', 'uebrig', NULL),
+(32, 316, 'remain_clicks', 'uebrig', NULL),
 (32, 316, 'reload', 'reload', NULL),
 (32, 316, 'reward', 'verguetung', NULL),
 (32, 316, 'minimum_stay', 'ma', NULL),
 (32, 317, 'extra', 'typ', 'buttonview'),
 (32, 317, 'affiliate_id', 'id', NULL),
 (32, 317, 'password', 'pw', NULL),
-(32, 317, 'remain', 'uebrig', NULL),
+(32, 317, 'remain_clicks', 'uebrig', NULL),
 (32, 317, 'reload', 'reload', NULL),
 (32, 317, 'reward', 'verguetung', NULL),
 (32, 317, 'minimum_stay', 'ma', NULL),
 (32, 318, 'extra', 'typ', 'textview'),
 (32, 318, 'affiliate_id', 'id', NULL),
 (32, 318, 'password', 'pw', NULL),
-(32, 318, 'remain', 'uebrig', NULL),
+(32, 318, 'remain_clicks', 'uebrig', NULL),
 (32, 318, 'reload', 'reload', NULL),
 (32, 318, 'reward', 'verguetung', NULL),
 (32, 318, 'minimum_stay', 'ma', NULL),
 (32, 319, 'extra', 'typ', 'taffic'),
 (32, 319, 'affiliate_id', 'id', NULL),
 (32, 319, 'password', 'pw', NULL),
-(32, 319, 'remain', 'uebrig', NULL),
+(32, 319, 'remain_clicks', 'uebrig', NULL),
 (32, 319, 'reload', 'reload', NULL),
 (32, 319, 'reward', 'verguetung', NULL),
 (32, 319, 'minimum_stay', 'ma', NULL),
 (32, 320, 'extra', 'typ', 'popup'),
 (32, 320, 'affiliate_id', 'id', NULL),
 (32, 320, 'password', 'pw', NULL),
-(32, 320, 'remain', 'uebrig', NULL),
+(32, 320, 'remain_clicks', 'uebrig', NULL),
 (32, 320, 'reload', 'reload', NULL),
 (32, 320, 'reward', 'verguetung', NULL),
 (32, 320, 'minimum_stay', 'ma', NULL),
 (32, 321, 'extra', 'typ', 'paidmail'),
 (32, 321, 'affiliate_id', 'id', NULL),
 (32, 321, 'password', 'pw', NULL),
-(32, 321, 'remain', 'uebrig', NULL),
+(32, 321, 'remain_clicks', 'uebrig', NULL),
 (32, 321, 'reload', 'reload', NULL),
 (32, 321, 'reward', 'verguetung', NULL),
 (32, 321, 'minimum_stay', 'ma', NULL)");
 
                // Request parameters per type handler - AdCocktail
+               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
+(4, 12, 'affiliate_id', 'u_id', NULL),
+(4, 12, 'password', 'k_pass', NULL),
+(4, 12, 'reward', 'k_v', NULL),
+(4, 12, 'remain_clicks', 'k_rest', NULL),
+(4, 12, 'maximum_stay', 'k_mamax', NULL),
+(4, 13, 'affiliate_id', 'u_id', NULL),
+(4, 13, 'password', 'k_pass', NULL),
+(4, 13, 'reward', 'k_v', NULL),
+(4, 13, 'remain_clicks', 'k_rest', NULL),
+(4, 13, 'size', 'b_f', '468'),
+(4, 479, 'affiliate_id', 'u_id', NULL),
+(4, 479, 'password', 'k_pass', NULL),
+(4, 479, 'reward', 'k_v', NULL),
+(4, 479, 'remain_clicks', 'k_rest', NULL),
+(4, 480, 'affiliate_id', 'u_id', NULL),
+(4, 480, 'password', 'k_pass', NULL),
+(4, 480, 'reward', 'k_v', NULL),
+(4, 480, 'remain_clicks', 'k_rest', NULL),
+(4, 480, 'size', 'b_f', '88'),
+(4, 481, 'affiliate_id', 'u_id', NULL),
+(4, 481, 'password', 'k_pass', NULL),
+(4, 481, 'reward', 'k_v', NULL),
+(4, 481, 'remain_clicks', 'k_rest', NULL),
+(4, 481, 'size', 'b_f', '234'),
+(4, 482, 'affiliate_id', 'u_id', NULL),
+(4, 482, 'password', 'k_pass', NULL),
+(4, 482, 'reward', 'k_v', NULL),
+(4, 482, 'remain_clicks', 'k_rest', NULL),
+(4, 482, 'size', 'b_f', '120')");
 
                // Request parameters per type handler - AdConvention
                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, 'extra', 'typ', 'forced_banner'),
 (30, 292, 'affiliate_id', 'id', NULL),
 (30, 292, 'minimum_stay', 'ma', NULL),
 (30, 292, 'password', 'pw', NULL),
 (30, 292, 'reload', 'reload', NULL),
-(30, 292, 'remain', 'uebrig', NULL),
+(30, 292, 'remain_clicks', 'uebrig', NULL),
 (30, 292, 'reward', 'verguetung', NULL),
-(30, 293, 'extra', 'typ', 'forcedtextlink'),
+(30, 293, 'extra', 'typ', 'forced_textlink'),
 (30, 293, 'affiliate_id', 'id', NULL),
 (30, 293, 'minimum_stay', 'ma', NULL),
 (30, 293, 'password', 'pw', NULL),
 (30, 293, 'reload', 'reload', NULL),
-(30, 293, 'remain', 'uebrig', NULL),
+(30, 293, 'remain_clicks', 'uebrig', NULL),
 (30, 293, 'reward', 'verguetung', NULL),
 (30, 294, 'extra', 'typ', 'bannerview'),
 (30, 294, 'affiliate_id', 'id', NULL),
 (30, 294, 'minimum_stay', 'ma', NULL),
 (30, 294, 'password', 'pw', NULL),
 (30, 294, 'reload', 'reload', NULL),
-(30, 294, 'remain', 'uebrig', NULL),
+(30, 294, 'remain_clicks', 'uebrig', NULL),
 (30, 294, 'reward', 'verguetung', NULL),
 (30, 295, 'extra', 'typ', 'bannerklick'),
 (30, 295, 'affiliate_id', 'id', NULL),
 (30, 295, 'minimum_stay', 'ma', NULL),
 (30, 295, 'password', 'pw', NULL),
 (30, 295, 'reload', 'reload', NULL),
-(30, 295, 'remain', 'uebrig', NULL),
+(30, 295, 'remain_clicks', 'uebrig', NULL),
 (30, 295, 'reward', 'verguetung', NULL),
 (30, 296, 'extra', 'typ', 'skybannerview'),
 (30, 296, 'affiliate_id', 'id', NULL),
 (30, 296, 'minimum_stay', 'ma', NULL),
 (30, 296, 'password', 'pw', NULL),
 (30, 296, 'reload', 'reload', NULL),
-(30, 296, 'remain', 'uebrig', NULL),
+(30, 296, 'remain_clicks', 'uebrig', NULL),
 (30, 296, 'reward', 'verguetung', NULL),
 (30, 297, 'extra', 'typ', 'buttonview'),
 (30, 297, 'affiliate_id', 'id', NULL),
 (30, 297, 'minimum_stay', 'ma', NULL),
 (30, 297, 'password', 'pw', NULL),
 (30, 297, 'reload', 'reload', NULL),
-(30, 297, 'remain', 'uebrig', NULL),
+(30, 297, 'remain_clicks', 'uebrig', NULL),
 (30, 297, 'reward', 'verguetung', NULL),
 (30, 298, 'extra', 'typ', 'textview'),
 (30, 298, 'affiliate_id', 'id', NULL),
 (30, 298, 'minimum_stay', 'ma', NULL),
 (30, 298, 'password', 'pw', NULL),
 (30, 298, 'reload', 'reload', NULL),
-(30, 298, 'remain', 'uebrig', NULL),
+(30, 298, 'remain_clicks', 'uebrig', NULL),
 (30, 298, 'reward', 'verguetung', NULL),
 (30, 299, 'extra', 'typ', 'traffic'),
 (30, 299, 'affiliate_id', 'id', NULL),
 (30, 299, 'minimum_stay', 'ma', NULL),
 (30, 299, 'password', 'pw', NULL),
 (30, 299, 'reload', 'reload', NULL),
-(30, 299, 'remain', 'uebrig', NULL),
+(30, 299, 'remain_clicks', 'uebrig', NULL),
 (30, 299, 'reward', 'verguetung', NULL),
 (30, 300, 'extra', 'typ', 'popup'),
 (30, 300, 'affiliate_id', 'id', NULL),
 (30, 300, 'minimum_stay', 'ma', NULL),
 (30, 300, 'password', 'pw', NULL),
 (30, 300, 'reload', 'reload', NULL),
-(30, 300, 'remain', 'uebrig', NULL),
+(30, 300, 'remain_clicks', 'uebrig', NULL),
 (30, 300, 'reward', 'verguetung', NULL),
 (30, 301, 'extra', 'typ', 'paidmail'),
 (30, 301, 'affiliate_id', 'id', NULL),
 (30, 301, 'minimum_stay', 'ma', NULL),
 (30, 301, 'password', 'pw', NULL),
 (30, 301, 'reload', 'reload', NULL),
-(30, 301, 'remain', 'uebrig', NULL),
+(30, 301, 'remain_clicks', 'uebrig', NULL),
 (30, 301, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - adgain.de
@@ -1470,106 +1879,106 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (33, 322, 'extra', 'art', 'bannerklick'),
 (33, 322, 'affiliate_id', 'uid', NULL),
 (33, 322, 'password', 'pw', NULL),
-(33, 322, 'sid', 'sid', NULL),
+(33, 322, 'site_id', 'sid', NULL),
 (33, 322, 'reward', 'verguetung', NULL),
 (33, 322, 'reload', 'reload', NULL),
-(33, 322, 'remain', 'uebrig', NULL),
+(33, 322, 'remain_clicks', 'uebrig', NULL),
 (33, 323, 'extra', 'art', 'bannerview'),
 (33, 323, 'affiliate_id', 'uid', NULL),
 (33, 323, 'password', 'pw', NULL),
-(33, 323, 'sid', 'sid', NULL),
+(33, 323, 'site_id', 'sid', NULL),
 (33, 323, 'reward', 'verguetung', NULL),
 (33, 323, 'reload', 'reload', NULL),
-(33, 323, 'remain', 'uebrig', NULL),
-(33, 324, 'extra', 'art', 'forcedbanner'),
+(33, 323, 'remain_clicks', 'uebrig', NULL),
+(33, 324, 'extra', 'art', 'forced_banner'),
 (33, 324, 'affiliate_id', 'uid', NULL),
 (33, 324, 'password', 'pw', NULL),
-(33, 324, 'sid', 'sid', NULL),
+(33, 324, 'site_id', 'sid', NULL),
 (33, 324, 'reward', 'verguetung', NULL),
 (33, 324, 'reload', 'reload', NULL),
-(33, 324, 'remain', 'uebrig', NULL),
+(33, 324, 'remain_clicks', 'uebrig', NULL),
 (33, 324, 'minimum_stay', 'ma', NULL),
-(33, 325, 'extra', 'art', 'forcedtextlink'),
+(33, 325, 'extra', 'art', 'forced_textlink'),
 (33, 325, 'affiliate_id', 'uid', NULL),
 (33, 325, 'password', 'pw', NULL),
-(33, 325, 'sid', 'sid', NULL),
+(33, 325, 'site_id', 'sid', NULL),
 (33, 325, 'reward', 'verguetung', NULL),
 (33, 325, 'reload', 'reload', NULL),
-(33, 325, 'remain', 'uebrig', NULL),
+(33, 325, 'remain_clicks', 'uebrig', NULL),
 (33, 325, 'minimum_stay', 'ma', NULL),
 (33, 326, 'extra', 'art', 'htmlmail'),
 (33, 326, 'affiliate_id', 'uid', NULL),
 (33, 326, 'password', 'pw', NULL),
-(33, 326, 'sid', 'sid', NULL),
+(33, 326, 'site_id', 'sid', NULL),
 (33, 326, 'reward', 'verguetung', NULL),
 (33, 326, 'reload', 'reload', NULL),
-(33, 326, 'remain', 'uebrig', NULL),
+(33, 326, 'remain_clicks', 'uebrig', NULL),
 (33, 326, 'minimum_stay', 'ma', NULL),
 (33, 327, 'extra', 'art', 'layer'),
 (33, 327, 'affiliate_id', 'uid', NULL),
 (33, 327, 'password', 'pw', NULL),
-(33, 327, 'sid', 'sid', NULL),
+(33, 327, 'site_id', 'sid', NULL),
 (33, 327, 'reward', 'verguetung', NULL),
 (33, 327, 'reload', 'reload', NULL),
-(33, 327, 'remain', 'uebrig', NULL),
+(33, 327, 'remain_clicks', 'uebrig', NULL),
 (33, 328, 'extra', 'art', 'paidmail'),
 (33, 328, 'affiliate_id', 'uid', NULL),
 (33, 328, 'password', 'pw', NULL),
-(33, 328, 'sid', 'sid', NULL),
+(33, 328, 'site_id', 'sid', NULL),
 (33, 328, 'reward', 'verguetung', NULL),
 (33, 328, 'reload', 'reload', NULL),
-(33, 328, 'type', 'uebrig', NULL),
+(33, 328, 'remain_clicks', 'uebrig', NULL),
 (33, 328, 'minimum_stay', 'ma', NULL),
 (33, 329, 'extra', 'art', 'popup'),
 (33, 329, 'affiliate_id', 'uid', NULL),
 (33, 329, 'password', 'pw', NULL),
-(33, 329, 'sid', 'sid', NULL),
+(33, 329, 'site_id', 'sid', NULL),
 (33, 329, 'reward', 'verguetung', NULL),
 (33, 329, 'reload', 'reload', NULL),
-(33, 329, 'remain', 'uebrig', NULL),
+(33, 329, 'remain_clicks', 'uebrig', NULL),
 (33, 329, 'minimum_stay', 'ma', NULL),
 (33, 330, 'extra', 'art', 'skybannerklick'),
 (33, 330, 'affiliate_id', 'uid', NULL),
 (33, 330, 'password', 'pw', NULL),
-(33, 330, 'sid', 'sid', NULL),
+(33, 330, 'site_id', 'sid', NULL),
 (33, 330, 'reward', 'verguetung', NULL),
 (33, 330, 'reload', 'reload', NULL),
-(33, 330, 'remain', 'uebrig', NULL),
+(33, 330, 'remain_clicks', 'uebrig', NULL),
 (33, 331, 'extra', 'art', 'skybannerview'),
 (33, 331, 'affiliate_id', 'uid', NULL),
 (33, 331, 'password', 'pw', NULL),
-(33, 331, 'sid', 'sid', NULL),
+(33, 331, 'site_id', 'sid', NULL),
 (33, 331, 'reward', 'verguetung', NULL),
 (33, 331, 'reload', 'reload', NULL),
-(33, 331, 'remain', 'uebrig', NULL),
+(33, 331, 'remain_clicks', 'uebrig', NULL),
 (33, 332, 'extra', 'art', 'surfbarklick'),
 (33, 332, 'affiliate_id', 'uid', NULL),
 (33, 332, 'password', 'pw', NULL),
-(33, 332, 'sid', 'sid', NULL),
+(33, 332, 'site_id', 'sid', NULL),
 (33, 332, 'reward', 'verguetung', NULL),
 (33, 332, 'reload', 'reload', NULL),
-(33, 332, 'remain', 'uebrig', NULL),
+(33, 332, 'remain_clicks', 'uebrig', NULL),
 (33, 333, 'extra', 'art', 'surfbarview'),
 (33, 333, 'affiliate_id', 'uid', NULL),
 (33, 333, 'password', 'pw', NULL),
-(33, 333, 'sid', 'sid', NULL),
+(33, 333, 'site_id', 'sid', NULL),
 (33, 333, 'reward', 'verguetung', NULL),
 (33, 333, 'reload', 'reload', NULL),
-(33, 333, 'remain', 'uebrig', NULL),
+(33, 333, 'remain_clicks', 'uebrig', NULL),
 (33, 334, 'extra', 'art', 'textlinkklick'),
 (33, 334, 'affiliate_id', 'uid', NULL),
 (33, 334, 'password', 'pw', NULL),
-(33, 334, 'sid', 'sid', NULL),
+(33, 334, 'site_id', 'sid', NULL),
 (33, 334, 'reward', 'verguetung', NULL),
 (33, 334, 'reload', 'reload', NULL),
-(33, 334, 'remain', 'uebrig', NULL),
+(33, 334, 'remain_clicks', 'uebrig', NULL),
 (33, 335, 'extra', 'art', 'textlinkview'),
 (33, 335, 'affiliate_id', 'uid', NULL),
 (33, 335, 'password', 'pw', NULL),
-(33, 335, 'sid', 'sid', NULL),
+(33, 335, 'site_id', 'sid', NULL),
 (33, 335, 'reward', 'verguetung', NULL),
 (33, 335, 'reload', 'reload', NULL),
-(33, 335, 'remain', 'uebrig', NULL)");
+(33, 335, 'remain_clicks', 'uebrig', NULL)");
 
                // Request parameters per type handler - ADkracher
                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
@@ -1577,98 +1986,98 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (34, 336, 'affiliate_id', 'uid', NULL),
 (34, 336, 'password', 'pw', NULL),
 (34, 336, 'reload', 'reload', NULL),
-(34, 336, 'remain', 'uebrig', NULL),
+(34, 336, 'remain_clicks', 'uebrig', NULL),
 (34, 336, 'reward', 'verguetung', NULL),
-(34, 336, 'sid', 'sid', NULL),
+(34, 336, 'site_id', 'sid', NULL),
 (34, 337, 'extra', 'art', 'bannerview'),
 (34, 337, 'affiliate_id', 'uid', NULL),
 (34, 337, 'password', 'pw', NULL),
 (34, 337, 'reload', 'reload', NULL),
-(34, 337, 'remain', 'uebrig', NULL),
+(34, 337, 'remain_clicks', 'uebrig', NULL),
 (34, 337, 'reward', 'verguetung', NULL),
-(34, 337, 'sid', 'sid', NULL),
-(34, 338, 'extra', 'art', 'forcedbanner'),
+(34, 337, 'site_id', 'sid', NULL),
+(34, 338, 'extra', 'art', 'forced_banner'),
 (34, 338, 'affiliate_id', 'uid', NULL),
 (34, 338, 'minimum_stay', 'ma', NULL),
 (34, 338, 'password', 'pw', NULL),
 (34, 338, 'reload', 'reload', NULL),
-(34, 338, 'remain', 'uebrig', NULL),
+(34, 338, 'remain_clicks', 'uebrig', NULL),
 (34, 338, 'reward', 'verguetung', NULL),
-(34, 338, 'sid', 'sid', NULL),
-(34, 339, 'extra', 'art', 'forcedtextlink'),
+(34, 338, 'site_id', 'sid', NULL),
+(34, 339, 'extra', 'art', 'forced_textlink'),
 (34, 339, 'affiliate_id', 'uid', NULL),
 (34, 339, 'minimum_stay', 'ma', NULL),
 (34, 339, 'password', 'pw', NULL),
 (34, 339, 'reload', 'reload', NULL),
-(34, 339, 'remain', 'uebrig', NULL),
+(34, 339, 'remain_clicks', 'uebrig', NULL),
 (34, 339, 'reward', 'verguetung', NULL),
-(34, 339, 'sid', 'sid', NULL),
+(34, 339, 'site_id', 'sid', NULL),
 (34, 340, 'extra', 'art', 'htmlmail'),
 (34, 340, 'affiliate_id', 'uid', NULL),
 (34, 340, 'minimum_stay', 'ma', NULL),
 (34, 340, 'password', 'pw', NULL),
 (34, 340, 'reload', 'reload', NULL),
-(34, 340, 'remain', 'uebrig', NULL),
+(34, 340, 'remain_clicks', 'uebrig', NULL),
 (34, 340, 'reward', 'verguetung', NULL),
-(34, 340, 'sid', 'sid', NULL),
+(34, 340, 'site_id', 'sid', NULL),
 (34, 341, 'extra', 'art', 'layer'),
 (34, 341, 'affiliate_id', 'uid', NULL),
 (34, 341, 'password', 'pw', NULL),
 (34, 341, 'reload', 'reload', NULL),
-(34, 341, 'remain', 'uebrig', NULL),
+(34, 341, 'remain_clicks', 'uebrig', NULL),
 (34, 341, 'reward', 'verguetung', NULL),
-(34, 341, 'sid', 'sid', NULL),
+(34, 341, 'site_id', 'sid', NULL),
 (34, 342, 'extra', 'art', 'paidmail'),
 (34, 342, 'affiliate_id', 'uid', NULL),
 (34, 342, 'maximum_stay', 'ma', NULL),
 (34, 342, 'password', 'pw', NULL),
 (34, 342, 'reload', 'reload', NULL),
-(34, 342, 'remain', 'uebrig', NULL),
+(34, 342, 'remain_clicks', 'uebrig', NULL),
 (34, 342, 'reward', 'verguetung', NULL),
-(34, 342, 'sid', 'sid', NULL),
+(34, 342, 'site_id', 'sid', NULL),
 (34, 343, 'extra', 'art', 'popup'),
 (34, 343, 'affiliate_id', 'uid', NULL),
 (34, 343, 'maximum_stay', 'ma', NULL),
 (34, 343, 'password', 'pw', NULL),
 (34, 343, 'reload', 'reload', NULL),
-(34, 343, 'remain', 'uebrig', NULL),
+(34, 343, 'remain_clicks', 'uebrig', NULL),
 (34, 343, 'reward', 'verguetung', NULL),
-(34, 343, 'sid', 'sid', NULL),
+(34, 343, 'site_id', 'sid', NULL),
 (34, 344, 'extra', 'art', 'skybannerklick'),
 (34, 344, 'affiliate_id', 'uid', NULL),
 (34, 344, 'password', 'pw', NULL),
 (34, 344, 'reload', 'reload', NULL),
-(34, 344, 'remain', 'uebrig', NULL),
+(34, 344, 'remain_clicks', 'uebrig', NULL),
 (34, 344, 'reward', 'verguetung', NULL),
-(34, 344, 'sid', 'sid', NULL),
+(34, 344, 'site_id', 'sid', NULL),
 (34, 345, 'extra', 'art', 'skybannerview'),
 (34, 345, 'affiliate_id', 'uid', NULL),
 (34, 345, 'password', 'pw', NULL),
 (34, 345, 'reload', 'reload', NULL),
-(34, 345, 'remain', 'uebrig', NULL),
+(34, 345, 'remain_clicks', 'uebrig', NULL),
 (34, 345, 'reward', 'verguetung', NULL),
-(34, 345, 'sid', 'sid', NULL),
+(34, 345, 'site_id', 'sid', NULL),
 (34, 346, 'extra', 'art', 'textlinkklick'),
 (34, 346, 'affiliate_id', 'uid', NULL),
 (34, 346, 'password', 'pw', NULL),
 (34, 346, 'reload', 'reload', NULL),
-(34, 346, 'remain', 'uebrig', NULL),
+(34, 346, 'remain_clicks', 'uebrig', NULL),
 (34, 346, 'reward', 'verguetung', NULL),
-(34, 346, 'sid', 'sid', NULL),
+(34, 346, 'site_id', 'sid', NULL),
 (34, 347, 'extra', 'art', 'textlinkview'),
 (34, 347, 'affiliate_id', 'uid', NULL),
 (34, 347, 'password', 'pw', NULL),
 (34, 347, 'reload', 'reload', NULL),
 (34, 347, 'reward', 'verguetung', NULL),
-(34, 347, 'sid', 'sid', NULL),
+(34, 347, 'site_id', 'sid', NULL),
 (34, 348, 'extra', 'art', 'traffic'),
 (34, 348, 'affiliate_id', 'uid', NULL),
 (34, 348, 'minimum_stay', 'ma', NULL),
 (34, 348, 'password', 'pw', NULL),
 (34, 348, 'reload', 'reload', NULL),
-(34, 348, 'remain', 'uebrig', NULL),
+(34, 348, 'remain_clicks', 'uebrig', NULL),
 (34, 348, 'reward', 'verguetung', NULL),
-(34, 348, 'sid', 'sid', NULL)");
+(34, 348, 'site_id', '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
@@ -1676,119 +2085,119 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (35, 349, 'password', 'pw', NULL),
 (35, 349, 'reload', 'reload', NULL),
 (35, 349, 'reward', 'verguetung', NULL),
-(35, 349, 'remain', 'uebrig', NULL),
+(35, 349, 'remain_clicks', 'uebrig', NULL),
 (35, 349, 'type', 'typ', 'view'),
 (35, 350, 'affiliate_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, 'remain_clicks', 'uebrig', NULL),
 (35, 350, 'type', 'typ', 'view'),
 (35, 351, 'affiliate_id', 'id', NULL),
 (35, 351, 'password', 'pw', NULL),
 (35, 351, 'reload', 'reload', NULL),
 (35, 351, 'reward', 'verguetung', NULL),
-(35, 351, 'remain', 'uebrig', NULL),
+(35, 351, 'remain_clicks', 'uebrig', NULL),
 (35, 352, 'affiliate_id', 'id', NULL),
 (35, 352, 'password', 'pw', NULL),
 (35, 352, 'reload', 'reload', NULL),
 (35, 352, 'reward', 'verguetung', NULL),
-(35, 352, 'type', 'uebrig', NULL),
+(35, 352, 'remain_clicks', 'uebrig', NULL),
 (35, 353, 'affiliate_id', 'id', NULL),
 (35, 353, 'password', 'pw', NULL),
 (35, 353, 'reward', 'verguetung', NULL),
-(35, 353, 'remain', 'uebrig', NULL),
+(35, 353, 'remain_clicks', 'uebrig', NULL),
 (35, 353, 'minimum_stay', 'ma', NULL),
 (35, 354, 'affiliate_id', 'id', NULL),
 (35, 354, 'password', 'pw', NULL),
 (35, 354, 'reload', 'reload', NULL),
 (35, 354, 'reward', 'verguetung', NULL),
-(35, 354, 'remain', 'uebrig', NULL),
+(35, 354, 'remain_clicks', 'uebrig', NULL),
 (35, 355, 'affiliate_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, 'remain_clicks', 'uebrig', NULL),
 (35, 355, 'minimum_stay', 'ma', NULL),
 (35, 355, 'type', 'typ', 'popup'),
 (35, 356, 'affiliate_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, 'remain_clicks', 'uebrig', NULL),
 (35, 356, 'minimum_stay', 'ma', NULL),
 (35, 356, 'type', 'typ', 'popdown')");
 
                // Request parameters per type handler - Admono.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
-(36, 357, 'extra', 'typ', 'forcedbanner'),
+(36, 357, 'extra', 'typ', 'forced_banner'),
 (36, 357, 'affiliate_id', 'id', NULL),
-(36, 357, 'sid', 'sid', NULL),
+(36, 357, 'site_id', 'sid', NULL),
 (36, 357, 'password', 'pw', NULL),
-(36, 357, 'remain', 'uebrig', NULL),
+(36, 357, 'remain_clicks', 'uebrig', NULL),
 (36, 357, 'reload', 'reload', NULL),
 (36, 357, 'reward', 'verguetung', NULL),
-(36, 358, 'extra', 'typ', 'forcedtextlink'),
+(36, 358, 'extra', 'typ', 'forced_textlink'),
 (36, 358, 'affiliate_id', 'id', NULL),
-(36, 358, 'sid', 'sid', NULL),
+(36, 358, 'site_id', 'sid', NULL),
 (36, 358, 'password', 'pw', NULL),
-(36, 358, 'remain', 'uebrig', NULL),
+(36, 358, 'remain_clicks', 'uebrig', NULL),
 (36, 358, 'reload', 'reload', NULL),
 (36, 358, 'reward', 'verguetung', NULL),
 (36, 359, 'extra', 'typ', 'bannerview'),
 (36, 359, 'affiliate_id', 'id', NULL),
-(36, 359, 'sid', 'sid', NULL),
+(36, 359, 'site_id', 'sid', NULL),
 (36, 359, 'password', 'pw', NULL),
-(36, 359, 'remain', 'uebrig', NULL),
+(36, 359, 'remain_clicks', 'uebrig', NULL),
 (36, 359, 'reload', 'reload', NULL),
 (36, 359, 'reward', 'verguetung', NULL),
 (36, 360, 'extra', 'typ', 'bannerklick'),
 (36, 360, 'affiliate_id', 'id', NULL),
-(36, 360, 'sid', 'sid', NULL),
+(36, 360, 'site_id', 'sid', NULL),
 (36, 360, 'password', 'pw', NULL),
-(36, 360, 'remain', 'uebrig', NULL),
+(36, 360, 'remain_clicks', 'uebrig', NULL),
 (36, 360, 'reload', 'reload', NULL),
 (36, 360, 'reward', 'verguetung', NULL),
 (36, 361, 'extra', 'typ', 'skybannerview'),
 (36, 361, 'affiliate_id', 'id', NULL),
-(36, 361, 'sid', 'sid', NULL),
+(36, 361, 'site_id', 'sid', NULL),
 (36, 361, 'password', 'pw', NULL),
-(36, 361, 'remain', 'uebrig', NULL),
+(36, 361, 'remain_clicks', 'uebrig', NULL),
 (36, 361, 'reload', 'reload', NULL),
 (36, 361, 'reward', 'verguetung', NULL),
 (36, 362, 'extra', 'typ', 'buttonview'),
 (36, 362, 'affiliate_id', 'id', NULL),
-(36, 362, 'sid', 'sid', NULL),
+(36, 362, 'site_id', 'sid', NULL),
 (36, 362, 'password', 'pw', NULL),
-(36, 362, 'remain', 'uebrig', NULL),
+(36, 362, 'remain_clicks', 'uebrig', NULL),
 (36, 362, 'reload', 'reload', NULL),
 (36, 362, 'reward', 'verguetung', NULL),
 (36, 363, 'extra', 'typ', 'textview'),
 (36, 363, 'affiliate_id', 'id', NULL),
-(36, 363, 'sid', 'sid', NULL),
+(36, 363, 'site_id', 'sid', NULL),
 (36, 363, 'password', 'pw', NULL),
-(36, 363, 'remain', 'uebrig', NULL),
+(36, 363, 'remain_clicks', 'uebrig', NULL),
 (36, 363, 'reload', 'reload', NULL),
 (36, 363, 'reward', 'verguetung', NULL),
 (36, 364, 'extra', 'typ', 'traffic'),
 (36, 364, 'affiliate_id', 'id', NULL),
-(36, 364, 'sid', 'sid', NULL),
+(36, 364, 'site_id', 'sid', NULL),
 (36, 364, 'password', 'pw', NULL),
-(36, 364, 'remain', 'uebrig', NULL),
+(36, 364, 'remain_clicks', 'uebrig', NULL),
 (36, 364, 'reload', 'reload', NULL),
 (36, 364, 'reward', 'verguetung', NULL),
 (36, 365, 'extra', 'typ', 'popup'),
 (36, 365, 'affiliate_id', 'id', NULL),
-(36, 365, 'sid', 'sid', NULL),
+(36, 365, 'site_id', 'sid', NULL),
 (36, 365, 'password', 'pw', NULL),
-(36, 365, 'remain', 'uebrig', NULL),
+(36, 365, 'remain_clicks', 'uebrig', NULL),
 (36, 365, 'reload', 'reload', NULL),
 (36, 365, 'reward', 'verguetung', NULL),
 (36, 366, 'extra', 'typ', 'paidmail'),
 (36, 366, 'affiliate_id', 'id', NULL),
-(36, 366, 'sid', 'sid', NULL),
+(36, 366, 'site_id', 'sid', NULL),
 (36, 366, 'password', 'pw', NULL),
-(36, 366, 'remain', 'uebrig', NULL),
+(36, 366, 'remain_clicks', 'uebrig', NULL),
 (36, 366, 'reload', 'reload', NULL),
 (36, 366, 'reward', 'verguetung', NULL)");
 
@@ -1797,341 +2206,341 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (5, 177, 'affiliate_id', 'id', NULL),
 (5, 177, 'password', 'pw', NULL),
 (5, 177, 'reload', 'reload', NULL),
-(5, 177, 'remain', 'uebrig', NULL),
+(5, 177, 'remain_clicks', 'uebrig', NULL),
 (5, 177, 'reward', 'verguetung', NULL),
-(5, 177, 'sid', 'sid', NULL),
+(5, 177, 'site_id', 'sid', NULL),
 (5, 177, 'size', 'size', '468x60'),
 (5, 177, 'type', 'typ', 'klick'),
 (5, 178, 'affiliate_id', 'id', NULL),
 (5, 178, 'password', 'pw', NULL),
 (5, 178, 'reload', 'reload', NULL),
-(5, 178, 'remain', 'uebrig', NULL),
+(5, 178, 'remain_clicks', 'uebrig', NULL),
 (5, 178, 'reward', 'verguetung', NULL),
-(5, 178, 'sid', 'sid', NULL),
+(5, 178, 'site_id', 'sid', NULL),
 (5, 178, 'type', 'typ', 'klick'),
 (5, 179, 'affiliate_id', 'id', NULL),
 (5, 179, 'password', 'pw', NULL),
 (5, 179, 'reload', 'reload', NULL),
-(5, 179, 'remain', 'uebrig', NULL),
+(5, 179, 'remain_clicks', 'uebrig', NULL),
 (5, 179, 'reward', 'verguetung', NULL),
-(5, 179, 'sid', 'sid', NULL),
+(5, 179, 'site_id', 'sid', NULL),
 (5, 179, 'size', 'size', NULL),
 (5, 179, 'type', 'typ', 'klick'),
 (5, 180, 'affiliate_id', 'id', NULL),
 (5, 180, 'minimum_stay', 'ma', NULL),
 (5, 180, 'password', 'pw', NULL),
 (5, 180, 'reload', 'reload', NULL),
-(5, 180, 'remain', 'uebrig', NULL),
+(5, 180, 'remain_clicks', 'uebrig', NULL),
 (5, 180, 'reward', 'verguetung', NULL),
-(5, 180, 'sid', 'sid', NULL),
+(5, 180, 'site_id', 'sid', NULL),
 (5, 180, 'size', 'size', '468x60'),
 (5, 181, 'affiliate_id', 'id', NULL),
 (5, 181, 'minimum_stay', 'ma', NULL),
 (5, 181, 'password', 'pw', NULL),
 (5, 181, 'reload', 'reload', NULL),
-(5, 181, 'remain', 'uebrig', NULL),
+(5, 181, 'remain_clicks', 'uebrig', NULL),
 (5, 181, 'reward', 'verguetung', NULL),
-(5, 181, 'sid', 'sid', NULL),
+(5, 181, 'site_id', 'sid', NULL),
 (5, 181, 'type', 'typ', 'text'),
 (5, 182, 'affiliate_id', 'id', NULL),
 (5, 182, 'password', 'pw', NULL),
 (5, 182, 'reload', 'reload', NULL),
-(5, 182, 'remain', 'uebrig', NULL),
+(5, 182, 'remain_clicks', 'uebrig', NULL),
 (5, 182, 'reward', 'verguetung', NULL),
-(5, 182, 'sid', 'sid', NULL),
+(5, 182, 'site_id', 'sid', NULL),
 (5, 182, 'type', 'typ', 'klick'),
 (5, 183, 'affiliate_id', 'id', NULL),
 (5, 183, 'minimum_stay', 'ma', NULL),
 (5, 183, 'password', 'pw', NULL),
 (5, 183, 'reload', 'reload', NULL),
-(5, 183, 'remain', 'uebrig', NULL),
+(5, 183, 'remain_clicks', 'uebrig', NULL),
 (5, 183, 'reward', 'verguetung', NULL),
-(5, 183, 'sid', 'sid', NULL),
+(5, 183, 'site_id', 'sid', NULL),
 (5, 184, 'affiliate_id', 'id', NULL),
 (5, 184, 'minimum_stay', 'ma', NULL),
 (5, 184, 'password', 'pw', NULL),
 (5, 184, 'reload', 'reload', NULL),
-(5, 184, 'remain', 'uebrig', NULL),
+(5, 184, 'remain_clicks', 'uebrig', NULL),
 (5, 184, 'reward', 'verguetung', NULL),
-(5, 184, 'sid', 'sid', NULL),
+(5, 184, 'site_id', 'sid', NULL),
 (5, 185, 'affiliate_id', 'id', NULL),
 (5, 185, 'password', 'pw', NULL),
-(5, 185, 'remain', 'uebrig', NULL),
+(5, 185, 'remain_clicks', 'uebrig', NULL),
 (5, 185, 'reward', 'verguetung', NULL),
-(5, 185, 'sid', 'sid', NULL),
+(5, 185, 'site_id', 'sid', NULL),
 (5, 186, 'affiliate_id', 'id', NULL),
 (5, 186, 'password', 'pw', NULL),
-(5, 186, 'remain', 'uebrig', NULL),
+(5, 186, 'remain_clicks', 'uebrig', NULL),
 (5, 186, 'reward', 'verguetung', NULL),
-(5, 186, 'sid', 'sid', NULL),
+(5, 186, 'site_id', 'sid', NULL),
 (5, 391, 'affiliate_id', 'id', NULL),
 (5, 391, 'password', 'pw', NULL),
 (5, 391, 'reload', 'reload', NULL),
-(5, 391, 'remain', 'uebrig', NULL),
+(5, 391, 'remain_clicks', 'uebrig', NULL),
 (5, 391, 'reward', 'verguetung', NULL),
-(5, 391, 'sid', 'sid', NULL),
+(5, 391, 'site_id', 'sid', NULL),
 (5, 391, 'size', 'size', '468x60'),
 (5, 391, 'type', 'typ', 'view'),
 (5, 392, 'affiliate_id', 'id', NULL),
 (5, 392, 'password', 'pw', NULL),
 (5, 392, 'reload', 'reload', NULL),
-(5, 392, 'remain', 'uebrig', NULL),
+(5, 392, 'remain_clicks', 'uebrig', NULL),
 (5, 392, 'reward', 'verguetung', NULL),
-(5, 392, 'sid', 'sid', NULL),
+(5, 392, 'site_id', 'sid', NULL),
 (5, 392, 'type', 'typ', 'view'),
 (5, 393, 'affiliate_id', 'id', NULL),
 (5, 393, 'password', 'pw', NULL),
 (5, 393, 'reload', 'reload', NULL),
-(5, 393, 'remain', 'uebrig', NULL),
+(5, 393, 'remain_clicks', 'uebrig', NULL),
 (5, 393, 'reward', 'verguetung', NULL),
-(5, 393, 'sid', 'sid', NULL),
+(5, 393, 'site_id', 'sid', NULL),
 (5, 393, 'size', 'size', NULL),
 (5, 393, 'type', 'typ', 'view'),
 (5, 394, 'affiliate_id', 'id', NULL),
 (5, 394, 'password', 'pw', NULL),
 (5, 394, 'reload', 'reload', NULL),
-(5, 394, 'remain', 'uebrig', NULL),
+(5, 394, 'remain_clicks', 'uebrig', NULL),
 (5, 394, 'reward', 'verguetung', NULL),
-(5, 394, 'sid', 'sid', NULL),
+(5, 394, 'site_id', 'sid', NULL),
 (5, 394, 'type', 'typ', 'view')");
 
                // Request parameters per type handler - AdProvi
                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
-(38, 377, 'extra', 'typ', 'forcedbanner'),
+(38, 377, 'extra', 'typ', 'forced_banner'),
 (38, 377, 'affiliate_id', 'id', NULL),
 (38, 377, 'password', 'pw', NULL),
-(38, 377, 'remain', 'uebrig', NULL),
+(38, 377, 'remain_clicks', 'uebrig', NULL),
 (38, 377, 'reload', 'reload', NULL),
 (38, 377, 'reward', 'verguetung', NULL),
-(38, 377, 'sid', 'siteid', NULL),
-(38, 378, 'extra', 'typ', 'forcedtextlink'),
+(38, 377, 'site_id', 'siteid', NULL),
+(38, 378, 'extra', 'typ', 'forced_textlink'),
 (38, 378, 'affiliate_id', 'id', NULL),
 (38, 378, 'password', 'pw', NULL),
-(38, 378, 'remain', 'uebrig', NULL),
+(38, 378, 'remain_clicks', 'uebrig', NULL),
 (38, 378, 'reload', 'reload', NULL),
 (38, 378, 'reward', 'verguetung', NULL),
-(38, 378, 'sid', 'siteid', NULL),
+(38, 378, 'site_id', 'siteid', NULL),
 (38, 379, 'extra', 'typ', 'bannerview'),
 (38, 379, 'affiliate_id', 'id', NULL),
 (38, 379, 'password', 'pw', NULL),
-(38, 379, 'remain', 'uebrig', NULL),
+(38, 379, 'remain_clicks', 'uebrig', NULL),
 (38, 379, 'reload', 'reload', NULL),
 (38, 379, 'reward', 'verguetung', NULL),
-(38, 379, 'sid', 'siteid', NULL),
+(38, 379, 'site_id', 'siteid', NULL),
 (38, 380, 'extra', 'typ', 'bannerklick'),
 (38, 380, 'affiliate_id', 'id', NULL),
 (38, 380, 'password', 'pw', NULL),
-(38, 380, 'remain', 'uebrig', NULL),
+(38, 380, 'remain_clicks', 'uebrig', NULL),
 (38, 380, 'reload', 'reload', NULL),
 (38, 380, 'reward', 'verguetung', NULL),
-(38, 380, 'sid', 'siteid', NULL),
+(38, 380, 'site_id', 'siteid', NULL),
 (38, 381, 'extra', 'typ', 'skybannerview'),
 (38, 381, 'affiliate_id', 'id', NULL),
 (38, 381, 'password', 'pw', NULL),
-(38, 381, 'remain', 'uebrig', NULL),
+(38, 381, 'remain_clicks', 'uebrig', NULL),
 (38, 381, 'reload', 'reload', NULL),
 (38, 381, 'reward', 'verguetung', NULL),
-(38, 381, 'sid', 'siteid', NULL),
+(38, 381, 'site_id', 'siteid', NULL),
 (38, 382, 'extra', 'typ', 'buttonview'),
 (38, 382, 'affiliate_id', 'id', NULL),
 (38, 382, 'password', 'pw', NULL),
-(38, 382, 'remain', 'uebrig', NULL),
+(38, 382, 'remain_clicks', 'uebrig', NULL),
 (38, 382, 'reload', 'reload', NULL),
 (38, 382, 'reward', 'verguetung', NULL),
-(38, 382, 'sid', 'siteid', NULL),
+(38, 382, 'site_id', 'siteid', NULL),
 (38, 383, 'extra', 'typ', 'textview'),
 (38, 383, 'affiliate_id', 'id', NULL),
 (38, 383, 'password', 'pw', NULL),
-(38, 383, 'remain', 'uebrig', NULL),
+(38, 383, 'remain_clicks', 'uebrig', NULL),
 (38, 383, 'reload', 'reload', NULL),
 (38, 383, 'reward', 'verguetung', NULL),
-(38, 383, 'sid', 'siteid', NULL),
+(38, 383, 'site_id', 'siteid', NULL),
 (38, 384, 'extra', 'typ', 'traffic'),
 (38, 384, 'affiliate_id', 'id', NULL),
 (38, 384, 'password', 'pw', NULL),
-(38, 384, 'remain', 'uebrig', NULL),
+(38, 384, 'remain_clicks', 'uebrig', NULL),
 (38, 384, 'reload', 'reload', NULL),
 (38, 384, 'reward', 'verguetung', NULL),
-(38, 384, 'sid', 'siteid', NULL),
+(38, 384, 'site_id', 'siteid', NULL),
 (38, 385, 'extra', 'typ', 'popup'),
 (38, 385, 'affiliate_id', 'id', NULL),
 (38, 385, 'password', 'pw', NULL),
-(38, 385, 'remain', 'uebrig', NULL),
+(38, 385, 'remain_clicks', 'uebrig', NULL),
 (38, 385, 'reload', 'reload', NULL),
 (38, 385, 'reward', 'verguetung', NULL),
-(38, 385, 'sid', 'siteid', NULL),
+(38, 385, 'site_id', 'siteid', NULL),
 (38, 386, 'extra', 'typ', 'paidmail'),
 (38, 386, 'affiliate_id', 'id', NULL),
 (38, 386, 'password', 'pw', NULL),
-(38, 386, 'remain', 'uebrig', NULL),
+(38, 386, 'remain_clicks', 'uebrig', NULL),
 (38, 386, 'reload', 'reload', NULL),
 (38, 386, 'reward', 'verguetung', NULL),
-(38, 386, 'sid', 'siteid', NULL)");
+(38, 386, 'site_id', 'siteid', NULL)");
 
                // Request parameters per type handler - Ads2Earn
                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
 (39, 395, 'affiliate_id', 'id', NULL),
-(39, 395, 'sid', 'sid', NULL),
+(39, 395, 'site_id', 'sid', NULL),
 (39, 395, 'password', 'pw', NULL),
 (39, 395, 'reward', 'verguetung', NULL),
 (39, 395, 'reload', 'reload', NULL),
-(39, 395, 'remain', 'uebrig', NULL),
+(39, 395, 'remain_clicks', 'uebrig', NULL),
 (39, 395, 'type', 'typ', 'klick'),
 (39, 395, 'size', 'size', '468x60'),
 (39, 395, 'minimum_stay', 'ma', NULL),
 (39, 396, 'affiliate_id', 'id', NULL),
-(39, 396, 'sid', 'sid', NULL),
+(39, 396, 'site_id', 'sid', NULL),
 (39, 396, 'password', 'pw', NULL),
 (39, 396, 'reward', 'verguetung', NULL),
 (39, 396, 'reload', 'reload', NULL),
-(39, 396, 'remain', 'uebrig', NULL),
+(39, 396, 'remain_clicks', 'uebrig', NULL),
 (39, 396, 'type', 'typ', 'view'),
 (39, 396, 'size', 'size', '468x60'),
 (39, 396, 'minimum_stay', 'ma', NULL),
 (39, 397, 'affiliate_id', 'id', NULL),
-(39, 397, 'sid', 'sid', NULL),
+(39, 397, 'site_id', 'sid', NULL),
 (39, 397, 'password', 'pw', NULL),
 (39, 397, 'reward', 'verguetung', NULL),
 (39, 397, 'reload', 'reload', NULL),
-(39, 397, 'remain', 'remain', NULL),
+(39, 397, 'remain_clicks', 'remain_clicks', NULL),
 (39, 397, 'type', 'typ', 'klick'),
 (39, 398, 'affiliate_id', 'id', NULL),
-(39, 398, 'sid', 'sid', NULL),
+(39, 398, 'site_id', 'sid', NULL),
 (39, 398, 'password', 'pw', NULL),
 (39, 398, 'reward', 'verguetung', NULL),
 (39, 398, 'reload', 'reload', NULL),
-(39, 398, 'remain', 'uebrig', NULL),
+(39, 398, 'remain_clicks', 'uebrig', NULL),
 (39, 398, 'type', 'typ', 'view'),
 (39, 399, 'affiliate_id', 'id', NULL),
-(39, 399, 'sid', 'sid', NULL),
+(39, 399, 'site_id', 'sid', NULL),
 (39, 399, 'password', 'pw', NULL),
 (39, 399, 'reward', 'verguetung', NULL),
 (39, 399, 'reload', 'reload', NULL),
-(39, 399, 'remain', 'uebrig', NULL),
+(39, 399, 'remain_clicks', 'uebrig', NULL),
 (39, 399, 'size', 'size', '468x60'),
 (39, 399, 'minimum_stay', 'ma', NULL),
 (39, 400, 'affiliate_id', 'id', NULL),
-(39, 400, 'sid', 'sid', NULL),
+(39, 400, 'site_id', 'sid', NULL),
 (39, 400, 'password', 'pw', NULL),
 (39, 400, 'reload', 'reload', NULL),
 (39, 400, 'reward', 'verguetung', NULL),
-(39, 400, 'remain', 'uebrig', NULL),
+(39, 400, 'remain_clicks', 'uebrig', NULL),
 (39, 400, 'minimum_stay', 'ma', NULL),
 (39, 400, 'type', 'typ', 'html'),
 (39, 401, 'affiliate_id', 'id', NULL),
-(39, 401, 'sid', 'sid', NULL),
+(39, 401, 'site_id', 'sid', NULL),
 (39, 401, 'password', 'pw', NULL),
 (39, 401, 'reload', 'reload', NULL),
 (39, 401, 'reward', 'verguetung', NULL),
-(39, 401, 'remain', 'uebrig', NULL),
+(39, 401, 'remain_clicks', 'uebrig', NULL),
 (39, 401, 'minimum_stay', 'ma', NULL),
 (39, 401, 'type', 'typ', 'text'),
 (39, 402, 'affiliate_id', 'id', NULL),
-(39, 402, 'sid', 'sid', NULL),
+(39, 402, 'site_id', 'sid', NULL),
 (39, 402, 'password', 'pw', NULL),
 (39, 402, 'reward', 'verguetung', NULL),
 (39, 402, 'reload', 'reload', NULL),
-(39, 402, 'remain', 'uebrig', NULL),
+(39, 402, 'remain_clicks', 'uebrig', NULL),
 (39, 402, 'type', 'typ', 'klick'),
 (39, 402, 'size', 'size', '88x31'),
 (39, 402, 'minimum_stay', 'ma', NULL),
 (39, 403, 'affiliate_id', 'id', NULL),
-(39, 403, 'sid', 'sid', NULL),
+(39, 403, 'site_id', 'sid', NULL),
 (39, 403, 'password', 'pw', NULL),
 (39, 403, 'reward', 'verguetung', NULL),
 (39, 403, 'reload', 'reload', NULL),
-(39, 403, 'remain', 'uebrig', NULL),
+(39, 403, 'remain_clicks', 'uebrig', NULL),
 (39, 403, 'type', 'typ', 'view'),
 (39, 403, 'size', 'size', '88x31'),
 (39, 403, 'minimum_stay', 'ma', NULL),
 (39, 404, 'affiliate_id', 'id', NULL),
-(39, 404, 'sid', 'sid', NULL),
+(39, 404, 'site_id', 'sid', NULL),
 (39, 404, 'password', 'pw', NULL),
 (39, 404, 'reward', 'verguetung', NULL),
 (39, 404, 'reload', 'reload', NULL),
-(39, 404, 'remain', 'uebrig', NULL),
+(39, 404, 'remain_clicks', 'uebrig', NULL),
 (39, 404, 'type', 'typ', 'klick'),
 (39, 404, 'size', 'size', '120x600'),
 (39, 404, 'minimum_stay', 'ma', NULL),
 (39, 405, 'affiliate_id', 'id', NULL),
-(39, 405, 'sid', 'sid', NULL),
+(39, 405, 'site_id', 'sid', NULL),
 (39, 405, 'password', 'pw', NULL),
 (39, 405, 'reward', 'verguetung', NULL),
 (39, 405, 'reload', 'reload', NULL),
-(39, 405, 'remain', 'uebrig', NULL),
+(39, 405, 'remain_clicks', 'uebrig', NULL),
 (39, 405, 'type', 'typ', 'view'),
 (39, 405, 'size', 'size', '120x600'),
 (39, 405, 'minimum_stay', 'ma', NULL)");
 
                // Request parameters per type handler - Ads2Webbi
                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
-(40, 406, 'extra', 'typ', 'forcedbanner'),
+(40, 406, 'extra', 'typ', 'forced_banner'),
 (40, 406, 'affiliate_id', 'id', NULL),
 (40, 406, 'password', 'pw', NULL),
-(40, 406, 'remain', 'uebrig', NULL),
+(40, 406, 'remain_clicks', 'uebrig', NULL),
 (40, 406, 'reload', 'reload', NULL),
 (40, 406, 'reward', 'verguetung', NULL),
 (40, 406, 'minimum_stay', 'ma', NULL),
-(40, 407, 'extra', 'typ', 'forcedtextlink'),
+(40, 407, 'extra', 'typ', 'forced_textlink'),
 (40, 407, 'affiliate_id', 'id', NULL),
 (40, 407, 'password', 'pw', NULL),
-(40, 407, 'remain', 'uebrig', NULL),
+(40, 407, 'remain_clicks', 'uebrig', NULL),
 (40, 407, 'reload', 'reload', NULL),
 (40, 407, 'reward', 'verguetung', NULL),
 (40, 407, 'minimum_stay', 'ma', NULL),
 (40, 408, 'extra', 'typ', 'bannerview'),
 (40, 408, 'affiliate_id', 'id', NULL),
 (40, 408, 'password', 'pw', NULL),
-(40, 408, 'remain', 'uebrig', NULL),
+(40, 408, 'remain_clicks', 'uebrig', NULL),
 (40, 408, 'reload', 'reload', NULL),
 (40, 408, 'reward', 'verguetung', NULL),
 (40, 408, 'minimum_stay', 'ma', NULL),
 (40, 409, 'extra', 'typ', 'bannerklick'),
 (40, 409, 'affiliate_id', 'id', NULL),
 (40, 409, 'password', 'pw', NULL),
-(40, 409, 'remain', 'uebrig', NULL),
+(40, 409, 'remain_clicks', 'uebrig', NULL),
 (40, 409, 'reload', 'reload', NULL),
 (40, 409, 'reward', 'verguetung', NULL),
 (40, 409, 'minimum_stay', 'ma', NULL),
 (40, 410, 'extra', 'typ', 'skybannerview'),
 (40, 410, 'affiliate_id', 'id', NULL),
 (40, 410, 'password', 'pw', NULL),
-(40, 410, 'remain', 'uebrig', NULL),
+(40, 410, 'remain_clicks', 'uebrig', NULL),
 (40, 410, 'reload', 'reload', NULL),
 (40, 410, 'reward', 'verguetung', NULL),
 (40, 410, 'minimum_stay', 'ma', NULL),
 (40, 411, 'extra', 'typ', 'buttonview'),
 (40, 411, 'affiliate_id', 'id', NULL),
 (40, 411, 'password', 'pw', NULL),
-(40, 411, 'remain', 'uebrig', NULL),
+(40, 411, 'remain_clicks', 'uebrig', NULL),
 (40, 411, 'reload', 'reload', NULL),
 (40, 411, 'reward', 'verguetung', NULL),
 (40, 411, 'minimum_stay', 'ma', NULL),
 (40, 412, 'extra', 'typ', 'textview'),
 (40, 412, 'affiliate_id', 'id', NULL),
 (40, 412, 'password', 'pw', NULL),
-(40, 412, 'remain', 'uebrig', NULL),
+(40, 412, 'remain_clicks', 'uebrig', NULL),
 (40, 412, 'reload', 'reload', NULL),
 (40, 412, 'reward', 'verguetung', NULL),
 (40, 412, 'minimum_stay', 'ma', NULL),
 (40, 413, 'extra', 'typ', 'traffic'),
 (40, 413, 'affiliate_id', 'id', NULL),
 (40, 413, 'password', 'pw', NULL),
-(40, 413, 'remain', 'uebrig', NULL),
+(40, 413, 'remain_clicks', 'uebrig', NULL),
 (40, 413, 'reload', 'reload', NULL),
 (40, 413, 'reward', 'verguetung', NULL),
 (40, 413, 'minimum_stay', 'ma', NULL),
 (40, 414, 'extra', 'typ', 'popup'),
 (40, 414, 'affiliate_id', 'id', NULL),
 (40, 414, 'password', 'pw', NULL),
-(40, 414, 'remain', 'uebrig', NULL),
+(40, 414, 'remain_clicks', 'uebrig', NULL),
 (40, 414, 'reload', 'reload', NULL),
 (40, 414, 'reward', 'verguetung', NULL),
 (40, 414, 'minimum_stay', 'ma', NULL),
 (40, 415, 'extra', 'typ', 'paidmail'),
 (40, 415, 'affiliate_id', 'id', NULL),
 (40, 415, 'password', 'pw', NULL),
-(40, 415, 'remain', 'uebrig', NULL),
+(40, 415, 'remain_clicks', 'uebrig', NULL),
 (40, 415, 'reload', 'reload', NULL),
 (40, 415, 'reward', 'verguetung', NULL),
 (40, 415, 'minimum_stay', 'ma', NULL)");
@@ -2144,7 +2553,7 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (6, 14, 'minimum_stay', 'ma', NULL),
 (6, 14, 'password', 'pwd', NULL),
 (6, 14, 'reload', 'reload', NULL),
-(6, 14, 'remain', 'uebrig', NULL),
+(6, 14, 'remain_clicks', 'uebrig', NULL),
 (6, 14, 'reward', 'verg', NULL),
 (6, 15, 'currency', 'waehrung', NULL),
 (6, 15, 'extra', 'mediatype', 'textmails'),
@@ -2152,7 +2561,7 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (6, 15, 'minimum_stay', 'ma', NULL),
 (6, 15, 'password', 'pwd', NULL),
 (6, 15, 'reload', 'reload', NULL),
-(6, 15, 'remain', 'uebrig', NULL),
+(6, 15, 'remain_clicks', 'uebrig', NULL),
 (6, 15, 'reward', 'verg', NULL),
 (6, 16, 'currency', 'waehrung', NULL),
 (6, 16, 'extra', 'mediatype', 'htmlmails'),
@@ -2160,7 +2569,7 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (6, 16, 'minimum_stay', 'ma', NULL),
 (6, 16, 'password', 'pw', NULL),
 (6, 16, 'reload', 'reload', NULL),
-(6, 16, 'remain', 'uebrig', NULL),
+(6, 16, 'remain_clicks', 'uebrig', NULL),
 (6, 16, 'reward', 'verg', NULL),
 (6, 119, 'currency', 'waehrung', NULL),
 (6, 119, 'extra', 'mediatype', 'traffic'),
@@ -2168,137 +2577,137 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (6, 119, 'minimum_stay', 'ma', NULL),
 (6, 119, 'password', 'pwd', NULL),
 (6, 119, 'reload', 'reload', NULL),
-(6, 119, 'remain', 'uebrig', NULL),
+(6, 119, 'remain_clicks', 'uebrig', NULL),
 (6, 119, 'reward', 'verg', NULL)");
 
                // Request parameters per type handler - Ads4Webbis
                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, 'extra', 'typ', 'forced_banner'),
 (7, 17, 'affiliate_id', 'id', NULL),
 (7, 17, 'password', 'pw', NULL),
 (7, 17, 'reload', 'reload', NULL),
-(7, 17, 'remain', 'uebrig', NULL),
+(7, 17, 'remain_clicks', 'uebrig', NULL),
 (7, 17, 'reward', 'verguetung', NULL),
-(7, 18, 'extra', 'typ', 'forcedtextlink'),
+(7, 18, 'extra', 'typ', 'forced_textlink'),
 (7, 18, 'affiliate_id', 'id', NULL),
 (7, 18, 'password', 'pw', NULL),
 (7, 18, 'reload', 'reload', NULL),
-(7, 18, 'remain', 'uebrig', NULL),
+(7, 18, 'remain_clicks', 'uebrig', NULL),
 (7, 18, 'reward', 'verguetung', NULL),
 (7, 19, 'extra', 'typ', 'bannerview'),
 (7, 19, 'affiliate_id', 'id', NULL),
 (7, 19, 'password', 'pw', NULL),
 (7, 19, 'reload', 'reload', NULL),
-(7, 19, 'remain', 'uebrig', NULL),
+(7, 19, 'remain_clicks', 'uebrig', NULL),
 (7, 19, 'reward', 'verguetung', NULL),
 (7, 20, 'extra', 'typ', 'bannerklick'),
 (7, 20, 'affiliate_id', 'id', NULL),
 (7, 20, 'password', 'pw', NULL),
 (7, 20, 'reload', 'reload', NULL),
-(7, 20, 'remain', 'uebrig', NULL),
+(7, 20, 'remain_clicks', 'uebrig', NULL),
 (7, 20, 'reward', 'verguetung', NULL),
 (7, 21, 'extra', 'typ', 'skybannerview'),
 (7, 21, 'affiliate_id', 'id', NULL),
 (7, 21, 'password', 'pw', NULL),
 (7, 21, 'reload', 'reload', NULL),
-(7, 21, 'remain', 'uebrig', NULL),
+(7, 21, 'remain_clicks', 'uebrig', NULL),
 (7, 21, 'reward', 'verguetung', NULL),
 (7, 22, 'extra', 'typ', 'buttonview'),
 (7, 22, 'affiliate_id', 'id', NULL),
 (7, 22, 'password', 'pw', NULL),
 (7, 22, 'reload', 'reload', NULL),
-(7, 22, 'remain', 'uebrig', NULL),
+(7, 22, 'remain_clicks', 'uebrig', NULL),
 (7, 22, 'reward', 'verguetung', NULL),
 (7, 23, 'extra', 'typ', 'textview'),
 (7, 23, 'affiliate_id', 'id', NULL),
 (7, 23, 'password', 'pw', NULL),
 (7, 23, 'reload', 'reload', NULL),
-(7, 23, 'remain', 'uebrig', NULL),
+(7, 23, 'remain_clicks', 'uebrig', NULL),
 (7, 23, 'reward', 'verguetung', NULL),
 (7, 24, 'extra', 'typ', 'popup'),
 (7, 24, 'affiliate_id', 'id', NULL),
 (7, 24, 'minimum_stay', 'ma', NULL),
 (7, 24, 'password', 'pw', NULL),
 (7, 24, 'reload', 'reload', NULL),
-(7, 24, 'remain', 'uebrig', NULL),
+(7, 24, 'remain_clicks', 'uebrig', NULL),
 (7, 24, 'reward', 'verguetung', NULL),
 (7, 25, 'extra', 'typ', 'paidmail'),
 (7, 25, 'affiliate_id', 'id', NULL),
 (7, 25, 'minimum_stay', 'ma', NULL),
 (7, 25, 'password', 'pw', NULL),
 (7, 25, 'reload', 'reload', NULL),
-(7, 25, 'remain', 'uebrig', NULL),
+(7, 25, 'remain_clicks', 'uebrig', NULL),
 (7, 25, 'reward', 'verguetung', NULL),
 (7, 120, 'extra', 'typ', 'traffic'),
 (7, 120, 'affiliate_id', 'id', NULL),
 (7, 120, 'password', 'pw', NULL),
 (7, 120, 'reload', 'reload', NULL),
-(7, 120, 'remain', 'uebrig', NULL),
+(7, 120, 'remain_clicks', 'uebrig', NULL),
 (7, 120, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - Ads4World
                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, 'extra', 'typ', 'forced_banner'),
 (8, 26, 'affiliate_id', 'id', NULL),
 (8, 26, 'password', 'pw', NULL),
 (8, 26, 'reload', 'reload', NULL),
-(8, 26, 'remain', 'uebrig', NULL),
+(8, 26, 'remain_clicks', 'uebrig', NULL),
 (8, 26, 'reward', 'verguetung', NULL),
-(8, 27, 'extra', 'typ', 'forcedtextlink'),
+(8, 27, 'extra', 'typ', 'forced_textlink'),
 (8, 27, 'affiliate_id', 'id', NULL),
 (8, 27, 'password', 'pw', NULL),
 (8, 27, 'reload', 'reload', NULL),
-(8, 27, 'remain', 'uebrig', NULL),
+(8, 27, 'remain_clicks', 'uebrig', NULL),
 (8, 27, 'reward', 'verguetung', NULL),
 (8, 28, 'extra', 'typ', 'bannerview'),
 (8, 28, 'affiliate_id', 'id', NULL),
 (8, 28, 'password', 'pw', NULL),
 (8, 28, 'reload', 'reload', NULL),
-(8, 28, 'remain', 'uebrig', NULL),
+(8, 28, 'remain_clicks', 'uebrig', NULL),
 (8, 28, 'reward', 'verguetung', NULL),
 (8, 29, 'extra', 'typ', 'bannerklick'),
 (8, 29, 'affiliate_id', 'id', NULL),
 (8, 29, 'password', 'pw', NULL),
 (8, 29, 'reload', 'reload', NULL),
-(8, 29, 'remain', 'uebrig', NULL),
+(8, 29, 'remain_clicks', 'uebrig', NULL),
 (8, 29, 'reward', 'verguetung', NULL),
 (8, 30, 'extra', 'typ', 'skybannerview'),
 (8, 30, 'affiliate_id', 'id', NULL),
 (8, 30, 'password', 'pw', NULL),
 (8, 30, 'reload', 'reload', NULL),
-(8, 30, 'remain', 'uebrig', NULL),
+(8, 30, 'remain_clicks', 'uebrig', NULL),
 (8, 30, 'reward', 'verguetung', NULL),
 (8, 31, 'extra', 'typ', 'buttonview'),
 (8, 31, 'affiliate_id', 'id', NULL),
 (8, 31, 'password', 'pw', NULL),
 (8, 31, 'reload', 'reload', NULL),
-(8, 31, 'remain', 'uebrig', NULL),
+(8, 31, 'remain_clicks', 'uebrig', NULL),
 (8, 31, 'reward', 'verguetung', NULL),
 (8, 32, 'extra', 'typ', 'textview'),
 (8, 32, 'affiliate_id', 'id', NULL),
 (8, 32, 'password', 'pw', NULL),
 (8, 32, 'reload', 'reload', NULL),
-(8, 32, 'remain', 'uebrig', NULL),
+(8, 32, 'remain_clicks', 'uebrig', NULL),
 (8, 32, 'reward', 'verguetung', NULL),
 (8, 33, 'extra', 'typ', 'popup'),
 (8, 33, 'affiliate_id', 'id', NULL),
 (8, 33, 'minimum_stay', 'ma', NULL),
 (8, 33, 'password', 'pw', NULL),
 (8, 33, 'reload', 'reload', NULL),
-(8, 33, 'remain', 'uebrig', NULL),
+(8, 33, 'remain_clicks', 'uebrig', NULL),
 (8, 33, 'reward', 'verguetung', NULL),
 (8, 34, 'extra', 'typ', 'textmails'),
 (8, 34, 'affiliate_id', 'id', NULL),
 (8, 34, 'minimum_stay', 'ma', NULL),
 (8, 34, 'password', 'pw', NULL),
 (8, 34, 'reload', 'reload', NULL),
-(8, 34, 'remain', 'uebrig', NULL),
+(8, 34, 'remain_clicks', 'uebrig', NULL),
 (8, 34, 'reward', 'verguetung', NULL),
 (8, 121, 'extra', 'typ', 'traffic'),
 (8, 121, 'affiliate_id', 'id', NULL),
 (8, 121, 'password', 'pw', NULL),
 (8, 121, 'reload', 'reload', NULL),
-(8, 121, 'remain', 'uebrig', NULL),
+(8, 121, 'remain_clicks', 'uebrig', NULL),
 (8, 121, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - Affiliblatt
@@ -2307,403 +2716,373 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (9, 441, 'extra', 'art', 'click'),
 (9, 441, 'reload', 'reload', NULL),
 (9, 441, 'reward', 'verguetung', NULL),
-(9, 441, 'remain', 'uebrig', NULL),
-(9, 441, 'size', 'size', NULL),
+(9, 441, 'remain_clicks', 'uebrig', NULL),
+(9, 441, 'size', 'size', '468x60'),
 (9, 442, 'affiliate_id', 'id', NULL),
 (9, 442, 'extra', 'art', 'view'),
 (9, 442, 'reload', 'reload', NULL),
 (9, 442, 'reward', 'verguetung', NULL),
-(9, 442, 'remain', 'uebrig', NULL),
-(9, 442, 'size', 'size', NULL),
+(9, 442, 'remain_clicks', 'uebrig', NULL),
+(9, 442, 'size', 'size', '468x60'),
 (9, 443, 'affiliate_id', 'id', NULL),
 (9, 443, 'extra', 'art', 'surfclick'),
 (9, 443, 'reload', 'reload', NULL),
 (9, 443, 'reward', 'verguetung', NULL),
-(9, 443, 'remain', 'uebrig', NULL),
+(9, 443, 'remain_clicks', 'uebrig', NULL),
 (9, 443, 'size', 'size', NULL),
 (9, 444, 'affiliate_id', 'id', NULL),
 (9, 444, 'extra', 'art', 'surfview'),
 (9, 444, 'reload', 'reload', NULL),
 (9, 444, 'reward', 'verguetung', NULL),
-(9, 444, 'remain', 'uebrig', NULL),
+(9, 444, 'remain_clicks', 'uebrig', NULL),
 (9, 444, 'size', 'size', NULL),
 (9, 445, 'affiliate_id', 'id', NULL),
 (9, 445, 'extra', 'art', 'sigclick'),
 (9, 445, 'reload', 'reload', NULL),
 (9, 445, 'reward', 'verguetung', NULL),
-(9, 445, 'remain', 'uebrig', NULL),
-(9, 445, 'size', 'size', NULL),
+(9, 445, 'remain_clicks', 'uebrig', NULL),
 (9, 446, 'affiliate_id', 'id', NULL),
 (9, 446, 'extra', 'art', 'sigview'),
 (9, 446, 'reload', 'reload', NULL),
 (9, 446, 'reward', 'verguetung', NULL),
-(9, 446, 'remain', 'uebrig', NULL),
-(9, 446, 'size', 'size', NULL),
+(9, 446, 'remain_clicks', 'uebrig', NULL),
 (9, 447, 'affiliate_id', 'id', NULL),
 (9, 447, 'extra', 'art', 'forcedclick'),
 (9, 447, 'reload', 'reload', NULL),
 (9, 447, 'reward', 'verguetung', NULL),
-(9, 447, 'remain', 'uebrig', NULL),
-(9, 447, 'size', 'size', NULL),
+(9, 447, 'remain_clicks', 'uebrig', NULL),
+(9, 447, 'size', 'size', '468x60'),
 (9, 448, 'affiliate_id', 'id', NULL),
 (9, 448, 'reward', 'verguetung', NULL),
 (9, 448, 'minimum_stay', 'ma', NULL),
-(9, 448, 'remain', 'uebrig', NULL),
+(9, 448, 'remain_clicks', 'uebrig', NULL),
 (9, 448, 'extra', 'reload', '1'),
 (9, 449, 'affiliate_id', 'id', NULL),
 (9, 449, 'reward', 'verguetung', NULL),
-(9, 449, 'remain', 'uebrig', NULL),
-(9, 449, 'reload', 'reload', NULL)");
+(9, 449, 'remain_clicks', 'uebrig', NULL),
+(9, 449, 'reload', 'reload', NULL),
+(9, 500, 'affiliate_id', 'id', NULL),
+(9, 500, 'extra', 'art', 'click'),
+(9, 500, 'reload', 'reload', NULL),
+(9, 500, 'reward', 'verguetung', NULL),
+(9, 500, 'remain_clicks', 'uebrig', NULL),
+(9, 500, 'size', 'size', '88x31'),
+(9, 501, 'affiliate_id', 'id', NULL),
+(9, 501, 'extra', 'art', 'view'),
+(9, 501, 'reload', 'reload', NULL),
+(9, 501, 'reward', 'verguetung', NULL),
+(9, 501, 'remain_clicks', 'uebrig', NULL),
+(9, 501, 'size', 'size', '88x31'),
+(9, 502, 'affiliate_id', 'id', NULL),
+(9, 502, 'extra', 'art', 'click'),
+(9, 502, 'reload', 'reload', NULL),
+(9, 502, 'reward', 'verguetung', NULL),
+(9, 502, 'remain_clicks', 'uebrig', NULL),
+(9, 502, 'size', 'size', '234x60'),
+(9, 503, 'affiliate_id', 'id', NULL),
+(9, 503, 'extra', 'art', 'view'),
+(9, 503, 'reload', 'reload', NULL),
+(9, 503, 'reward', 'verguetung', NULL),
+(9, 503, 'remain_clicks', 'uebrig', NULL),
+(9, 503, 'size', 'size', '234x60'),
+(9, 504, 'affiliate_id', 'id', NULL),
+(9, 504, 'extra', 'art', 'click'),
+(9, 504, 'reload', 'reload', NULL),
+(9, 504, 'reward', 'verguetung', NULL),
+(9, 504, 'remain_clicks', 'uebrig', NULL),
+(9, 504, 'size', 'size', '120x600'),
+(9, 505, 'affiliate_id', 'id', NULL),
+(9, 505, 'extra', 'art', 'view'),
+(9, 505, 'reload', 'reload', NULL),
+(9, 505, 'reward', 'verguetung', NULL),
+(9, 505, 'remain_clicks', 'uebrig', NULL),
+(9, 505, 'size', 'size', '120x600'),
+(9, 506, 'affiliate_id', 'id', NULL),
+(9, 506, 'extra', 'art', 'forcedclick'),
+(9, 506, 'reload', 'reload', NULL),
+(9, 506, 'reward', 'verguetung', NULL),
+(9, 506, 'remain_clicks', 'uebrig', NULL),
+(9, 506, 'size', 'size', '88x31'),
+(9, 507, 'affiliate_id', 'id', NULL),
+(9, 507, 'extra', 'art', 'forcedclick'),
+(9, 507, 'reload', 'reload', NULL),
+(9, 507, 'reward', 'verguetung', NULL),
+(9, 507, 'remain_clicks', 'uebrig', NULL),
+(9, 507, 'size', 'size', '234x60'),
+(9, 508, 'affiliate_id', 'id', NULL),
+(9, 508, 'extra', 'art', 'forcedclick'),
+(9, 508, 'reload', 'reload', NULL),
+(9, 508, 'reward', 'verguetung', NULL),
+(9, 508, 'remain_clicks', 'uebrig', NULL),
+(9, 508, 'size', 'size', '120x600')");
 
                // Request parameters per type handler - AllAds4You
                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, 'extra', 'typ', 'forced_banner'),
 (10, 167, 'affiliate_id', 'id', NULL),
 (10, 167, 'password', 'pw', NULL),
 (10, 167, 'reload', 'reload', NULL),
-(10, 167, 'remain', 'uebrig', NULL),
+(10, 167, 'remain_clicks', 'uebrig', NULL),
 (10, 167, 'reward', 'verguetung', NULL),
-(10, 167, 'sid', 'sid', NULL),
-(10, 168, 'extra', 'typ', 'forcedtextlink'),
+(10, 167, 'site_id', 'sid', NULL),
+(10, 168, 'extra', 'typ', 'forced_textlink'),
 (10, 168, 'affiliate_id', 'id', NULL),
 (10, 168, 'password', 'pw', NULL),
 (10, 168, 'reload', 'reload', NULL),
-(10, 168, 'remain', 'uebrig', NULL),
+(10, 168, 'remain_clicks', 'uebrig', NULL),
 (10, 168, 'reward', 'verguetung', NULL),
-(10, 168, 'sid', 'sid', NULL),
+(10, 168, 'site_id', 'sid', NULL),
 (10, 169, 'extra', 'typ', 'bannerview'),
 (10, 169, 'affiliate_id', 'id', NULL),
 (10, 169, 'password', 'pw', NULL),
 (10, 169, 'reload', 'reload', NULL),
-(10, 169, 'remain', 'uebrig', NULL),
+(10, 169, 'remain_clicks', 'uebrig', NULL),
 (10, 169, 'reward', 'verguetung', NULL),
-(10, 169, 'sid', 'sid', NULL),
+(10, 169, 'site_id', 'sid', NULL),
 (10, 170, 'extra', 'typ', 'bannerklick'),
 (10, 170, 'affiliate_id', 'id', NULL),
 (10, 170, 'password', 'pw', NULL),
 (10, 170, 'reload', 'reload', NULL),
-(10, 170, 'remain', 'uebrig', NULL),
+(10, 170, 'remain_clicks', 'uebrig', NULL),
 (10, 170, 'reward', 'verguetung', NULL),
-(10, 170, 'sid', 'sid', NULL),
+(10, 170, 'site_id', 'sid', NULL),
 (10, 171, 'extra', 'typ', 'skybannerview'),
 (10, 171, 'affiliate_id', 'id', NULL),
 (10, 171, 'password', 'pw', NULL),
 (10, 171, 'reload', 'reload', NULL),
-(10, 171, 'remain', 'uebrig', NULL),
+(10, 171, 'remain_clicks', 'uebrig', NULL),
 (10, 171, 'reward', 'verguetung', NULL),
-(10, 171, 'sid', 'sid', NULL),
+(10, 171, 'site_id', 'sid', NULL),
 (10, 172, 'extra', 'typ', 'buttonview'),
 (10, 172, 'affiliate_id', 'id', NULL),
 (10, 172, 'password', 'pw', NULL),
 (10, 172, 'reload', 'reload', NULL),
-(10, 172, 'remain', 'uebrig', NULL),
+(10, 172, 'remain_clicks', 'uebrig', NULL),
 (10, 172, 'reward', 'verguetung', NULL),
-(10, 172, 'sid', 'sid', NULL),
+(10, 172, 'site_id', 'sid', NULL),
 (10, 173, 'extra', 'typ', 'textview'),
 (10, 173, 'affiliate_id', 'id', NULL),
 (10, 173, 'password', 'pw', NULL),
 (10, 173, 'reload', 'reload', NULL),
-(10, 173, 'remain', 'uebrig', NULL),
+(10, 173, 'remain_clicks', 'uebrig', NULL),
 (10, 173, 'reward', 'verguetung', NULL),
-(10, 173, 'sid', 'sid', NULL),
+(10, 173, 'site_id', 'sid', NULL),
 (10, 174, 'extra', 'typ', 'traffic'),
 (10, 174, 'affiliate_id', 'id', NULL),
 (10, 174, 'password', 'pw', NULL),
 (10, 174, 'reload', 'reload', NULL),
-(10, 174, 'remain', 'uebrig', NULL),
+(10, 174, 'remain_clicks', 'uebrig', NULL),
 (10, 174, 'reward', 'verguetung', NULL),
-(10, 174, 'sid', 'sid', NULL),
+(10, 174, 'site_id', 'sid', NULL),
 (10, 175, 'extra', 'typ', 'popup'),
 (10, 175, 'affiliate_id', 'id', NULL),
 (10, 175, 'password', 'pw', NULL),
 (10, 175, 'reload', 'reload', NULL),
-(10, 175, 'remain', 'uebrig', NULL),
+(10, 175, 'remain_clicks', 'uebrig', NULL),
 (10, 175, 'reward', 'verguetung', NULL),
-(10, 175, 'sid', 'sid', NULL),
+(10, 175, 'site_id', 'sid', NULL),
 (10, 176, 'extra', 'typ', 'paidmail'),
 (10, 176, 'affiliate_id', 'id', NULL),
 (10, 176, 'password', 'pw', NULL),
 (10, 176, 'reload', 'reload', NULL),
-(10, 176, 'remain', 'uebrig', NULL),
+(10, 176, 'remain_clicks', 'uebrig', NULL),
 (10, 176, 'reward', 'verguetung', NULL),
-(10, 176, 'sid', 'sid', NULL)");
+(10, 176, 'site_id', 'sid', NULL)");
 
                // Request parameters per type handler - Alster-Marketing
                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, 'affiliate_id', 'id', NULL),
 (11, 35, 'password', 'pw', NULL),
 (11, 35, 'reload', 'reload', NULL),
-(11, 35, 'remain', 'uebrig', NULL),
+(11, 35, 'remain_clicks', 'uebrig', NULL),
 (11, 35, 'reward', 'verguetung', NULL),
-(11, 35, 'sid', 'sid', NULL),
+(11, 35, 'site_id', 'sid', NULL),
 (11, 35, 'size', 'size', NULL),
 (11, 35, 'type', 'typ', 'klick'),
 (11, 36, 'affiliate_id', 'id', NULL),
 (11, 36, 'password', 'pw', NULL),
 (11, 36, 'reload', 'reload', NULL),
-(11, 36, 'remain', 'uebrig', NULL),
+(11, 36, 'remain_clicks', 'uebrig', NULL),
 (11, 36, 'reward', 'verguetung', NULL),
-(11, 36, 'sid', 'sid', NULL),
+(11, 36, 'site_id', 'sid', NULL),
 (11, 36, 'type', 'typ', 'klick'),
 (11, 37, 'affiliate_id', 'id', NULL),
 (11, 37, 'password', 'pw', NULL),
 (11, 37, 'reload', 'reload', NULL),
-(11, 37, 'remain', 'uebrig', NULL),
+(11, 37, 'remain_clicks', 'uebrig', NULL),
 (11, 37, 'reward', 'verguetung', NULL),
-(11, 37, 'sid', 'sid', NULL),
+(11, 37, 'site_id', 'sid', NULL),
 (11, 37, 'size', 'size', NULL),
 (11, 37, 'type', 'typ', 'klick'),
 (11, 38, 'affiliate_id', 'id', NULL),
 (11, 38, 'minimum_stay', 'ma', NULL),
 (11, 38, 'password', 'pw', NULL),
 (11, 38, 'reload', 'reload', NULL),
-(11, 38, 'remain', 'uebrig', NULL),
+(11, 38, 'remain_clicks', 'uebrig', NULL),
 (11, 38, 'reward', 'verguetung', NULL),
-(11, 38, 'sid', 'sid', NULL),
+(11, 38, 'site_id', 'sid', NULL),
 (11, 38, 'size', 'size', NULL),
 (11, 39, 'affiliate_id', 'id', NULL),
 (11, 39, 'minimum_stay', 'ma', NULL),
 (11, 39, 'password', 'pw', NULL),
 (11, 39, 'reload', 'reload', NULL),
-(11, 39, 'remain', 'uebrig', NULL),
+(11, 39, 'remain_clicks', 'uebrig', NULL),
 (11, 39, 'reward', 'verguetung', NULL),
-(11, 39, 'sid', 'sid', NULL),
+(11, 39, 'site_id', 'sid', NULL),
 (11, 39, 'type', 'typ', 'text'),
 (11, 40, 'affiliate_id', 'id', NULL),
 (11, 40, 'password', 'pw', NULL),
 (11, 40, 'reload', 'reload', NULL),
-(11, 40, 'remain', 'uebrig', NULL),
+(11, 40, 'remain_clicks', 'uebrig', NULL),
 (11, 40, 'reward', 'verguetung', NULL),
-(11, 40, 'sid', 'sid', NULL),
+(11, 40, 'site_id', 'sid', NULL),
 (11, 40, 'type', 'typ', 'klick'),
 (11, 41, 'affiliate_id', 'id', NULL),
 (11, 41, 'minimum_stay', 'ma', NULL),
 (11, 41, 'password', 'pw', NULL),
 (11, 41, 'reload', 'reload', NULL),
-(11, 41, 'remain', 'uebrig', NULL),
+(11, 41, 'remain_clicks', 'uebrig', NULL),
 (11, 41, 'reward', 'verguetung', NULL),
-(11, 41, 'sid', 'sid', NULL),
+(11, 41, 'site_id', 'sid', NULL),
 (11, 42, 'affiliate_id', 'id', NULL),
 (11, 42, 'minimum_stay', 'ma', NULL),
 (11, 42, 'password', 'pw', NULL),
 (11, 42, 'reload', 'reload', NULL),
-(11, 42, 'remain', 'uebrig', NULL),
+(11, 42, 'remain_clicks', 'uebrig', NULL),
 (11, 42, 'reward', 'verguetung', NULL),
-(11, 42, 'sid', 'sid', NULL),
+(11, 42, 'site_id', 'sid', NULL),
 (11, 43, 'affiliate_id', 'id', NULL),
 (11, 43, 'password', 'pw', NULL),
-(11, 43, 'remain', 'uebrig', NULL),
+(11, 43, 'remain_clicks', 'uebrig', NULL),
 (11, 43, 'reward', 'verguetung', NULL),
-(11, 43, 'sid', 'sid', NULL),
+(11, 43, 'site_id', 'sid', NULL),
 (11, 44, 'affiliate_id', 'id', NULL),
 (11, 44, 'password', 'pw', NULL),
-(11, 44, 'remain', 'uebrig', NULL),
+(11, 44, 'remain_clicks', 'uebrig', NULL),
 (11, 44, 'reward', 'verguetung', NULL),
-(11, 44, 'sid', 'sid', NULL),
+(11, 44, 'site_id', 'sid', NULL),
 (11, 45, 'affiliate_id', 'id', NULL),
 (11, 45, 'password', 'pw', NULL),
 (11, 45, 'reload', 'reload', NULL),
-(11, 45, 'remain', 'uebrig', NULL),
+(11, 45, 'remain_clicks', 'uebrig', NULL),
 (11, 45, 'reward', 'verguetung', NULL),
-(11, 45, 'sid', 'sid', NULL),
+(11, 45, 'site_id', 'sid', NULL),
 (11, 45, 'size', 'size', NULL),
 (11, 45, 'type', 'typ', 'view'),
 (11, 46, 'affiliate_id', 'id', NULL),
 (11, 46, 'password', 'pw', NULL),
 (11, 46, 'reload', 'reload', NULL),
-(11, 46, 'remain', 'uebrig', NULL),
+(11, 46, 'remain_clicks', 'uebrig', NULL),
 (11, 46, 'reward', 'verguetung', NULL),
-(11, 46, 'sid', 'sid', NULL),
+(11, 46, 'site_id', 'sid', NULL),
 (11, 46, 'type', 'typ', 'view'),
 (11, 47, 'affiliate_id', 'id', NULL),
 (11, 47, 'password', 'pw', NULL),
 (11, 47, 'reload', 'reload', NULL),
-(11, 47, 'remain', 'uebrig', NULL),
+(11, 47, 'remain_clicks', 'uebrig', NULL),
 (11, 47, 'reward', 'verguetung', NULL),
-(11, 47, 'sid', 'sid', NULL),
+(11, 47, 'site_id', 'sid', NULL),
 (11, 47, 'size', 'size', NULL),
 (11, 47, 'type', 'typ', 'view'),
 (11, 48, 'affiliate_id', 'id', NULL),
 (11, 48, 'minimum_stay', 'ma', NULL),
 (11, 48, 'password', 'pw', NULL),
 (11, 48, 'reload', 'reload', NULL),
-(11, 48, 'remain', 'uebrig', NULL),
+(11, 48, 'remain_clicks', 'uebrig', NULL),
 (11, 48, 'reward', 'verguetung', NULL),
-(11, 48, 'sid', 'sid', NULL),
+(11, 48, 'site_id', 'sid', NULL),
 (11, 48, 'type', 'typ', 'html'),
 (11, 49, 'affiliate_id', 'id', NULL),
 (11, 49, 'password', 'pw', NULL),
 (11, 49, 'reload', 'reload', NULL),
-(11, 49, 'remain', 'uebrig', NULL),
+(11, 49, 'remain_clicks', 'uebrig', NULL),
 (11, 49, 'reward', 'verguetung', NULL),
-(11, 49, 'sid', 'sid', NULL),
+(11, 49, 'site_id', 'sid', NULL),
 (11, 49, 'type', 'typ', 'view')");
 
                // Request parameters per type handler - BonusSponsor
                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, 'affiliate_id', 'id', NULL),
-(12, 50, 'password', 'pw', NULL),
-(12, 50, 'reload', 'reload', NULL),
-(12, 50, 'remain', 'uebrig', NULL),
-(12, 50, 'reward', 'verguetung', NULL),
-(12, 50, 'sid', 'sid', NULL),
-(12, 50, 'size', 'size', NULL),
-(12, 50, 'type', 'typ', 'klick'),
-(12, 51, 'affiliate_id', 'id', NULL),
-(12, 51, 'password', 'pw', NULL),
-(12, 51, 'reload', 'reload', NULL),
-(12, 51, 'remain', 'uebrig', NULL),
-(12, 51, 'reward', 'verguetung', NULL),
-(12, 51, 'sid', 'sid', NULL),
-(12, 51, 'size', 'size', NULL),
-(12, 51, 'type', 'typ', 'view'),
-(12, 52, 'affiliate_id', 'id', NULL),
-(12, 52, 'password', 'pw', NULL),
-(12, 52, 'reload', 'reload', NULL),
-(12, 52, 'remain', 'uebrig', NULL),
-(12, 52, 'reward', 'verguetung', NULL),
-(12, 52, 'sid', 'sid', NULL),
-(12, 52, 'type', 'typ', 'klick'),
-(12, 53, 'affiliate_id', 'id', NULL),
-(12, 53, 'password', 'pw', NULL),
-(12, 53, 'reload', 'reload', NULL),
-(12, 53, 'remain', 'uebrig', NULL),
-(12, 53, 'reward', 'verguetung', NULL),
-(12, 53, 'sid', 'sid', NULL),
-(12, 53, 'type', 'typ', 'view'),
-(12, 54, 'affiliate_id', 'id', NULL),
-(12, 54, 'minimum_stay', 'ma', NULL),
-(12, 54, 'password', 'pw', NULL),
-(12, 54, 'reload', 'reload', NULL),
-(12, 54, 'remain', 'uebrig', NULL),
-(12, 54, 'reward', 'verguetung', NULL),
-(12, 54, 'sid', 'sid', NULL),
-(12, 54, 'size', 'size', NULL),
-(12, 55, 'affiliate_id', 'id', NULL),
-(12, 55, 'minimum_stay', 'ma', NULL),
-(12, 55, 'password', 'pw', NULL),
-(12, 55, 'reload', 'reload', NULL),
-(12, 55, 'remain', 'uebrig', NULL),
-(12, 55, 'reward', 'verguetung', NULL),
-(12, 55, 'sid', 'sid', NULL),
-(12, 55, 'type', 'typ', 'text'),
-(12, 56, 'affiliate_id', 'id', NULL),
-(12, 56, 'minimum_stay', 'ma', NULL),
-(12, 56, 'password', 'pw', NULL),
-(12, 56, 'reload', 'reload', NULL),
-(12, 56, 'remain', 'uebrig', NULL),
-(12, 56, 'reward', 'verguetung', NULL),
-(12, 56, 'sid', 'sid', NULL),
-(12, 56, 'type', 'typ', 'html'),
-(12, 57, 'affiliate_id', 'id', NULL),
-(12, 57, 'password', 'pw', NULL),
-(12, 57, 'reload', 'reload', NULL),
-(12, 57, 'remain', 'uebrig', NULL),
-(12, 57, 'reward', 'verguetung', NULL),
-(12, 57, 'sid', 'sid', NULL),
-(12, 57, 'type', 'typ', 'klick'),
-(12, 58, 'affiliate_id', 'id', NULL),
-(12, 58, 'password', 'pw', NULL),
-(12, 58, 'reload', 'reload', NULL),
-(12, 58, 'remain', 'uebrig', NULL),
-(12, 58, 'reward', 'verguetung', NULL),
-(12, 58, 'sid', 'sid', NULL),
-(12, 58, 'type', 'typ', 'view'),
-(12, 59, 'affiliate_id', 'id', NULL),
-(12, 59, 'minimum_stay', 'ma', NULL),
-(12, 59, 'password', 'pw', NULL),
-(12, 59, 'reload', 'reload', NULL),
-(12, 59, 'remain', 'uebrig', NULL),
-(12, 59, 'reward', 'verguetung', NULL),
-(12, 59, 'sid', 'sid', NULL),
-(12, 60, 'affiliate_id', 'id', NULL),
-(12, 60, 'minimum_stay', 'ma', NULL),
-(12, 60, 'password', 'pw', NULL),
-(12, 60, 'reload', 'reload', NULL),
-(12, 60, 'remain', 'uebrig', NULL),
-(12, 60, 'reward', 'verguetung', NULL),
-(12, 60, 'sid', 'sid', NULL),
 (12, 61, 'affiliate_id', 'id', NULL),
 (12, 61, 'password', 'pw', NULL),
-(12, 61, 'remain', 'uebrig', NULL),
+(12, 61, 'remain_clicks', 'uebrig', NULL),
 (12, 61, 'reward', 'verguetung', NULL),
-(12, 61, 'sid', 'sid', NULL),
+(12, 61, 'site_id', 'sid', NULL),
 (12, 62, 'affiliate_id', 'id', NULL),
 (12, 62, 'password', 'pw', NULL),
-(12, 62, 'remain', 'uebrig', NULL),
+(12, 62, 'remain_clicks', 'uebrig', NULL),
 (12, 62, 'reward', 'verguetung', NULL),
-(12, 62, 'sid', 'sid', NULL)");
+(12, 62, 'site_id', 'sid', NULL)");
 
                // Request parameters per type handler - City-Ads
                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, 'extra', 'typ', 'forced_banner'),
 (24, 212, 'affiliate_id', 'id', NULL),
 (24, 212, 'password', 'pw', NULL),
 (24, 212, 'reload', 'reload', NULL),
-(24, 212, 'remain', 'uebrig', NULL),
+(24, 212, 'remain_clicks', 'uebrig', NULL),
 (24, 212, 'reward', 'verguetung', NULL),
 (24, 212, 'minimum_stay', 'ma', NULL),
-(24, 213, 'extra', 'typ', 'forcedtextlink'),
+(24, 213, 'extra', 'typ', 'forced_textlink'),
 (24, 213, 'affiliate_id', 'id', NULL),
 (24, 213, 'password', 'pw', NULL),
 (24, 213, 'reload', 'reload', NULL),
-(24, 213, 'remain', 'uebrig', NULL),
+(24, 213, 'remain_clicks', 'uebrig', NULL),
 (24, 213, 'reward', 'verguetung', NULL),
 (24, 213, 'minimum_stay', 'ma', NULL),
 (24, 214, 'extra', 'typ', 'bannerview'),
 (24, 214, 'affiliate_id', 'id', NULL),
 (24, 214, 'password', 'pw', NULL),
 (24, 214, 'reload', 'reload', NULL),
-(24, 214, 'remain', 'uebrig', NULL),
+(24, 214, 'remain_clicks', 'uebrig', NULL),
 (24, 214, 'reward', 'verguetung', NULL),
 (24, 214, 'minimum_stay', 'ma', NULL),
 (24, 215, 'extra', 'typ', 'skybannerview'),
 (24, 215, 'affiliate_id', 'id', NULL),
 (24, 215, 'password', 'pw', NULL),
 (24, 215, 'reload', 'reload', NULL),
-(24, 215, 'remain', 'uebrig', NULL),
+(24, 215, 'remain_clicks', 'uebrig', NULL),
 (24, 215, 'reward', 'verguetung', NULL),
 (24, 215, 'minimum_stay', 'ma', NULL),
 (24, 216, 'extra', 'typ', 'buttonview'),
 (24, 216, 'affiliate_id', 'id', NULL),
 (24, 216, 'password', 'pw', NULL),
 (24, 216, 'reload', 'reload', NULL),
-(24, 216, 'remain', 'uebrig', NULL),
+(24, 216, 'remain_clicks', 'uebrig', NULL),
 (24, 216, 'reward', 'verguetung', NULL),
 (24, 216, 'minimum_stay', 'ma', NULL),
 (24, 217, 'extra', 'typ', 'bannerklick'),
 (24, 217, 'affiliate_id', 'id', NULL),
 (24, 217, 'password', 'pw', NULL),
 (24, 217, 'reload', 'reload', NULL),
-(24, 217, 'remain', 'uebrig', NULL),
+(24, 217, 'remain_clicks', 'uebrig', NULL),
 (24, 217, 'reward', 'verguetung', NULL),
 (24, 217, 'minimum_stay', 'ma', NULL),
 (24, 218, 'extra', 'typ', 'textview'),
 (24, 218, 'affiliate_id', 'id', NULL),
 (24, 218, 'password', 'pw', NULL),
 (24, 218, 'reload', 'reload', NULL),
-(24, 218, 'remain', 'uebrig', NULL),
+(24, 218, 'remain_clicks', 'uebrig', NULL),
 (24, 218, 'reward', 'verguetung', NULL),
 (24, 218, 'minimum_stay', 'ma', NULL),
 (24, 219, 'extra', 'typ', 'popup'),
 (24, 219, 'affiliate_id', 'id', NULL),
 (24, 219, 'password', 'pw', NULL),
 (24, 219, 'reload', 'reload', NULL),
-(24, 219, 'remain', 'uebrig', NULL),
+(24, 219, 'remain_clicks', 'uebrig', NULL),
 (24, 219, 'reward', 'verguetung', NULL),
 (24, 219, 'minimum_stay', 'ma', NULL),
 (24, 220, 'extra', 'typ', 'traffic'),
 (24, 220, 'affiliate_id', 'id', NULL),
 (24, 220, 'password', 'pw', NULL),
 (24, 220, 'reload', 'reload', NULL),
-(24, 220, 'remain', 'uebrig', NULL),
+(24, 220, 'remain_clicks', 'uebrig', NULL),
 (24, 220, 'reward', 'verguetung', NULL),
 (24, 220, 'minimum_stay', 'ma', NULL),
 (24, 221, 'extra', 'typ', 'paidmail'),
 (24, 221, 'affiliate_id', 'id', NULL),
 (24, 221, 'password', 'pw', NULL),
 (24, 221, 'reload', 'reload', NULL),
-(24, 221, 'remain', 'uebrig', NULL),
+(24, 221, 'remain_clicks', 'uebrig', NULL),
 (24, 221, 'reward', 'verguetung', NULL),
 (24, 221, 'minimum_stay', 'ma', NULL)");
 
@@ -2712,182 +3091,254 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (26, 232, 'affiliate_id', 'id', NULL),
 (26, 232, 'password', 'pw', NULL),
 (26, 232, 'reload', 'reload', NULL),
-(26, 232, 'remain', 'uebrig', NULL),
+(26, 232, 'remain_clicks', 'uebrig', NULL),
 (26, 232, 'reward', 'verguetung', NULL),
-(26, 232, 'sid', 'sid', NULL),
-(26, 232, 'size', 'size', NULL),
+(26, 232, 'site_id', 'sid', NULL),
+(26, 232, 'size', 'size', '468x60'),
 (26, 232, 'type', 'typ', 'klick'),
 (26, 233, 'affiliate_id', 'id', NULL),
 (26, 233, 'password', 'pw', NULL),
 (26, 233, 'reload', 'reload', NULL),
-(26, 233, 'remain', 'uebrig', NULL),
+(26, 233, 'remain_clicks', 'uebrig', NULL),
 (26, 233, 'reward', 'verguetung', NULL),
-(26, 233, 'sid', 'sid', NULL),
-(26, 233, 'size', 'size', NULL),
+(26, 233, 'site_id', 'sid', NULL),
+(26, 233, 'size', 'size', '468x60'),
 (26, 233, 'type', 'typ', 'view'),
 (26, 234, 'affiliate_id', 'id', NULL),
 (26, 234, 'password', 'pw', NULL),
 (26, 234, 'reload', 'reload', NULL),
-(26, 234, 'remain', 'uebrig', NULL),
+(26, 234, 'remain_clicks', 'uebrig', NULL),
 (26, 234, 'reward', 'verguetung', NULL),
-(26, 234, 'sid', 'sid', NULL),
+(26, 234, 'site_id', 'sid', NULL),
 (26, 234, 'type', 'typ', 'klick'),
 (26, 235, 'affiliate_id', 'id', NULL),
 (26, 235, 'password', 'pw', NULL),
 (26, 235, 'reload', 'reload', NULL),
-(26, 235, 'remain', 'uebrig', NULL),
+(26, 235, 'remain_clicks', 'uebrig', NULL),
 (26, 235, 'reward', 'verguetung', NULL),
-(26, 235, 'sid', 'sid', NULL),
+(26, 235, 'site_id', 'sid', NULL),
 (26, 235, 'type', 'typ', 'view'),
 (26, 236, 'affiliate_id', 'id', NULL),
 (26, 236, 'password', 'pw', NULL),
 (26, 236, 'reload', 'reload', NULL),
-(26, 236, 'remain', 'uebrig', NULL),
+(26, 236, 'remain_clicks', 'uebrig', NULL),
 (26, 236, 'reward', 'verguetung', NULL),
-(26, 236, 'sid', 'sid', NULL),
+(26, 236, 'site_id', 'sid', NULL),
 (26, 236, 'size', 'size', NULL),
 (26, 236, 'type', 'typ', 'klick'),
 (26, 237, 'affiliate_id', 'id', NULL),
 (26, 237, 'password', 'pw', NULL),
 (26, 237, 'reload', 'reload', NULL),
-(26, 237, 'remain', 'uebrig', NULL),
+(26, 237, 'remain_clicks', 'uebrig', NULL),
 (26, 237, 'reward', 'verguetung', NULL),
-(26, 237, 'sid', 'sid', NULL),
+(26, 237, 'site_id', 'sid', NULL),
 (26, 237, 'size', 'size', NULL),
 (26, 237, 'type', 'typ', 'view'),
 (26, 238, 'affiliate_id', 'id', NULL),
 (26, 238, 'minimum_stay', 'ma', NULL),
 (26, 238, 'password', 'pw', NULL),
 (26, 238, 'reload', 'reload', NULL),
-(26, 238, 'remain', 'uebrig', NULL),
+(26, 238, 'remain_clicks', 'uebrig', NULL),
 (26, 238, 'reward', 'verguetung', NULL),
-(26, 238, 'sid', 'sid', NULL),
-(26, 238, 'size', 'size', NULL),
+(26, 238, 'site_id', 'sid', NULL),
+(26, 238, 'size', 'size', '468x60'),
 (26, 239, 'affiliate_id', 'id', NULL),
 (26, 239, 'minimum_stay', 'ma', NULL),
 (26, 239, 'password', 'pw', NULL),
 (26, 239, 'reload', 'reload', NULL),
-(26, 239, 'remain', 'uebrig', NULL),
+(26, 239, 'remain_clicks', 'uebrig', NULL),
 (26, 239, 'reward', 'verguetung', NULL),
-(26, 239, 'sid', 'sid', NULL),
+(26, 239, 'site_id', 'sid', NULL),
 (26, 239, 'type', 'typ', 'text'),
 (26, 240, 'affiliate_id', 'id', NULL),
 (26, 240, 'minimum_stay', 'ma', NULL),
 (26, 240, 'password', 'pw', NULL),
 (26, 240, 'reload', 'reload', NULL),
-(26, 240, 'remain', 'uebrig', NULL),
+(26, 240, 'remain_clicks', 'uebrig', NULL),
 (26, 240, 'reward', 'verguetung', NULL),
-(26, 240, 'sid', 'sid', NULL),
+(26, 240, 'site_id', 'sid', NULL),
 (26, 240, 'type', 'typ', 'html'),
 (26, 241, 'affiliate_id', 'id', NULL),
 (26, 241, 'password', 'pw', NULL),
 (26, 241, 'reload', 'reload', NULL),
-(26, 241, 'remain', 'uebrig', NULL),
+(26, 241, 'remain_clicks', 'uebrig', NULL),
 (26, 241, 'reward', 'verguetung', NULL),
-(26, 241, 'sid', 'sid', NULL),
+(26, 241, 'site_id', 'sid', NULL),
 (26, 241, 'type', 'typ', 'klick'),
 (26, 242, 'affiliate_id', 'id', NULL),
 (26, 242, 'password', 'pw', NULL),
 (26, 242, 'reload', 'reload', NULL),
-(26, 242, 'remain', 'uebrig', NULL),
+(26, 242, 'remain_clicks', 'uebrig', NULL),
 (26, 242, 'reward', 'verguetung', NULL),
-(26, 242, 'sid', 'sid', NULL),
+(26, 242, 'site_id', 'sid', NULL),
 (26, 242, 'type', 'typ', 'view'),
 (26, 243, 'affiliate_id', 'id', NULL),
 (26, 243, 'minimum_stay', 'ma', NULL),
 (26, 243, 'password', 'pw', NULL),
 (26, 243, 'reload', 'reload', NULL),
-(26, 243, 'remain', 'uebrig', NULL),
+(26, 243, 'remain_clicks', 'uebrig', NULL),
 (26, 243, 'reward', 'verguetung', NULL),
-(26, 243, 'sid', 'sid', NULL),
+(26, 243, 'site_id', 'sid', NULL),
 (26, 244, 'affiliate_id', 'id', NULL),
 (26, 244, 'minimum_stay', 'ma', NULL),
 (26, 244, 'password', 'pw', NULL),
 (26, 244, 'reload', 'reload', NULL),
-(26, 244, 'remain', 'uebrig', NULL),
+(26, 244, 'remain_clicks', 'uebrig', NULL),
 (26, 244, 'reward', 'verguetung', NULL),
-(26, 244, 'sid', 'sid', NULL),
+(26, 244, 'site_id', 'sid', NULL),
 (26, 245, 'affiliate_id', 'id', NULL),
 (26, 245, 'password', 'pw', NULL),
-(26, 245, 'remain', 'uebrig', NULL),
+(26, 245, 'remain_clicks', 'uebrig', NULL),
 (26, 245, 'reward', 'verguetung', NULL),
-(26, 245, 'sid', 'sid', NULL),
+(26, 245, 'site_id', 'sid', NULL),
 (26, 246, 'affiliate_id', 'id', NULL),
 (26, 246, 'password', 'pw', NULL),
-(26, 246, 'remain', 'uebrig', NULL),
+(26, 246, 'remain_clicks', 'uebrig', NULL),
 (26, 246, 'reward', 'verguetung', NULL),
-(26, 246, 'sid', 'sid', NULL)");
+(26, 246, 'site_id', 'sid', NULL),
+(26, 509, 'affiliate_id', 'id', NULL),
+(26, 509, 'password', 'pw', NULL),
+(26, 509, 'reload', 'reload', NULL),
+(26, 509, 'remain_clicks', 'uebrig', NULL),
+(26, 509, 'reward', 'verguetung', NULL),
+(26, 509, 'site_id', 'sid', NULL),
+(26, 509, 'size', 'size', '88x31'),
+(26, 509, 'type', 'typ', 'klick'),
+(26, 510, 'affiliate_id', 'id', NULL),
+(26, 510, 'password', 'pw', NULL),
+(26, 510, 'reload', 'reload', NULL),
+(26, 510, 'remain_clicks', 'uebrig', NULL),
+(26, 510, 'reward', 'verguetung', NULL),
+(26, 510, 'site_id', 'sid', NULL),
+(26, 510, 'size', 'size', '88x31'),
+(26, 510, 'type', 'typ', 'view'),
+(26, 511, 'affiliate_id', 'id', NULL),
+(26, 511, 'password', 'pw', NULL),
+(26, 511, 'reload', 'reload', NULL),
+(26, 511, 'remain_clicks', 'uebrig', NULL),
+(26, 511, 'reward', 'verguetung', NULL),
+(26, 511, 'site_id', 'sid', NULL),
+(26, 511, 'size', 'size', '234x60'),
+(26, 511, 'type', 'typ', 'klick'),
+(26, 512, 'affiliate_id', 'id', NULL),
+(26, 512, 'password', 'pw', NULL),
+(26, 512, 'reload', 'reload', NULL),
+(26, 512, 'remain_clicks', 'uebrig', NULL),
+(26, 512, 'reward', 'verguetung', NULL),
+(26, 512, 'site_id', 'sid', NULL),
+(26, 512, 'size', 'size', '234x60'),
+(26, 512, 'type', 'typ', 'view'),
+(26, 513, 'affiliate_id', 'id', NULL),
+(26, 513, 'password', 'pw', NULL),
+(26, 513, 'reload', 'reload', NULL),
+(26, 513, 'remain_clicks', 'uebrig', NULL),
+(26, 513, 'reward', 'verguetung', NULL),
+(26, 513, 'site_id', 'sid', NULL),
+(26, 513, 'size', 'size', '120x600'),
+(26, 513, 'type', 'typ', 'klick'),
+(26, 514, 'affiliate_id', 'id', NULL),
+(26, 514, 'password', 'pw', NULL),
+(26, 514, 'reload', 'reload', NULL),
+(26, 514, 'remain_clicks', 'uebrig', NULL),
+(26, 514, 'reward', 'verguetung', NULL),
+(26, 514, 'site_id', 'sid', NULL),
+(26, 514, 'size', 'size', '120x600'),
+(26, 514, 'type', 'typ', 'view'),
+(26, 515, 'affiliate_id', 'id', NULL),
+(26, 515, 'minimum_stay', 'ma', NULL),
+(26, 515, 'password', 'pw', NULL),
+(26, 515, 'reload', 'reload', NULL),
+(26, 515, 'remain_clicks', 'uebrig', NULL),
+(26, 515, 'reward', 'verguetung', NULL),
+(26, 515, 'site_id', 'sid', NULL),
+(26, 515, 'size', 'size', '88x31'),
+(26, 516, 'affiliate_id', 'id', NULL),
+(26, 516, 'minimum_stay', 'ma', NULL),
+(26, 516, 'password', 'pw', NULL),
+(26, 516, 'reload', 'reload', NULL),
+(26, 516, 'remain_clicks', 'uebrig', NULL),
+(26, 516, 'reward', 'verguetung', NULL),
+(26, 516, 'site_id', 'sid', NULL),
+(26, 516, 'size', 'size', '234x60'),
+(26, 517, 'affiliate_id', 'id', NULL),
+(26, 517, 'minimum_stay', 'ma', NULL),
+(26, 517, 'password', 'pw', NULL),
+(26, 517, 'reload', 'reload', NULL),
+(26, 517, 'remain_clicks', 'uebrig', NULL),
+(26, 517, 'reward', 'verguetung', NULL),
+(26, 517, 'site_id', 'sid', NULL),
+(26, 517, 'size', 'size', '120x600')");
 
                // Request parameters per type handler - eu-ADS.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
-(42, 431, 'extra', 'typ', 'forcedbanner'),
+(42, 431, 'extra', 'typ', 'forced_banner'),
 (42, 431, 'affiliate_id', 'id', NULL),
 (42, 431, 'password', 'pw', NULL),
-(42, 431, 'sid', 'siteid', NULL),
-(42, 431, 'remain', 'uebrig', NULL),
+(42, 431, 'site_id', 'siteid', NULL),
+(42, 431, 'remain_clicks', 'uebrig', NULL),
 (42, 431, 'reload', 'reload', NULL),
 (42, 431, 'reward', 'verguetung', NULL),
-(42, 432, 'extra', 'typ', 'forcedtextlink'),
+(42, 432, 'extra', 'typ', 'forced_textlink'),
 (42, 432, 'affiliate_id', 'id', NULL),
 (42, 432, 'password', 'pw', NULL),
-(42, 432, 'sid', 'siteid', NULL),
-(42, 432, 'remain', 'uebrig', NULL),
+(42, 432, 'site_id', 'siteid', NULL),
+(42, 432, 'remain_clicks', 'uebrig', NULL),
 (42, 432, 'reload', 'reload', NULL),
 (42, 432, 'reward', 'verguetung', NULL),
 (42, 433, 'extra', 'typ', 'bannerview'),
 (42, 433, 'affiliate_id', 'id', NULL),
 (42, 433, 'password', 'pw', NULL),
-(42, 433, 'sid', 'siteid', NULL),
-(42, 433, 'remain', 'uebrig', NULL),
+(42, 433, 'site_id', 'siteid', NULL),
+(42, 433, 'remain_clicks', 'uebrig', NULL),
 (42, 433, 'reload', 'reload', NULL),
 (42, 433, 'reward', 'verguetung', NULL),
 (42, 434, 'extra', 'typ', 'bannerklick'),
 (42, 434, 'affiliate_id', 'id', NULL),
 (42, 434, 'password', 'pw', NULL),
-(42, 434, 'sid', 'siteid', NULL),
-(42, 434, 'remain', 'uebrig', NULL),
+(42, 434, 'site_id', 'siteid', NULL),
+(42, 434, 'remain_clicks', 'uebrig', NULL),
 (42, 434, 'reload', 'reload', NULL),
 (42, 434, 'reward', 'verguetung', NULL),
 (42, 435, 'extra', 'typ', 'skybannerview'),
 (42, 435, 'affiliate_id', 'id', NULL),
 (42, 435, 'password', 'pw', NULL),
-(42, 435, 'sid', 'siteid', NULL),
-(42, 435, 'remain', 'uebrig', NULL),
+(42, 435, 'site_id', 'siteid', NULL),
+(42, 435, 'remain_clicks', 'uebrig', NULL),
 (42, 435, 'reload', 'reload', NULL),
 (42, 435, 'reward', 'verguetung', NULL),
 (42, 436, 'extra', 'typ', 'buttonview'),
 (42, 436, 'affiliate_id', 'id', NULL),
 (42, 436, 'password', 'pw', NULL),
-(42, 436, 'sid', 'siteid', NULL),
-(42, 436, 'remain', 'uebrig', NULL),
+(42, 436, 'site_id', 'siteid', NULL),
+(42, 436, 'remain_clicks', 'uebrig', NULL),
 (42, 436, 'reload', 'reload', NULL),
 (42, 436, 'reward', 'verguetung', NULL),
 (42, 437, 'extra', 'typ', 'textview'),
 (42, 437, 'affiliate_id', 'id', NULL),
 (42, 437, 'password', 'pw', NULL),
-(42, 437, 'sid', 'siteid', NULL),
-(42, 437, 'remain', 'uebrig', NULL),
+(42, 437, 'site_id', 'siteid', NULL),
+(42, 437, 'remain_clicks', 'uebrig', NULL),
 (42, 437, 'reload', 'reload', NULL),
 (42, 437, 'reward', 'verguetung', NULL),
 (42, 438, 'extra', 'typ', 'traffic'),
 (42, 438, 'affiliate_id', 'id', NULL),
 (42, 438, 'password', 'pw', NULL),
-(42, 438, 'sid', 'siteid', NULL),
-(42, 438, 'remain', 'uebrig', NULL),
+(42, 438, 'site_id', 'siteid', NULL),
+(42, 438, 'remain_clicks', 'uebrig', NULL),
 (42, 438, 'reload', 'reload', NULL),
 (42, 438, 'reward', 'verguetung', NULL),
 (42, 439, 'extra', 'typ', 'popup'),
 (42, 439, 'affiliate_id', 'id', NULL),
 (42, 439, 'password', 'pw', NULL),
-(42, 439, 'sid', 'siteid', NULL),
-(42, 439, 'remain', 'uebrig', NULL),
+(42, 439, 'site_id', 'siteid', NULL),
+(42, 439, 'remain_clicks', 'uebrig', NULL),
 (42, 439, 'reload', 'reload', NULL),
 (42, 439, 'reward', 'verguetung', NULL),
 (42, 440, 'extra', 'typ', 'paidmail'),
 (42, 440, 'affiliate_id', 'id', NULL),
 (42, 440, 'password', 'pw', NULL),
-(42, 440, 'sid', 'siteid', NULL),
-(42, 440, 'remain', 'uebrig', NULL),
+(42, 440, 'site_id', 'siteid', NULL),
+(42, 440, 'remain_clicks', 'uebrig', NULL),
 (42, 440, 'reload', 'reload', NULL),
 (42, 440, 'reward', 'verguetung', NULL)");
 
@@ -2897,127 +3348,127 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (29, 273, 'affiliate_id', 'uid', NULL),
 (29, 273, 'password', 'pw', NULL),
 (29, 273, 'reload', 'reload', NULL),
-(29, 273, 'remain', 'uebrig', NULL),
+(29, 273, 'remain_clicks', 'uebrig', NULL),
 (29, 273, 'reward', 'verguetung', NULL),
-(29, 273, 'sid', 'sid', NULL),
+(29, 273, 'site_id', 'sid', NULL),
 (29, 274, 'extra', 'art', 'bannerview'),
 (29, 274, 'affiliate_id', 'uid', NULL),
 (29, 274, 'password', 'pw', NULL),
 (29, 274, 'reload', 'reload', NULL),
-(29, 274, 'remain', 'uebrig', NULL),
+(29, 274, 'remain_clicks', 'uebrig', NULL),
 (29, 274, 'reward', 'verguetung', NULL),
-(29, 274, 'sid', 'sid', NULL),
+(29, 274, 'site_id', 'sid', NULL),
 (29, 275, 'extra', 'art', 'buttonklick'),
 (29, 275, 'affiliate_id', 'uid', NULL),
 (29, 275, 'password', 'pw', NULL),
 (29, 275, 'reload', 'reload', NULL),
-(29, 275, 'remain', 'uebrig', NULL),
+(29, 275, 'remain_clicks', 'uebrig', NULL),
 (29, 275, 'reward', 'verguetung', NULL),
-(29, 275, 'sid', 'sid', NULL),
+(29, 275, 'site_id', 'sid', NULL),
 (29, 276, 'extra', 'art', 'buttonview'),
 (29, 276, 'affiliate_id', 'uid', NULL),
 (29, 276, 'password', 'pw', NULL),
 (29, 276, 'reload', 'reload', NULL),
-(29, 276, 'remain', 'uebrig', NULL),
+(29, 276, 'remain_clicks', 'uebrig', NULL),
 (29, 276, 'reward', 'verguetung', NULL),
-(29, 276, 'sid', 'sid', NULL),
-(29, 277, 'extra', 'art', 'forcedbanner'),
+(29, 276, 'site_id', 'sid', NULL),
+(29, 277, 'extra', 'art', 'forced_banner'),
 (29, 277, 'affiliate_id', 'uid', NULL),
 (29, 277, 'minimum_stay', 'ma', NULL),
 (29, 277, 'password', 'pw', NULL),
 (29, 277, 'reload', 'reload', NULL),
-(29, 277, 'remain', 'uebrig', NULL),
+(29, 277, 'remain_clicks', 'uebrig', NULL),
 (29, 277, 'reward', 'verguetung', NULL),
-(29, 277, 'sid', 'sid', NULL),
-(29, 278, 'extra', 'art', 'forcedtextlink'),
+(29, 277, 'site_id', 'sid', NULL),
+(29, 278, 'extra', 'art', 'forced_textlink'),
 (29, 278, 'affiliate_id', 'uid', NULL),
 (29, 278, 'minimum_stay', 'ma', NULL),
 (29, 278, 'password', 'pw', NULL),
 (29, 278, 'reload', 'reload', NULL),
-(29, 278, 'remain', 'uebrig', NULL),
+(29, 278, 'remain_clicks', 'uebrig', NULL),
 (29, 278, 'reward', 'verguetung', NULL),
-(29, 278, 'sid', 'sid', NULL),
+(29, 278, 'site_id', 'sid', NULL),
 (29, 279, 'extra', 'art', 'htmlmail'),
 (29, 279, 'affiliate_id', 'uid', NULL),
 (29, 279, 'minimum_stay', 'ma', NULL),
 (29, 279, 'password', 'pw', NULL),
 (29, 279, 'reload', 'reload', NULL),
-(29, 279, 'remain', 'uebrig', NULL),
+(29, 279, 'remain_clicks', 'uebrig', NULL),
 (29, 279, 'reward', 'verguetung', NULL),
-(29, 279, 'sid', 'sid', NULL),
+(29, 279, 'site_id', 'sid', NULL),
 (29, 280, 'extra', 'art', 'layer'),
 (29, 280, 'affiliate_id', 'uid', NULL),
 (29, 280, 'password', 'pw', NULL),
 (29, 280, 'reload', 'reload', NULL),
-(29, 280, 'remain', 'uebrig', NULL),
+(29, 280, 'remain_clicks', 'uebrig', NULL),
 (29, 280, 'reward', 'verguetung', NULL),
-(29, 280, 'sid', 'sid', NULL),
+(29, 280, 'site_id', 'sid', NULL),
 (29, 281, 'extra', 'art', 'paidmail'),
 (29, 281, 'affiliate_id', 'uid', NULL),
 (29, 281, 'minimum_stay', 'ma', NULL),
 (29, 281, 'password', 'pw', NULL),
 (29, 281, 'reload', 'reload', NULL),
-(29, 281, 'remain', 'uebrig', NULL),
+(29, 281, 'remain_clicks', 'uebrig', NULL),
 (29, 281, 'reward', 'verguetung', NULL),
-(29, 281, 'sid', 'sid', NULL),
+(29, 281, 'site_id', 'sid', NULL),
 (29, 282, 'extra', 'art', 'popup'),
 (29, 282, 'affiliate_id', 'uid', NULL),
 (29, 282, 'minimum_stay', 'ma', NULL),
 (29, 282, 'password', 'pw', NULL),
 (29, 282, 'reload', 'reload', NULL),
-(29, 282, 'remain', 'uebrig', NULL),
+(29, 282, 'remain_clicks', 'uebrig', NULL),
 (29, 282, 'reward', 'verguetung', NULL),
-(29, 282, 'sid', 'sid', NULL),
+(29, 282, 'site_id', 'sid', NULL),
 (29, 283, 'extra', 'art', 'skybannerklick'),
 (29, 283, 'affiliate_id', 'uid', NULL),
 (29, 283, 'password', 'pw', NULL),
 (29, 283, 'reload', 'reload', NULL),
-(29, 283, 'remain', 'uebrig', NULL),
+(29, 283, 'remain_clicks', 'uebrig', NULL),
 (29, 283, 'reward', 'verguetung', NULL),
-(29, 283, 'sid', 'sid', NULL),
+(29, 283, 'site_id', 'sid', NULL),
 (29, 284, 'extra', 'art', 'skybannerview'),
 (29, 284, 'affiliate_id', 'uid', NULL),
 (29, 284, 'password', 'pw', NULL),
 (29, 284, 'reload', 'reload', NULL),
-(29, 284, 'remain', 'uebrig', NULL),
+(29, 284, 'remain_clicks', 'uebrig', NULL),
 (29, 284, 'reward', 'verguetung', NULL),
-(29, 284, 'sid', 'sid', NULL),
+(29, 284, 'site_id', 'sid', NULL),
 (29, 285, 'extra', 'art', 'surfbarklick'),
 (29, 285, 'password', 'pw', NULL),
 (29, 285, 'affiliate_id', 'uid', NULL),
 (29, 285, 'reload', 'reload', NULL),
-(29, 285, 'remain', 'uebrig', NULL),
+(29, 285, 'remain_clicks', 'uebrig', NULL),
 (29, 285, 'reward', 'verguetung', NULL),
-(29, 285, 'sid', 'sid', NULL),
+(29, 285, 'site_id', 'sid', NULL),
 (29, 286, 'extra', 'art', 'surfbarview'),
 (29, 286, 'affiliate_id', 'uid', NULL),
 (29, 286, 'password', 'pw', NULL),
 (29, 286, 'reload', 'reload', NULL),
-(29, 286, 'remain', 'uebrig', NULL),
+(29, 286, 'remain_clicks', 'uebrig', NULL),
 (29, 286, 'reward', 'verguetung', NULL),
-(29, 286, 'sid', 'sid', NULL),
+(29, 286, 'site_id', 'sid', NULL),
 (29, 287, 'extra', 'art', 'textlinkklick'),
 (29, 287, 'affiliate_id', 'uid', NULL),
 (29, 287, 'password', 'pw', NULL),
 (29, 287, 'reload', 'reload', NULL),
-(29, 287, 'remain', 'uebrig', NULL),
+(29, 287, 'remain_clicks', 'uebrig', NULL),
 (29, 287, 'reward', 'verguetung', NULL),
-(29, 287, 'sid', 'sid', NULL),
+(29, 287, 'site_id', 'sid', NULL),
 (29, 288, 'extra', 'art', 'textlinkview'),
 (29, 288, 'affiliate_id', 'uid', NULL),
 (29, 288, 'password', 'pw', NULL),
 (29, 288, 'reload', 'reload', NULL),
-(29, 288, 'remain', 'uebrig', NULL),
+(29, 288, 'remain_clicks', 'uebrig', NULL),
 (29, 288, 'reward', 'verguetung', NULL),
-(29, 288, 'sid', 'sid', NULL),
+(29, 288, 'site_id', 'sid', NULL),
 (29, 289, 'extra', 'art', 'traffic'),
 (29, 289, 'affiliate_id', 'uid', NULL),
 (29, 289, 'minimum_stay', 'ma', NULL),
 (29, 289, 'password', 'pw', NULL),
 (29, 289, 'reload', 'reload', NULL),
-(29, 289, 'remain', 'uebrig', NULL),
+(29, 289, 'remain_clicks', 'uebrig', NULL),
 (29, 289, 'reward', 'verguetung', NULL),
-(29, 289, 'sid', 'sid', NULL)");
+(29, 289, 'site_id', 'sid', NULL)");
 
                // Request parameters per type handler - Fusion-Ads
                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
@@ -3025,139 +3476,166 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (13, 290, 'affiliate_id', 'uid', NULL),
 (13, 290, 'password', 'pw', NULL),
 (13, 290, 'reload', 'reload', NULL),
-(13, 290, 'remain', 'offen', NULL),
+(13, 290, 'remain_clicks', 'offen', NULL),
 (13, 290, 'reward', 'verguetung', NULL),
-(13, 290, 'sid', 'sid', NULL),
+(13, 290, 'site_id', 'sid', NULL),
 (13, 291, 'extra', 'art', 'Paidmail'),
 (13, 291, 'affiliate_id', 'uid', NULL),
 (13, 291, 'password', 'pw', NULL),
 (13, 291, 'reload', 'reload', NULL),
-(13, 291, 'remain', 'offen', NULL),
+(13, 291, 'remain_clicks', 'offen', NULL),
 (13, 291, 'reward', 'verguetung', NULL),
-(13, 291, 'sid', 'sid', NULL)");
+(13, 291, 'site_id', 'sid', NULL)");
 
                // Request parameters per type handler - GigaPromo
                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, 'affiliate_id', 'id', NULL),
 (14, 102, 'password', 'pw', NULL),
 (14, 102, 'reload', 'reload', NULL),
-(14, 102, 'remain', 'uebrig', NULL),
+(14, 102, 'remain_clicks', 'uebrig', NULL),
 (14, 102, 'reward', 'verguetung', NULL),
-(14, 102, 'sid', 'aid', NULL),
-(14, 102, 'size', 'typ', NULL),
+(14, 102, 'site_id', 'aid', NULL),
+(14, 102, 'size', 'typ', '468x60'),
 (14, 103, 'affiliate_id', 'id', NULL),
 (14, 103, 'password', 'pw', NULL),
 (14, 103, 'reload', 'reload', NULL),
-(14, 103, 'remain', 'uebrig', NULL),
+(14, 103, 'remain_clicks', 'uebrig', NULL),
 (14, 103, 'reward', 'verguetung', NULL),
-(14, 103, 'sid', 'aid', NULL),
+(14, 103, 'site_id', 'aid', NULL),
 (14, 104, 'affiliate_id', 'id', NULL),
 (14, 104, 'maximum_stay', 'ma', NULL),
 (14, 104, 'password', 'pw', NULL),
 (14, 104, 'reload', 'reload', NULL),
-(14, 104, 'remain', 'uebrig', NULL),
+(14, 104, 'remain_clicks', 'uebrig', NULL),
 (14, 104, 'reward', 'verguetung', NULL),
-(14, 104, 'sid', 'aid', NULL),
+(14, 104, 'site_id', 'aid', NULL),
 (14, 105, 'affiliate_id', 'id', NULL),
 (14, 105, 'maximum_stay', 'ma', NULL),
 (14, 105, 'password', 'pw', NULL),
 (14, 105, 'reload', 'reload', NULL),
-(14, 105, 'remain', 'uebrig', NULL),
+(14, 105, 'remain_clicks', 'uebrig', NULL),
 (14, 105, 'reward', 'verguetung', NULL),
-(14, 105, 'sid', 'aid', NULL),
+(14, 105, 'site_id', 'aid', NULL),
 (14, 106, 'affiliate_id', 'id', NULL),
 (14, 106, 'maximum_stay', 'ma', NULL),
 (14, 106, 'password', 'pw', NULL),
 (14, 106, 'reload', 'reload', NULL),
-(14, 106, 'remain', 'uebrig', NULL),
+(14, 106, 'remain_clicks', 'uebrig', NULL),
 (14, 106, 'reward', 'verguetung', NULL),
-(14, 106, 'sid', 'aid', NULL),
+(14, 106, 'site_id', 'aid', NULL),
 (14, 107, 'affiliate_id', 'id', NULL),
 (14, 107, 'maximum_stay', 'ma', NULL),
 (14, 107, 'password', 'pw', NULL),
 (14, 107, 'reload', 'reload', NULL),
-(14, 107, 'remain', 'uebrig', NULL),
+(14, 107, 'remain_clicks', 'uebrig', NULL),
 (14, 107, 'reward', 'verguetung', NULL),
-(14, 107, 'sid', 'aid', NULL),
+(14, 107, 'site_id', 'aid', NULL),
 (14, 108, 'affiliate_id', 'id', NULL),
 (14, 108, 'maximum_stay', 'ma', NULL),
 (14, 108, 'password', 'pw', NULL),
 (14, 108, 'reload', 'reload', NULL),
-(14, 108, 'remain', 'uebrig', NULL),
+(14, 108, 'remain_clicks', 'uebrig', NULL),
 (14, 108, 'reward', 'verguetung', NULL),
-(14, 108, 'sid', 'aid', NULL)");
+(14, 108, 'site_id', 'aid', NULL),
+(14, 122, 'affiliate_id', 'id', NULL),
+(14, 122, 'password', 'pw', NULL),
+(14, 122, 'reload', 'reload', NULL),
+(14, 122, 'reward', 'verguetung', NULL),
+(14, 122, 'remain_clicks', 'uebrig', NULL),
+(14, 122, 'site_id', 'aid', NULL),
+(14, 519, 'affiliate_id', 'id', NULL),
+(14, 519, 'password', 'pw', NULL),
+(14, 519, 'reload', 'reload', NULL),
+(14, 519, 'remain_clicks', 'uebrig', NULL),
+(14, 519, 'reward', 'verguetung', NULL),
+(14, 519, 'site_id', 'aid', NULL),
+(14, 519, 'size', 'typ', '88x31'),
+(14, 521, 'affiliate_id', 'id', NULL),
+(14, 521, 'password', 'pw', NULL),
+(14, 521, 'reload', 'reload', NULL),
+(14, 521, 'remain_clicks', 'uebrig', NULL),
+(14, 521, 'reward', 'verguetung', NULL),
+(14, 521, 'site_id', 'aid', NULL),
+(14, 521, 'size', 'typ', '234x60'),
+(14, 522, 'affiliate_id', 'id', NULL),
+(14, 522, 'password', 'pw', NULL),
+(14, 522, 'reload', 'reload', NULL),
+(14, 522, 'remain_clicks', 'uebrig', NULL),
+(14, 522, 'reward', 'verguetung', NULL),
+(14, 522, 'site_id', 'aid', NULL),
+(14, 522, 'size', 'typ', '120x600')");
 
                // Request parameters per type handler - Gold-Sponsor
                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, 'extra', 'typ', 'forced_banner'),
 (25, 222, 'affiliate_id', 'id', NULL),
 (25, 222, 'minimum_stay', 'ma', NULL),
 (25, 222, 'password', 'pw', NULL),
 (25, 222, 'reload', 'reload', NULL),
-(25, 222, 'remain', 'uebrig', NULL),
+(25, 222, 'remain_clicks', 'uebrig', NULL),
 (25, 222, 'reward', 'verguetung', NULL),
-(25, 223, 'extra', 'typ', 'forcedtextlink'),
+(25, 223, 'extra', 'typ', 'forced_textlink'),
 (25, 223, 'affiliate_id', 'id', NULL),
 (25, 223, 'minimum_stay', 'ma', NULL),
 (25, 223, 'password', 'pw', NULL),
 (25, 223, 'reload', 'reload', NULL),
-(25, 223, 'remain', 'uebrig', NULL),
+(25, 223, 'remain_clicks', 'uebrig', NULL),
 (25, 223, 'reward', 'verguetung', NULL),
 (25, 224, 'extra', 'typ', 'bannerview'),
 (25, 224, 'affiliate_id', 'id', NULL),
 (25, 224, 'minimum_stay', 'ma', NULL),
 (25, 224, 'password', 'pw', NULL),
 (25, 224, 'reload', 'reload', NULL),
-(25, 224, 'remain', 'uebrig', NULL),
+(25, 224, 'remain_clicks', 'uebrig', NULL),
 (25, 224, 'reward', 'verguetung', NULL),
 (25, 225, 'extra', 'typ', 'bannerklick'),
 (25, 225, 'affiliate_id', 'id', NULL),
 (25, 225, 'minimum_stay', 'ma', NULL),
 (25, 225, 'password', 'pw', NULL),
 (25, 225, 'reload', 'reload', NULL),
-(25, 225, 'remain', 'uebrig', NULL),
+(25, 225, 'remain_clicks', 'uebrig', NULL),
 (25, 225, 'reward', 'verguetung', NULL),
 (25, 226, 'extra', 'typ', 'skybannerview'),
 (25, 226, 'affiliate_id', 'id', NULL),
 (25, 226, 'minimum_stay', 'ma', NULL),
 (25, 226, 'password', 'pw', NULL),
 (25, 226, 'reload', 'reload', NULL),
-(25, 226, 'remain', 'uebrig', NULL),
+(25, 226, 'remain_clicks', 'uebrig', NULL),
 (25, 226, 'reward', 'verguetung', NULL),
 (25, 227, 'extra', 'typ', 'buttonview'),
 (25, 227, 'affiliate_id', 'id', NULL),
 (25, 227, 'minimum_stay', 'ma', NULL),
 (25, 227, 'password', 'pw', NULL),
 (25, 227, 'reload', 'reload', NULL),
-(25, 227, 'remain', 'uebrig', NULL),
+(25, 227, 'remain_clicks', 'uebrig', NULL),
 (25, 227, 'reward', 'verguetung', NULL),
 (25, 228, 'extra', 'typ', 'textview'),
 (25, 228, 'affiliate_id', 'id', NULL),
 (25, 228, 'minimum_stay', 'ma', NULL),
 (25, 228, 'password', 'pw', NULL),
 (25, 228, 'reload', 'reload', NULL),
-(25, 228, 'remain', 'uebrig', NULL),
+(25, 228, 'remain_clicks', 'uebrig', NULL),
 (25, 228, 'reward', 'verguetung', NULL),
 (25, 229, 'extra', 'typ', 'traffic'),
 (25, 229, 'affiliate_id', 'id', NULL),
 (25, 229, 'minimum_stay', 'ma', NULL),
 (25, 229, 'password', 'pw', NULL),
 (25, 229, 'reload', 'reload', NULL),
-(25, 229, 'remain', 'uebrig', NULL),
+(25, 229, 'remain_clicks', 'uebrig', NULL),
 (25, 229, 'reward', 'verguetung', NULL),
 (25, 230, 'extra', 'typ', 'popup'),
 (25, 230, 'affiliate_id', 'id', NULL),
 (25, 230, 'minimum_stay', 'ma', NULL),
 (25, 230, 'password', 'pw', NULL),
 (25, 230, 'reload', 'reload', NULL),
-(25, 230, 'remain', 'uebrig', NULL),
+(25, 230, 'remain_clicks', 'uebrig', NULL),
 (25, 230, 'reward', 'verguetung', NULL),
 (25, 231, 'extra', 'typ', 'paidmail'),
 (25, 231, 'affiliate_id', 'id', NULL),
 (25, 231, 'minimum_stay', 'ma', NULL),
 (25, 231, 'password', 'pw', NULL),
 (25, 231, 'reload', 'reload', NULL),
-(25, 231, 'remain', 'uebrig', NULL),
+(25, 231, 'remain_clicks', 'uebrig', NULL),
 (25, 231, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - homeADS
@@ -3165,333 +3643,347 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (28, 260, 'affiliate_id', 'id', NULL),
 (28, 260, 'password', 'pw', NULL),
 (28, 260, 'reload', 'reload', NULL),
-(28, 260, 'remain', 'uebrig', NULL),
+(28, 260, 'remain_clicks', 'uebrig', NULL),
 (28, 260, 'reward', 'verguetung', NULL),
-(28, 260, 'sid', 'sid', NULL),
+(28, 260, 'site_id', 'sid', NULL),
 (28, 260, 'size', 'size', NULL),
 (28, 260, 'type', 'typ', 'klick'),
 (28, 261, 'affiliate_id', 'id', NULL),
 (28, 261, 'password', 'pw', NULL),
 (28, 261, 'reload', 'reload', NULL),
-(28, 261, 'remain', 'uebrig', NULL),
+(28, 261, 'remain_clicks', 'uebrig', NULL),
 (28, 261, 'reward', 'verguetung', NULL),
-(28, 261, 'sid', 'sid', NULL),
+(28, 261, 'site_id', 'sid', NULL),
 (28, 261, 'size', 'size', NULL),
 (28, 261, 'type', 'typ', 'view'),
 (28, 262, 'affiliate_id', 'id', NULL),
 (28, 262, 'password', 'pw', NULL),
 (28, 262, 'reload', 'reload', NULL),
-(28, 262, 'remain', 'uebrig', NULL),
+(28, 262, 'remain_clicks', 'uebrig', NULL),
 (28, 262, 'reward', 'verguetung', NULL),
-(28, 262, 'sid', 'sid', NULL),
+(28, 262, 'site_id', 'sid', NULL),
 (28, 262, 'type', 'typ', 'klick'),
 (28, 263, 'affiliate_id', 'id', NULL),
 (28, 263, 'password', 'pw', NULL),
 (28, 263, 'reload', 'reload', NULL),
-(28, 263, 'remain', 'uebrig', NULL),
+(28, 263, 'remain_clicks', 'uebrig', NULL),
 (28, 263, 'reward', 'verguetung', NULL),
-(28, 263, 'sid', 'sid', NULL),
+(28, 263, 'site_id', 'sid', NULL),
 (28, 263, 'type', 'typ', 'view'),
 (28, 264, 'affiliate_id', 'id', NULL),
 (28, 264, 'minimum_stay', 'ma', NULL),
 (28, 264, 'password', 'pw', NULL),
 (28, 264, 'reload', 'reload', NULL),
-(28, 264, 'remain', 'uebrig', NULL),
+(28, 264, 'remain_clicks', 'uebrig', NULL),
 (28, 264, 'reward', 'verguetung', NULL),
-(28, 264, 'sid', 'sid', NULL),
+(28, 264, 'site_id', 'sid', NULL),
 (28, 264, 'size', 'size', NULL),
 (28, 265, 'affiliate_id', 'id', NULL),
 (28, 265, 'minimum_stay', 'ma', NULL),
 (28, 265, 'password', 'pw', NULL),
 (28, 265, 'reload', 'reload', NULL),
-(28, 265, 'remain', 'uebrig', NULL),
+(28, 265, 'remain_clicks', 'uebrig', NULL),
 (28, 265, 'reward', 'verguetung', NULL),
-(28, 265, 'sid', 'sid', NULL),
+(28, 265, 'site_id', 'sid', NULL),
 (28, 265, 'type', 'typ', 'text'),
 (28, 266, 'affiliate_id', 'id', NULL),
 (28, 266, 'minimum_stay', 'ma', NULL),
 (28, 266, 'password', 'pw', NULL),
 (28, 266, 'reload', 'reload', NULL),
-(28, 266, 'remain', 'uebrig', NULL),
+(28, 266, 'remain_clicks', 'uebrig', NULL),
 (28, 266, 'reward', 'verguetung', NULL),
-(28, 266, 'sid', 'sid', NULL),
+(28, 266, 'site_id', 'sid', NULL),
 (28, 266, 'type', 'typ', 'html'),
 (28, 267, 'affiliate_id', 'id', NULL),
 (28, 267, 'password', 'pw', NULL),
 (28, 267, 'reload', 'reload', NULL),
-(28, 267, 'remain', 'uebrig', NULL),
+(28, 267, 'remain_clicks', 'uebrig', NULL),
 (28, 267, 'reward', 'verguetung', NULL),
-(28, 267, 'sid', 'sid', NULL),
+(28, 267, 'site_id', 'sid', NULL),
 (28, 267, 'type', 'typ', 'klick'),
 (28, 268, 'affiliate_id', 'id', NULL),
 (28, 268, 'password', 'pw', NULL),
 (28, 268, 'reload', 'reload', NULL),
-(28, 268, 'remain', 'uebrig', NULL),
+(28, 268, 'remain_clicks', 'uebrig', NULL),
 (28, 268, 'reward', 'verguetung', NULL),
-(28, 268, 'sid', 'sid', NULL),
+(28, 268, 'site_id', 'sid', NULL),
 (28, 268, 'type', 'typ', 'view'),
 (28, 269, 'affiliate_id', 'id', NULL),
 (28, 269, 'minimum_stay', 'ma', NULL),
 (28, 269, 'password', 'pw', NULL),
 (28, 269, 'reload', 'reload', NULL),
-(28, 269, 'remain', 'uebrig', NULL),
+(28, 269, 'remain_clicks', 'uebrig', NULL),
 (28, 269, 'reward', 'verguetung', NULL),
-(28, 269, 'sid', 'sid', NULL),
+(28, 269, 'site_id', 'sid', NULL),
 (28, 270, 'affiliate_id', 'id', NULL),
 (28, 270, 'minimum_stay', 'ma', NULL),
 (28, 270, 'password', 'pw', NULL),
 (28, 270, 'reload', 'reload', NULL),
-(28, 270, 'remain', 'uebrig', NULL),
+(28, 270, 'remain_clicks', 'uebrig', NULL),
 (28, 270, 'reward', 'verguetung', NULL),
-(28, 270, 'sid', 'sid', NULL),
+(28, 270, 'site_id', 'sid', NULL),
 (28, 271, 'affiliate_id', 'id', NULL),
 (28, 271, 'password', 'pw', NULL),
-(28, 271, 'remain', 'uebrig', NULL),
+(28, 271, 'remain_clicks', 'uebrig', NULL),
 (28, 271, 'reward', 'verguetung', NULL),
-(28, 271, 'sid', 'sid', NULL),
+(28, 271, 'site_id', 'sid', NULL),
 (28, 272, 'affiliate_id', 'id', NULL),
 (28, 272, 'password', 'pw', NULL),
-(28, 272, 'remain', 'uebrig', NULL),
+(28, 272, 'remain_clicks', 'uebrig', NULL),
 (28, 272, 'reward', 'verguetung', NULL),
-(28, 272, 'sid', 'sid', NULL)");
+(28, 272, 'site_id', 'sid', NULL)");
 
                // Request parameters per type handler - HPSponsor
                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, 'extra', 'typ', 'forced_banner'),
 (15, 135, 'affiliate_id', 'id', NULL),
 (15, 135, 'password', 'pw', NULL),
 (15, 135, 'reload', 'reload', NULL),
-(15, 135, 'remain', 'uebrig', NULL),
+(15, 135, 'remain_clicks', 'uebrig', NULL),
 (15, 135, 'reward', 'verguetung', NULL),
-(15, 136, 'extra', 'typ', 'forcedtextlink'),
+(15, 136, 'extra', 'typ', 'forced_textlink'),
 (15, 136, 'affiliate_id', 'id', NULL),
 (15, 136, 'password', 'pw', NULL),
 (15, 136, 'reload', 'reload', NULL),
-(15, 136, 'remain', 'uebrig', NULL),
+(15, 136, 'remain_clicks', 'uebrig', NULL),
 (15, 136, 'reward', 'verguetung', NULL),
 (15, 137, 'extra', 'typ', 'bannerview'),
 (15, 137, 'affiliate_id', 'id', NULL),
 (15, 137, 'password', 'pw', NULL),
 (15, 137, 'reload', 'reload', NULL),
-(15, 137, 'remain', 'uebrig', NULL),
+(15, 137, 'remain_clicks', 'uebrig', NULL),
 (15, 137, 'reward', 'verguetung', NULL),
 (15, 138, 'extra', 'typ', 'bannerklick'),
 (15, 138, 'affiliate_id', 'id', NULL),
 (15, 138, 'password', 'pw', NULL),
 (15, 138, 'reload', 'reload', NULL),
-(15, 138, 'remain', 'uebrig', NULL),
+(15, 138, 'remain_clicks', 'uebrig', NULL),
 (15, 138, 'reward', 'verguetung', NULL),
 (15, 139, 'extra', 'typ', 'skybannerview'),
 (15, 139, 'affiliate_id', 'id', NULL),
 (15, 139, 'password', 'pw', NULL),
 (15, 139, 'reload', 'reload', NULL),
-(15, 139, 'remain', 'uebrig', NULL),
+(15, 139, 'remain_clicks', 'uebrig', NULL),
 (15, 139, 'reward', 'verguetung', NULL),
 (15, 140, 'extra', 'typ', 'buttonview'),
 (15, 140, 'affiliate_id', 'id', NULL),
 (15, 140, 'password', 'pw', NULL),
 (15, 140, 'reload', 'reload', NULL),
-(15, 140, 'remain', 'uebrig', NULL),
+(15, 140, 'remain_clicks', 'uebrig', NULL),
 (15, 140, 'reward', 'verguetung', NULL),
 (15, 141, 'extra', 'typ', 'textview'),
 (15, 141, 'affiliate_id', 'id', NULL),
 (15, 141, 'password', 'pw', NULL),
 (15, 141, 'reload', 'reload', NULL),
-(15, 141, 'remain', 'uebrig', NULL),
+(15, 141, 'remain_clicks', 'uebrig', NULL),
 (15, 141, 'reward', 'verguetung', NULL),
 (15, 142, 'extra', 'typ', 'traffic'),
 (15, 142, 'affiliate_id', 'id', NULL),
 (15, 142, 'password', 'pw', NULL),
 (15, 142, 'reload', 'reload', NULL),
-(15, 142, 'remain', 'uebrig', NULL),
+(15, 142, 'remain_clicks', 'uebrig', NULL),
 (15, 142, 'reward', 'verguetung', NULL),
 (15, 143, 'extra', 'typ', 'popup'),
 (15, 143, 'affiliate_id', 'id', NULL),
 (15, 143, 'minimum_stay', 'ma', NULL),
 (15, 143, 'password', 'pw', NULL),
 (15, 143, 'reload', 'reload', NULL),
-(15, 143, 'remain', 'uebrig', NULL),
+(15, 143, 'remain_clicks', 'uebrig', NULL),
 (15, 143, 'reward', 'verguetung', NULL),
 (15, 144, 'extra', 'typ', 'paidmail'),
 (15, 144, 'affiliate_id', 'id', NULL),
 (15, 144, 'minimum_stay', 'ma', NULL),
 (15, 144, 'password', 'pw', NULL),
 (15, 144, 'reload', 'reload', NULL),
-(15, 144, 'remain', 'uebrig', NULL),
+(15, 144, 'remain_clicks', 'uebrig', NULL),
 (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`, `network_request_param_key`, `network_request_param_value`, `network_request_param_default`) VALUES
-(16, 63, 'affiliate_id', 'id', NULL),
-(16, 63, 'password', 'pw', NULL),
+(16, 63, 'affiliate_id', 'aid', NULL),
+(16, 63, 'site_id', 'sid', NULL),
+(16, 63, 'password', 'ipw', NULL),
+(16, 63, 'remain_budget', 'budget', NULL),
 (16, 63, 'reload', 'reload', NULL),
-(16, 63, 'remain', 'uebrig', NULL),
+(16, 63, 'extra', 'art', 'bannerklick'),
+(16, 63, 'minimum_stay', 'ma', NULL),
 (16, 63, 'reward', 'verguetung', NULL),
-(16, 63, 'sid', 'sid', NULL),
-(16, 63, 'size', 'size', NULL),
-(16, 63, 'type', 'typ', 'klick'),
-(16, 64, 'affiliate_id', 'id', NULL),
-(16, 64, 'password', 'pw', NULL),
+(16, 64, 'affiliate_id', 'aid', NULL),
+(16, 64, 'site_id', 'sid', NULL),
+(16, 64, 'password', 'ipw', NULL),
+(16, 64, 'remain_budget', 'budget', NULL),
 (16, 64, 'reload', 'reload', NULL),
-(16, 64, 'remain', 'uebrig', NULL),
+(16, 64, 'extra', 'art', 'bannerview'),
+(16, 64, 'minimum_stay', 'ma', NULL),
 (16, 64, 'reward', 'verguetung', NULL),
-(16, 64, 'sid', 'sid', NULL),
-(16, 64, 'size', 'size', NULL),
-(16, 64, 'type', 'typ', 'view'),
-(16, 65, 'affiliate_id', 'id', NULL),
-(16, 65, 'password', 'pw', NULL),
+(16, 65, 'affiliate_id', 'aid', NULL),
+(16, 65, 'site_id', 'sid', NULL),
+(16, 65, 'password', 'ipw', NULL),
+(16, 65, 'remain_budget', 'budget', NULL),
 (16, 65, 'reload', 'reload', NULL),
-(16, 65, 'remain', 'uebrig', NULL),
+(16, 65, 'extra', 'art', 'textlinkklick'),
+(16, 65, 'minimum_stay', 'ma', NULL),
 (16, 65, 'reward', 'verguetung', NULL),
-(16, 65, 'sid', 'sid', NULL),
-(16, 65, 'type', 'typ', 'klick'),
-(16, 66, 'affiliate_id', 'id', NULL),
-(16, 66, 'password', 'pw', NULL),
+(16, 66, 'affiliate_id', 'aid', NULL),
+(16, 66, 'site_id', 'sid', NULL),
+(16, 66, 'password', 'ipw', NULL),
+(16, 66, 'remain_budget', 'budget', NULL),
 (16, 66, 'reload', 'reload', NULL),
-(16, 66, 'remain', 'uebrig', NULL),
+(16, 66, 'extra', 'art', 'textlinkview'),
+(16, 66, 'minimum_stay', 'ma', NULL),
 (16, 66, 'reward', 'verguetung', NULL),
-(16, 66, 'sid', 'sid', NULL),
-(16, 66, 'type', 'typ', 'view'),
-(16, 67, 'affiliate_id', 'id', NULL),
-(16, 67, 'password', 'pw', NULL),
+(16, 67, 'affiliate_id', 'aid', NULL),
+(16, 67, 'site_id', 'sid', NULL),
+(16, 67, 'password', 'ipw', NULL),
+(16, 67, 'remain_budget', 'budget', NULL),
 (16, 67, 'reload', 'reload', NULL),
-(16, 67, 'remain', 'uebrig', NULL),
+(16, 67, 'extra', 'art', 'surfbarklick'),
+(16, 67, 'minimum_stay', 'ma', NULL),
 (16, 67, 'reward', 'verguetung', NULL),
-(16, 67, 'sid', 'sid', NULL),
-(16, 67, 'size', 'size', NULL),
-(16, 67, 'type', 'typ', 'klick'),
-(16, 68, 'affiliate_id', 'id', NULL),
-(16, 68, 'minimum_stay', 'ma', NULL),
-(16, 68, 'password', 'pw', NULL),
+(16, 68, 'affiliate_id', 'aid', NULL),
+(16, 68, 'site_id', 'sid', NULL),
+(16, 68, 'password', 'ipw', NULL),
+(16, 68, 'remain_budget', 'budget', NULL),
 (16, 68, 'reload', 'reload', NULL),
-(16, 68, 'remain', 'uebrig', NULL),
+(16, 68, 'extra', 'art', 'forcedklick'),
+(16, 68, 'minimum_stay', 'ma', NULL),
 (16, 68, 'reward', 'verguetung', NULL),
-(16, 68, 'sid', 'sid', NULL),
-(16, 68, 'size', 'size', NULL),
-(16, 69, 'affiliate_id', 'id', NULL),
-(16, 69, 'password', 'pw', NULL),
+(16, 69, 'affiliate_id', 'aid', NULL),
+(16, 69, 'site_id', 'sid', NULL),
+(16, 69, 'password', 'ipw', NULL),
+(16, 69, 'remain_budget', 'budget', NULL),
 (16, 69, 'reload', 'reload', NULL),
-(16, 69, 'remain', 'uebrig', NULL),
+(16, 69, 'extra', 'art', 'surfbarview'),
+(16, 69, 'minimum_stay', 'ma', NULL),
 (16, 69, 'reward', 'verguetung', NULL),
-(16, 69, 'sid', 'sid', NULL),
-(16, 69, 'size', 'size', NULL),
-(16, 69, 'type', 'typ', 'view'),
-(16, 70, 'affiliate_id', 'id', NULL),
-(16, 70, 'minimum_stay', 'ma', NULL),
-(16, 70, 'password', 'pw', NULL),
+(16, 70, 'affiliate_id', 'aid', NULL),
+(16, 70, 'site_id', 'sid', NULL),
+(16, 70, 'password', 'ipw', NULL),
+(16, 70, 'remain_budget', 'budget', NULL),
 (16, 70, 'reload', 'reload', NULL),
-(16, 70, 'remain', 'uebrig', NULL),
+(16, 70, 'extra', 'art', 'text_paidmail'),
+(16, 70, 'minimum_stay', 'ma', NULL),
 (16, 70, 'reward', 'verguetung', NULL),
-(16, 70, 'sid', 'sid', NULL),
-(16, 70, 'type', 'typ', 'text'),
-(16, 71, 'affiliate_id', 'id', NULL),
-(16, 71, 'minimum_stay', 'ma', NULL),
-(16, 71, 'password', 'pw', NULL),
+(16, 71, 'affiliate_id', 'aid', NULL),
+(16, 71, 'site_id', 'sid', NULL),
+(16, 71, 'password', 'ipw', NULL),
+(16, 71, 'remain_budget', 'budget', NULL),
 (16, 71, 'reload', 'reload', NULL),
-(16, 71, 'remain', 'uebrig', NULL),
+(16, 71, 'extra', 'art', 'html_paidmail'),
+(16, 71, 'minimum_stay', 'ma', NULL),
 (16, 71, 'reward', 'verguetung', NULL),
-(16, 71, 'sid', 'sid', NULL),
-(16, 71, 'type', 'typ', 'html'),
-(16, 72, 'affiliate_id', 'id', NULL),
-(16, 72, 'password', 'pw', NULL),
+(16, 72, 'affiliate_id', 'aid', NULL),
+(16, 72, 'site_id', 'sid', NULL),
+(16, 72, 'password', 'ipw', NULL),
+(16, 72, 'remain_budget', 'budget', NULL),
 (16, 72, 'reload', 'reload', NULL),
-(16, 72, 'remain', 'uebrig', NULL),
+(16, 72, 'extra', 'art', 'layerklick'),
+(16, 72, 'minimum_stay', 'ma', NULL),
 (16, 72, 'reward', 'verguetung', NULL),
-(16, 72, 'sid', 'sid', NULL),
-(16, 72, 'type', 'typ', 'klick'),
-(16, 73, 'affiliate_id', 'id', NULL),
-(16, 73, 'password', 'pw', NULL),
+(16, 73, 'affiliate_id', 'aid', NULL),
+(16, 73, 'site_id', 'sid', NULL),
+(16, 73, 'password', 'ipw', NULL),
+(16, 73, 'remain_budget', 'budget', NULL),
 (16, 73, 'reload', 'reload', NULL),
-(16, 73, 'remain', 'uebrig', NULL),
+(16, 73, 'extra', 'art', 'layerview'),
+(16, 73, 'minimum_stay', 'ma', NULL),
 (16, 73, 'reward', 'verguetung', NULL),
-(16, 73, 'sid', 'sid', NULL),
-(16, 73, 'type', 'typ', 'view'),
-(16, 74, 'affiliate_id', 'id', NULL),
-(16, 74, 'minimum_stay', 'ma', NULL),
-(16, 74, 'password', 'pw', NULL),
+(16, 74, 'affiliate_id', 'aid', NULL),
+(16, 74, 'site_id', 'sid', NULL),
+(16, 74, 'password', 'ipw', NULL),
+(16, 74, 'remain_budget', 'budget', NULL),
 (16, 74, 'reload', 'reload', NULL),
-(16, 74, 'remain', 'uebrig', NULL),
+(16, 74, 'extra', 'art', 'popup'),
+(16, 74, 'minimum_stay', 'ma', NULL),
 (16, 74, 'reward', 'verguetung', NULL),
-(16, 74, 'sid', 'sid', NULL),
-(16, 75, 'affiliate_id', 'id', NULL),
-(16, 75, 'minimum_stay', 'ma', NULL),
-(16, 75, 'password', 'pw', NULL),
+(16, 75, 'affiliate_id', 'aid', NULL),
+(16, 75, 'site_id', 'sid', NULL),
+(16, 75, 'password', 'ipw', NULL),
+(16, 75, 'remain_budget', 'budget', NULL),
 (16, 75, 'reload', 'reload', NULL),
-(16, 75, 'remain', 'uebrig', NULL),
+(16, 75, 'extra', 'art', 'popdown'),
+(16, 75, 'minimum_stay', 'ma', NULL),
 (16, 75, 'reward', 'verguetung', NULL),
-(16, 75, 'sid', 'sid', NULL),
-(16, 76, 'affiliate_id', 'id', NULL),
-(16, 76, 'password', 'pw', NULL),
-(16, 76, 'remain', 'uebrig', NULL),
+(16, 76, 'affiliate_id', 'aid', NULL),
+(16, 76, 'site_id', 'sid', NULL),
+(16, 76, 'password', 'ipw', NULL),
+(16, 76, 'remain_budget', 'budget', NULL),
+(16, 76, 'reload', 'reload', NULL),
+(16, 76, 'extra', 'art', 'lead'),
+(16, 76, 'type', 'typ', NULL),
+(16, 76, 'minimum_stay', 'ma', NULL),
 (16, 76, 'reward', 'verguetung', NULL),
-(16, 76, 'sid', 'sid', NULL),
-(16, 77, 'affiliate_id', 'id', NULL),
-(16, 77, 'password', 'pw', NULL),
-(16, 77, 'remain', 'uebrig', NULL),
-(16, 77, 'reward', 'verguetung', NULL),
-(16, 77, 'sid', 'sid', NULL)");
+(16, 77, 'affiliate_id', 'aid', NULL),
+(16, 77, 'site_id', 'sid', NULL),
+(16, 77, 'password', 'ipw', NULL),
+(16, 77, 'remain_budget', 'budget', NULL),
+(16, 77, 'reload', 'reload', NULL),
+(16, 77, 'extra', 'art', 'sale'),
+(16, 77, 'type', 'typ', NULL),
+(16, 77, 'minimum_stay', 'ma', NULL),
+(16, 77, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - Mega-Ad
                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, 'extra', 'typ', 'forced_banner'),
 (17, 109, 'affiliate_id', 'id', NULL),
 (17, 109, 'password', 'pw', NULL),
 (17, 109, 'reload', 'reload', NULL),
-(17, 109, 'remain', 'uebrig', NULL),
+(17, 109, 'remain_clicks', 'uebrig', NULL),
 (17, 109, 'reward', 'verguetung', NULL),
-(17, 110, 'extra', 'typ', 'forcedtextlink'),
+(17, 110, 'extra', 'typ', 'forced_textlink'),
 (17, 110, 'affiliate_id', 'id', NULL),
 (17, 110, 'password', 'pw', NULL),
 (17, 110, 'reload', 'reload', NULL),
-(17, 110, 'remain', 'uebrig', NULL),
+(17, 110, 'remain_clicks', 'uebrig', NULL),
 (17, 110, 'reward', 'verguetung', NULL),
 (17, 111, 'extra', 'typ', 'bannerview'),
 (17, 111, 'affiliate_id', 'id', NULL),
 (17, 111, 'password', 'pw', NULL),
 (17, 111, 'reload', 'reload', NULL),
-(17, 111, 'remain', 'uebrig', NULL),
+(17, 111, 'remain_clicks', 'uebrig', NULL),
 (17, 111, 'reward', 'verguetung', NULL),
 (17, 112, 'extra', 'typ', 'bannerklick'),
 (17, 112, 'affiliate_id', 'id', NULL),
 (17, 112, 'password', 'pw', NULL),
 (17, 112, 'reload', 'reload', NULL),
-(17, 112, 'remain', 'uebrig', NULL),
+(17, 112, 'remain_clicks', 'uebrig', NULL),
 (17, 112, 'reward', 'verguetung', NULL),
 (17, 113, 'extra', 'typ', 'skybannerview'),
 (17, 113, 'affiliate_id', 'id', NULL),
 (17, 113, 'password', 'pw', NULL),
 (17, 113, 'reload', 'reload', NULL),
-(17, 113, 'remain', 'uebrig', NULL),
+(17, 113, 'remain_clicks', 'uebrig', NULL),
 (17, 113, 'reward', 'verguetung', NULL),
 (17, 114, 'extra', 'typ', 'buttonview'),
 (17, 114, 'affiliate_id', 'id', NULL),
 (17, 114, 'password', 'pw', NULL),
 (17, 114, 'reload', 'reload', NULL),
-(17, 114, 'remain', 'uebrig', NULL),
+(17, 114, 'remain_clicks', 'uebrig', NULL),
 (17, 114, 'reward', 'verguetung', NULL),
 (17, 115, 'extra', 'typ', 'textview'),
 (17, 115, 'affiliate_id', 'id', NULL),
 (17, 115, 'password', 'pw', NULL),
 (17, 115, 'reload', 'reload', NULL),
-(17, 115, 'remain', 'uebrig', NULL),
+(17, 115, 'remain_clicks', 'uebrig', NULL),
 (17, 115, 'reward', 'verguetung', NULL),
 (17, 116, 'extra', 'typ', 'popup'),
 (17, 116, 'affiliate_id', 'id', NULL),
 (17, 116, 'password', 'pw', NULL),
 (17, 116, 'reload', 'reload', NULL),
-(17, 116, 'remain', 'uebrig', NULL),
+(17, 116, 'remain_clicks', 'uebrig', NULL),
 (17, 116, 'reward', 'verguetung', NULL),
 (17, 117, 'extra', 'typ', 'paidmail'),
 (17, 117, 'affiliate_id', 'id', NULL),
 (17, 117, 'password', 'pw', NULL),
 (17, 117, 'reload', 'reload', NULL),
-(17, 117, 'remain', 'uebrig', NULL),
+(17, 117, 'remain_clicks', 'uebrig', NULL),
 (17, 117, 'reward', 'verguetung', NULL),
 (17, 123, 'extra', 'typ', 'traffic'),
 (17, 123, 'affiliate_id', 'id', NULL),
 (17, 123, 'password', 'pw', NULL),
 (17, 123, 'reload', 'reload', NULL),
-(17, 123, 'remain', 'uebrig', NULL),
+(17, 123, 'remain_clicks', 'uebrig', NULL),
 (17, 123, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - Power-Promo
@@ -3499,175 +3991,175 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (18, 78, 'affiliate_id', 'id', NULL),
 (18, 78, 'password', 'pw', NULL),
 (18, 78, 'reload', 'reload', NULL),
-(18, 78, 'remain', 'uebrig', NULL),
+(18, 78, 'remain_clicks', 'uebrig', NULL),
 (18, 78, 'reward', 'verguetung', NULL),
-(18, 78, 'sid', 'sid', NULL),
+(18, 78, 'site_id', 'sid', NULL),
 (18, 78, 'size', 'size', NULL),
 (18, 78, 'type', 'typ', 'klick'),
 (18, 79, 'affiliate_id', 'id', NULL),
 (18, 79, 'password', 'pw', NULL),
 (18, 79, 'reload', 'reload', NULL),
-(18, 79, 'remain', 'uebrig', NULL),
+(18, 79, 'remain_clicks', 'uebrig', NULL),
 (18, 79, 'reward', 'verguetung', NULL),
-(18, 79, 'sid', 'sid', NULL),
+(18, 79, 'site_id', 'sid', NULL),
 (18, 79, 'size', 'size', NULL),
 (18, 79, 'type', 'typ', 'view'),
 (18, 80, 'affiliate_id', 'id', NULL),
 (18, 80, 'password', 'pw', NULL),
 (18, 80, 'reload', 'reload', NULL),
-(18, 80, 'remain', 'uebrig', NULL),
+(18, 80, 'remain_clicks', 'uebrig', NULL),
 (18, 80, 'reward', 'verguetung', NULL),
-(18, 80, 'sid', 'sid', NULL),
+(18, 80, 'site_id', 'sid', NULL),
 (18, 80, 'type', 'typ', 'klick'),
 (18, 81, 'affiliate_id', 'id', NULL),
 (18, 81, 'password', 'pw', NULL),
 (18, 81, 'reload', 'reload', NULL),
-(18, 81, 'remain', 'uebrig', NULL),
+(18, 81, 'remain_clicks', 'uebrig', NULL),
 (18, 81, 'reward', 'verguetung', NULL),
-(18, 81, 'sid', 'sid', NULL),
+(18, 81, 'site_id', 'sid', NULL),
 (18, 81, 'type', 'typ', 'view'),
 (18, 82, 'affiliate_id', 'id', NULL),
 (18, 82, 'password', 'pw', NULL),
 (18, 82, 'reload', 'reload', NULL),
-(18, 82, 'remain', 'uebrig', NULL),
+(18, 82, 'remain_clicks', 'uebrig', NULL),
 (18, 82, 'reward', 'verguetung', NULL),
-(18, 82, 'sid', 'sid', NULL),
+(18, 82, 'site_id', 'sid', NULL),
 (18, 82, 'size', 'size', NULL),
 (18, 82, 'type', 'typ', 'klick'),
 (18, 83, 'affiliate_id', 'id', NULL),
 (18, 83, 'password', 'pw', NULL),
 (18, 83, 'reload', 'reload', NULL),
-(18, 83, 'remain', 'uebrig', NULL),
+(18, 83, 'remain_clicks', 'uebrig', NULL),
 (18, 83, 'reward', 'verguetung', NULL),
-(18, 83, 'sid', 'sid', NULL),
+(18, 83, 'site_id', 'sid', NULL),
 (18, 83, 'size', 'size', NULL),
 (18, 83, 'type', 'typ', 'view'),
 (18, 84, 'affiliate_id', 'id', NULL),
 (18, 84, 'minimum_stay', 'ma', NULL),
 (18, 84, 'password', 'pw', NULL),
 (18, 84, 'reload', 'reload', NULL),
-(18, 84, 'remain', 'uebrig', NULL),
+(18, 84, 'remain_clicks', 'uebrig', NULL),
 (18, 84, 'reward', 'verguetung', NULL),
-(18, 84, 'sid', 'sid', NULL),
+(18, 84, 'site_id', 'sid', NULL),
 (18, 84, 'size', 'size', NULL),
 (18, 85, 'affiliate_id', 'id', NULL),
 (18, 85, 'minimum_stay', 'ma', NULL),
 (18, 85, 'password', 'pw', NULL),
 (18, 85, 'reload', 'reload', NULL),
-(18, 85, 'remain', 'uebrig', NULL),
+(18, 85, 'remain_clicks', 'uebrig', NULL),
 (18, 85, 'reward', 'verguetung', NULL),
-(18, 85, 'sid', 'sid', NULL),
+(18, 85, 'site_id', 'sid', NULL),
 (18, 85, 'type', 'typ', 'text'),
 (18, 86, 'affiliate_id', 'id', NULL),
 (18, 86, 'minimum_stay', 'ma', NULL),
 (18, 86, 'password', 'pw', NULL),
 (18, 86, 'reload', 'reload', NULL),
-(18, 86, 'remain', 'uebrig', NULL),
+(18, 86, 'remain_clicks', 'uebrig', NULL),
 (18, 86, 'reward', 'verguetung', NULL),
-(18, 86, 'sid', 'sid', NULL),
+(18, 86, 'site_id', 'sid', NULL),
 (18, 86, 'type', 'typ', 'html'),
 (18, 87, 'affiliate_id', 'id', NULL),
 (18, 87, 'password', 'pw', NULL),
 (18, 87, 'reload', 'reload', NULL),
-(18, 87, 'remain', 'uebrig', NULL),
+(18, 87, 'remain_clicks', 'uebrig', NULL),
 (18, 87, 'reward', 'verguetung', NULL),
-(18, 87, 'sid', 'sid', NULL),
+(18, 87, 'site_id', 'sid', NULL),
 (18, 87, 'type', 'typ', 'klick'),
 (18, 88, 'affiliate_id', 'id', NULL),
 (18, 88, 'password', 'pw', NULL),
 (18, 88, 'reload', 'reload', NULL),
-(18, 88, 'remain', 'uebrig', NULL),
+(18, 88, 'remain_clicks', 'uebrig', NULL),
 (18, 88, 'reward', 'verguetung', NULL),
-(18, 88, 'sid', 'sid', NULL),
+(18, 88, 'site_id', 'sid', NULL),
 (18, 88, 'type', 'typ', 'view'),
 (18, 89, 'affiliate_id', 'id', NULL),
 (18, 89, 'minimum_stay', 'ma', NULL),
 (18, 89, 'password', 'pw', NULL),
 (18, 89, 'reload', 'reload', NULL),
-(18, 89, 'remain', 'uebrig', NULL),
+(18, 89, 'remain_clicks', 'uebrig', NULL),
 (18, 89, 'reward', 'verguetung', NULL),
-(18, 89, 'sid', 'sid', NULL),
+(18, 89, 'site_id', 'sid', NULL),
 (18, 90, 'affiliate_id', 'id', NULL),
 (18, 90, 'minimum_stay', 'ma', NULL),
 (18, 90, 'password', 'pw', NULL),
 (18, 90, 'reload', 'reload', NULL),
-(18, 90, 'remain', 'uebrig', NULL),
+(18, 90, 'remain_clicks', 'uebrig', NULL),
 (18, 90, 'reward', 'verguetung', NULL),
-(18, 90, 'sid', 'sid', NULL),
+(18, 90, 'site_id', 'sid', NULL),
 (18, 91, 'affiliate_id', 'id', NULL),
 (18, 91, 'password', 'pw', NULL),
-(18, 91, 'remain', 'uebrig', NULL),
+(18, 91, 'remain_clicks', 'uebrig', NULL),
 (18, 91, 'reward', 'verguetung', NULL),
-(18, 91, 'sid', 'sid', NULL),
+(18, 91, 'site_id', 'sid', NULL),
 (18, 92, 'affiliate_id', 'id', NULL),
 (18, 92, 'password', 'pw', NULL),
-(18, 92, 'remain', 'uebrig', NULL),
+(18, 92, 'remain_clicks', 'uebrig', NULL),
 (18, 92, 'reward', 'verguetung', NULL),
-(18, 92, 'sid', 'sid', NULL)");
+(18, 92, 'site_id', 'sid', NULL)");
 
                // Request parameters per type handler - SeCash
                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, 'extra', 'typ', 'forced_banner'),
 (19, 93, 'affiliate_id', 'id', NULL),
 (19, 93, 'password', 'pw', NULL),
 (19, 93, 'reload', 'reload', NULL),
-(19, 93, 'remain', 'uebrig', NULL),
+(19, 93, 'remain_clicks', 'uebrig', NULL),
 (19, 93, 'reward', 'verguetung', NULL),
-(19, 94, 'extra', 'typ', 'forcedtextlink'),
+(19, 94, 'extra', 'typ', 'forced_textlink'),
 (19, 94, 'affiliate_id', 'id', NULL),
 (19, 94, 'password', 'pw', NULL),
 (19, 94, 'reload', 'reload', NULL),
-(19, 94, 'remain', 'uebrig', NULL),
+(19, 94, 'remain_clicks', 'uebrig', NULL),
 (19, 94, 'reward', 'verguetung', NULL),
 (19, 95, 'extra', 'typ', 'bannerview'),
 (19, 95, 'affiliate_id', 'id', NULL),
 (19, 95, 'password', 'pw', NULL),
 (19, 95, 'reload', 'reload', NULL),
-(19, 95, 'remain', 'uebrig', NULL),
+(19, 95, 'remain_clicks', 'uebrig', NULL),
 (19, 95, 'reward', 'verguetung', NULL),
 (19, 96, 'extra', 'typ', 'bannerklick'),
 (19, 96, 'affiliate_id', 'id', NULL),
 (19, 96, 'password', 'pw', NULL),
 (19, 96, 'reload', 'reload', NULL),
-(19, 96, 'remain', 'uebrig', NULL),
+(19, 96, 'remain_clicks', 'uebrig', NULL),
 (19, 96, 'reward', 'verguetung', NULL),
 (19, 97, 'extra', 'typ', 'skybannerview'),
 (19, 97, 'affiliate_id', 'id', NULL),
 (19, 97, 'password', 'pw', NULL),
 (19, 97, 'reload', 'reload', NULL),
-(19, 97, 'remain', 'uebrig', NULL),
+(19, 97, 'remain_clicks', 'uebrig', NULL),
 (19, 97, 'reward', 'verguetung', NULL),
 (19, 98, 'extra', 'typ', 'buttonview'),
 (19, 98, 'affiliate_id', 'id', NULL),
 (19, 98, 'password', 'pw', NULL),
 (19, 98, 'reload', 'reload', NULL),
-(19, 98, 'remain', 'uebrig', NULL),
+(19, 98, 'remain_clicks', 'uebrig', NULL),
 (19, 98, 'reward', 'verguetung', NULL),
 (19, 99, 'extra', 'typ', 'textview'),
 (19, 99, 'affiliate_id', 'id', NULL),
 (19, 99, 'password', 'pw', NULL),
 (19, 99, 'reload', 'reload', NULL),
-(19, 99, 'remain', 'uebrig', NULL),
+(19, 99, 'remain_clicks', 'uebrig', NULL),
 (19, 99, 'reward', 'verguetung', NULL),
 (19, 100, 'extra', 'typ', 'popup'),
 (19, 100, 'affiliate_id', 'id', NULL),
 (19, 100, 'minimum_stay', 'ma', NULL),
 (19, 100, 'password', 'pw', NULL),
 (19, 100, 'reload', 'reload', NULL),
-(19, 100, 'remain', 'uebrig', NULL),
+(19, 100, 'remain_clicks', 'uebrig', NULL),
 (19, 100, 'reward', 'verguetung', NULL),
 (19, 101, 'extra', 'typ', 'paidmail'),
 (19, 101, 'affiliate_id', 'id', NULL),
 (19, 101, 'minimum_stay', 'ma', NULL),
 (19, 101, 'password', 'pw', NULL),
 (19, 101, 'reload', 'reload', NULL),
-(19, 101, 'remain', 'uebrig', NULL),
+(19, 101, 'remain_clicks', 'uebrig', NULL),
 (19, 101, 'reward', 'verguetung', NULL),
 (19, 124, 'extra', 'typ', 'traffic'),
 (19, 124, 'affiliate_id', 'id', NULL),
 (19, 124, 'password', 'pw', NULL),
 (19, 124, 'reload', 'reload', NULL),
-(19, 124, 'remain', 'uebrig', NULL),
+(19, 124, 'remain_clicks', 'uebrig', NULL),
 (19, 124, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - SuperPromo24
@@ -3675,243 +4167,178 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (41, 416, 'extra', 'art', 'bannerklick'),
 (41, 416, 'affiliate_id', 'uid', NULL),
 (41, 416, 'password', 'pw', NULL),
-(41, 416, 'sid', 'sid', NULL),
+(41, 416, 'site_id', 'sid', NULL),
 (41, 416, 'reward', 'verguetung', NULL),
 (41, 416, 'reload', 'reload', NULL),
-(41, 416, 'remain', 'uebrig', NULL),
+(41, 416, 'remain_clicks', 'uebrig', NULL),
 (41, 417, 'extra', 'art', 'bannerview'),
 (41, 417, 'affiliate_id', 'uid', NULL),
 (41, 417, 'password', 'pw', NULL),
-(41, 417, 'sid', 'sid', NULL),
+(41, 417, 'site_id', 'sid', NULL),
 (41, 417, 'reward', 'verguetung', NULL),
 (41, 417, 'reload', 'reload', NULL),
-(41, 417, 'remain', 'uebrig', NULL),
+(41, 417, 'remain_clicks', 'uebrig', NULL),
 (41, 418, 'extra', 'art', 'buttonklick'),
 (41, 418, 'affiliate_id', 'uid', NULL),
 (41, 418, 'password', 'pw', NULL),
-(41, 418, 'sid', 'sid', NULL),
+(41, 418, 'site_id', 'sid', NULL),
 (41, 418, 'reward', 'verguetung', NULL),
 (41, 418, 'reload', 'reload', NULL),
-(41, 418, 'remain', 'uebrig', NULL),
+(41, 418, 'remain_clicks', 'uebrig', NULL),
 (41, 419, 'extra', 'art', 'buttonview'),
 (41, 419, 'affiliate_id', 'uid', NULL),
 (41, 419, 'password', 'pw', NULL),
-(41, 419, 'sid', 'sid', NULL),
+(41, 419, 'site_id', 'sid', NULL),
 (41, 419, 'reward', 'verguetung', NULL),
 (41, 419, 'reload', 'reload', NULL),
-(41, 419, 'remain', 'uebrig', NULL),
-(41, 420, 'extra', 'art', 'forcedbanner'),
+(41, 419, 'remain_clicks', 'uebrig', NULL),
+(41, 420, 'extra', 'art', 'forced_banner'),
 (41, 420, 'affiliate_id', 'uid', NULL),
 (41, 420, 'password', 'pw', NULL),
-(41, 420, 'sid', 'sid', NULL),
+(41, 420, 'site_id', 'sid', NULL),
 (41, 420, 'reward', 'verguetung', NULL),
 (41, 420, 'reload', 'reload', NULL),
-(41, 420, 'remain', 'uebrig', NULL),
+(41, 420, 'remain_clicks', 'uebrig', NULL),
 (41, 420, 'minimum_stay', 'ma', NULL),
-(41, 421, 'extra', 'art', 'forcedtextlink'),
+(41, 421, 'extra', 'art', 'forced_textlink'),
 (41, 421, 'affiliate_id', 'uid', NULL),
 (41, 421, 'password', 'pw', NULL),
-(41, 421, 'sid', 'sid', NULL),
+(41, 421, 'site_id', 'sid', NULL),
 (41, 421, 'reward', 'verguetung', NULL),
 (41, 421, 'reload', 'reload', NULL),
-(41, 421, 'remain', 'uebrig', NULL),
+(41, 421, 'remain_clicks', 'uebrig', NULL),
 (41, 421, 'minimum_stay', 'ma', NULL),
 (41, 422, 'extra', 'art', 'htmlmail'),
 (41, 422, 'affiliate_id', 'uid', NULL),
 (41, 422, 'password', 'pw', NULL),
-(41, 422, 'sid', 'sid', NULL),
+(41, 422, 'site_id', 'sid', NULL),
 (41, 422, 'reward', 'verguetung', NULL),
 (41, 422, 'reload', 'reload', NULL),
-(41, 422, 'remain', 'uebrig', NULL),
+(41, 422, 'remain_clicks', 'uebrig', NULL),
 (41, 422, 'minimum_stay', 'ma', NULL),
 (41, 423, 'extra', 'art', 'layer'),
 (41, 423, 'affiliate_id', 'uid', NULL),
 (41, 423, 'password', 'pw', NULL),
-(41, 423, 'sid', 'sid', NULL),
+(41, 423, 'site_id', 'sid', NULL),
 (41, 423, 'reward', 'verguetung', NULL),
 (41, 423, 'reload', 'reload', NULL),
-(41, 423, 'remain', 'uebrig', NULL),
+(41, 423, 'remain_clicks', 'uebrig', NULL),
 (41, 424, 'extra', 'art', 'pagepeel'),
 (41, 424, 'affiliate_id', 'uid', NULL),
 (41, 424, 'password', 'pw', NULL),
-(41, 424, 'sid', 'sid', NULL),
+(41, 424, 'site_id', 'sid', NULL),
 (41, 424, 'reward', 'verguetung', NULL),
 (41, 424, 'reload', 'reload', NULL),
-(41, 424, 'remain', 'uebrig', NULL),
+(41, 424, 'remain_clicks', 'uebrig', NULL),
 (41, 425, 'extra', 'art', 'paidmail'),
 (41, 425, 'affiliate_id', 'uid', NULL),
 (41, 425, 'password', 'pw', NULL),
-(41, 425, 'sid', 'sid', NULL),
+(41, 425, 'site_id', 'sid', NULL),
 (41, 425, 'reward', 'verguetung', NULL),
 (41, 425, 'reload', 'reload', NULL),
-(41, 425, 'remain', 'uebrig', NULL),
+(41, 425, 'remain_clicks', 'uebrig', NULL),
 (41, 425, 'minimum_stay', 'ma', NULL),
 (41, 426, 'extra', 'art', 'popup'),
 (41, 426, 'affiliate_id', 'uid', NULL),
 (41, 426, 'password', 'pw', NULL),
-(41, 426, 'sid', 'sid', NULL),
+(41, 426, 'site_id', 'sid', NULL),
 (41, 426, 'reward', 'verguetung', NULL),
 (41, 426, 'reload', 'reload', NULL),
-(41, 426, 'remain', 'uebrig', NULL),
+(41, 426, 'remain_clicks', 'uebrig', NULL),
 (41, 426, 'minimum_stay', 'ma', NULL),
 (41, 427, 'extra', 'art', 'skybannerklick'),
 (41, 427, 'affiliate_id', 'uid', NULL),
 (41, 427, 'password', 'pw', NULL),
-(41, 427, 'sid', 'sid', NULL),
+(41, 427, 'site_id', 'sid', NULL),
 (41, 427, 'reward', 'verguetung', NULL),
 (41, 427, 'reload', 'reload', NULL),
-(41, 427, 'remain', 'uebrig', NULL),
+(41, 427, 'remain_clicks', 'uebrig', NULL),
 (41, 428, 'extra', 'art', 'skybannerview'),
 (41, 428, 'affiliate_id', 'uid', NULL),
 (41, 428, 'password', 'pw', NULL),
-(41, 428, 'sid', 'sid', NULL),
+(41, 428, 'site_id', 'sid', NULL),
 (41, 428, 'reward', 'verguetung', NULL),
 (41, 428, 'reload', 'reload', NULL),
-(41, 428, 'remain', 'uebrig', NULL),
+(41, 428, 'remain_clicks', 'uebrig', NULL),
 (41, 429, 'extra', 'art', 'textlinkklick'),
 (41, 429, 'affiliate_id', 'uid', NULL),
 (41, 429, 'password', 'pw', NULL),
-(41, 429, 'sid', 'sid', NULL),
+(41, 429, 'site_id', 'sid', NULL),
 (41, 429, 'reward', 'verguetung', NULL),
 (41, 429, 'reload', 'reload', NULL),
-(41, 429, 'remain', 'uebrig', NULL),
+(41, 429, 'remain_clicks', 'uebrig', NULL),
 (41, 430, 'extra', 'art', 'traffic'),
 (41, 430, 'affiliate_id', 'uid', NULL),
 (41, 430, 'password', 'pw', NULL),
-(41, 430, 'sid', 'sid', NULL),
+(41, 430, 'site_id', 'sid', NULL),
 (41, 430, 'reward', 'verguetung', NULL),
 (41, 430, 'reload', 'reload', NULL),
-(41, 430, 'remain', 'uebrig', NULL),
+(41, 430, 'remain_clicks', 'uebrig', NULL),
 (41, 430, 'minimum_stay', 'ma', NULL)");
 
-               // Request parameters per type handler - WeltPromotion
-               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, 'affiliate_id', 'id', NULL),
-(20, 202, 'password', 'pw', NULL),
-(20, 202, 'reload', 'reload', NULL),
-(20, 202, 'remain', 'uebrig', NULL),
-(20, 202, 'reward', 'verguetung', NULL),
-(20, 203, 'extra', 'typ', 'forcedtextlink'),
-(20, 203, 'affiliate_id', 'id', NULL),
-(20, 203, 'password', 'pw', NULL),
-(20, 203, 'reload', 'reload', NULL),
-(20, 203, 'remain', 'uebrig', NULL),
-(20, 203, 'reward', 'verguetung', NULL),
-(20, 204, 'extra', 'typ', 'bannerview'),
-(20, 204, 'affiliate_id', 'id', NULL),
-(20, 204, 'password', 'pw', NULL),
-(20, 204, 'reload', 'reload', NULL),
-(20, 204, 'remain', 'uebrig', NULL),
-(20, 204, 'reward', 'verguetung', NULL),
-(20, 205, 'extra', 'typ', 'bannerklick'),
-(20, 205, 'affiliate_id', 'id', NULL),
-(20, 205, 'password', 'pw', NULL),
-(20, 205, 'reload', 'reload', NULL),
-(20, 205, 'remain', 'uebrig', NULL),
-(20, 205, 'reward', 'verguetung', NULL),
-(20, 206, 'extra', 'typ', 'skybannerview'),
-(20, 206, 'affiliate_id', 'id', NULL),
-(20, 206, 'password', 'pw', NULL),
-(20, 206, 'reload', 'reload', NULL),
-(20, 206, 'remain', 'uebrig', NULL),
-(20, 206, 'reward', 'verguetung', NULL),
-(20, 207, 'extra', 'typ', 'buttonview'),
-(20, 207, 'affiliate_id', 'id', NULL),
-(20, 207, 'password', 'pw', NULL),
-(20, 207, 'reload', 'reload', NULL),
-(20, 207, 'remain', 'uebrig', NULL),
-(20, 207, 'reward', 'verguetung', NULL),
-(20, 208, 'extra', 'typ', 'textview'),
-(20, 208, 'affiliate_id', 'id', NULL),
-(20, 208, 'password', 'pw', NULL),
-(20, 208, 'reload', 'reload', NULL),
-(20, 208, 'remain', 'uebrig', NULL),
-(20, 208, 'reward', 'verguetung', NULL),
-(20, 209, 'extra', 'typ', 'traffic'),
-(20, 209, 'affiliate_id', 'id', NULL),
-(20, 209, 'password', 'pw', NULL),
-(20, 209, 'reload', 'reload', NULL),
-(20, 209, 'remain', 'uebrig', NULL),
-(20, 209, 'reward', 'verguetung', NULL),
-(20, 210, 'extra', 'typ', 'popup'),
-(20, 210, 'affiliate_id', 'id', NULL),
-(20, 210, 'minimum_stay', 'ma', NULL),
-(20, 210, 'password', 'pw', NULL),
-(20, 210, 'reload', 'reload', NULL),
-(20, 210, 'remain', 'uebrig', NULL),
-(20, 210, 'reward', 'verguetung', NULL),
-(20, 211, 'extra', 'typ', 'paidmail'),
-(20, 211, 'affiliate_id', 'id', NULL),
-(20, 211, 'minimum_stay', 'ma', NULL),
-(20, 211, 'password', 'pw', NULL),
-(20, 211, 'reload', 'reload', NULL),
-(20, 211, 'remain', 'uebrig', NULL),
-(20, 211, 'reward', 'verguetung', NULL)");
-
                // Request parameters per type handler - UltraPROMO
                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, 'affiliate_id', 'id', NULL),
 (21, 125, 'password', 'pw', NULL),
 (21, 125, 'reload', 'reload', NULL),
-(21, 125, 'remain', 'uebrig', NULL),
+(21, 125, 'remain_clicks', 'uebrig', NULL),
 (21, 125, 'reward', 'verguetung', NULL),
 (21, 126, 'extra', 'typ', 'bannerview'),
 (21, 126, 'affiliate_id', 'id', NULL),
 (21, 126, 'password', 'pw', NULL),
 (21, 126, 'reload', 'reload', NULL),
-(21, 126, 'remain', 'uebrig', NULL),
+(21, 126, 'remain_clicks', 'uebrig', NULL),
 (21, 126, 'reward', 'verguetung', NULL),
 (21, 127, 'extra', 'typ', 'buttonview'),
 (21, 127, 'affiliate_id', 'id', NULL),
 (21, 127, 'password', 'pw', NULL),
 (21, 127, 'reload', 'reload', NULL),
-(21, 127, 'remain', 'uebrig', NULL),
+(21, 127, 'remain_clicks', 'uebrig', NULL),
 (21, 127, 'reward', 'verguetung', NULL),
-(21, 128, 'extra', 'typ', 'forcedbanner'),
+(21, 128, 'extra', 'typ', 'forced_banner'),
 (21, 128, 'affiliate_id', 'id', NULL),
 (21, 128, 'password', 'pw', NULL),
 (21, 128, 'reload', 'reload', NULL),
-(21, 128, 'remain', 'uebrig', NULL),
+(21, 128, 'remain_clicks', 'uebrig', NULL),
 (21, 128, 'reward', 'verguetung', NULL),
-(21, 129, 'extra', 'typ', 'forcedtextlink'),
+(21, 129, 'extra', 'typ', 'forced_textlink'),
 (21, 129, 'affiliate_id', 'id', NULL),
 (21, 129, 'password', 'pw', NULL),
 (21, 129, 'reload', 'reload', NULL),
-(21, 129, 'remain', 'uebrig', NULL),
+(21, 129, 'remain_clicks', 'uebrig', NULL),
 (21, 129, 'reward', 'verguetung', NULL),
 (21, 130, 'extra', 'typ', 'popup'),
 (21, 130, 'affiliate_id', 'id', NULL),
 (21, 130, 'minimum_stay', 'ma', NULL),
 (21, 130, 'password', 'pw', NULL),
 (21, 130, 'reload', 'reload', NULL),
-(21, 130, 'remain', 'uebrig', NULL),
+(21, 130, 'remain_clicks', 'uebrig', NULL),
 (21, 130, 'reward', 'verguetung', NULL),
 (21, 131, 'extra', 'typ', 'skybannerview'),
 (21, 131, 'affiliate_id', 'id', NULL),
 (21, 131, 'password', 'pw', NULL),
 (21, 131, 'reload', 'reload', NULL),
-(21, 131, 'remain', 'uebrig', NULL),
+(21, 131, 'remain_clicks', 'uebrig', NULL),
 (21, 131, 'reward', 'verguetung', NULL),
 (21, 132, 'extra', 'typ', 'textview'),
 (21, 132, 'affiliate_id', 'id', NULL),
 (21, 132, 'password', 'pw', NULL),
 (21, 132, 'reload', 'reload', NULL),
-(21, 132, 'remain', 'uebrig', NULL),
+(21, 132, 'remain_clicks', 'uebrig', NULL),
 (21, 132, 'reward', 'verguetung', NULL),
 (21, 133, 'extra', 'typ', 'paidmail'),
 (21, 133, 'affiliate_id', 'id', NULL),
 (21, 133, 'minimum_stay', 'ma', NULL),
 (21, 133, 'password', 'pw', NULL),
 (21, 133, 'reload', 'reload', NULL),
-(21, 133, 'remain', 'uebrig', NULL),
+(21, 133, 'remain_clicks', 'uebrig', NULL),
 (21, 133, 'reward', 'verguetung', NULL),
 (21, 134, 'extra', 'typ', 'traffic'),
 (21, 134, 'affiliate_id', 'id', NULL),
 (21, 134, 'password', 'pw', NULL),
 (21, 134, 'reload', 'reload', NULL),
-(21, 134, 'remain', 'uebrig', NULL),
+(21, 134, 'remain_clicks', 'uebrig', NULL),
 (21, 134, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - VIPads.de
@@ -3920,98 +4347,163 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (27, 247, 'affiliate_id', 'uid', NULL),
 (27, 247, 'password', 'pw', NULL),
 (27, 247, 'reload', 'reload', NULL),
-(27, 247, 'remain', 'uebrig', NULL),
+(27, 247, 'remain_clicks', 'uebrig', NULL),
 (27, 247, 'reward', 'verguetung', NULL),
-(27, 247, 'sid', 'sid', NULL),
+(27, 247, 'site_id', 'sid', NULL),
 (27, 248, 'extra', 'art', 'bannerview'),
 (27, 248, 'affiliate_id', 'uid', NULL),
 (27, 248, 'password', 'pw', NULL),
 (27, 248, 'reload', 'reload', NULL),
-(27, 248, 'remain', 'uebrig', NULL),
+(27, 248, 'remain_clicks', 'uebrig', NULL),
 (27, 248, 'reward', 'verguetung', NULL),
-(27, 248, 'sid', 'sid', NULL),
+(27, 248, 'site_id', 'sid', NULL),
 (27, 249, 'extra', 'art', 'buttonklick'),
 (27, 249, 'affiliate_id', 'uid', NULL),
 (27, 249, 'password', 'pw', NULL),
 (27, 249, 'reload', 'reload', NULL),
-(27, 249, 'remain', 'uebrig', NULL),
+(27, 249, 'remain_clicks', 'uebrig', NULL),
 (27, 249, 'reward', 'verguetung', NULL),
-(27, 249, 'sid', 'sid', NULL),
+(27, 249, 'site_id', 'sid', NULL),
 (27, 250, 'extra', 'art', 'buttonview'),
 (27, 250, 'affiliate_id', 'uid', NULL),
 (27, 250, 'password', 'pw', NULL),
 (27, 250, 'reload', 'reload', NULL),
-(27, 250, 'remain', 'uebrig', NULL),
+(27, 250, 'remain_clicks', 'uebrig', NULL),
 (27, 250, 'reward', 'verguetung', NULL),
-(27, 250, 'sid', 'sid', NULL),
-(27, 251, 'extra', 'art', 'forcedbanner'),
+(27, 250, 'site_id', 'sid', NULL),
+(27, 251, 'extra', 'art', 'forced_banner'),
 (27, 251, 'affiliate_id', 'uid', NULL),
 (27, 251, 'minimum_stay', 'ma', NULL),
 (27, 251, 'password', 'pw', NULL),
 (27, 251, 'reload', 'reload', NULL),
-(27, 251, 'remain', 'uebrig', NULL),
+(27, 251, 'remain_clicks', 'uebrig', NULL),
 (27, 251, 'reward', 'verguetung', NULL),
-(27, 251, 'sid', 'sid', NULL),
+(27, 251, 'site_id', 'sid', NULL),
 (27, 252, 'extra', 'art', 'htmlmail'),
 (27, 252, 'affiliate_id', 'id', NULL),
 (27, 252, 'minimum_stay', 'ma', NULL),
 (27, 252, 'password', 'pw', NULL),
 (27, 252, 'reload', 'reload', NULL),
-(27, 252, 'remain', 'uebrig', NULL),
+(27, 252, 'remain_clicks', 'uebrig', NULL),
 (27, 252, 'reward', 'verguetung', NULL),
-(27, 252, 'sid', 'sid', NULL),
+(27, 252, 'site_id', 'sid', NULL),
 (27, 253, 'extra', 'art', 'layer'),
 (27, 253, 'affiliate_id', 'uid', NULL),
 (27, 253, 'password', 'pw', NULL),
 (27, 253, 'reload', 'reload', NULL),
-(27, 253, 'remain', 'uebrig', NULL),
+(27, 253, 'remain_clicks', 'uebrig', NULL),
 (27, 253, 'reward', 'verguetung', NULL),
-(27, 253, 'sid', 'sid', NULL),
+(27, 253, 'site_id', 'sid', NULL),
 (27, 254, 'extra', 'art', 'paidmail'),
 (27, 254, 'affiliate_id', 'uid', NULL),
 (27, 254, 'minimum_stay', 'ma', NULL),
 (27, 254, 'password', 'pw', NULL),
 (27, 254, 'reload', 'reload', NULL),
-(27, 254, 'remain', 'uebrig', NULL),
+(27, 254, 'remain_clicks', 'uebrig', NULL),
 (27, 254, 'reward', 'verguetung', NULL),
-(27, 254, 'sid', 'sid', NULL),
+(27, 254, 'site_id', 'sid', NULL),
 (27, 255, 'extra', 'art', 'popup'),
 (27, 255, 'affiliate_id', 'uid', NULL),
 (27, 255, 'minimum_stay', 'ma', NULL),
 (27, 255, 'password', 'pw', NULL),
 (27, 255, 'reload', 'reload', NULL),
-(27, 255, 'remain', 'uebrig', NULL),
+(27, 255, 'remain_clicks', 'uebrig', NULL),
 (27, 255, 'reward', 'verguetung', NULL),
-(27, 255, 'sid', 'sid', NULL),
+(27, 255, 'site_id', 'sid', NULL),
 (27, 256, 'extra', 'art', 'skybannerklick'),
 (27, 256, 'affiliate_id', 'uid', NULL),
 (27, 256, 'password', 'pw', NULL),
 (27, 256, 'reload', 'reload', NULL),
-(27, 256, 'remain', 'uebrig', NULL),
+(27, 256, 'remain_clicks', 'uebrig', NULL),
 (27, 256, 'reward', 'verguetung', NULL),
-(27, 256, 'sid', 'sid', NULL),
+(27, 256, 'site_id', 'sid', NULL),
 (27, 257, 'extra', 'art', 'skybannerview'),
 (27, 257, 'affiliate_id', 'uid', NULL),
 (27, 257, 'password', 'pw', NULL),
 (27, 257, 'reload', 'reload', NULL),
-(27, 257, 'remain', 'uebrig', NULL),
+(27, 257, 'remain_clicks', 'uebrig', NULL),
 (27, 257, 'reward', 'verguetung', NULL),
-(27, 257, 'sid', 'sid', NULL),
+(27, 257, 'site_id', 'sid', NULL),
 (27, 258, 'extra', 'art', 'textlinkklick'),
 (27, 258, 'affiliate_id', 'uid', NULL),
 (27, 258, 'password', 'pw', NULL),
 (27, 258, 'reload', 'reload', NULL),
-(27, 258, 'remain', 'uebrig', NULL),
+(27, 258, 'remain_clicks', 'uebrig', NULL),
 (27, 258, 'reward', 'verguetung', NULL),
-(27, 258, 'sid', 'sid', NULL),
+(27, 258, 'site_id', 'sid', NULL),
 (27, 259, 'extra', 'art', 'traffic'),
 (27, 259, 'affiliate_id', 'uid', NULL),
 (27, 259, 'minimum_stay', 'ma', NULL),
 (27, 259, 'password', 'pw', NULL),
 (27, 259, 'reload', 'reload', NULL),
-(27, 259, 'remain', 'uebrig', NULL),
+(27, 259, 'remain_clicks', 'uebrig', NULL),
 (27, 259, 'reward', 'verguetung', NULL),
-(27, 259, 'sid', 'sid', NULL)");
+(27, 259, 'site_id', 'sid', NULL)");
+
+               // Request parameters per type handler - WeltPromotion
+               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', 'forced_banner'),
+(20, 202, 'affiliate_id', 'id', NULL),
+(20, 202, 'password', 'pw', NULL),
+(20, 202, 'reload', 'reload', NULL),
+(20, 202, 'remain_clicks', 'uebrig', NULL),
+(20, 202, 'reward', 'verguetung', NULL),
+(20, 203, 'extra', 'typ', 'forced_textlink'),
+(20, 203, 'affiliate_id', 'id', NULL),
+(20, 203, 'password', 'pw', NULL),
+(20, 203, 'reload', 'reload', NULL),
+(20, 203, 'remain_clicks', 'uebrig', NULL),
+(20, 203, 'reward', 'verguetung', NULL),
+(20, 204, 'extra', 'typ', 'bannerview'),
+(20, 204, 'affiliate_id', 'id', NULL),
+(20, 204, 'password', 'pw', NULL),
+(20, 204, 'reload', 'reload', NULL),
+(20, 204, 'remain_clicks', 'uebrig', NULL),
+(20, 204, 'reward', 'verguetung', NULL),
+(20, 205, 'extra', 'typ', 'bannerklick'),
+(20, 205, 'affiliate_id', 'id', NULL),
+(20, 205, 'password', 'pw', NULL),
+(20, 205, 'reload', 'reload', NULL),
+(20, 205, 'remain_clicks', 'uebrig', NULL),
+(20, 205, 'reward', 'verguetung', NULL),
+(20, 206, 'extra', 'typ', 'skybannerview'),
+(20, 206, 'affiliate_id', 'id', NULL),
+(20, 206, 'password', 'pw', NULL),
+(20, 206, 'reload', 'reload', NULL),
+(20, 206, 'remain_clicks', 'uebrig', NULL),
+(20, 206, 'reward', 'verguetung', NULL),
+(20, 207, 'extra', 'typ', 'buttonview'),
+(20, 207, 'affiliate_id', 'id', NULL),
+(20, 207, 'password', 'pw', NULL),
+(20, 207, 'reload', 'reload', NULL),
+(20, 207, 'remain_clicks', 'uebrig', NULL),
+(20, 207, 'reward', 'verguetung', NULL),
+(20, 208, 'extra', 'typ', 'textview'),
+(20, 208, 'affiliate_id', 'id', NULL),
+(20, 208, 'password', 'pw', NULL),
+(20, 208, 'reload', 'reload', NULL),
+(20, 208, 'remain_clicks', 'uebrig', NULL),
+(20, 208, 'reward', 'verguetung', NULL),
+(20, 209, 'extra', 'typ', 'traffic'),
+(20, 209, 'affiliate_id', 'id', NULL),
+(20, 209, 'password', 'pw', NULL),
+(20, 209, 'reload', 'reload', NULL),
+(20, 209, 'remain_clicks', 'uebrig', NULL),
+(20, 209, 'reward', 'verguetung', NULL),
+(20, 210, 'extra', 'typ', 'popup'),
+(20, 210, 'affiliate_id', 'id', NULL),
+(20, 210, 'minimum_stay', 'ma', NULL),
+(20, 210, 'password', 'pw', NULL),
+(20, 210, 'reload', 'reload', NULL),
+(20, 210, 'remain_clicks', 'uebrig', NULL),
+(20, 210, 'reward', 'verguetung', NULL),
+(20, 211, 'extra', 'typ', 'paidmail'),
+(20, 211, 'affiliate_id', 'id', NULL),
+(20, 211, 'minimum_stay', 'ma', NULL),
+(20, 211, 'password', 'pw', NULL),
+(20, 211, 'reload', 'reload', NULL),
+(20, 211, 'remain_clicks', 'uebrig', NULL),
+(20, 211, 'reward', 'verguetung', NULL)");
 
                // Request parameters per type handler - Der Werbepartner.cc
                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
@@ -4019,112 +4511,156 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (22, 145, 'affiliate_id', 'uid', NULL),
 (22, 145, 'password', 'pw', NULL),
 (22, 145, 'reload', 'reload', NULL),
-(22, 145, 'remain', 'offen', NULL),
+(22, 145, 'remain_clicks', 'offen', NULL),
 (22, 145, 'reward', 'verg', NULL),
-(22, 145, 'sid', 'sid', NULL),
+(22, 145, 'site_id', 'sid', NULL),
 (22, 146, 'extra', 'art', 'Forcedbanner'),
 (22, 146, 'affiliate_id', 'uid', NULL),
 (22, 146, 'password', 'pw', NULL),
 (22, 146, 'reload', 'reload', NULL),
-(22, 146, 'remain', 'offen', NULL),
+(22, 146, 'remain_clicks', 'offen', NULL),
 (22, 146, 'reward', 'verg', NULL),
-(22, 146, 'sid', 'sid', NULL),
+(22, 146, 'site_id', 'sid', NULL),
 (22, 147, 'extra', 'art', 'Paidmail'),
 (22, 147, 'affiliate_id', 'uid', NULL),
 (22, 147, 'password', 'pw', NULL),
 (22, 147, 'reload', 'reload', NULL),
-(22, 147, 'remain', 'offen', NULL),
+(22, 147, 'remain_clicks', 'offen', NULL),
 (22, 147, 'reward', 'verg', NULL),
-(22, 147, 'sid', 'sid', NULL),
+(22, 147, 'site_id', 'sid', NULL),
 (22, 148, 'extra', 'art', 'Layer'),
 (22, 148, 'affiliate_id', 'uid', NULL),
 (22, 148, 'password', 'pw', NULL),
 (22, 148, 'reload', 'reload', NULL),
-(22, 148, 'remain', 'offen', NULL),
+(22, 148, 'remain_clicks', 'offen', NULL),
 (22, 148, 'reward', 'verg', NULL),
-(22, 148, 'sid', 'sid', NULL),
+(22, 148, 'site_id', 'sid', NULL),
 (22, 149, 'extra', 'art', 'Skybannerklick'),
 (22, 149, 'affiliate_id', 'uid', NULL),
 (22, 149, 'password', 'pw', NULL),
 (22, 149, 'reload', 'reload', NULL),
-(22, 149, 'remain', 'offen', NULL),
+(22, 149, 'remain_clicks', 'offen', NULL),
 (22, 149, 'reward', 'verg', NULL),
-(22, 149, 'sid', 'sid', NULL),
+(22, 149, 'site_id', 'sid', NULL),
 (22, 150, 'extra', 'art', 'Surfbarklick'),
 (22, 150, 'affiliate_id', 'uid', NULL),
 (22, 150, 'password', 'pw', NULL),
 (22, 150, 'reload', 'reload', NULL),
-(22, 150, 'remain', 'offen', NULL),
+(22, 150, 'remain_clicks', 'offen', NULL),
 (22, 150, 'reward', 'verg', NULL),
-(22, 150, 'sid', 'sid', NULL),
+(22, 150, 'site_id', 'sid', NULL),
 (22, 151, 'extra', 'art', 'Bannerview'),
 (22, 151, 'affiliate_id', 'uid', NULL),
 (22, 151, 'password', 'pw', NULL),
 (22, 151, 'reload', 'reload', NULL),
-(22, 151, 'remain', 'offen', NULL),
+(22, 151, 'remain_clicks', 'offen', NULL),
 (22, 151, 'reward', 'verg', NULL),
-(22, 151, 'sid', 'sid', NULL),
+(22, 151, 'site_id', 'sid', NULL),
 (22, 152, 'extra', 'art', 'PopUp'),
 (22, 152, 'affiliate_id', 'uid', NULL),
 (22, 152, 'password', 'pw', NULL),
 (22, 152, 'reload', 'reload', NULL),
-(22, 152, 'remain', 'offen', NULL),
+(22, 152, 'remain_clicks', 'offen', NULL),
 (22, 152, 'reward', 'verg', NULL),
-(22, 152, 'sid', 'sid', NULL),
+(22, 152, 'site_id', 'sid', NULL),
 (22, 153, 'extra', 'art', 'Bannerklick'),
 (22, 153, 'affiliate_id', 'uid', NULL),
 (22, 153, 'password', 'pw', NULL),
 (22, 153, 'reload', 'reload', NULL),
 (22, 153, 'reward', 'verg', NULL),
-(22, 153, 'sid', 'sid', NULL),
+(22, 153, 'site_id', 'sid', NULL),
 (22, 153, 'type', 'offen', NULL),
 (22, 154, 'extra', 'art', 'Forcedtextlink'),
 (22, 154, 'affiliate_id', 'uid', NULL),
 (22, 154, 'password', 'pw', NULL),
 (22, 154, 'reload', 'reload', NULL),
-(22, 154, 'remain', 'offen', NULL),
+(22, 154, 'remain_clicks', 'offen', NULL),
 (22, 154, 'reward', 'verg', NULL),
-(22, 154, 'sid', 'sid', NULL),
+(22, 154, 'site_id', 'sid', NULL),
 (22, 155, 'extra', 'art', 'Traffic'),
 (22, 155, 'affiliate_id', 'id', NULL),
 (22, 155, 'password', 'pw', NULL),
 (22, 155, 'reload', 'reload', NULL),
-(22, 155, 'remain', 'offen', NULL),
+(22, 155, 'remain_clicks', 'offen', NULL),
 (22, 155, 'reward', 'verg', NULL),
-(22, 155, 'sid', 'sid', NULL)");
-
-               // Request parameters per type handler - Xiji.de
+(22, 155, 'site_id', 'sid', NULL)");
 
                // Request parameters per type handler - Xiji.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
+(43, 450, 'affiliate_id', 'id', NULL),
+(43, 450, 'password', 'pw', NULL),
+(43, 450, 'reward', 'verguetung', NULL),
+(43, 450, 'remain_clicks', 'uebrig', NULL),
+(43, 450, 'minimum_stay', 'ma', NULL),
+(43, 450, 'site_id', 'aid', NULL),
 (43, 451, 'affiliate_id', 'id', NULL),
 (43, 451, 'password', 'pw', NULL),
 (43, 451, 'reload', 'reload', NULL),
 (43, 451, 'reward', 'verguetung', NULL),
-(43, 451, 'remain', 'uebrig', NULL),
+(43, 451, 'remain_clicks', 'uebrig', NULL),
 (43, 451, 'size', 'typ', '468x60'),
-(43, 451, 'sid', 'aid', NULL),
+(43, 451, 'site_id', 'aid', NULL),
+(43, 452, 'affiliate_id', 'id', NULL),
+(43, 452, 'password', 'pw', NULL),
+(43, 452, 'reload', 'reload', NULL),
+(43, 452, 'reward', 'verguetung', NULL),
+(43, 452, 'remain_clicks', 'uebrig', NULL),
+(43, 452, 'minimum_stay', 'ma', NULL),
+(43, 452, 'site_id', 'aid', NULL),
+(43, 453, 'affiliate_id', 'id', NULL),
+(43, 453, 'password', 'pw', NULL),
+(43, 453, 'reload', 'reload', NULL),
+(43, 453, 'reward', 'verguetung', NULL),
+(43, 453, 'remain_clicks', 'uebrig', NULL),
+(43, 453, 'minimum_stay', 'ma', NULL),
+(43, 453, 'site_id', 'aid', NULL),
+(43, 454, 'affiliate_id', 'id', NULL),
+(43, 454, 'password', 'pw', NULL),
+(43, 454, 'reload', 'reload', NULL),
+(43, 454, 'reward', 'verguetung', NULL),
+(43, 454, 'remain_clicks', 'uebrig', NULL),
+(43, 454, 'site_id', 'aid', NULL),
+(43, 455, 'affiliate_id', 'id', NULL),
+(43, 455, 'password', 'pw', NULL),
+(43, 455, 'reload', 'reload', NULL),
+(43, 455, 'reward', 'verguetung', NULL),
+(43, 455, 'remain_clicks', 'uebrig', NULL),
+(43, 455, 'minimum_stay', 'ma', NULL),
+(43, 455, 'site_id', 'aid', NULL),
+(43, 456, 'affiliate_id', 'id', NULL),
+(43, 456, 'password', 'pw', NULL),
+(43, 456, 'reload', 'reload', NULL),
+(43, 456, 'reward', 'verguetung', NULL),
+(43, 456, 'remain_clicks', 'uebrig', NULL),
+(43, 456, 'site_id', 'aid', NULL),
+(43, 457, 'affiliate_id', 'id', NULL),
+(43, 457, 'password', 'pw', NULL),
+(43, 457, 'reload', 'reload', NULL),
+(43, 457, 'reward', 'verguetung', NULL),
+(43, 457, 'remain_clicks', 'uebrig', NULL),
+(43, 457, 'minimum_stay', 'ma', NULL),
+(43, 457, 'site_id', 'aid', NULL),
 (43, 458, 'affiliate_id', 'id', NULL),
 (43, 458, 'password', 'pw', NULL),
 (43, 458, 'reload', 'reload', NULL),
 (43, 458, 'reward', 'verguetung', NULL),
-(43, 458, 'remain', 'uebrig', NULL),
+(43, 458, 'remain_clicks', 'uebrig', NULL),
 (43, 458, 'size', 'typ', '88x31'),
-(43, 458, 'sid', 'aid', NULL),
+(43, 458, 'site_id', 'aid', NULL),
 (43, 459, 'affiliate_id', 'id', NULL),
 (43, 459, 'password', 'pw', NULL),
 (43, 459, 'reload', 'reload', NULL),
 (43, 459, 'reward', 'verguetung', NULL),
-(43, 459, 'remain', 'uebrig', NULL),
+(43, 459, 'remain_clicks', 'uebrig', NULL),
 (43, 459, 'size', 'typ', '120x600'),
-(43, 459, 'sid', 'aid', NULL),
+(43, 459, 'site_id', 'aid', NULL),
 (43, 460, 'affiliate_id', 'id', NULL),
 (43, 460, 'password', 'pw', NULL),
 (43, 460, 'reload', 'reload', NULL),
 (43, 460, 'reward', 'verguetung', NULL),
-(43, 460, 'remain', 'uebrig', NULL),
+(43, 460, 'remain_clicks', 'uebrig', NULL),
 (43, 460, 'size', 'typ', '234x60'),
-(43, 460, 'sid', 'aid', NULL)");
+(43, 460, 'site_id', 'aid', NULL)");
 
                // Request parameters per type handler - Yoo!Media
                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
@@ -4132,86 +4668,167 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (23, 156, 'affiliate_id', 'id', NULL),
 (23, 156, 'password', 'pw', NULL),
 (23, 156, 'reload', 'reload', NULL),
-(23, 156, 'remain', 'uebrig', NULL),
+(23, 156, 'remain_clicks', 'uebrig', NULL),
 (23, 156, 'reward', 'verguetung', NULL),
-(23, 156, 'sid', 'sid', NULL),
 (23, 156, 'size', 'size', '468x60'),
 (23, 157, 'erotic', 'erotik', NULL),
 (23, 157, 'affiliate_id', 'id', NULL),
 (23, 157, 'password', 'pw', NULL),
 (23, 157, 'reload', 'reload', NULL),
-(23, 157, 'remain', 'uebrig', NULL),
+(23, 157, 'remain_clicks', 'uebrig', NULL),
 (23, 157, 'reward', 'verguetung', NULL),
-(23, 157, 'sid', 'sid', NULL),
 (23, 158, 'erotic', 'erotik', NULL),
 (23, 158, 'affiliate_id', 'id', NULL),
 (23, 158, 'password', 'pw', NULL),
 (23, 158, 'reload', 'reload', NULL),
-(23, 158, 'remain', 'uebrig', NULL),
+(23, 158, 'remain_clicks', 'uebrig', NULL),
 (23, 158, 'reward', 'verguetung', NULL),
-(23, 158, 'sid', 'sid', NULL),
-(23, 158, 'size', 'size', '468x60'),
+(23, 158, 'size', 'size', 'all'),
 (23, 159, 'erotic', 'erotik', NULL),
 (23, 159, 'affiliate_id', 'id', NULL),
 (23, 159, 'minimum_stay', 'ma', NULL),
 (23, 159, 'password', 'pw', NULL),
 (23, 159, 'reload', 'reload', NULL),
-(23, 159, 'remain', 'uebrig', NULL),
+(23, 159, 'remain_clicks', 'uebrig', NULL),
 (23, 159, 'reward', 'verguetung', NULL),
-(23, 159, 'sid', 'sid', NULL),
 (23, 159, 'size', 'size', '468x60'),
 (23, 160, 'erotic', 'erotik', NULL),
 (23, 160, 'affiliate_id', 'id', NULL),
 (23, 160, 'password', 'pw', NULL),
 (23, 160, 'reload', 'reload', NULL),
-(23, 160, 'remain', 'uebrig', NULL),
+(23, 160, 'remain_clicks', 'uebrig', NULL),
 (23, 160, 'reward', 'verguetung', NULL),
-(23, 160, 'sid', 'sid', NULL),
 (23, 161, 'erotic', 'erotik', NULL),
 (23, 161, 'affiliate_id', 'id', NULL),
 (23, 161, 'minimum_stay', 'ma', NULL),
 (23, 161, 'password', 'pw', NULL),
 (23, 161, 'reload', 'reload', NULL),
-(23, 161, 'remain', 'uebrig', NULL),
+(23, 161, 'remain_clicks', 'uebrig', NULL),
 (23, 161, 'reward', 'verguetung', NULL),
-(23, 161, 'sid', 'sid', NULL),
 (23, 162, 'erotic', 'erotik', NULL),
 (23, 162, 'affiliate_id', 'id', NULL),
 (23, 162, 'minimum_stay', 'ma', NULL),
 (23, 162, 'password', 'pw', NULL),
 (23, 162, 'reload', 'reload', NULL),
-(23, 162, 'remain', 'uebrig', NULL),
+(23, 162, 'remain_clicks', 'uebrig', NULL),
 (23, 162, 'reward', 'verguetung', NULL),
-(23, 162, 'sid', 'sid', NULL),
 (23, 163, 'erotic', 'erotik', NULL),
 (23, 163, 'affiliate_id', 'id', NULL),
 (23, 163, 'password', 'pw', NULL),
 (23, 163, 'reload', 'reload', NULL),
-(23, 163, 'remain', 'uebrig', NULL),
+(23, 163, 'remain_clicks', 'uebrig', NULL),
 (23, 163, 'reward', 'verguetung', NULL),
-(23, 163, 'sid', 'sid', NULL),
 (23, 164, 'erotic', 'erotik', NULL),
 (23, 164, 'affiliate_id', 'id', NULL),
 (23, 164, 'minimum_stay', 'ma', NULL),
 (23, 164, 'password', 'pw', NULL),
 (23, 164, 'reload', 'reload', NULL),
-(23, 164, 'remain', 'uebrig', NULL),
+(23, 164, 'remain_clicks', 'uebrig', NULL),
 (23, 164, 'reward', 'verguetung', NULL),
-(23, 164, 'sid', 'sid', NULL),
 (23, 165, 'erotic', 'erotik', NULL),
 (23, 165, 'affiliate_id', 'id', NULL),
 (23, 165, 'minimum_stay', 'ma', NULL),
 (23, 165, 'password', 'pw', NULL),
 (23, 165, 'reload', 'reload', NULL),
-(23, 165, 'remain', 'uebrig', NULL),
+(23, 165, 'remain_clicks', 'uebrig', NULL),
 (23, 165, 'reward', 'verguetung', NULL),
-(23, 165, 'sid', 'sid', NULL),
 (23, 166, 'erotic', 'erotik', NULL),
 (23, 166, 'affiliate_id', 'id', NULL),
 (23, 166, 'password', 'pw', NULL),
-(23, 166, 'remain', 'uebrig', NULL),
+(23, 166, 'remain_clicks', 'uebrig', NULL),
 (23, 166, 'reward', 'verguetung', NULL),
-(23, 166, 'sid', 'sid', NULL)");
+(23, 525, 'erotic', 'erotik', NULL),
+(23, 525, 'affiliate_id', 'id', NULL),
+(23, 525, 'password', 'pw', NULL),
+(23, 525, 'reload', 'reload', NULL),
+(23, 525, 'remain_clicks', 'uebrig', NULL),
+(23, 525, 'reward', 'verguetung', NULL),
+(23, 525, 'size', 'size', '88x31'),
+(23, 526, 'erotic', 'erotik', NULL),
+(23, 526, 'affiliate_id', 'id', NULL),
+(23, 526, 'password', 'pw', NULL),
+(23, 526, 'reload', 'reload', NULL),
+(23, 526, 'remain_clicks', 'uebrig', NULL),
+(23, 526, 'reward', 'verguetung', NULL),
+(23, 526, 'size', 'size', '234x60'),
+(23, 527, 'erotic', 'erotik', NULL),
+(23, 527, 'affiliate_id', 'id', NULL),
+(23, 527, 'password', 'pw', NULL),
+(23, 527, 'reload', 'reload', NULL),
+(23, 527, 'remain_clicks', 'uebrig', NULL),
+(23, 527, 'reward', 'verguetung', NULL),
+(23, 527, 'size', 'size', '120x600'),
+(23, 528, 'erotic', 'erotik', NULL),
+(23, 528, 'affiliate_id', 'id', NULL),
+(23, 528, 'minimum_stay', 'ma', NULL),
+(23, 528, 'password', 'pw', NULL),
+(23, 528, 'reload', 'reload', NULL),
+(23, 528, 'remain_clicks', 'uebrig', NULL),
+(23, 528, 'reward', 'verguetung', NULL),
+(23, 528, 'size', 'size', '88x31'),
+(23, 529, 'erotic', 'erotik', NULL),
+(23, 529, 'affiliate_id', 'id', NULL),
+(23, 529, 'minimum_stay', 'ma', NULL),
+(23, 529, 'password', 'pw', NULL),
+(23, 529, 'reload', 'reload', NULL),
+(23, 529, 'remain_clicks', 'uebrig', NULL),
+(23, 529, 'reward', 'verguetung', NULL),
+(23, 529, 'size', 'size', '234x60'),
+(23, 530, 'erotic', 'erotik', NULL),
+(23, 530, 'affiliate_id', 'id', NULL),
+(23, 530, 'minimum_stay', 'ma', NULL),
+(23, 530, 'password', 'pw', NULL),
+(23, 530, 'reload', 'reload', NULL),
+(23, 530, 'remain_clicks', 'uebrig', NULL),
+(23, 530, 'reward', 'verguetung', NULL),
+(23, 530, 'size', 'size', '120x600'),
+(23, 531, 'erotic', 'erotik', NULL),
+(23, 531, 'affiliate_id', 'id', NULL),
+(23, 531, 'password', 'pw', NULL),
+(23, 531, 'reload', 'reload', NULL),
+(23, 531, 'remain_clicks', 'uebrig', NULL),
+(23, 531, 'reward', 'verguetung', NULL),
+(23, 531, 'size', 'size', '468x60'),
+(23, 532, 'erotic', 'erotik', NULL),
+(23, 532, 'affiliate_id', 'id', NULL),
+(23, 532, 'password', 'pw', NULL),
+(23, 532, 'reload', 'reload', NULL),
+(23, 532, 'remain_clicks', 'uebrig', NULL),
+(23, 532, 'reward', 'verguetung', NULL),
+(23, 532, 'size', 'size', '88x31'),
+(23, 533, 'erotic', 'erotik', NULL),
+(23, 533, 'affiliate_id', 'id', NULL),
+(23, 533, 'password', 'pw', NULL),
+(23, 533, 'reload', 'reload', NULL),
+(23, 533, 'remain_clicks', 'uebrig', NULL),
+(23, 533, 'reward', 'verguetung', NULL),
+(23, 533, 'size', 'size', '234x60'),
+(23, 534, 'erotic', 'erotik', NULL),
+(23, 534, 'affiliate_id', 'id', NULL),
+(23, 534, 'password', 'pw', NULL),
+(23, 534, 'reload', 'reload', NULL),
+(23, 534, 'remain_clicks', 'uebrig', NULL),
+(23, 534, 'reward', 'verguetung', NULL),
+(23, 534, 'size', 'size', '120x600'),
+(23, 535, 'erotic', 'erotik', NULL),
+(23, 535, 'affiliate_id', 'id', NULL),
+(23, 535, 'password', 'pw', NULL),
+(23, 535, 'reload', 'reload', NULL),
+(23, 535, 'remain_clicks', 'uebrig', NULL),
+(23, 535, 'reward', 'verguetung', NULL),
+(23, 535, 'size', 'size', 'all'),
+(23, 536, 'erotic', 'erotik', NULL),
+(23, 536, 'affiliate_id', 'id', NULL),
+(23, 536, 'password', 'pw', NULL),
+(23, 536, 'reload', 'reload', NULL),
+(23, 536, 'remain_clicks', 'uebrig', NULL),
+(23, 536, 'reward', 'verguetung', NULL),
+(23, 537, 'erotic', 'erotik', NULL),
+(23, 537, 'affiliate_id', 'id', NULL),
+(23, 537, 'password', 'pw', NULL),
+(23, 537, 'reload', 'reload', NULL),
+(23, 537, 'remain_clicks', 'uebrig', NULL),
+(23, 537, 'reward', 'verguetung', NULL)");
 
                // API array elements - A3H
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES
@@ -5016,7 +5633,7 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (30, 'network_key', 'pass', NULL),
 (30, 'payment', 'verguetung', NULL),
 (30, 'remote_address', 'ip', NULL),
-(30, 'sid', 'kampagnenid', NULL),
+(30, 'site_id', 'kampagnenid', NULL),
 (30, 'type', 'werbeart', NULL),
 (30, 'network_name', 'sponsor', NULL),
 (30, 'extra_value1', 'v1', NULL),
@@ -5046,7 +5663,7 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 
                // Vcheck request parameters - Admono.de
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_vcheck_params` (`network_id`, `network_vcheck_param_key`, `network_vcheck_param_value`, `network_vcheck_param_default`) VALUES
-(36, 'sid', 'sid', '%sid%'),
+(36, 'site_id', 'sid', '%sid%'),
 (36, 'type', 'werbeart', '%werbeart%'),
 (36, 'remote_address', 'ip', '%ip%'),
 (36, 'status', 'status', '%status%'),
@@ -5057,7 +5674,7 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 
                // Vcheck request parameters - AllAds4You
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_vcheck_params` (`network_id`, `network_vcheck_param_key`, `network_vcheck_param_value`, `network_vcheck_param_default`) VALUES
-(10, 'sid', 'sid', '%sid%'),
+(10, 'site_id', 'sid', '%sid%'),
 (10, 'type', 'werbeart', '%werbeart%'),
 (10, 'remote_address', 'ip', '%ip%'),
 (10, 'status', 'status', '%status%'),
@@ -5090,7 +5707,7 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 
                // Vcheck request parameters - mega-ad.de
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_vcheck_params` (`network_id`, `network_vcheck_param_key`, `network_vcheck_param_value`, `network_vcheck_param_default`) VALUES
-(17, 'sid', 'sid', '%sid%'),
+(17, 'site_id', 'sid', '%sid%'),
 (17, 'type', 'werbeart', '%werbeart%'),
 (17, 'remote_address', 'ip', '%ip%'),
 (17, 'status', 'status', '%status%'),
@@ -5681,7 +6298,61 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (9, 449, 2, 2),
 (9, 449, 6, 3),
 (9, 449, 26, 4),
-(9, 449, 4, 5)");
+(9, 449, 4, 5),
+(9, 500, 1, 1),
+(9, 500, 2, 2),
+(9, 500, 6, 3),
+(9, 500, 5, 4),
+(9, 500, 7, 5),
+(9, 500, 4, 6),
+(9, 501, 1, 1),
+(9, 501, 2, 2),
+(9, 501, 6, 3),
+(9, 501, 5, 4),
+(9, 501, 7, 5),
+(9, 501, 4, 6),
+(9, 502, 1, 1),
+(9, 502, 2, 2),
+(9, 502, 6, 3),
+(9, 502, 5, 4),
+(9, 502, 7, 5),
+(9, 502, 4, 6),
+(9, 503, 1, 1),
+(9, 503, 2, 2),
+(9, 503, 6, 3),
+(9, 503, 5, 4),
+(9, 503, 7, 5),
+(9, 503, 4, 6),
+(9, 504, 1, 1),
+(9, 504, 2, 2),
+(9, 504, 6, 3),
+(9, 504, 5, 4),
+(9, 504, 7, 5),
+(9, 504, 4, 6),
+(9, 505, 1, 1),
+(9, 505, 2, 2),
+(9, 505, 6, 3),
+(9, 505, 5, 4),
+(9, 505, 7, 5),
+(9, 505, 4, 6),
+(9, 506, 1, 1),
+(9, 506, 2, 2),
+(9, 506, 6, 3),
+(9, 506, 5, 4),
+(9, 506, 7, 5),
+(9, 506, 4, 6),
+(9, 507, 1, 1),
+(9, 507, 2, 2),
+(9, 507, 6, 3),
+(9, 507, 5, 4),
+(9, 507, 7, 5),
+(9, 507, 4, 6),
+(9, 508, 1, 1),
+(9, 508, 2, 2),
+(9, 508, 6, 3),
+(9, 508, 5, 4),
+(9, 508, 7, 5),
+(9, 508, 4, 6)");
 
                // API array elements - AllAds4You
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES
@@ -5869,42 +6540,6 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 
                // API array elements - BonusSponsor
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES
-(12, 50, 7, 1),
-(12, 50, 2, 2),
-(12, 50, 3, 3),
-(12, 50, 4, 4),
-(12, 50, 5, 5),
-(12, 50, 6, 6),
-(12, 50, 8, 7),
-(12, 50, 10, 8),
-(12, 52, 11, 1),
-(12, 52, 2, 2),
-(12, 52, 9, 3),
-(12, 52, 4, 4),
-(12, 52, 5, 5),
-(12, 52, 6, 6),
-(12, 54, 7, 1),
-(12, 54, 2, 2),
-(12, 54, 3, 3),
-(12, 54, 4, 4),
-(12, 54, 5, 5),
-(12, 54, 6, 6),
-(12, 54, 10, 7),
-(12, 54, 8, 8),
-(12, 55, 13, 1),
-(12, 55, 2, 2),
-(12, 55, 4, 3),
-(12, 55, 5, 4),
-(12, 55, 6, 5),
-(12, 55, 10, 6),
-(12, 55, 9, 7),
-(12, 56, 13, 1),
-(12, 56, 2, 2),
-(12, 56, 4, 3),
-(12, 56, 5, 4),
-(12, 56, 6, 5),
-(12, 56, 10, 6),
-(12, 56, 9, 7),
 (12, 62, 18, 1),
 (12, 62, 2, 2),
 (12, 62, 6, 3),
@@ -6933,89 +7568,6 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (41, 430, 6, 5),
 (41, 430, 10, 6)");
 
-               // API array elements - WeltPromotion
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES
-(20, 200, 6, 5),
-(20, 202, 1, 1),
-(20, 202, 2, 2),
-(20, 202, 4, 3),
-(20, 202, 5, 4),
-(20, 202, 6, 5),
-(20, 202, 10, 6),
-(20, 202, 9, 7),
-(20, 202, 27, 8),
-(20, 203, 1, 1),
-(20, 203, 2, 2),
-(20, 203, 4, 3),
-(20, 203, 5, 4),
-(20, 203, 6, 5),
-(20, 203, 10, 6),
-(20, 203, 9, 7),
-(20, 203, 27, 8),
-(20, 204, 1, 1),
-(20, 204, 2, 2),
-(20, 204, 4, 3),
-(20, 204, 5, 4),
-(20, 204, 6, 5),
-(20, 204, 10, 6),
-(20, 204, 9, 7),
-(20, 204, 27, 8),
-(20, 205, 1, 1),
-(20, 205, 2, 2),
-(20, 205, 4, 3),
-(20, 205, 5, 4),
-(20, 205, 6, 5),
-(20, 205, 10, 6),
-(20, 205, 9, 7),
-(20, 205, 27, 8),
-(20, 206, 1, 1),
-(20, 206, 2, 2),
-(20, 206, 4, 3),
-(20, 206, 5, 4),
-(20, 206, 10, 6),
-(20, 206, 9, 7),
-(20, 206, 27, 8),
-(20, 207, 1, 1),
-(20, 207, 2, 2),
-(20, 207, 4, 3),
-(20, 207, 5, 4),
-(20, 207, 6, 5),
-(20, 207, 10, 6),
-(20, 207, 9, 7),
-(20, 207, 27, 8),
-(20, 208, 1, 1),
-(20, 208, 2, 2),
-(20, 208, 4, 3),
-(20, 208, 5, 4),
-(20, 208, 6, 5),
-(20, 208, 10, 6),
-(20, 208, 9, 7),
-(20, 208, 27, 8),
-(20, 209, 1, 1),
-(20, 209, 2, 2),
-(20, 209, 4, 3),
-(20, 209, 5, 4),
-(20, 209, 6, 5),
-(20, 209, 10, 6),
-(20, 209, 9, 7),
-(20, 209, 27, 8),
-(20, 210, 1, 1),
-(20, 210, 2, 2),
-(20, 210, 4, 3),
-(20, 210, 5, 4),
-(20, 210, 6, 5),
-(20, 210, 10, 6),
-(20, 210, 9, 7),
-(20, 210, 27, 8),
-(20, 211, 1, 1),
-(20, 211, 2, 2),
-(20, 211, 4, 3),
-(20, 211, 5, 4),
-(20, 211, 6, 5),
-(20, 211, 10, 6),
-(20, 211, 9, 7),
-(20, 211, 27, 8)");
-
                // API array elements - UltraPOMO
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES
 (21, 125, 1, 1),
@@ -7023,54 +7575,64 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (21, 125, 4, 3),
 (21, 125, 5, 4),
 (21, 125, 6, 5),
+(21, 125, 41, 6),
 (21, 126, 1, 1),
 (21, 126, 2, 2),
 (21, 126, 4, 3),
 (21, 126, 5, 4),
 (21, 126, 6, 5),
+(21, 126, 41, 6),
 (21, 127, 1, 1),
 (21, 127, 2, 2),
 (21, 127, 4, 3),
 (21, 127, 5, 4),
 (21, 127, 6, 5),
+(21, 127, 41, 6),
 (21, 128, 1, 1),
 (21, 128, 2, 2),
 (21, 128, 4, 3),
 (21, 128, 5, 4),
 (21, 128, 6, 5),
+(21, 128, 41, 6),
 (21, 129, 1, 1),
 (21, 129, 2, 2),
 (21, 129, 4, 3),
 (21, 129, 5, 4),
 (21, 129, 6, 5),
+(21, 129, 41, 6),
 (21, 130, 1, 1),
 (21, 130, 2, 2),
 (21, 130, 4, 3),
 (21, 130, 5, 4),
 (21, 130, 6, 5),
-(21, 130, 10, 6),
+(21, 130, 10, 7),
+(21, 130, 41, 6),
 (21, 131, 1, 1),
 (21, 131, 2, 2),
 (21, 131, 4, 3),
 (21, 131, 5, 4),
 (21, 131, 6, 5),
+(21, 131, 41, 6),
 (21, 132, 1, 1),
 (21, 132, 2, 2),
 (21, 132, 4, 3),
 (21, 132, 5, 4),
 (21, 132, 6, 5),
+(21, 132, 41, 6),
 (21, 133, 1, 1),
 (21, 133, 2, 2),
 (21, 133, 4, 3),
 (21, 133, 5, 4),
 (21, 133, 6, 5),
 (21, 133, 10, 6),
+(21, 133, 41, 7),
 (21, 133, 9, 7),
 (21, 134, 1, 1),
 (21, 134, 2, 2),
 (21, 134, 4, 3),
 (21, 134, 5, 4),
-(21, 134, 6, 5)");
+(21, 134, 6, 5),
+(21, 134, 41, 6)");
 
                // API array elements - VIPads
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES
@@ -7150,6 +7712,89 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (27, 259, 6, 5),
 (27, 259, 10, 6)");
 
+               // API array elements - WeltPromotion
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES
+(20, 200, 6, 5),
+(20, 202, 1, 1),
+(20, 202, 2, 2),
+(20, 202, 4, 3),
+(20, 202, 5, 4),
+(20, 202, 6, 5),
+(20, 202, 10, 6),
+(20, 202, 9, 7),
+(20, 202, 27, 8),
+(20, 203, 1, 1),
+(20, 203, 2, 2),
+(20, 203, 4, 3),
+(20, 203, 5, 4),
+(20, 203, 6, 5),
+(20, 203, 10, 6),
+(20, 203, 9, 7),
+(20, 203, 27, 8),
+(20, 204, 1, 1),
+(20, 204, 2, 2),
+(20, 204, 4, 3),
+(20, 204, 5, 4),
+(20, 204, 6, 5),
+(20, 204, 10, 6),
+(20, 204, 9, 7),
+(20, 204, 27, 8),
+(20, 205, 1, 1),
+(20, 205, 2, 2),
+(20, 205, 4, 3),
+(20, 205, 5, 4),
+(20, 205, 6, 5),
+(20, 205, 10, 6),
+(20, 205, 9, 7),
+(20, 205, 27, 8),
+(20, 206, 1, 1),
+(20, 206, 2, 2),
+(20, 206, 4, 3),
+(20, 206, 5, 4),
+(20, 206, 10, 6),
+(20, 206, 9, 7),
+(20, 206, 27, 8),
+(20, 207, 1, 1),
+(20, 207, 2, 2),
+(20, 207, 4, 3),
+(20, 207, 5, 4),
+(20, 207, 6, 5),
+(20, 207, 10, 6),
+(20, 207, 9, 7),
+(20, 207, 27, 8),
+(20, 208, 1, 1),
+(20, 208, 2, 2),
+(20, 208, 4, 3),
+(20, 208, 5, 4),
+(20, 208, 6, 5),
+(20, 208, 10, 6),
+(20, 208, 9, 7),
+(20, 208, 27, 8),
+(20, 209, 1, 1),
+(20, 209, 2, 2),
+(20, 209, 4, 3),
+(20, 209, 5, 4),
+(20, 209, 6, 5),
+(20, 209, 10, 6),
+(20, 209, 9, 7),
+(20, 209, 27, 8),
+(20, 210, 1, 1),
+(20, 210, 2, 2),
+(20, 210, 4, 3),
+(20, 210, 5, 4),
+(20, 210, 6, 5),
+(20, 210, 10, 6),
+(20, 210, 9, 7),
+(20, 210, 27, 8),
+(20, 211, 1, 1),
+(20, 211, 2, 2),
+(20, 211, 4, 3),
+(20, 211, 5, 4),
+(20, 211, 6, 5),
+(20, 211, 10, 6),
+(20, 211, 9, 7),
+(20, 211, 27, 8)");
+
                // API array elements - Der Werbepartner.cc
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES
 (22, 145, 1, 1),
@@ -7303,7 +7948,109 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
 (23, 166, 2, 2),
 (23, 166, 5, 3),
 (23, 166, 6, 4),
-(23, 166, 9, 5)");
+(23, 166, 9, 5),
+(23, 525, 1, 1),
+(23, 525, 2, 2),
+(23, 525, 3, 3),
+(23, 525, 4, 4),
+(23, 525, 5, 5),
+(23, 525, 6, 6),
+(23, 525, 7, 7),
+(23, 525, 8, 8),
+(23, 526, 1, 1),
+(23, 526, 2, 2),
+(23, 526, 3, 3),
+(23, 526, 4, 4),
+(23, 526, 5, 5),
+(23, 526, 6, 6),
+(23, 526, 7, 7),
+(23, 526, 8, 8),
+(23, 527, 1, 1),
+(23, 527, 2, 2),
+(23, 527, 3, 3),
+(23, 527, 4, 4),
+(23, 527, 5, 5),
+(23, 527, 6, 6),
+(23, 527, 7, 7),
+(23, 527, 8, 8),
+(23, 528, 1, 1),
+(23, 528, 2, 2),
+(23, 528, 3, 3),
+(23, 528, 4, 4),
+(23, 528, 5, 5),
+(23, 528, 6, 6),
+(23, 528, 10, 7),
+(23, 528, 7, 8),
+(23, 528, 8, 9),
+(23, 529, 1, 1),
+(23, 529, 2, 2),
+(23, 529, 3, 3),
+(23, 529, 4, 4),
+(23, 529, 5, 5),
+(23, 529, 6, 6),
+(23, 529, 10, 7),
+(23, 529, 7, 8),
+(23, 529, 8, 9),
+(23, 530, 1, 1),
+(23, 530, 2, 2),
+(23, 530, 3, 3),
+(23, 530, 4, 4),
+(23, 530, 5, 5),
+(23, 530, 6, 6),
+(23, 530, 10, 7),
+(23, 530, 7, 8),
+(23, 530, 8, 9),
+(23, 531, 1, 1),
+(23, 531, 2, 2),
+(23, 531, 3, 3),
+(23, 531, 4, 4),
+(23, 531, 5, 5),
+(23, 531, 6, 6),
+(23, 531, 7, 7),
+(23, 531, 8, 8),
+(23, 532, 1, 1),
+(23, 532, 2, 2),
+(23, 532, 3, 3),
+(23, 532, 4, 4),
+(23, 532, 5, 5),
+(23, 532, 6, 6),
+(23, 532, 7, 7),
+(23, 532, 8, 8),
+(23, 533, 1, 1),
+(23, 533, 2, 2),
+(23, 533, 3, 3),
+(23, 533, 4, 4),
+(23, 533, 5, 5),
+(23, 533, 6, 6),
+(23, 533, 7, 7),
+(23, 533, 8, 8),
+(23, 534, 1, 1),
+(23, 534, 2, 2),
+(23, 534, 3, 3),
+(23, 534, 4, 4),
+(23, 534, 5, 5),
+(23, 534, 6, 6),
+(23, 534, 7, 7),
+(23, 534, 8, 8),
+(23, 535, 1, 1),
+(23, 535, 2, 2),
+(23, 535, 3, 3),
+(23, 535, 4, 4),
+(23, 535, 5, 5),
+(23, 535, 6, 6),
+(23, 535, 7, 7),
+(23, 535, 8, 8),
+(23, 536, 1, 1),
+(23, 536, 2, 2),
+(23, 536, 4, 3),
+(23, 536, 5, 4),
+(23, 536, 6, 5),
+(23, 536, 9, 6),
+(23, 537, 1, 1),
+(23, 537, 2, 2),
+(23, 537, 4, 3),
+(23, 537, 5, 4),
+(23, 537, 6, 5)");
 
                // Admin menu entries
                addAdminMenuSql('network', NULL, 'Werbenetzwerke', 'Verwalten Sie hier Werbenetzwerke (API-Anbindung), versenden Sie deren Mails, oder &uuml;bernehmen Sie deren Textlinks und vieles mehr. <strong>VORSICHT:</strong> Das Einrichten von weiteren Werbenetzwerken ist nicht leicht, daf&uuml;r aber sehr flexibel! Sollte ein Netzwerk fehlen, so melden Sie dies bitte <a href="http://forum.mxchange.org/topic-462.html" target="_blank" title="Direktlink zum Forum">im Forum</a>!',4);
@@ -7313,16 +8060,19 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
                addAdminMenuSql('network', 'query_network_apis', 'APIs abfragen', 'Fragt alle eingestellten APIs ab. Die Ergebnisse werden dann f&uuml;r einen einstellbaren Zeitraum gecacht und nicht erneut angefordert.',4);
                addAdminMenuSql('network', 'config_network', 'Einstellungen', 'Stellen Sie generelle Einstellungen ein, die f&uuml;r alle Werbenetzwerke gelten, wie z.B. Cache-Erneuerungsinterval. Generell sind aber die Einstellungen in Ordnung, da z.B. sonst Ihre freien Abfragen beim Werbenetzwerk sich zu schnell abbauen.',5);
                addAdminMenuSql('network', 'list_network_reloads', 'Reload-Sperren', 'Listen oder l&ouml;schen Sie hier Reload-Sperren. <strong>Vorsicht:</strong> Die hier gespeicherten Reload-Sperren sind vom jeweiligen Werbenetzwerk &uuml;bernommen. Eventuell verdienen Sie nichts, wenn Sie z.B. eine Mail innerhalb der Reload-Sperre erneut versenden.',6);
-               addAdminMenuSql('network', 'list_network_data', 'Dev-Grunddaten', '<strong>Entwicklereinstellungen!</strong> Hier &auml;ndern Sie die Einstellungen an den Grunddaten (Stammdaten) des jeweiligen Werbenetzwerks ab. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 7);
-               addAdminMenuSql('network', 'list_network_types', 'Dev-Werbearten-Handler', '<strong>Entwicklereinstellungen!</strong> Hier &auml;ndern Sie die Einstellungen zu den Werbearten-Handler pro Werbenetzwerken. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 8);
-               addAdminMenuSql('network', 'list_network_request_params', 'Dev-Abfrageparameter', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Abfrageparameter (wie sie genannt werden m&uuml;ssen, um das API-Script korrekt aufrufen zu k&ouml;nnen) ein, pro Werbenetzwerk. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 9);
-               addAdminMenuSql('network', 'list_network_vcheck_params', 'Dev-VCheck-Parameter', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Abfrageparameter f&uuml;r <strong>network-vcheck.php</strong> pro Werbenetzwerk ein, damit dies vom Werbenetzwerk zur&uuml;ck korrekt aufgerufen wird. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 10);
-               addAdminMenuSql('network', 'list_network_array_translation', 'Dev-Antwort-Array', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Zuweisungen der aus der analysierten API-Antwort Array-Elementen zu den Datenspalten ein. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 11);
-               addAdminMenuSql('network', 'list_network_error_codes', 'Dev-Fehlercodes', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Fehlercodes ein, die im Falle eines Fehlers pro API-Script kommen k&ouml;nnen. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 12);
-               addAdminMenuSql('network', 'list_network_vcheck_errors', 'Dev-VCheck-Fehler', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Fehlercodes ein, die im Falle eines Fehlers vom Werbenetzwerk an <strong>network-vcheck.php</strong> gemeldet werden. Auch ob alles in Ordnung gegangen ist, wird hier eingestellt. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 13);
+               addAdminMenuSql('network', 'list_network_http_header', 'HTTP-Header', 'Auflisten der geloggten HTTP-Header, dient prim&auml;r f&uuml;r die Fehleranalyse. Schauen Sie hier mal ab und an rein, ob Eintr&auml;ge dazu gekommen sind.', 7);
+               addAdminMenuSql('network', 'list_network_data', 'Dev-Grunddaten', '<strong>Entwicklereinstellungen!</strong> Hier &auml;ndern Sie die Einstellungen an den Grunddaten (Stammdaten) des jeweiligen Werbenetzwerks ab. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 8);
+               addAdminMenuSql('network', 'list_network_types', 'Dev-Werbearten-Handler', '<strong>Entwicklereinstellungen!</strong> Hier &auml;ndern Sie die Einstellungen zu den Werbearten-Handler pro Werbenetzwerken. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 9);
+               addAdminMenuSql('network', 'list_network_request_params', 'Dev-Abfrageparameter', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Abfrageparameter (wie sie genannt werden m&uuml;ssen, um das API-Script korrekt aufrufen zu k&ouml;nnen) ein, pro Werbenetzwerk. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 10);
+               addAdminMenuSql('network', 'list_network_vcheck_params', 'Dev-VCheck-Parameter', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Abfrageparameter f&uuml;r <strong>network-vcheck.php</strong> pro Werbenetzwerk ein, damit dies vom Werbenetzwerk zur&uuml;ck korrekt aufgerufen wird. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 11);
+               addAdminMenuSql('network', 'list_network_array_translation', 'Dev-Antwort-Array', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Zuweisungen der aus der analysierten API-Antwort Array-Elementen zu den Datenspalten ein. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 12);
+               addAdminMenuSql('network', 'list_network_error_codes', 'Dev-Fehlercodes', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Fehlercodes ein, die im Falle eines Fehlers pro API-Script kommen k&ouml;nnen. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 13);
+               addAdminMenuSql('network', 'list_network_vcheck_errors', 'Dev-VCheck-Fehler', '<strong>Entwicklereinstellungen!</strong> Hier stellen Sie die Fehlercodes ein, die im Falle eines Fehlers vom Werbenetzwerk an <strong>network-vcheck.php</strong> gemeldet werden. Auch ob alles in Ordnung gegangen ist, wird hier eingestellt. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.', 14);
 
                // Configuration entries
                addConfigAddSql('network_cache_refresh', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (60 * 15));
+               addConfigAddSql('network_logging_debug', "ENUM ('Y','N') NOT NULL DEFAULT 'N'");
+               addConfigAddSql('network_logging_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 3));
                break;
 
        case 'remove': // Do stuff when removing extension
@@ -7332,14 +8082,15 @@ UNIQUE INDEX `provider_type` (`network_id`, `network_type_id`)",
                addDropTableSql('network_request_params');
                addDropTableSql('network_vcheck_params');
                addDropTableSql('network_vcheck_errors');
-               addDropTableSql('network_error_codes');
+               addDropTableSql('network_translations');
                addDropTableSql('network_array_translation');
+               addDropTableSql('network_error_codes');
                addDropTableSql('network_api_config');
-               addDropTableSql('network_types_config');
+               addDropTableSql('network_handler_config');
                addDropTableSql('network_vcheck_config');
                addDropTableSql('network_cache');
                addDropTableSql('network_reloads');
-               addDropTableSql('network_translations');
+               addDropTableSql('network_header_logging');
 
                // Admin menu
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='network'");
index e240452512ed16257e2d2d03323b38665646c985..00ae170d8edaa4f2debc8cd18e23144a01378b59 100644 (file)
@@ -59,7 +59,7 @@ function FILTER_POST_CASH_COUPON ($filterData) {
        addPointsThroughReferralSystem('coupon_cashed', $filterData['userid'], $filterData['points']);
 
        // Subtract points from member account if the admin has selected one
-       if (isValidUserId(getCouponUserid())) {
+       if (isValidId(getCouponUserid())) {
                // Subtract from this account and ignore return status
                subtractPoints('cashed_coupon', getCouponUserid(), $filterData['points']);
        } // END - if
index 8c2606b05c9094ed384f4da04f1eb4796716b917..9a4870c3c5c8cef55537d50ea45001247e43ebf1 100644 (file)
@@ -661,6 +661,15 @@ function FILTER_REMOVE_EXTENSION () {
 
 // Filter for flushing the output
 function FILTER_FLUSH_OUTPUT () {
+       // Is this filter called?
+       if (isset($GLOBALS[__FUNCTION__])) {
+               // Abort here
+               reportBug(__FUNCTION__, __LINE__, 'Double call of ' . __FUNCTION__ . ' causes problems with sent headers.');
+       } // END - if
+
+       // Mark this filter as called
+       $GLOBALS[__FUNCTION__] = TRUE;
+
        // Simple, he?
        outputHtml();
 }
@@ -1018,7 +1027,7 @@ function FILTER_FLUSH_TEMPLATE_CACHE () {
 // Filter for loading user data
 function FILTER_FETCH_USER_DATA ($userid = NULL) {
        // Is the userid not set?
-       if (!isValidUserId($userid)) {
+       if (!isValidId($userid)) {
                // Then use member id
                $userid = getMemberId();
        } // END - if
index 74305d4701e40bf233a83baddfb2e9a5c6340288..76b7859dbb16d00e39a994e3e95d368908d5b863 100644 (file)
@@ -85,7 +85,7 @@ function getTotalFatalErrors () {
 }
 
 // Generate a password in a specified length or use default password length
-function generatePassword ($length = '0', $exclude =  array()) {
+function generatePassword ($length = '0', $exclude = array()) {
        // Auto-fix invalid length of zero
        if ($length == '0') {
                $length = getPassLen();
@@ -194,6 +194,26 @@ function translateYesNo ($yn) {
        return $GLOBALS[__FUNCTION__][$yn];
 }
 
+// "Translates" Y/N into "de-/active"
+function translateActivationStatus ($status) {
+       // Is it cached?
+       if (!isset($GLOBALS[__FUNCTION__][$status])) {
+               // Default
+               $GLOBALS[__FUNCTION__][$status] = '??? (' . $status . ')';
+               switch ($status) {
+                       case 'Y': $GLOBALS[__FUNCTION__][$status] = '{--ACTIVATED--}'; break;
+                       case 'N': $GLOBALS[__FUNCTION__][$status] = '{--DEACTIVATED--}'; break;
+                       default:
+                               // Log unknown value
+                               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown value %s. Expected: Y/N", $status));
+                               break;
+               } // END - switch
+       } // END - if
+
+       // Return it
+       return $GLOBALS[__FUNCTION__][$status];
+}
+
 // Translates the american decimal dot into a german comma
 // OPPOMENT: convertCommaToDot()
 function translateComma ($dotted, $cut = TRUE, $max = '0') {
@@ -480,7 +500,7 @@ function array_pk_sort (&$array, $a_sort, $primary_key = '0', $order = -1, $nums
                                } elseif ($key != $key2) {
                                        // Sort numbers (E.g.: 9 < 10)
                                        if (($temporaryArray[$a_sort[$primary_key]][$key] < $temporaryArray[$a_sort[$primary_key]][$key2]) && ($order == -1)) $match = TRUE;
-                                       if (($temporaryArray[$a_sort[$primary_key]][$key] > $temporaryArray[$a_sort[$primary_key]][$key2]) && ($order == 1))  $match = TRUE;
+                                       if (($temporaryArray[$a_sort[$primary_key]][$key] > $temporaryArray[$a_sort[$primary_key]][$key2]) && ($order ==  1)) $match = TRUE;
                                }
 
                                if ($match) {
@@ -1464,12 +1484,12 @@ function convertCommaToDot ($str) {
                        $str = str_replace('.', '', $str);
 
                        // Replace german commata with decimal dot and cast it
-                       $float = sprintf('%01.5f', str_replace(',', '.', $str));
+                       $float = sprintf(getConfig('FLOAT_MASK'), str_replace(',', '.', $str));
                        break;
 
                default: // US and so on
                        // Remove thousand commatas first and cast
-                       $float = sprintf('%01.5f', str_replace(',', '', $str));
+                       $float = sprintf(getConfig('FLOAT_MASK'), str_replace(',', '', $str));
                        break;
        } // END - switch
 
@@ -1645,29 +1665,29 @@ function initMemberId () {
 }
 
 // Setter for member id
-function setMemberId ($memberid) {
+function setMemberId ($memberId) {
        // We should not set member id to zero
-       if ($memberid == '0') {
+       if (!isValidId($memberId)) {
                reportBug(__FUNCTION__, __LINE__, 'Userid should not be set zero.');
        } // END - if
 
        // Set it secured
-       $GLOBALS['member_id'] = bigintval($memberid);
+       $GLOBALS['member_id'] = bigintval($memberId);
 }
 
 // Getter for member id or returns zero
 function getMemberId () {
        // Default member id
-       $memberid = '0';
+       $memberId = '0';
 
        // Is the member id set?
        if (isMemberIdSet()) {
                // Then use it
-               $memberid = $GLOBALS['member_id'];
+               $memberId = $GLOBALS['member_id'];
        } // END - if
 
        // Return it
-       return $memberid;
+       return $memberId;
 }
 
 // Checks ether the member id is set
@@ -1975,7 +1995,7 @@ function encodeUrl ($url, $outputMode = '0') {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'url=' . $url . ',isHtmlOutputMode()=' . intval(isHtmlOutputMode()) . ',outputMode=' . $outputMode);
 
        // Is there to decode entities?
-       if ((!isHtmlOutputMode()) || ($outputMode != '0')) {
+       if (!isHtmlOutputMode()) {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'url=' . $url . ' - BEFORE DECODING');
                // Decode them for e.g. JavaScript parts
                $url = decodeEntities($url);
@@ -2082,7 +2102,7 @@ function convertZeroToNull ($number) {
        return $number;
 }
 
-// Converts a NULL to zero
+// Converts a NULL|empty string|< 1 to zero
 function convertNullToZero ($number) {
        // Is it a valid username?
        if ((is_null($number)) || (empty($number)) || ($number < 1)) {
@@ -2211,7 +2231,7 @@ function isHexadecimal ($hex) {
  * @return     $str    Overworked string
  */
 function replaceReturnNewLine ($str) {
-       return str_replace(array(chr(13), PHP_EOL), array('[r]', '[n]'), $str);
+       return str_replace(array(chr(13), chr(10)), array('[r]', '[n]'), $str);
 }
 
 // Converts a given string by splitting it up with given delimiter similar to
@@ -2513,12 +2533,119 @@ function validateIsEmpty ($str) {
        return $str;
 }
 
+// "Getter" for seconds from given time unit
+function getSecondsFromTimeUnit ($timeUnit) {
+       // Default is not found
+       $seconds = NULL;
+
+       // "Detect" it
+       switch ($timeUnit) {
+               case 's': // Seconds = 1
+                       $seconds = 1;
+                       break;
+
+               case 'm': // Minutes
+                       $seconds = 60;
+                       break;
+
+               case 'h': // Hours
+                       $seconds = 60*60;
+                       break;
+
+               case 'D': // Days
+                       $seconds = 60*60*24;
+                       break;
+
+               case 'W': // Weeks
+                       $seconds = 60*60*24*7;
+                       break;
+
+               default: // Unsupported
+                       reportBug(__FUNCTION__, __LINE__, 'Unsupported time unit ' . $timeUnit . ' detected.');
+                       break;
+       } // END - switch
+
+       // Return value
+       return $seconds;
+}
+
+// Calulates value for given seconds and time unit
+function caluculateTimeUnitValue ($seconds, $timeUnit) {
+       // Calculate it
+       return ($seconds / getSecondsFromTimeUnit($timeUnit));
+}
+
+// "Getter" for an array from given one but only one index of it
+function getArrayFromArrayIndex ($array, $key) {
+       // Some simple validation
+       assert(isset($array[0][$key]));
+
+       // Init new array
+       $newArray = array();
+
+       // "Walk" through all elements
+       foreach ($array as $element) {
+               $newArray[] = $element[$key];
+       } // END - if
+
+       // Return it
+       return $newArray;
+}
+
+/**
+ * Compress given data and encodes it into BASE64 to be stored in database with
+ * SQL_QUERY_ESC()
+ *
+ * @param      $data   Data to be compressed and encoded
+ * @return     $data   Compressed+encoded data
+ */
+function compress ($data) {
+       // Compress it
+       return base64_encode(gzcompress($data));
+}
+
+/**
+ * Decompress given data previously compressed with compress().
+ *
+ * @param      $data   Data compressed with compress()
+ * @reurn      $data   Uncompressed data
+ */
+function decompress ($data) {
+       // Decompress it
+       return gzuncompress(base64_decode($data));
+}
+
+/**
+ * Converts given charset in given string to UTF-8 if not UTF-8. This function
+ * is currently limited to iconv().
+ *
+ * @param      $str            String to convert charset in
+ * @param      $charset        Charset to convert from
+ * @return     $str            Converted string
+ */
+function convertCharsetToUtf8 ($str, $charset) {
+       // Is iconv() available?
+       if (!function_exists('iconv')) {
+               // Please make it sure
+               reportBug(__FUNCTION__, __LINE__, 'PHP function iconv() is currently required to do charset convertion.');
+       } // END - if
+
+       // Is the charset not UTF-8?
+       if (strtoupper($charset) != 'UTF-8') {
+               // Convert it to UTF-8
+               $str = iconv(strtoupper($charset), 'UTF-8//TRANSLIT', $str);
+       } // END - if
+
+       // Return converted string
+       return $str;
+}
+
 // ----------------------------------------------------------------------------
 //              "Translatation" functions for points_data table
 // ----------------------------------------------------------------------------
 
 // Translates generically some data into a target string
-function translateGeneric ($messagePrefix, $data) {
+function translateGeneric ($messagePrefix, $data, $messageSuffix = '') {
        // Is the method null or empty?
        if (is_null($data)) {
                // Is NULL
@@ -2529,10 +2656,10 @@ function translateGeneric ($messagePrefix, $data) {
        } // END - if
 
        // Default column name is unknown
-       $return = '{%message,' . $messagePrefix . '_UNKNOWN=' . strtoupper($data) . '%}';
+       $return = '{%message,' . $messagePrefix . '_UNKNOWN' . $messageSuffix . '=' . strtoupper($data) . '%}';
 
        // Construct message id
-       $messageId = $messagePrefix . '_' . strtoupper($data);
+       $messageId = $messagePrefix . '_' . strtoupper($data) . $messageSuffix;
 
        // Is it there?
        if (isMessageIdValid($messageId)) {
index 67a70435983f725096b859e352b7750c8fbbdb88..6901f38febd998226efc649d46cf1e72674968e1 100644 (file)
@@ -144,22 +144,22 @@ function removeHttpHostNameFromUrl ($url) {
 }
 
 // Sends a HTTP request (GET, POST, HEAD are currently supported)
-function sendHttpRequest ($requestType, $baseUrl, $requestData = array(), $removeHeader = FALSE) {
+function sendHttpRequest ($requestType, $baseUrl, $requestData = array(), $removeHeader = FALSE, $allowOnlyHttpOkay = TRUE) {
        // Init response
        $response = array();
 
        // Start "detecting" the request type
        switch ($requestType) {
                case 'HEAD': // Send a HTTP/1.1 HEAD request
-                       $response = sendHeadRequest($baseUrl, $requestData);
+                       $response = sendHttpHeadRequest($baseUrl, $requestData, $allowOnlyHttpOkay);
                        break;
 
                case 'GET': // Send a HTTP/1.1 GET request
-                       $response = sendGetRequest($baseUrl, $requestData, $removeHeader);
+                       $response = sendHttpGetRequest($baseUrl, $requestData, $removeHeader, $allowOnlyHttpOkay);
                        break;
 
                case 'POST': // Send a HTTP/1.1 POST request
-                       $response = sendPostRequest($baseUrl, $requestData, $removeHeader);
+                       $response = sendHttpPostRequest($baseUrl, $requestData, $removeHeader, $allowOnlyHttpOkay);
                        break;
 
                default: // Unsupported HTTP request, this is really bad and needs fixing
@@ -172,9 +172,10 @@ function sendHttpRequest ($requestType, $baseUrl, $requestData = array(), $remov
 }
 
 // Sends a HEAD request
-function sendHeadRequest ($baseUrl, $requestData = array()) {
+function sendHttpHeadRequest ($baseUrl, $requestData = array(), $allowOnlyHttpOkay = TRUE) {
        // Generate full GET URL
        $getUrl = generateGetUrlFromBaseUrlData($baseUrl, $requestData);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getUrl=' . $getUrl);
 
        // Is there http[s]:// in front of the URL?
        if (isFullQualifiedUrl($getUrl)) {
@@ -204,16 +205,17 @@ function sendHeadRequest ($baseUrl, $requestData = array()) {
        $request .= getConfig('HTTP_EOL');
 
        // Send the raw request
-       $response = sendRawRequest($host, $request);
+       $response = sendRawRequest($host, $request, $allowOnlyHttpOkay);
 
        // Return the result to the caller function
        return $response;
 }
 
 // Send a GET request
-function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = FALSE) {
+function sendHttpGetRequest ($baseUrl, $requestData = array(), $removeHeader = FALSE, $allowOnlyHttpOkay = TRUE) {
        // Generate full GET URL
        $getUrl = generateGetUrlFromBaseUrlData($baseUrl, $requestData);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getUrl=' . $getUrl);
 
        // Is there http[s]:// in front of the URL?
        if (isFullQualifiedUrl($getUrl)) {
@@ -243,7 +245,7 @@ function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = FALSE
        $request .= getConfig('HTTP_EOL');
 
        // Send the raw request
-       $response = sendRawRequest($host, $request);
+       $response = sendRawRequest($host, $request, $allowOnlyHttpOkay);
 
        // Should we remove header lines?
        if ($removeHeader === TRUE) {
@@ -256,7 +258,7 @@ function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = FALSE
 }
 
 // Send a POST request, sometimes even POST requests have no parameters
-function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = FALSE) {
+function sendHttpPostRequest ($baseUrl, $requestData = array(), $removeHeader = FALSE, $allowOnlyHttpOkay = TRUE) {
        // Copy baseUrl to getUrl
        $getUrl = $baseUrl;
 
@@ -296,7 +298,7 @@ function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = FALS
        $request .= $body;
 
        // Send the raw request
-       $response = sendRawRequest($host, $request);
+       $response = sendRawRequest($host, $request, $allowOnlyHttpOkay);
 
        // Should we remove header lines?
        if ($removeHeader === TRUE) {
@@ -309,7 +311,7 @@ function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = FALS
 }
 
 // Sends a raw request (string) to given host (hostnames will be solved)
-function sendRawRequest ($host, $request) {
+function sendRawRequest ($host, $request, $allowOnlyHttpOkay = TRUE) {
        //* DEBUG: */ die('host='.$host.',request=<pre>'.$request.'</pre>');
        // Init errno and errdesc with 'all fine' values
        $errno = '0';
@@ -364,11 +366,11 @@ function sendRawRequest ($host, $request) {
        if (!is_resource($resource)) {
                // Failed!
                logDebugMessage(__FUNCTION__, __LINE__, $errdesc . ' (' . $errno . ')');
-               return $response;
+               return array('', '', '');
        } elseif ((!stream_set_blocking($resource, 0)) || (!stream_set_timeout($resource, 1))) {
                // Cannot set non-blocking mode or timeout
                logDebugMessage(__FUNCTION__, __LINE__, socket_strerror(socket_last_error()));
-               return $response;
+               return array('', '', '');
        }
 
        // Shall proxy be used?
@@ -456,7 +458,7 @@ function sendRawRequest ($host, $request) {
        //* DEBUG: */ debugOutput('<strong>Response:</strong><pre>'.print_r($response, TRUE).'</pre>');
 
        // Proxy agent found or something went wrong?
-       if (!isset($response[0])) {
+       if (count($response) == 0) {
                // No response, maybe timeout
                $response = array('', '', '');
                logDebugMessage(__FUNCTION__, __LINE__, 'Invalid empty response array, maybe timed out?');
@@ -467,7 +469,7 @@ function sendRawRequest ($host, $request) {
        } // END - if
 
        // Was the request successfull?
-       if ((!isInStringIgnoreCase('200 OK', $response[0])) || (empty($response[0]))) {
+       if ((!isHttpStatusOkay($response[0])) && ($allowOnlyHttpOkay === TRUE)) {
                // Not found / access forbidden
                logDebugMessage(__FUNCTION__, __LINE__, 'Unexpected status code ' . $response[0] . ' detected. "200 OK" was expected.');
                $response = array('', '', '');
@@ -480,6 +482,12 @@ function sendRawRequest ($host, $request) {
        return $response;
 }
 
+// Is HTTP status okay?
+function isHttpStatusOkay ($header) {
+       // Determine it
+       return in_array(strtoupper(trim($header)), array('HTTP/1.1 200 OK', 'HTTP/1.0 200 OK'));
+}
+
 // Sets up a proxy tunnel for given hostname and through resource
 function setupProxyTunnel ($host, $proxyHost, $port, $resource) {
        // Initialize array
@@ -537,27 +545,57 @@ function unchunkHttpResponse ($response) {
                        // Found!
                        $isChunked = TRUE;
                        break;
-               } // END - if
+               } elseif (empty($line)) {
+                       // Empty line found (header->body)
+                       break;
+               }
        } // END - foreach
 
+       // Save whole body
+       $body = removeHttpHeaderFromResponse($response);
+
        // Is it chunked?
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isChunked=' . intval($isChunked));
        if ($isChunked === TRUE) {
+               // Make sure, that body is an array
+               assert(is_array($body));
+
                // Good, we still have the HTTP headers in there, so we need to get rid
                // of them temporarly
                //* DEBUG: */ die('<pre>'.htmlentities(print_r(removeHttpHeaderFromResponse($response), TRUE)).'</pre>');
-               $tempResponse = http_chunked_decode(implode('', removeHttpHeaderFromResponse($response)));
+               $tempResponse = http_chunked_decode(implode('', $body));
 
                // We got a string back from http_chunked_decode(), so we need to convert it back to an array
-               //* DEBUG: */ die('tempResponse['.strlen($tempResponse).']=<pre>'.replaceReturnNewLine(htmlentities($tempResponse)).'</pre>');
+               //* DEBUG: */ die('tempResponse['.strlen($tempResponse).'/'.gettype($tempResponse).']=<pre>'.replaceReturnNewLine(htmlentities($tempResponse)).'</pre>');
 
                // Re-add the headers
-               $response = merge_array($GLOBALS['http_headers'], stringToArray(PHP_EOL, $tempResponse));
-       } // END - if
+               $response = mergeHttpHeadersWithBody($tempResponse);
+       } elseif (is_array($body)) {
+               /*
+                * Make sure the body is in one array element as many other functions
+                * get disturbed by it.
+                */
+
+               // Put all array elements from body together
+               $body = implode('', $body);
+
+               // Now merge the extracted headers + fixed body together
+               $response = mergeHttpHeadersWithBody($body);
+       }
 
        // Return the unchunked array
        return $response;
 }
 
+// Merges HTTP header lines with given body (string)
+function mergeHttpHeadersWithBody ($body) {
+       // Make sure at least one header is there (which is still not valid but okay here)
+       assert((is_array($GLOBALS['http_headers'])) && (count($GLOBALS['http_headers']) > 0));
+
+       // Merge both together
+       return merge_array($GLOBALS['http_headers'], array(count($GLOBALS['http_headers']) => $body));
+}
+
 // Removes HTTP header lines from a response array (e.g. output from send<Get|Post>Request() )
 function removeHttpHeaderFromResponse ($response) {
        // Save headers for later usage
@@ -571,9 +609,6 @@ function removeHttpHeaderFromResponse ($response) {
                        // Remove line
                        array_shift($response2);
 
-                       // Add full line to temporary global array
-                       array_push($GLOBALS['http_headers'], $line);
-
                        // Trim it for testing
                        $lineTest = trim($line);
 
@@ -582,6 +617,9 @@ function removeHttpHeaderFromResponse ($response) {
                                // Then stop here
                                break;
                        } // END - if
+
+                       // Add full line to temporary global array
+                       array_push($GLOBALS['http_headers'], $line);
                } // END - foreach
 
                // Write back the array
@@ -677,7 +715,7 @@ if (!function_exists('http_build_query')) {
        function http_build_query($requestData, $prefix = '', $sep = '', $key = '') {
                $ret = array();
                foreach ((array) $requestData as $k => $v) {
-                       if (is_int($k) && $prefix != null) {
+                       if (is_int($k) && !is_null($prefix)) {
                                $k = urlencode($prefix . $k);
                        } // END - if
 
index 8c2d38f86ba4c47e7b7411b17f6e959415681c3d..cdb783a51196704cd18040cca229a57abf436100 100644 (file)
@@ -38,7 +38,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-} elseif (!isAdmin()) {
+} elseif ((!isAdmin()) || (!isGetRequestElementSet('admin_page'))) {
        return;
 }
 
index 75da4c4e37437cd8ef2c639b80c00298b8ae2dca..f95ab2f7cdfb2c00b237eb537e1d768eae43ac36 100644 (file)
@@ -38,7 +38,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-} elseif (!isInstallationPhase()) {
+} elseif ((!isInstallationPhase()) || (!isGetRequestElementSet('install_page'))) {
        return;
 }
 
index dbe4ce7a6880451d82e5b4c6cc8f9521a5d5679c..f275a778878d50871322f08837e448ee43e655e2 100644 (file)
@@ -38,7 +38,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-} elseif (!isExtensionActive('surfbar')) {
+} elseif ((!isExtensionActive('surfbar')) || (!isGetRequestElementSet('url_id'))) {
        return;
 }
 
index e91462721b146481fbe64d3e869055cf7dd7a370..2421d3885d2f65d52ef68a62c2dbf0558e626a5c 100644 (file)
@@ -38,7 +38,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-} elseif (!isExtensionActive('surfbar')) {
+} elseif ((!isExtensionActive('surfbar')) || (!isGetRequestElementSet('url_views_max')) || (!isGetRequestElementSet('limited'))) {
        return;
 }
 
index c85cf52faf1c681752e653ad76c80d7472a77cdf..5a7b9dacd9217a73cbccbe2f41e9bb686abec8e0 100644 (file)
@@ -41,7 +41,6 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // "Getter" for language strings
-// @TODO Rewrite all language constants to this function.
 function getMessage ($messageId) {
        // Default is not found
        $return = '!' . $messageId . '!';
@@ -356,10 +355,11 @@ function isMessageMasked ($messageId, $strict = TRUE) {
        } // END - if
 
        // Now simply check it
-       $masked = isInString('%', getMessage($messageId));
+       $isMasked = isInString('%', getMessage($messageId));
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'messageId=' . $messageId . ',isMasked=' . intval($isMasked));
 
        // Return result
-       return $masked;
+       return $isMasked;
 }
 
 // [EOF]
index 49166e65692e264dc915beac0d8e56e669643fcc..ca41be961e83dd1567a3c8037894b9ca59848918 100644 (file)
@@ -723,6 +723,7 @@ addMessages(array(
        'ADMIN_ADD_POINTS_TO_USER' => "Einem Mitglied {?POINTS?} gutschreiben",
        'ADMIN_ADD_POINTS' => "{?POINTS?} gutschreiben",
        'EMAILS_PAGENAV' => "Seite",
+       'UNFINISHED_FEATURE' => "Feature nicht fertiggestellt.",
        '_IS_CURRENT_HOME' => "Liegt in Home",
        '_IS_NEW_HOME' => "In Home setzen",
        'ADMIN_HOME_ACTION' => "Funktion",
@@ -933,7 +934,13 @@ addMessages(array(
        'MAILER_HAS_DIED' => "{?TITLE?} ist in Script/Funktion <span class=\"data\">%s</span>, Zeile <span class=\"data\">%s</span> mit folgender Meldung abgebrochen: <span class=\"data\">%s</span>",
        'ADMIN_MAIL_NOTHING_DELETED' => "Die Mail mit der Id <span class=\"data\">%s</span> weisst keine Mitglieder auf.",
        'ENTRY_ADDED' => "Eintrag hinzugef&uuml;gt",
+       'UNLIMITED' => "Unbegrenzt",
 
+       // Status
+       'ACTIVATED' => "Aktiviert",
+       'DEACTIVATED' => "Deaktiviert",
+
+       // Admin - reset password link
        'ADMIN_RESET_PASS' => "Ihr Administratorkennwort zur&uuml;cksetzen?",
        'ADMIN_NO_LOGIN_WITH_EMAIL' => "Kein Administrator-Account mit der angegebenen Email-Adresse gefunden.",
        'ADMIN_RESET_PASSWORD_LINK_SENT' => "Der Reset-Link wurde soeben an Ihre eingegebene Email-Adresse ausgesendet.",
@@ -1359,10 +1366,12 @@ addMessages(array(
        'MEMBER_REFERRAL_ADMIN_ADD_SINGLE_REF_SUBJECT' => "Anteilige Einzelreferralgutschrift vom Administrator erhalten",
        'MEMBER_REFERRAL_ADMIN_ADD_ALL_REF_SUBJECT' => "Anteilige Sammelreferralgutschrift vom Administrator erhalten",
 
-       // AJAX admin menu
+       // AJAX admin stuff
        'ADMIN_AJAX_MENU_IS_LOADING' => "Das Adminmen&uuml; wird geladen, bitte etwas Geduld .&nbsp;.&nbsp;.",
        'ADMIN_AJAX_ERROR_TITLE' => "AJAX-Abfrage im Adminmen&uuml; fehlgeschlagen",
        'ADMIN_AJAX_WARNING_TITLE' => "Warnung: Es sind ungespeicherte &Auml;nderungen vorhanden",
+       'ADMIN_AJAX_PROGRESS_TITLE' => "AJAX-Abfrage l&auml;uft . . .",
+       'ADMIN_AJAX_SUCCESS_TITLE' => "AJAX-Abfrage erfolgreich",
 
        // Member - submit buttons
        'MEMBER_ACTION_EDIT_SUBMIT' => "Editieren",
@@ -1376,6 +1385,7 @@ addMessages(array(
 
        // Admin - server_name_log - generic
        'ADMIN_LIST_SERVER_NAME_LOG_TITLE' => "Auflisten aller geloggten SERVER_NAME-Eintr&auml;ge",
+       'ADMIN_LIST_SERVER_NAME_LOG_404' => "Es wurden keine SERVER_NAME-Eintr&auml;ge gefunden.",
        'ADMIN_ACTION_DELETE_LOG_SUBMIT' => "Gesamtes Logbuch l&ouml;schen",
        'ADMIN_LIST_LOG_NOTICE' => "<strong>Vorsicht:</strong> Mit Klick auf <strong>{--ADMIN_ACTION_DELETE_LOG_SUBMIT--}</strong> wird das <u>gesamte</u> Logbuch sofort bereinigt, ohne zus&auml;tzliche Sicherheitsabfrage.",
        'ADMIN_TASK_LIST_SERVER_NAME_LOG'  => "Logbuch f&uuml;r SERVER_NAME-Eintr&auml;ge",
index be1698f226e9d1349b937ca481da8280c274f07e..04cca0012f309f4c57a379360de50dcfb9d1cde4 100644 (file)
@@ -77,8 +77,10 @@ addMessages(array(
        'ADMIN_ADD_NETWORK_TITLE' => "Neues Werbenetzwerk hinzuf&uuml;gen - Allgemeine Daten",
        'ADMIN_EDIT_NETWORK_DATA_TITLE' => "Werbenetzwerk editieren - Allgemeine Daten",
        'ADMIN_DELETE_NETWORK_DATA_TITLE' => "Werbenetzwerk l&ouml;schen - Allgemeine Daten",
-       'ADMIN_SELECT_NETWORK_TITLE' => "Bitte w&auml;hlen Sie ein Werbenetzwerk aus",
-       'ADMIN_SELECT_NETWORK_HANDLER_TYPE_TITLE' => "Bitte w&auml;hlen Sie einen Werbeart-Handler aus",
+       'ADMIN_SELECT_NETWORK_TITLE' => "Bitte w&auml;hlen Sie ein Werbenetzwerk aus:",
+       'ADMIN_SELECT_CONFIGURED_NETWORK_TITLE' => "Bitte w&auml;hlen Sie ein bereits konfiguriertes Werbenetzwerk aus:",
+       'ADMIN_SELECT_UNCONFIGURED_NETWORK_TITLE' => "Bitte w&auml;hlen Sie ein nicht konfiguriertes Werbenetzwerk aus:",
+       'ADMIN_SELECT_NETWORK_HANDLER_TYPE_TITLE' => "Bitte w&auml;hlen Sie einen Werbeart-Handler aus:",
        'ADMIN_ADD_NETWORK_HANDLER_TYPE_TITLE' => "Werbenetzwerk verwalten - Neuen Werbeart-Handler hinzuf&uuml;gen",
        'ADMIN_LIST_NETWORK_TYPE_HANDLER_TITLE' => "Werbeart-Handler auflisten und verwalten",
        'ADMIN_EDIT_NETWORK_HANDLER_TYPES_TITLE' => "Werbeart-Handler editieren",
@@ -92,10 +94,10 @@ addMessages(array(
        'ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_TITLE' => "Array-Element-&Uuml;bersetzungen auflisten und verwalten",
        'ADMIN_EDIT_NETWORK_ARRAY_TRANSLATION_TITLE' => "Array-Element-&Uuml;bersetzungen editeren",
        'ADMIN_DELETE_NETWORK_ARRAY_TRANSLATION_TITLE' => "Array-Element-&Uuml;bersetzungen l&ouml;schen",
-       'ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_TITLE' => "Werbeart-Handler einrichten - {%%pipe,translateNetworkTypeHandler=%s%%}",
-       'ADMIN_SHOW_CONFIG_NETWORK_HANDLER_TYPE_TITLE' => "Eingerichteter Werbeart-Handler - {%%pipe,translateNetworkTypeHandler=%s%%}",
+       'ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_TITLE' => "Werbeart-Handler einrichten - <span class=\"data\">{%%pipe,translateNetworkTypeHandler=%s%%}</span>",
+       'ADMIN_SHOW_CONFIG_NETWORK_HANDLER_TYPE_TITLE' => "Eingerichteter Werbeart-Handler - <span class=\"data\">{%%pipe,translateNetworkTypeHandler=%s%%}</span>",
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPES_TITLE' => "Werbeart-Handler einrichten",
-       'ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_TITLE' => "Werbeart-Handler &auml;ndern - {%%pipe,translateNetworkTypeHandler=%s%%}",
+       'ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_TITLE' => "Werbeart-Handler &auml;ndern - <span class=\"data\">{%%pipe,translateNetworkTypeHandler=%s%%}</span>",
        'ADMIN_ADD_NETWORK_VCHECK_PARAMETER_TITLE' => "Werbenetzwerk verwalten - Neuen VCheck-Parameter hinzuf&uuml;gen",
        // - Link titles
        'ADMIN_NETWORK_API_CONFIG_LINK_TITLE' => "Weiter zur API-Konfiguration",
@@ -121,7 +123,7 @@ addMessages(array(
        'ADMIN_REMOVE_NETWORK_ARRAY_TRANSLATION_SUBMIT' => "Array-Element-&Uuml;bersetzung(en) entfernen",
        'ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_SUBMIT' => "Jetzt den Werbeart-Handler einrichten",
        'ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_FORM_SUBMIT' => "Werbeart-Handlerdaten hinzuf&uuml;gen",
-       'ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_SUBMIT' => "Konfiguration &auml;ndern",
+       'ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_SUBMIT' => "Konfiguration f&uuml;r {%%pipe,translateNetworkTypeHandler=%s%%} &auml;ndern",
        'ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_FORM_SUBMIT' => "Werbeart-Handler &auml;ndern",
        'ADMIN_ADD_NETWORK_VCHECK_PARAMETER_SUBMIT' => "VCheck-Parameter hinzuf&uuml;gen",
        // - Success titles
@@ -140,25 +142,30 @@ addMessages(array(
        'ADMIN_NETWORK_REQUEST_PARAMETER_REMOVED' => "Es wurden <span class=\"data\">%s</span> Abfrageparameter gel&ouml;scht.",
        'ADMIN_NETWORK_ARRAY_TRANSLATION_REMOVED' => "Es wurden <span class=\"data\">%s</span> Array-Element-&Uuml;bersetzung(en) gel&ouml;scht.",
        // - Form notes
-       'ADMIN_ADD_NETWORK_NOTICE' => "Besserer 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_NOTICE' => "Seien Sie mit dem L&ouml;schen und Editieren vonallgemeinen Daten der Werbenetzwerke sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten.",
-       'ADMIN_LIST_NETWORK_REFERRAL_LINK_NOTICE' => "Wenn Sie Ihren Referral-Link eingeben, verwenden Sie bitte nicht dieses Formular, sondern das unter [<a href=\"{%url=modules.php?module=admin&amp;what=config_network_api%}\">API-Zugangsdaten</a>]. Sollten Sie hier Ihren Referral-Link eingetragen haben, ist dies nicht weiter schlimm, er wird jedoch nicht ver&ouml;ffentlicht.",
-       'ADMIN_ADD_NETWORK_HANDLER_TYPE_NOTICE' => "F&uuml;gen Sie hier weitere Werbearten-Handler dem ausgw&auml;hlten Werbenetzwerk hinzu. Die Klick- und Banner-URL m&uuml;ssen dabei Platzhalter enthalten, die Sie der Dokumentation und <a href=\"http://forum.mxchange.org/forum-43.html\" rel=\"external\" title=\"Direkt-Link zur Forumkategorie Werbenetzwerke\" target=\"_blank\">dem Forum</a> entnehmen k&ouml;nnen. Die API-URL muss nur bis zum Fragezeichen eingegeben werden. Richtig: <strong>http://www.some-sponsor.example/inteface/script.php</strong>, falsch: <strike>http://www.some-sponsor.example/inteface/script.php?uid=123&amp;pw=xyzxyzxyz</strike>",
-       'ADMIN_LIST_NETWORK_TYPE_HANDLER_NOTICE' => "Seien Sie mit dem L&ouml;schen und Editieren von Werbeart-Handlern sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten. Dokumentation zu den Platzhaltern (&#37;FOO&#37;, &#37;BAR&#37; usw.) finden Sie in der Dokumentation <strong>DOCs/de/network/README.txt</strong>.",
-       'ADMIN_ADD_NETWORK_REQUEST_PARAMETER_NOTICE' => "F&uuml;gen Sie hier weitere Abfrageparameter dem ausgw&auml;hlten Werbenetzwerk hinzu. Geben Sie keine Werte an, wie z.B. 5 Sekunden oder 30 Mails, geben Sie bei Abfrageparameter den GET- bzw. POST-Parameternamen an.",
-       'ADMIN_LIST_NETWORK_REQUEST_PARAMETER_NOTICE' => "Seien Sie mit dem L&ouml;schen und Editieren von Abfrageparameter sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten. Dokumentation zu den Abfragenamen (&#37;FOO&#37;, &#37;BAR&#37; usw.) finden Sie in der Dokumentation <strong>DOCs/de/network/README.txt</strong>.",
-       'ADMIN_LIST_NETWORK_VCHECK_PARAMETER_NOTICE' => "Seien Sie mit dem L&ouml;schen und Editieren von VCheck-Abfrageparameter sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten.",
-       'ADMIN_ADD_NETWORK_ARRAY_TRANSLATION_NOTICE' => "F&uuml;gen Sie hier weitere Array-Element-&Uuml;bersetzungen zu dem ausgew&auml;hlten Netzwerk und Werbeart-Handler ein.",
-       'ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_NOTICE' => "Seien Sie mit dem Editieren bzw. L&ouml;schen von Array-Elementen sehr vorsichtig, die API-Abfrage k&ouml;ntte unerwartete Ergebnisse bzw. Fehler zur&uuml;ckliefern.",
-       'ADMIN_NETWORK_REQUIRE_ID_CARD_NOTICE' => "Unter <strong>{--ADMIN_NETWORK_REQUIRE_ID_CARD--}</strong> ist das durch den Webnetzwerkbetreiber Verlangen einer Kopie des Personalausweises bzw. Gewerbescheins zu verstehen. Mehr dazu erfahen Sie <a href=\"http://forum.mxchange.org/topic-499.html\" rel=\"external\" target=\"_blank\">im Forum</a>.",
-       'ADMIN_CONFIG_NETWORK_API_NOTICE' => "Geben Sie unter <strong>{--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_BUTTON--}</strong> 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 <strong>keinen</strong> HTML-Code ein.",
-       'ADMIN_CONFIG_NETWORK_HANDLER_TYPES_NOTICE' => "F&uuml;r jede Werbeart sind unterschiedliche Reloadsperren, Mindestauffenthalte und mehr einstellbar. Damit ist es m&ouml;glich, dass Sie z.B. f&uuml;r Forced-Banner eine k&uuml;rzere/l&auml;ngere Reloadsperre eingeben k&ouml;nnen als f&uuml;r Paidmails.",
-       'ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_FORM_NOTICE' => "Bitte beachten Sie, dass es sich beim Feld <strong>{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALLOW_EROTIC--}</strong> um ein frei eingebares Feld handelt. Den genauen Wert entnehmen Sie bitte derzeit aus Ihrem Affiliate-Bereich, da dieser nicht bei allen Werbenetzwerken einheitlich ist. Sollte das Werbenetzwerk Ihnen einen Wert nicht angeben, so lassen Sie das entsprechende Feld einfach leer. Stellen Sie unter <strong>{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME--}</strong> nur Werte ein, die auch vom Werbenetzwerk unterst&uuml;tzt werden. Die meisten werden zwar Stunden anbieten, es sollen aber auch Werbenetzwerke mit anderen Reloadsperreinheiten als Stunden unsterst&uuml;tzt werden. Sp&auml;ter bei der API-Abfrage wird der eingestellte Wert auf die angezeigte Zeiteinheit umgerechnet und gek&uuml;rzt.",
-       'ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_FORM_NOTICE' => "{--ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_FORM_NOTICE--}",
-       'ADMIN_ADD_NETWORK_VCHECK_PARAMETER_NOTICE' => "F&uuml;gen Sie hier weitere VCheck-Abfrageparameter dem ausgew&auml;hlten Werbenetzwerk hinzu, falls dieses den Verg&uuml;tungscheck unterst&uuml;tzt, anderfalls f&uuml;gen Sie einfach keine VCheck-Parameter hinzu.",
+       'ADMIN_SELECT_CONFIGURED_NETWORK_NOTICE' => "<strong>Hinweise:</strong> Diese Liste zeigt nur Werbenetzwerke an, bei denen Sie bereits die API-Zugangsdaten eingestellt haben.",
+       'ADMIN_SELECT_UNCONFIGURED_NETWORK_NOTICE' => "<strong>Hinweise:</strong> Diese Liste zeigt nur Werbenetzwerke an, bei denen Sie noch <u>nicht</u> die API-Zugangsdaten eingestellt haben.",
+       'ADMIN_ADD_NETWORK_NOTICE' => "<strong>Hinweise:</strong> Besserer 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_NOTICE' => "<strong>Hinweise:</strong> Seien Sie mit dem L&ouml;schen und Editieren vonallgemeinen Daten der Werbenetzwerke sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten.",
+       'ADMIN_LIST_NETWORK_REFERRAL_LINK_NOTICE' => "<strong>Hinweise:</strong> Wenn Sie Ihren Referral-Link eingeben, verwenden Sie bitte nicht dieses Formular, sondern das unter [<a href=\"{%url=modules.php?module=admin&amp;what=config_network_api%}\">API-Zugangsdaten</a>]. Sollten Sie hier Ihren Referral-Link eingetragen haben, ist dies nicht weiter schlimm, er wird jedoch nicht ver&ouml;ffentlicht.",
+       'ADMIN_ADD_NETWORK_HANDLER_TYPE_NOTICE' => "<strong>Hinweise:</strong> F&uuml;gen Sie hier weitere Werbearten-Handler dem ausgw&auml;hlten Werbenetzwerk hinzu. Die Klick- und Banner-URL k&ouml;nnen optional sein und m&uuml;ssen dabei Platzhalter enthalten, die Sie der Dokumentation und <a href=\"http://forum.mxchange.org/forum-43.html\" rel=\"external\" title=\"Direkt-Link zur Forumkategorie Werbenetzwerke\" target=\"_blank\">dem Forum</a> entnehmen k&ouml;nnen. Ist seitens des Werbenetzwerkes keine Klick- bzw. Banner-URL angegeben (z.B. weil die URLs in der API-Antwort stehen), so lassen Sie die Felder einfach leer. Die API-URL muss nur bis zum Fragezeichen eingegeben werden. Richtig: <strong>http://www.some-sponsor.example/inteface/script.php</strong>, falsch: <strike>http://www.some-sponsor.example/inteface/script.php?uid=123&amp;pw=xyzxyzxyz</strike>",
+       'ADMIN_LIST_NETWORK_TYPE_HANDLER_NOTICE' => "<strong>Hinweise:</strong> Seien Sie mit dem L&ouml;schen und Editieren von Werbeart-Handlern sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten. Dokumentation zu den Platzhaltern (&#37;FOO&#37;, &#37;BAR&#37; usw.) finden Sie in der Dokumentation <strong>DOCs/de/network/README.txt</strong>.",
+       'ADMIN_ADD_NETWORK_REQUEST_PARAMETER_NOTICE' => "<strong>Hinweise:</strong> F&uuml;gen Sie hier weitere Abfrageparameter dem ausgw&auml;hlten Werbenetzwerk hinzu. Geben Sie keine Werte an, wie z.B. 5 Sekunden oder 30 Mails, geben Sie bei Abfrageparameter den GET- bzw. POST-Parameternamen an.",
+       'ADMIN_LIST_NETWORK_REQUEST_PARAMETER_NOTICE' => "<strong>Hinweise:</strong> Seien Sie mit dem L&ouml;schen und Editieren von Abfrageparameter sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten. Dokumentation zu den Abfragenamen (&#37;FOO&#37;, &#37;BAR&#37; usw.) finden Sie in der Dokumentation <strong>DOCs/de/network/README.txt</strong>.",
+       'ADMIN_LIST_NETWORK_VCHECK_PARAMETER_NOTICE' => "<strong>Hinweise:</strong> Seien Sie mit dem L&ouml;schen und Editieren von VCheck-Abfrageparameter sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten.",
+       'ADMIN_ADD_NETWORK_ARRAY_TRANSLATION_NOTICE' => "<strong>Hinweise:</strong> F&uuml;gen Sie hier weitere Array-Element-&Uuml;bersetzungen zu dem ausgew&auml;hlten Netzwerk und Werbeart-Handler ein.",
+       'ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_NOTICE' => "<strong>Hinweise:</strong> Seien Sie mit dem Editieren bzw. L&ouml;schen von Array-Elementen sehr vorsichtig, die API-Abfrage k&ouml;ntte unerwartete Ergebnisse bzw. Fehler zur&uuml;ckliefern.",
+       'ADMIN_NETWORK_REQUIRE_ID_CARD_NOTICE' => "<strong>Hinweise:</strong> Unter <strong>{--ADMIN_NETWORK_REQUIRE_ID_CARD--}</strong> ist das durch den Webnetzwerkbetreiber Verlangen einer Kopie des Personalausweises bzw. Gewerbescheins zu verstehen. Mehr dazu erfahen Sie <a href=\"http://forum.mxchange.org/topic-499.html\" rel=\"external\" target=\"_blank\">im Forum</a>.",
+       'ADMIN_CONFIG_NETWORK_API_NOTICE' => "<strong>Hinweise:</strong> Geben Sie unter <strong>{--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_BUTTON--}</strong> 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 <strong>keinen</strong> HTML-Code ein.",
+       'ADMIN_CONFIG_NETWORK_HANDLER_TYPES_NOTICE' => "<strong>Hinweise:</strong> F&uuml;r jede Werbeart sind unterschiedliche Reloadsperren, Mindestauffenthalte und mehr einstellbar. Damit ist es m&ouml;glich, dass Sie z.B. f&uuml;r Forced-Banner eine k&uuml;rzere/l&auml;ngere Reloadsperre eingeben k&ouml;nnen als f&uuml;r Paidmails.",
+       'ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_FORM_NOTICE' => "<strong>Hinweise:</strong>Bitte beachten Sie, dass Sie nicht f&uuml;r jedes Werbenetzwerk jede Einstellung etwas einstellen m&uuml;ssen. Dies h&auml;ngt vom jeweiligen Werbenetzwerk ab. Bitte beachten Sie auch, dass es sich beim Feld <strong>{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALLOW_EROTIC--}</strong> um ein frei eingebares Feld handelt. Den genauen Wert entnehmen Sie bitte derzeit aus Ihrem Affiliate-Bereich, da dieser nicht bei allen Werbenetzwerken einheitlich ist. Sollte das Werbenetzwerk Ihnen einen Wert nicht angeben, so lassen Sie das entsprechende Feld einfach leer. Stellen Sie unter <strong>{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME_UNMASKED--}</strong> nur Werte ein, die auch vom Werbenetzwerk unterst&uuml;tzt werden. Die meisten werden zwar Stunden anbieten, es sollen aber auch Werbenetzwerke mit anderen Reloadsperreinheiten als Stunden unsterst&uuml;tzt werden. Sp&auml;ter bei der API-Abfrage wird der eingestellte Wert auf die angezeigte Zeiteinheit umgerechnet und gek&uuml;rzt. Die Einstellung <strong>{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_SIZE--}</strong> muss nur f&uuml;r Surfbar-Handler gestetzt werden, da dieser nicht zwischen den einzelnen Formatgr&ouml;&szlig;en weiter unterscheidet.",
+       'ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_FORM_NOTICE' => "<strong>Hinweise:</strong> {--ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_FORM_NOTICE--}",
+       'ADMIN_ADD_NETWORK_VCHECK_PARAMETER_NOTICE' => "<strong>Hinweise:</strong> F&uuml;gen Sie hier weitere VCheck-Abfrageparameter dem ausgew&auml;hlten Werbenetzwerk hinzu, falls dieses den Verg&uuml;tungscheck unterst&uuml;tzt, anderfalls f&uuml;gen Sie einfach keine VCheck-Parameter hinzu.",
        // - Other messages
-       'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE' => "Es wurden nur die Abfrageparameter des ausgew&auml;hlten Werbeart-Handlers angezeigt.",
-       'ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_LIMITED_TO_TYPE' => "Es wurden nur die Array-Element-&Uuml;bersetzungen des ausgew&auml;hlten Werbeart-Handlers angezeigt.",
+       'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE' => "Es werden nur die Abfrageparameter des ausgew&auml;hlten Werbeart-Handlers angezeigt.",
+       'ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_LIMITED_TO_TYPE' => "Es werden nur die Array-Element-&Uuml;bersetzungen des ausgew&auml;hlten Werbeart-Handlers angezeigt.",
+       // - Task extension
+       'ADMIN_TASK_LIST_NETWORK_HEADER_LOG' => "HTTP-Header von API-Abfragen",
+       'ADMIN_TASK_LIST_NETWORK_HEADER_LOG_TITLE' => "Es wurden HTTP-Header bei Abfragen von Werbenetzwerk-APIs gefunden.",
        // - Advertise types
        'ADMIN_NETWORK_TYPE_HANDLER_BANNER' => "Banner Klick/View",
        'ADMIN_NETWORK_TYPE_HANDLER_BANNER_CLICK' => "Banner Klick",
@@ -169,14 +176,17 @@ addMessages(array(
        'ADMIN_NETWORK_TYPE_HANDLER_SURFBAR' => "Surfbar Klick/View", // This is a software surfbar outside the browser window (mostly Windows-only)
        'ADMIN_NETWORK_TYPE_HANDLER_SURFBAR_CLICK' => "Surfbar Klick",
        'ADMIN_NETWORK_TYPE_HANDLER_SURFBAR_VIEW' => "Surfbar View",
-       'ADMIN_NETWORK_TYPE_HANDLER_FORCEDBANNER' => "Forced-Banner",
-       'ADMIN_NETWORK_TYPE_HANDLER_FORCEDTEXTLINK' => "Forced-Textlink",
+       'ADMIN_NETWORK_TYPE_HANDLER_FORCED_BANNER' => "Forced-Banner",
+       'ADMIN_NETWORK_TYPE_HANDLER_FORCED_BUTTON' => "Forced-Button",
+       'ADMIN_NETWORK_TYPE_HANDLER_FORCED_HALF_BANNER' => "Forced-Half-Banner",
+       'ADMIN_NETWORK_TYPE_HANDLER_FORCED_SKYSCRAPER' => "Forced-Skyscraper",
+       'ADMIN_NETWORK_TYPE_HANDLER_FORCED_TEXTLINK' => "Forced-Textlink",
        'ADMIN_NETWORK_TYPE_HANDLER_TEXTLINK' => "Textlink Klick/View",
        'ADMIN_NETWORK_TYPE_HANDLER_TEXTLINK_CLICK' => "Textlink Klick",
        'ADMIN_NETWORK_TYPE_HANDLER_TEXTLINK_VIEW' => "Textlink View",
-       'ADMIN_NETWORK_TYPE_HANDLER_SKYBANNER' => "Sky Klick/View",
-       'ADMIN_NETWORK_TYPE_HANDLER_SKYBANNER_CLICK' => "Sky Klick",
-       'ADMIN_NETWORK_TYPE_HANDLER_SKYBANNER_VIEW' => "Sky View",
+       'ADMIN_NETWORK_TYPE_HANDLER_SKYSCRAPER' => "Skyscraper Klick/View",
+       'ADMIN_NETWORK_TYPE_HANDLER_SKYSCRAPER_CLICK' => "Skyscraper Klick",
+       'ADMIN_NETWORK_TYPE_HANDLER_SKYSCRAPER_VIEW' => "Skyscraper View",
        'ADMIN_NETWORK_TYPE_HANDLER_HALFBANNER' => "Half-Banner Klick/View",
        'ADMIN_NETWORK_TYPE_HANDLER_HALFBANNER_CLICK' => "Half-Banner Klick",
        'ADMIN_NETWORK_TYPE_HANDLER_HALFBANNER_VIEW' => "Half-Banner View",
@@ -191,11 +201,24 @@ addMessages(array(
        'ADMIN_NETWORK_TYPE_HANDLER_SALE' => "Sale",
        'ADMIN_NETWORK_TYPE_HANDLER_LEAD_SALE' => "Lead/Sale",
        'ADMIN_NETWORK_TYPE_HANDLER_PAYPERACTIVE' => "PayPerAktiv",
-       'ADMIN_NETWORK_TYPE_HANDLER_PAGEPEEL' => "Page-Peel",
+       'ADMIN_NETWORK_TYPE_HANDLER_PAGEPEEL' => "Page-Peel Klick/View",
+       'ADMIN_NETWORK_TYPE_HANDLER_PAGEPEEL_CLICK' => "Page-Peel Klick",
+       'ADMIN_NETWORK_TYPE_HANDLER_PAGEPEEL_VIEW' => "Page-Peel View",
        'ADMIN_NETWORK_TYPE_HANDLER_TRAFFIC' => "Traffic", // These are visitor exchanges like ext-surfbar!
        'ADMIN_NETWORK_TYPE_HANDLER_SIGNATURE' => "Signatur Klick/View",
        'ADMIN_NETWORK_TYPE_HANDLER_SIGNATURE_CLICK' => "Signatur Klick",
        'ADMIN_NETWORK_TYPE_HANDLER_SIGNATURE_VIEW' => "Signatur View",
+       // - Media output types
+       'ADMIN_NETWORK_MEDIA_OUTPUT_UNKNOWN' => "---",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_NONE' => "Nicht verwendet",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_BANNER' => "Banner",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_HTML_EMAIL' => "HTML-eMail",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_LAYER' => "Layer",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_PAGEPEEL' => "PagePeel",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_POPUP' => "PopUp",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_POPDOWN' => "PopDown",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_TEXT_EMAIL' => "Text-eMail",
+       'ADMIN_NETWORK_MEDIA_OUTPUT_TEXTLINK' => "Textlink",
        // - Sponsor networks
        'ADMIN_LIST_NEWORK_DATA_TITLE' => "Auflistung der Grunddaten aller Werbenetzwerke",
        'ADMIN_NETWORK_NONE_SUPPORTED' => "Es sind noch keine Werbenetzwerke eingerichtet.",
@@ -210,10 +233,12 @@ addMessages(array(
        'ADMIN_NETWORK_CHARSET' => "Zeichensatz:",
        'ADMIN_NETWORK_REQUIRE_ID_CARD' => "Gewerbeanmeldung verlangt?",
        'ADMIN_NETWORK_REQUIRE_ID_CARD_SHORT' => "Gewerbeanm.?",
+       'ADMIN_NETWORK_REQUIRE_ID_CARD_SELECT' => "Gewerbeanmeldung:",
        'ADMIN_NETWORK_SEPARATOR' => "Trennzeichen:",
        'ADMIN_NETWORK_DATA_SEPARATOR2' => "Daten:",
        'ADMIN_NETWORK_ROW_SEPARATOR2' => "Zeilen:",
        'ADMIN_NETWORK_QUERY_AMOUNT' => "Freie API-Abfragen t&auml;glich:",
+       'ADMIN_NETWORK_QUERY_AMOUNT_SELECT' => "Freie Abfragen:",
        // - Advertise type
        'ADMIN_NETWORK_TYPE_HANDLER' => "Werbeart-Handler:",
        'ADMIN_NETWORK_TYPE_HANDLER_API_URL' => "API-URL der Werbeart:",
@@ -232,7 +257,7 @@ addMessages(array(
        'ADMIN_NETWORK_REQUEST_PARAMETER_DEFAULT' => "Ausgangswert:",
        // - API request parameter keys
        'ADMIN_NETWORK_REQUEST_PARAMETER_AFFILIATE_ID' => "Affiliate-/Publisher-Id",
-       'ADMIN_NETWORK_REQUEST_PARAMETER_SID' => "Webseiten-Id",
+       'ADMIN_NETWORK_REQUEST_PARAMETER_SITE_ID' => "Webseiten-Id",
        'ADMIN_NETWORK_REQUEST_PARAMETER_HASH' => "Webseiten-Hash",
        'ADMIN_NETWORK_REQUEST_PARAMETER_PASSWORD' => "Interface-Kennwort",
        'ADMIN_NETWORK_REQUEST_PARAMETER_RELOAD' => "Maximale Reloadzeit",
@@ -240,7 +265,8 @@ addMessages(array(
        'ADMIN_NETWORK_REQUEST_PARAMETER_MAXIMUM_STAY' => "Maximaler Auffenthalt",
        'ADMIN_NETWORK_REQUEST_PARAMETER_CURRENCY' => "W&auml;hrung",
        'ADMIN_NETWORK_REQUEST_PARAMETER_TYPE' => "Typ (z.B. click/view)",
-       'ADMIN_NETWORK_REQUEST_PARAMETER_REMAIN' => "Mindestanzahl restlicher Klicks",
+       'ADMIN_NETWORK_REQUEST_PARAMETER_REMAIN_BUDGET' => "Mindestanzahl restliches Budget",
+       'ADMIN_NETWORK_REQUEST_PARAMETER_REMAIN_CLICKS' => "Mindestanzahl restlicher Klicks",
        'ADMIN_NETWORK_REQUEST_PARAMETER_REWARD' => "Mindestverg&uuml;tung",
        'ADMIN_NETWORK_REQUEST_PARAMETER_SIZE' => "Werbemittelgr&ouml;sse",
        'ADMIN_NETWORK_REQUEST_PARAMETER_EROTIC' => "Erotik erlaubt",
@@ -261,7 +287,7 @@ addMessages(array(
        'ADMIN_NETWORK_VCHECK_PARAMETER_EXTRA_VALUE2' => "Zusatzparameter 2",
        'ADMIN_NETWORK_VCHECK_PARAMETER_EXTRA_VALUE3' => "Zusatzparameter 3",
        'ADMIN_NETWORK_VCHECK_PARAMETER_EXTRA_VALUE4' => "Zusatzparameter 4",
-       'ADMIN_NETWORK_VCHECK_PARAMETER_SID' => "Seiten-Id",
+       'ADMIN_NETWORK_VCHECK_PARAMETER_SITE_ID' => "Seiten-Id",
        'ADMIN_NETWORK_VCHECK_PARAMETER_STATUS' => "Status der Verg&uuml;tung",
        'ADMIN_NETWORK_VCHECK_PARAMETER_REASON' => "Grund des Fehlers",
        // - API array index translation
@@ -276,7 +302,8 @@ addMessages(array(
        '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 <span class=\"data\">%s</span>:",
+       'ADMIN_CONFIG_NETWORK_API_REMAINING_REQUESTS' => "Noch verbleibene API-Abfragen:",
+       'ADMIN_CONFIG_NETWORK_API_TITLE' => "API-Zugangsdaten zum Werbenetzwerk <span class=\"data\">{%%network,generateMetworkReferralLinkById=%s%%}</span>:",
        'ADMIN_CONFIG_NETWORK_API_SAVE_BUTTON' => "API-Konfiguration speichern",
        'ADMIN_CONFIG_NETWORK_API_SAVED' => "API-Konfiguration gespeichert.",
        'ADMIN_CONFIG_NETWORK_API_NOT_SAVED' => "API-Konfiguration NICHT gespeichert (keine &Auml;nderungen).",
@@ -287,16 +314,21 @@ addMessages(array(
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPES_404' => "Es wurden keine Daten zur Werbenetzwerk-Id <span class=\"data\">%s</span> gefunden. Bitte benachrichtigen Sie das Entwickler-Team.",
        'ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_404' => "Dieser Werbeart-Handler wurde noch nicht eingerichtet. {--ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_404_NOTICE--} Bitte richten Sie diesen als n&auml;chstes ein und f&uuml;hren Sie danach eine Testabfrage aus.",
        'ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_404_NOTICE' => "Damit das Script auch das Interface des Werbenetzwerks ansprechen kann, muss ein Werbeart-Handler eingerichtet werden.",
-       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME' => "Reloadsperre:",
-       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_WAITING_TIME' => "Mindestauffenthalt in Sekunden:",
+       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME' => "Reloadsperre (<span class=\"data\">{%%pipe,translateTimeUnit=%s%%}</span>):",
+       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME_UNMASKED' => "Reloadsperre:",
+       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_WAITING_TIME' => "Mindestauffenthalt:",
+       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_WAITING_TIME' => "Maximaler Auffenthalt:",
+       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_BUDGET' => "Mindestanzahl noch &uuml;briges Budget:",
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_CLICKS' => "Mindestanzahl noch &uuml;brige Klicks:",
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_PAYMENT' => "Mindestverg&uuml;tung (maximal f&uuml;nf Stellen hinterm Komma):",
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALLOW_EROTIC' => "Wert f&uuml;r das Zulassen von Erotikkampagnen:",
+       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_SIZE' => "Wert f&uuml;r Media-Gr&ouml;&szlig;e (z.B. 468x60, 88x31, all):",
+       'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_OUTPUT' => "Art der Werbeform (z.B. bei Lead/Sale):",
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_SAVED' => "Werbeart-Handler wurde gespeichert und ist sofort g&uuml;ltig.",
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_SAVED' => "Werbeart-Handler wurde(n) NICHT gespeichert.",
        'ADMIN_NETWORK_HANDLER_TYPE_HANDLER_NOT_CONFIGURED' => "Werart-Handler wurde noch nicht eingerichtet. Bitte verwenden Sie dazu das passende Formular.",
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_CHANGED' => "Werbeart-Handler wurde(n) NICHT ge&auml;ndert.",
-       'ADMIN_CONFIG_NETWORK_HANDLER_SET_ALL' => "Diese Einstellungen f&uuml;r alle Werbeart-Handler konfigurieren:",
+       'ADMIN_CONFIG_NETWORK_HANDLER_SET_ALL' => "Diese Einstellungen f&uuml;r alle Werbeart-Handler des ausgew&auml;hlten Werbenetzwerkes konfigurieren:",
        'ADMIN_CONFIG_NETWORK_HANDLER_SET_ALL_404' => "Es wurde beim &Uuml;bertragen der Einstellungen keine Werbeart-Handler gefunden.",
        'ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALL_HANDLER_SAVED' => "<strong>%s</strong> Werbeart-Handler wurden gespeichert.",
        // SQL export for all network tables
@@ -311,6 +343,16 @@ addMessages(array(
        'ADMIN_EXPORT_NETWORK_VCHECK_PARAMS_TITLE' => "Tabellenexport - VCheck-Abfrageparameter",
        'ADMIN_EXPORT_NETWORK_ARRAY_TRANSLATION_LINK' => "Antwort-Array-Elemente des aktuell angezeigten Werbenetzwerkes exportieren",
        'ADMIN_EXPORT_NETWORK_ARRAY_TRANSLATION_TITLE' => "Tabellenexport - Arrayfeld&uuml;bersetzungen",
+       // Querying APIs - error message
+       'ADMIN_NETWORK_QUERY_API_404' => "Sie haben noch keine Werbenetzwerke eingerichtet bzw. es wurden noch keine Werbeart-Handler von Ihnen eingerichtet. Bitte richten Sie nun mindestens ein Werbenetzwerk und mindestens ein Werbeart-Handler ein.",
+       // Querying APIs - submit buttons
+       'ADMIN_ACTION_QUERY_NETWORK_SUBMIT' => "Alle APIs des Werbenetzwerks abfragen",
+       'ADMIN_ACTION_QUERY_NETWORK_TYPE_SUBMIT' => "Werbart-Handler abfragen",
+       // Querying APIs - others
+       'ADMIN_QUERY_NETWORK_APIS_TITLE' => "APIs vom Werbenetzwerk <span class=\"data\">{%%network,generateMetworkReferralLinkById=%s%%}</span> abfragen",
+       'ADMIN_QUERY_NETWORK_TYPE' => "Einzelnen Werbeart-Handler abfragen",
+       'ADMIN_ACTION_QUERY_ALL_NETWORK_APIS_SUBMIT' => "Alle ausgew&auml;hlten Werbeart-Handler abfragen",
+       'ADMIN_NETWORK_QUERY_TYPE_OKAY' => "Das Werbenetzwerk <span class=\"data\">%s</span> wurde soeben abgefragt. Die Daten wurden zwischengespeichert f&uuml;r sp&auml;tere Verwendung und um die API-Anfragen zu reduzieren.",
        // 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&uuml;ltig",
@@ -322,6 +364,7 @@ addMessages(array(
        'ADMIN_NETWORK_REQUEST_PARAMETER_INCOMPLETE_ERROR_CODE' => "API-Abfrageparameter nicht komplett",
        'ADMIN_NETWORK_SITE_ID_NOT_ALLOWED_TYPE_ERROR_CODE' => "Seiten-Id nicht freigegeben",
        // Textual represations of column translate_name
+       'ADMIN_NETWORK_TRANSLATE_UNKNOWN_NAME' => "Unbekannt (<span class=\"data\">%s</span>)",
        'ADMIN_NETWORK_TRANSLATE_ALTERNATE_TEXT_NAME' => "Alternativer Bildtext",
        'ADMIN_NETWORK_TRANSLATE_BANNER_ID_NAME' => "Banner-Id",
        'ADMIN_NETWORK_TRANSLATE_TEXTLINK_ID_NAME' => "Textlink-Id",
@@ -338,7 +381,8 @@ addMessages(array(
        'ADMIN_NETWORK_TRANSLATE_MINIMUM_STAY_NAME' => "Mindestauffenthalt",
        'ADMIN_NETWORK_TRANSLATE_NAME_NAME' => "Kampagnen-Name",
        'ADMIN_NETWORK_TRANSLATE_RELOAD_NAME' => "Reloadzeit",
-       'ADMIN_NETWORK_TRANSLATE_REMAIN_NAME' => "Mindestanzahl restlicher Klicks",
+       'ADMIN_NETWORK_TRANSLATE_REMAIN_BUDGET_NAME' => "Mindestanzahl restliches Budget",
+       'ADMIN_NETWORK_TRANSLATE_REMAIN_CLICKS_NAME' => "Mindestanzahl restlicher Klicks",
        'ADMIN_NETWORK_TRANSLATE_REWARD_NAME' => "Mindestverg&uuml;tung",
        'ADMIN_NETWORK_TRANSLATE_SIZE_NAME' => "Werbemittelformat",
        'ADMIN_NETWORK_TRANSLATE_TEXT_NAME' => "Werbetext",
@@ -363,6 +407,16 @@ addMessages(array(
        'ADMIN_NETWORK_TRANSLATE_CLICK_URL_NAME' => "Klick-URL",
        'ADMIN_NETWORK_TRANSLATE_MEDIA_URL_NAME' => "Media-URL",
        'ADMIN_NETWORK_TRANSLATE_ALLOWED_COUNTRIES_NAME' => "Erlaubte L&auml;nder",
+       // Configuration
+       'ADMIN_CONFIG_NETWORK_TITLE' => "Konfiguration: Werbenetzwerk",
+       'ADMIN_CONFIG_NETWORK_CACHE_LEGEND' => "Einstellungen zum API-Cache:",
+       'ADMIN_CONFIG_NETWORK_CACHE_REFRESH' => "Maximailer Zeitabstand nachdem der API-Cache erneuert werden muss:",
+       'ADMIN_CONFIG_NETWORK_LOGGING_LEGEND' => "Einstellungen zum Header-Logging:",
+       'ADMIN_CONFIG_NETWORK_LOGGING_PURGE' => "Zeitabstand nachdem die Logging-Tabelle bereinigt werden soll:",
+       'ADMIN_CONFIG_NETWORK_LOGGING_DEBUG' => "Sollen zu Debugzwecken auch die Header von der API-Antwort geloggt werden, wo der HTTP-Status <em>200 OK</em> ist oder sollen nur fehlgeschlagene (z.B. 403, 404, 500 usw.) geloggt werden?",
+       'ADMIN_CONFIG_NETWORK_LOGGING_DEBUG_ENABLED' => "Alle Header loggen (auch 200 OK)",
+       'ADMIN_CONFIG_NETWORK_LOGGING_DEBUG_DISABLED' => "Nur fehlgeschlagene loggen",
+       'ADMIN_CONFIG_NETWORK_NOTICE' => "<strong>Hinweise:</strong> Der tatst&auml;gliche Zeitabstand zwischen automatischen API-Abfragen (per Cron) errechnet sich wie folgt: 24 Stunden in Sekunden geteilt durch Anzahl freie Abfragen pro Tag. Ist dabei der errechnete Wert gr&ouml;sser als wie der konfigurierte Zeitabstand (hier einstellbar), so wird dieser genommen und nicht der errechnete. Dabei kommt es dann vor, dass die freien Abfragen, die das Werbenetzwerk gibt, schneller abgelaufen sind, als der Tag um ist.",
 ));
 
 /*
index e50ce362a3a9b6f3e72e81c345232f853d9e3f5e..10fa2ec88a66436a5846f55ec37d50cedc23e582 100644 (file)
@@ -38,7 +38,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Check ACL for menu combination
 function isAdminsAllowedByAcl ($action, $what) {
@@ -159,7 +159,7 @@ LIMIT 1",
 
                // Free memory
                SQL_FREERESULT($result);
-       } elseif (isValidUserId($email)) {
+       } elseif (isValidId($email)) {
                // Direct id given
                $email = '{%url=modules.php?module=' . $mod . '&amp;what=admins_contct&amp;id=' . bigintval($email) . '%}';
        } else {
@@ -322,7 +322,7 @@ function adminsEditAdminAccount ($postData) {
                $id = bigintval($id);
 
                // Get the admin's data
-               $result = SQL_QUERY_ESC("SELECT `login`, `email` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC('SELECT `login`, `email` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1',
                        array($id), __FUNCTION__, __LINE__);
                if ((SQL_NUMROWS($result) == 1) && ($selected == 1)) {
                        // Entry found
@@ -415,7 +415,16 @@ function adminsDeleteAdminAccount ($postData) {
                        $id = bigintval($id);
 
                        // Get the admin's data
-                       $result = SQL_QUERY_ESC("SELECT `login`, `email`, `default_acl` AS `access_mode`, `la_mode` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+                       $result = SQL_QUERY_ESC('SELECT
+       `login`,
+       `email`,
+       `default_acl` AS `access_mode`,
+       `la_mode`
+FROM
+       `{?_MYSQL_PREFIX?}_admins`
+WHERE
+       `id`=%s
+LIMIT 1',
                                array($id), __FUNCTION__, __LINE__);
 
                        // Is there an entry?
@@ -455,11 +464,11 @@ function adminsRemoveAdminAccount ($postData) {
                // Delete only when it's not your own account!
                if (($del == 1) && (getCurrentAdminId() != $id)) {
                        // Rewrite his tasks to all admins
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=NULL WHERE `assigned_admin`=%s",
+                       SQL_QUERY_ESC('UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=NULL WHERE `assigned_admin`=%s',
                                array($id), __FUNCTION__, __LINE__);
 
                        // Remove account
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+                       SQL_QUERY_ESC('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1',
                                array($id), __FUNCTION__, __LINE__);
                }
        }
@@ -563,7 +572,7 @@ function sendAdminsEmails ($subject, $template, $content, $userid) {
                                __FUNCTION__, __LINE__);
                } else {
                        // If Admin-Id is not "to-all" select
-                       $result = SQL_QUERY_ESC("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id` IN (%s) ORDER BY `id` ASC",
+                       $result = SQL_QUERY_ESC('SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id` IN (%s) ORDER BY `id` ASC',
                                array($adminId), __FUNCTION__, __LINE__);
                }
        }
@@ -603,7 +612,7 @@ function getAminsExpertSettings () {
                incrementStatsEntry('cache_hits');
        } elseif (!isExtensionInstalled('cache')) {
                // Load from database
-               $result = SQL_QUERY_ESC("SELECT `expert_settings` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC('SELECT `expert_settings` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1',
                        array($adminId), __FUNCTION__, __LINE__);
 
                // Entry found?
@@ -640,7 +649,7 @@ function getAminsExpertWarning () {
                incrementStatsEntry('cache_hits');
        } elseif (!isExtensionInstalled('cache')) {
                // Load from database
-               $result = SQL_QUERY_ESC("SELECT `expert_warning` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC('SELECT `expert_warning` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1',
                        array($adminId), __FUNCTION__, __LINE__);
 
                // Entry found?
@@ -679,7 +688,7 @@ function getAdminLoginFailures ($adminId) {
                incrementStatsEntry('cache_hits');
        } elseif (!isExtensionActive('cache')) {
                // Load from database
-               $result = SQL_QUERY_ESC("SELECT `login_failures` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC('SELECT `login_failures` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1',
                        array($adminId), __FUNCTION__, __LINE__);
 
                // Is there an entry?
@@ -715,7 +724,7 @@ function getAdminLastFailure ($adminId) {
                incrementStatsEntry('cache_hits');
        } elseif (!isExtensionActive('cache')) {
                // Load from database
-               $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`last_failure`) AS `last_failure` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC('SELECT UNIX_TIMESTAMP(`last_failure`) AS `last_failure` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1',
                        array($adminId), __FUNCTION__, __LINE__);
 
                // Is there an entry?
index e1b5526b3e22f51c9c814aba20083f63c99538a3..bf2b9d71cc5c00fbf661faf06f221dbce89dada9 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 // Add points in autopurge-mode
 function addPointsAutoPurge ($userid, $points) {
        // Is the userid valid?
-       if (!isValidUserId($userid)) {
+       if (!isValidId($userid)) {
                // Please report all these bugs
                reportBug(__FUNCTION__, __LINE__, 'Invalid call. userid=' . $userid . ',points=' . $points);
        } // END - if
index 94fbd26d3488fd5951b5acf47f363bf0728bfab8..8d96d1d25b463b607f151088fc2683a873d92376 100644 (file)
@@ -60,7 +60,7 @@ function addPointsBeg ($userid, $points) {
        }
 
        // Subtract begged points from member account if the admin has selected one
-       if (($added === TRUE) && (isValidUserId(getBegUserid()))) {
+       if (($added === TRUE) && (isValidId(getBegUserid()))) {
                // Subtract from this account
                $added = ($added && subtractPoints('beg_payout', getBegUserid(), $points));
        } // END - if
index befed20d39f3ca9c149ce41e8452636fc2067e68..e1e6fee8762ac691aa8394b39ce3ee945073eebb 100644 (file)
@@ -215,7 +215,7 @@ function handleBonusPoints ($mode, $userid) {
        $return = FALSE;
 
        // Switch to jackpot-mode when no UID is supplied but userid-mode is selected
-       if ((getBonusMode() == 'UID') && ($userid == '0') && (isExtensionActive('jackpot'))) {
+       if ((getBonusMode() == 'UID') && (!isValidId($userid)) && (isExtensionActive('jackpot'))) {
                // Update database & config
                updateConfiguration('bonus_mode', 'JACKPOT');
        } // END - if
@@ -238,7 +238,7 @@ function handleBonusPoints ($mode, $userid) {
                        break;
 
                case 'JACKPOT': // ... jackpot
-                       if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) === FALSE) && (isValidUserId($userid))) {
+                       if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) === FALSE) && (isValidId($userid))) {
                                if ($total >= $points) {
                                        // Subtract points from userid's account
                                        $return = subtractPointsFromJackpot('bonus_payout_jackpot', $userid, $points);
index 6ca451b69a3fe7d4e567e502d5edf9ba693bb061..9734b6037790c1779dfbd048a808ecaa6c2f1b40 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 // @TODO Lame description
 function generateDoublerTable ($userid = NULL, $done = 'N', $ref = 'N', $sort = 'ASC') {
        $add = ''; $DT_MODE = '0';
-       if (isValidUserId($userid)) {
+       if (isValidId($userid)) {
                // Load entries only from a single user
                $add = sprintf(" AND `userid`=%s", bigintval($userid));
                $mode = 'member'; $COLS = 4; $DT_MODE = 2;
@@ -100,8 +100,8 @@ LIMIT %s",
                                $content['refid']  = '---';
 
                                // Set links to admin area
-                               if (isValidUserId($content['userid'])) $content['userid'] = generateUserProfileLink($content['userid']);
-                               if (isValidUserId($content['refid']))  $content['refid']  = generateUserProfileLink($content['refid']);
+                               if (isValidId($content['userid'])) $content['userid'] = generateUserProfileLink($content['userid']);
+                               if (isValidId($content['refid']))  $content['refid']  = generateUserProfileLink($content['refid']);
                        } // END - if
 
                        // Prepare data for the row template
@@ -143,7 +143,7 @@ function getDoublerTotalPointsLeft() {
                if (!empty($jackpot)) $points += $jackpot;
        } // END - if
 
-       if (isValidUserId(getDoublerUserid())) {
+       if (isValidId(getDoublerUserid())) {
                // Get user's points
                $user = getTotalPoints(getDoublerUserid());
                $points += $user;
index eb6ac6cb64ff67f90c748274c04374614ddd434e..8309fc0002adbe9fb3c4f073723e9037e34d2ced 100644 (file)
@@ -130,7 +130,7 @@ function getForcedPopupDataByEarningArray ($content) {
 }
 
 // Generator (somewhat getter) for forced-ads type options
-function generateForcedAdsTypeOptions ($type =  NULL) {
+function generateForcedAdsTypeOptions ($type = NULL) {
        // Is this cached?
        if (!isset($GLOBALS[__FUNCTION__][$type])) {
                // Generate output and cache it
@@ -154,7 +154,7 @@ function generateForcedAdsTypeOptions ($type =  NULL) {
 }
 
 // Generator (somewhat getter) for forcec-costs visibility options
-function generateForcedCostsVisibilityOptions ($visibility =  NULL) {
+function generateForcedCostsVisibilityOptions ($visibility = NULL) {
        // Is this cached?
        if (!isset($GLOBALS[__FUNCTION__][$visibility])) {
                // Generate output and cache it
@@ -353,7 +353,7 @@ function changeForcedCampaignStatus ($campaignId, $prevStatus, $newStatus, $data
        $newStatus = strtolower($newStatus);
 
        // Prepare array
-       $filterData =  array(
+       $filterData = array(
                'campaign_id' => $campaignId,
                'prev_status' => $prevStatus,
                'new_status'  => $newStatus,
@@ -424,7 +424,7 @@ function doForcedNotifyAdmin ($messageType, $content) {
 // Notify the user about the performed action
 function doForcedNotifyMember ($messageType, $content) {
        // Skip notification if userid is NULL
-       if (!isValidUserId($content['forced_campaign_userid'])) {
+       if (!isValidId($content['forced_campaign_userid'])) {
                // NULL is silently ignored
                return TRUE;
        } // END - if
index 1ec81ad88917f19e1bbe9894293b42af3b97d163..05c7927de4707b35932ecacd154a8426eee25bba 100644 (file)
@@ -50,6 +50,22 @@ function getCurrentNetworkId () {
        return $GLOBALS['current_network_id'];
 }
 
+// Checks whether the current network id is set
+function isCurrentNetworkIdSet () {
+       // So is it there?
+       return isset($GLOBALS['current_network_id']);
+}
+
+// Getter for network_form_name
+function getNetworkFormName () {
+       return $GLOBALS['network_form_name'];
+}
+
+// Setter for network_form_name
+function setNetworkFormName ($networkFormName) {
+       $GLOBALS['network_form_name'] = (string) $networkFormName;
+}
+
 // Detects if a supported form has been sent
 function detectNetworkProcessForm () {
        // 'do' must be provided in URL
@@ -59,14 +75,14 @@ function detectNetworkProcessForm () {
        } // END - if
 
        // Default is invalid
-       $GLOBALS['network_form_name'] = 'invalid';
+       setNetworkFormName('invalid');
 
        // Now search all valid
        foreach (array('save_config', 'add', 'edit', 'delete', 'do_edit', 'do_delete') as $formName) {
                // Is it detected
                if (isFormSent($formName)) {
                        // Use this form name
-                       $GLOBALS['network_form_name'] = $formName;
+                       setNetworkFormName($formName);
 
                        // Remove it generically here
                        unsetPostRequestElement($formName);
@@ -77,7 +93,7 @@ function detectNetworkProcessForm () {
        } // END - foreach
 
        // Has the form being detected?
-       if ($GLOBALS['network_form_name'] == 'invalid') {
+       if (getNetworkFormName() == 'invalid') {
                // Not supported
                reportBug(__FUNCTION__, __LINE__, 'POST form could not be detected, postData=<pre>' . print_r(postRequestArray(), TRUE));
        } // END - if
@@ -159,8 +175,8 @@ function getNetworkActivatedColumn ($whereAnd = 'WHERE', $table = '') {
                // Default is exclude deactivated networks
                $GLOBALS[__FUNCTION__][$whereAnd][$table] = ' ' . $whereAnd . ' ' . $table . "`network_active`='Y'";
 
-               // Is the export setting on?
-               if (isAdminsExpertSettingEnabled()) {
+               // Is the export setting on and debug mode enabled?
+               if ((isAdminsExpertSettingEnabled()) && (isDebugModeEnabled())) {
                        // Then allow all networks
                        $GLOBALS[__FUNCTION__][$whereAnd][$table] = '';
                } // END - if
@@ -251,7 +267,7 @@ function isNetworkArrayTranslationValid ($key, $type, $networkId) {
 // "Getter" for a network's data by provided id number
 function getNetworkDataById ($networkId, $column = '') {
        // Ids lower one are not accepted
-       if ($networkId < 1) {
+       if (!isValidId($networkId)) {
                // Not good, should be fixed
                reportBug(__FUNCTION__, __LINE__, 'Network id ' . $networkId . ' is smaller than 1.');
        } elseif ((!isNetworkActiveById($networkId)) && (!isAdminsExpertSettingEnabled())) {
@@ -264,7 +280,7 @@ function getNetworkDataById ($networkId, $column = '') {
 
        // Is it cached?
        if (!isset($GLOBALS['network_data'][$networkId])) {
-               // By default we have no data
+               // By default there is no data
                $GLOBALS['network_data'][$networkId] = array();
 
                // Query for the network data
@@ -310,56 +326,52 @@ LIMIT 1',
 }
 
 // "Getter" for a network's data by provided type id number
-function getNetworkDataByTypeId ($networkId, $column = '') {
+function getNetworkDataByTypeId ($networkTypeId, $column = '') {
        // Ids lower one are not accepted
-       if ($networkId < 1) {
+       if (!isValidId($networkTypeId)) {
                // Not good, should be fixed
-               reportBug(__FUNCTION__, __LINE__, 'Network type id ' . $networkId . ' is smaller than 1.');
-       } elseif ((!isNetworkActiveById($networkId)) && (!isAdminsExpertSettingEnabled())) {
-               // Do not load inactive network data
-               reportBug(__FUNCTION__, __LINE__, 'Network id ' . $networkId . ' is not active.');
-       }
-
-       // Set current network id
-       setCurrentNetworkId($networkId);
+               reportBug(__FUNCTION__, __LINE__, 'Network type id ' . $networkTypeId . ' is smaller than 1.');
+       } // END - if
 
        // Is it cached?
-       if (!isset($GLOBALS['network_data'][$networkId])) {
-               // By default we have no data
-               $GLOBALS['network_data'][$networkId] = array();
+       if (!isset($GLOBALS['network_type_data'][$networkTypeId])) {
+               // By default there is no data
+               $GLOBALS['network_type_data'][$networkTypeId] = array();
 
                // Query for the network data
                $result = SQL_QUERY_ESC('SELECT
-       d.`network_id`,
-       d.`network_short_name`,
-       d.`network_title`,
-       d.`network_reflink`,
-       d.`network_data_separator`,
-       d.`network_row_separator`,
-       d.`network_request_type`,
-       d.`network_charset`,
-       d.`network_require_id_card`,
-       d.`network_query_amount`,
-       t.`network_type_handler`,
-       t.`network_type_api_url`,
-       t.`network_type_click_url`,
-       t.`network_type_banner_url`,
-       t.`network_text_encoding`
+       `d`.`network_id`,
+       `d`.`network_short_name`,
+       `d`.`network_title`,
+       `d`.`network_reflink`,
+       `d`.`network_data_separator`,
+       `d`.`network_row_separator`,
+       `d`.`network_request_type`,
+       `d`.`network_charset`,
+       `d`.`network_require_id_card`,
+       `d`.`network_query_amount`,
+       `d`.`network_active`,
+       `t`.`network_type_id`,
+       `t`.`network_type_handler`,
+       `t`.`network_type_api_url`,
+       `t`.`network_type_click_url`,
+       `t`.`network_type_banner_url`,
+       `t`.`network_text_encoding`
 FROM
-       `{?_MYSQL_PREFIX?}_network_data` AS d
+       `{?_MYSQL_PREFIX?}_network_data` AS `d`
 LEFT JOIN
-       `{?_MYSQL_PREFIX?}_network_types` AS t
+       `{?_MYSQL_PREFIX?}_network_types` AS `t`
 ON
-       d.`network_id`=t.`network_id`
+       `d`.`network_id`=`t`.`network_id`
 WHERE
-       t.`network_type_id`=%s
+       `t`.`network_type_id`=%s
 LIMIT 1',
-                       array(bigintval($networkId)), __FUNCTION__, __LINE__);
+                       array(bigintval($networkTypeId)), __FUNCTION__, __LINE__);
 
                // Is there an entry?
                if (SQL_NUMROWS($result) == 1) {
                        // Then get it
-                       $GLOBALS['network_data'][$networkId] = SQL_FETCHARRAY($result);
+                       $GLOBALS['network_type_data'][$networkTypeId] = SQL_FETCHARRAY($result);
                } // END - if
 
                // Free result
@@ -367,28 +379,33 @@ LIMIT 1',
        } // END - if
 
        // Return result
-       if (empty($column)) {
+       if (!isset($GLOBALS['network_type_data'][$networkTypeId])) {
+               // Not found
+               return NULL;
+       } elseif (empty($column)) {
                // Return array
-               return $GLOBALS['network_data'][$networkId];
+               return $GLOBALS['network_type_data'][$networkTypeId];
        } else {
                // Return column
-               return $GLOBALS['network_data'][$networkId][$column];
+               return $GLOBALS['network_type_data'][$networkTypeId][$column];
        }
 }
 
 // "Getter" for a network type data by provided id number
-function getNetworkTypeDataById ($networkTypeId) {
+function getNetworkTypeDataByTypeId ($networkTypeId) {
        // Ids lower one are not accepted
-       if ($networkTypeId < 1) {
+       if (!isValidId($networkTypeId)) {
                // Not good, should be fixed
                reportBug(__FUNCTION__, __LINE__, 'Network type id ' . $networkTypeId . ' is smaller than 1.');
        } // END - if
 
-       // By default we have no data
-       $GLOBALS['network_type_data'][$networkTypeId] = array();
+       // Is it set?
+       if (!isset($GLOBALS['network_type_data'][$networkTypeId])) {
+               // By default there is no data
+               $GLOBALS['network_type_data'][$networkTypeId] = array();
 
-       // Query for the network data
-       $result = SQL_QUERY_ESC('SELECT
+               // Query for the network data
+               $result = SQL_QUERY_ESC('SELECT
        `network_type_id`,
        `network_id`,
        `network_type_handler`,
@@ -400,30 +417,77 @@ FROM
 WHERE
        `network_type_id`=%s
 LIMIT 1',
-               array(bigintval($networkTypeId)), __FUNCTION__, __LINE__);
+                       array(bigintval($networkTypeId)), __FUNCTION__, __LINE__);
 
-       // Is there an entry?
-       if (SQL_NUMROWS($result) == 1) {
-               // Then get it
-               $GLOBALS['network_type_data'][$networkTypeId] = SQL_FETCHARRAY($result);
-       } // END - if
+               // Is there an entry?
+               if (SQL_NUMROWS($result) == 1) {
+                       // Then get it
+                       $GLOBALS['network_type_data'][$networkTypeId] = SQL_FETCHARRAY($result);
+               } // END - if
 
-       // Free result
-       SQL_FREERESULT($result);
+               // Free result
+               SQL_FREERESULT($result);
+       } // END - if
 
        // Return result
        return $GLOBALS['network_type_data'][$networkTypeId];
 }
 
+// "Getter" for all network type data by provided id number
+function getNetworkTypeDataById ($networkId) {
+       // Ids lower one are not accepted
+       if (!isValidId($networkId)) {
+               // Not good, should be fixed
+               reportBug(__FUNCTION__, __LINE__, 'Network type id ' . $networkId . ' is smaller than 1.');
+       } // END - if
+
+       // Is it set?
+       if (!isset($GLOBALS['network_types'][$networkId])) {
+               // By default there is no data
+               $GLOBALS['network_types'][$networkId] = array();
+
+               // Query for the network data
+               $result = SQL_QUERY_ESC('SELECT
+       `network_type_id`,
+       `network_id`,
+       `network_type_handler`,
+       `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($networkId)), __FUNCTION__, __LINE__);
+
+               // Is there an entry?
+               if (!SQL_HASZERONUMS($result)) {
+                       // Then add all
+                       while ($row = SQL_FETCHARRAY($result)) {
+                               // Add it with new index as it is no longer required
+                               $GLOBALS['network_types'][$networkId][] = $row;
+                       } // END - if
+               } // END - if
+
+               // Free result
+               SQL_FREERESULT($result);
+       } // END - if
+
+       // Return result
+       return $GLOBALS['network_types'][$networkId];
+}
+
 // "Getter" for a network request parameter data by provided id number
 function getNetworkRequestParamsDataById ($networkRequestId) {
        // Ids lower one are not accepted
-       if ($networkRequestId < 1) {
+       if (!isValidId($networkRequestId)) {
                // Not good, should be fixed
                reportBug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkRequestId . ' is smaller than 1.');
        } // END - if
 
-       // By default we have no data
+       // By default there is no data
        $networkRequestData = array();
 
        // Query for the network data
@@ -457,12 +521,12 @@ LIMIT 1',
 // "Getter" for a network array translation data by provided id number
 function getNetworkArrayTranslationsDataById ($networkTranslationId) {
        // Ids lower one are not accepted
-       if ($networkTranslationId < 1) {
+       if (!isValidId($networkTranslationId)) {
                // Not good, should be fixed
                reportBug(__FUNCTION__, __LINE__, 'Network array translation id ' . $networkTranslationId . ' is smaller than 1.');
        } // END - if
 
-       // By default we have no data
+       // By default there is no data
        $networkTranslationData = array();
 
        // Query for the network data
@@ -492,52 +556,116 @@ LIMIT 1',
        return $networkTranslationData;
 }
 
-// Updates given network (id) with data from array
-function doNetworkUpdateDataByArray ($networkId, $networkData) {
+// "Getter" for network query request parameters
+function getNetworkRequestParametersByTypeId ($networkTypeId) {
        // Ids lower one are not accepted
-       if ($networkId < 1) {
+       if (!isValidId($networkTypeId)) {
                // Not good, should be fixed
-               reportBug(__FUNCTION__, __LINE__, 'Network id ' . $networkId . ' is smaller than 1.');
+               reportBug(__FUNCTION__, __LINE__, 'Network type id ' . $networkTypeId . ' is smaller than 1.');
        } // END - if
 
-       // Just call our inner method
-       return adminSaveSettings($networkData, '_network_data', sprintf("`network_id`=%s", bigintval($networkId)), array(), FALSE, FALSE);
-}
+       // Is it cached?
+       if (!isset($GLOBALS['network_request_parameters'][$networkTypeId])) {
+               // By default there is no data
+               $GLOBALS['network_request_parameters'][$networkTypeId] = array();
 
-// Updates given network type handler (id) with data from array
-function doNetworkUpdateTypeByArray ($networkTypeId, $networkTypeData) {
-       // Ids lower one are not accepted
-       if ($networkTypeId < 1) {
-               // Not good, should be fixed
-               reportBug(__FUNCTION__, __LINE__, 'Network type handler id ' . $networkTypeId . ' is smaller than 1.');
+               // Search for all
+               $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_type_id`=%s
+ORDER BY
+       `network_request_param_id` ASC',
+               array(
+                       bigintval($networkTypeId)
+               ), __FUNCTION__, __LINE__);
+
+               // Are there records?
+               if (!SQL_HASZERONUMS($result)) {
+                       // Load all but make new indexes as the old are not required
+                       while ($row = SQL_FETCHARRAY($result)) {
+                               // Add it
+                               $GLOBALS['network_request_parameters'][$networkTypeId][] = $row;
+                       } // END - while
+               } // END - if
+
+               // Free result
+               SQL_FREERESULT($result);
        } // END - if
 
-       // Just call our inner method
-       return adminSaveSettings($networkTypeData, '_network_types', sprintf("`network_type_id`=%s", bigintval($networkTypeId)), array(), FALSE, FALSE);
+       // Return "cached" values
+       return $GLOBALS['network_request_parameters'][$networkTypeId];
 }
 
-// Updates given network request parameters (id) with data from array
-function doNetworkUpdateParamsByArray ($networkParamsId, $networkParamsData) {
+// "Getter" for network configuration + handler config for given network type handler id
+function getFullNetworkConfigurationByTypeId ($networkTypeId) {
        // Ids lower one are not accepted
-       if ($networkParamsId < 1) {
+       if (!isValidId($networkTypeId)) {
                // Not good, should be fixed
-               reportBug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkParamsId . ' is smaller than 1.');
+               reportBug(__FUNCTION__, __LINE__, 'Network type id ' . $networkTypeId . ' is smaller than 1.');
        } // END - if
 
-       // Just call our inner method
-       return adminSaveSettings($networkParamsData, '_network_request_params', sprintf("`network_request_param_id`=%s", bigintval($networkParamsId)), array(), FALSE, FALSE);
-}
+       // Is it cached?
+       if (!isset($GLOBALS['network_full_config'][$networkTypeId])) {
+               // By default there is no data
+               $GLOBALS['network_full_config'][$networkTypeId] = array();
 
-// Updates given network array translations (id) with data from array
-function doNetworkUpdateArrayTranslationsByArray ($networkTranslationsId, $networkTranslationsData) {
-       // Ids lower one are not accepted
-       if ($networkTranslationsId < 1) {
-               // Not good, should be fixed
-               reportBug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkTranslationsId . ' is smaller than 1.');
+               // Search for all
+               $result = SQL_QUERY_ESC('SELECT
+       `nac`.`network_id`,
+       `ntc`.`network_type_id`,
+       `nac`.`network_api_affiliate_id`,
+       `nac`.`network_api_password`,
+       `nac`.`network_api_site_id`,
+       `nac`.`network_api_active`,
+       `nac`.`network_api_referral_link`,
+       `nac`.`network_api_referral_button`,
+       `nac`.`network_api_remaining_requests`,
+       `nts`.`network_type_reload_time_unit`,
+       `ntc`.`network_max_reload_time`,
+       `ntc`.`network_min_waiting_time`,
+       `ntc`.`network_max_waiting_time`,
+       `ntc`.`network_min_remain_clicks`,
+       `ntc`.`network_min_remain_budget`,
+       `ntc`.`network_min_payment`,
+       `ntc`.`network_allow_erotic`,
+       `ntc`.`network_media_size`,
+       `ntc`.`network_media_output`
+FROM
+       `{?_MYSQL_PREFIX?}_network_api_config` AS `nac`
+INNER JOIN
+       `{?_MYSQL_PREFIX?}_network_handler_config` AS `ntc`
+ON
+       `nac`.`network_id`=`ntc`.`network_id`
+INNER JOIN
+       `{?_MYSQL_PREFIX?}_network_types` AS `nts`
+ON
+       `ntc`.`network_type_id`=`nts`.`network_type_id`
+WHERE
+       `ntc`.`network_type_id`=%s
+LIMIT 1',
+               array(
+                       bigintval($networkTypeId)
+               ), __FUNCTION__, __LINE__);
+
+               // Is there one entry?
+               if (SQL_NUMROWS($result) == 1) {
+                       // Load it
+                       $GLOBALS['network_full_config'][$networkTypeId] = SQL_FETCHARRAY($result);
+               } // END - if
+
+               // Free result
+               SQL_FREERESULT($result);
        } // END - if
 
-       // Just call our inner method
-       return adminSaveSettings($networkTranslationsData, '_network_array_translation', sprintf("`network_array_id`=%s", bigintval($networkTranslationsId)), array(), FALSE, FALSE);
+       // Return "cached" values
+       return $GLOBALS['network_full_config'][$networkTypeId];
 }
 
 // Removes given network entry
@@ -556,7 +684,7 @@ function doAdminRemoveNetworkEntry ($table, $column, $id, $limit = 1) {
 }
 
 // Generates a list of networks for given script and returns it
-function generateAdminNetworkList () {
+function generateAdminNetworkList ($separated = FALSE, $includeConfigured = TRUE, $includeUnconfigured = TRUE, $extraName = '') {
        // Init output
        $content = '';
 
@@ -564,7 +692,12 @@ function generateAdminNetworkList () {
        $result = SQL_QUERY('SELECT
        `network_id`,
        `network_short_name`,
-       `network_title`
+       `network_title`,
+       `network_request_type`,
+       `network_charset`,
+       `network_require_id_card`,
+       `network_query_amount`,
+       `network_active`
 FROM
        `{?_MYSQL_PREFIX?}_network_data`
 ' . getNetworkActivatedColumn() . '
@@ -578,13 +711,43 @@ ORDER BY
                while ($row = SQL_FETCHARRAY($result)) {
                        // Is this valid, then add it
                        if ((is_array($row)) && (isset($row['network_id']))) {
+                               // Exclude configured and is it configured or same for unconfired but only if not separated lists?
+                               if (((($includeConfigured === FALSE) && (isNetworkApiConfigured($row['network_id']))) || (($includeUnconfigured === FALSE) && (!isNetworkApiConfigured($row['network_id'])))) && ($separated === FALSE)) {
+                                       // Skip this entry
+                                       continue;
+                               } // END - if
+
                                // Add entry
                                $rows[$row['network_id']] = $row;
                        } // END - if
                } // END - while
 
-               // Generate the selection box
-               $content = generateSelectionBoxFromArray($rows, 'network_id', 'network_id', '', '', 'network');
+               // Nothing found?
+               if (count($rows) == 0) {
+                       // Then return nothing ... ;-)
+                       return '';
+               } // END - if
+
+               // Do separated?
+               if ($separated === FALSE) {
+                       // Exclude un-/configured?
+                       if ($includeConfigured === FALSE) {
+                               // Exclude configured, so only unconfigured
+                               $extraName = '_unconfigured';
+                       } elseif ($includeUnconfigured === FALSE) {
+                               // Exclude unconfigured, so only configured
+                               $extraName = '_configured';
+                       }
+
+                       // Generate the big selection box
+                       $content = generateSelectionBoxFromArray($rows, 'network_id', 'network_id', '', $extraName, 'network');
+               } else {
+                       // Generate two small, first configured
+                       $content = generateAdminNetworkList(FALSE, TRUE, FALSE, '_configured');
+
+                       // Then add unconfigured
+                       $content .= generateAdminNetworkList(FALSE, FALSE, TRUE, '_unconfigured');
+               }
        } else {
                // Nothing selected
                $content = loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_ENTRIES_404--}');
@@ -738,14 +901,17 @@ function generateNetworkTypesAvailableOptions ($defaultType = NULL) {
                                'surfbar',
                                'surfbar_click',
                                'surfbar_view',
-                               'forcedbanner',
-                               'forcedtextlink',
+                               'forced_banner',
+                               'forced_button',
+                               'forced_half_banner',
+                               'forced_skyscraper',
+                               'forced_textlink',
                                'textlink',
                                'textlink_click',
                                'textlink_view',
-                               'skybanner',
-                               'skybanner_click',
-                               'skybanner_view',
+                               'skyscraper',
+                               'skyscraper_click',
+                               'skyscraper_view',
                                'halfbanner',
                                'halfbanner_click',
                                'halfbanner_view',
@@ -761,6 +927,8 @@ function generateNetworkTypesAvailableOptions ($defaultType = NULL) {
                                'lead_sale',
                                'payperactive',
                                'pagepeel',
+                               'pagepeel_click',
+                               'pagepeel_view',
                                'traffic',
                                'signature',
                                'signature_click',
@@ -810,7 +978,7 @@ function generateNetworkRequestKeyOptions () {
                        '/ARRAY/',
                        array(
                                'affiliate_id',
-                               'sid',
+                               'site_id',
                                'hash',
                                'password',
                                'reload',
@@ -818,7 +986,8 @@ function generateNetworkRequestKeyOptions () {
                                'minimum_stay',
                                'currency',
                                'type',
-                               'remain',
+                               'remain_budget',
+                               'remain_clicks',
                                'reward',
                                'size',
                                'erotic',
@@ -846,7 +1015,7 @@ function generateNetworkVcheckKeyOptions () {
                        '/ARRAY/',
                        array(
                                'network_key',
-                               'sid',
+                               'site_id',
                                'payment',
                                'remote_address',
                                'campaign_id',
@@ -927,19 +1096,303 @@ function generateNetworkApiActiveOptions ($default = '') {
        return $GLOBALS[__FUNCTION__][$default];
 }
 
+// Generator (somewhat getter) for network type options
+function generateNetworkMediaOutputOptions ($mediaOutput) {
+       // Is this an array, then we just came back from edit/delete actions
+       if (is_array($mediaOutput)) {
+               // Set it as empty string
+               $mediaOutput = '';
+       } // END - if
+
+       // Is this cached?
+       if (!isset($GLOBALS[__FUNCTION__][$mediaOutput])) {
+               // Generate output and cache it
+               $GLOBALS[__FUNCTION__][$mediaOutput] = generateOptions(
+                       '/ARRAY/',
+                       array(
+                               '',
+                               'banner',
+                               'html_email',
+                               'layer',
+                               'pagepeel',
+                               'popup',
+                               'popdown',
+                               'text_email',
+                               'textlink'
+                       ),
+                       array(
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_NONE--}',
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_BANNER--}',
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_HTML_EMAIL--}',
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_LAYER--}',
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_PAGEPEEL--}',
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_POPUP--}',
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_POPDOWN--}',
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_TEXT_EMAIL--}',
+                               '{--ADMIN_NETWORK_MEDIA_OUTPUT_TEXTLINK--}'
+                       ),
+                       $mediaOutput,
+                       'translateNetworkMediaOutputType'
+               );
+       } // END - if
+
+       // Return content
+       return $GLOBALS[__FUNCTION__][$mediaOutput];
+}
+
+// Checks if the given network is configured by looking its API configuration entry up
+function isNetworkApiConfigured ($networkId) {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__][$networkId])) {
+               // Check for an entry in network_api_config
+               $GLOBALS[__FUNCTION__][$networkId] = (countSumTotalData(
+                       bigintval($networkId),
+                       'network_api_config',
+                       'network_id',
+                       'network_id',
+                       true
+               ) == 1);
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__][$networkId];
+}
+
+// Checks whether the given network type handler is configured
+function isNetworkTypeHandlerConfigured ($networkId, $networkTypeId) {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__][$networkId][$networkTypeId])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__][$networkId][$networkTypeId] = (countSumTotalData(
+                       bigintval($networkTypeId),
+                       'network_handler_config',
+                       'network_data_id',
+                       'network_type_id',
+                       true,
+                       sprintf(' AND `network_id`=%s', bigintval($networkId))
+               ) == 1);
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__][$networkId][$networkTypeId];
+}
+
+// Handles the network-payment-check request
+function handleNetworkPaymentCheckRequest () {
+       // @TODO Implement this function, don't forget to set HTTP status back to '200 OK' if everything went fine
+       reportBug(__FUNCTION__, __LINE__, 'Not yet implemented.');
+}
+
+// Handle a single request parameter key by given network type handler id and "internal" key
+function handleRequestParameterKey ($networkTypeId, $networkRequestKey) {
+       // Construct call-back function name
+       $callbackName = 'doHandleNetworkRequest' . capitalizeUnderscoreString($networkRequestKey) . 'Key';
+
+       // Is the function there?
+       if (!function_exists($callbackName)) {
+               // Call-back function does not exist
+               reportBug(__FUNCTION__, __LINE__, 'Call-back function ' . $callbackName . ' does not exist. networkTypeId=' . $networkTypeId . ',networkRequestKey=' . $networkRequestKey);
+       } // END - if
+
+       // Call it with network type id
+       return call_user_func_array($callbackName, array($networkTypeId));
+}
+
+// Handle all keys given request parameter array loaded by getNetworkRequestParametersByTypeId()
+function handleNetworkRequestParameterKeys (&$requestParams) {
+       // Simple check for validity
+       assert(isset($requestParams[0]['network_request_param_key']));
+
+       // "Walk" through all
+       foreach ($requestParams as $key => $params) {
+               // Is the default value not set?
+               if (empty($params['network_request_param_default'])) {
+                       // This key needs to be handled, so call it
+                       $requestParams[$key]['network_request_param_default'] = handleRequestParameterKey($params['network_type_id'], $params['network_request_param_key']);
+               } // END - if
+       } // END - foreach
+}
+
+/**
+ * Logs given HTTP headers to database for debugging purposes.
+ *
+ * @param      $networkId              Network's id number
+ * @param      $networkTypeId  Network type handler's id number
+ * @param      $headers                All HTTP headers
+ * @param      $type                   Can be only one of 'MANUAL' or 'CRON'
+ * @return     void
+ */
+function logNetworkResponseHeaders ($networkId, $networkTypeId, $headers, $type) {
+       // Make sure type is valid
+       assert(in_array($type, array('MANUAL', 'CRON')));
+
+       // Is debug logging enabled or status code not 200 OK?
+       if ((getConfig('network_logging_debug') == 'Y') || (!isHttpStatusOkay($response[0]))) {
+               // Add entry
+               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_network_header_logging` (`network_id`, `network_type_id`, `network_http_status_code`, `network_http_headers`, `network_logging_type`) VALUES(%s, %s, '%s', '%s', '%s')",
+                       array(
+                               bigintval($networkId),
+                               bigintval($networkTypeId),
+                               trim($headers[0]),
+                               serialize($headers),
+                               $type
+                       ), __FUNCTION__, __LINE__);
+       } // END - if
+}
+
+/**
+ * Caches given reponse body from API into cache, updates existing cache if
+ * found. This function does the charset-convertion, so you don't have to do it
+ * again if you use this cached data.
+ *
+ * @param      $networkId              Network's id number
+ * @param      $networkTypeId  Network type handler's id number
+ * @param      $responseBody   Response body (string)
+ * @param      $networkData    Network + type handler data as array
+ * @param      $type                   Can be only one of 'MANUAL' or 'CRON'
+ * @return     void
+ */
+function saveNetworkResponseBodyInCache ($networkId, $networkTypeId, $responseBody, $networkData, $type) {
+       // Make sure the body is not larger than this value
+       assert(strlen($responseBody) <= 16777215);
+       assert(in_array($type, array('MANUAL', 'CRON')));
+
+       // So is there cache?
+       if (countSumTotalData($networkId, 'network_cache', 'network_cache_id', 'network_id', TRUE, ' AND `network_type_id`=' . bigintval($networkTypeId)) == 1) {
+               // Entry found, so update it
+               SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_network_cache`
+SET
+       `network_cache_data`='%s',
+       `network_cache_body`='%s',
+       `network_cache_type`='%s',
+       `network_cache_admin_id`=%s,
+       `network_cache_updated`=NOW()
+WHERE
+       `network_id`=%s AND
+       `network_type_id`=%s
+LIMIT 1",
+                       array(
+                               serialize($networkData),
+                               compress(convertCharsetToUtf8($responseBody, $networkData['network_charset'])),
+                               $type,
+                               convertZeroToNull(getCurrentAdminId()),
+                               bigintval($networkId),
+                               bigintval($networkTypeId)
+                       ), __FUNCTION__, __LINE__);
+       } else {
+               // Add entry
+               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_network_cache` (`network_id`, `network_type_id`, `network_cache_data`, `network_cache_body`, `network_cache_type`, `network_cache_admin_id`) VALUES(%s, %s, '%s', '%s', '%s', %s)",
+                       array(
+                               bigintval($networkId),
+                               bigintval($networkTypeId),
+                               serialize($networkData),
+                               compress(convertCharsetToUtf8($responseBody, $networkData['network_charset'])),
+                               $type,
+                               convertZeroToNull(getCurrentAdminId())
+                       ), __FUNCTION__, __LINE__);
+       }
+}
+
+// Queries network API with given network data and request data
+function queryNetworkApi ($networkData, $requestData) {
+       // Query it
+       $response = sendHttpRequest($networkData['network_request_type'], $networkData['network_type_api_url'], $requestData, FALSE, FALSE);
+
+       // Did all went fine? (also a 403 is considered as "okay" here)
+       if (count($response) > 3) {
+               // Save response body, remove last empty line if really empty
+               $responseBody = (string) trim($response[count($response) - 1]);
+               unset($response[count($response) - 1]);
+               assert(empty($response[count($response)]));
+               unset($response[count($response) - 1]);
+
+               // Register all HTTP headers for debugging purposes
+               logNetworkResponseHeaders($networkData['network_id'], postRequestElement('network_type_id'), $response, 'MANUAL');
+
+               // Is all fine?
+               if (isHttpStatusOkay($response[0])) {
+                       // Count API request
+                       countNetworkApiRequest($networkData);
+
+                       // Save response in cache
+                       saveNetworkResponseBodyInCache($networkData['network_id'], postRequestElement('network_type_id'), $responseBody, $networkData, 'MANUAL');
+               } // END - if
+       } // END - if
+
+       // Return the response
+       return $response;
+}
+
+/**
+ * Counts API request from given network data generated by getNetworkDataByTypeId()
+ *
+ * @param      $networkData    Array with network data
+ * @return     $affectedRows   Affected rows (always one or FALSE if unlimited/depleted)
+ */
+function countNetworkApiRequest ($networkData) {
+       // Get API config
+       $apiConfig = getFullNetworkConfigurationByTypeId($networkData['network_type_id']);
+
+       // Is the daily or remaining free amount zero?
+       if (($networkData['network_query_amount'] == 0) || ($apiConfig['network_api_remaining_requests'] == 0)) {
+               // Then abort here
+               return FALSE;
+       } // END - if
+
+       // Okay, so update database
+       $result = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_network_api_config` SET `network_api_remaining_requests`=`network_api_remaining_requests`-1 WHERE `network_id`=%s LIMIT 1",
+               array(
+                       bigintval($networkData['network_id'])
+               ), __FUNCTION__, __LINE__);
+
+       // Return affected rows
+       return SQL_AFFECTEDROWS();
+}
+
+/**
+ * Generates a referral link for given network id (including HTML)
+ *
+ * @param      $networkId      Network id to generate link for
+ * @return     $output         "Rendered" output
+ */
+function generateMetworkReferralLinkById ($networkId) {
+       // Simple output (no need for template!)
+       $output = '<a href="{%network,getNetworkDataById,network_reflink=' . $networkId . '%}" target="_blank" title="{%network,getNetworkDataById,network_title=' . $networkId . '%}">{%network,getNetworkDataById,network_title=' . $networkId . '%}</a>';
+
+       // Return it
+       return $output;
+}
+
+//------------------------------------------------------------------------------
+//               "Translation" functions (can be used in EL code)
+//------------------------------------------------------------------------------
+
 // Translates 'translate_name' for e.g. templates
 function translateNetworkTranslationName ($name) {
-       // Generate id
-       $messageId = 'ADMIN_NETWORK_TRANSLATE_' . strtoupper($name) . '_NAME';
+       // Return message id
+       return translateGeneric('ADMIN_NETWORK_TRANSLATE', $name, '_NAME');
+}
 
-       // Is the message id there?
-       if (!isMessageIdValid($messageId)) {
-               // Not valid name
-               reportBug(__FUNCTION__, __LINE__, 'name=' . $name . ' is invalid.');
+// Translates the network type id to a handler
+function translateNetworkTypeHandlerByTypeId ($typeId) {
+       // Get the data
+       $data = getNetworkDataByTypeId($typeId, 'network_type_handler');
+
+       // Is data found?
+       if (is_null($data)) {
+               // Not found
+               return translateNetworkTypeHandler('UNKNOWN');
        } // END - if
 
+       // Return actual translation
+       return translateNetworkTypeHandler($data);
+}
+
+// "Translates" give network media output (type)
+function translateNetworkMediaOutputType ($mediaOutput) {
        // Return message id
-       return '{--' . $messageId . '--}';
+       return translateGeneric('ADMIN_NETWORK_MEDIA_OUTPUT', $mediaOutput);
 }
 
 // Translates the network type handler (e.g. banner, paidmail) for templates
@@ -1085,51 +1538,360 @@ function translateNetworkApiConfiguredStatusById ($networkId) {
        return $GLOBALS[__FUNCTION__][$networkId];
 }
 
-// Checks if the given network is configured by looking its API configuration entry up
-function isNetworkApiConfigured ($networkId) {
-       // Is there cache?
-       if (!isset($GLOBALS[__FUNCTION__][$networkId])) {
-               // Check for an entry in network_api_config
-               $GLOBALS[__FUNCTION__][$networkId] = (countSumTotalData(
-                       bigintval($networkId),
-                       'network_api_config',
-                       'network_id',
-                       'network_id',
-                       true
-               ) == 1);
+/**
+ * "Translates" given amount of queries; 0 = unlimited
+ *
+ * @param      $amount                 Amount of free queries
+ * @return     $translated             "Translated" value; 0 = unlimited
+ */
+function translateNetworkQueryAmount ($amount) {
+       // Default is unlimited (good! ;-) )
+       $translated = '{--UNLIMITED--}';
+
+       // Is the amount larger zero?
+       if ($amount > 0) {
+               // Then translate it
+               $translated = translateComma($amount);
        } // END - if
 
-       // Return cache
-       return $GLOBALS[__FUNCTION__][$networkId];
+       // Return translated value
+       return $translated;
 }
 
-// Checks whether the given network type handler is configured
-function isNetworkTypeHandlerConfigured ($networkId, $networkTypeId) {
+/**
+ * "Translates given status (Y/N) to "de-/activated" but only if expert and
+ * debug mode are enabled.
+ *
+ * @param      $status                 Can be one of Y/N
+ * @return     $translated             "Translated" status
+ */
+function translateNetworkActivationStatus ($status) {
        // Is there cache?
-       if (!isset($GLOBALS[__FUNCTION__][$networkId][$networkTypeId])) {
-               // Determine it
-               $GLOBALS[__FUNCTION__][$networkId][$networkTypeId] = (countSumTotalData(
-                       bigintval($networkTypeId),
-                       'network_types_config',
-                       'network_data_id',
-                       'network_type_id',
-                       true,
-                       sprintf(' AND `network_id`=%s', bigintval($networkId))
-               ) == 1);
+       if (!isset($GLOBALS[__FUNCTION__][$status])) {
+               // Default is not enabled
+               $GLOBALS[__FUNCTION__][$status] = '';
+
+               // Is expert + debug mode enabled?
+               if ((isAdminsExpertSettingEnabled()) && (isDebugModeEnabled())) {
+                       // Then "translate" it
+                       $GLOBALS[__FUNCTION__][$status] = translateActivationStatus($status);
+               } // END - if
        } // END - if
 
-       // Return cache
-       return $GLOBALS[__FUNCTION__][$networkId][$networkTypeId];
+       // Return "translation"
+       return $GLOBALS[__FUNCTION__][$status];
 }
 
-// Handles the network-payment-check request
-function handleNetworkPaymentCheckRequest () {
-       // @TODO Implement this function, don't forget to set HTTP status back to '200 OK' if everything went fine
-       reportBug(__FUNCTION__, __LINE__, 'Not yet implemented.');
+//------------------------------------------------------------------------------
+//               Wrapper functions to save data to network tables
+//------------------------------------------------------------------------------
+
+// Updates given network (id) with data from array
+function doNetworkUpdateDataByArray ($networkId, $networkData) {
+       // Ids lower one are not accepted
+       if (!isValidId($networkId)) {
+               // Not good, should be fixed
+               reportBug(__FUNCTION__, __LINE__, 'Network id ' . $networkId . ' is smaller than 1.');
+       } // END - if
+
+       // Just call our inner method
+       return adminSaveSettings($networkData, '_network_data', sprintf("`network_id`=%s", bigintval($networkId)), array(), FALSE, FALSE);
+}
+
+// Updates given network type handler (id) with data from array
+function doNetworkUpdateTypeByArray ($networkTypeId, $networkTypeData) {
+       // Ids lower one are not accepted
+       if (!isValidId($networkTypeId)) {
+               // Not good, should be fixed
+               reportBug(__FUNCTION__, __LINE__, 'Network type handler id ' . $networkTypeId . ' is smaller than 1.');
+       } // END - if
+
+       // Just call our inner method
+       return adminSaveSettings($networkTypeData, '_network_types', sprintf("`network_type_id`=%s", bigintval($networkTypeId)), array(), FALSE, FALSE);
+}
+
+// Updates given network request parameters (id) with data from array
+function doNetworkUpdateParamsByArray ($networkParamsId, $networkParamsData) {
+       // Ids lower one are not accepted
+       if (!isValidId($networkParamsId)) {
+               // Not good, should be fixed
+               reportBug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkParamsId . ' is smaller than 1.');
+       } // END - if
+
+       // Just call our inner method
+       return adminSaveSettings($networkParamsData, '_network_request_params', sprintf("`network_request_param_id`=%s", bigintval($networkParamsId)), array(), FALSE, FALSE);
+}
+
+// Updates given network array translations (id) with data from array
+function doNetworkUpdateArrayTranslationsByArray ($networkTranslationsId, $networkTranslationsData) {
+       // Ids lower one are not accepted
+       if (!isValidId($networkTranslationsId)) {
+               // Not good, should be fixed
+               reportBug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkTranslationsId . ' is smaller than 1.');
+       } // END - if
+
+       // Just call our inner method
+       return adminSaveSettings($networkTranslationsData, '_network_array_translation', sprintf("`network_array_id`=%s", bigintval($networkTranslationsId)), array(), FALSE, FALSE);
 }
 
 //------------------------------------------------------------------------------
-//                             Call-back functions
+//                 Call-back functions for request parameter keys
+//------------------------------------------------------------------------------
+
+// ----------------------- Table: network_api_config -----------------------
+
+// Handles affiliate id
+function doHandleNetworkRequestAffiliateIdKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       } elseif (empty($configData['network_api_affiliate_id'])) {
+               // Required element is not set
+               reportBug(__FUNCTION__, __LINE__, 'network_api_affiliate_id for network_id=' . $configData['network_id'] . ',networkTypeId=' . $networkTypeId . ' is not set.');
+       }
+
+       // Return configured value
+       return $configData['network_api_affiliate_id'];
+}
+
+// Handles site id
+function doHandleNetworkRequestSiteIdKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       } elseif (empty($configData['network_api_site_id'])) {
+               // Required element is not set
+               reportBug(__FUNCTION__, __LINE__, 'network_api_site_id for network_id=' . $configData['network_id'] . ',networkTypeId=' . $networkTypeId . ' is not set.');
+       }
+
+       // Return configured value
+       return $configData['network_api_site_id'];
+}
+
+// Handles interface password
+function doHandleNetworkRequestPasswordKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       } elseif (empty($configData['network_api_password'])) {
+               // Required element is not set
+               reportBug(__FUNCTION__, __LINE__, 'network_api_password for network_id=' . $configData['network_id'] . ',networkTypeId=' . $networkTypeId . ' is not set.');
+       }
+
+       // Return configured value
+       return $configData['network_api_password'];
+}
+
+// ----------------------- Table: network_handler_config -----------------------
+
+// Handles reload lock
+function doHandleNetworkRequestReloadKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       }
+
+       // Return configured value
+       return caluculateTimeUnitValue($configData['network_max_reload_time'], $configData['network_type_reload_time_unit']);
+}
+
+// Handles minimum stay
+function doHandleNetworkRequestMinimumStayKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       }
+
+       // Return configured value
+       return $configData['network_min_waiting_time'];
+}
+
+// Handles maximum stay
+function doHandleNetworkRequestMaximumStayKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       }
+
+       // Return configured value
+       return $configData['network_max_waiting_time'];
+}
+
+// Handles remaining clicks
+function doHandleNetworkRequestRemainClicksKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       }
+
+       // Return configured value
+       return $configData['network_min_remain_clicks'];
+}
+
+// Handles remaining budget
+function doHandleNetworkRequestRemainBudgetKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       }
+
+       // Return configured value
+       return $configData['network_min_remain_budget'];
+}
+
+// Handles reward (payment)
+function doHandleNetworkRequestRewardKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       } elseif (empty($configData['network_min_payment'])) {
+               // Required element is not set
+               reportBug(__FUNCTION__, __LINE__, 'network_min_payment for network_id=' . $configData['network_id'] . ',networkTypeId=' . $networkTypeId . ' is not set.');
+       }
+
+       // Return configured value
+       return $configData['network_min_payment'];
+}
+
+// Handles media size
+function doHandleNetworkRequestSizeKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       } elseif (empty($configData['network_media_size'])) {
+               // Required element is not set
+               reportBug(__FUNCTION__, __LINE__, 'network_media_size for network_id=' . $configData['network_id'] . ',networkTypeId=' . $networkTypeId . ' is not set.');
+       }
+
+       // Return configured value
+       return $configData['network_media_size'];
+}
+
+// Handles media output (type)
+function doHandleNetworkRequestTypeKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       }
+
+       // Return configured value
+       return $configData['network_media_output'];
+}
+
+// Handles erotic
+function doHandleNetworkRequestEroticKey ($networkTypeId) {
+       // It is assumed that the network + type handler are both configured
+       // Load full config data (this will be "cached"!)
+       $configData = getFullNetworkConfigurationByTypeId($networkTypeId);
+
+       // Is the network activated?
+       if (!isset($configData['network_api_active'])) {
+               // Configuration could not be loaded
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for networkTypeId=' . $networkTypeId . ' could not be loaded.');
+       } elseif (($configData['network_api_active'] == 'N') && (!isDebugModeEnabled())) {
+               // Is not activated, so don't handle it in non-debug mode
+               reportBug(__FUNCTION__, __LINE__, 'Configuration for network_id ' . $configData['network_id'] .',networkTypeId=' . $networkTypeId . ' is not activated.');
+       } elseif (empty($configData['network_allow_erotic'])) {
+               // Required element is not set
+               reportBug(__FUNCTION__, __LINE__, 'network_allow_erotic for network_id=' . $configData['network_id'] . ',networkTypeId=' . $networkTypeId . ' is not set.');
+       }
+
+       // Return configured value
+       return $configData['network_allow_erotic'];
+}
+
+// ----------------------- Table: network_request_params -----------------------
+
+//------------------------------------------------------------------------------
+//                       Call-back functions for admin area
 //------------------------------------------------------------------------------
 
 // Callback function to add new network
@@ -1172,7 +1934,7 @@ function doAdminNetworkProcessHandleNetworks () {
                                // Is there found the network?
                                if (count($networkData) > 0) {
                                        // Add row template with given form name
-                                       $OUT .= loadTemplate('admin_' . $GLOBALS['network_form_name'] . '_networks_row', TRUE, $networkData);
+                                       $OUT .= loadTemplate('admin_' . getNetworkFormName() . '_networks_row', TRUE, $networkData);
                                } // END - if
                        } // END - if
                } // END - foreach
@@ -1185,7 +1947,7 @@ function doAdminNetworkProcessHandleNetworks () {
                        );
 
                        // Output main template
-                       loadTemplate('admin_' . $GLOBALS['network_form_name'] . '_networks', FALSE, $content);
+                       loadTemplate('admin_' . getNetworkFormName() . '_networks', FALSE, $content);
 
                        // Don't display the list/add new form
                        $GLOBALS['network_display'] = FALSE;
@@ -1209,19 +1971,19 @@ function doAdminNetworkProcessHandleNetworkTypes () {
                        // Is this selected?
                        if ($sel == 1) {
                                // Load this network's data
-                               $networkTypeData = getNetworkTypeDataById($networkId);
+                               $networkTypeData = getNetworkTypeDataByTypeId($networkId);
 
                                // Is there found the network?
                                if (count($networkTypeData) > 0) {
-                                       if (isFormSent('edit')) {
+                                       if (getNetworkFormName() == 'edit') {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_edit_network_types_row', TRUE, $networkTypeData);
-                                       } elseif (isFormSent('delete')) {
+                                       } elseif (getNetworkFormName() == 'delete') {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_delete_network_types_row', TRUE, $networkTypeData);
                                        } else {
                                                // Problem!
-                                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.');
+                                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete. data=<pre>' . print_r(postRequestArray(), TRUE) . '</pre>');
                                        }
                                } // END - if
                        } // END - if
@@ -1236,13 +1998,13 @@ function doAdminNetworkProcessHandleNetworkTypes () {
                        );
 
                        // Output main template
-                       if (isFormSent('edit')) {
+                       if (getNetworkFormName() == 'edit') {
                                loadTemplate('admin_edit_network_types', FALSE, $content);
-                       } elseif (isFormSent('delete')) {
+                       } elseif (getNetworkFormName() == 'delete') {
                                loadTemplate('admin_delete_network_types', FALSE, $content);
                        } else {
                                // Problem!
-                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.');
+                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete. data=<pre>' . print_r(postRequestArray(), TRUE) . '</pre>');
                        }
 
                        // Don't display the list/add new form
@@ -1274,18 +2036,18 @@ function doAdminNetworkProcessHandleRequestParams () {
 
                                // Is there found the network?
                                if (count($networkRequestData) > 0) {
-                                       if (isFormSent('edit')) {
+                                       if (getNetworkFormName() == 'edit') {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_edit_network_request_params_row', TRUE, $networkRequestData);
-                                       } elseif (isFormSent('delete')) {
+                                       } elseif (getNetworkFormName() == 'delete') {
                                                // Get type data
-                                               $networkRequestData['network_type_data'] = getNetworkTypeDataById($networkRequestData['network_type_id']);
+                                               $networkRequestData['network_type_data'] = getNetworkTypeDataByTypeId($networkRequestData['network_type_id']);
 
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_delete_network_request_params_row', TRUE, $networkRequestData);
                                        } else {
                                                // Problem!
-                                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.');
+                                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete. data=<pre>' . print_r(postRequestArray(), TRUE) . '</pre>');
                                        }
                                } // END - if
                        } // END - if
@@ -1300,13 +2062,13 @@ function doAdminNetworkProcessHandleRequestParams () {
                        );
 
                        // Output main template
-                       if (isFormSent('edit')) {
+                       if (getNetworkFormName() == 'edit') {
                                loadTemplate('admin_edit_network_request_params', FALSE, $content);
-                       } elseif (isFormSent('delete')) {
+                       } elseif (getNetworkFormName() == 'delete') {
                                loadTemplate('admin_delete_network_request_params', FALSE, $content);
                        } else {
                                // Problem!
-                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.');
+                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete. data=<pre>' . print_r(postRequestArray(), TRUE) . '</pre>');
                        }
 
                        // Don't display the list/add new form
@@ -1406,6 +2168,12 @@ function doAdminNetworkProcessAddNetworkType () {
        // Add id
        setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
 
+       // Is network_type_click_url set?
+       if (!isPostRequestElementSet('network_type_click_url')) {
+               // Remove empty value to get a NULL for an optional entry
+               unsetPostRequestElement('network_type_click_url');
+       } // END - if
+
        // Is network_type_banner_url set?
        if (!isPostRequestElementSet('network_type_banner_url')) {
                // Remove empty value to get a NULL for an optional entry
@@ -1452,8 +2220,8 @@ function doAdminNetworkProcessChangeHandlerTypes () {
                                                reportBug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.');
                                        } // END - if
 
-                                       // Fix empty network_type_banner_url to NULL
-                                       if (($key == 'network_type_banner_url') && (trim($entry[$networkId]) == '')) {
+                                       // Fix empty network_type_click/banner_url to NULL
+                                       if ((in_array($key, array('network_type_click_url', 'network_type_banner_url'))) && (trim($entry[$networkId]) == '')) {
                                                // Set it to NULL
                                                $entry[$networkId] = NULL;
                                        } // END - if
@@ -1788,18 +2556,18 @@ function doAdminNetworkProcessHandleArrayTranslations () {
 
                                // Is there found the network?
                                if (count($networkTranslationsData) > 0) {
-                                       if (isFormSent('edit')) {
+                                       if (getNetworkFormName() == 'edit') {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_edit_network_array_translation_row', TRUE, $networkTranslationsData);
-                                       } elseif (isFormSent('delete')) {
+                                       } elseif (getNetworkFormName() == 'delete') {
                                                // Get type data
-                                               $networkTranslationsData['network_type_data'] = getNetworkTypeDataById($networkTranslationsData['network_type_id']);
+                                               $networkTranslationsData['network_type_data'] = getNetworkTypeDataByTypeId($networkTranslationsData['network_type_id']);
 
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_delete_network_array_translation_row', TRUE, $networkTranslationsData);
                                        } else {
                                                // Problem!
-                                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.');
+                                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete. data=<pre>' . print_r(postRequestArray(), TRUE) . '</pre>');
                                        }
                                } // END - if
                        } // END - if
@@ -1814,13 +2582,13 @@ function doAdminNetworkProcessHandleArrayTranslations () {
                        );
 
                        // Output main template
-                       if (isFormSent('edit')) {
+                       if (getNetworkFormName() == 'edit') {
                                loadTemplate('admin_edit_network_array_translation', FALSE, $content);
-                       } elseif (isFormSent('delete')) {
+                       } elseif (getNetworkFormName() == 'delete') {
                                loadTemplate('admin_delete_network_array_translation', FALSE, $content);
                        } else {
                                // Problem!
-                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.');
+                               reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete. data=<pre>' . print_r(postRequestArray(), TRUE) . '</pre>');
                        }
 
                        // Don't display the list/add new form
@@ -1866,19 +2634,24 @@ function doAdminNetworkProcessNetworkApiConfig () {
 }
 
 // Only adds network type configuration if not yet present
-function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE) {
+function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE, $convertComma = TRUE) {
        // Add both ids
        setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
        setPostRequestElement('network_type_id', bigintval(getRequestElement('network_type_id')));
 
-       // Translate German comma to dot
-       convertCommaToDotInPostData('network_min_payment');
+       // Convert comma to dot?
+       if ($convertComma === TRUE) {
+               // Translate German comma to dot
+               convertCommaToDotInPostData('network_min_payment');
+               convertCommaToDotInPostData('network_min_remain_budget');
+               convertCommaToDotInPostData('network_min_remain_clicks');
+       } // END - if
 
        /*
         * Some parameters are optional, at least one must be given so check a bunch
         * of parameters.
         */
-       foreach (array('network_min_waiting_time', 'network_min_remain_clicks', 'network_min_payment', 'network_allow_erotic') as $element) {
+       foreach (array('network_min_waiting_time', 'network_max_waiting_time', 'network_min_remain_budget', 'network_min_remain_clicks', 'network_min_payment', 'network_allow_erotic', 'network_media_size', 'network_media_output') as $element) {
                // Is this element empty?
                if (!isPostRequestElementSet($element)) {
                        // Then unset it to get a NULL for optional parameter
@@ -1922,7 +2695,7 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE) {
                        setGetRequestElement('network_type_id', $typeId);
 
                        // Call this function again
-                       $numRows += doAdminNetworkProcessAddHandlerTypesConfig(FALSE);
+                       $numRows += doAdminNetworkProcessAddHandlerTypesConfig(FALSE, FALSE);
                } // END - while
 
                // Free result
@@ -1938,7 +2711,7 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE) {
                }
        } else {
                // Get SQL query for new entry
-               $SQL = getInsertSqlFromArray(postRequestArray(), 'network_types_config');
+               $SQL = getInsertSqlFromArray(postRequestArray(), 'network_handler_config');
 
                // Run the query
                SQL_QUERY($SQL, __FUNCTION__, __LINE__);
@@ -1961,15 +2734,20 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE) {
 }
 
 // Only changes network type configuration if not yet present
-function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE) {
-       // Translate German comma to dot
-       convertCommaToDotInPostData('network_min_payment');
+function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE, $convertComma = TRUE) {
+       // Convert comma to dot?
+       if ($convertComma === TRUE) {
+               // Translate German comma to dot
+               convertCommaToDotInPostData('network_min_payment');
+               convertCommaToDotInPostData('network_min_remain_budget');
+               convertCommaToDotInPostData('network_min_remain_clicks');
+       } // END - if
 
        /*
         * Some parameters are optional, at least one must be given so check a bunch
         * of parameters.
         */
-       foreach (array('network_min_waiting_time', 'network_min_remain_clicks', 'network_min_payment', 'network_allow_erotic') as $element) {
+       foreach (array('network_min_waiting_time', 'network_max_waiting_time', 'network_min_remain_budget', 'network_min_remain_clicks', 'network_min_payment', 'network_allow_erotic', 'network_media_size', 'network_media_output') as $element) {
                // Is this element empty?
                if (!isPostRequestElementSet($element)) {
                        // Then unset it to get a NULL for optional parameter
@@ -1994,7 +2772,7 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE) {
        // Shall we set for all?
        if ($setAll === TRUE) {
                // Get all data entries
-               $result = SQL_QUERY_ESC('SELECT `network_data_id` FROM `{?_MYSQL_PREFIX?}_network_types_config` WHERE `network_id`=%s ORDER BY `network_type_id` ASC',
+               $result = SQL_QUERY_ESC('SELECT `network_data_id` FROM `{?_MYSQL_PREFIX?}_network_handler_config` WHERE `network_id`=%s ORDER BY `network_type_id` ASC',
                        array(bigintval(getRequestElement('network_id'))), __FUNCTION__, __LINE__);
 
                // Are there entries?
@@ -2013,7 +2791,7 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE) {
                        setPostRequestElement('network_data_id', $dataId);
 
                        // Call this function again
-                       $numRows += doAdminNetworkProcessEditHandlerTypesConfig(FALSE);
+                       $numRows += doAdminNetworkProcessEditHandlerTypesConfig(FALSE, FALSE);
                } // END - while
 
                // Free result
@@ -2029,7 +2807,7 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE) {
                }
        } else {
                // Get SQL query for new entry
-               $SQL = getUpdateSqlFromArray(postRequestArray(), 'network_types_config', 'network_data_id', postRequestElement('network_data_id'), array('network_data_id'));
+               $SQL = getUpdateSqlFromArray(postRequestArray(), 'network_handler_config', 'network_data_id', postRequestElement('network_data_id'), array('network_data_id'));
 
                // Run the query
                SQL_QUERY($SQL, __FUNCTION__, __LINE__);
@@ -2061,8 +2839,23 @@ function doExpressionNetwork ($data) {
                $data['extra_func']
        );
 
-       // Replace %network_id% with the current network id
-       $replacer = str_replace('%network_id%', getCurrentNetworkId(), $replacer);
+       // Check matches[2] as it might contain more clues to look for
+       $moreData = explode(',', $data['matches'][2][$data['key']]);
+
+       // First must be 'network' so unshift it
+       shift_array($moreData, 'network');
+
+       // The second element must be a callable function
+       if (!is_callable($moreData[0])) {
+               // Is not callable!
+               reportBug(__FUNCTION__, __LINE__, 'Call-back function ' . $moreData[0] . ' cannot be called.');
+       } // END - if
+
+       // Is the current network id set?
+       if (isCurrentNetworkIdSet()) {
+               // Replace %network_id% with the current network id
+               $replacer = str_replace('%network_id%', getCurrentNetworkId(), $replacer);
+       } // END - if
 
        // Replace the code
        $code = replaceExpressionCode($data, $replacer);
@@ -2140,7 +2933,7 @@ ORDER BY
                __FUNCTION__, __LINE__);
 
        // Start an empty SQL query
-       $SQL = "INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_data` (`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`, `network_active`) VALUES\n";
+       $SQL = 'INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_data` (`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`, `network_active`) VALUES' . PHP_EOL;
 
        // Load all entries
        while ($content = SQL_FETCHARRAY($result)) {
@@ -2197,7 +2990,7 @@ ORDER BY
                ), __FUNCTION__, __LINE__);
 
        // Start an empty SQL query
-       $SQL = "INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES\n";
+       $SQL = 'INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_types` (`network_type_id`, `network_id`, `network_type_handler`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`, `network_type_reload_time_unit`, `network_text_encoding`) VALUES' . PHP_EOL;
 
        // Load all entries
        while ($content = SQL_FETCHARRAY($result)) {
@@ -2206,20 +2999,28 @@ ORDER BY
                        $content['network_type_id'] . ', ' .
                        $content['network_id'] . ", '" .
                        $content['network_type_handler'] . "', '" .
-                       $content['network_type_api_url'] . "', '" .
-                       $content['network_type_click_url'] . "', ";
-               
+                       $content['network_type_api_url'] . "', ";
+
+               // Is the column NULL?
+               if ((is_null($content['network_type_click_url'])) || (empty($content['network_type_click_url']))) {
+                       // Column is NULL
+                       $SQL .= 'NULL, ';
+               } else {
+                       // Column is set
+                       $SQL .= chr(39) . $content['network_type_click_url'] . chr(39) . ', ';
+               }
+
                // Is the column NULL?
-               if (is_null($content['network_type_banner_url'])) {
+               if ((is_null($content['network_type_banner_url'])) || (empty($content['network_type_banner_url']))) {
                        // Column is NULL
-                       $SQL .= 'NULL';
+                       $SQL .= 'NULL';
                } else {
                        // Column is set
-                       $SQL .= chr(39) . $content['network_type_banner_url'] . chr(39);
+                       $SQL .= chr(39) . $content['network_type_banner_url'] . chr(39) . ', ';
                }
 
                // Add more
-               $SQL .= ",'" . $content['network_type_reload_time_unit'] . "','" . $content['network_text_encoding'] . "'),\n";
+               $SQL .= chr(39) . $content['network_type_reload_time_unit'] . "','" . $content['network_text_encoding'] . "'),\n";
        } // END - while
 
        // Remove last commata and close braces
@@ -2259,7 +3060,7 @@ ORDER BY
                ), __FUNCTION__, __LINE__);
 
        // Start an empty SQL query
-       $SQL = "INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_request_params` (`network_id`, `network_type_id`, `network_request_param_key`, `network_request_param_value`, `network_request_param_default`) VALUES\n";
+       $SQL = 'INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_request_params` (`network_id`, `network_type_id`, `network_request_param_key`, `network_request_param_value`, `network_request_param_default`) VALUES' . PHP_EOL;
 
        // Load all entries
        while ($content = SQL_FETCHARRAY($result)) {
@@ -2315,7 +3116,7 @@ ORDER BY
                ), __FUNCTION__, __LINE__);
 
        // Start an empty SQL query
-       $SQL = "INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_vcheck_params` (`network_id`, `network_vcheck_param_key`, `network_vcheck_param_value`, `network_vcheck_param_default`) VALUES\n";
+       $SQL = 'INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_vcheck_params` (`network_id`, `network_vcheck_param_key`, `network_vcheck_param_value`, `network_vcheck_param_default`) VALUES' . PHP_EOL;
 
        // Load all entries
        while ($content = SQL_FETCHARRAY($result)) {
@@ -2371,7 +3172,7 @@ ORDER BY
                ), __FUNCTION__, __LINE__);
 
        // Start an empty SQL query
-       $SQL = "INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES\n";
+       $SQL = 'INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_array_translation` (`network_id`, `network_type_id`, `network_array_index`, `network_array_sort`) VALUES' . PHP_EOL;
 
        // Load all entries
        while ($content = SQL_FETCHARRAY($result)) {
@@ -2393,5 +3194,98 @@ ORDER BY
        loadTemplate('admin_export_network_array_translation', FALSE, $SQL);
 }
 
+// ----------------------------------------------------------------------------
+//                     Call-back functions for AJAX requests
+// ----------------------------------------------------------------------------
+
+// AJAX call-back function for quering a single API
+function doAjaxAdminNetworkQuerySingleApi () {
+       // This must be be done only by admins
+       if (!isAdmin()) {
+               // Only allowed for admins
+               reportBug(__FUNCTION__, __LINE__, 'Only allowed for admins.');
+       } elseif (!isPostRequestElementSet('network_type_id')) {
+               // Required POST field 'network_type_id' is not there
+               reportBug(__FUNCTION__, __LINE__, 'Required POST field &quot;network_type_id&quot; is missing.');
+       }
+
+       // Get network + type handler data
+       $networkData = getNetworkDataByTypeId(postRequestElement('network_type_id'));
+
+       // Is it set?
+       if (is_null($networkData)) {
+               // Provided type id is not found
+               reportBug(__FUNCTION__, __LINE__, 'Requested network type id ' . postRequestElement('network_type_id') . ' does not exist.');
+       } elseif ((!isDebugModeEnabled()) && ($networkData['network_active'] == 'N')) {
+               // Network not active
+               reportBug(__FUNCTION__, __LINE__, 'Network ' . $networkData['network_title'] . ' is not active. network_id=' . $networkData['network_id'] . ',network_type_id=' . postRequestElement('network_type_id'));
+       } elseif (!isNetworkApiConfigured($networkData['network_id'])) {
+               // Network not configured
+               reportBug(__FUNCTION__, __LINE__, 'Network ' . $networkData['network_title'] . ' is not configured yet. network_id=' . $networkData['network_id'] . ',network_type_id=' . postRequestElement('network_type_id'));
+       } elseif (!isNetworkTypeHandlerConfigured($networkData['network_id'], postRequestElement('network_type_id'))) {
+               // Network type handler not configured
+               reportBug(__FUNCTION__, __LINE__, 'Network type handler ' . $networkData['network_type_handler'] . ' for network ' . $networkData['network_title'] . ' is not configured yet. network_id=' . $networkData['network_id'] . ',network_type_id=' . postRequestElement('network_type_id'));
+       }
+
+       // Now load request parameters
+       $requestParams = getNetworkRequestParametersByTypeId(postRequestElement('network_type_id'));
+
+       // Is there at least one entry?
+       if (count($requestParams) == 0) {
+               // No entry found, please setup some first
+               reportBug(__FUNCTION__, __LINE__, 'Network ' . $networkData['network_title'] . ' with id ' . $networkData['network_id'] . ' has no request parameters.');
+       } // END - if
+
+       // Handle all keys
+       handleNetworkRequestParameterKeys($requestParams);
+
+       /*
+        * Array element network_request_param_value contains the request parameter
+        * keys, network_request_param_default contains values. Now the request can
+        * be build.
+        */
+       $requestData = array();
+       foreach ($requestParams as $key => $params) {
+               // Add id
+               $requestData[$params['network_request_param_value']] = $params['network_request_param_default'];
+       } // END - foreach
+
+       // Everything is setup and ready to send out to the affiliate network's API
+       $response = queryNetworkApi($networkData, $requestData);
+
+       // Is the returned HTTP status '200 OK'?
+       if (!isHttpStatusOkay($response[0])) {
+               // Not HTTP/1.x 200 OK
+               reportBug(__FUNCTION__, __LINE__, 'HTTP response code is not 200 OK, have: ' . $response[0]);
+       } // END - if
+
+       // Load "success" message
+       setAjaxReplyContent('{%message,ADMIN_NETWORK_QUERY_TYPE_OKAY=' . $networkData['network_title'] . '%}');
+
+       // All fine
+       setHttpStatus('200 OK');
+}
+
+// AJAX call-back function to return a JSON with all network type handler ids
+function doAjaxAdminNetworkListById () {
+       // This must be be done only by admins
+       if (!isAdmin()) {
+               // Only allowed for admins
+               reportBug(__FUNCTION__, __LINE__, 'Only allowed for admins.');
+       } elseif (!isPostRequestElementSet('network_id')) {
+               // Required POST field 'network_id' is not there
+               reportBug(__FUNCTION__, __LINE__, 'Required POST field &quot;network_id&quot; is missing.');
+       }
+
+       // Load all network type handlers by given network id and extract only network_type_id
+       $networkTypes = getArrayFromArrayIndex(getNetworkTypeDataById(postRequestElement('network_id')), 'network_type_id');
+
+       // Set generated array
+       setAjaxReplyContent(encodeJson($networkTypes));
+
+       // All fine
+       setHttpStatus('200 OK');
+}
+
 // [EOF]
 ?>
index 25687437bbe52f46c72c940dddb314e247ee224d..ae706217491ef433e3b25e4ae2d24d537d6bedc2 100644 (file)
@@ -470,7 +470,7 @@ function getTotalRallyeWinners ($rallyeId) {
 
                        // Allow valid and active users with at least one ref
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'rallyeId=' . $rallyeId . ',userid=' . $userid . ',ref=' . $prices['ref'][$key] . ',cpoints=' . $prices['cpoints'][$key]);
-                       if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
+                       if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
                                $GLOBALS[__FUNCTION__][$rallyeId]++;
                        } // END - if
                } // END - foreach
@@ -511,7 +511,7 @@ function stopRallyeByResult ($result) {
                $prices['active'][$key] = $active;
 
                // Allow valid and active users with at least one ref to get points
-               if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
+               if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
                        $total++;
                } // END - if
        } // END - foreach
@@ -529,7 +529,7 @@ function stopRallyeByResult ($result) {
        // Run array through (by userid is the most important 2nd-level-array)
        foreach ($prices['userid'] as $key => $userid) {
                // Allow valid and active users with at least one ref to get points
-               if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) {
+               if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) {
                        // Transfer data to array for the mail template
                        $content['level']  = $prices['level'][$key];
                        $content['points'] = $prices['points'][$key];
index 8cb68e69269590f6d4b5e6f0888fc43f62004a5f..dcc7740a3244afb061737da102f605f83035465e 100644 (file)
@@ -136,7 +136,7 @@ LIMIT 1',
  */
 function getRefbackPercents ($userid, $refid) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . $refid . ' - ENTERED!');
-       if ((!isValidUserId($userid)) || (!isValidUserId($refid))) {
+       if ((!isValidId($userid)) || (!isValidId($refid))) {
                // userid and/or refid is invalid
                reportBug(__FUNCTION__, __LINE__, 'userid=' . convertNullToZero($userid) . ', refid=' . convertNullToZero($refid) . ' - Both must be > 0');
        } elseif ($userid == $refid) {
index 703a2a0759745e9318f4517c0a53eb116f0b1bcf..9818c731240eb16ccebeedb0572315f880d5f33d 100644 (file)
@@ -384,7 +384,7 @@ function doUserRegistration () {
        $filterData['register_insert_id'] = bigintval(SQL_INSERTID());
 
        // Did this work?
-       if (!isValidUserId($filterData['register_insert_id'])) {
+       if (!isValidId($filterData['register_insert_id'])) {
                // Something bad happened!
                displayMessage('{--USER_NOT_REGISTERED--}');
 
@@ -437,7 +437,7 @@ function doUserRegistration () {
        } // END - if
 
        // ... rewrite a zero referral id to the main title
-       if (!isValidUserId(postRequestElement('refid'))) {
+       if (!isValidId(postRequestElement('refid'))) {
                setPostRequestElement('refid', getMainTitle());
        } // END - if
 
index 36bb1a990bc40bec87d4f4729b62d637fe2a8725..5e20e785c67d941876596340e745c91f13d9b3ab 100644 (file)
@@ -667,7 +667,7 @@ function fetchSponsorData ($sponsor_id, $column = 'id') {
                setCurrentSponsorId($sponsor_id);
 
                // Don't look for invalid sponsor_ids...
-               if (!isValidUserId($sponsor_id)) {
+               if (!isValidId($sponsor_id)) {
                        // Invalid, so abort here
                        reportBug(__FUNCTION__, __LINE__, 'Sponsor id ' . $sponsor_id . ' is invalid.');
                } elseif (isSponsorDataValid()) {
@@ -750,7 +750,7 @@ function getFetchedSponsorData ($keyColumn, $sponsor_id, $valueColumn) {
                $data = '';
 
                // Can we fetch the sponsor data?
-               if ((isValidSponsorId($sponsor_id)) && (fetchSponsorData($sponsor_id, $keyColumn))) {
+               if ((isValidId($sponsor_id)) && (fetchSponsorData($sponsor_id, $keyColumn))) {
                        // Now get the data back
                        $data = getSponsorData($valueColumn);
                } // END - if
@@ -803,25 +803,13 @@ function getCurrentSponsorId () {
 
 // Checks if current sponsor_id is set
 function isCurrentSponsorIdSet () {
-       return ((isset($GLOBALS['current_sponsor_id'])) && (isValidSponsorId($GLOBALS['current_sponsor_id'])));
-}
-
-// Is given sponsor_id valid?
-function isValidSponsorId ($sponsor_id) {
-       // Is there cache?
-       if (!isset($GLOBALS[__FUNCTION__][$sponsor_id])) {
-               // Check it out
-               $GLOBALS[__FUNCTION__][$sponsor_id] = ((!is_null($sponsor_id)) && (!empty($sponsor_id)) && ($sponsor_id > 0));
-       } // END - if
-
-       // Return cache
-       return $GLOBALS[__FUNCTION__][$sponsor_id];
+       return ((isset($GLOBALS['current_sponsor_id'])) && (isValidId($GLOBALS['current_sponsor_id'])));
 }
 
 // Getter for sponsor data
 function getSponsorData ($column) {
        // Sponsor id should not be zero
-       if (!isValidUserId(getCurrentSponsorId())) {
+       if (!isValidId(getCurrentSponsorId())) {
                reportBug(__FUNCTION__, __LINE__, 'Sponsor id is zero.');
        } // END - if
 
index 4e641f4cc8951c7f0200bda63e53bce5e760b6e2..801ab5a7ec071129a7ef3bac3e12fd124e987832 100644 (file)
@@ -526,7 +526,7 @@ function doSurfbarSelfMaintenance () {
 // Handle URLs which limit has depleted
 function doHandleSurfbarDepletedViews () {
        // Get all URLs
-       $urlArray = getSurfbarUrlData(0, 'url_views_max', 'url_id', 'ASC', 'url_id', " AND `url_views_allowed` > 0 AND `url_status`='ACTIVE'");
+       $urlArray = getSurfbarUrlData('0', 'url_views_max', 'url_id', 'ASC', 'url_id', " AND `url_views_allowed` > 0 AND `url_status`='ACTIVE'");
 
        // Are there some entries?
        if (count($urlArray) > 0) {
@@ -1006,7 +1006,7 @@ function getSurfbarTotalUrls ($status = 'ACTIVE', $excludeUserId = NULL) {
        } // END - if
 
        // Is the exlude userid set?
-       if (isValidUserId($excludeUserId)) {
+       if (isValidId($excludeUserId)) {
                // Then add it
                $userids['url_userid'][$excludeUserId] = $excludeUserId;
        } // END - if
@@ -1147,7 +1147,7 @@ function addSurfbarReloadLockById ($urlId) {
 function doSurfbarPayPoints () {
        // Remove it from the URL owner
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.getSurfbarUserid().',costs='.getSurfbarCosts() . ' - ENTERED!');
-       if (isValidUserId(getSurfbarUserid())) {
+       if (isValidId(getSurfbarUserid())) {
                // Subtract points and ignore return status
                subtractPoints(sprintf("surfbar_%s", getSurfbarPaymentModel()), getSurfbarUserid(), getSurfbarCosts());
        } // END - if
@@ -1424,7 +1424,7 @@ function changeSurfbarUrlStatus ($urlId, $prevStatus, $newStatus, $data = array(
        } // END - if
 
        // Prepare array
-       $filterData =  array(
+       $filterData = array(
                'url_id'      => $urlId,
                'prev_status' => $prevStatus,
                'new_status'  => $newStatus,
@@ -1885,7 +1885,7 @@ function generateSurfbarPackageLink ($packageId) {
        $url  = '{%url=modules.php?module=admin&amp;what=list_surfbar_packages';
 
        // Is package id given?
-       if ((!is_null($packageId)) && ($packageId > 0)) {
+       if (isValidId($packageId)) {
                // Then add it
                $url .= '&amp;package_id=' . bigintval($packageId);
        } // END - if
index b905d249c32f76e35eb717ee922247c5d9a16a8b..1357218f1b842da5131f58087a42ffd5e4d72dfc 100644 (file)
@@ -128,7 +128,7 @@ function outputAdvancedOverview (&$result_main) {
        //
        // Unassigned tasks
        //
-       $value = countSumTotalData(0, 'task_system', 'id', 'assigned_admin', TRUE, " AND `status` != 'DELETED'");
+       $value = countSumTotalData(NULL, 'task_system', 'id', 'assigned_admin', TRUE, " AND `status` != 'DELETED'");
 
        if ($value > 0) {
                $content['new_tasks'] = '<a href="{%url=modules.php?module=admin&amp;what=list_task&amp;type=unassigned%}">' . $value . '</a>';
@@ -254,7 +254,7 @@ function outputAdvancedOverview (&$result_main) {
 
                // Check for more extensions
                // @TODO These can be rewritten to filter
-               if (isValidUserId(getDefRefid()))              $userExclusionSql .= ' AND d.`userid` != {?def_refid?}';
+               if (isValidId(getDefRefid()))              $userExclusionSql .= ' AND d.`userid` != {?def_refid?}';
                if (isExtensionActive('beg'))                  $userExclusionSql .= ' AND d.`userid` != {?beg_userid?}';
                if (isExtensionActive('bonus'))                $userExclusionSql .= ' AND d.`userid` != {?bonus_userid?}';
                if (isExtensionActive('doubler'))              $userExclusionSql .= ' AND d.`userid` != {?doubler_userid?}';
@@ -519,13 +519,21 @@ ORDER BY
        } // END - if
 
        if (isExtensionInstalledAndNewer('sql_patches', '0.9.2')) {
-               // Check for accounts without referral
+               // Check for wrong "SERVER_NAME" entries
                addSql('SELECT `server_name_id` FROM `{?_MYSQL_PREFIX?}_server_name_log`');
                $DESCRs[] = '{--ADMIN_TASK_LIST_SERVER_NAME_LOG--}';
                $TITLEs[] = '{--ADMIN_TASK_LIST_SERVER_NAME_LOG_TITLE--}';
                $WHATs[]  = 'list_server_name';
        } // END - if
 
+       if (isExtensionInstalled('network')) {
+               // Check for HTTP logging entries
+               addSql('SELECT `network_header_id` FROM `{?_MYSQL_PREFIX?}_network_header_logging`');
+               $DESCRs[] = '{--ADMIN_TASK_LIST_NETWORK_HEADER_LOG--}';
+               $TITLEs[] = '{--ADMIN_TASK_LIST_NETWORK_HEADER_LOG_TITLE--}';
+               $WHATs[]  = 'list_network_http_header';
+       } // END - if
+
        // Generate extra overview rows
        $EXTRAS .= createExtraTaskRows($WHATs, $DESCRs, $TITLEs);
 
index 41c52078e24b3e0dab20157c338c81b2bd6b0a9c..2477532023cd1bff8db168ceda2a8236551611c0 100644 (file)
@@ -436,7 +436,7 @@ function doNewUserPassword ($email, $userid) {
        } elseif ((isExtensionActive('nickname')) && (isNicknameOrUserid($userid))) {
                // Nickname entered
                $accountFound = fetchUserData($userid, 'nickname');
-       } elseif ((isValidUserId($userid)) && (empty($email))) {
+       } elseif ((isValidId($userid)) && (empty($email))) {
                // Direct userid entered
                $accountFound = fetchUserData($userid);
        } elseif (isDebugModeEnabled()) {
@@ -612,7 +612,7 @@ LIMIT 1",
                        sendEmail($userid, '{--GUEST_THANX_CONFIRM--}', $message);
 
                        // Maybe he got "referraled"?
-                       if ((isValidUserId($refid)) && ($refid != $userid)) {
+                       if ((isValidId($refid)) && ($refid != $userid)) {
                                // Select the referral userid
                                if (fetchUserData($refid)) {
                                        // Update ref counter...
@@ -867,11 +867,11 @@ function isUserSubIdAssignedToMember ($subId, $userid = NULL) {
                $GLOBALS[__FUNCTION__][$subId][$userid] = (
                        (
                                // Is a userid set or current set?
-                               (isValidUserId($userid)) || (isMember())
+                               (isValidId($userid)) || (isMember())
                        ) && (
                                // .. and it assigned with subid's id?
                                countSumTotalData(
-                                       (isValidUserId($userid) ? $userid : getMemberId()),
+                                       (isValidId($userid) ? $userid : getMemberId()),
                                                'user_subids',
                                                'id',
                                                'userid',
@@ -995,7 +995,7 @@ function doTemplateAdminListUserTitle ($template, $clear = FALSE) {
 // Template call-back function for displaying "username"
 function doTemplateDisplayUsername ($template, $clear = FALSE, $userid = NULL) {
        // Is a userid set?
-       if (!isValidUserId($userid)) {
+       if (!isValidId($userid)) {
                // Please don't call this without a valid userid
                reportBug(__FUNCTION__, __LINE__, 'template=' . $template . ',clear=' . intval($clear) . ',userid[' . gettype($userid) . ']=' . intval($userid) . ' - Invalid userid provided.');
        } // END - if
index 513d455dbb43fbe54930d558495fb4621869605e..ad52d9d6c011eff93d8c8b20e6bb4470ae5e67a9 100644 (file)
@@ -72,7 +72,7 @@ function GET_WERNIS_ERROR_CODE () {
 }
 
 // Sends out a request to the API and returns it's result
-function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
+function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) {
        // Is the requestData an array?
        if (!is_array($requestData)) {
                // Then abort here!
@@ -108,10 +108,10 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
        $requestString = getWernisApiUrl() . $scriptName;
 
        // Get the raw response from the lower function
-       $response = sendPostRequest($requestString, $requestData);
+       $response = sendHttpPostRequest($requestString, $requestData);
 
        // Check the response header if all is fine
-       if (!isInString('200', $response[0])) {
+       if (!isHttpStatusOkay($response[0])) {
                // Something bad happend... :(
                return array(
                        'status'  => 'request_error',
index d55ba8ddc398ea38bc2781be966af813c0866a0b..5b82c5b5cea3dca4e7583941f958fc3c9724b9a1 100644 (file)
@@ -60,7 +60,7 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = TRUE) {
                );
 
                // Run the query
-               $response = sendGetRequest('http://www.yoomedia.de/interface_2.0/' . $script, $requestData, TRUE);
+               $response = sendHttpGetRequest('http://www.yoomedia.de/interface_2.0/' . $script, $requestData, TRUE);
 
                // Convert from ISO to UTF-8 only if count is > 3 because <= 3 means timeout
                if (count($response) > 3) {
index 3f4bcebfa695ac91e8b6ef94104daec587f20fbd..3bc6dadb4d2fdefbe2732b051fe8cc0bd7562ed8 100644 (file)
@@ -421,7 +421,7 @@ function loadModule () {
        $isModuleValid = FALSE;
 
        // Construct module name
-       $GLOBALS['module_inc'] =  sprintf("inc/modules/%s.php", getModule());
+       $GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule());
 
        // Check module permission (again)
        $moduleState = checkModulePermissions();
index 57a889db6c197ca5ad162709d20716beac2a32eb..8be13d2e1652d116158aa7125d7a0872524d4fb8 100644 (file)
@@ -92,7 +92,7 @@ function ifAdminLoginDataIsValid ($adminLogin, $adminPassword) {
        $adminId = getAdminId($adminLogin);
 
        // Continue only with found admin ids
-       if ($adminId > 0) {
+       if (isValidId($adminId)) {
                // Then we need to lookup the login name by getting the admin hash
                $adminHash = getAdminHash($adminId);
 
@@ -541,7 +541,7 @@ function adminMenuSelectionBox_DEPRECATED ($mode, $default = '', $defid = '') {
        if (!SQL_HASZERONUMS($result)) {
                // Load menu as selection
                $OUT = '<select name="' . $mode . '_menu';
-               if ((!empty($defid)) || ($defid == '0')) $OUT .= '[' . $defid . ']';
+               if (!isValidId($defid)) $OUT .= '[' . intval($defid) . ']';
                $OUT .= '" size="1" class="form_select">
        <option value="">{--SELECT_NONE--}</option>';
                // Load all entries
@@ -586,7 +586,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
        //* BUG: */ reportBug(__FUNCTION__, __LINE__, '<pre>'.print_r(postRequestArray(), TRUE).'</pre>');
        foreach ($postData as $id => $val) {
                // Process only formular field but not submit buttons ;)
-               if ($id =='save_config') {
+               if ($id == 'save_config') {
                        // Skip this button
                        continue;
                } // END - if
@@ -737,10 +737,10 @@ function generateUserProfileLink ($userid, $title = '', $what = '') {
        // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__][$userid][$title . '_' . $what])) {
                // Is title empty and valid userid?
-               if (($title == '') && (isValidUserId($userid))) {
+               if (($title == '') && (isValidId($userid))) {
                        // Set userid as title
                        $title = $userid;
-               } elseif (!isValidUserId($userid)) {
+               } elseif (!isValidId($userid)) {
                        // User id zero is invalid
                        return '<strong>' . convertNullToZero($userid) . '</strong>';
                }
@@ -942,7 +942,7 @@ function adminBuilderStatusHandler ($mode, $tableName, $columns, $filterFunction
                // Add other columns as well
                foreach (postRequestArray() as $key => $entries) {
                        // Debug message
-                       logDebugMessage(__FUNCTION__, __LINE__, 'Found entry: ' . $key);
+                       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Found entry: ' . $key);
 
                        // Skip id, raw userid and 'do_$mode'
                        if (!in_array($key, array($idColumn[0], $rawUserId[0], ('do_' . $mode)))) {
@@ -957,7 +957,7 @@ function adminBuilderStatusHandler ($mode, $tableName, $columns, $filterFunction
                                        // Add entry
                                        $content[$key] = $entries[$id];
                                }
-                       } else {
+                       } elseif (isDebugModeEnabled()) {
                                // Skipped entry
                                logDebugMessage(__FUNCTION__, __LINE__, 'Skipped: ' . $key);
                        }
@@ -1128,7 +1128,7 @@ function adminTestProxySettings ($settingsArray) {
        mergeConfig($settingsArray);
 
        // Now get the test URL
-       $content = sendGetRequest('check-updates3.php');
+       $content = sendHttpGetRequest('check-updates3.php');
 
        // Is the first line with "200 OK"?
        $valid = isInString('200 OK', $content[0]);
@@ -1284,7 +1284,7 @@ function setAdminMenuHasEntries ($action, $hasEntries) {
 // Creates a link to the user's admin-profile
 function adminCreateUserLink ($userid) {
        // Is the userid set correctly?
-       if (isValidUserId($userid)) {
+       if (isValidId($userid)) {
                // Create a link to that profile
                return '{%url=modules.php?module=admin&amp;what=list_user&amp;userid=' . bigintval($userid) . '%}';
        } // END - if
@@ -1299,7 +1299,7 @@ function generateAdminLink ($adminId) {
        $adminLink = '{--ADMIN_NO_ADMIN_ASSIGNED--}';
 
        // Zero? = Not assigned
-       if (isValidUserId($adminId)) {
+       if (isValidId($adminId)) {
                // Load admin's login
                $login = getAdminLogin($adminId);
 
@@ -1434,7 +1434,7 @@ function addEmailNavigation ($numPages, $offset, $show_form, $colspan, $return=f
                        $NAV .= '<a href="{%url=modules.php?module=admin&amp;what=' . getWhat() . '&amp;page=' . $page . '&amp;offset=' . $offset;
 
                        // Add userid when we shall show all mails from a single member
-                       if ((isGetRequestElementSet('userid')) && (isValidUserId(getRequestElement('userid')))) $NAV .= '&amp;userid=' . bigintval(getRequestElement('userid'));
+                       if ((isGetRequestElementSet('userid')) && (isValidId(getRequestElement('userid')))) $NAV .= '&amp;userid=' . bigintval(getRequestElement('userid'));
 
                        // Close open anchor tag
                        $NAV .= '%}">';
index 13a66c760d6011b56398a0c8ea17d5dc856d9c3a..1191a1ea88bcb8e9fd032a4c338b01031fe876f8 100644 (file)
@@ -337,7 +337,7 @@ LIMIT 1",
                                                        list($pid) = SQL_FETCHROW($result_pay);
                                                        SQL_FREERESULT($result_pay);
 
-                                                       if ((!empty($pid)) && ($pid > 0)) {
+                                                       if (isValidId($pid)) {
                                                                // Payout id can be obtained
                                                                $content = array(
                                                                        'pid' => $pid,
@@ -364,7 +364,7 @@ LIMIT 1",
                                                        list($pid) = SQL_FETCHROW($result_pay);
                                                        SQL_FREERESULT($result_pay);
 
-                                                       if ((!empty($pid)) && ($pid > 0)) {
+                                                       if (isValidId($pid)) {
                                                                // Payout id can be obtained
                                                                $content = array(
                                                                        'pid' => $pid,
@@ -445,7 +445,7 @@ LIMIT 1",
                                        break;
                        } // END - switch
 
-                       if (isValidUserId($content['userid'])) {
+                       if (isValidId($content['userid'])) {
                                // Member found otherwise it's a system task
                                $content['userid'] = generateUserProfileLink($content['userid']);
                        } else {
index c0314f3313cdfd2059be97a0ada72550c53fe54a..879559439057e743f9c00757bab9013576322fc9 100644 (file)
@@ -87,7 +87,7 @@ if (isFormSent('edit')) {
                        $content['mail_template'] = $template;
                        $content['admins']        = generateOptions('admins', 'id', 'login', '', 'email');;
 
-                       if (isValidUserId($adminId2)) {
+                       if (isValidId($adminId2)) {
                                // Add form for an additional admin
                                $OUT .= loadTemplate('admin_admins_mails_edit_form', TRUE, $content);
                        } // END - if
@@ -140,7 +140,7 @@ ORDER BY
                                addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins_mails` SET `admin_id`=%s WHERE `id`=%s ORDER BY `id` LIMIT 1",
                                        array($content['admin_id'], $id), __FILE__, __LINE__, FALSE));
 
-                               if ((!isValidUserId($content['admin_id'])) && (isPostRequestElementSet('template', $id))) {
+                               if ((!isValidId($content['admin_id'])) && (isPostRequestElementSet('template', $id))) {
                                        // Remove any other admin entries
                                        addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template='%s' AND id != '%s'",
                                        array(postRequestElement('template', $id), $id), __FILE__, __LINE__, FALSE));
index b03ce7aef0fed0cfe8036f757f56d4855fd15b09..528f14838eeb7a9eea9b4e5034a8963e8cf27a50 100644 (file)
@@ -56,9 +56,7 @@ if (isFormSent('save_config')) {
        } // END - foreach
 
        // Set all entries
-       foreach (array('holiday_mode') as $entry) {
-               $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
-       } // END - if
+       $content = merge_array($content, getCheckedConfig(array('holiday_mode')));
 
        // Load form template
        loadTemplate('admin_config_holiday', FALSE, $content);
diff --git a/inc/modules/admin/what-config_network.php b/inc/modules/admin/what-config_network.php
new file mode 100644 (file)
index 0000000..685dbca
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 01/01/2013 *
+ * ===================                          Last change: 01/01/2013 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-config_network.php                          *
+ * -------------------------------------------------------------------- *
+ * Short description : Configuration for ext-network                    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Konfiguration der Erweiterung ext-network        *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+       die();
+} // END - if
+
+// Add description as navigation point
+addYouAreHereLink('admin', __FILE__);
+
+if (isFormSent('save_config')) {
+       // Save data
+       adminSaveSettingsFromPostData();
+} else {
+       // Prepare content
+       $content['network_cache_refresh'] = createConfigurationTimeSelections('network_cache_refresh', 'Dhm');
+       $content['network_logging_purge'] = createConfigurationTimeSelections('network_logging_purge', 'WDh');
+
+       // Init Y/N selections
+       foreach (array('network_logging_debug') as $key) {
+               $content[$key . '_y'] = '';
+               $content[$key . '_n'] = '';
+       } // END - foreach
+
+       // Add actual config
+       $content = merge_array($content, getSelectedConfig(array('network_logging_debug')));
+
+       // Load template
+       loadTemplate('admin_config_network', FALSE, $content);
+}
+
+// [EOF]
+?>
index 9f213a2a271de12ef7697e9aae87a0fefacb1d08..2d057d6361201ae8c6468f302abfa3c2e0abba47 100644 (file)
@@ -58,7 +58,7 @@ if ($GLOBALS['network_display'] === FALSE) {
 // Is there a network selected?
 if (isGetRequestElementSet('network_id')) {
        // Check all networks that doesn't have a configuration entry
-       $result = SQL_QUERY_ESC("SELECT
+       $result = SQL_QUERY_ESC('SELECT
        `network_id`,
        `network_short_name`,
        `network_title`,
@@ -70,12 +70,13 @@ if (isGetRequestElementSet('network_id')) {
        NULL AS `network_api_site_id`,
        NULL AS `network_api_active`,
        NULL AS `network_api_referral_link`,
-       NULL AS `network_api_referral_button`
+       NULL AS `network_api_referral_button`,
+       NULL AS `network_api_remaining_requests`
 FROM
        `{?_MYSQL_PREFIX?}_network_data`
 WHERE
        `network_id`=%s
-LIMIT 1",
+LIMIT 1',
                array(
                        bigintval(getRequestElement('network_id'))
                ), __FILE__, __LINE__);
@@ -86,7 +87,7 @@ LIMIT 1",
                $content = SQL_FETCHARRAY($result);
 
                // Is the network active?
-               if ($content['network_active'] == 'N') {
+               if (($content['network_active'] == 'N') && (!isAdminsExpertWarningEnabled()) && (!isDebugModeEnabled())) {
                        // Not active
                        displayMessage('{--ADMIN_NETWORK_NOT_ACTIVE--}');
                        return;
@@ -99,7 +100,8 @@ LIMIT 1",
        `network_api_site_id`,
        `network_api_active`,
        `network_api_referral_link`,
-       `network_api_referral_button`
+       `network_api_referral_button`,
+       `network_api_remaining_requests`
 FROM
        `{?_MYSQL_PREFIX?}_network_api_config`
 WHERE
@@ -118,7 +120,7 @@ LIMIT 1',
                // Free result
                SQL_FREERESULT($result_config);
 
-               // Load main template
+               // Load main template (for "add" and "edit")
                loadTemplate('admin_config_network_api', FALSE, $content);
        } else {
                // Please setup some networks first
@@ -129,7 +131,13 @@ LIMIT 1',
        SQL_FREERESULT($result);
 } else {
        // Generate network list for this script
-       outputHtml(generateAdminNetworkList());
+       $OUT = generateAdminNetworkList(TRUE);
+
+       // Is it not empty?
+       if (!empty($OUT)) {
+               // Output it
+               outputHtml($OUT);
+       } // END - if
 }
 
 // [EOF]
index 671e5599a91222c30bbea532d0fb331173c4316b..199a7f4ab85c28e48e6f747f7f11af2d22ededc0 100644 (file)
@@ -72,9 +72,13 @@ if (isGetRequestElementSet('network_id')) {
        NULL AS `network_data_id`,
        NULL AS `network_max_reload_time`,
        NULL AS `network_min_waiting_time`,
+       NULL AS `network_max_waiting_time`,
+       NULL AS `network_min_remain_budget`,
        NULL AS `network_min_remain_clicks`,
        NULL AS `network_min_payment`,
-       NULL AS `network_allow_erotic`
+       NULL AS `network_allow_erotic`,
+       NULL AS `network_media_size`,
+       NULL AS `network_media_output`
 FROM
        `{?_MYSQL_PREFIX?}_network_types` AS t
 INNER JOIN
@@ -96,7 +100,7 @@ LIMIT 1',
                        $content = SQL_FETCHARRAY($result);
 
                        // Is the network active?
-                       if ($content['network_active'] == 'N') {
+                       if (($content['network_active'] == 'N') && (!isAdminsExpertWarningEnabled()) && (!isDebugModeEnabled())) {
                                // Not active
                                displayMessage('{--ADMIN_NETWORK_NOT_ACTIVE--}');
                                return;
@@ -107,11 +111,15 @@ LIMIT 1',
        `network_data_id`,
        `network_max_reload_time`,
        `network_min_waiting_time`,
+       `network_max_waiting_time`,
+       `network_min_remain_budget`,
        `network_min_remain_clicks`,
        `network_min_payment`,
-       `network_allow_erotic`
+       `network_allow_erotic`,
+       `network_media_size`,
+       `network_media_output`
 FROM
-       `{?_MYSQL_PREFIX?}_network_types_config`
+       `{?_MYSQL_PREFIX?}_network_handler_config`
 WHERE
        `network_id`=%s AND
        `network_type_id`=%s
@@ -181,11 +189,15 @@ ORDER BY
        `network_data_id`,
        `network_max_reload_time`,
        `network_min_waiting_time`,
+       `network_max_waiting_time`,
+       `network_min_remain_budget`,
        `network_min_remain_clicks`,
        `network_min_payment`,
-       `network_allow_erotic`
+       `network_allow_erotic`,
+       `network_media_size`,
+       `network_media_output`
 FROM
-       `{?_MYSQL_PREFIX?}_network_types_config`
+       `{?_MYSQL_PREFIX?}_network_handler_config`
 WHERE
        `network_id`=%s AND
        `network_type_id`=%s
@@ -231,7 +243,16 @@ LIMIT 1',
        SQL_FREERESULT($result);
 } else {
        // Generate network list for this script
-       outputHtml(generateAdminNetworkList());
+       $OUT = generateAdminNetworkList(FALSE, TRUE, FALSE);
+
+       // Is it not empty?
+       if (!empty($OUT)) {
+               // Output it
+               outputHtml($OUT);
+       } else {
+               // Nothing configured yet
+               displayMessage('{--ADMIN_NETWORK_QUERY_API_404--}');
+       }
 }
 
 // [EOF]
index f7571f5bf7dec86077d6479ae2681d67698526d6..89510af4e7c89c3e373ff158f4e724a55ab8a0a1 100644 (file)
@@ -53,14 +53,10 @@ if (isFormSent('save_config')) {
        } // END - foreach
 
        // Set all default checks
-       foreach (array('order_max_full', 'order_mode') as $entry) {
-               $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
-       } // END - foreach
+       $content = merge_array($content, getCheckedConfig(array('order_max_full', 'order_mode')));
 
        // Set all default selections
-       foreach (array('repay_deleted_mails') as $entry) {
-               $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"';
-       } // END - foreach
+       $content = merge_array($content, getSelectedConfig(array('repay_deleted_mails')));
 
        // Load template
        loadTemplate('admin_config_order', FALSE, $content);
index 78688741e514d2f5ddacad82d22127c889e4e4e8..7345a4eb6fa846d07abb65c242b0b37458c4c61d 100644 (file)
@@ -83,17 +83,15 @@ if (isFormSent('save_config')) {
                $content[$entry] = '';
        } // END - foreach
 
-       // Set selections
-       foreach (array('css_php','mailid_error_redirect') as $entry) {
-               $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
-       } // END - foreach
-
        for ($i = '0'; $i <= 5; $i++) {
                $content['comma_def_' . $i] = '';
        } // END - for
 
+       // Set selections
+       $content = merge_array($content, getCheckedConfig(array('css_php','mailid_error_redirect')));
+
        // Set selection
-       $content['comma_def_' . getConfig('max_comma')] = ' selected="selected"';
+       $content = merge_array($content, getSelectedConfig(array('comma_def_' . getConfig('max_comma'))));
 
        // Load template
        loadTemplate('admin_config_other', FALSE, $content);
index b6585858dc024be7fb8a59645f8e8701848a8f4f..466e5737fd464b1ec0a0e4095c8e00f3bef6f0a9 100644 (file)
@@ -56,9 +56,7 @@ if (isFormSent('save_config')) {
        } // END - foreach
 
        // Set all selections
-       foreach (array('refid_target', 'select_user_zero_refid') as $entry) {
-               $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"';
-       } // END - foreach
+       $content = merge_array($content, getSelectedConfig(array('refid_target', 'select_user_zero_refid')));
 
        // Load template
        loadTemplate('admin_config_refid', FALSE, $content);
index 357af091318d933dbf027b98cc6c39dda480f1e7..464afebbd54e0bafb4127143202bce0c60d3fc83 100644 (file)
@@ -49,13 +49,11 @@ if (isFormSent('save_config')) {
 } else {
        // Prepare more entries
        foreach (array('anonymous_ip_local','anonymous_ip_zero','anonymous_ip_random') as $entry) {
-               $content[$entry] =  '';
+               $content[$entry] = '';
        } // END - foreach
 
        // Set default selections
-       foreach (array('anonymous_ip') as $entry) {
-               $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"';
-       } // END - foreach
+       $content = merge_array($content, getSelectedConfig(array('anonymous_ip')));
 
        // Load template
        loadTemplate('admin_config_removeip', FALSE, $content);
index dc9533b057a8a930646a38562d96890fdbbf15eb..33b20d32f5eac699edbea0eb585d4e514aa6fcb1 100644 (file)
@@ -68,9 +68,7 @@ if (isFormSent('save_config')) {
        } // END - foreach
 
        // Prepare selections
-       foreach (array('surfbar_payment_model','surfbar_pause_mode','surfbar_notification_mode') as $entry) {
-               $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
-       } // END - foreach
+       $content = merge_array($content, getCheckedConfig(array('surfbar_payment_model','surfbar_pause_mode','surfbar_notification_mode')));
 
        // Load template
        loadTemplate('admin_config_surfbar', FALSE, $content);
index ffa82a272ed03fdc1c19ffeb755d5b9478ad7e95..f377cd88996a56a7db5db274c78b0ae641232d14 100644 (file)
@@ -60,9 +60,7 @@ if (isFormSent('save_config')) {
        } // END - for
 
        // Set default selection
-       foreach (array('yoomedia_erotic_allowed') as $entry) {
-               $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"';
-       } // END - foreach
+       $content = merge_array($content, getSelectedConfig(array('yoomedia_erotic_allowed')));
 
        // Load template
        loadTemplate('admin_config_yoomedia', FALSE, $content);
index 678d58eb9d0a14f9face2027abd29217e3287aee..077f255a4d8b52d44e681890eb352a9a3db2b5d4 100644 (file)
@@ -340,7 +340,7 @@ ORDER BY
                $numTasks = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, "AND `task_type`='EXTENSION'");
 
                // Is the id number valid and the task was found?
-               if (($taskId > 0) && ($numTasks > 0)) {
+               if ((isValidId($taskId)) && ($numTasks > 0)) {
                        // id is valid so begin with registration, we first want to it's real name from task management (subject column)
                        $result = SQL_QUERY_ESC("SELECT `subject` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1",
                                array(bigintval($taskId)), __FILE__, __LINE__);
index ed1611572c51a5217c1f22e31c0d195ec3beca44..3213480bbf2cdb004c444d7f2e47a71dcb80f1e3 100644 (file)
@@ -46,10 +46,10 @@ addYouAreHereLink('admin', __FILE__);
 // Exclude default referral id if set
 // @TODO Rewrite those lines to filter
 $userExclusionSql = runFilterChain('user_exclusion_sql', ' ');
-if (isValidUserId(getDefRefid()))              $userExclusionSql .= ' AND d.userid != {?def_refid?}';
-if (isExtensionActive('beg'))                  $userExclusionSql .= ' AND d.userid != {?beg_userid?}';
-if (isExtensionActive('bonus'))                $userExclusionSql .= ' AND d.userid != {?bonus_userid?}';
-if (isExtensionActive('doubler'))              $userExclusionSql .= ' AND d.userid != {?doubler_userid?}';
+if (isValidId(getDefRefid()))                         $userExclusionSql .= ' AND d.userid != {?def_refid?}';
+if (isExtensionActive('beg'))                         $userExclusionSql .= ' AND d.userid != {?beg_userid?}';
+if (isExtensionActive('bonus'))                       $userExclusionSql .= ' AND d.userid != {?bonus_userid?}';
+if (isExtensionActive('doubler'))                     $userExclusionSql .= ' AND d.userid != {?doubler_userid?}';
 if (isExtensionInstalledAndNewer('holiday', '0.1.3')) $userExclusionSql .= " AND d.`holiday_active`='N'";
 
 // Check for all accounts
index fe4c5c33b0589a0317c74c1057b473f41cc736ed..2c0d3a910ed19632f9e09db71b417a2b346d770b 100644 (file)
@@ -76,7 +76,7 @@ if (isGetRequestElementSet('network_id')) {
        $ADD = '';
        if ((isPostRequestElementSet('network_type_id')) && (!is_array(postRequestElement('network_type_id')))) {
                // Only show from current type handler
-               $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestElement('network_type_id')));
+               $ADD = sprintf(" AND `p`.`network_type_id`=%s", bigintval(postRequestElement('network_type_id')));
 
                // Overwrite type
                $networkData['network_type_id'] = bigintval(postRequestElement('network_type_id'));
@@ -87,23 +87,23 @@ if (isGetRequestElementSet('network_id')) {
 
        // Load all advert codes for given network
        $result = SQL_QUERY_ESC("SELECT
-       p.`network_array_id`,
-       t.`network_type_id`,
-       t.`network_type_handler`,
-       p.`network_array_index`,
-       p.`network_array_sort`
+       `p`.`network_array_id`,
+       `t`.`network_type_id`,
+       `t`.`network_type_handler`,
+       `p`.`network_array_index`,
+       `p`.`network_array_sort`
 FROM
-       `{?_MYSQL_PREFIX?}_network_array_translation` AS p
+       `{?_MYSQL_PREFIX?}_network_array_translation` AS `p`
 INNER JOIN
-       `{?_MYSQL_PREFIX?}_network_types` AS t
+       `{?_MYSQL_PREFIX?}_network_types` AS `t`
 ON
-       p.`network_type_id`=t.`network_type_id`
+       `p`.`network_type_id`=`t`.`network_type_id`
 WHERE
-       p.`network_id`=%s
+       `p`.`network_id`=%s
        ".$ADD."
 ORDER BY
-       t.`network_type_handler` ASC,
-       p.`network_array_id` ASC",
+       `t`.`network_type_handler` ASC,
+       `p`.`network_array_id` ASC",
                array(
                        bigintval(getRequestElement('network_id'))
                ), __FILE__, __LINE__);
@@ -143,7 +143,13 @@ ORDER BY
        loadTemplate('admin_add_network_array_translation', FALSE, $networkData);
 } else {
        // Generate network list for this script
-       outputHtml(generateAdminNetworkList());
+       $OUT = generateAdminNetworkList();
+
+       // Is it not empty?
+       if (!empty($OUT)) {
+               // Output it
+               outputHtml($OUT);
+       } // END - if
 }
 
 // [EOF]
index aa369cd69c63d113795f3773e0a451a132fb7161..514b8a1e08122b26a285c12b50efa3ec7bc1256e 100644 (file)
@@ -139,7 +139,13 @@ ORDER BY
        loadTemplate('admin_add_network_request_param', FALSE, $networkData);
 } else {
        // Generate network list for this script
-       outputHtml(generateAdminNetworkList());
+       $OUT = generateAdminNetworkList();
+
+       // Is it not empty?
+       if (!empty($OUT)) {
+               // Output it
+               outputHtml($OUT);
+       } // END - if
 }
 
 // [EOF]
index 13ea31cdfb2c51ca05073ed78bbb95baea092cf3..ffa5ac7e2e97a9417be8e9dbeadc7e9a45a43acc 100644 (file)
@@ -121,7 +121,13 @@ ORDER BY
        loadTemplate('admin_add_network_type', FALSE, $networkData);
 } else {
        // Generate network list for this script
-       outputHtml(generateAdminNetworkList());
+       $OUT = generateAdminNetworkList();
+
+       // Is it not empty?
+       if (!empty($OUT)) {
+               // Output it
+               outputHtml($OUT);
+       } // END - if
 }
 
 // [EOF]
index 0bc39996e5dff26b0e3435d97fca22cf56db2fe6..e25dfb252c465c8ef3f936432ce8f159d7943d2d 100644 (file)
@@ -115,7 +115,13 @@ ORDER BY
        loadTemplate('admin_add_network_vcheck_param', FALSE, $networkData);
 } else {
        // Generate network list for this script
-       outputHtml(generateAdminNetworkList());
+       $OUT = generateAdminNetworkList();
+
+       // Is it not empty?
+       if (!empty($OUT)) {
+               // Output it
+               outputHtml($OUT);
+       } // END - if
 }
 
 // [EOF]
index a4c330c85a5bb352d8c14e665d1a9e6f77a724d0..be043aceac4c6b3f2e5828de868aa42fd2436be8 100644 (file)
@@ -51,14 +51,14 @@ if (isGetRequestElementSet('pid')) {
        SQL_FREERESULT($result);
 
        // Obtain some data
-       if (!isGetRequestElementSet('task') && (!empty($userid)) && (isValidUserId($userid))) {
+       if (!isGetRequestElementSet('task') && (!empty($userid)) && (isValidId($userid))) {
                // Get task id from database
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `userid`=%s AND `task_type`='PAYOUT_REQUEST' AND `task_created`=%s LIMIT 1",
                        array(bigintval($userid), bigintval($tstamp)), __FILE__, __LINE__);
                list($taskId) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
                if (empty($taskId)) $taskId = '0';
-       } elseif ((empty($userid)) || ($userid == '0')) {
+       } elseif (!isValidId($userid)) {
                // Cannot obtain member id!
                displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_USERID--}');
        } else {
@@ -66,7 +66,7 @@ if (isGetRequestElementSet('pid')) {
                $taskId = getRequestElement('task');
        }
 
-       if ((!empty($taskId)) && (!empty($userid)) && (isValidUserId($userid))) {
+       if ((!empty($taskId)) && (!empty($userid)) && (isValidId($userid))) {
                // Load user's data
                if (!fetchUserData($userid)) {
                        // Abort here because it is not valid!
@@ -127,7 +127,7 @@ LIMIT 1",
                                                $reason = encodeString(getMessage('ADMIN_PAYOUT_REASON'), FALSE);
 
                                                // Execute transfer
-                                               $ret = sendGetRequest($data['engine_url']);
+                                               $ret = sendHttpGetRequest($data['engine_url']);
                                        } else {
                                                // No URL to run
                                                $ret[0] = $data['engine_ret_ok'];
@@ -135,7 +135,7 @@ LIMIT 1",
 
                                        if ($ret[0] == $data['engine_ret_ok']) {
                                                // Clear task
-                                               if ($taskId > 0) {
+                                               if (isValidId($taskId)) {
                                                        runFilterChain('solve_task', $taskId);
                                                } // END - if
 
@@ -180,7 +180,7 @@ LIMIT 1",
                } elseif ((getRequestElement('do') == 'reject') && (getUserData('email') != '')) {
                        // Ok, now we can output the form or execute rejecting
                        if (isFormSent()) {
-                               if ($taskId > 0) {
+                               if (isValidId($taskId)) {
                                        // Clear task
                                        runFilterChain('solve_task', $taskId);
                                } // END - if
@@ -212,7 +212,7 @@ LIMIT 1",
                        // Cannot load user data
                        displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_USERDATA--}');
                }
-       } elseif ((empty($taskId)) || ($taskId == '0')) {
+       } elseif (!isValidId($taskId)) {
                // Failed loading task id
                displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_TASK_ID--}');
        }
@@ -223,19 +223,27 @@ LIMIT 1",
        } // END - if
 
        // Search for payouts
-       $result = SQL_QUERY("SELECT
-       p.id, p.userid, p.payout_total, p.target_account,
-       p.target_bank, t.type, p.payout_timestamp, p.status,
-       t.allow_url AS allow, p.target_url AS url, p.link_text AS alt,
-       p.banner_url AS banner
+       $result = SQL_QUERY('SELECT
+       `p`.`id`,
+       `p`.`userid`,
+       `p`.`payout_total`,
+       `p`.`target_account`,
+       `p`.`target_bank`,
+       `t`.`type`,
+       `p`.`payout_timestamp`,
+       `p`.`status`,
+       `t`.`allow_url` AS `allow`,
+       `p`.`target_url` AS `url`,
+       `p`.`link_text` AS `alt`,
+       `p`.`banner_url` AS `banner`
 FROM
-       `{?_MYSQL_PREFIX?}_user_payouts` AS p
+       `{?_MYSQL_PREFIX?}_user_payouts` AS `p`
 LEFT JOIN
-       `{?_MYSQL_PREFIX?}_payout_types` AS t
+       `{?_MYSQL_PREFIX?}_payout_types` AS `t`
 ON
-       p.payout_id=t.id
+       `p`.`payout_id`=`t`.`id`
 ORDER BY
-       p.payout_timestamp DESC", __FILE__, __LINE__);
+       `p`.`payout_timestamp` DESC', __FILE__, __LINE__);
 
        if (!SQL_HASZERONUMS($result)) {
                // List found payouts
index 31389aa8adfb9c810beb521566b89d29a7c6058c..7298f63cc2066347da2b9fd563190777b62b1c29 100644 (file)
@@ -151,7 +151,7 @@ ORDER BY
                        } // END - switch
 
                        // Member assigned with task?
-                       if (isValidUserId($content['userid'])) {
+                       if (isValidId($content['userid'])) {
                                // Member found otherwise it's a system task
                                $content['userid'] = generateUserProfileLink($content['userid']);
                        } else {
index 30d7709580ea8511ce6127bf2cb6c7d4c5a21365..495cfacc94ce6f6e5b95fd26adea88cb80f1d684 100644 (file)
@@ -43,5 +43,25 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addYouAreHereLink('admin', __FILE__);
 
+// Is there a network selected?
+if (isGetRequestElementSet('network_id')) {
+       // Display all configured networks and type handlers
+       doGenericXmlTemplateCallback('admin_list_network_query_api_config', array(
+               'network_id' => bigintval(getRequestElement('network_id'))
+       ));
+} else {
+       // Generate network list for this script
+       $OUT = generateAdminNetworkList(FALSE, TRUE, FALSE);
+
+       // Is it not empty?
+       if (!empty($OUT)) {
+               // Output it
+               outputHtml($OUT);
+       } else {
+               // Nothing configured yet
+               displayMessage('{--ADMIN_NETWORK_QUERY_API_404--}');
+       }
+}
+
 // [EOF]
 ?>
index 0c6cd90d3a0283888f5ecf3ae4738f80c4c0d270..fa35a95d92c0d6cc45e3be45bea8bf2e2893aa98 100644 (file)
@@ -99,7 +99,7 @@ ORDER BY
 
                                                // Set default email
                                                $content['email'] = '{--SPONSOR_NO_ADMIN--}';
-                                               if (isValidUserId($content['admin_id'])) {
+                                               if (isValidId($content['admin_id'])) {
                                                        // Load admin's email address for contact
                                                        $content['email'] = getAdminEmail($content['admin_id']);
                                                } // END - if
@@ -143,7 +143,7 @@ LIMIT 1",
                        array($content['id']), __FILE__, __LINE__);
 
                        // Update, if applyable, referral count and points
-                       if ((isValidUserId($content['refid'])) && ($content['refid'] != $content['id'])) {
+                       if ((isValidId($content['refid'])) && ($content['refid'] != $content['id'])) {
                                // Update referral account
                                SQL_QUERY_ESC("UPDATE
        `{?_MYSQL_PREFIX?}_sponsor_data`
index b0b960fab2457d86886bc2b9b903e7cc6ba5f7e9..89df15eea14fb18924bd9e3372df32367044ab6a 100644 (file)
@@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__);
 $ONLINE['code'] = '???';
 
 // Get response from our server in an array
-$response = sendGetRequest('check-updates3.php');
+$response = sendHttpGetRequest('check-updates3.php');
 
 if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($response[3])) {
        // Error!
index 2de64b2ac80dc8a25fca45fd592bcfa78b9ed98c..df3716043c5a11282ef19d9de3552da734c85530 100644 (file)
@@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 // Is a user id given?
-if ((isGetRequestElementSet('userid')) && (isValidUserId(getRequestElement('userid')))) {
+if ((isGetRequestElementSet('userid')) && (isValidId(getRequestElement('userid')))) {
        // Is a user account found?
        if (fetchUserData(getRequestElement('userid'))) {
                // Load the data
index 29c6b6f502fc5e58cab161baa9f7326333d5718a..159a43e123a82bfec0ba1a63983853862317731f 100644 (file)
@@ -67,7 +67,7 @@ if (isExtensionActive('online')) {
                        } elseif (($row['is_member'] != 'Y') && ($row['is_admin'] != 'Y')) {
                                // Is a guest
                                $row['userid'] = '{--_IS_GUEST--}';
-                       } elseif (isValidUserId($row['userid'])) {
+                       } elseif (isValidId($row['userid'])) {
                                // Add profile link to userid
                                $row['userid'] = generateUserProfileLink($row['userid']);
                        }
index 8a19eb5607ad1e9e5b2f66d2e9138b4ab55ea45c..0c5f81fd51159feba1334a8ebe3245f95845ae17 100644 (file)
@@ -291,10 +291,10 @@ ORDER BY
                        $content['form_errors'] = $OUT;
 
                        // @TODO Maybe a default referral id?
-                       $content['refid'] = 0;
+                       $content['refid'] = NULL;
 
                        // Is the referral id valid?
-                       if ((isPostRequestElementSet('refid')) && (isValidUserId(postRequestElement('refid')))) {
+                       if ((isPostRequestElementSet('refid')) && (isValidId(postRequestElement('refid')))) {
                                // Transfer referral id
                                $content['refid'] = bigintval(postRequestElement('refid'));
                        } // END - if
index 7b65d6d7fe5fde79d0e20dba645d4d70c3d8113b..e34bc657ea88bf91729f7ad5a98f7d6892f108fc 100644 (file)
@@ -69,7 +69,7 @@ if (!ifSurfbarMemberAllowedMoreUrls()) {
        $insertId = doSurfbarMemberAddUrl(postRequestElement('url'), postRequestElement('limit'));
 
        // Was this fine?
-       if ($insertId > 0) {
+       if (isValidId($insertId)) {
                // URL added and waiting for unlock
                $message = '{--MEMBER_SURFBAR_URL_ADDED--}';
        } // END - if
index f4799ce3be7c9ecf4db27ac19258c0f1ebda932e..d272ef36e25ff07654e7186a4531f3b5ce37db37 100644 (file)
@@ -251,7 +251,7 @@ LIMIT 1",
                        // Check if he has enougth points for this order and selected more than 0 receivers
                        if (($usedPoints > 0) && ($usedPoints <= $totalPoints) && ($content['target_send'] > 0)) {
                                // Gettings points is okay, so we can add $usedPoints later from
-                               if (($id == '0') || ($type != 'TEMP')) {
+                               if ((!isValidId($id)) || ($type != 'TEMP')) {
                                        // New order
                                        $id = '0';
                                        if (isExtensionActive('html_mail')) {
@@ -405,7 +405,7 @@ LIMIT 1",
                                }
 
                                // Make sure only valid id numbers can pass
-                               assert((!is_bool($id)) && ($id > 0));
+                               assert(isValidId($id));
 
                                // Id is received so we can redirect the user, used points will be added when he send's out the mail
                                $url = 'modules.php?module=frametester&amp;order=' . $id;
index 887a251f54103a8bde5c86b97dcfeef040484a9e..81d8c78803e56f35f63ac86df1f6fa5504cadb53 100644 (file)
@@ -75,7 +75,7 @@ if (!SQL_HASZERONUMS($result)) {
                $test = str_replace(getUrl(), getPath(), $row['url']); $size = '0';
                if ($test == $row['url']) {
                        // Download banner (I hope you keep the banner on same server???)
-                       $fp = sendGetRequest($row['url']);
+                       $fp = sendHttpGetRequest($row['url']);
                        $bannerContent = '';
                        if ((!empty($fp)) && (is_array($fp)) && (count($fp) > 0)) {
                                // Loads only found banner, when there is a 404 error this foreach() command
index a0ad05b9e784af090e70d591ee9dc5f8b9553fc4..b8bb61dc81b8187484329e6a750299bedc91cfc9 100644 (file)
@@ -91,7 +91,7 @@ switch ($mode) {
                        $valid_reason = (isPostRequestElementSet('reason'));
 
                        // Test if a recipient is selected
-                       $valid_recipient = isValidUserId(postRequestElement('to_userid'));
+                       $valid_recipient = isValidId(postRequestElement('to_userid'));
 
                        // Re-check receivers and own personal data
                        $result = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` IN ('%s','%s') AND `status`='CONFIRMED'" . runFilterChain('user_exclusion_sql', ' ') . " LIMIT 2",
@@ -417,7 +417,7 @@ INDEX (`party_userid`)
                SQL_FREERESULT($result);
 
                // ... and add them to a constant for the template
-               $content['rows'] =  $OUT;
+               $content['rows'] = $OUT;
 
                // Remeber total amount
                $content['total_points'] = $total;
index 283aa9ed514bd235db5adab855693095aa4b8427..c648207612558461c92e5065d963d81e575c58f2 100644 (file)
@@ -230,7 +230,7 @@ LIMIT 1",
                        } // END - if
 
                        // Prepare sender id
-                       if ((isValidUserId($sender)) && ($row['link_type'] == 'mailid')) {
+                       if ((isValidId($sender)) && ($row['link_type'] == 'mailid')) {
                                // Sender id
                                $sender = bigintval($sender);
                        } elseif ($row['link_type'] == 'bonusid') {
index 906f70da123e74d3f52ddf272b88b2a34ec04d1b..03bc6e65f1e9939784f796eef01645197f19e958 100644 (file)
@@ -55,7 +55,7 @@ if ((getBegRanks() > 0) && (!isCssOutputMode())) {
        $whereStatement = '';
 
        // Shall we exclude webmaster's own userid?
-       if ((!isBegIncludeOwnEnabled()) && (isValidUserId(getBegUserid()))) {
+       if ((!isBegIncludeOwnEnabled()) && (isValidId(getBegUserid()))) {
                // Exclude it
                $whereStatement .= ' AND `userid` != {?beg_userid?}';
        } // END - if
index 1c60912a0159cf9ba600c5006d9b3e237db9a73d..a242cd01c9238c28fa06393ffd5a767d3ce6cf41 100644 (file)
@@ -483,7 +483,7 @@ function fetchUserData ($value, $column = 'userid') {
                $value = bigintval($value);
 
                // Don't look for invalid userids...
-               if (!isValidUserId($value)) {
+               if (!isValidId($value)) {
                        // Invalid, so abort here
                        reportBug(__FUNCTION__, __LINE__, 'User id ' . $value . ' is invalid.');
                } // END - if
@@ -868,10 +868,10 @@ function getCategory ($cid) {
        $data['cat'] = '{--_CATEGORY_404--}';
 
        // Is the category id set?
-       if ($cid == '0') {
+       if (!isValidId($cid)) {
                // No category
                $data['cat'] = '{--_CATEGORY_NONE--}';
-       } elseif ($cid > 0) {
+       } elseif (isValidId($cid)) {
                // Lookup the category in database
                $result = SQL_QUERY_ESC('SELECT `cat` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1',
                        array(bigintval($cid)), __FUNCTION__, __LINE__);
@@ -941,12 +941,12 @@ function removeReceiver (&$receivers, $key, $userid, $poolId, $statsId = 0, $isB
        $ret = 'failed';
 
        // Is the userid valid?
-       if (isValidUserId($userid)) {
+       if (isValidId($userid)) {
                // Remove entry from array
                unset($receivers[$key]);
 
                // Is there already a line for this user available?
-               if ($statsId > 0) {
+               if (isValidId($statsId)) {
                        // Default is 'normal' mail
                        $type = 'NORMAL';
                        $rowName = 'stats_id';
@@ -1002,7 +1002,7 @@ function removeReceiver (&$receivers, $key, $userid, $poolId, $statsId = 0, $isB
 function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = FALSE, $add = '', $mode = '=') {
        // Debug message
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',tableName=' . $tableName . ',lookFor=' . $lookFor . ',whereStatement=' . $whereStatement . ',add=' . $add);
-       if ((empty($search)) && ($search != '0')) {
+       if ((empty($search)) && (!is_null($search))) {
                // Count or sum whole table?
                if ($countRows === TRUE) {
                        // Count whole table
@@ -1023,26 +1023,68 @@ function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatemen
                }
        } elseif (($countRows === TRUE) || ($lookFor == 'userid')) {
                // Count rows
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'COUNT!');
-               $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'" . $add . ' LIMIT 1',
-                       array(
-                               $lookFor,
-                               $tableName,
-                               $whereStatement,
-                               $mode,
-                               $search
-                       ), __FUNCTION__, __LINE__);
+               if (is_null($search)) {
+                       // Fix mode
+                       if ($mode == '=') {
+                               $mode = 'IS';
+                       } elseif ($mode == '!=') {
+                               $mode = 'IS NOT';
+                       }
+
+                       // Look for NULL/0
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'COUNT-NULL!');
+                       $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE (`%s` %s NULL OR `%s`=0)" . $add . ' LIMIT 1',
+                               array(
+                                       $lookFor,
+                                       $tableName,
+                                       $whereStatement,
+                                       $mode,
+                                       $whereStatement
+                               ), __FUNCTION__, __LINE__);
+               } else {
+                       // Regular entry
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'COUNT!');
+                       $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'" . $add . ' LIMIT 1',
+                               array(
+                                       $lookFor,
+                                       $tableName,
+                                       $whereStatement,
+                                       $mode,
+                                       $search
+                               ), __FUNCTION__, __LINE__);
+               }
        } else {
-               // Add all rows
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SUM!');
-               $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'" . $add . ' LIMIT 1',
-                       array(
-                               $lookFor,
-                               $tableName,
-                               $whereStatement,
-                               $mode,
-                               $search
-                       ), __FUNCTION__, __LINE__);
+               // Sum all rows
+               if (is_null($search)) {
+                       // Fix mode
+                       if ($mode == '=') {
+                               $mode = 'IS';
+                       } elseif ($mode == '!=') {
+                               $mode = 'IS NOT';
+                       }
+
+                       // Look for NULL/0
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SUM-NULL!');
+                       $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE (`%s` %s NULL OR `%s`=0)" . $add . ' LIMIT 1',
+                               array(
+                                       $lookFor,
+                                       $tableName,
+                                       $whereStatement,
+                                       $mode,
+                                       $whereStatement
+                               ), __FUNCTION__, __LINE__);
+               } else {
+                       // Regular entry
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SUM!');
+                       $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'" . $add . ' LIMIT 1',
+                               array(
+                                       $lookFor,
+                                       $tableName,
+                                       $whereStatement,
+                                       $mode,
+                                       $search
+                               ), __FUNCTION__, __LINE__);
+               }
        }
 
        // Load row
@@ -1259,7 +1301,7 @@ function getAdminDefaultAcl ($adminId) {
        // Is ext-sql_patches there and was it found in cache?
        if (!isExtensionActive('sql_patches')) {
                // Not found, which is bad, so we need to allow all
-               $data['default_acl'] =  'allow';
+               $data['default_acl'] = 'allow';
        } elseif (isset($GLOBALS['cache_array']['admin']['default_acl'][$adminId])) {
                // Use cache
                $data['default_acl'] = $GLOBALS['cache_array']['admin']['default_acl'][$adminId];
@@ -1296,7 +1338,7 @@ function getAdminMenuMode ($adminId) {
        // Is ext-sql_patches there and was it found in cache?
        if (!isExtensionActive('sql_patches')) {
                // Not found, which is bad, so we need to allow all
-               $data['la_mode'] =  'global';
+               $data['la_mode'] = 'global';
        } elseif (isset($GLOBALS['cache_array']['admin']['la_mode'][$adminId])) {
                // Use cache
                $data['la_mode'] = $GLOBALS['cache_array']['admin']['la_mode'][$adminId];
@@ -1718,7 +1760,7 @@ function generateReceiverList ($categoryId, $receiver, $mode = '') {
        $addWhere = runFilterChain('user_exclusion_sql', ' ');
 
        // Category given?
-       if ($categoryId > 0) {
+       if (isValidId($categoryId)) {
                // Select category
                $extraColumns  = "LEFT JOIN `{?_MYSQL_PREFIX?}_user_cats` AS c ON d.`userid`=c.`userid`";
                $addWhere = sprintf(" AND c.`cat_id`=%s", $categoryId);
@@ -1859,8 +1901,8 @@ LIMIT 1",
        }
 }
 
-// List all given rows (callback function from XML)
-function doGenericListEntries ($tableTemplate, $rowTemplate, $noEntryMessageId, $tableName, $columns, $whereColumns, $orderByColumns, $callbackColumns, $extraParameters = array(), $conditions = array(), $content = array()) {
+// List all given joined rows (callback function from XML)
+function doGenericJoinedListEntries ($tableTemplate, $rowTemplate, $noEntryMessageId, $tableName, $tableJoinType, $tableJoinName, $joinOnLeftTable, $joinOnCondition, $joinOnRightTable, $columns, $whereColumns, $orderByColumns, $callbackColumns, $extraParameters = array(), $conditions = array(), $content = array()) {
        // Verify that tableName and columns are not empty
        if ((!is_array($tableName)) || (count($tableName) != 1)) {
                // No tableName specified
@@ -1876,76 +1918,47 @@ function doGenericListEntries ($tableTemplate, $rowTemplate, $noEntryMessageId,
        // Get the sql part back from given array
        $sql .= getSqlPartFromXmlArray($columns);
 
-       // Remove last commata and add FROM statement
-       $sql .= ' FROM `{?_MYSQL_PREFIX?}_' . $tableName[0] . '`';
+       // Add "FROM"
+       $sql .= getSqlXmlFromTable($tableName);
 
-       // Are there entries from whereColumns to add?
-       if (count($whereColumns) > 0) {
-               // Then add these as well
-               if (count($whereColumns) == 1) {
-                       // One entry found
-                       $sql .= ' WHERE ';
+       // Add "JOIN"
+       $sql .= getSqlXmlJoinedTable($tableJoinType, $tableJoinName, $joinOnLeftTable, $joinOnCondition, $joinOnRightTable);
 
-                       // Table/alias included?
-                       if (!empty($whereColumns[0]['table'])) {
-                               // Add it as well
-                               $sql .= $whereColumns[0]['table'] . '.';
-                       } // END - if
+       // Add "WHERE"
+       $sql .= getSqlXmlWhereConditions($whereColumns, $conditions);
 
-                       // Add the rest
-                       $sql .= '`' . $whereColumns[0]['column'] . '`' . $whereColumns[0]['condition'] . chr(39) . $whereColumns[0]['look_for'] . chr(39);
-               } elseif ((count($whereColumns > 1)) && (count($conditions) > 0)) {
-                       // More than one "WHERE" + condition found
-                       foreach ($whereColumns as $idx => $columnArray) {
-                               // Default is WHERE
-                               $condition = ' WHERE ';
-
-                               // Is the condition element there?
-                               if (isset($conditions[$columnArray['column']])) {
-                                       // Assume the condition
-                                       $condition = ' ' . $conditions[$columnArray['column']] . ' ';
-                               } // END - if
+       // Add "ORDER BY"
+       $sql .= getSqlXmlOrderBy($orderByColumns);
 
-                               // Add to SQL query
-                               $sql .= $condition;
+       // Now handle all over to the inner function which will execute the listing
+       doListEntries($sql, $tableTemplate, $noEntryMessageId, $rowTemplate, $callbackColumns, $extraParameters, $content);
+}
 
-                               // Table/alias included?
-                               if (!empty($whereColumns[$idx]['table'])) {
-                                       // Add it as well
-                                       $sql .= $whereColumns[$idx]['table'] . '.';
-                               } // END - if
+// List all given rows (callback function from XML)
+function doGenericListEntries ($tableTemplate, $rowTemplate, $noEntryMessageId, $tableName, $columns, $whereColumns, $orderByColumns, $callbackColumns, $extraParameters = array(), $conditions = array(), $content = array()) {
+       // Verify that tableName and columns are not empty
+       if ((!is_array($tableName)) || (count($tableName) != 1)) {
+               // No tableName specified
+               reportBug(__FUNCTION__, __LINE__, 'tableName is not given. Please fix your XML,tableName[]=' . gettype($tableName) . '!=array,tableTemplate=' . $tableTemplate . ',rowTemplate=' . $rowTemplate);
+       } elseif (count($columns) == 0) {
+               // No columns specified
+               reportBug(__FUNCTION__, __LINE__, 'columns is not given. Please fix your XML,tableTemplate=' . $tableTemplate . ',rowTemplate=' . $rowTemplate . ',tableName[0]=' . $tableName[0]);
+       }
 
-                               // Add the rest
-                               $sql .= '`' . $whereColumns[$idx]['column'] . '`' . $whereColumns[$idx]['condition'] . chr(39) . convertDollarDataToGetElement($whereColumns[$idx]['look_for']) . chr(39);
-                       } // END - foreach
-               } else {
-                       // Did not set $conditions
-                       reportBug(__FUNCTION__, __LINE__, 'Supplied more than &quot;whereColumns&quot; entries but no conditions! Please fix your XML template.');
-               }
-       } // END - if
+       // This is the minimum query, so at least columns and tableName must have entries
+       $sql = 'SELECT ';
 
-       // Are there entries from orderByColumns to add?
-       if (count($orderByColumns) > 0) {
-               // Add them as well
-               $sql .= ' ORDER BY ';
-               foreach ($orderByColumns as $orderByColumn => $array) {
-                       // Get keys (table/alias) and values (sorting itself)
-                       $table   = trim(implode('', array_keys($array)));
-                       $sorting = trim(implode('', array_values($array)));
-
-                       // table/alias can be omitted
-                       if (!empty($table)) {
-                               // table/alias is given
-                               $sql .= $table . '.';
-                       } // END - if
+       // Get the sql part back from given array
+       $sql .= getSqlPartFromXmlArray($columns);
 
-                       // Add order-by column
-                       $sql .= '`' . $orderByColumn . '` ' . $sorting . ',';
-               } // END - foreach
+       // Add "FROM"
+       $sql .= getSqlXmlFromTable($tableName);
 
-               // Remove last column
-               $sql = substr($sql, 0, -1);
-       } // END - if
+       // Add "WHERE"
+       $sql .= getSqlXmlWhereConditions($whereColumns, $conditions);
+
+       // Add "ORDER BY"
+       $sql .= getSqlXmlOrderBy($orderByColumns);
 
        // Now handle all over to the inner function which will execute the listing
        doListEntries($sql, $tableTemplate, $noEntryMessageId, $rowTemplate, $callbackColumns, $extraParameters, $content);
@@ -2276,7 +2289,7 @@ function doGenericDeleteEntriesConfirm ($tableName, $columns = array(), $filterF
        $idList = '';
        foreach (postRequestElement($idColumn[0]) as $id => $sel) {
                // Is id zero?
-               if ($id == '0') {
+               if (!isValidId($id)) {
                        // Then skip this
                        continue;
                } // END - if
index 76aabe0042b205eb93650c5963f5ce5acfd56102..ee0bb3f0b874f9a669076e269456c8a86d482c26 100644 (file)
@@ -291,7 +291,7 @@ if (!SQL_HASZERONUMS($result_main)) {
                                                        array(bigintval($mailData['id'])), __FILE__, __LINE__);
                                        } else {
                                                // Is the userid set?
-                                               if (isValidUserId($userid)) {
+                                               if (isValidId($userid)) {
                                                        // User does not exists, pay points back
                                                        $points = getPaymentData($mailData['payment_id']);
                                                        initReferralSystem();
@@ -321,7 +321,7 @@ if (!SQL_HASZERONUMS($result_main)) {
                // Walk through all points
                foreach ($pointsBack as $userid => $PB) {
                        // Add points only when we have points left to add and a valid user id
-                       if (($PB > 0) && (isValidUserId($userid))) {
+                       if (($PB > 0) && (isValidId($userid))) {
                                // Prepare content
                                $content = array(
                                        'points' => $PB
index fa5cf3f0569ee48472f5690a4759e9089becabc9..cb33c8799236f2e41ddc98e86fc63eb728a5a449 100644 (file)
@@ -77,7 +77,7 @@ ORDER BY
                                SQL_FREERESULT($result_links);
 
                                // At least one link was found, enougth to pay back the points
-                               if (($userid != $content['userid']) && (isValidUserId($userid)) && ($points > 0)) {
+                               if (($userid != $content['userid']) && (isValidId($userid)) && ($points > 0)) {
                                        // Directly add points back to senders account
                                        addPointsAutoPurge($userid, $points);
                                        $points = '0';
index 8004c7995f06b22f576d523183fa281d8a1fbe69..e7472ef2117f1107daaf1a9e48a6368bd9979d8b 100644 (file)
@@ -54,7 +54,7 @@ if (isAutopurgeInactiveEnabled()) {
        // Init exclusion list
        // @TODO Rewrite these if() blocks to a filter
        $excludeUserids = '';
-       if (isValidUserId(getDefRefid())) $excludeUserids .= ' AND `userid` != {?def_refid?}';
+       if (isValidId(getDefRefid())) $excludeUserids .= ' AND `userid` != {?def_refid?}';
 
        // Check for more extensions
        if (isExtensionActive('beg'))     $excludeUserids .= ' AND `userid` != {?beg_userid?}';
index a60a8a2424b7c988f39fa8cf93ce4793e4d70258..20b3da01690ebee3faaeb6300f7f129fecf48f36 100644 (file)
@@ -100,7 +100,7 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU
        $sendNotify    = isPaymentRecipientNotificationEnabled($subject);
 
        // When $userid is NULL add points to jackpot
-       if ((!isValidUserId($userid)) && ($paymentMethod == 'DIRECT') && (isExtensionActive('jackpot'))) {
+       if ((!isValidId($userid)) && ($paymentMethod == 'DIRECT') && (isExtensionActive('jackpot'))) {
                // Add points to jackpot only in DIRECT mode
                return addPointsToJackpot($points);
        } // END - if
@@ -128,7 +128,7 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU
 
                        // Pay refback here if level > 0 and in ref-mode
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',points=' . $points . ',paymentMethod=' . $paymentMethod);
-                       if (($userid != $refid) && (substr($subject, 0, 8) != 'refback:') &&($paymentMethod == 'REFERRAL') && (isValidUserId(getUserData('refid'))) && (isExtensionActive('refback'))) {
+                       if (($userid != $refid) && (substr($subject, 0, 8) != 'refback:') &&($paymentMethod == 'REFERRAL') && (isValidId(getUserData('refid'))) && (isExtensionActive('refback'))) {
                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',ref_points=' . $ref_points . ',depth=' . convertNullToZero($GLOBALS['ref_level']) . ' - BEFORE!');
                                $ref_points = addRefbackPoints($userid, getUserData('refid'), $points, $ref_points);
                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',ref_points=' . $ref_points . ',depth=' . convertNullToZero($GLOBALS['ref_level']) . ' - AFTER!');
@@ -277,7 +277,7 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU
 
                        // Maybe there's another ref?
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',refid(var|data)=' . convertNullToZero($refid) . '|' . convertNullToZero(getUserData('refid')) . ',userid=' . $userid . ',paymentMethod=' . $paymentMethod . ',subject=' . $subject . ',ref_level=' . $GLOBALS['ref_level']);
-                       if ((isValidUserId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid) && ($paymentMethod == 'REFERRAL')) {
+                       if ((isValidId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid) && ($paymentMethod == 'REFERRAL')) {
                                // Is _ref there?
                                if (substr($subject, -4, 4) == '_ref') {
                                        // Then remove it, no double _ref suffix!
@@ -299,62 +299,62 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU
 function updateReferralCounter ($userid) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - ENTERED!');
        // Init referral id
-       $ref = NULL;
+       $refid = NULL;
 
        // Check for his referral
        if (fetchUserData($userid)) {
                // Get it
-               $ref = getUserData('refid');
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . convertZeroToNull($ref) . ' - FETCHED!');
+               $refid = getUserData('refid');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . convertZeroToNull($refid) . ' - FETCHED!');
        } // END - if
 
        // Init entries
        if (empty($GLOBALS['cache_array']['ref_level'][$userid])) {
                $GLOBALS['cache_array']['ref_level'][$userid] = NULL;
        } // END - if
-       if (empty($GLOBALS['cache_array']['ref_level'][$ref])) {
-               $GLOBALS['cache_array']['ref_level'][$ref] = NULL;
+       if (empty($GLOBALS['cache_array']['ref_level'][$refid])) {
+               $GLOBALS['cache_array']['ref_level'][$refid] = NULL;
        } // END - if
 
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . convertZeroToNull($ref));
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . convertZeroToNull($refid));
 
        // When he has a referral...
-       if (($ref > 0) && ($ref != $userid)) {
+       if ((isValidId($refid)) && ($refid != $userid)) {
                // Move to next referral level and count his counter one up
-               $GLOBALS['cache_array']['ref_level'][$ref] = $GLOBALS['cache_array']['ref_level'][$userid] + 1;
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref(' . $ref . ')=' . $GLOBALS['cache_array']['ref_level'][$ref] . ' - ADVANCED!');
+               $GLOBALS['cache_array']['ref_level'][$refid] = $GLOBALS['cache_array']['ref_level'][$userid] + 1;
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid(' . $refid . ')=' . $GLOBALS['cache_array']['ref_level'][$refid] . ' - ADVANCED!');
 
                // Update counter
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `counter`=`counter`+1 WHERE `userid`=%s AND `level`=%s LIMIT 1",
                        array(
-                               bigintval($ref),
-                               bigintval($GLOBALS['cache_array']['ref_level'][$ref])
+                               bigintval($refid),
+                               bigintval($GLOBALS['cache_array']['ref_level'][$refid])
                        ), __FUNCTION__, __LINE__);
 
                // When no entry was updated then we have to create it here
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ref=' . $ref . ',level=' . $GLOBALS['cache_array']['ref_level'][$ref] . ',updated=' . SQL_AFFECTEDROWS());
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refid=' . $refid . ',level=' . $GLOBALS['cache_array']['ref_level'][$refid] . ',updated=' . SQL_AFFECTEDROWS());
                if (SQL_HASZEROAFFECTED()) {
                        // First count!
                        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refsystem` (`userid`, `level`, `counter`) VALUES (%s,%s,1)",
                                array(
-                                       bigintval($ref),
-                                       convertZeroToNull($GLOBALS['cache_array']['ref_level'][$ref])
+                                       bigintval($refid),
+                                       convertZeroToNull($GLOBALS['cache_array']['ref_level'][$refid])
                                ), __FUNCTION__, __LINE__);
-                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ref=' . $ref . ',level=' . $GLOBALS['cache_array']['ref_level'][$ref] . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS());
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refid=' . $refid . ',level=' . $GLOBALS['cache_array']['ref_level'][$refid] . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS());
                } // END - if
 
                // Advance to next level
-               updateReferralCounter($ref);
-       } elseif ((($ref == $userid) || ($ref == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
+               updateReferralCounter($refid);
+       } elseif ((($refid == $userid) || (!isValidId($refid))) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
                // Remove cache here
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ref=' . convertZeroToNull($ref) . ' - CACHE!');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refid=' . convertZeroToNull($refid) . ' - CACHE!');
                rebuildCache('refsystem', 'refsystem');
        }
 
        // Update the referral table
        updateReferralTable($userid);
 
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . convertZeroToNull($ref) . ',level=' . convertZeroToNull($GLOBALS['cache_array']['ref_level'][$ref]) . ' - EXIT!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . convertZeroToNull($refid) . ',level=' . convertZeroToNull($GLOBALS['cache_array']['ref_level'][$refid]) . ' - EXIT!');
 }
 
 // Subtract points from database and mediadata cache
@@ -651,7 +651,7 @@ function addMissingReferralLevels ($userid) {
                                        // Also walk through this one
                                        foreach ($refArray as $refRefid) {
                                                // Calculate new level
-                                               $newLevel =  $level + $refLevel;
+                                               $newLevel = $level + $refLevel;
                                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refid=' . convertNullToZero($refid) . ',refLevel=' . $refLevel . ',refRefid=' . $refRefid . ',newLevel=' . $newLevel);
                                                // Is the refRefid not in?
                                                if ((!isset($GLOBALS['referral_refid'][$userid][$newLevel])) || (!in_array($refRefid, $GLOBALS['referral_refid'][$userid][$newLevel]))) {
@@ -730,7 +730,7 @@ function flushReferralTableToDatabase ($userid) {
 }
 
 // Generator (somewhat getter) for points_data, locked_mode
-function generatePointsLockedModeOptions ($lockedMode =  NULL) {
+function generatePointsLockedModeOptions ($lockedMode = NULL) {
        // Is this cached?
        if (!isset($GLOBALS[__FUNCTION__][$lockedMode])) {
                // Generate output and cache it
@@ -753,7 +753,7 @@ function generatePointsLockedModeOptions ($lockedMode =  NULL) {
 }
 
 // Generator (somewhat getter) for points_data, payment_method
-function generatePointsPaymentMethodOptions ($paymentMethod =  NULL) {
+function generatePointsPaymentMethodOptions ($paymentMethod = NULL) {
        // Is this cached?
        if (!isset($GLOBALS[__FUNCTION__][$paymentMethod])) {
                // Generate output and cache it
@@ -776,7 +776,7 @@ function generatePointsPaymentMethodOptions ($paymentMethod =  NULL) {
 }
 
 // Generator (somewhat getter) for points_data, notify_recipient
-function generatePointsNotifyRecipientOptions ($notifyRecipient =  NULL) {
+function generatePointsNotifyRecipientOptions ($notifyRecipient = NULL) {
        // Is this cached?
        if (!isset($GLOBALS[__FUNCTION__][$notifyRecipient])) {
                // Generate output and cache it
@@ -844,7 +844,7 @@ function determineReferralId () {
                // The variable user comes from  click.php
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using user from GET data (' . getRequestElement('user') . ')');
                setReferralId(bigintval(getRequestElement('user')));
-       } elseif ((isSessionVariableSet('refid')) && (isValidUserId(getSession('refid')))) {
+       } elseif ((isSessionVariableSet('refid')) && (isValidId(getSession('refid')))) {
                // Set session refid as global
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from SESSION data (' . getSession('refid') . ')');
                setReferralId(bigintval(getSession('refid')));
@@ -852,7 +852,7 @@ function determineReferralId () {
                // Select a random user which has confirmed enougth mails
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Checking random referral id');
                setReferralId(determineRandomReferralId());
-       } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.1.2')) && (isValidUserId(getDefRefid()))) {
+       } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.1.2')) && (isValidId(getDefRefid()))) {
                // Set default refid as refid in URL
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using default refid (' . getDefRefid() . ')');
                setReferralId(getDefRefid());
@@ -863,7 +863,7 @@ function determineReferralId () {
        }
 
        // Set cookie when default refid > 0
-       if ((!isSessionVariableSet('refid')) || (!isValidUserId(getReferralId())) || ((!isValidUserId(getSession('refid'))) && (isExtensionInstalledAndNewer('sql_patches', '0.1.2')) && (isValidUserId(getDefRefid())))) {
+       if ((!isSessionVariableSet('refid')) || (!isValidId(getReferralId())) || ((!isValidId(getSession('refid'))) && (isExtensionInstalledAndNewer('sql_patches', '0.1.2')) && (isValidId(getDefRefid())))) {
                // Default is not found
                $found = FALSE;
 
@@ -878,7 +878,7 @@ function determineReferralId () {
                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from user account by nickname (' . getUserData('userid') . ')');
                                setReferralId(getUserData('userid'));
                        } // END - if
-               } elseif (isValidUserId(getReferralId())) {
+               } elseif (isValidId(getReferralId())) {
                        // Direct userid entered
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using direct userid (' . getReferralId() . ')');
                        $found = fetchUserData(getReferralId());
index a889ec1b90d8b501e3e9028db8de5a3fcf904c3b..fe3ae41153494ca6dbe725f9b58fb0eb96f956a3 100644 (file)
@@ -222,7 +222,7 @@ function getArrayFromRepositoryData () {
 
        } else {
                // No valid Data from the last modificated file so read the Revision from the Server. Fallback-solution!! Should not be removed I think.
-               $version = sendGetRequest('check-updates3.php');
+               $version = sendHttpGetRequest('check-updates3.php');
 
                // Invalid request reply?
                if (!isset($version[11])) {
index ebee5cf6f13ce77965ae8a9b48b57d943bf2ff9d..a4a80d1f3b18e19b0c47e0e78706add7c7e3a02a 100644 (file)
@@ -66,7 +66,7 @@ function setSession ($var, $value) {
        } elseif (('' . $value . '' != '') && (!isSessionVariableSet($var))) {
                // Set session
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SET:' . $var . '=' . $value);
-               $GLOBALS['_SESSION'][$var] =  $value;
+               $GLOBALS['_SESSION'][$var] = $value;
                if (isPhpVersionEqualNewer('5.3.0')) {
                        // session_unregister() is deprecated as of 5.3.0
                        return TRUE;
@@ -133,7 +133,7 @@ function destroyAdminSession ($destroy = FALSE) {
        // Kill maybe existing session variables including array elements
        setAdminId(0);
        setAdminMd5('');
-       setAdminLast('');
+       setAdminLast(0);
 
        // Set cache to FALSE
        $GLOBALS['isAdmin'] = FALSE;
index 84456a0f00d2f2dba9d455aaf790df079a0e8bb4..9fe8259c59a29929bda8830dbdbe411f687fcabe 100644 (file)
@@ -149,6 +149,9 @@ function getUpdateSqlFromArray ($array, $tableName, $whereColumn, $whereData, $e
                        } elseif ('' . bigintval($value, TRUE, FALSE) . '' == '' . $value . '')  {
                                // No need for ticks (')
                                $SQL .= '`' . $entry . '`=' . $value . ',';
+                       } elseif ('' . (float) $value . '' == '' . $value . '') {
+                               // Float number detected
+                               $SQL .= '`' . $entry . '`=' . sprintf(getConfig('FLOAT_MASK'), $value) . ',';
                        } else {
                                // Strings need ticks (') around them
                                $SQL .= '`' . $entry . "`='" . SQL_ESCAPE($value) . "',";
@@ -164,6 +167,9 @@ function getUpdateSqlFromArray ($array, $tableName, $whereColumn, $whereData, $e
                        } elseif (('' . bigintval($value[$multiDimId], TRUE, FALSE) . '' == '' . $value[$multiDimId] . ''))  {
                                // No need for ticks (')
                                $SQL .= '`' . $entry . '`=' . $value[$multiDimId] . ',';
+                       } elseif ('' . (float) $value[$multiDimId] . '' == '' . $value[$multiDimId] . '') {
+                               // Float number detected
+                               $SQL .= '`' . $entry . '`=' . sprintf(getConfig('FLOAT_MASK'), $value[$multiDimId]) . ',';
                        } else {
                                // Strings need ticks (') around them
                                $SQL .= '`' . $entry . "`='" . SQL_ESCAPE($value[$multiDimId]) . "',";
@@ -181,11 +187,7 @@ function getUpdateSqlFromArray ($array, $tableName, $whereColumn, $whereData, $e
 // "Getter" for an "INSERT INTO" SQL query
 function getInsertSqlFromArray ($array, $tableName) {
        // Init SQL
-       $SQL = 'INSERT INTO
-`{?_MYSQL_PREFIX?}_' . $tableName . '`
-(
-`' . implode('`, `', array_keys($array)) . '`
-) VALUES (';
+       $SQL = 'INSERT INTO `{?_MYSQL_PREFIX?}_' . $tableName . '` (`' . implode('`, `', array_keys($array)) . '`) VALUES (';
 
        // Walk through all entries
        foreach ($array as $key => $value) {
@@ -204,7 +206,7 @@ function getInsertSqlFromArray ($array, $tableName) {
                        $SQL .= bigintval($value) . ',';
                } elseif ('' . (float) $value . '' == '' . $value . '') {
                        // Float number detected
-                       $SQL .= sprintf('%01.5f', $value);
+                       $SQL .= sprintf(getConfig('FLOAT_MASK'), $value) . ',';
                } else {
                        // Everything else might be a string, so add ticks around it
                        $SQL .= chr(39) . SQL_ESCAPE($value) . chr(39) . ',';
@@ -215,6 +217,7 @@ function getInsertSqlFromArray ($array, $tableName) {
        $SQL = substr($SQL, 0, -1) . ')';
 
        // Return SQL query
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',sql=' . $SQL);
        return $SQL;
 }
 
index c05eb5d06247b10892638aacacc58c9e17e1904a..1cbc12b0ad56091054acf38728b304a4c43ec4a3 100644 (file)
@@ -180,6 +180,15 @@ function outputHtml ($htmlCode = NULL, $newLine = TRUE) {
 // Compiles the final output
 function compileFinalOutput () {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '__output(length)=' . strlen($GLOBALS['__output']) . ',getScriptOutputMode()=' . getScriptOutputMode() . ' - ENTERED!');
+       // Is this function called?
+       if (isset($GLOBALS[__FUNCTION__])) {
+               // Abort here
+               reportBug(__FUNCTION__, __LINE__, 'Double call of ' . __FUNCTION__ . ' causes problems with sent headers.');
+       } // END - if
+
+       // Mark this function as called
+       $GLOBALS[__FUNCTION__] = TRUE;
+
        // Add page header and footer
        addPageHeaderFooter();
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '__output(length)=' . strlen($GLOBALS['__output']) . ' - After addPageHeaderFooter() call.');
@@ -262,8 +271,9 @@ function doFinalCompilation ($code, $insertComments = TRUE, $enableCodes = TRUE)
        } // END - while
 
        // Add debugging data in HTML code, if mode is enabled
-       if ((isDebugModeEnabled()) && ($insertComments === TRUE) && ((isHtmlOutputMode()) || (isCssOutputMode()))) {
+       if ((isDebugModeEnabled()) && ($insertComments === TRUE) && (isHtmlOutputMode())) {
                // Add loop count
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isDebugModeEnabled()=' . intval(isDebugModeEnabled()) . ',insertComments=' . intval($insertComments) . ',isHtmlOutputMode()=' . intval(isHtmlOutputMode()));
                $code .= '<!-- Total compilation loop=' . $count . ' //-->';
        } // END - if
 
@@ -754,39 +764,23 @@ function compileRawCode ($code, $full = TRUE, $compileCode = TRUE) {
 }
 
 //
-function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 'form_select') {
+function addSelectionBox ($type, $default, $prefix = '', $id = NULL, $class = 'form_select') {
        $OUT = '';
 
        if ($type == 'yn') {
                // This is a yes/no selection only!
-               if ($id > 0) $prefix .= '[' . $id . ']';
+               if (isValidId($id)) $prefix .= '[' . $id . ']';
                $OUT .= '<select name="' . $prefix . '" class="' . $class . '" size="1">';
        } else {
                // Begin with regular selection box here
                if (!empty($prefix)) $prefix .= '_';
                $type2 = $type;
-               if ($id > 0) $type2 .= '[' . $id . ']';
+               if (isValidId($id)) $type2 .= '[' . $id . ']';
                $OUT .= '<select name="' . strtolower($prefix . $type2) . '" class="' . $class . '" size="1">';
        }
 
        switch ($type) {
-               case 'day': // Day
-                       for ($idx = 1; $idx < 32; $idx++) {
-                               $OUT .= '<option value="' . $idx . '"';
-                               if ($default == $idx) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $idx . '</option>';
-                       } // END - for
-                       break;
-
-               case 'month': // Month
-                       foreach ($GLOBALS['month_descr'] as $idx => $descr) {
-                               $OUT .= '<option value="' . $idx . '"';
-                               if ($default == $idx) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $descr . '</option>';
-                       } // END - for
-                       break;
-
-               case 'year': // Year
+               case 'ye': // Years
                        // Get current year
                        $year = getYear();
 
@@ -817,17 +811,9 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 'fo
                        } else {
                                // Get current year and subtract the configured minimum age
                                $OUT .= '<option value="' . ($minYear - 1) . '">&lt;' . $minYear . '</option>';
-                               // Calculate earliest year depending on extension version
-                               if (isExtensionInstalledAndNewer('other', '0.2.1')) {
-                                       // Use configured minimum age
-                                       $year = getYear() - getConfig('min_age');
-                               } else {
-                                       // Use fixed 16 years age
-                                       $year = getYear() - 16;
-                               }
 
                                // Construct year selection list
-                               for ($idx = $minYear; $idx <= $year; $idx++) {
+                               for ($idx = $minYear; $idx <= $startYear; $idx++) {
                                        $OUT .= '<option value="' . $idx . '"';
                                        if ($default == $idx) $OUT .= ' selected="selected"';
                                        $OUT .= '>' . $idx . '</option>';
@@ -835,17 +821,31 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 'fo
                        }
                        break;
 
-               case 'sec':
-               case 'min':
-                       for ($idx = 0; $idx < 60; $idx+=5) {
-                               if (strlen($idx) == 1) $idx = 0 . $idx;
+               case 'mo': // Months
+                       foreach ($GLOBALS['month_descr'] as $idx => $descr) {
                                $OUT .= '<option value="' . $idx . '"';
                                if ($default == $idx) $OUT .= ' selected="selected"';
+                               $OUT .= '>' . $descr . '</option>';
+                       } // END - for
+                       break;
+
+               case 'we': // Weeks
+                       for ($idx = 0; $idx <= 4; $idx++) {
+                               $OUT .= '  <option value="' . $idx . '"';
+                               if ($default == $idx) $OUT .= ' selected="selected"';
                                $OUT .= '>' . $idx . '</option>';
                        } // END - for
                        break;
 
-               case 'hour':
+               case 'da': // Days
+                       for ($idx = 0; $idx < 32; $idx++) {
+                               $OUT .= '<option value="' . $idx . '"';
+                               if ($default == $idx) $OUT .= ' selected="selected"';
+                               $OUT .= '>' . str_pad($idx, 2, '0', STR_PAD_LEFT) . '</option>';
+                       } // END - for
+                       break;
+
+               case 'ho': // Hours
                        for ($idx = 0; $idx < 24; $idx++) {
                                if (strlen($idx) == 1) $idx = 0 . $idx;
                                $OUT .= '<option value="' . $idx . '"';
@@ -854,13 +854,27 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 'fo
                        } // END - for
                        break;
 
-               case 'yn':
+               case 'mi': // Minutes
+               case 'se': // Seconds
+                       for ($idx = 0; $idx < 60; $idx+=5) {
+                               if (strlen($idx) == 1) $idx = 0 . $idx;
+                               $OUT .= '<option value="' . $idx . '"';
+                               if ($default == $idx) $OUT .= ' selected="selected"';
+                               $OUT .= '>' . $idx . '</option>';
+                       } // END - for
+                       break;
+
+               case 'yn': // Yes/No
                        $OUT .= '<option value="Y"';
                        if ($default == 'Y') $OUT .= ' selected="selected"';
                        $OUT .= '>{--YES--}</option><option value="N"';
                        if ($default != 'Y') $OUT .= ' selected="selected"';
                        $OUT .= '>{--NO--}</option>';
                        break;
+
+               default: // Not detected
+                       reportBug(__FUNCTION__, __LINE__, 'type=' . $type . ',default=' . $default . ',prefix=' .  $prefix . ',id[' . gettype($id) . ']=' . $id . ',class=' . $class . ' - is not supported.');
+                       break;
        }
        $OUT .= '</select>';
        return $OUT;
@@ -945,180 +959,113 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
        } // END - switch
 
        // First of all years...
-       $Y = abs(floor($timestamp / (31536000 + $SWITCH)));
-       //* DEBUG: */ debugOutput('Y=' . $Y);
+       $year = abs(floor($timestamp / (31536000 + $SWITCH)));
+       //* DEBUG: */ debugOutput('year=' . $year);
        // Next months...
-       $M = abs(floor($timestamp / 2628000 - $Y * 12));
-       //* DEBUG: */ debugOutput('M=' . $M);
+       $month = abs(floor($timestamp / 2628000 - $year * 12));
+       //* DEBUG: */ debugOutput('month=' . $month);
        // Next weeks
-       $W = abs(floor($timestamp / 604800 - $Y * ((365 + $SWITCH / getOneDay()) / 7) - ($M / 12 * (365 + $SWITCH / getOneDay()) / 7)));
-       //* DEBUG: */ debugOutput('W=' . $W);
+       $week = abs(floor($timestamp / 604800 - $year * ((365 + $SWITCH / getOneDay()) / 7) - ($month / 12 * (365 + $SWITCH / getOneDay()) / 7)));
+       //* DEBUG: */ debugOutput('week=' . $week);
        // Next days...
-       $D = abs(floor($timestamp / 86400 - $Y * (365 + $SWITCH / getOneDay()) - ($M / 12 * (365 + $SWITCH / getOneDay())) - $W * 7));
-       //* DEBUG: */ debugOutput('D=' . $D);
+       $day = abs(floor($timestamp / 86400 - $year * (365 + $SWITCH / getOneDay()) - ($month / 12 * (365 + $SWITCH / getOneDay())) - $week * 7));
+       //* DEBUG: */ debugOutput('day=' . $day);
        // Next hours...
-       $h = abs(floor($timestamp / 3600 - $Y * (365 + $SWITCH / getOneDay()) * 24 - ($M / 12 * (365 + $SWITCH / getOneDay()) * 24) - $W * 7 * 24 - $D * 24));
-       //* DEBUG: */ debugOutput('h=' . $h);
+       $hour = abs(floor($timestamp / 3600 - $year * (365 + $SWITCH / getOneDay()) * 24 - ($month / 12 * (365 + $SWITCH / getOneDay()) * 24) - $week * 7 * 24 - $day * 24));
+       //* DEBUG: */ debugOutput('hour=' . $hour);
        // Next minutes..
-       $m = abs(floor($timestamp / 60 - $Y * (365 + $SWITCH / getOneDay()) * 24 * 60 - ($M / 12 * (365 + $SWITCH / getOneDay()) * 24 * 60) - $W * 7 * 24 * 60 - $D * 24 * 60 - $h * 60));
-       //* DEBUG: */ debugOutput('m=' . $m);
+       $minute = abs(floor($timestamp / 60 - $year * (365 + $SWITCH / getOneDay()) * 24 * 60 - ($month / 12 * (365 + $SWITCH / getOneDay()) * 24 * 60) - $week * 7 * 24 * 60 - $day * 24 * 60 - $hour * 60));
+       //* DEBUG: */ debugOutput('minute=' . $minute);
        // And at last seconds...
-       $s = abs(floor($timestamp - $Y * (365 + $SWITCH / getOneDay()) * 24 * 3600 - ($M / 12 * (365 + $SWITCH / getOneDay()) * 24 * 3600) - $W * 7 * 24 * 3600 - $D * 24 * 3600 - $h * 3600 - $m * 60));
-       //* DEBUG: */ debugOutput('s=' . $s);
+       $second = abs(floor($timestamp - $year * (365 + $SWITCH / getOneDay()) * 24 * 3600 - ($month / 12 * (365 + $SWITCH / getOneDay()) * 24 * 3600) - $week * 7 * 24 * 3600 - $day * 24 * 3600 - $hour * 3600 - $minute * 60));
+       //* DEBUG: */ debugOutput('second=' . $second);
 
        // Is seconds zero and time is < 60 seconds?
-       if (($s == '0') && ($timestamp < 60)) {
+       if (($second < 1) && ($timestamp < 60)) {
                // Fix seconds
-               $s = round($timestamp);
+               $second = round($timestamp);
        } // END - if
 
+       // Put all calculated values in array
+       $data = array(
+               'Y' => $year,
+               'M' => $month,
+               'W' => $week,
+               'D' => $day,
+               'h' => $hour,
+               'm' => $minute,
+               's' => $second
+       );
+
        //
        // Now we convert them in seconds...
        //
        if ($asArray === TRUE) {
-               // Just put all data in an array for later use
-               $OUT = array(
-                       'Y' => $Y,
-                       'M' => $M,
-                       'W' => $W,
-                       'D' => $D,
-                       'h' => $h,
-                       'm' => $m,
-                       's' => $s
-               );
+               // Just put data array out
+               $OUT = $data;
        } else {
+               // Init array
+               $units = array(
+                       // Time unit -> field name
+                       'unit_field' => array(
+                               'Y' => 'ye',
+                               'M' => 'mo',
+                               'W' => 'we',
+                               'D' => 'da',
+                               'h' => 'ho',
+                               'm' => 'mi',
+                               's' => 'se'
+                       ),
+                       // Time unit -> label
+                       'unit_label' => array(
+                               'Y' => 'YEAR',
+                               'M' => 'MONTH',
+                               'W' => 'WEEK',
+                               'D' => 'DAY',
+                               'h' => 'HOUR',
+                               'm' => 'MINUTE',
+                               's' => 'SECOND'
+                       )
+               );
+
                // Generate table
                $OUT  = '<div align="' . $align . '">';
                $OUT .= '<table border="0" cellspacing="0" cellpadding="0" class="timebox_table dashed">';
                $OUT .= '<tr>';
 
-               if (isInString('Y', $display) || (empty($display))) {
-                       $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_YEAR--}</strong></td>';
-               } // END - if
-
-               if (isInString('M', $display) || (empty($display))) {
-                       $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_MONTH--}</strong></td>';
-               } // END - if
-
-               if (isInString('W', $display) || (empty($display))) {
-                       $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_WEEK--}</strong></td>';
-               } // END - if
-
-               if (isInString('D', $display) || (empty($display))) {
-                       $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_DAY--}</strong></td>';
-               } // END - if
-
-               if (isInString('h', $display) || (empty($display))) {
-                       $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_HOUR--}</strong></td>';
-               } // END - if
-
-               if (isInString('m', $display) || (empty($display))) {
-                       $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_MINUTE--}</strong></td>';
-               } // END - if
-
-               if (isInString('s', $display) || (empty($display))) {
-                       $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_SECOND--}</strong></td>';
-               } // END - if
+               // "Walk" through all units
+               foreach ($units['unit_field'] as $unit => $field) {
+                       // Is this displayed or zero?
+                       if (isInString($unit, $display) || (empty($display))) {
+                               // @TODO <label for="' . $prefix . '_' . $field . '"></<label> not working here
+                               $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_' . $units['unit_label'][$unit] . '--}</div></td>';
+                       } // END - if
+               } // END - foreach
 
+               // Close table row and open new one
                $OUT .= '</tr>';
                $OUT .= '<tr>';
 
-               if (isInString('Y', $display) || (empty($display))) {
-                       // Generate year selection
-                       $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_ye" size="1">';
-                       for ($idx = 0; $idx <= 10; $idx++) {
-                               $OUT .= '<option class="mini_select" value="' . $idx . '"';
-                               if ($idx == $Y) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $idx . '</option>';
-                       } // END - for
-                       $OUT .= '</select></td>';
-               } else {
-                       $OUT .= '<input type="hidden" name="' . $prefix . '_ye" value="0" />';
-               }
-
-               if (isInString('M', $display) || (empty($display))) {
-                       // Generate month selection
-                       $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_mo" size="1">';
-                       for ($idx = 0; $idx <= 11; $idx++) {
-                               $OUT .= '  <option class="mini_select" value="' . $idx . '"';
-                               if ($idx == $M) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $idx . '</option>';
-                       } // END - for
-                       $OUT .= '</select></td>';
-               } else {
-                       $OUT .= '<input type="hidden" name="' . $prefix . '_mo" value="0" />';
-               }
-
-               if (isInString('W', $display) || (empty($display))) {
-                       // Generate week selection
-                       $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_we" size="1">';
-                       for ($idx = 0; $idx <= 4; $idx++) {
-                               $OUT .= '  <option class="mini_select" value="' . $idx . '"';
-                               if ($idx == $W) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $idx . '</option>';
-                       } // END - for
-                       $OUT .= '</select></td>';
-               } else {
-                       $OUT .= '<input type="hidden" name="' . $prefix . '_we" value="0" />';
-               }
-
-               if (isInString('D', $display) || (empty($display))) {
-                       // Generate day selection
-                       $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_da" size="1">';
-                       for ($idx = 0; $idx <= 31; $idx++) {
-                               $OUT .= '  <option class="mini_select" value="' . $idx . '"';
-                               if ($idx == $D) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $idx . '</option>';
-                       } // END - for
-                       $OUT .= '</select></td>';
-               } else {
-                       $OUT .= '<input type="hidden" name="' . $prefix . '_da" value="0" />';
-               }
-
-               if (isInString('h', $display) || (empty($display))) {
-                       // Generate hour selection
-                       $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_ho" size="1">';
-                       for ($idx = 0; $idx <= 23; $idx++) {
-                               $OUT .= '  <option class="mini_select" value="' . $idx . '"';
-                               if ($idx == $h) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $idx . '</option>';
-                       } // END - for
-                       $OUT .= '</select></td>';
-               } else {
-                       $OUT .= '<input type="hidden" name="' . $prefix . '_ho" value="0" />';
-               }
-
-               if (isInString('m', $display) || (empty($display))) {
-                       // Generate minute selection
-                       $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_mi" size="1">';
-                       for ($idx = 0; $idx <= 59; $idx++) {
-                               $OUT .= '  <option class="mini_select" value="' . $idx . '"';
-                               if ($idx == $m) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $idx . '</option>';
-                       } // END - for
-                       $OUT .= '</select></td>';
-               } else {
-                       $OUT .= '<input type="hidden" name="' . $prefix . '_mi" value="0" />';
-               }
+               // "Walk" through all units again
+               foreach ($units['unit_field'] as $unit => $field) {
+                       // Is this used?
+                       if (isInString($unit, $display) || (empty($display))) {
+                               // Generate year selection
+                               $OUT .= '<td align="center">';
+                               $OUT .= addSelectionBox($field, $data[$unit], $prefix, NULL, 'mini_select');
+                               $OUT .= '</td>';
+                       } else {
+                               $OUT .= '<input type="hidden" name="' . $prefix . '_' . $field . '" value="0" />';
+                       }
+               } // END - foreach
 
-               if (isInString('s', $display) || (empty($display))) {
-                       // Generate second selection
-                       $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_se" size="1">';
-                       for ($idx = 0; $idx <= 59; $idx++) {
-                               $OUT .= '  <option class="mini_select" value="' . $idx . '"';
-                               if ($idx == $s) $OUT .= ' selected="selected"';
-                               $OUT .= '>' . $idx . '</option>';
-                       } // END - for
-                       $OUT .= '</select></td>';
-               } else {
-                       $OUT .= '<input type="hidden" name="' . $prefix . '_se" value="0" />';
-               }
+               // Close all tags
                $OUT .= '</tr>';
                $OUT .= '</table>';
                $OUT .= '</div>';
        }
 
-       // Return generated HTML code
+       // Return generated HTML code or data array
        return $OUT;
 }
 
@@ -1351,7 +1298,7 @@ function reportBug ($F, $L, $message = '', $sendEmail = TRUE) {
        } // END - if
 
        // Is there HTML/CSS/AJAX mode?
-       if ((isHtmlOutputMode()) || (isCssOutputMode()) || (isAjaxOutputMode())) {
+       if (((isHtmlOutputMode()) || (isCssOutputMode()) || (isAjaxOutputMode())) && (isDebugModeEnabled())) {
                // And abort here
                app_exit($F, $L, $debug);
        } else {
@@ -2305,6 +2252,12 @@ function doTemplateDereferrerUrl ($templateName, $clear = FALSE, $url = NULL) {
        return fixEmptyContentToDashes($url);
 }
 
+// Load another template and return its content
+function doTemplateLoadTemplate ($templateName, $clear = FALSE, $theTemplate, $content = array()) {
+       // Load "the" template
+       return loadTemplate($theTemplate, TRUE, $content);
+}
+
 // Tries to anonymize some sensitive data (e.g. IP address, user agent, referrer, etc.)
 function anonymizeSensitiveData ($data) {
        // Trim it
index c5a616a6bd30442534e5c478e99c458322eb2e43..6c394da6cdfb3df579e3ae6e83e93d0a0907fff9 100644 (file)
@@ -949,7 +949,7 @@ function getAdminMd5 () {
 // Init user data array
 function initUserData () {
        // User id should not be zero
-       if (!isValidUserId(getCurrentUserId())) {
+       if (!isValidId(getCurrentUserId())) {
                // Should be always valid
                reportBug(__FUNCTION__, __LINE__, 'Current user id is invalid: ' . getCurrentUserId());
        } // END - if
@@ -962,7 +962,7 @@ function initUserData () {
 // Getter for user data
 function getUserData ($column) {
        // User id should not be zero
-       if (!isValidUserId(getCurrentUserId())) {
+       if (!isValidId(getCurrentUserId())) {
                // Should be always valid
                reportBug(__FUNCTION__, __LINE__, 'Current user id is invalid: ' . getCurrentUserId());
        } // END - if
@@ -997,7 +997,7 @@ function getUserDataArray () {
        $userid = getCurrentUserId();
 
        // Is the current userid valid?
-       if (!isValidUserId($userid)) {
+       if (!isValidId($userid)) {
                // Should be always valid
                reportBug(__FUNCTION__, __LINE__, 'Current user id is invalid: ' . $userid);
        } // END - if
@@ -1078,7 +1078,7 @@ function isCurrentUserIdSet () {
        // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
-               $GLOBALS[__FUNCTION__] = ((isset($GLOBALS['current_userid'])) && (isValidUserId($GLOBALS['current_userid'])));
+               $GLOBALS[__FUNCTION__] = ((isset($GLOBALS['current_userid'])) && (isValidId($GLOBALS['current_userid'])));
        } // END - if
 
        // Return cache
@@ -1090,7 +1090,7 @@ function unsetCurrentUserId () {
        // Is it set?
        if (isset($GLOBALS['current_userid'])) {
                // Unset this, too
-               unset($GLOBALS['isValidUserId'][$GLOBALS['current_userid']]);
+               unset($GLOBALS['isValidId'][$GLOBALS['current_userid']]);
        } // END - if
 
        // Unset all cache entries
@@ -1120,7 +1120,7 @@ function getFetchedUserData ($keyColumn, $userid, $valueColumn) {
                $data = NULL;
 
                // Can we fetch the user data?
-               if ((isValidUserId($userid)) && (fetchUserData($userid, $keyColumn))) {
+               if ((isValidId($userid)) && (fetchUserData($userid, $keyColumn))) {
                        // Now get the data back
                        $data = getUserData($valueColumn);
                } // END - if
@@ -1316,20 +1316,20 @@ function getTotalRandomRefidUser () {
        return $GLOBALS[__FUNCTION__];
 }
 
-// Is given userid valid?
-function isValidUserId ($userid) {
+// Is given id number valid?
+function isValidId ($id) {
        // Debug message
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid[' . gettype($userid) . ']=' . $userid);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id[' . gettype($id) . ']=' . $id);
 
        // Is there cache?
-       if (!isset($GLOBALS[__FUNCTION__][$userid])) {
+       if (!isset($GLOBALS[__FUNCTION__][$id])) {
                // Check it out
-               $GLOBALS[__FUNCTION__][$userid] = ((!is_null($userid)) && (!empty($userid)) && ($userid != 'NULL') && ($userid > 0));
+               $GLOBALS[__FUNCTION__][$id] = ((!is_null($id)) && (!is_bool($id)) && (!empty($id)) && ($id != 'NULL') && ($id > 0));
        } // END - if
 
        // Return cache
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',result=' . intval($GLOBALS[__FUNCTION__][$userid]));
-       return $GLOBALS[__FUNCTION__][$userid];
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ',result=' . intval($GLOBALS[__FUNCTION__][$id]));
+       return $GLOBALS[__FUNCTION__][$id];
 }
 
 // Encodes entities
@@ -3399,5 +3399,16 @@ function translateFullComma ($dotted) {
        return translateComma($dotted, TRUE, 5);
 }
 
+// Wrapper to check if the first element to be shifted is set to given value
+function shift_array (&$array, $value, $key = '0') {
+       // Is the element set and value matches?
+       assert(is_array($array));
+       assert(isset($array[$key]));
+       assert($array[$key] === $value);
+
+       // Shift it
+       array_shift($array);
+}
+
 // [EOF]
 ?>
index 3fc94edf0630eb861796ff4483fbfd128a7ab7ca..9506a93e815489250b42c03d77a53444f54caa2d 100644 (file)
@@ -256,7 +256,7 @@ function isXmlConditionValid ($condition) {
        $condition = trim(strtolower($condition));
 
        // Is it valid?
-       return (in_array($condition, array('equals')));
+       return (in_array($condition, array('equals', 'and')));
 }
 
 // Checks if given value is valid/verifyable
@@ -285,20 +285,38 @@ function convertXmlContion ($condition) {
        return $GLOBALS['__XML_CONDITIONS'][$condition];
 }
 
+// "Getter" for FROM statement from given columns
+function getSqlXmlFromTable ($tableName) {
+       // Init SQL
+       $sql = ' FROM `{?_MYSQL_PREFIX?}_' . $tableName[0]['value'] . '`';
+
+       // Is alias set?
+       if (!empty($tableName[0]['alias'])) {
+               // Also add it
+               $sql .= ' AS `' . $tableName[0]['alias'] . '`';
+       } // END - if
+
+       // Return SQL
+       return $sql;
+}
+
 // "Getter" for sql part back from given array
 function getSqlPartFromXmlArray ($columns) {
        // Init SQL
-       $SQL = '';
+       $sql = '';
 
        // Walk through all entries
        foreach ($columns as $columnArray) {
+               // Must be an array
+               assert(is_array($columnArray));
+
                // Init SQL part
                $sqlPart = '';
 
                // Is there a table/alias
                if (!empty($columnArray['table'])) {
                        // Pre-add it
-                       $sqlPart .= $columnArray['table'] . '.';
+                       $sqlPart .= '`' . $columnArray['table'] . '`.';
                } // END - if
 
                // Add column
@@ -311,11 +329,130 @@ function getSqlPartFromXmlArray ($columns) {
                } // END - if
 
                // Add finished SQL part to the query
-               $SQL .= $sqlPart . ',';
+               $sql .= $sqlPart . ',';
        } // END - foreach
 
        // Return it without last commata
-       return substr($SQL, 0, -1);
+       return substr($sql, 0, -1);
+}
+
+// "Getter" for JOIN statement
+function getSqlXmlJoinedTable ($tableJoinType, $tableJoinName, $joinOnLeftTable, $joinOnCondition, $joinOnRightTable) {
+       // Are all set?
+       assert((count($tableJoinType) > 0) && (count($tableJoinName) > 0) && (count($joinOnLeftTable) > 0) && (count($joinOnCondition) > 0) && (count($joinOnRightTable) > 0));
+
+       // Init SQL
+       $sql = '';
+
+       // "Walk" through all JOINs
+       foreach ($tableJoinType as $key => $joinType) {
+               // 1) Add JOIN type and table name with alias
+               $sql .= ' ' . $joinType . ' `{?_MYSQL_PREFIX?}_' . $tableJoinName[$key]['name'] . '`';
+
+               // Alias set?
+               if (!empty($tableJoinName[$key]['alias'])) {
+                       // Add it
+                       $sql .= ' AS `' . $tableJoinName[$key]['alias'] . '`';
+               } // END - if
+
+               // 2) Add left part + condition + right part with aliases
+               // 2/1) ON + left part
+               $sql .= ' ON `' . $joinOnLeftTable[$key]['name'] . '`.`' . $joinOnLeftTable[$key]['column'] . '`';
+               // 2/2) Condition
+               $sql .= $joinOnCondition[$key];
+               // 2/3) right part
+               $sql .= '`' . $joinOnRightTable[$key]['name'] . '`.`' . $joinOnRightTable[$key]['column'] . '`';
+       } // END - foreach
+
+       // Return SQL
+       return $sql;
+}
+
+// "Getter" for WHERE statement from given columns and conditions arrays
+function getSqlXmlWhereConditions ($whereColumns, $conditions) {
+       // Init SQL
+       $sql = '';
+
+       // Are there some conditions?
+       if (count($whereColumns) > 0) {
+               // Then add these as well
+               if (count($whereColumns) == 1) {
+                       // One entry found
+                       $sql .= ' WHERE ';
+
+                       // Table/alias included?
+                       if (!empty($whereColumns[0]['table'])) {
+                               // Add it as well
+                               $sql .= $whereColumns[0]['table'] . '.';
+                       } // END - if
+
+                       // Add the rest
+                       $sql .= '`' . $whereColumns[0]['column'] . '`' . $whereColumns[0]['condition'] . chr(39) . $whereColumns[0]['look_for'] . chr(39);
+               } elseif ((count($whereColumns > 1)) && (count($conditions) > 0)) {
+                       // More than one "WHERE" + condition found
+                       foreach ($whereColumns as $idx => $columnArray) {
+                               // Default is WHERE
+                               $condition = ' WHERE ';
+
+                               // Is the condition element there?
+                               if (isset($conditions[$columnArray['column']])) {
+                                       // Assume the condition
+                                       $condition .= ' ' . $conditions[$columnArray['column']] . ' ';
+                               } // END - if
+
+                               // Add to SQL query
+                               die($sql.'/'.$condition);
+                               $sql .= $condition;
+
+                               // Table/alias included?
+                               if (!empty($whereColumns[$idx]['table'])) {
+                                       // Add it as well
+                                       $sql .= $whereColumns[$idx]['table'] . '.';
+                               } // END - if
+
+                               // Add the rest
+                               $sql .= '`' . $whereColumns[$idx]['column'] . '`' . $whereColumns[$idx]['condition'] . chr(39) . convertDollarDataToGetElement($whereColumns[$idx]['look_for']) . chr(39);
+                       } // END - foreach
+               } else {
+                       // Did not set $conditions
+                       reportBug(__FUNCTION__, __LINE__, 'Supplied more than &quot;whereColumns&quot; entries but no conditions! Please fix your XML template.');
+               }
+       } // END - if
+
+       // Return SQL
+       return $sql;
+}
+
+// "Getter" for ORDER BY statement from given columns
+function getSqlXmlOrderBy ($orderByColumns) {
+       // Init SQL
+       $sql = '';
+
+       // Are there entries from orderByColumns to add?
+       if (count($orderByColumns) > 0) {
+               // Add them as well
+               $sql .= ' ORDER BY ';
+               foreach ($orderByColumns as $orderByColumn => $array) {
+                       // Get keys (table/alias) and values (sorting itself)
+                       $table   = trim(implode('', array_keys($array)));
+                       $sorting = trim(implode('', array_values($array)));
+
+                       // table/alias can be omitted
+                       if (!empty($table)) {
+                               // table/alias is given
+                               $sql .= '`' . $table . '`.';
+                       } // END - if
+
+                       // Add order-by column
+                       $sql .= '`' . $orderByColumn . '` ' . $sorting . ',';
+               } // END - foreach
+
+               // Remove last column
+               $sql = substr($sql, 0, -1);
+       } // END - if
+
+       // Return SQL
+       return $sql;
 }
 
 // Searches in given XML array for value and returns the parent index
index 006783b45d59ac1cfd822a19810bf264cd8adc46..66c8c9c0b2b400eaf69ad03dd84f4c9d60cabde9 100644 (file)
@@ -30,7 +30,7 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_cats` (
 
 DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_config`;
 CREATE TABLE `{?_MYSQL_PREFIX?}_config` (
-  `config` tinyint(1) NOT NULL DEFAULT 0,
+  `config` TINYINT(1) NOT NULL DEFAULT 0,
   `pass_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,
   `points_register` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
   `points_ref` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -44,7 +44,7 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_config` (
   `url_blacklist` ENUM('Y','N') NOT NULL DEFAULT 'Y',
   `auto_purge` TINYINT(3) UNSIGNED NOT NULL DEFAULT 14,
   `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y',
-  `last_update` VARCHAR(10) NOT NULL DEFAULT 0,
+  `last_update` VARCHAR(10) NOT NULL DEFAULT '0',
   `unconfirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100,
   `profile_lock` BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400,
   `online_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800,
@@ -54,7 +54,7 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_config` (
   `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y',
   `resend_profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT 172800,
   `patch_level` VARCHAR(100) NOT NULL DEFAULT '0',
-  `patch_ctime` VARCHAR(10) NOT NULL DEFAULT 0,
+  `patch_ctime` VARCHAR(10) NOT NULL DEFAULT '0',
   `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS',
   `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,
   `activate_xchange` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100,
diff --git a/js/admin-network-query-api.js b/js/admin-network-query-api.js
new file mode 100644 (file)
index 0000000..cc08da5
--- /dev/null
@@ -0,0 +1,114 @@
+/**
+ * JavaScript for admin ext-network AJAX stuff
+ * --------------------------------------------------------------------
+ * $Revision::                                                        $
+ * $Date::                                                            $
+ * $Tag:: 0.2.1-FINAL                                                 $
+ * $Author::                                                          $
+ * --------------------------------------------------------------------
+ * Copyright (c) 2003 - 2009 by Roland Haeder
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team
+ * For more information visit: http://mxchange.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA  02110-1301  USA
+ */
+
+// Sends a request out to query a network API
+function sendNetworkQueryByTypeId (typeId) {
+       // Send out the request
+       return sendAjaxRequest('admin', 'network_query_single_api', '&network_type_id=' + typeId, false);
+}
+
+// Queries a single network type handler
+function doQueryNetworkType (typeId, displayMessage) {
+       // Close all windows
+       closeAllWindows('admin');
+
+       // Update status
+       updateStatusField('status_' + typeId, '', 'CHECKING ...');
+
+       // Does the request work?
+       if (sendNetworkQueryByTypeId(typeId) === false) {
+               // Display a message?
+               if (displayMessage === true) {
+                       // Display error message
+                       displayErrorWindow('admin', getAjaxContent());
+               } // END - if
+       } else {
+               // Display a message?
+               if (displayMessage === true) {
+                       // Display success message
+                       displaySuccessWindow('admin', getAjaxContent());
+               } // END - if
+
+               // Update status
+               updateStatusField('status_' + typeId, 'good', 'OKAY');
+
+               // Worked fine
+               return true;
+       }
+
+       // Update status
+       updateStatusField('status_' + typeId, 'bad', 'ERROR!');
+
+       // Didn't work
+       return false;
+}
+
+// Query all network APIs
+// @TODO Add support for checkboxes
+// @TODO Make progress window working
+function doQueryNetwork (networkId) {
+       // Open progress window
+       //displayProgressWindow('admin', 'Init ...');
+
+       // Do the AJAX request (JSON as content is enabled)
+       if (sendAjaxRequest('admin', 'network_list_by_id', '&network_id=' + networkId, true) === true) {
+               // Get content (as it is an array)
+               var queries = getAjaxContent();
+               var total = getTotalCountFromObject(queries);
+
+               // Parse the content
+               $.each(queries, function (i, typeId) {
+                       // Set progress content
+                       //setProgressContent('admin', typeId);
+
+                       // Request it
+                       if (doQueryNetworkType(typeId, false) === false) {
+                               // Stop processing and display error message
+                               displayErrorWindow('admin', getAjaxContent() + 'typeId=' + typeId);
+
+                               // Abort here
+                               return false;
+                       } // END - if
+
+                       // Update progress bar
+                       updateProgressBar(queries.length);
+
+                       // Wait a little
+                       $('body').delay(500);
+               });
+
+               // Is all completed?
+               if (counterSuccess == total) {
+                       // Display success message
+                       displaySuccessWindow('admin', 'OKAY');
+               } // END - if
+       } else {
+               // Display error window
+               displayErrorWindow('admin', getAjaxContent());
+       }
+}
index 3686444aed6a2cf21094a1f843d069078af2eaed..7d06cd07fbfad0da824af0d8ea7760b70b106a8e 100644 (file)
@@ -37,6 +37,9 @@ var saveChangesId      = null;
 var lastErrorMessage   = null;
 var saveChangesPending = false;
 
+// Counter for success steps
+var counterSuccess = 0;
+
 // Add all footer navigation elements
 footerElements[0] = 'next';
 footerElements[1] = 'previous';
@@ -54,7 +57,7 @@ function isElementVisible (prefix, element) {
        var el = document.getElementById(prefix + '_' + element);
 
        // Is element set?
-       if ((el == null) || (el == undefined)) {
+       if ((el === null) || (el == undefined)) {
                throw new '"' + prefix + '_' + element + '" does not exist.';
        } else if ((el.style.display == undefined) || (el.style.display == '')) {
                throw new '"' + prefix + '_' + element + '" has no style.display element.';
@@ -189,7 +192,7 @@ function setAjaxSuccess (success) {
 function setAjaxReply (reply, isJson) {
        // Is it JSON URL-encoded content?
        //* DEBUG: */ alert('setAjaxReply(): reply=' + reply + ',isJson=' + isJson);
-       if ((isJson != undefined) && (isJson == true)) {
+       if ((isJson != undefined) && (isJson === true)) {
                // Decode URL-encoding (for some reason it must be here ...)
                var localReply = decodeUrlEncoding(reply);
 
@@ -227,7 +230,7 @@ function sendAjaxRequest (level, doValue, extra, isJson) {
                        if (ajax_content.reply_content == undefined) {
                                // This shall not happen
                                throw new 'ajax_content.reply_content not returned from ajax.php, please fix your scripts. (1)';
-                       } else if (ajax_content.reply_content == null) {
+                       } else if (ajax_content.reply_content === null) {
                                // This shall not happen, too
                                throw new 'ajax_content.reply_content=null from ajax.php, please fix your scripts. (2)';
                        }
@@ -261,7 +264,7 @@ function sendAjaxRequest (level, doValue, extra, isJson) {
                                        // This shall not happen
                                        throw new 'ajax_content.reply_content not returned from ajax.php, please fix your scripts. (4)';
                                }
-                       } else if (ajax_content.reply_content == null) {
+                       } else if (ajax_content.reply_content === null) {
                                // This shall not happen, too
                                throw new 'ajax_content.reply_content=null from ajax.php, please fix your scripts. (5)';
                        }
@@ -288,7 +291,7 @@ function enableFooterNavigation (prefix, tabId) {
        resetFooterNavigation();
 
        // Do the AJAX request (JSON as content is enabled)
-       if (sendAjaxRequest(prefix, 'footer_navigation', '&tab=' + tabId, true) == true) {
+       if (sendAjaxRequest(prefix, 'footer_navigation', '&tab=' + tabId, true) === true) {
                // Parse the content
                $.each(getAjaxContent(), function (i, value) {
                        // Enable current element
@@ -313,7 +316,7 @@ function requestAjaxContent (prefix, htmlId, tabId, footerNavigation) {
                // Clicked on a disabled tabId so blur it
                //* DEBUG: */ alert('requestAjaxContent(): prefix=' + prefix + ',htmlId=' + htmlId + ',tabId=' + tabId + ' - DISABLED!');
                return;
-       } else if (formChanged == true) {
+       } else if (formChanged === true) {
                // Has changed form , so output message to browser
                //* DEBUG: */ alert('requestAjaxContent(): prefix=' + prefix + ',htmlId=' + htmlId + ',tabId=' + tabId + ' - FORM CHANGED!');
                displayChangedWarningWindow(prefix, tabId);
@@ -332,7 +335,7 @@ function requestAjaxContent (prefix, htmlId, tabId, footerNavigation) {
                // Fade the old content out
                $('#' + htmlId).fadeOut('fast', function() {
                        // Send AJAX request
-                       if (sendAjaxRequest(prefix, 'request_content', '&tab=' + tabId, false) == true) {
+                       if (sendAjaxRequest(prefix, 'request_content', '&tab=' + tabId, false) === true) {
                                // Add the HTML content
                                $('#' + htmlId).html(getAjaxContent());
 
@@ -342,7 +345,7 @@ function requestAjaxContent (prefix, htmlId, tabId, footerNavigation) {
                                        markTabNavigation(prefix, tabId);
 
                                        // Is the footer navigation enabled?
-                                       if (footerNavigation == true) {
+                                       if (footerNavigation === true) {
                                                // Change footer navigation as well
                                                enableFooterNavigation(prefix, tabId);
                                        } // END - if
@@ -374,9 +377,9 @@ function displayTestWindow (prefix, element) {
        });
 
        // Request it from the AJAX backend
-       if (sendAjaxRequest(prefix, 'test', '', false) == true) {
+       if (sendAjaxRequest(prefix, 'test', '', false) === true) {
                // Transfer the returned content to the prefix_warning_content id
-               $('#' + prefix + '_warning_content').html(getAjaxContent());
+               setWarningContent(prefix, getAjaxContent());
 
                // Fade the warning in
                $('#' + prefix + '_warning').fadeIn('slow', function() {
@@ -389,17 +392,19 @@ function displayTestWindow (prefix, element) {
        }
 }
 
+// Fades slowly in given window
+function fadeInWindow (prefix, id) {
+       // Do the fade-in
+       $('#' + prefix + '_' + id).fadeIn('slow', function() {
+               // Do nothing for now
+       });
+}
+
 // Displays a warning window above the form to warn about changed&unsafed fields
 function displayChangedWarningWindow (prefix, button) {
-       // Fade out warning window, if open
        //* DEBUG: */ alert('displayChangedWarningWindow(): prefix=' + prefix + ',button=' + button + ' - calling closeWarningWindow()');
-       closeWarningWindow(prefix, true, false);
-
-       // Fade error out for eye-candy, if open
-       closeErrorWindow(prefix, true, false);
-
-       // Fade it out for eye-candy
-       closeProgressWindow(prefix, true, false);
+       // Fade all windows out
+       closeAllWindows(prefix);
 
        // Abort here if warningDisplayed is still true
        if (isElementVisible(prefix, 'warning')) {
@@ -408,14 +413,12 @@ function displayChangedWarningWindow (prefix, button) {
        } // END - if
 
        // Request it from the AJAX backend
-       if (sendAjaxRequest(prefix, 'change_warning', '&button=' + button + '&elements=' + changedElements.join(':')) == true) {
+       if (sendAjaxRequest(prefix, 'change_warning', '&button=' + button + '&elements=' + changedElements.join(':')) === true) {
                // Transfer the returned content to the prefix_warning_content id
-               $('#' + prefix + '_warning_content').html(getAjaxContent());
+               setWarningContent(prefix, getAjaxContent());
 
                // Fade the warning in
-               $('#' + prefix + '_warning').fadeIn('slow', function() {
-                       // Do nothing for now
-               });
+               fadeInWindow(prefix, 'warning');
        } else {
                // Display error message
                displayErrorWindow(prefix, getAjaxContent());
@@ -424,15 +427,9 @@ function displayChangedWarningWindow (prefix, button) {
 
 // Displays the error window for given prefix and content
 function displayErrorWindow (prefix, ajax_content) {
-       // Fade out warning window, if open
-       //* DEBUG: */ alert('displayErrorWindow(): prefix=' + prefix + ',ajax_content=' + ajax_content.reply_content + ' - calling closeWarningWindow()');
-       closeWarningWindow(prefix, true, false);
-
-       // Fade it out for eye-candy
-       closeErrorWindow(prefix, true, false);
-
-       // Fade it out for eye-candy
-       closeProgressWindow(prefix, true, false);
+       //* DEBUG: */ alert('displayErrorWindow(): prefix=' + prefix + ',ajax_content=' + ajax_content + ' - calling closeWarningWindow()');
+       // Fade all windows out
+       closeAllWindows(prefix);
 
        // Abort here if errorDisplayed is still true
        if (isElementVisible(prefix, 'error')) {
@@ -442,28 +439,20 @@ function displayErrorWindow (prefix, ajax_content) {
 
        // Copy the response text to the error variable
        if (ajax_content.reply_content != undefined) {
-               $('#' + prefix + '_error_content').html(ajax_content.reply_content);
+               setErrorContent(prefix, ajax_content.reply_content);
        } else {
-               $('#' + prefix + '_error_content').html(ajax_content);
+               setErrorContent(prefix, ajax_content);
        }
 
        // Fade the error in
-       $('#' + prefix + '_error').fadeIn('slow', function() {
-               // Do nothing for now
-       });
+       fadeInWindow(prefix, 'error');
 }
 
 // Displays the progress window for given prefix and content
 function displayProgressWindow (prefix, ajax_content) {
-       // Fade out warning window, if open
        //* DEBUG: */ alert('displayProgressWindow(): prefix=' + prefix + ' - calling closeWarningWindow()');
-       closeWarningWindow(prefix, true, false);
-
-       // Fade it out for eye-candy
-       closeErrorWindow(prefix, true, false);
-
-       // Fade it out for eye-candy
-       closeProgressWindow(prefix, true, false);
+       // Fade all windows out
+       closeAllWindows(prefix);
 
        // Abort here if progressDisplayed is still true
        if (isElementVisible(prefix, 'progress')) {
@@ -480,9 +469,43 @@ function displayProgressWindow (prefix, ajax_content) {
        }
 
        // Fade the progress in
-       $('#' + prefix + '_progress').fadeIn('slow', function() {
-               // Do nothing for now
-       });
+       fadeInWindow(prefix, 'progress');
+}
+
+// Displays the success window for given prefix and content
+function displaySuccessWindow (prefix, ajax_content) {
+       //* DEBUG: */ alert('displaySuccessWindow(): prefix=' + prefix + ' - calling closeWarningWindow()');
+       // Fade all windows out
+       closeAllWindows(prefix);
+
+       // Abort here if successDisplayed is still true
+       if (isElementVisible(prefix, 'success')) {
+               // Make sure this doesn't happen
+               return;
+       } // END - if
+
+       // Copy the response text to the success variable
+       if (ajax_content.reply_content != undefined) {
+               // Set HTML content
+               setSuccessContent(prefix, ajax_content.reply_content);
+       } else {
+               setSuccessContent(prefix, ajax_content);
+       }
+
+       // Fade the success in
+       fadeInWindow(prefix, 'success');
+}
+
+// Sets "warning content"
+function setWarningContent (prefix, content) {
+       // Set HTML content
+       $('#' + prefix + '_warning_content').html(content);
+}
+
+// Sets "error content"
+function setErrorContent (prefix, content) {
+       // Set HTML content
+       $('#' + prefix + '_error_content').html(content);
 }
 
 // Sets "progress content"
@@ -491,27 +514,29 @@ function setProgressContent (prefix, content) {
        $('#' + prefix + '_progress_content').html(content);
 }
 
-// Waits until the window has been closed
-function closeErrorLocked (prefix) {
-       // Has all been loaded?
-       if (!isElementVisible(prefix, 'error')) {
-               // Then release ready()
-               $.holdReady(false);
-       } else {
-               // Recursive call again
-               window.setTimeout('closeErrorLocked(' + prefix + ')', 10);
-       }
+// Sets "success content"
+function setSuccessContent (prefix, content) {
+       // Set HTML content
+       $('#' + prefix + '_success_content').html(content);
+}
+
+// Close all windows
+function closeAllWindows (prefix) {
+       closeWarningWindow(prefix, true, false);
+       closeErrorWindow(prefix, true, false);
+       closeProgressWindow(prefix, true, false);
+       closeSuccessWindow(prefix, true, false);
 }
 
 // Waits until the window has been closed
-function closeProgressLocked (prefix) {
+function closeErrorLocked (prefix) {
        // Has all been loaded?
-       if (!isElementVisible(prefix, 'progress')) {
+       if (!isElementVisible(prefix, 'error')) {
                // Then release ready()
                $.holdReady(false);
        } else {
                // Recursive call again
-               window.setTimeout('closeProgressLocked(' + prefix + ')', 10);
+               window.setTimeout('closeErrorLocked("' + prefix + '")', 10);
        }
 }
 
@@ -520,7 +545,7 @@ function closeErrorWindow (prefix, waitClose, resetCurrentTabId) {
        // Is the error displayed?
        if (isElementVisible(prefix, 'error')) {
                // Shall we wait ("sync") until the animation has completed?
-               if (waitClose == true) {
+               if (waitClose === true) {
                        // Hold the ready status
                        $.holdReady(true);
                } // END - if
@@ -528,25 +553,37 @@ function closeErrorWindow (prefix, waitClose, resetCurrentTabId) {
                // Yes, then fade it out
                $('#' + prefix + '_error').fadeOut('fast', function() {
                        // Set current tab id to default
-                       if (resetCurrentTabId == true) {
+                       if (resetCurrentTabId === true) {
                                setCurrentTabId(defaultTabId);
                        } // END - if
                });
 
                // Shall this animation be "synchronized"?
-               if (waitClose == true) {
+               if (waitClose === true) {
                        // Wait for the window has been closed
                        closeErrorLocked(prefix);
                } // END - if
        } // END - if
 }
 
+// Waits until the window has been closed
+function closeProgressLocked (prefix) {
+       // Has all been loaded?
+       if (!isElementVisible(prefix, 'progress')) {
+               // Then release ready()
+               $.holdReady(false);
+       } else {
+               // Recursive call again
+               window.setTimeout('closeProgressLocked("' + prefix + '")', 10);
+       }
+}
+
 // Closes an progress window
 function closeProgressWindow (prefix, waitClose, resetCurrentTabId) {
        // Is the progress displayed?
        if (isElementVisible(prefix, 'progress')) {
                // Shall we wait ("sync") until the animation has completed?
-               if (waitClose == true) {
+               if (waitClose === true) {
                        // Hold the ready status
                        $.holdReady(true);
                } // END - if
@@ -554,19 +591,57 @@ function closeProgressWindow (prefix, waitClose, resetCurrentTabId) {
                // Yes, then fade it out
                $('#' + prefix + '_progress').fadeOut('fast', function() {
                        // Set current tab id to default
-                       if (resetCurrentTabId == true) {
+                       if (resetCurrentTabId === true) {
                                setCurrentTabId(defaultTabId);
                        } // END - if
                });
 
                // Shall this animation be "synchronized"?
-               if (waitClose == true) {
+               if (waitClose === true) {
                        // Wait for the window has been closed
                        closeProgressLocked(prefix);
                } // END - if
        } // END - if
 }
 
+// Waits until the window has been closed
+function closeSuccessLocked (prefix) {
+       // Has all been loaded?
+       if (!isElementVisible(prefix, 'success')) {
+               // Then release ready()
+               $.holdReady(false);
+       } else {
+               // Recursive call again
+               window.setTimeout('closeSuccessLocked("' + prefix + '")', 10);
+       }
+}
+
+// Closes an success window
+function closeSuccessWindow (prefix, waitClose, resetCurrentTabId) {
+       // Is the success displayed?
+       if (isElementVisible(prefix, 'success')) {
+               // Shall we wait ("sync") until the animation has completed?
+               if (waitClose === true) {
+                       // Hold the ready status
+                       $.holdReady(true);
+               } // END - if
+
+               // Yes, then fade it out
+               $('#' + prefix + '_success').fadeOut('fast', function() {
+                       // Set current tab id to default
+                       if (resetCurrentTabId === true) {
+                               setCurrentTabId(defaultTabId);
+                       } // END - if
+               });
+
+               // Shall this animation be "synchronized"?
+               if (waitClose === true) {
+                       // Wait for the window has been closed
+                       closeSuccessLocked(prefix);
+               } // END - if
+       } // END - if
+}
+
 // Waits until the window has been closed
 function closeWarningLocked (prefix) {
        // Has all been loaded?
@@ -575,7 +650,7 @@ function closeWarningLocked (prefix) {
                $.holdReady(false);
        } else {
                // Recursive call again
-               window.setTimeout('closeWarningLocked(' + prefix + ')', 10);
+               window.setTimeout('closeWarningLocked("' + prefix + '")', 10);
        }
 }
 
@@ -586,7 +661,7 @@ function closeWarningWindow (prefix, waitClose, resetCurrentTabId) {
        if (isElementVisible(prefix, 'warning')) {
                // Shall we wait ("sync") until the animation has completed?
                //* DEBUG: */ alert('prefix=' + prefix + ',waitClose=' + waitClose + ',warningDisplayed=true');
-               if (waitClose == true) {
+               if (waitClose === true) {
                        // Hold the ready status
                        $.holdReady(true);
                } // END - if
@@ -594,13 +669,13 @@ function closeWarningWindow (prefix, waitClose, resetCurrentTabId) {
                // Yes, then fade it out
                $('#' + prefix + '_warning').fadeOut('fast', function() {
                        // Set current tab id to default
-                       if (resetCurrentTabId == true) {
+                       if (resetCurrentTabId === true) {
                                setCurrentTabId(defaultTabId);
                        } // END - if
                });
 
                // Shall this animation be "synchronized"?
-               if (waitClose == true) {
+               if (waitClose === true) {
                        // Wait for the window has been closed
                        //* DEBUG: */ alert('prefix=' + prefix + ',waitClose=' + waitClose + ' - LOCKED!');
                        closeWarningLocked(prefix);
@@ -612,7 +687,7 @@ function closeWarningWindow (prefix, waitClose, resetCurrentTabId) {
 function doFooterPage (prefix, htmlId, button) {
        //* DEBUG: */ alert('doFooterPage(): prefix=' + prefix + ',htmlId=' + htmlId + ',button=' + button + ' - ENTERED!');
        // Has something being changed?
-       if (formChanged == true) {
+       if (formChanged === true) {
                // Output message to browser
                displayChangedWarningWindow(prefix, button);
 
@@ -628,10 +703,10 @@ function doFooterPage (prefix, htmlId, button) {
 
        // Is there a 'next' entry?
        //* DEBUG: */ alert('doFooterPage(): button=' + button + ',currentTabId=' + currentTabId + ',nextPage[currentTabId]=' + nextPage[currentTabId]);
-       if ((button == 'next') && (nextPage[currentTabId] != null)) {
+       if ((button == 'next') && (nextPage[currentTabId] !== null)) {
                // Then call the AJAX requester
                var page = nextPage[currentTabId];
-       } else if ((button == 'previous') && (previousPage[currentTabId] != null)) {
+       } else if ((button == 'previous') && (previousPage[currentTabId] !== null)) {
                // Then call the AJAX requester
                var page = previousPage[currentTabId];
        }
@@ -743,7 +818,7 @@ function saveChanges (prefix) {
        if (changedElements.length == 0) {
                // This should not happen
                displayErrorWindow(prefix, '<div class="ajax_error_message">saveChanges() called with no changed elements.</div>');
-       } else if (saveChangesId == null) {
+       } else if (saveChangesId === null) {
                // saveChangesId is not det
                displayErrorWindow(prefix, '<div class="ajax_error_message">saveChangesId is not set. Please add <em>saveChanges = \'foo_bar\';</em> to your code.</div>');
        }
@@ -759,12 +834,12 @@ function saveChanges (prefix) {
         * Send the request to the AJAX backend, it doesn't matter from which page
         * this was requested.
         */
-       if (sendAjaxRequest(prefix, 'save_changes', '&tab=' + currentTabId + '&' + serializedData, true) == true) {
+       if (sendAjaxRequest(prefix, 'save_changes', '&tab=' + currentTabId + '&' + serializedData, true) === true) {
                // Get the content
                var ajax_content = getAjaxContent();
 
                // Progress the returned content
-               if (progressAjaxResponseContent(prefix, ajax_content) == true) {
+               if (progressAjaxResponseContent(prefix, ajax_content) === true) {
                        // Mark all elements as unchanged
                        markAllElementsAsUnchanged();
 
@@ -804,7 +879,7 @@ function saveChanges (prefix) {
 // Waiting for resources being loaded
 function saveChangesLocked () {
        // Has all been loaded?
-       if (saveChangesPending == false) {
+       if (saveChangesPending === false) {
                // Then release ready()
                $.holdReady(false);
        } else {
@@ -844,3 +919,72 @@ function doSaveChangesContinue (prefix, htmlId, tab) {
        // Load requested content
        requestAjaxContent(prefix, htmlId, tab);
 }
+
+// Registers common things (close button, drap&drop)
+function registerCommons (prefix) {
+       //-----------------------------------------
+       //             Close buttons
+       //-----------------------------------------
+       $('#' + prefix + '_error_close').click(function () {
+               // Close the window
+               closeErrorWindow(prefix);
+       });
+
+       $('#' + prefix + '_warning_close').click(function () {
+               // Close the window
+               closeWarningWindow(prefix);
+       });
+
+       $('#' + prefix + '_success_close').click(function () {
+               // Close the window
+               closeSuccessWindow(prefix);
+       });
+
+       //-----------------------------------------
+       //              Drag'N'Drop
+       //-----------------------------------------
+       $('#' + prefix + '_progress').draggable({
+               opacity: 0.85
+       });
+
+       $('#' + prefix + '_warning').draggable({
+               opacity: 0.85
+       });
+
+       $('#' + prefix + '_success').draggable({
+               opacity: 0.85
+       });
+
+       $('#' + prefix + '_error').draggable({
+               opacity: 0.85
+       });
+}
+
+// Update progress bar
+function updateProgressBar (maxValue) {
+       // Increment counter
+       counterSuccess++;
+
+       // Do only update <= 100% values
+       if (counterSuccess <= maxValue) {
+               // Update progress bar
+               $('#progressbar').progressbar({
+                       value: (counterSuccess / maxValue * 100)
+               });
+       } // END - if
+}
+
+// Updates a given "status" field
+function updateStatusField (id, cssClass, statusMessage) {
+       // Set message
+       $('#' + id).html(statusMessage);
+
+       // Is a cssClass set?
+       if (cssClass != '') {
+               // Add it
+               $('#' + id).addClass(cssClass);
+       } else {
+               // Remove all classes
+               $('#' + id).removeClass();
+       }
+}
index d55db6361cabe295ec3c3cb2bb5df4bf594258da..424b5f7d1a7a2690be4ac73aacda334e4d0d4708 100644 (file)
@@ -40,7 +40,7 @@ function loadScriptsLocked () {
                $.holdReady(false);
        } else {
                // Recursive call again
-               window.setTimeout('loadScriptsLocked()', 10);
+               window.setTimeout('loadScriptsLocked()', 100);
        }
 }
 
@@ -77,6 +77,9 @@ function loadScripts (resources) {
                        // Count it as loaded
                        resourceCounter++;
                });
+
+               // Wait here a little
+               $('body').delay(100);
        } // END - for
 
        // Wait until all scripts are loaded (asynchronously)
index 8ec17a7f597aa19e6ac2bcbf17ccbd92a70b490e..5d4452c1b71ddd87169b48a321cd47ce9a5fdfb6 100644 (file)
@@ -38,7 +38,7 @@ var ajaxTest = null;
 // Countdown function
 function ajaxTestCounter () {
        // Is there element set?
-       if (element != null) {
+       if (element !== null) {
                // Yes, then set the new counter value
                element.innerHTML = counter;
        } // END - if
index 77d08f337b936b3b17662e5ad2c32b3c9f0c0927..2fab4bc2a788025939ee33816624e871e8896efd 100644 (file)
@@ -34,7 +34,7 @@ function in_array (needle, heystack) {
        // Check all elements
        for (var i = 0; i < heystack.length; i++) {
                // Is the element found?
-               if (heystack[i] == needle) {
+               if (heystack[i] === needle) {
                        // Found it and abort
                        isInArray = true;
                        break;
@@ -56,3 +56,18 @@ function decodeUrlEncoding (content) {
        // Return it
        return decoded;
 }
+
+// "Getter" for total elements in given object
+function getTotalCountFromObject (object) {
+       // Default is zero
+       var total = 0;
+
+       // Start looping
+       $.each(object, function (i, j) {
+               // Add it
+               total++;
+       });
+
+       // Return total
+       return total;
+}
index f01a38b3fb34acfb26929c3292a98966e8200843..4d056852919352fad8b5c8fb26ad21d11ecbac54 100644 (file)
@@ -31,7 +31,6 @@ var installationSteps = new Array();
 
 // Failed step
 var failedStep = '';
-var counterSuccess = 0;
 
 // Init all installation steps
 installationSteps[0] = 'import_tables_sql';
@@ -55,43 +54,14 @@ function doFinishInstallation () {
        // Display progress window
        displayProgressWindow('install', 'Init ...');
 
-       // Start installation loop delayed
-       window.setTimeout('doInstallationLoop()', 500);
+       // Wait for window fader
+       $().ready(function () {
+               // Start installation loop delayed
+               window.setTimeout('doInstallationLoop()', 500);
 
-       // Wait here
-       window.setTimeout('doWait()', 500);
-}
-
-// Do wait
-function doWait () {
-       // Is still something to do?
-       if ((failedStep == '') && (counterSuccess != installationSteps.length)) {
-               // Wait one round more
-               window.setTimeout('doWait()', 500);
-       } else if ((failedStep == '') && (counterSuccess == installationSteps.length)) {
-               // Close window
-               closeProgressWindow('install', true, false);
-
-               // Redirect to old 'finished' page
-               document.location.href = 'admin.php';
-       } else if (failedStep != '') {
-               // Something happens that should not happen!
-               displayErrorWindow('install', 'failedStep=' + failedStep);
-       }
-}
-
-// Update progress bar
-function updateProgressBar () {
-       // Increment counter
-       counterSuccess++;
-
-       // Do only update <= 100% values
-       if (counterSuccess <= installationSteps.length) {
-               // Update progress bar
-               $('#progressbar').progressbar({
-                       value: (counterSuccess / installationSteps.length * 100)
-               });
-       } // END - if
+               // Wait here
+               $('body').delay(500);
+       });
 }
 
 // Does the "installation loop"
@@ -102,7 +72,7 @@ function doInstallationLoop () {
                outputInstallationStepMessage(installationSteps[i]);
 
                // Initialize next step
-               if (!sendInstallationStepRequest(i) == true) {
+               if (sendInstallationStepRequest(i) === false) {
                        // Failed step, so remember it for later display
                        failedStep = installationSteps[i];
 
@@ -114,7 +84,7 @@ function doInstallationLoop () {
                $('body').delay(500);
 
                // Update progress bar
-               updateProgressBar();
+               updateProgressBar(installationSteps.length);
        } // END - for
 
        // Is success counter same as array size
@@ -133,7 +103,7 @@ function sendInstallationStepRequest (i) {
        } // END - if
 
        // Send out the request
-       return sendAjaxRequest('install', 'do_step', '&step=' + installationSteps[i], true);
+       return sendAjaxRequest('install', 'do_step', '&step=' + installationSteps[i], false);
 }
 
 // Outputs a "step message"
index b02551fe5238c4d40d53974fcc27400dbeca08e8..0464221427f00cd46e689a34af7ebadff5022c37 100644 (file)
@@ -49,7 +49,7 @@ function changeMenuFoldState (mode, currentAction, action, what) {
        var current = document.getElementById(id);
 
        // Is it displayed?
-       if (menuStates[id] == true) {
+       if (menuStates[id] === true) {
                // Then hide it
                hideMenu(current, id);
        } else {
index 976d4d98c733e382caa03f05ea124f80b6fbec95..6ca76095ad8eed7e5fd6384f8568fb7d2dd09f4e 100644 (file)
@@ -72,19 +72,18 @@ if (isGetRequestElementSet('userid'))  $userId  = bigintval(getRequestElement('u
 if (isGetRequestElementSet('mailid'))  $mailId  = bigintval(getRequestElement('mailid'));
 if (isGetRequestElementSet('bonusid')) $bonusId = bigintval(getRequestElement('bonusid'));
 
-// 01           1        12            2    2            21    1                      2210
-if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) {
+if ((isValidId($userId)) && ((isValidId($mailId)) || (isValidId($bonusId))) && (!ifFatalErrorsDetected())) {
        // Init result
        $result_link = FALSE;
 
        // Maybe he wants to confirm an email?
-       if ($mailId > 0) {
+       if (isValidId($mailId)) {
                // Member mail
                $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
                        array($mailId, $userId), __FILE__, __LINE__);
                $type = 'mailid';
                $urlId = $mailId;
-       } elseif ($bonusId > 0) {
+       } elseif (isValidId($bonusId)) {
                // Bonus mail
                $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
                        array($bonusId, $userId), __FILE__, __LINE__);
index 59253188f434afd23c3776162a4e9d05140ae0a0..e4ef0a812e992c0c5163b8dd9acd1ab3d97b9614 100644 (file)
@@ -77,8 +77,7 @@ if (isGetRequestElementSet('bonusid')) $bonusId = bigintval(getRequestElement('b
 if (isGetRequestElementSet('code'))    $code    = bigintval(getRequestElement('code'));
 if (isGetRequestElementSet('do'))      $do      = getRequestElement('do');
 
-// 01             2       21    12           2    2            21    1                      2210
-if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) {
+if ((isValidId($userId)) && ((isValidId($mailId)) || (isValidId($bonusId))) && (!ifFatalErrorsDetected())) {
        // No image?
        if ($do != 'img') {
                // ... then output header
@@ -86,12 +85,12 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
        } // END - fi
 
        // Maybe he wants to confirm an email?
-       if ($mailId > 0) {
+       if (isValidId($mailId)) {
                $result_main = SQL_QUERY_ESC("SELECT `id` AS `link_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
                        array($mailId, $userId), __FILE__, __LINE__);
                $type = 'mailid';
                $urlId = $mailId;
-       } elseif ($bonusId > 0) {
+       } elseif (isValidId($bonusId)) {
                $result_main = SQL_QUERY_ESC("SELECT `id` AS `link_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
                        array($bonusId, $userId), __FILE__, __LINE__);
                $type = 'bonusid';
@@ -310,7 +309,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
 
                                                                                // Load template
                                                                                loadTemplate($template, FALSE, $content);
-                                                                       } elseif (isValidUserId($data['sender'])) {
+                                                                       } elseif (isValidId($data['sender'])) {
                                                                                // Wrong image code! So add points to sender's account
                                                                                initReferralSystem();
                                                                                addPointsThroughReferralSystem('mailid_payback', $data['sender'], $payment);
diff --git a/ref.php b/ref.php
index 7e452673a5e555f1dba513a9d587ec184f53b77e..02fc5fa734fca9e688f59c096a0b1b645c5c75eb 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -55,7 +55,7 @@ setContentType('text/html');
 $url = 'modules.php?module=index';
 
 // Check for determined referral id
-if ((isExtensionActive('user')) && (isReferralIdValid()) && (isValidUserId(determineReferralId()))) {
+if ((isExtensionActive('user')) && (isReferralIdValid()) && (isValidId(determineReferralId()))) {
        // Run filter chain for updating referral data
        runFilterChain('update_referral_data');
 
index d478f9a9aebfbd580c19af11a8c170eef1a30f8e..6814e52df7c19d2ade469593479b9e0ca9423f2c 100644 (file)
@@ -57,7 +57,7 @@ redirectOnUninstalledExtension('bonus');
 // Include header
 loadIncludeOnce('inc/header.php');
 
-if ((isValidUserId(getRequestElement('userid'))) && (getRequestElement('d') > 0) && (isGetRequestElementSet('t'))) {
+if ((isValidId(getRequestElement('userid'))) && (getRequestElement('d') > 0) && (isGetRequestElementSet('t'))) {
        // Set row name
        $t = '';
        switch (getRequestElement('t')) {
index 67762880e0d9e773ce62c0b9fead5d5910f50ad3..53bf70849df5d5f0b03cde2fb5e7c6224e9b9093 100644 (file)
@@ -184,7 +184,7 @@ if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement('
                //* DEBUG: */ exit('nextId='.$nextId);
 
                // Is there a valid id?
-               if ($nextId > 0) {
+               if (isValidId($nextId)) {
                        // Then prepare other content
                        $content = array(
                                'url_id' => $nextId,
index c9fa80fdf0483d96318d03a1db9d1aad1bd630f2..369e8876c829eaec428b3ed06a28cef1ea939cd9 100644 (file)
@@ -28,8 +28,6 @@ Bevor Sie sich jedoch in den Mitgliesbereich einloggen k&ouml;nnen, m&uuml;ssen
 Ihr Best&auml;tigungslink:
 {?URL?}/confirm.php?hash=$content[hash]
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 7d32e9eed322c3ae9bad224ac4a1aaa865a47bb3..465c8be16c8e09037d0786679c628af78b764ecd 100644 (file)
@@ -5,8 +5,6 @@ Sie hatten sich zu unserem {?mt_word?} {?MAIN_TITLE?} angemeldet und heute Ihren
 Hier ist Ihr Best&auml;tigungslink:
 {?URL?}/confirm.php?hash={%user,user_hash=$userid%}
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 74c5c9ccc4380463b7dabf361041b71ff11ca97c..b8e599e305c6b9c474da4492e82374f0c06edd63 100644 (file)
@@ -30,7 +30,7 @@ Diese Email ist kein SPAM! Sie erhalten diese Mail von unseren Mitgliedern aufgr
 
 {?MAIN_TITLE?} distanziert sich von jeglichen Inhalte und Links innerhalb dieser E-Mail.
 
-Vielen Dank.
+Vielen Dank f&uuml;r Ihre Aufmerksamkeit.
 
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
index 1ce250fc0c1317fdbddbc1d90f0b9c93ada204c7..c1efcb6f90903ce63a28472b78577391c306e3a3 100644 (file)
@@ -10,8 +10,6 @@ Betreffzeile: $content[subject]
 
 Sie k&ouml;nnen den Versand-Fortschritt im Mitgliedsmen&uuml; unter "Unbest&auml;tigte Mails" verfolgen. Sobald die Mail vollst&auml;ndig versendet wurde, erhalten Sie eine weitere Mail!
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 9a0b6d332e3fca17a63f2fb2bc7bd2d2f0de616b..584d52adfb68d33d0f59ea228aedb09100c31d0a 100644 (file)
@@ -10,8 +10,6 @@ Betreffzeile: $content[subject]
 
 Ihre Mailbuchung wurde somit gel&ouml;scht. Sollten Sie Fragen hierzu haben, so wenden Sie sich bitte an unseren Support.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 093733e40e4563c8c60ec9c19e8cd01e1d21f90d..b6eba8f4bd77665ea824b5f71d941427a12a0cac 100644 (file)
@@ -20,8 +20,6 @@ Sobald Ihre Mailbuchung vollst&auml;ndig gesendet wurde, erhalten Sie eine zweit
 
 $content[member_autosend]
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 9ec743f910e90d5f22a8172e25f1f0422f4e99c8..0c96892fc22415062c77f58a869ad5015899f932 100644 (file)
@@ -10,8 +10,6 @@ Betreffzeile: $content[subject]
 
 Ihre Mailbuchung wurde somit gel&ouml;scht. Sollten Sie Fragen hierzu haben, so wenden Sie sich bitte an unseren Support.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 3ce9cd4f6b6760f89eea586267a4a3ab9592475a..0b72f78f3492e8f46ffad31eb03dbd47abc54649 100644 (file)
@@ -15,8 +15,6 @@ Letzte Profil&auml;nderung: $content[last_update]
 
 Sollten Sie diese Mail irrt&uuml;mlich erhalten haben, weil sich bei Ihnen nichts ge&auml;ndert hat, bitten wir Sie dies zu entschuldigen und sich dennoch einmal einzuloggen und auf "Benachrichtigung abschalten" zu klicken.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 657131f992c5f5b78ca3e732a8d97e60b50daf70..614d9e063cd9056ac21c20b118db4552e0d282ac 100644 (file)
@@ -13,8 +13,6 @@ Ihr Guthaben von {%pipe,translateComma=$content[points]%} {?POINTS?} sind hiermi
 
 Wir w&uuml;nschen Ihnen weiterhin noch alles Gute und k&ouml;nnen Sie vielleicht irgentwann einmal wieder begr&uuml;ssen.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 73bf0bc170c84682ff5027c051e7221c4b5318f9..b29e939eff425cfbeafcf20dfdf034d338610808 100644 (file)
@@ -13,8 +13,6 @@ $content[text]
 
 Sollten Sie damit nicht einverstanden sein, so melden Sie sich bitte bei uns ({?WEBMASTER?}). Wir kommen dann in Kontakt mit Ihnen.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 98d22948c4aad468e71e1f354ee3913905105d69..c15709fcd85aeefcbd4d5f314b60879c9a7a779f 100644 (file)
@@ -20,8 +20,6 @@ Den weiteren Verlauf dieser Werbebuchung k&ouml;nnen Sie im Mitgliedsbereich unt
 
 {?URL?}/login.php
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 7cb97d45c8dc6788e61f2d25cebad434b4aa37ed..2c16bc10f363bdb375313803ac99f66e2e3a2b2a 100644 (file)
@@ -32,8 +32,6 @@ Diese Email ist kein SPAM! Sie erhalten diese Mail von unseren Mitgliedern aufgr
 
 {?MAIN_TITLE?} distanziert sich von jeglichen Inhalte und Links innerhalb dieser E-Mail.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 5931f30534e5221c45229310cea8d8b69c1d6af3..19a6c903c80792c5a7738d564190b6214e7603c9 100644 (file)
@@ -16,8 +16,6 @@ $content[text]
 
 Bitte beachten Sie beim n&auml;chsten Mal auf unsere AGBs, damit Ihnen diese Unangenehmlichkeiten erspart bleiben.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index e81a829f984473c18a646ce42d0aa2c5f811edbf..52d727f6254be2cecfbcf000f5082889635d5c5b 100644 (file)
@@ -11,8 +11,6 @@ Ihre Sponsor-Id war: $content[id]
 
 Wir w&uuml;nschen Ihnen weiterhin noch alles Gute und k&ouml;nnen Sie vielleicht irgentwann einmal wieder als Sponsor begr&uuml;ssen.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index 366b019a37061487ac38bd37e2bea2a864d3c736..35fc5d9e11ff0daab8ed525320113a06edbd2a89 100644 (file)
@@ -13,8 +13,6 @@ $content[reason]
 
 Sollten Sie damit nicht einverstanden sein, so melden Sie sich bitte bei uns ({?WEBMASTER?}). Wir kommen dann mit Ihnen bald in Kontakt.
 
-Vielen Dank.
-
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Team
 
index ec02f62bbfc962ceba1cbe9168c4e62b167c3ba9..c47b000fc32874c6d987e36e0a042b5782ad69ce 100644 (file)
@@ -6,40 +6,62 @@
                        <strong>{%message,ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_TITLE=$content[network_type_handler]%}</strong>
                </div>
                <div class="tiny">
-                       (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                       ({%network,generateMetworkReferralLinkById=%network_id%%})
                </div>
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
-               {--ADMIN_CONFIG_NETWORK_HANDLER_SET_ALL--}
+               <label for="set_all">{--ADMIN_CONFIG_NETWORK_HANDLER_SET_ALL--}</label>
                {%template,YesNoSelectionBox=set_all%}
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
-               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME--} ({%pipe,translateTimeUnit=$content[network_type_reload_time_unit]%})<br />
+               {%message,ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME=$content[network_type_reload_time_unit]%}<br />
                $content[network_max_reload_time]
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
-               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_WAITING_TIME--}<br />
+               <label for="network_min_waiting_time">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_WAITING_TIME--}</label>
                <input type="text" class="form_normal" name="network_min_waiting_time" size="5" maxlength="20" value="$content[network_min_waiting_time]" />
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
-               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_CLICKS--}<br />
+               <label for="network_max_waiting_time">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_WAITING_TIME--}</label>
+               <input type="text" class="form_normal" name="network_max_waiting_time" size="5" maxlength="20" value="$content[network_max_waiting_time]" />
+       </div>
+
+       <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+               <label for="network_min_remain_budget">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_BUDGET--}</label>
+               <input type="text" class="form_normal" name="network_min_remain_budget" size="5" maxlength="20" value="$content[network_min_remain_budget]" />
+       </div>
+
+       <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+               <label for="network_min_remain_clicks">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_CLICKS--}</label>
                <input type="text" class="form_normal" name="network_min_remain_clicks" size="5" maxlength="20" value="$content[network_min_remain_clicks]" />
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
-               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_PAYMENT--}<br />
+               <label for="network_min_payment">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_PAYMENT--}</label>
                <input type="text" class="form_normal" name="network_min_payment" size="7" maxlength="20" value="$content[network_min_payment]" />
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
-               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALLOW_EROTIC--}<br />
+               <label for="network_allow_erotic">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALLOW_EROTIC--}</label>
                <input type="text" class="form_normal" name="network_allow_erotic" size="5" maxlength="20" value="$content[network_allow_erotic]" />
        </div>
 
+       <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+               <label for="network_media_size">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_SIZE--}</label>
+               <input type="text" class="form_normal" name="network_media_size" size="5" maxlength="20" value="$content[network_media_size]" />
+       </div>
+
+       <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+               <label for="network_media_output">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_OUTPUT--}</label>
+               <select name="network_media_output" class="form_select" size="1">
+                       {%pipe,generateNetworkMediaOutputOptions=$content[network_media_output]%}
+               </select>
+       </div>
+
        <div class="table_footer">
                <input type="submit" class="form_submit" name="add" value="{--ADMIN_ADD_CONFIG_NETWORK_HANDLER_TYPE_FORM_SUBMIT--}" />
        </div>
index e4b097abc7efb08301374a1ba6e7a8bac6410d02..1dbed0e3e570d858842cab3c8e69db0933ef3e3a 100644 (file)
@@ -5,7 +5,7 @@
                <td class="table_header bottom" colspan="2" align="center">
                        <strong>{--ADMIN_ADD_NETWORK_ARRAY_TRANSLATION_TITLE--}</strong>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index c8ae95e316f2420ce883503d9da56d0115331714..ab43ea7f887d841988f07f09453afb692242676d 100644 (file)
@@ -5,7 +5,7 @@
                <td class="table_header bottom" colspan="2" align="center">
                        <strong>{--ADMIN_ADD_NETWORK_REQUEST_PARAMETER_TITLE--}</strong>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index 1afc270eeaea13d4ba9e0bea5a5e6ade82b03d74..16a6dbc7c9dfa5014290f7410fa4f425ba230f59 100644 (file)
@@ -5,7 +5,7 @@
                <td class="table_header bottom" colspan="2" align="center">
                        <strong>{--ADMIN_ADD_NETWORK_HANDLER_TYPE_TITLE--}</strong>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index 2a3750c7b6eb0e0326adcef47fb1a50880f1bfca..6b296424703ac9a24791e1cfc5d8dc3952c2b1ae 100644 (file)
@@ -5,7 +5,7 @@
                <td class="table_header bottom" colspan="2" align="center">
                        <strong>{--ADMIN_ADD_NETWORK_VCHECK_PARAMETER_TITLE--}</strong>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index ede91534c35d4802a9f2973441470bff4e2d164f..9d8097461ef355c6d356fdc24d48077c847a379f 100644 (file)
@@ -3,33 +3,8 @@
        <strong class="big">: : : {--ADMIN_MAIN_TITLE--} : : :</strong>
 </div>
 
-<div id="admin_error" class="ajax_error">
-       <div class="ajax_error_title">
-               <strong>{--ADMIN_AJAX_ERROR_TITLE--}</strong>
-       </div>
-       <div class="ajax_error_close">
-               <strong id="admin_error_close" style="padding-left:1.5px;cursor:pointer">X</strong>
-       </div>
-       <div style="clear:both"></div>
-       <div class="ajax_error_content" id="admin_error_content">
-               <!-- Content will be inserted here by AJAX //-->
-       </div>
-</div>
-
-<div id="admin_warning" class="ajax_warning">
-       <div class="ajax_warning_title">
-               <strong>{--ADMIN_AJAX_WARNING_TITLE--}</strong>
-       </div>
-       <div class="ajax_warning_close">
-               <strong id="admin_warning_close" style="padding-left:1.5px;cursor:pointer">X</strong>
-       </div>
-       <div style="clear:both"></div>
-       <div class="ajax_warning_content" id="admin_warning_content">
-               <!-- Content will be inserted here by AJAX //-->
-       </div>
-</div>
-
-<div style="clear:both"></div>
+<!-- Load AJAX windows //-->
+{%template,loadTemplate=admin_ajax_windows%}
 
 <div class="admin_content_container">
        <div id="admin_content" class="admin_content">
@@ -38,7 +13,7 @@
 </div>
 </div>
 
-<script type="text/javascript" src="{%url=js/ajax-loader.js%}"></script>
+<script type="text/javascript" src="{%url=js/ajax-loader.js?dummy=1%}{%ext,version=sql_patches%}"></script>
 <script type="text/javascript">
 <!--
 // These scripts shall be loaded
@@ -51,7 +26,6 @@ scripts[3] = '{%url,js=js/admin-common.js%}';
 // This must be the last one
 scripts[scripts.length] = '{%url,js=js.php?js=admin_ajax&admin_page=overview%}';
 
-// Do this only when all is ready
 // Load all scripts
 if (loadScripts(scripts) == true) {
        // Wait for loadScripts() finishing loading all scripts
diff --git a/templates/de/html/admin/admin_ajax_windows.tpl b/templates/de/html/admin/admin_ajax_windows.tpl
new file mode 100644 (file)
index 0000000..617b452
--- /dev/null
@@ -0,0 +1,53 @@
+<div id="admin_error" class="ajax_error" style="display: none;">
+       <div class="ajax_error_title">
+               <strong>{--ADMIN_AJAX_ERROR_TITLE--}</strong>
+       </div>
+       <div class="ajax_error_close">
+               <strong id="admin_error_close" style="padding-left:1.5px;cursor:pointer">X</strong>
+       </div>
+       <div style="clear:both"></div>
+       <div class="ajax_error_content" id="admin_error_content">
+               <!-- Content will be inserted here by AJAX //-->
+       </div>
+</div>
+
+<div id="admin_progress" class="ajax_progress" style="display: none;">
+       <div class="ajax_progress_title">
+               <strong>{--ADMIN_AJAX_PROGRESS_TITLE--}</strong>
+       </div>
+       <div class="ajax_progress_close">
+               <strong id="admin_progress_close" style="padding-left:1.5px;cursor:pointer">X</strong>
+       </div>
+       <div style="clear:both"></div>
+       <div class="ajax_progress_content" id="admin_progress_content">
+               <!-- Content will be inserted here by AJAX //-->
+       </div>
+</div>
+
+<div id="admin_success" class="ajax_success" style="display: none;">
+       <div class="ajax_success_title">
+               <strong>{--ADMIN_AJAX_SUCCESS_TITLE--}</strong>
+       </div>
+       <div class="ajax_success_close">
+               <strong id="admin_success_close" style="padding-left:1.5px;cursor:pointer">X</strong>
+       </div>
+       <div style="clear:both"></div>
+       <div class="ajax_success_content" id="admin_success_content">
+               <!-- Content will be inserted here by AJAX //-->
+       </div>
+</div>
+
+<div id="admin_warning" class="ajax_warning" style="display: none;">
+       <div class="ajax_warning_title">
+               <strong>{--ADMIN_AJAX_WARNING_TITLE--}</strong>
+       </div>
+       <div class="ajax_warning_close">
+               <strong id="admin_warning_close" style="padding-left:1.5px;cursor:pointer">X</strong>
+       </div>
+       <div style="clear:both"></div>
+       <div class="ajax_warning_content" id="admin_warning_content">
+               <!-- Content will be inserted here by AJAX //-->
+       </div>
+</div>
+
+<div style="clear:both"></div>
diff --git a/templates/de/html/admin/admin_config_network.tpl b/templates/de/html/admin/admin_config_network.tpl
new file mode 100644 (file)
index 0000000..7c6e7cc
--- /dev/null
@@ -0,0 +1,50 @@
+<div align="center">
+{%form,formMethodPost=modules.php?module=admin&amp;what=config_network%}
+<div class="table dashed">
+       <div class="table_header bottom">
+               <strong>{--ADMIN_CONFIG_NETWORK_TITLE--}</strong>
+       </div>
+
+       <fieldset id="config_network_cache">
+               <legend>{--ADMIN_CONFIG_NETWORK_CACHE_LEGEND--}</legend>
+
+               <div class="table_row">
+                       <label for="network_cache_refresh">{--ADMIN_CONFIG_NETWORK_CACHE_REFRESH--}</label>
+                       <div align="center">
+                               $content[network_cache_refresh]
+                       </div>
+               </div>
+       </fieldset>
+
+       <fieldset id="config_network_logging">
+               <legend>{--ADMIN_CONFIG_NETWORK_LOGGING_LEGEND--}</legend>
+
+               <div class="table_row">
+                       <label for="network_logging_purge">{--ADMIN_CONFIG_NETWORK_LOGGING_PURGE--}</label>
+                       <div align="center">
+                               $content[network_logging_purge]
+                       </div>
+               </div>
+
+               <div class="table_row">
+                       <label for="network_logging_purge">{--ADMIN_CONFIG_NETWORK_LOGGING_DEBUG--}</label>
+                       <div align="center">
+                               <select name="network_logging_debug" size="1" class="form_select">
+                                       <option value="Y"$content[network_logging_debug_y]>{--ADMIN_CONFIG_NETWORK_LOGGING_DEBUG_ENABLED--}</option>
+                                       <option value="N"$content[network_logging_debug_n]>{--ADMIN_CONFIG_NETWORK_LOGGING_DEBUG_DISABLED--}</option>
+                               </select>
+                       </div>
+               </div>
+       </fieldset>
+
+       <div class="table_footer top">
+               <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+               <input type="submit" class="form_submit" name="save_config" value="{--SAVE_SETTINGS--}" />
+       </div>
+</div>
+{%form_close%}
+</div>
+
+<div class="notice">
+       {--ADMIN_CONFIG_NETWORK_NOTICE--}
+</div>
index 2bccdcb8311c06b6fc8e2d6472e182c008675a9e..aba3386db101697878983d0dcc517f0cbb0ee846 100644 (file)
@@ -3,28 +3,28 @@
 <table border="0" cellspacing="0" cellpadding="0" class="table dashed">
 <tr>
        <td class="table_header bottom" colspan="2" align="center">
-               <strong>{%message,ADMIN_CONFIG_NETWORK_API_TITLE=<a href="$content[network_reflink]" target="_blank" title="$content[network_title]">$content[network_title]</a>%}</strong>
+               <strong>{%message,ADMIN_CONFIG_NETWORK_API_TITLE=$content[network_id]%}</strong>
        </td>
 </tr>
 
 <tr>
        <td align="center" class="bottom right" width="50%">
-               {--ADMIN_CONFIG_NETWORK_API_ENTER_AFFILIATE_ID--}<br />
+               <label for="network_api_affiliate_id">{--ADMIN_CONFIG_NETWORK_API_ENTER_AFFILIATE_ID--}</label>
                <input type="text" class="form_field" name="network_api_affiliate_id" size="5" maxlength="20" value="$content[network_api_affiliate_id]" />
        </td>
        <td align="center" class="bottom" width="50%">
-               {--ADMIN_CONFIG_NETWORK_API_ENTER_SITE_ID--}<br />
+               <label for="network_api_site_id">{--ADMIN_CONFIG_NETWORK_API_ENTER_SITE_ID--}</label>
                <input type="text" class="form_field" name="network_api_site_id" size="5" maxlength="20" value="$content[network_api_site_id]" />
        </td>
 </tr>
 
 <tr>
        <td align="center" class="bottom right" width="50%">
-               {--ADMIN_CONFIG_NETWORK_API_ENTER_API_PASSWORD--}<br />
+               <label for="network_api_password">{--ADMIN_CONFIG_NETWORK_API_ENTER_API_PASSWORD--}</label>
                <input type="text" class="form_field" name="network_api_password" size="20" maxlength="255" value="$content[network_api_password]" />
        </td>
        <td align="center" class="bottom" width="50%">
-               {--ADMIN_CONFIG_NETWORK_API_SELECT_API_ACTIVE--}<br />
+               <label for="network_api_active">{--ADMIN_CONFIG_NETWORK_API_SELECT_API_ACTIVE--}</label>
                <select class="form_field" name="network_api_active" size="1">
                        {%pipe,generateNetworkApiActiveOptions=$content[network_api_active]%}
                </select>
 
 <tr>
        <td align="center" class="bottom right" width="50%">
-               {--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_LINK--}<br />
-               <input type="text" class="form_field" name="network_api_referral_link" size="20" maxlength="255" value="$content[network_api_referral_link]" />
+               <label for="network_api_referral_link">{--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_LINK--}</label>
+               <input type="text" class="form_field" name="network_api_referral_link" size="25" maxlength="255" value="$content[network_api_referral_link]" />
        </td>
        <td align="center" class="bottom" width="50%">
-               {--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_BUTTON--}<br />
-               <input type="text" class="form_field" name="network_api_referral_button" size="20" maxlength="255" value="$content[network_api_referral_button]" />
+               <label for="network_api_referral_button">{--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_BUTTON--}</label>
+               <input type="text" class="form_field" name="network_api_referral_button" size="25" maxlength="255" value="$content[network_api_referral_button]" />
+       </td>
+</tr>
+
+<tr>
+       <td align="center" class="bottom right" width="50%">
+               <label for="">{--ADMIN_CONFIG_NETWORK_API_REMAINING_REQUESTS--}</label>
+               <strong>{%pipe,translateComma=$content[network_query_amount]%}</strong>
+               <input type="hidden" name="network_api_remaining_requests" value="$content[network_query_amount]" />
+       </td>
+       <td align="center" class="bottom" width="50%">
+               ---
        </td>
 </tr>
 
index 966e94042485407a885a0875b5dae3cc5b671fb0..a045ed2d3b461a2812af5c3d67dc3d141e8ce6eb 100644 (file)
@@ -6,7 +6,7 @@
                        <strong>{--ADMIN_CONFIG_NETWORK_HANDLER_TYPES_TITLE--}</strong>
                </div>
                <div class="tiny">
-                       (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                       ({%network,generateMetworkReferralLinkById=%network_id%%})
                </div>
        </td>
 </tr>
index 891e1dfea56976cbedd087faee9192263be282be..afc59dafa0c2ea05d378211553609f51890583e2 100644 (file)
@@ -7,7 +7,7 @@
                                <strong>{--ADMIN_DELETE_NETWORK_ARRAY_TRANSLATION_TITLE--}</strong>
                        </div>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index 2829502bfead838398b22f98b17545cea64a9b00..8bd2b53b55355476830d9ba93af43c394ec73b39 100644 (file)
@@ -7,7 +7,7 @@
                                <strong>{--ADMIN_DELETE_NETWORK_REQUEST_PARAMETER_TITLE--}</strong>
                        </div>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index b49730d6fb4a3dba10843c83d788798608d2ab95..a738cc2a628d7d15410a51071258cf7a02aff141 100644 (file)
@@ -7,7 +7,7 @@
                                <strong>{--ADMIN_DELETE_NETWORK_TYPE_HANDLER_TITLE--}</strong>
                        </div>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index e29b6d16c183dece59ac91d87d4b2c360e4e384b..fa7c7a09e115021560693c63150fd31a66c01e91 100644 (file)
@@ -16,7 +16,7 @@
 <tr>
        <td class="{%template,ColorSwitch%}" style="padding-left:5px">{--ADMIN_NETWORK_TYPE_HANDLER_CLICK_URL--}</td>
        <td class="{%template,ColorSwitch%}">
-               $content[network_type_click_url]
+               {%pipe,fixEmptyContentToDashes=$content[network_type_click_url]%}
        </td>
 </tr>
 
index 10ff1167fec6cc0f06a4f54460c9e6decd5df99d..62aa71a72930b8239fc42baea021c3d7167bfd57 100644 (file)
@@ -6,7 +6,7 @@
                        <strong>{%message,ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_TITLE=$content[network_type_handler]%}</strong>
                </div>
                <div class="tiny">
-                       (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                       ({%network,generateMetworkReferralLinkById=%network_id%%})
                </div>
        </div>
 
@@ -16,8 +16,8 @@
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
-               <label for="network_max_reload_time">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME--} ({--TIME_UNIT--})</label>
-               $content[network_max_reload_time] ({%pipe,translateTimeUnit=$content[network_type_reload_time_unit]%})
+               {%message,ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME=$content[network_type_reload_time_unit]%}<br />
+               $content[network_max_reload_time]
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
                <input type="text" class="form_normal" name="network_min_waiting_time" size="5" maxlength="20" value="$content[network_min_waiting_time]" />
        </div>
 
+       <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+               <label for="network_max_waiting_time">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_WAITING_TIME--}</label>
+               <input type="text" class="form_normal" name="network_max_waiting_time" size="5" maxlength="20" value="$content[network_max_waiting_time]" />
+       </div>
+
+       <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+               <label for="network_min_remain_budget">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_BUDGET--}</label>
+               <input type="text" class="form_normal" name="network_min_remain_budget" size="5" maxlength="20" value="{%pipe,translateFullComma=$content[network_min_remain_budget]%}" />
+       </div>
+
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
                <label for="network_min_remain_clicks">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_CLICKS--}</label>
-               <input type="text" class="form_normal" name="network_min_remain_clicks" size="5" maxlength="20" value="$content[network_min_remain_clicks]" />
+               <input type="text" class="form_normal" name="network_min_remain_clicks" size="5" maxlength="20" value="{%pipe,translateComma=$content[network_min_remain_clicks]%}" />
        </div>
 
        <div class="bottom" style="padding-top:3px;padding-bottom:3px">
                <input type="text" class="form_normal" name="network_allow_erotic" size="5" maxlength="20" value="$content[network_allow_erotic]" />
        </div>
 
+       <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+               <label for="network_media_size">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_SIZE--}</label>
+               <input type="text" class="form_normal" name="network_media_size" size="5" maxlength="20" value="$content[network_media_size]" />
+       </div>
+
+       <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+               <label for="network_media_output">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_OUTPUT--}</label>
+               <select name="network_media_output" class="form_select" size="1">
+                       {%pipe,generateNetworkMediaOutputOptions=$content[network_media_output]%}
+               </select>
+       </div>
+
        <div class="table_footer">
                <input type="hidden" name="network_data_id" value="$content[network_data_id]" />
                <input type="submit" class="form_submit" name="do_edit" value="{--ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_FORM_SUBMIT--}" />
index c93301c3bf387b1b9205056983cacdc414d68584..16c29fd43453584b0dcef49155b9085ebc09c9c9 100644 (file)
@@ -7,7 +7,7 @@
                                <strong>{--ADMIN_EDIT_NETWORK_ARRAY_TRANSLATION_TITLE--}</strong>
                        </div>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index 12d9cc900a79cabd3703e7774ebfe18f03470d2b..38c79c93844d3c025d41408ca9b8aaa60c012815 100644 (file)
@@ -7,7 +7,7 @@
                                <strong>{--ADMIN_EDIT_NETWORK_REQUEST_PARAMETER_TITLE--}</strong>
                        </div>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index 77ae06f91c148aa828a2b98dff7c89995f16c5da..af1f21a357e94bc2e2b36fee93ad89903d8b75c5 100644 (file)
@@ -7,7 +7,7 @@
                                <strong>{--ADMIN_EDIT_NETWORK_HANDLER_TYPES_TITLE--}</strong>
                        </div>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
index 270dcb89084f6c2e60430a76a741e6984fc9239d..1dab843c0a12734c5397d14796b4c04afecae65b 100644 (file)
@@ -7,7 +7,7 @@
                        <strong>{--ADMIN_LIST_NETWORK_ARRAY_TRANSLATION_TITLE--}</strong>
                </div>
                <div class="tiny">
-                       (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                       ({%network,generateMetworkReferralLinkById=%network_id%%})
                </div>
        </td>
 </tr>
index 41a3847c61bd05a45f0e98ce8982d6d0cfdd6772..41dc7fb519815e0761fa018ebc2cda2c4ecd3145 100644 (file)
@@ -6,6 +6,7 @@
                <strong>{--ADMIN_LIST_NEWORK_DATA_TITLE--}</strong>
        </td>
 </tr>
+
 <tr>
        <td height="25" colspan="3" class="header_column bottom right separator">&nbsp;</td>
        <td colspan="2" class="header_column bottom right" align="center">
@@ -13,6 +14,7 @@
        </td>
        <td colspan="3" class="header_column bottom separator">&nbsp;</td>
 </tr>
+
 <tr>
        <td align="center" class="header_column bottom right" height="25" width="30"><strong>{--ID_SELECT--}</strong></td>
        <td align="center" class="header_column bottom right"><strong>{--ADMIN_NETWORK_SHORT_NAME--}</strong></td>
@@ -23,7 +25,9 @@
        <td align="center" class="header_column bottom right"><strong>{--ADMIN_NETWORK_CHARSET--}</strong></td>
        <td align="center" class="header_column bottom"><strong>{--ADMIN_NETWORK_REQUIRE_ID_CARD_SHORT--}</strong></td>
 </tr>
+
 $content
+
 <tr>
        <td colspan="8" class="table_footer">
                <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
index e47dea204a905ac8fb1e271787e9b64d0ac514e6..576ddd6f9051feffa39dc77b28e763ce4f963961 100644 (file)
@@ -13,7 +13,7 @@
                 href="{%url=modules.php?module=admin&amp;what=list_network_error_codes&amp;network_id=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_ERROR_CODES_LINK_TITLE--}">EC</a>]
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               [<a href="$content[network_reflink]" target="_blank" title="$content[network_title]">$content[network_title]</a>]
+               [{%network,generateMetworkReferralLinkById=$content[network_id]%}]
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
                $content[network_data_separator]
diff --git a/templates/de/html/admin/admin_list_network_query_api.tpl b/templates/de/html/admin/admin_list_network_query_api.tpl
new file mode 100644 (file)
index 0000000..fa3688a
--- /dev/null
@@ -0,0 +1,52 @@
+<div align="center">
+<form>
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+<tr>
+       <td colspan="3" class="table_header">
+               <strong>{%message,ADMIN_QUERY_NETWORK_APIS_TITLE=$content[network_id]%}</strong>
+       </td>
+</tr>
+
+<tr>
+       <td align="center" class="header_column bottom right" height="25" width="30"><strong>{--ID_SELECT--}</strong></td>
+       <td align="center" class="header_column bottom right"><strong>{--ADMIN_NETWORK_TYPE_HANDLER--}</strong></td>
+       <td align="center" class="header_column bottom"><strong>{--ADMIN_QUERY_NETWORK_TYPE--}</strong></td>
+</tr>
+
+$content[rows]
+
+<tr>
+       <td colspan="3" class="table_footer">
+               <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
+               <input type="button" class="form_submit" value="{--ADMIN_ACTION_QUERY_NETWORK_SUBMIT--}" onclick="return doQueryNetwork($content[network_id]);" />
+       </td>
+</tr>
+</table>
+</form>
+</div>
+
+{%template,loadTemplate=admin_ajax_windows%}
+
+<script type="text/javascript" src="{%url=js/ajax-loader.js?dummy=1%}{%ext,version=sql_patches%}"></script>
+<script type="text/javascript">
+<!--
+// These scripts shall be loaded
+var scripts = new Array();
+scripts[0] = '{%url,js=js/ajax-common.js%}';
+scripts[1] = '{%jquery,js=ui%}';
+scripts[2] = '{%url,js=js/admin-common.js%}';
+
+// This must be the last one
+scripts[scripts.length] = '{%url,js=js/admin-network-query-api.js%}';
+
+// Load all scripts
+if (loadScripts(scripts) == true) {
+       // Wait for loadScripts() finishing loading all scripts
+       $().ready(function () {
+               // Register common things (close buttons, drag&drop)
+               registerCommons('admin');
+       });
+} // END - if
+
+//-->
+</script>
diff --git a/templates/de/html/admin/admin_list_network_query_api_row.tpl b/templates/de/html/admin/admin_list_network_query_api_row.tpl
new file mode 100644 (file)
index 0000000..d4df5ee
--- /dev/null
@@ -0,0 +1,12 @@
+<tr>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               <input type="checkbox" class="form_field disabled" disabled="disabled" title="{--UNFINISHED_FEATURE--} {--ID_SELECT--} $content[network_type_id]" name="sel[$content[network_type_id]]" value="1" checked="checked" />
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               {%network,translateNetworkTypeHandlerByTypeId,network_types=$content[network_type_id]%}
+       </td>
+       <td class="{%template,ColorSwitch%} bottom" align="center">
+               <input type="button" class="form_submit" value="{--ADMIN_ACTION_QUERY_NETWORK_TYPE_SUBMIT--}" onclick="return doQueryNetworkType($content[network_type_id], true);" />
+               <span id="status_$content[network_type_id]"></span>
+       </td>
+</tr>
index 624982fa9fda125e54959a8f70b30df3328bb534..b6e672ccba54efd1dac119fd98bc8d95e5d66250 100644 (file)
@@ -7,10 +7,11 @@
                                <strong>{--ADMIN_LIST_NETWORK_REQUEST_PARAMETER_TITLE--}</strong>
                        </div>
                        <div class="tiny">
-                               (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                               ({%network,generateMetworkReferralLinkById=%network_id%%})
                        </div>
                </td>
        </tr>
+
        <tr>
                <td align="center" class="header_column bottom right" height="25" width="30"><strong>{--ID_SELECT--}</strong></td>
                <td align="center" class="header_column bottom right"><strong>{--ADMIN_NETWORK_TYPE_HANDLER--}</strong></td>
@@ -18,7 +19,9 @@
                <td align="center" class="header_column bottom right"><strong>{--ADMIN_NETWORK_REQUEST_PARAMETER_VALUE--}</strong></td>
                <td align="center" class="header_column bottom"><strong>{--ADMIN_NETWORK_REQUEST_PARAMETER_DEFAULT--}</strong></td>
        </tr>
+
        $content[rows]
+
        <tr>
                <td colspan="5" class="table_footer">
                        <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
index 8670f3fae7537d168e90bbee73244e61160838e5..437ca58b227541662f2e753dfa21fec2b6c43314 100644 (file)
@@ -7,7 +7,7 @@
                        <strong>{--ADMIN_LIST_NETWORK_TYPE_HANDLER_TITLE--}</strong>
                </div>
                <div class="tiny">
-                       (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                       ({%network,generateMetworkReferralLinkById=%network_id%%})
                </div>
        </td>
 </tr>
index 739087a7b0585847672f3ca31968617dedbd8a03..ed355dd8a9272a151497282d5e8de5c752722766 100644 (file)
@@ -9,7 +9,7 @@
                $content[network_type_api_url]
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[network_type_click_url]
+               {%pipe,fixEmptyContentToDashes=$content[network_type_click_url]%}
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
                {%pipe,fixEmptyContentToDashes=$content[network_type_banner_url]%}
index 9fe0a9cde4094860d46b58c15b18e656d768b0ee..b1e6cd8c10c890defe5023ca0b4abc1093d0d036 100644 (file)
@@ -7,7 +7,7 @@
                        <strong>{--ADMIN_LIST_NETWORK_VCHECK_PARAMETER_TITLE--}</strong>
                </div>
                <div class="tiny">
-                       (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                       ({%network,generateMetworkReferralLinkById=%network_id%%})
                </div>
        </td>
 </tr>
@@ -20,6 +20,7 @@
 </tr>
 
 $content[rows]
+
 <tr>
        <td colspan="4" class="table_footer">
                <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
index 37283fdacb1678bf96a7eec2a6a7b710989916e4..d6266c25bde27bd1b3ae0833ba4a2edf8f28a902 100644 (file)
@@ -6,8 +6,8 @@
        </div>
 
        <div>
-               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME--} ({--TIME_UNIT--})<br />
-               <strong>{%pipe,createFancyTime=$content[network_max_reload_time]%} ({%pipe,translateTimeUnit=$content[network_type_reload_time_unit]%})</strong>
+               {%message,ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME=$content[network_type_reload_time_unit]%}<br />
+               <strong>{%pipe,createFancyTime=$content[network_max_reload_time]%}</strong>
        </div>
 
        <div>
                <strong>{%pipe,fixEmptyContentToDashes=$content[network_min_waiting_time]%}</strong>
        </div>
 
+       <div>
+               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_WAITING_TIME--}<br />
+               <strong>{%pipe,fixEmptyContentToDashes=$content[network_max_waiting_time]%}</strong>
+       </div>
+
+       <div>
+               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_BUDGET--}<br />
+               <strong>{%pipe,translateFullComma=$content[network_min_remain_budget]%}</strong>
+       </div>
+
        <div>
                {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_CLICKS--}<br />
                <strong>{%pipe,translateComma=$content[network_min_remain_clicks]%}</strong>
                <strong>{%pipe,translateFullComma=$content[network_min_payment]%}</strong>
        </div>
 
-       <div class="bottom">
+       <div>
                {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALLOW_EROTIC--}<br />
                <strong>{%pipe,fixEmptyContentToDashes=$content[network_allow_erotic]%}</strong>
        </div>
 
+       <div>
+               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_SIZE--}<br />
+               <strong>{%pipe,fixEmptyContentToDashes=$content[network_media_size]%}</strong>
+       </div>
+
+       <div class="bottom">
+               {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MEDIA_OUTPUT--}<br />
+               <strong>{%pipe,translateNetworkMediaOutputType=$content[network_media_output]%}</strong>
+       </div>
+
        <div class="table_footer">
                <input type="hidden" name="module" value="admin" />
                <input type="hidden" name="what" value="config_network_types" />
                <input type="hidden" name="network_id" value="$content[network_id]" />
                <input type="hidden" name="network_type_id" value="$content[network_type_id]" />
-               <input type="submit" class="form_submit" name="edit" value="{--ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_SUBMIT--}" />
+               <input type="submit" class="form_submit" name="edit" value="{%message,ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_SUBMIT=$content[network_type_handler]%}" />
        </div>
 </div>
 {%form_close%}
index 1016e0392626fab5221f589e144d9a2dc1c06e36..871e650acfc732c5f19c18396b1d065663f8942a 100644 (file)
@@ -61,7 +61,7 @@
 </div>
 </div>
 
-<script type="text/javascript" src="{%url=js/ajax-loader.js%}"></script>
+<script type="text/javascript" src="{%url=js/ajax-loader.js?dummy=1%}{%ext,version=sql_patches%}"></script>
 <script type="text/javascript">
 <!--
 // These scripts shall be loaded
index a573c0ac7bb5ac66948585f8478e0117d2ed318d..c5987ce3346ac030cdaca429233b5f447b6380df 100644 (file)
@@ -71,7 +71,7 @@
 </div>
 </div>
 
-<script type="text/javascript" src="{%url=js/ajax-loader.js%}"></script>
+<script type="text/javascript" src="{%url=js/ajax-loader.js?dummy=1%}{%ext,version=sql_patches%}"></script>
 <script type="text/javascript">
 <!--
 // These scripts shall be loaded
@@ -80,7 +80,7 @@ scripts[0] = '{%url,js=js/ajax-common.js%}';
 scripts[1] = '{%url,js=js/ajax-test.js%}';
 scripts[2] = '{%jquery,js=ui%}';
 
-// Do this only when all loaders are finished
+// Load all scripts
 if (loadScripts(scripts) == true) {
        // Wait for loadScripts() finishing loading all scripts
        $().ready(function () {
diff --git a/templates/de/html/js/js_ b/templates/de/html/js/js_
new file mode 100644 (file)
index 0000000..0f5e828
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * JavaScript for
+ * --------------------------------------------------------------------
+ * $Revision::                                                        $
+ * $Date::                                                            $
+ * $Tag:: 0.2.1-FINAL                                                 $
+ * $Author::                                                          $
+ * --------------------------------------------------------------------
+ * Copyright (c) 2003 - 2009 by Roland Haeder
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team
+ * For more information visit: http://mxchange.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA  02110-1301  USA
+ */
index b411d1769dbee70aac4bde1616852760f8267233..f8ddc6275c649ebcd30fb67583facbd250d321b2 100644 (file)
@@ -25,8 +25,9 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  * MA  02110-1301  USA
  */
-// Make both windows drag'n'drop-able
-$().ready(function() {
+
+// If all all has been loaded, initialize rest of it
+$().ready(function () {
        // Fade default content in
        window.setTimeout("requestAjaxContent('admin', 'admin_content', '$content[admin_page]', false)", 250);
 
@@ -42,7 +43,7 @@ $().ready(function() {
        $('a').each(function (i) {
                $(this).on('click', {index:i}, function (event) {
                        // Is there a valid index?
-                       if (indexTranslation[event.data.index] != null) {
+                       if (indexTranslation[event.data.index] !== null) {
                                // Prevent default action
                                event.preventDefault();
 
@@ -52,18 +53,8 @@ $().ready(function() {
                });
        });
 
-       //-----------------------------------------
-       //             Close buttons
-       //-----------------------------------------
-       $('#admin_error_close').click(function () {
-               // Close the window
-               closeErrorWindow('admin');
-       });
-
-       $('#admin_warning_close').click(function () {
-               // Close the window
-               closeWarningWindow('admin');
-       });
+       // Register common things (close buttons, drag&drop)
+       registerCommons('admin');
 
        //-----------------------------------------
        //             Save changes
@@ -72,15 +63,4 @@ $().ready(function() {
                // Save changes
                saveChanges('admin');
        });
-
-       //-----------------------------------------
-       //              Drag'N'Drop
-       //-----------------------------------------
-       $('#admin_warning').draggable({
-               opacity: 0.85
-       });
-
-       $('#admin_error').draggable({
-               opacity: 0.85
-       });
 });
index f1e7e39a16d33b5df3b7dbaea51e91df9bafd78f..f30a2614ada2fd317dc6bc770a09131acd9c83bb 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 // Initialize all navigations
-$().ready(function() {
+$().ready(function () {
        // Fade default content in
        window.setTimeout("requestAjaxContent('install', 'install_content', '$content[install_page]', true)", 250);
 
@@ -43,7 +43,7 @@ $().ready(function() {
        $('a').each(function (i) {
                $(this).on('click', {index:i}, function (event) {
                        // Is there a valid index?
-                       if (indexTranslation[event.data.index] != null) {
+                       if (indexTranslation[event.data.index] !== null) {
                                // Prevent default action
                                event.preventDefault();
 
@@ -53,18 +53,8 @@ $().ready(function() {
                });
        });
 
-       //-----------------------------------------
-       //             Close buttons
-       //-----------------------------------------
-       $('#install_error_close').click(function () {
-               // Close the window
-               closeErrorWindow('install');
-       });
-
-       $('#install_warning_close').click(function () {
-               // Close the window
-               closeWarningWindow('install');
-       });
+       // Register common things (close button, drap&drop)
+       registerCommons('install');
 
        //-----------------------------------------
        //           Footer navigation
@@ -96,19 +86,4 @@ $().ready(function() {
                // Save changes
                saveChanges('install');
        });
-
-       //-----------------------------------------
-       //              Drag'N'Drop
-       //-----------------------------------------
-       $('#install_progress').draggable({
-               opacity: 0.85
-       });
-
-       $('#install_warning').draggable({
-               opacity: 0.85
-       });
-
-       $('#install_error').draggable({
-               opacity: 0.85
-       });
 });
index 772f42fae859045b526cc4d0401268bd6a888a9e..848a71669a1bf5ced3ad748653e11ceb22c823c4 100644 (file)
@@ -35,7 +35,7 @@ var max         = document.getElementById('surfbar_max');
 var countDown   = null;
 
 function startStopCounter () {
-       if (countDown == null) {
+       if (countDown === null) {
                // Start counter
                document.getElementById('start').innerHTML = '{--MEMBER_SURFBAR_ACTION_PAUSE_SUBMIT--}';
                countDown = window.setInterval('startCounter()', 1000);
@@ -53,7 +53,7 @@ function init () {
 }
 
 function confirm () {
-       if (parent.surfbar_url != null) {
+       if (parent.surfbar_url !== null) {
                // Is in right frameset
                parent.surfbar_url.location.href = '{%url=surfbar.php?id=$content[url_id]&check=$content[check]&salt=$content[salt]%}';
        } else {
@@ -63,7 +63,7 @@ function confirm () {
 }
 
 function reloadSurfbar () {
-       if (parent.surfbar_stats != null) {
+       if (parent.surfbar_stats !== null) {
                // Is in right frameset
                parent.surfbar_stats.location.reload();
        } else {
@@ -74,7 +74,7 @@ function reloadSurfbar () {
 }
 
 function initCounter () {
-       if (parent.surfbar_url != null) {
+       if (parent.surfbar_url !== null) {
                // Is in right frameset
                parent.surfbar_url.location.href = '{%pipe,getSurfbarUrl=$content[url_id]%}';
        } else {
index 2e0962c6d8e9c2be38cec92730e77aa2dfebba57..4568ddec88900d17e7aeac864c47d6391edc97bd 100644 (file)
@@ -65,7 +65,7 @@ function ResetForm () {
        return false;
 }
 
-if ($content[limited] == true) {
+if ($content[limited] === true) {
        FocusLimitedYes();
 } else {
        FocusLimitedNo();
index b4e3edc1c5513a1780f95fd731fad0234836d276..e74e9c79793a01cc6a4e324810d36e888bb42689 100644 (file)
@@ -41,7 +41,7 @@ function showButton () {
 
 function counter () {
        if (countDown == 0) {
-               if ({%get=autostart%} == true) {
+               if ({%get=autostart%} === true) {
                        restart();
                } else {
                        showButton();
diff --git a/templates/de/html/select/select_network_configured_box.tpl b/templates/de/html/select/select_network_configured_box.tpl
new file mode 100644 (file)
index 0000000..0eaff2a
--- /dev/null
@@ -0,0 +1,23 @@
+<div align="center">
+{%form,formMethodGet=modules.php%}
+<input type="hidden" name="module" value="{%pipe,getModule%}" />
+<input type="hidden" name="what" value="{%pipe,getWhat%}" />
+<div class="table dashed">
+       <div class="table_header bottom">
+               <strong>{--ADMIN_SELECT_CONFIGURED_NETWORK_TITLE--}</strong>
+       </div>
+
+       <div class="bottom">
+               $content[selection_box]
+       </div>
+
+       <div class="table_footer">
+               <input type="submit" class="form_submit" value="{--ADMIN_CHOOSE_NETWORK_SUBMIT--}" />
+       </div>
+</div>
+{%form_close%}
+</div>
+
+<div class="notice">
+       {--ADMIN_SELECT_CONFIGURED_NETWORK_NOTICE--}
+</div>
diff --git a/templates/de/html/select/select_network_configured_option.tpl b/templates/de/html/select/select_network_configured_option.tpl
new file mode 100644 (file)
index 0000000..b2827ba
--- /dev/null
@@ -0,0 +1,3 @@
+<option value="$content[network_id]"$content[default]>
+       $content[network_title] ({%pipe,translateNetworkActivationStatus=$content[network_active]%}, {--ADMIN_NETWORK_REQUIRE_ID_CARD_SELECT--} -{%pipe,translateYesNo=$content[network_require_id_card]%}-)
+</option>
index 48fa59ff4745fed7a77e0fd46d3f5657b38a94ce..1cc389eb3773b14e32742c876165f8b5c8694f2b 100644 (file)
@@ -10,9 +10,7 @@
                </div>
 
                <div class="tiny">
-                       (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}"
-                        title="{%network,getNetworkDataById,network_title=%network_id%%}"
-                        target="_blank">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+                       ({%network,generateMetworkReferralLinkById=%network_id%})
                </div>
        </div>
 
diff --git a/templates/de/html/select/select_network_unconfigured_box.tpl b/templates/de/html/select/select_network_unconfigured_box.tpl
new file mode 100644 (file)
index 0000000..0379fb5
--- /dev/null
@@ -0,0 +1,23 @@
+<div align="center">
+{%form,formMethodGet=modules.php%}
+<input type="hidden" name="module" value="{%pipe,getModule%}" />
+<input type="hidden" name="what" value="{%pipe,getWhat%}" />
+<div class="table dashed">
+       <div class="table_header bottom">
+               <strong>{--ADMIN_SELECT_UNCONFIGURED_NETWORK_TITLE--}</strong>
+       </div>
+
+       <div class="bottom">
+               $content[selection_box]
+       </div>
+
+       <div class="table_footer">
+               <input type="submit" class="form_submit" value="{--ADMIN_CHOOSE_NETWORK_SUBMIT--}" />
+       </div>
+</div>
+{%form_close%}
+</div>
+
+<div class="notice">
+       {--ADMIN_SELECT_UNCONFIGURED_NETWORK_NOTICE--}
+</div>
diff --git a/templates/de/html/select/select_network_unconfigured_option.tpl b/templates/de/html/select/select_network_unconfigured_option.tpl
new file mode 100644 (file)
index 0000000..e4ee23e
--- /dev/null
@@ -0,0 +1,3 @@
+<option value="$content[network_id]"$content[default]>
+       $content[network_title] ({%pipe,translateNetworkActivationStatus=$content[network_active]%}, {--ADMIN_NETWORK_REQUIRE_ID_CARD_SELECT--} -{%pipe,translateYesNo=$content[network_require_id_card]%}-, {--ADMIN_NETWORK_QUERY_AMOUNT_SELECT--} {%pipe,translateNetworkQueryAmount=$content[network_query_amount]%})
+</option>
index f4b00bea79132163e54f83845aec8dfff3b0a9d7..7386298359da4d30a303e806edb299485b81aad3 100644 (file)
@@ -122,6 +122,13 @@ MA  02110-1301  USA
                </column-callback-list-entry>
        </column-callback-list>
        <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
        How the named column shall be logical linked to the above.
        //-->
        <where-condition type="string" name="" condition="" />
index 9539e61bec9fa94710d8289a4591b8ae91873136..b4836e9c411a11c377af8c9ba1ed7bf0abfa5959 100644 (file)
@@ -116,4 +116,15 @@ MA  02110-1301  USA
                        </callback-extra-parameter-list>
                </column-callback-list-entry>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
index 294082a9e77fe265265641ad16d760ae06340ec6..044cd419830f502712ce2b823643e789eef358de 100644 (file)
@@ -134,4 +134,15 @@ MA  02110-1301  USA
                        </callback-extra-parameter-list>
                </column-callback-list-entry>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
index 4d886e0ada7bb4747a90469a3e1e41fc7221101a..bb436ee3dd61923270d3d86a2e1ec149d454458e 100644 (file)
@@ -91,4 +91,15 @@ MA  02110-1301  USA
        //-->
        <column-callback-list>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
index e0a9af79feeefb45b33d582a66db716526d06ba2..f7d229320c23c52295c56be7cceffe5626c120bf 100644 (file)
@@ -113,4 +113,15 @@ MA  02110-1301  USA
                        </callback-extra-parameter-list>
                </column-callback-list-entry>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
diff --git a/templates/xml/admin/admin_list_network_query_api_config.xml b/templates/xml/admin/admin_list_network_query_api_config.xml
new file mode 100644 (file)
index 0000000..9305c8d
--- /dev/null
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+This template is for showing all configured networks with at least one type
+handler set up.
+
+@author                Roland Haeder <webmaster@mxchange.org>
+@version       0.2.1-FINAL
+@copyright     (c) 2003 - 2009 by Roland Haeder
+@copyright     (c) 2009 - 2012 by Mailer Developer Team
+@license       GNU GPL 2.0 or any newer version
+@link          http://mxchange.org
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+MA 02110-1301 USA
+//-->
+<admin-list-data>
+       <!--
+       Call-back function, the extracted data from this XML will then be re-read
+       from that function. The most common function this XML uses is
+       doGenericListEntries() so mostly you can leave this alone unless you have JOINs.
+       Use doGenericJoinedListEntries for JOINs:
+       //-->
+       <callback-function type="string" value="doGenericJoinedListEntries" />
+       <!--
+       Now we need information which template should be loaded and which functions
+       shall be called back. So lets start with the main list template. This mostly
+       requires no call-back function.
+       //-->
+       <list-template type="string" value="admin_list_network_query_api" />
+       <!--
+       The template for all rows, mostly this name has a '_row' suffix and again,
+       no call-back function is usually required.
+       //-->
+       <list-row-template type="string" value="admin_list_network_query_api_row" />
+       <!--
+       Message id to display if no entry could be found
+       //-->
+       <no-entry-found-message type="string" value="ADMIN_NETWORK_QUERY_API_404" />
+       <!--
+       The table(s) we shall grab the data from, all as list.
+       //-->
+       <data-tables>
+               <!--
+               A single table entry, with alias and without the configurable
+               _MYSQL_PREFIX. You can specify the table's name or alias later on.
+               //-->
+               <data-table type="string" alias="nac" value="network_api_config" />
+               <!--
+               A join condition to merge data from two or more tables, leave out
+               if you want to do simple SELECTs.
+               //-->
+               <table-join-condition>
+                       <!--
+                       The joining type, can be any valid SQL statement. Here it is an
+                       INNER JOIN (from both tables the data must exist).
+                       //-->
+                       <table-join-type type="INNER JOIN" />
+                       <!--
+                       Name (and alias) of the table we want to join
+                       //-->
+                       <table-join-name name="network_handler_config" alias="ntc" />
+                       <!--
+                       On which condition these tables should join
+                       //-->
+                       <join-on>
+                               <!--
+                               The left table, name can also be an alias, column is the column
+                               of the left table.
+                               //-->
+                               <join-on-left-table type="string" name="nac" column="network_id" />
+                               <!--
+                               Condition how these two tables should be joined.
+                               //-->
+                               <join-on-condition type="string" condition="EQUALS" />
+                               <!--
+                               And the corresponding right part.
+                               //-->
+                               <join-on-right-table type="string" name="ntc" column="network_id" />
+                       </join-on>
+               </table-join-condition>
+               <!--
+               Columns to perform the SELECT statement on, with alias and name plus which table.
+               //-->
+               <select-data-from-list>
+                       <!--
+                       A single entry with table name (can be left empty), value (must
+                       always be set), alias (again can be left empty) and SQL function
+                       (can also be left empty) which shall be applied on the column.
+                       //-->
+                       <select-data-from-list-entry type="string" table="nac" value="network_id" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="ntc" value="network_type_id" alias="" function="" />
+               </select-data-from-list>
+               <!--
+               And the column list to perform the WHERE statement on.
+               //-->
+               <where-select-from-list>
+                       <!--
+                       A single entry to perform the WHERE statement on:
+                       - table     = table name (or alias)
+                       - value     = column name
+                       - condition = look-up condition
+                       - look-for  = What to look for
+                       //-->
+                       <where-select-from-list-entry type="string" table="nac" value="network_id" condition="EQUALS" look-for="$content[network_id]" />
+               </where-select-from-list>
+               <!--
+               Columns to perform the ORDER BY statement (GROUP BY is not yet supported)
+               //-->
+               <order-by-list>
+                       <!--
+                       A single entry to perform the ORDER BY statement on, see above WHERE entry for details.
+                       //-->
+                       <order-by-list-entry type="string" table="nac" order="network_id" value="ASC" />
+               </order-by-list>
+       </data-tables>
+       <!--
+       List all column names from the 'select-data-from-list' node here, but now
+       with call-back informations. The list must only contain those entries where
+       a call-back function shall be called for.
+       //-->
+       <column-callback-list>
+       </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
+</admin-list-data>
index 68deb5eb228fea9756a7e3c51ddd1400a7a4227c..d612f26b0507d67011deae51c12493dfcd6b6696 100644 (file)
@@ -153,6 +153,13 @@ MA  02110-1301  USA
                </column-callback-list-entry>
        </column-callback-list>
        <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
        How the named column shall be logical linked to the above.
        //-->
        <where-condition type="string" name="history_userid" condition="AND" />
index e1ae325dd93b165030d915a24705c1f68c4cb614..8d4944e9cf01983e6111ad2324b4e4fc68f83e4d 100644 (file)
@@ -94,4 +94,15 @@ MA  02110-1301  USA
        //-->
        <column-callback-list>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
index 3cdf9c993e9b87af0b7a36e8f168b3cb743121cb..39e02565f7253b22e2a6758881abd0668e3a130e 100644 (file)
@@ -91,6 +91,13 @@ MA  02110-1301  USA
        <column-callback-list>
        </column-callback-list>
        <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
        How the named column shall be logical linked to the above.
        //-->
        <where-condition type="string" name="" condition="" />
index e8f907752ef5ffd10a6e1947ac7ca32181567b8f..bc02d57aac36c68dd76efeab8d6cd30733a21703 100644 (file)
@@ -115,4 +115,15 @@ MA  02110-1301  USA
                        </callback-extra-parameter-list>
                </column-callback-list-entry>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
index 4cd3591be11376f09552c43db208f0eb1c91188f..144d1529b552678817a7d9b8a0baf5591e68f63a 100644 (file)
@@ -93,4 +93,15 @@ MA  02110-1301  USA
        //-->
        <column-callback-list>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
index 944ff7b3160e3d2a7592bdd567bf958519eb2cf3..11ecd4f090bdd90f6529181fff8fd5e5bf22c840 100644 (file)
@@ -93,4 +93,15 @@ MA  02110-1301  USA
        //-->
        <column-callback-list>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
index a077eab92d3c424327e82f3b4c0f06f852c1a5df..7029016fc6a85dc151fd444a2fabac4dc8fd9842 100644 (file)
@@ -130,4 +130,15 @@ MA  02110-1301  USA
                        </callback-extra-parameter-list>
                </column-callback-list-entry>
        </column-callback-list>
+       <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
+       How the named column shall be logical linked to the above.
+       //-->
+       <where-condition type="string" name="" condition="" />
 </admin-list-data>
index 25f69552cc00ce54603a086d9615a753e4ef554e..83ad10ad0c942d47574b6c1df083d37296a4a942 100644 (file)
@@ -118,6 +118,13 @@ MA  02110-1301  USA
                </column-callback-list-entry>
        </column-callback-list>
        <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
        How the named column shall be logical linked to the above.
        //-->
        <where-condition type="string" name="" condition="" />
index c6da8862aead1ad61bbd443f1048f6c84a4f93c1..098505bdf02ff724d15da600ad67e24291cb6558 100644 (file)
@@ -121,6 +121,13 @@ MA  02110-1301  USA
                </column-callback-list-entry>
        </column-callback-list>
        <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
        How the named column shall be logical linked to the above.
        //-->
        <where-condition type="string" name="refid" condition="AND" />
index e0e63fb882a0e5c734bce8cd77a7540351d5925f..2de15d8bfc0697ace90724d4cc6fd4a26faa1b0d 100644 (file)
@@ -30,11 +30,9 @@ MA 02110-1301 USA
        Call-back function, the extracted data from this XML will then be re-read
        from that function. The most common function this XML uses is
        doGenericListEntries() so mostly you can leave this alone unless you have JOINs.
-       Use adminListJoinEntries for JOINs:
-       //-->
-       <callback-function type="string" value="doGenericListEntries" />
-       <!--
+       Use doGenericJoinedListEntries for JOINs:
        //-->
+       <callback-function type="string" value="doGenericJoinedListEntries" />
        <!--
        Now we need information which template should be loaded and which functions
        shall be called back. So lets start with the main list template. This mostly
@@ -85,7 +83,7 @@ MA 02110-1301 USA
                                <!--
                                Condition how these two tables should be joined.
                                //-->
-                               <join-on-condition type="string" conditiion="EQUALS" />
+                               <join-on-condition type="string" condition="EQUALS" />
                                <!--
                                And the corresponding right part.
                                //-->
@@ -128,7 +126,7 @@ MA 02110-1301 USA
                //-->
                <order-by-list>
                        <!--
-                       A isingle entry to perform the ORDER BY statement on, see above WHERE entry for details.
+                       A single entry to perform the ORDER BY statement on, see above WHERE entry for details.
                        //-->
                        <order-by-list-entry type="string" table="dt" order="userid" value="ASC" />
                        <!--
@@ -177,6 +175,13 @@ MA 02110-1301 USA
                </column-callback-list-entry>
        </column-callback-list>
        <!--
+       Extra parameters (2nd, 3rd, ...) for above call-back functions. If an array
+       is provided, we have more than two parameters to handle over to the
+       call-back function. See function handleExtraValues() for details.
+       //-->
+       <extra-parameter-list>
+       </extra-parameter-list>
+       <!--
        How the named column shall be logical linked to the above.
        //-->
        <where-condition type="string" name="status" condition="AND" />
index 174ee598f78d84688c542e04bb4ec217e29d2def..c7f4ba65db00686dc1b1262fb8a3fb67fcec67c3 100644 (file)
@@ -54,7 +54,7 @@ MA  02110-1301  USA
                A single table entry, with alias and without the configurable
                _MYSQL_PREFIX. You can specify the table's name or alias later on.
                //-->
-               <data-table type="string" alias="" value="user_booking" />
+               <data-table type="string" alias="" name="user_booking" />
                <!--
                Columns to perform the SELECT statement on, with alias and name plus which table.
                //-->
index 717e7b03b6ac123d3e7cf57393fc14eca8f145ee..c66919c43f9613e9113c01a2c5fff8640735b04c 100644 (file)
@@ -54,7 +54,7 @@ MA  02110-1301  USA
                A single table entry, with alias and without the configurable
                _MYSQL_PREFIX. You can specify the table's name or alias later on.
                //-->
-               <data-table type="string" alias="" value="user_subids" />
+               <data-table type="string" alias="" name="user_subids" />
                <!--
                Columns to perform the SELECT statement on, with alias and name plus which table.
                //-->
index d1ef38cad3719b48c75f4027b03a5254ef73d029..e5996c9937795dc1f98f83a079f9acde4fd7fb42 100644 (file)
@@ -54,7 +54,7 @@ MA  02110-1301  USA
                A single table entry, with alias and without the configurable
                _MYSQL_PREFIX. You can specify the table's name or alias later on.
                //-->
-               <data-table type="string" alias="" value="subid_log" />
+               <data-table type="string" alias="" name="subid_log" />
                <!--
                Columns to perform the SELECT statement on, with alias and name plus which table.
                //-->
index 2bb0811191bbe8c0f8270077dbcbd24852ec54ef..139011e7f1f0d9f349c167ecb996ed9c6c874c51 100644 (file)
@@ -2,8 +2,8 @@ ul#footernav {
        list-style-type: none;
        margin: 0px;
        padding: 5px;
-       background-color: #eeeeff;
-       border: 1px solid #000000;
+       background-color: #ddeedd;
+       border: 1px solid #009900;
        height: 23px;
        width: 680px;
        text-align: right;
@@ -25,11 +25,11 @@ ul#tabnav {
 ul#tabnav li {
        float: left;
        height: 21px;
-       background-color: #eeeeff;
+       background-color: #ddeedd;
        margin: 2px 2px 0px 2px;
-       border-top: 1px solid #000000;
-       border-left: 1px solid #000000;
-       border-right: 1px solid #000000;
+       border-top: 1px solid #009900;
+       border-left: 1px solid #009900;
+       border-right: 1px solid #009900;
        z-index: 1;
 }
 
@@ -54,13 +54,13 @@ ul#tabnav li.tab_disabled a:link, ul#tabnav li.tab_disabled a:visited {
 }
 
 ul#tabnav li.tab_enabled a:hover, ul#tabnav li.tab_active {
-       background-color: #ddddee;
-       color: #0a2d85;
+       background-color: #ccddcc;
+       color: #000099;
 }
 
 ul#tabnav a:hover {
        padding: 4px 4px 3px 4px;
-       border-bottom: 1px solid #000000;
+       border-bottom: 1px solid #000099;
 }
 
 ul#tabnav li.tab_active {
@@ -75,7 +75,7 @@ ul#tabnav li.tab_active {
        color: #e0e0e0;
 }
 
-.ajax_error, .ajax_warning, .ajax_progress {
+.ajax_error, .ajax_warning, .ajax_progress, .ajax_success {
        border: 1px solid #ffffff;
        z-index: 200;
        min-height: 10px;
@@ -96,10 +96,15 @@ ul#tabnav li.tab_active {
 }
 
 .ajax_progress {
-       background-color: #009900;
+       background-color: #0000aa;
 }
 
-.ajax_error_title, .ajax_warning_title, .ajax_progress_title {
+.ajax_success {
+       background-color: #00aa00;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_progress_title, .ajax_success_title {
+       text-align: center;
        border: 1px solid #ffffff;
        padding: 3px;
        color: #ffffff;
@@ -119,7 +124,11 @@ ul#tabnav li.tab_active {
        background-color: #0000dd;
 }
 
-.ajax_error_close, .ajax_warning_close, .ajax_progress_close {
+.ajax_success_title {
+       background-color: #00cc00;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_progress_close, .ajax_success_close {
        border: 1px solid #ffffff;
        float: right;
        width: 10px;
@@ -146,7 +155,15 @@ ul#tabnav li.tab_active {
        cursor: wait;
 }
 
-.ajax_error_content, .ajax_warning_content, .ajax_progress_content {
+.ajax_success_close {
+       color: #ffffff;
+       background-color: #00dd00;
+}
+
+.ajax_error_message {
+}
+
+.ajax_error_content, .ajax_warning_content, .ajax_progress_content, .ajax_success_content {
        width: 470px;
        border: 1px solid #ffffff;
        margin-top: 5px;
index 497a52214d4f07182fc01d4257d9ffec9a6dbfba..bfdda112da614d51d9b69c7a05901bdcccd6a23d 100644 (file)
@@ -718,9 +718,15 @@ li.listing {
        height: 28px;
 }
 
-.table_row label {
-       float: left;
+.table_row {
        width: 45%;
+       float: left;
+}
+
+label {
+       width: 100%;
+       float: left;
+       display: block;
 }
 
 .form_field {
index 6cda75032a479b83a6ddf4211043a5000593736d..139011e7f1f0d9f349c167ecb996ed9c6c874c51 100644 (file)
@@ -75,7 +75,7 @@ ul#tabnav li.tab_active {
        color: #e0e0e0;
 }
 
-.ajax_error, .ajax_warning, .ajax_progress {
+.ajax_error, .ajax_warning, .ajax_progress, .ajax_success {
        border: 1px solid #ffffff;
        z-index: 200;
        min-height: 10px;
@@ -99,7 +99,12 @@ ul#tabnav li.tab_active {
        background-color: #0000aa;
 }
 
-.ajax_error_title, .ajax_warning_title, .ajax_progress_title {
+.ajax_success {
+       background-color: #00aa00;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_progress_title, .ajax_success_title {
+       text-align: center;
        border: 1px solid #ffffff;
        padding: 3px;
        color: #ffffff;
@@ -119,7 +124,11 @@ ul#tabnav li.tab_active {
        background-color: #0000dd;
 }
 
-.ajax_error_close, .ajax_warning_close, .ajax_progress_close {
+.ajax_success_title {
+       background-color: #00cc00;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_progress_close, .ajax_success_close {
        border: 1px solid #ffffff;
        float: right;
        width: 10px;
@@ -146,10 +155,15 @@ ul#tabnav li.tab_active {
        cursor: wait;
 }
 
+.ajax_success_close {
+       color: #ffffff;
+       background-color: #00dd00;
+}
+
 .ajax_error_message {
 }
 
-.ajax_error_content, .ajax_warning_content, .ajax_progress_content {
+.ajax_error_content, .ajax_warning_content, .ajax_progress_content, .ajax_success_content {
        width: 470px;
        border: 1px solid #ffffff;
        margin-top: 5px;
index 08e997da50f9d8e60f59b47c51fa4d3863da123d..1367a8027b758efcabdaf5738955caf10eba3b3e 100644 (file)
@@ -760,9 +760,15 @@ li.listing {
        height: 28px;
 }
 
-.table_row label {
-       float: left;
+.table_row {
        width: 45%;
+       float: left;
+}
+
+label {
+       width: 100%;
+       float: left;
+       display: block;
 }
 
 .form_field {
index 4823c2b70301d0c1b83fd40f1fe0fdb621ec49d9..139011e7f1f0d9f349c167ecb996ed9c6c874c51 100644 (file)
@@ -2,8 +2,8 @@ ul#footernav {
        list-style-type: none;
        margin: 0px;
        padding: 5px;
-       background-color: #ffffcc;
-       border: 1px solid #880000;
+       background-color: #ddeedd;
+       border: 1px solid #009900;
        height: 23px;
        width: 680px;
        text-align: right;
@@ -25,11 +25,11 @@ ul#tabnav {
 ul#tabnav li {
        float: left;
        height: 21px;
-       background-color: #ffffcc;
+       background-color: #ddeedd;
        margin: 2px 2px 0px 2px;
-       border-top: 1px solid #880000;
-       border-left: 1px solid #880000;
-       border-right: 1px solid #880000;
+       border-top: 1px solid #009900;
+       border-left: 1px solid #009900;
+       border-right: 1px solid #009900;
        z-index: 1;
 }
 
@@ -39,6 +39,7 @@ ul#tabnav a {
 
 ul#tabnav li.tab_enabled a:link, ul#tabnav li.tab_enabled a:visited {
        display: block;
+       color: #2e51a9;
        border-bottom: 0px none;
        padding: 4px;
        height: 13px;
@@ -53,13 +54,13 @@ ul#tabnav li.tab_disabled a:link, ul#tabnav li.tab_disabled a:visited {
 }
 
 ul#tabnav li.tab_enabled a:hover, ul#tabnav li.tab_active {
-       background-color: #cccc99;
-       color: #550000;
+       background-color: #ccddcc;
+       color: #000099;
 }
 
 ul#tabnav a:hover {
        padding: 4px 4px 3px 4px;
-       border-bottom: 1px solid #880000;
+       border-bottom: 1px solid #000099;
 }
 
 ul#tabnav li.tab_active {
@@ -74,7 +75,7 @@ ul#tabnav li.tab_active {
        color: #e0e0e0;
 }
 
-.ajax_error, .ajax_warning, .ajax_progress {
+.ajax_error, .ajax_warning, .ajax_progress, .ajax_success {
        border: 1px solid #ffffff;
        z-index: 200;
        min-height: 10px;
@@ -95,10 +96,15 @@ ul#tabnav li.tab_active {
 }
 
 .ajax_progress {
-       background-color: #009900;
+       background-color: #0000aa;
 }
 
-.ajax_error_title, .ajax_warning_title, .ajax_progress_title {
+.ajax_success {
+       background-color: #00aa00;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_progress_title, .ajax_success_title {
+       text-align: center;
        border: 1px solid #ffffff;
        padding: 3px;
        color: #ffffff;
@@ -118,7 +124,11 @@ ul#tabnav li.tab_active {
        background-color: #0000dd;
 }
 
-.ajax_error_close, .ajax_warning_close, .ajax_progress_close {
+.ajax_success_title {
+       background-color: #00cc00;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_progress_close, .ajax_success_close {
        border: 1px solid #ffffff;
        float: right;
        width: 10px;
@@ -126,7 +136,6 @@ ul#tabnav li.tab_active {
        min-height: 10x;
        margin-left: 5px;
        padding: 3px;
-       color: #ffffff;
        text-align: center;
 }
 
@@ -146,10 +155,15 @@ ul#tabnav li.tab_active {
        cursor: wait;
 }
 
+.ajax_success_close {
+       color: #ffffff;
+       background-color: #00dd00;
+}
+
 .ajax_error_message {
 }
 
-.ajax_error_content, .ajax_warning_content, .ajax_progress_content {
+.ajax_error_content, .ajax_warning_content, .ajax_progress_content, .ajax_success_content {
        width: 470px;
        border: 1px solid #ffffff;
        margin-top: 5px;
index 007777528b99c8616a8023bcdff76e251e329b8d..dd3130db5fb8676467dd72b6ff10c8587ff228ca 100644 (file)
@@ -684,9 +684,15 @@ li.listing {
        height: 28px;
 }
 
-.table_row label {
-       float: left;
+.table_row {
        width: 45%;
+       float: left;
+}
+
+label {
+       width: 100%;
+       float: left;
+       display: block;
 }
 
 .form_field {
index 8a24ef78faf05b14974a19ba991afd6bc7ac51c3..139011e7f1f0d9f349c167ecb996ed9c6c874c51 100644 (file)
@@ -75,7 +75,7 @@ ul#tabnav li.tab_active {
        color: #e0e0e0;
 }
 
-.ajax_error, .ajax_warning, .ajax_progress {
+.ajax_error, .ajax_warning, .ajax_progress, .ajax_success {
        border: 1px solid #ffffff;
        z-index: 200;
        min-height: 10px;
@@ -99,7 +99,12 @@ ul#tabnav li.tab_active {
        background-color: #0000aa;
 }
 
-.ajax_error_title, .ajax_warning_title, .ajax_progress_title {
+.ajax_success {
+       background-color: #00aa00;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_progress_title, .ajax_success_title {
+       text-align: center;
        border: 1px solid #ffffff;
        padding: 3px;
        color: #ffffff;
@@ -119,7 +124,11 @@ ul#tabnav li.tab_active {
        background-color: #0000dd;
 }
 
-.ajax_error_close, .ajax_warning_close, .ajax_progress_close {
+.ajax_success_title {
+       background-color: #00cc00;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_progress_close, .ajax_success_close {
        border: 1px solid #ffffff;
        float: right;
        width: 10px;
@@ -127,7 +136,6 @@ ul#tabnav li.tab_active {
        min-height: 10x;
        margin-left: 5px;
        padding: 3px;
-       color: #ffffff;
        text-align: center;
 }
 
@@ -147,10 +155,15 @@ ul#tabnav li.tab_active {
        cursor: wait;
 }
 
+.ajax_success_close {
+       color: #ffffff;
+       background-color: #00dd00;
+}
+
 .ajax_error_message {
 }
 
-.ajax_error_content, .ajax_warning_content, .ajax_progress_content {
+.ajax_error_content, .ajax_warning_content, .ajax_progress_content, .ajax_success_content {
        width: 470px;
        border: 1px solid #ffffff;
        margin-top: 5px;
index cfa407e3ca4829c5483e11a69b69b70e4b7b68ff..c19b47910e93e55fd2312b8a80e1d74d64a1b22e 100644 (file)
@@ -576,9 +576,15 @@ li.listing {
        height: 28px;
 }
 
-.table_row label {
-       float: left;
+.table_row {
        width: 45%;
+       float: left;
+}
+
+label {
+       width: 100%;
+       float: left;
+       display: block;
 }
 
 .form_field {
index 68c5f0847b6a796994ef526c26209c734eaef1d1..139011e7f1f0d9f349c167ecb996ed9c6c874c51 100644 (file)
+ul#footernav {
+       list-style-type: none;
+       margin: 0px;
+       padding: 5px;
+       background-color: #ddeedd;
+       border: 1px solid #009900;
+       height: 23px;
+       width: 680px;
+       text-align: right;
+}
+
+ul#footernav li {
+       float: right;
+       margin: 2px 2px 2px 4px;
+}
+
+ul#tabnav {
+       list-style-type: none;
+       margin: 0px;
+       padding-left: 20px;
+       padding-bottom: 24px;
+       z-index: 0;
+}
+
+ul#tabnav li {
+       float: left;
+       height: 21px;
+       background-color: #ddeedd;
+       margin: 2px 2px 0px 2px;
+       border-top: 1px solid #009900;
+       border-left: 1px solid #009900;
+       border-right: 1px solid #009900;
+       z-index: 1;
+}
+
+ul#tabnav a {
+       z-index: 1;
+}
+
+ul#tabnav li.tab_enabled a:link, ul#tabnav li.tab_enabled a:visited {
+       display: block;
+       color: #2e51a9;
+       border-bottom: 0px none;
+       padding: 4px;
+       height: 13px;
+}
+
+ul#tabnav li.tab_disabled a:link, ul#tabnav li.tab_disabled a:visited {
+       display: block;
+       color: #e0e0e0;
+       border-bottom: 0px none;
+       padding: 4px;
+       height: 13px;
+}
+
+ul#tabnav li.tab_enabled a:hover, ul#tabnav li.tab_active {
+       background-color: #ccddcc;
+       color: #000099;
+}
+
+ul#tabnav a:hover {
+       padding: 4px 4px 3px 4px;
+       border-bottom: 1px solid #000099;
+}
+
+ul#tabnav li.tab_active {
+       padding-bottom: 0px;
+       border-bottom: 0px none;
+}
+
+.tabnav_disabled, .tabnav_disabled:visited {
+       cursor: default;
+       height: 7px;
+       background-color: #aaaaaa;
+       color: #e0e0e0;
+}
+
+.ajax_error, .ajax_warning, .ajax_progress, .ajax_success {
+       border: 1px solid #ffffff;
+       z-index: 200;
+       min-height: 10px;
+       overflow: visible;
+       padding: 5px;
+       display: none;
+       position: absolute;
+       top: 100px;
+       left: 26%;
+}
+
+.ajax_error {
+       background-color: #990000;
+}
+
+.ajax_warning {
+       background-color: #999900;
+}
+
+.ajax_progress {
+       background-color: #0000aa;
+}
+
+.ajax_success {
+       background-color: #00aa00;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_progress_title, .ajax_success_title {
+       text-align: center;
+       border: 1px solid #ffffff;
+       padding: 3px;
+       color: #ffffff;
+       float: left;
+       width: 461px;
+}
+
+.ajax_error_title {
+       background-color: #bb0000;
+}
+
+.ajax_warning_title {
+       background-color: #bbbb00;
+}
+
+.ajax_progress_title {
+       background-color: #0000dd;
+}
+
+.ajax_success_title {
+       background-color: #00cc00;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_progress_close, .ajax_success_close {
+       border: 1px solid #ffffff;
+       float: right;
+       width: 10px;
+       z-index: 200;
+       min-height: 10x;
+       margin-left: 5px;
+       padding: 3px;
+       text-align: center;
+}
+
+.ajax_error_close {
+       color: #ffffff;
+       background-color: #bb0000;
+}
+
+.ajax_warning_close {
+       color: #ffffff;
+       background-color: #bbbb00;
+}
+
+.ajax_progress_close {
+       color: #c0c0c0;
+       background-color: #0000dd;
+       cursor: wait;
+}
+
+.ajax_success_close {
+       color: #ffffff;
+       background-color: #00dd00;
+}
 
 .ajax_error_message {
 }
 
-.ajax_error_content, .ajax_warning_content {
+.ajax_error_content, .ajax_warning_content, .ajax_progress_content, .ajax_success_content {
        width: 470px;
        border: 1px solid #ffffff;
        margin-top: 5px;
        color: #ffffff;
        padding: 10px;
 }
+
+.field_changed {
+       border: 5px groove #bbbb00;
+}
+
+.field_changed:hover {
+       border: 5px groove #ffff00;
+}
+
+.field_failed {
+       border: 5px groove #bb0000;
+}
+
+.field_failed:hover {
+       border: 5px groove #ff0000;
+}
diff --git a/theme/ship-simu/css/ajax.css b/theme/ship-simu/css/ajax.css
new file mode 100644 (file)
index 0000000..139011e
--- /dev/null
@@ -0,0 +1,188 @@
+ul#footernav {
+       list-style-type: none;
+       margin: 0px;
+       padding: 5px;
+       background-color: #ddeedd;
+       border: 1px solid #009900;
+       height: 23px;
+       width: 680px;
+       text-align: right;
+}
+
+ul#footernav li {
+       float: right;
+       margin: 2px 2px 2px 4px;
+}
+
+ul#tabnav {
+       list-style-type: none;
+       margin: 0px;
+       padding-left: 20px;
+       padding-bottom: 24px;
+       z-index: 0;
+}
+
+ul#tabnav li {
+       float: left;
+       height: 21px;
+       background-color: #ddeedd;
+       margin: 2px 2px 0px 2px;
+       border-top: 1px solid #009900;
+       border-left: 1px solid #009900;
+       border-right: 1px solid #009900;
+       z-index: 1;
+}
+
+ul#tabnav a {
+       z-index: 1;
+}
+
+ul#tabnav li.tab_enabled a:link, ul#tabnav li.tab_enabled a:visited {
+       display: block;
+       color: #2e51a9;
+       border-bottom: 0px none;
+       padding: 4px;
+       height: 13px;
+}
+
+ul#tabnav li.tab_disabled a:link, ul#tabnav li.tab_disabled a:visited {
+       display: block;
+       color: #e0e0e0;
+       border-bottom: 0px none;
+       padding: 4px;
+       height: 13px;
+}
+
+ul#tabnav li.tab_enabled a:hover, ul#tabnav li.tab_active {
+       background-color: #ccddcc;
+       color: #000099;
+}
+
+ul#tabnav a:hover {
+       padding: 4px 4px 3px 4px;
+       border-bottom: 1px solid #000099;
+}
+
+ul#tabnav li.tab_active {
+       padding-bottom: 0px;
+       border-bottom: 0px none;
+}
+
+.tabnav_disabled, .tabnav_disabled:visited {
+       cursor: default;
+       height: 7px;
+       background-color: #aaaaaa;
+       color: #e0e0e0;
+}
+
+.ajax_error, .ajax_warning, .ajax_progress, .ajax_success {
+       border: 1px solid #ffffff;
+       z-index: 200;
+       min-height: 10px;
+       overflow: visible;
+       padding: 5px;
+       display: none;
+       position: absolute;
+       top: 100px;
+       left: 26%;
+}
+
+.ajax_error {
+       background-color: #990000;
+}
+
+.ajax_warning {
+       background-color: #999900;
+}
+
+.ajax_progress {
+       background-color: #0000aa;
+}
+
+.ajax_success {
+       background-color: #00aa00;
+}
+
+.ajax_error_title, .ajax_warning_title, .ajax_progress_title, .ajax_success_title {
+       text-align: center;
+       border: 1px solid #ffffff;
+       padding: 3px;
+       color: #ffffff;
+       float: left;
+       width: 461px;
+}
+
+.ajax_error_title {
+       background-color: #bb0000;
+}
+
+.ajax_warning_title {
+       background-color: #bbbb00;
+}
+
+.ajax_progress_title {
+       background-color: #0000dd;
+}
+
+.ajax_success_title {
+       background-color: #00cc00;
+}
+
+.ajax_error_close, .ajax_warning_close, .ajax_progress_close, .ajax_success_close {
+       border: 1px solid #ffffff;
+       float: right;
+       width: 10px;
+       z-index: 200;
+       min-height: 10x;
+       margin-left: 5px;
+       padding: 3px;
+       text-align: center;
+}
+
+.ajax_error_close {
+       color: #ffffff;
+       background-color: #bb0000;
+}
+
+.ajax_warning_close {
+       color: #ffffff;
+       background-color: #bbbb00;
+}
+
+.ajax_progress_close {
+       color: #c0c0c0;
+       background-color: #0000dd;
+       cursor: wait;
+}
+
+.ajax_success_close {
+       color: #ffffff;
+       background-color: #00dd00;
+}
+
+.ajax_error_message {
+}
+
+.ajax_error_content, .ajax_warning_content, .ajax_progress_content, .ajax_success_content {
+       width: 470px;
+       border: 1px solid #ffffff;
+       margin-top: 5px;
+       color: #ffffff;
+       padding: 10px;
+}
+
+.field_changed {
+       border: 5px groove #bbbb00;
+}
+
+.field_changed:hover {
+       border: 5px groove #ffff00;
+}
+
+.field_failed {
+       border: 5px groove #bb0000;
+}
+
+.field_failed:hover {
+       border: 5px groove #ff0000;
+}