Extension ext-network continued:
authorRoland Häder <roland@mxchange.org>
Wed, 7 Sep 2011 08:38:10 +0000 (08:38 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 7 Sep 2011 08:38:10 +0000 (08:38 +0000)
- Advertising network Ads2Earn added
- pre-tag for exporting database entries moved to templates

inc/extensions/ext-network.php
inc/libs/network_functions.php
templates/de/html/admin/admin_export_network_array_translation.tpl
templates/de/html/admin/admin_export_network_data.tpl
templates/de/html/admin/admin_export_network_request_params.tpl
templates/de/html/admin/admin_export_network_types.tpl

index 9c2015be3e9bb41f06b62014b74b386109fd369f..0b8bfffa637c5aec06a5c7551b5b5ab70cdd6e92 100644 (file)
@@ -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),
index 92174639cab7979bfe389342f1e06ff738b10145..0bf6cf625db3b30525cb1ad30666ca4bffa5f74e 100644 (file)
@@ -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 = "<pre>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`) 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\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) . '</pre>';
+       $SQL = substr($SQL, 0, -2);
 
        // Free result
        SQL_FREERESULT($result);
@@ -1810,7 +1812,7 @@ ORDER BY
                ), __FUNCTION__, __LINE__);
 
        // Start an empty SQL query
-       $SQL = "<pre>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`) 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`) 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) . '</pre>';
+       $SQL = substr($SQL, 0, -2);
 
        // Free result
        SQL_FREERESULT($result);
@@ -1872,7 +1874,7 @@ ORDER BY
                ), __FUNCTION__, __LINE__);
 
        // Start an empty SQL query
-       $SQL = "<pre>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\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) . '</pre>';
+       $SQL = substr($SQL, 0, -2);
 
        // Free result
        SQL_FREERESULT($result);
@@ -1929,7 +1931,7 @@ ORDER BY
                ), __FUNCTION__, __LINE__);
 
        // Start an empty SQL query
-       $SQL = "<pre>INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_network_array_translation` (`network_id`,`network_type_id`,`network_array_index`,`sort`) VALUES\n";
+       $SQL = "INSERT INTO `&#123;&#63;_MYSQL_PREFIX&#63;&#125;_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) . '</pre>';
+       $SQL = substr($SQL, 0, -2);
 
        // Free result
        SQL_FREERESULT($result);
index 2cfec08031d5d6d634944fd14ca5fc0980462fe0..e94c28a08f859b606acc0339d9574b5f016dc232 100644 (file)
@@ -6,10 +6,10 @@
 </div>
 
 <div class="bottom">
-       $content
+       <pre>$content</pre>
 </div>
 
-<div class="table_footer">
+<div class="table_footer notice">
        {--ADMIN_EXPORT_NETWORK_NOTE--}
 </div>
 
index e9ed6aacefce49d9bb60f0607a4d21476fe9170d..a734601ad8abc637d52c7eabc53e3ce085656f89 100644 (file)
@@ -6,10 +6,10 @@
 </div>
 
 <div class="bottom">
-       $content
+       <pre>$content</pre>
 </div>
 
-<div class="table_footer">
+<div class="table_footer notice">
        {--ADMIN_EXPORT_NETWORK_NOTE--}
 </div>
 
index 6f1472765665b5e34ebd5b70a5a2f13c920d4beb..db4af85d5689168eb1e6d38d8ed8d46154954551 100644 (file)
@@ -6,10 +6,10 @@
 </div>
 
 <div class="bottom">
-       $content
+       <pre>$content</pre>
 </div>
 
-<div class="table_footer">
+<div class="table_footer notice">
        {--ADMIN_EXPORT_NETWORK_NOTE--}
 </div>
 
index 67267738809cf6f4f9c583710280761e89fe1fde..e7f977ffa93637578132c1f0d6b0f21726aa5f30 100644 (file)
@@ -6,10 +6,10 @@
 </div>
 
 <div class="bottom">
-       $content
+       <pre>$content</pre>
 </div>
 
-<div class="table_footer">
+<div class="table_footer notice">
        {--ADMIN_EXPORT_NETWORK_NOTE--}
 </div>