From a2422f5be6191facba237f2899755578869fa6c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 7 Sep 2011 08:38:10 +0000 Subject: [PATCH] Extension ext-network continued: - Advertising network Ads2Earn added - pre-tag for exporting database entries moved to templates --- inc/extensions/ext-network.php | 197 +++++++++++++++++- inc/libs/network_functions.php | 24 ++- ...admin_export_network_array_translation.tpl | 4 +- .../html/admin/admin_export_network_data.tpl | 4 +- .../admin_export_network_request_params.tpl | 4 +- .../html/admin/admin_export_network_types.tpl | 4 +- 6 files changed, 217 insertions(+), 20 deletions(-) diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 9c2015be3e..0b8bfffa63 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -296,7 +296,8 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", ('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-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')"); +('adprovi', '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')"); // 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 @@ -480,6 +481,20 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (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')"); + // 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`) 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')"); + // 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'), @@ -1836,6 +1851,101 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (38, 386, 'reward', 'verguetung', NULL), (38, 386, 'sid', '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, 'id', 'id', NULL), +(39, 395, 'sid', 'sid', NULL), +(39, 395, 'password', 'pw', NULL), +(39, 395, 'reward', 'verguetung', NULL), +(39, 395, 'reload', 'reload', NULL), +(39, 395, 'remain', 'uebrig', NULL), +(39, 395, 'type', 'typ', 'klick'), +(39, 395, 'size', 'size', '468x60'), +(39, 395, 'minimum_stay', 'ma', NULL), +(39, 396, 'id', 'id', NULL), +(39, 396, 'sid', 'sid', NULL), +(39, 396, 'password', 'pw', NULL), +(39, 396, 'reward', 'verguetung', NULL), +(39, 396, 'reload', 'reload', NULL), +(39, 396, 'remain', 'uebrig', NULL), +(39, 396, 'type', 'typ', 'view'), +(39, 396, 'size', 'size', '468x60'), +(39, 396, 'minimum_stay', 'ma', NULL), +(39, 397, 'id', 'id', NULL), +(39, 397, 'sid', 'sid', NULL), +(39, 397, 'password', 'pw', NULL), +(39, 397, 'reward', 'verguetung', NULL), +(39, 397, 'reload', 'reload', NULL), +(39, 397, 'remain', 'remain', NULL), +(39, 397, 'type', 'typ', 'klick'), +(39, 398, 'id', 'id', NULL), +(39, 398, 'sid', 'sid', NULL), +(39, 398, 'password', 'pw', NULL), +(39, 398, 'reward', 'verguetung', NULL), +(39, 398, 'reload', 'reload', NULL), +(39, 398, 'remain', 'uebrig', NULL), +(39, 398, 'type', 'typ', 'view'), +(39, 399, 'id', 'id', NULL), +(39, 399, 'sid', 'sid', NULL), +(39, 399, 'password', 'pw', NULL), +(39, 399, 'reward', 'verguetung', NULL), +(39, 399, 'reload', 'reload', NULL), +(39, 399, 'remain', 'uebrig', NULL), +(39, 399, 'size', 'size', '468x60'), +(39, 399, 'minimum_stay', 'ma', NULL), +(39, 400, 'id', 'id', NULL), +(39, 400, 'sid', 'sid', NULL), +(39, 400, 'password', 'pw', NULL), +(39, 400, 'reload', 'reload', NULL), +(39, 400, 'reward', 'verguetung', NULL), +(39, 400, 'remain', 'uebrig', NULL), +(39, 400, 'minimum_stay', 'ma', NULL), +(39, 400, 'type', 'typ', 'html'), +(39, 401, 'id', 'id', NULL), +(39, 401, 'sid', 'sid', NULL), +(39, 401, 'password', 'pw', NULL), +(39, 401, 'reload', 'reload', NULL), +(39, 401, 'reward', 'verguetung', NULL), +(39, 401, 'remain', 'uebrig', NULL), +(39, 401, 'minimum_stay', 'ma', NULL), +(39, 401, 'type', 'typ', 'text'), +(39, 402, 'id', 'id', NULL), +(39, 402, 'sid', 'sid', NULL), +(39, 402, 'password', 'pw', NULL), +(39, 402, 'reward', 'verguetung', NULL), +(39, 402, 'reload', 'reload', NULL), +(39, 402, 'remain', 'uebrig', NULL), +(39, 402, 'type', 'typ', 'klick'), +(39, 402, 'size', 'size', '88x31'), +(39, 402, 'minimum_stay', 'ma', NULL), +(39, 403, 'id', 'id', NULL), +(39, 403, 'sid', 'sid', NULL), +(39, 403, 'password', 'pw', NULL), +(39, 403, 'reward', 'verguetung', NULL), +(39, 403, 'reload', 'reload', NULL), +(39, 403, 'remain', 'uebrig', NULL), +(39, 403, 'type', 'typ', 'view'), +(39, 403, 'size', 'size', '88x31'), +(39, 403, 'minimum_stay', 'ma', NULL), +(39, 404, 'id', 'id', NULL), +(39, 404, 'sid', 'sid', NULL), +(39, 404, 'password', 'pw', NULL), +(39, 404, 'reward', 'verguetung', NULL), +(39, 404, 'reload', 'reload', NULL), +(39, 404, 'remain', 'uebrig', NULL), +(39, 404, 'type', 'typ', 'klick'), +(39, 404, 'size', 'size', '120x600'), +(39, 404, 'minimum_stay', 'ma', NULL), +(39, 405, 'id', 'id', NULL), +(39, 405, 'sid', 'sid', NULL), +(39, 405, 'password', 'pw', NULL), +(39, 405, 'reward', 'verguetung', NULL), +(39, 405, 'reload', 'reload', NULL), +(39, 405, 'remain', 'uebrig', NULL), +(39, 405, 'type', 'typ', 'view'), +(39, 405, 'size', 'size', '120x600'), +(39, 405, 'minimum_stay', 'ma', NULL)"); + // Request parameters per type handler - Ads4 addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES (6, 14, 'currency', 'waehrung', NULL), @@ -4552,6 +4662,91 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", (38, 386, 9, 7), (38, 386, 40, 8)"); + // API array elements - Ads2Earn + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES +(39, 395, 1, 1), +(39, 395, 2, 2), +(39, 395, 3, 3), +(39, 395, 4, 4), +(39, 395, 5, 5), +(39, 395, 6, 6), +(39, 395, 8, 7), +(39, 395, 10, 8), +(39, 396, 1, 1), +(39, 396, 2, 2), +(39, 396, 3, 3), +(39, 396, 4, 4), +(39, 396, 5, 5), +(39, 396, 6, 6), +(39, 396, 8, 7), +(39, 396, 10, 8), +(39, 397, 1, 1), +(39, 397, 2, 2), +(39, 397, 9, 3), +(39, 397, 4, 4), +(39, 397, 5, 5), +(39, 397, 6, 6), +(39, 398, 1, 1), +(39, 398, 2, 2), +(39, 398, 9, 3), +(39, 398, 4, 4), +(39, 398, 5, 5), +(39, 398, 6, 6), +(39, 399, 1, 1), +(39, 399, 2, 2), +(39, 399, 3, 3), +(39, 399, 4, 4), +(39, 399, 5, 5), +(39, 399, 6, 6), +(39, 399, 10, 7), +(39, 399, 8, 8), +(39, 400, 1, 1), +(39, 400, 2, 2), +(39, 400, 4, 3), +(39, 400, 5, 4), +(39, 400, 6, 5), +(39, 400, 10, 6), +(39, 400, 9, 7), +(39, 401, 1, 1), +(39, 401, 2, 2), +(39, 401, 4, 3), +(39, 401, 5, 4), +(39, 401, 6, 5), +(39, 401, 10, 6), +(39, 401, 9, 7), +(39, 402, 1, 1), +(39, 402, 2, 2), +(39, 402, 3, 3), +(39, 402, 4, 4), +(39, 402, 5, 5), +(39, 402, 6, 6), +(39, 402, 8, 7), +(39, 402, 10, 8), +(39, 403, 1, 1), +(39, 403, 2, 2), +(39, 403, 3, 3), +(39, 403, 4, 4), +(39, 403, 5, 5), +(39, 403, 6, 6), +(39, 403, 8, 7), +(39, 403, 10, 8), +(39, 404, 1, 1), +(39, 404, 2, 2), +(39, 404, 3, 3), +(39, 404, 4, 4), +(39, 404, 5, 5), +(39, 404, 6, 6), +(39, 404, 8, 7), +(39, 404, 10, 8), +(39, 405, 1, 1), +(39, 405, 2, 2), +(39, 405, 3, 3), +(39, 405, 4, 4), +(39, 405, 5, 5), +(39, 405, 6, 6), +(39, 405, 8, 7), +(39, 405, 10, 8)"); + // API array elements - Ads4.de addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES (6, 14, 7, 1), diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index 92174639ca..0bf6cf625d 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -1747,7 +1747,8 @@ function doAdminNetworkExportNetworkData () { `network_request_type`, `network_charset`, `network_require_id_card`, - `network_query_amount` + `network_query_amount`, + `network_active` FROM `{?_MYSQL_PREFIX?}_network_data` ORDER BY @@ -1755,7 +1756,7 @@ ORDER BY __FUNCTION__, __LINE__); // Start an empty SQL query - $SQL = "
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`) VALUES\n";
+	$SQL = "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\n";
 
 	// Load all entries
 	while ($content = SQL_FETCHARRAY($result)) {
@@ -1769,11 +1770,12 @@ ORDER BY
 			$content['network_request_type'] . "', '" .
 			$content['network_charset'] . "', '" .
 			$content['network_require_id_card'] . "', " .
-			$content['network_query_amount'] . "),\n";
+			$content['network_query_amount'] . ", '" .
+			$content['network_active'] . "'),\n";
 	} // END - while
 
 	// Remove last commata and close braces
-	$SQL = substr($SQL, 0, -2) . '
'; + $SQL = substr($SQL, 0, -2); // Free result SQL_FREERESULT($result); @@ -1810,7 +1812,7 @@ ORDER BY ), __FUNCTION__, __LINE__); // Start an empty SQL query - $SQL = "
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\n";
+	$SQL = "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\n";
 
 	// Load all entries
 	while ($content = SQL_FETCHARRAY($result)) {
@@ -1832,11 +1834,11 @@ ORDER BY
 		}
 
 		// Add more
-		$SQL .= $content['network_type_reload_time_unit'] . "')\n";
+		$SQL .= ",'" . $content['network_type_reload_time_unit'] . "'),\n";
 	} // END - while
 
 	// Remove last commata and close braces
-	$SQL = substr($SQL, 0, -2) . '
'; + $SQL = substr($SQL, 0, -2); // Free result SQL_FREERESULT($result); @@ -1872,7 +1874,7 @@ ORDER BY ), __FUNCTION__, __LINE__); // Start an empty SQL query - $SQL = "
INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES\n";
+	$SQL = "INSERT INTO `{?_MYSQL_PREFIX?}_network_request_params` (`network_id`,`network_type_id`,`network_request_param_key`,`network_request_param_value`,`network_request_param_default`) VALUES\n";
 
 	// Load all entries
 	while ($content = SQL_FETCHARRAY($result)) {
@@ -1894,7 +1896,7 @@ ORDER BY
 	} // END - while
 
 	// Remove last commata and close braces
-	$SQL = substr($SQL, 0, -2) . '
'; + $SQL = substr($SQL, 0, -2); // Free result SQL_FREERESULT($result); @@ -1929,7 +1931,7 @@ ORDER BY ), __FUNCTION__, __LINE__); // Start an empty SQL query - $SQL = "
INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES\n";
+	$SQL = "INSERT INTO `{?_MYSQL_PREFIX?}_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES\n";
 
 	// Load all entries
 	while ($content = SQL_FETCHARRAY($result)) {
@@ -1942,7 +1944,7 @@ ORDER BY
 	} // END - while
 
 	// Remove last commata and close braces
-	$SQL = substr($SQL, 0, -2) . '
'; + $SQL = substr($SQL, 0, -2); // Free result SQL_FREERESULT($result); diff --git a/templates/de/html/admin/admin_export_network_array_translation.tpl b/templates/de/html/admin/admin_export_network_array_translation.tpl index 2cfec08031..e94c28a08f 100644 --- a/templates/de/html/admin/admin_export_network_array_translation.tpl +++ b/templates/de/html/admin/admin_export_network_array_translation.tpl @@ -6,10 +6,10 @@
- $content +
$content
-
- $content +
$content
-
- $content +
$content
-
- $content +
$content
-