From f99fabc783c022ddc5ca1f3e9c0d3ab89170dcf5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 12 Aug 2011 03:07:50 +0000 Subject: [PATCH] The 'network dailly free query amount' is now stored in general network data --- inc/databases.php | 4 +- inc/extensions/ext-network.php | 72 +++++++++---------- inc/functions.php | 36 +++++----- inc/language/network_de.php | 12 ++-- inc/libs/network_functions.php | 41 +++++++++-- inc/libs/register_functions.php | 12 ++-- inc/libs/sponsor_functions.php | 4 +- inc/libs/surfbar_functions.php | 2 +- inc/modules/admin/admin-inc.php | 4 +- inc/modules/admin/what-config_network_api.php | 3 +- inc/modules/admin/what-list_networks.php | 7 +- inc/wrapper-functions.php | 6 +- templates/de/html/admin/admin_add_network.tpl | 18 +++-- .../html/admin/admin_config_network_api.tpl | 6 -- .../html/admin/admin_delete_networks_row.tpl | 10 +-- .../de/html/admin/admin_edit_networks_row.tpl | 24 +++++-- .../de/html/admin/admin_list_networks.tpl | 10 +-- .../de/html/admin/admin_list_networks_row.tpl | 4 +- 18 files changed, 159 insertions(+), 116 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index 62ba20b9aa..8e42f45128 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -94,8 +94,8 @@ setConfigEntry('HTTP_EOL', "\r\n"); // CFG: DEBUG-SQL (if enabled and DEBUG_MODE is enabled all SQL queries will be logged to debug.log) setConfigEntry('DEBUG_SQL', 'N'); -// CFG: ENCRYPT-SEPERATOR -setConfigEntry('ENCRYPT_SEPERATOR', ':'); +// CFG: ENCRYPT-SEPARATOR +setConfigEntry('ENCRYPT_SEPARATOR', ':'); // Extra title is empty by default setExtraTitle(''); diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index bddbc9838d..9c20a05d06 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -80,11 +80,12 @@ switch (getExtensionMode()) { `network_short_name` VARCHAR(50) NOT NULL DEFAULT '', `network_title` VARCHAR(255) NOT NULL DEFAULT '', `network_reflink` VARCHAR(255) NOT NULL DEFAULT '', -`network_data_seperator` CHAR(4) NOT NULL DEFAULT '|', -`network_row_seperator` CHAR(4) NOT NULL DEFAULT '|', +`network_data_separator` CHAR(4) NOT NULL DEFAULT '|', +`network_row_separator` CHAR(4) NOT NULL DEFAULT '|', `network_request_type` ENUM('GET','POST') NOT NULL DEFAULT 'GET', `network_charset` VARCHAR(20) NOT NULL DEFAULT 'UTF-8', `network_require_id_card` ENUM('Y','N') NOT NULL DEFAULT 'N', +`network_query_amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`network_id`), UNIQUE (`network_short_name`)", 'Network data'); @@ -167,7 +168,6 @@ INDEX (`sort`)", `network_affiliate_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_api_password` VARCHAR(255) NOT NULL DEFAULT '', `network_site_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`network_query_amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_api_active` ENUM('Y','N') NOT NULL DEFAULT 'Y', PRIMARY KEY (`network_id`), UNIQUE INDEX `network_affiliate` (`network_id`,`network_affiliate_id`), @@ -271,39 +271,39 @@ UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)", ('REQUEST_PARAMETER_INCOMPLETE')"); // Sponsor networks - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_data` (`network_short_name`,`network_title`,`network_reflink`,`network_data_seperator`,`network_row_seperator`,`network_request_type`,`network_charset`,`network_require_id_card`) VALUES -('a3h', 'A3H', 'http://www.a3h.de?ref=1447', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('abiszed','AbisZED-Netz','http://abiszed-netz.de/index.php?ref=557', '|', '|', 'GET', 'WINDOWS-1252', 'Y'), -('admagnet', 'AD-Magnet', 'http://www.ad-magnet.de/index.php?ref=495', '|', '|', 'GET', 'ISO-8859-1', 'N'), -('adcocktail', 'ADCocktail', 'http://www.adcocktail.com/?rid=2596', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('adpaid', 'AdPaid', 'http://www.adpaid.de?ref=1464', '|', '|', 'GET', 'ISO-8859-1', 'N'), -('ads4', 'Ads4.de', 'http://www.ads4.de/?werber=Quix0r', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('ads4webbis', 'Ads4Webbis', 'http://www.ads4webbis.de?ref=835', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('ads4world', 'Ads4World', 'http://www.ads4world.de?ref=252', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('affiliblatt', 'Affiliblatt', 'http://www.Affiliblatt.de/?sid=MTAzNQ==&site=home', '|', '|', 'GET', 'UTF-8', 'N'), -('allads4you', 'AllAds4You', 'http://www.allads4you.de?ref=1146', '|', '|', 'GET', 'ISO-8859-1', 'N'), -('alster', 'Alster-Marketing', 'http://www.alstermarketing.de?ref=1851', '|', '|', 'GET', 'ISO-8859-16', 'N'), -('bonus', 'BonusSponsor', 'http://www.bonussponsor.de?ref=1286', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('fusion', 'Fusion-Ads', 'http://www.fusion-ads.de/?ref=84', '|', '|', 'GET', 'ISO-8859-1', 'N'), -('gigapromo', 'GigaPromo', 'http://www.gigapromo.de/index.php?ref=953', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('hpsponsor', 'HPSponsor', 'http://hpsponsor.at?ref=29', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('make-euros', 'Make-Euros.de', 'http://www.make-euros.de?ref=1184', '|', '|', 'GET', 'ISO-8859-1', 'N'), -('megad', 'Mega-Ad', 'http://www.mega-ad.de/?ref=303', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('power-promo', 'Power-Promo', 'http://www.power-promo.de?ref=1231', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('secash', 'SeCash', 'http://www.secash.de?ref=758', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('weltpromotion', 'Welt-Promotion', 'http://www.weltpromotion.de?ref=3', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('ultrapromo', 'UltraPROMO', 'http://www.ultrapromo.eu?ref=485', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('werbepartnercc', 'Der Werbepartner.cc', 'http://www.werbepartner.cc/sponsor/?ref=696', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('yoomedia', 'Yoo!Media Solutions', 'http://www.yoomedia.de?ref=1715', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('cityads', 'City-Ads', 'http://www.city-ads.de?ref=221', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('goldsponsor', 'Gold-Sponsor', 'http://www.gold-sponsor.de?ref=42', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('doubleads', 'doubleads.de', 'http://www.doubleads.de?ref=1063', '|', '|', 'GET', 'ISO-8859-1','Y'), -('vipads', 'VIPads.de', 'http://vipads.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N'), -('homeads', 'homeADS', 'http://www.homeads.de/?ref=1540', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('fucoexsponsor', 'FuCoExSponsor.net', 'http://fucoexsponsor.net/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N'), -('adconvention', 'AdConvention', 'http://www.adconvention.de?ref=233', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('ad-hit', 'Ad-Hit.de', 'http://www.ad-hit.de?ref=41', '|', '|', 'GET', 'WINDOWS-1252', 'N'), -('adcity', 'AdCity.eu', 'http://www.adcity.eu?ref=38', '|', '|', 'GET', 'WINDOWS-1252', 'N')"); + 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`) VALUES +('a3h', 'A3H', 'http://www.a3h.de?ref=1447', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('abiszed','AbisZED-Netz','http://abiszed-netz.de/index.php?ref=557', '|', '|', 'GET', 'WINDOWS-1252', 'Y', 0), +('admagnet', 'AD-Magnet', 'http://www.ad-magnet.de/index.php?ref=495', '|', '|', 'GET', 'ISO-8859-1', 'N', 0), +('adcocktail', 'ADCocktail', 'http://www.adcocktail.com/?rid=2596', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('adpaid', 'AdPaid', 'http://www.adpaid.de?ref=1464', '|', '|', 'GET', 'ISO-8859-1', 'N', 0), +('ads4', 'Ads4.de', 'http://www.ads4.de/?werber=Quix0r', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('ads4webbis', 'Ads4Webbis', 'http://www.ads4webbis.de?ref=835', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('ads4world', 'Ads4World', 'http://www.ads4world.de?ref=252', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('affiliblatt', 'Affiliblatt', 'http://www.Affiliblatt.de/?sid=MTAzNQ==&site=home', '|', '|', 'GET', 'UTF-8', 'N', 0), +('allads4you', 'AllAds4You', 'http://www.allads4you.de?ref=1146', '|', '|', 'GET', 'ISO-8859-1', 'N', 0), +('alster', 'Alster-Marketing', 'http://www.alstermarketing.de?ref=1851', '|', '|', 'GET', 'ISO-8859-16', 'N', 0), +('bonus', 'BonusSponsor', 'http://www.bonussponsor.de?ref=1286', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('fusion', 'Fusion-Ads', 'http://www.fusion-ads.de/?ref=84', '|', '|', 'GET', 'ISO-8859-1', 'N', 0), +('gigapromo', 'GigaPromo', 'http://www.gigapromo.de/index.php?ref=953', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('hpsponsor', 'HPSponsor', 'http://hpsponsor.at?ref=29', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('make-euros', 'Make-Euros.de', 'http://www.make-euros.de?ref=1184', '|', '|', 'GET', 'ISO-8859-1', 'N', 0), +('megad', 'Mega-Ad', 'http://www.mega-ad.de/?ref=303', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('power-promo', 'Power-Promo', 'http://www.power-promo.de?ref=1231', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('secash', 'SeCash', 'http://www.secash.de?ref=758', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('weltpromotion', 'Welt-Promotion', 'http://www.weltpromotion.de?ref=3', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('ultrapromo', 'UltraPROMO', 'http://www.ultrapromo.eu?ref=485', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('werbepartnercc', 'Der Werbepartner.cc', 'http://www.werbepartner.cc/sponsor/?ref=696', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('yoomedia', 'Yoo!Media Solutions', 'http://www.yoomedia.de?ref=1715', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('cityads', 'City-Ads', 'http://www.city-ads.de?ref=221', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('goldsponsor', 'Gold-Sponsor', 'http://www.gold-sponsor.de?ref=42', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('doubleads', 'doubleads.de', 'http://www.doubleads.de?ref=1063', '|', '|', 'GET', 'ISO-8859-1','Y', 0), +('vipads', 'VIPads.de', 'http://vipads.de/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 0), +('homeads', 'homeADS', 'http://www.homeads.de/?ref=1540', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('fucoexsponsor', 'FuCoExSponsor.net', 'http://fucoexsponsor.net/index.php?seite=anmeldung&ref=Quix0r', '|', '|', 'GET', 'ISO-8859-1', 'N', 0), +('adconvention', 'AdConvention', 'http://www.adconvention.de?ref=233', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('ad-hit', 'Ad-Hit.de', 'http://www.ad-hit.de?ref=41', '|', '|', 'GET', 'WINDOWS-1252', 'N', 0), +('adcity', 'AdCity.eu', 'http://www.adcity.eu?ref=38', '|', '|', 'GET', 'WINDOWS-1252', 'N', 200)"); // Network type handlers - A3H addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_types` (`network_type_id`,`network_id`,`network_type_handle`,`network_type_api_url`,`network_type_click_url`,`network_type_banner_url`) VALUES diff --git a/inc/functions.php b/inc/functions.php index becc231d6b..e80428210b 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -635,44 +635,44 @@ function array_pk_sort (&$array, $a_sort, $primary_key = '0', $order = -1, $nums // function generateRandomCode ($length, $code, $userid, $extraData = '') { // Build server string - $server = $_SERVER['PHP_SELF'] . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . getenv('SERVER_SOFTWARE') . getEncryptSeperator() . detectRealIpAddress() . getEncryptSeperator() . detectRemoteAddr(); + $server = $_SERVER['PHP_SELF'] . getEncryptSeparator() . detectUserAgent() . getEncryptSeparator() . getenv('SERVER_SOFTWARE') . getEncryptSeparator() . detectRealIpAddress() . getEncryptSeparator() . detectRemoteAddr(); // Build key string - $keys = getSiteKey() . getEncryptSeperator() . getDateKey(); + $keys = getSiteKey() . getEncryptSeparator() . getDateKey(); if (isConfigEntrySet('secret_key')) { - $keys .= getEncryptSeperator() . getSecretKey(); + $keys .= getEncryptSeparator() . getSecretKey(); } // END - if if (isConfigEntrySet('file_hash')) { - $keys .= getEncryptSeperator() . getFileHash(); + $keys .= getEncryptSeparator() . getFileHash(); } // END - if - $keys .= getEncryptSeperator() . getDateFromRepository(); + $keys .= getEncryptSeparator() . getDateFromRepository(); if (isConfigEntrySet('master_salt')) { - $keys .= getEncryptSeperator() . getMasterSalt(); + $keys .= getEncryptSeparator() . getMasterSalt(); } // END - if // Build string from misc data - $data = $code . getEncryptSeperator() . $userid . getEncryptSeperator() . $extraData; + $data = $code . getEncryptSeparator() . $userid . getEncryptSeparator() . $extraData; // Add more additional data if (isSessionVariableSet('u_hash')) { - $data .= getEncryptSeperator() . getSession('u_hash'); + $data .= getEncryptSeparator() . getSession('u_hash'); } // END - if // Add referal id, language, theme and userid - $data .= getEncryptSeperator() . determineReferalId(); - $data .= getEncryptSeperator() . getLanguage(); - $data .= getEncryptSeperator() . getCurrentTheme(); - $data .= getEncryptSeperator() . getMemberId(); + $data .= getEncryptSeparator() . determineReferalId(); + $data .= getEncryptSeparator() . getLanguage(); + $data .= getEncryptSeparator() . getCurrentTheme(); + $data .= getEncryptSeparator() . getMemberId(); // Calculate number for generating the code $a = $code + getConfig('_ADD') - 1; if (isConfigEntrySet('master_salt')) { // Generate hash with master salt from modula of number with the prime number and other data - $saltedHash = generateHash(($a % getPrime()) . getEncryptSeperator() . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . $a, getMasterSalt()); + $saltedHash = generateHash(($a % getPrime()) . getEncryptSeparator() . $server . getEncryptSeparator() . $keys . getEncryptSeparator() . $data . getEncryptSeparator() . getDateKey() . getEncryptSeparator() . $a, getMasterSalt()); } else { // Generate hash with "hash of site key" from modula of number with the prime number and other data - $saltedHash = generateHash(($a % getPrime()) . getEncryptSeperator() . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . $a, substr(sha1(getSiteKey()), 0, getSaltLength())); + $saltedHash = generateHash(($a % getPrime()) . getEncryptSeparator() . $server . getEncryptSeparator() . $keys . getEncryptSeparator() . $data . getEncryptSeparator() . getDateKey() . getEncryptSeparator() . $a, substr(sha1(getSiteKey()), 0, getSaltLength())); } // Create number from hash @@ -887,19 +887,19 @@ function generateHash ($plainText, $salt = '', $hash = true) { // When the salt is empty build a new one, else use the first x configured characters as the salt if (empty($salt)) { // Build server string for more entropy - $server = $_SERVER['PHP_SELF'] . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . getenv('SERVER_SOFTWARE') . getEncryptSeperator() . detectRealIpAddress() . getEncryptSeperator() . detectRemoteAddr(); + $server = $_SERVER['PHP_SELF'] . getEncryptSeparator() . detectUserAgent() . getEncryptSeparator() . getenv('SERVER_SOFTWARE') . getEncryptSeparator() . detectRealIpAddress() . getEncryptSeparator() . detectRemoteAddr(); // Build key string - $keys = getSiteKey() . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . getSecretKey() . getEncryptSeperator() . getFileHash() . getEncryptSeperator() . getDateFromRepository() . getEncryptSeperator() . getMasterSalt(); + $keys = getSiteKey() . getEncryptSeparator() . getDateKey() . getEncryptSeparator() . getSecretKey() . getEncryptSeparator() . getFileHash() . getEncryptSeparator() . getDateFromRepository() . getEncryptSeparator() . getMasterSalt(); // Additional data - $data = $plainText . getEncryptSeperator() . uniqid(mt_rand(), true) . getEncryptSeperator() . time(); + $data = $plainText . getEncryptSeparator() . uniqid(mt_rand(), true) . getEncryptSeparator() . time(); // Calculate number for generating the code $a = time() + getConfig('_ADD') - 1; // Generate SHA1 sum from modula of number and the prime number - $sha1 = sha1(($a % getPrime()) . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . $a); + $sha1 = sha1(($a % getPrime()) . $server . getEncryptSeparator() . $keys . getEncryptSeparator() . $data . getEncryptSeparator() . getDateKey() . getEncryptSeparator() . $a); //* DEBUG: */ debugOutput('SHA1=' . $sha1.' ('.strlen($sha1).')
'); $sha1 = scrambleString($sha1); //* DEBUG: */ debugOutput('Scrambled=' . $sha1.' ('.strlen($sha1).')
'); diff --git a/inc/language/network_de.php b/inc/language/network_de.php index 8730ab172f..0889814a6f 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -161,16 +161,17 @@ addMessages(array( 'ADMIN_NETWORK_SHORT_NAME' => "Kurzname", 'ADMIN_NETWORK_TITLE' => "Linktitel", 'ADMIN_NETWORK_REFERAL_LINK' => "Referal-Link", - 'ADMIN_NETWORK_DATA_SEPERATOR' => "Trennsymbol f. Daten", - 'ADMIN_NETWORK_ROW_SEPERATOR' => "Trennzeichen f. Zeilen", + 'ADMIN_NETWORK_DATA_SEPARATOR' => "Trennsymbol f. Daten", + 'ADMIN_NETWORK_ROW_SEPARATOR' => "Trennzeichen f. Zeilen", 'ADMIN_NETWORK_REQUEST_TYPE' => "HTTP-Abfragetyp", 'ADMIN_NETWORK_REQUEST_TYPE_GET' => "GET (meistens richtig)", 'ADMIN_NETWORK_REQUEST_TYPE_POST' => "POST (mehr Datenschutz)", 'ADMIN_NETWORK_CHARSET' => "Zeichensatz", 'ADMIN_NETWORK_REQUIRE_ID_CARD' => "ID verlangt?", - 'ADMIN_NETWORK_SEPERATOR' => "Trennzeichen", - 'ADMIN_NETWORK_DATA_SEPERATOR2' => "Daten", - 'ADMIN_NETWORK_ROW_SEPERATOR2' => "Zeilen", + 'ADMIN_NETWORK_SEPARATOR' => "Trennzeichen", + 'ADMIN_NETWORK_DATA_SEPARATOR2' => "Daten", + 'ADMIN_NETWORK_ROW_SEPARATOR2' => "Zeilen", + 'ADMIN_NETWORK_QUERY_AMOUNT' => "Freie API-Abfragen täglich", // - Advertise type 'ADMIN_NETWORK_TYPES_HANDLE' => "Werbeart-Handler", 'ADMIN_NETWORK_TYPES_API_URL' => "API-URL der Werbeart", @@ -205,7 +206,6 @@ addMessages(array( 'ADMIN_CONFIG_NETWORK_API_ENTER_AFFILIATE_ID' => "Ihre Affiliate oder User-Id:", 'ADMIN_CONFIG_NETWORK_API_ENTER_API_PASSWORD' => "Ihr Interface-Kennwort:", 'ADMIN_CONFIG_NETWORK_API_ENTER_SITE_ID' => "Webseiten-Id Ihres {?MT_WORD2?}:", - 'ADMIN_CONFIG_NETWORK_API_ENTER_QUERY_AMOUNT' => "Freie Interface-Abfragen täglich:", 'ADMIN_CONFIG_NETWORK_API_SELECT_API_ACTIVE' => "Soll dieses Interface abgefragt werden?", 'ADMIN_CONFIG_NETWORK_API_TITLE' => "Einrichtung des API-Zugangs zum Werbenetzwerk %s:", 'ADMIN_CONFIG_NETWORK_API_SAVE_BUTTON' => "API-Konfiguration speichern", diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index cca701ce44..6d6e3b7e66 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -173,7 +173,16 @@ function getNetworkDataById ($networkId, $column = '') { // Query for the network data $result = SQL_QUERY_ESC("SELECT - `network_id`,`network_short_name`,`network_title`,`network_reflink`,`network_data_seperator`,`network_row_seperator`,`network_request_type`,`network_charset` + `network_id`, + `network_short_name`, + `network_title`, + `network_reflink`, + `network_data_separator`, + `network_row_separator`, + `network_request_type`, + `network_charset`, + `network_require_id_card`, + `network_query_amount` FROM `{?_MYSQL_PREFIX?}_network_data` WHERE @@ -219,8 +228,20 @@ function getNetworkDataByTypeId ($networkId, $column = '') { // 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_seperator`, d.`network_row_seperator`, d.`network_request_type`, d.`network_charset`, - t.`network_type_handle`, t.`network_type_api_url`, t.`network_type_click_url`, t.`network_type_banner_url` + 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_handle`, + t.`network_type_api_url`, + t.`network_type_click_url`, + t.`network_type_banner_url` FROM `{?_MYSQL_PREFIX?}_network_data` AS d LEFT JOIN @@ -265,7 +286,12 @@ function getNetworkTypeDataById ($networkId) { // Query for the network data $result = SQL_QUERY_ESC("SELECT - `network_type_id`,`network_id`,`network_type_handle`,`network_type_api_url`,`network_type_click_url`,`network_type_banner_url` + `network_type_id` + `network_id`, + `network_type_handle`, + `network_type_api_url`, + `network_type_click_url`, + `network_type_banner_url` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE @@ -299,7 +325,12 @@ function getNetworkRequestParamsDataById ($networkId) { // Query for the network data $result = SQL_QUERY_ESC("SELECT - `network_param_id`,`network_id`,`network_type_id`,`request_param_key`,`request_param_value`,`request_param_default` + `network_param_id`, + `network_id`, + `network_type_id`, + `request_param_key`, + `request_param_value`, + `request_param_default` FROM `{?_MYSQL_PREFIX?}_network_request_params` WHERE diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 027d6459aa..16d16fd7aa 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -262,16 +262,16 @@ function doRegistration () { // Generate hash which will be inserted into confirmation mail $hash = generateHash(sha1( // Get total confirmed, ... - getTotalConfirmedUser() . getEncryptSeperator() . + getTotalConfirmedUser() . getEncryptSeparator() . // ... unconfirmed ... - getTotalUnconfirmedUser() . getEncryptSeperator() . + getTotalUnconfirmedUser() . getEncryptSeparator() . // ... and locked users! - getTotalLockedUser() . getEncryptSeperator() . + getTotalLockedUser() . getEncryptSeparator() . postRequestElement('month') . '-' . postRequestElement('day') . '-' . - postRequestElement('year') . getEncryptSeperator() . - detectServerName() . getEncryptSeperator() . - detectRemoteAddr() . getEncryptSeperator() . + postRequestElement('year') . getEncryptSeparator() . + detectServerName() . getEncryptSeparator() . + detectRemoteAddr() . getEncryptSeparator() . detectUserAgent() . '/' . getSiteKey() . '/' . getDateKey() . '/' . diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 5f9ff596a2..7c48106f35 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -157,7 +157,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() // Generate hash code $DATA['keys'][] = 'hash'; // @TODO Rewrite this to API function - $DATA['values'][] = md5(session_id() . getEncryptSeperator() . $postData['email'] . getEncryptSeperator() . detectRemoteAddr() . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . time()); + $DATA['values'][] = md5(session_id() . getEncryptSeparator() . $postData['email'] . getEncryptSeparator() . detectRemoteAddr() . getEncryptSeparator() . detectUserAgent() . getEncryptSeparator() . time()); $DATA['keys'][] = 'remote_addr'; $DATA['values'][] = detectRemoteAddr(); } @@ -428,7 +428,7 @@ function saveSponsorData ($postData, $content) { // Generate hash code // @TODO Rewrite this to API function - $HASH = md5(session_id() . getEncryptSeperator() . $postData['email'] . getEncryptSeperator() . detectRemoteAddr() . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . time()); + $HASH = md5(session_id() . getEncryptSeparator() . $postData['email'] . getEncryptSeparator() . detectRemoteAddr() . getEncryptSeparator() . detectUserAgent() . getEncryptSeparator() . time()); $DATA[] = $HASH; } // END - if } // END - if diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index f1b2cb882b..7b555fc471 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -1032,7 +1032,7 @@ function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') { } // Hash it with md5() and salt it with the random string - $hashedCode = generateHash(md5($urlId . getEncryptSeperator() . getMemberId()), SURFBAR_GET_SALT()); + $hashedCode = generateHash(md5($urlId . getEncryptSeparator() . getMemberId()), SURFBAR_GET_SALT()); // Finally encrypt it PGP-like and return it $valHashedCode = encodeHashForCookie($hashedCode); diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 395535e502..a361b092f1 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -1474,7 +1474,7 @@ function sendAdminPasswordResetLink ($email) { SQL_FREERESULT($result); // Generate hash for reset link - $content['hash'] = generateHash(getUrl() . getEncryptSeperator() . $content['id'] . getEncryptSeperator() . $content['login'] . getEncryptSeperator() . $content['password'], substr($content['password'], getSaltLength())); + $content['hash'] = generateHash(getUrl() . getEncryptSeparator() . $content['id'] . getEncryptSeparator() . $content['login'] . getEncryptSeparator() . $content['password'], substr($content['password'], getSaltLength())); // Remove some data unset($content['id']); @@ -1505,7 +1505,7 @@ function adminResetValidateHashLogin ($hash, $login) { $content = SQL_FETCHARRAY($result); // Generate hash again - $hashFromData = generateHash(getUrl() . getEncryptSeperator() . $content['id'] . getEncryptSeperator() . $login . getEncryptSeperator() . $content['password'], substr($content['password'], getSaltLength())); + $hashFromData = generateHash(getUrl() . getEncryptSeparator() . $content['id'] . getEncryptSeparator() . $login . getEncryptSeparator() . $content['password'], substr($content['password'], getSaltLength())); // Does both match? $valid = ($hash == $hashFromData); diff --git a/inc/modules/admin/what-config_network_api.php b/inc/modules/admin/what-config_network_api.php index 60a1931cfc..8af40d0128 100644 --- a/inc/modules/admin/what-config_network_api.php +++ b/inc/modules/admin/what-config_network_api.php @@ -63,10 +63,10 @@ if (isGetRequestElementSet('network')) { `network_short_name`, `network_title`, `network_reflink`, + `network_query_amount`, NULL AS `network_affiliate_id`, NULL AS `network_api_password`, NULL AS `network_site_id`, - NULL AS `network_query_amount`, NULL AS `network_api_active` FROM `{?_MYSQL_PREFIX?}_network_data` @@ -87,7 +87,6 @@ LIMIT 1', `network_affiliate_id`, `network_api_password`, `network_site_id`, - `network_query_amount`, `network_api_active` FROM `{?_MYSQL_PREFIX?}_network_api_config` diff --git a/inc/modules/admin/what-list_networks.php b/inc/modules/admin/what-list_networks.php index d34edaa3c8..8a686a1002 100644 --- a/inc/modules/admin/what-list_networks.php +++ b/inc/modules/admin/what-list_networks.php @@ -67,11 +67,12 @@ $result = SQL_QUERY('SELECT `network_short_name`, `network_title`, `network_reflink`, - `network_data_seperator`, - `network_row_seperator`, + `network_data_separator`, + `network_row_separator`, `network_request_type`, `network_charset`, - `network_require_id_card` + `network_require_id_card`, + `network_query_amount` FROM `{?_MYSQL_PREFIX?}_network_data` ORDER BY diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 70059aca9e..d7f6db028e 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1678,12 +1678,12 @@ function getPrime () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for encrypt_seperator -function getEncryptSeperator () { +// "Getter" for encrypt_separator +function getEncryptSeparator () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = getConfig('ENCRYPT_SEPERATOR'); + $GLOBALS[__FUNCTION__] = getConfig('ENCRYPT_SEPARATOR'); } // END - if // Return cache diff --git a/templates/de/html/admin/admin_add_network.tpl b/templates/de/html/admin/admin_add_network.tpl index eb76741128..7690847e9d 100644 --- a/templates/de/html/admin/admin_add_network.tpl +++ b/templates/de/html/admin/admin_add_network.tpl @@ -25,15 +25,15 @@ - {--ADMIN_NETWORK_DATA_SEPERATOR--}: + {--ADMIN_NETWORK_DATA_SEPARATOR--}: - + - {--ADMIN_NETWORK_ROW_SEPERATOR--}: + {--ADMIN_NETWORK_ROW_SEPARATOR--}: - + @@ -45,11 +45,17 @@ - {--ADMIN_NETWORK_CHARSET--}: - + {--ADMIN_NETWORK_CHARSET--}: + + + {--ADMIN_NETWORK_QUERY_AMOUNT--}: + + + + diff --git a/templates/de/html/admin/admin_config_network_api.tpl b/templates/de/html/admin/admin_config_network_api.tpl index 8ea6955fe9..3bf7cb59ff 100644 --- a/templates/de/html/admin/admin_config_network_api.tpl +++ b/templates/de/html/admin/admin_config_network_api.tpl @@ -22,12 +22,6 @@ - {--ADMIN_CONFIG_NETWORK_API_ENTER_QUERY_AMOUNT--}
- - - - - {--ADMIN_CONFIG_NETWORK_API_SELECT_API_ACTIVE--}
- {--ADMIN_NETWORK_DATA_SEPERATOR--}: + {--ADMIN_NETWORK_DATA_SEPARATOR--}: - + @@ -26,15 +26,27 @@ {%pipe,generateNetworkRequestTypeOptions=$content[network_request_type]%} - {--ADMIN_NETWORK_ROW_SEPERATOR--}: + {--ADMIN_NETWORK_ROW_SEPARATOR--}: - + - {--ADMIN_NETWORK_CHARSET--}: - + {--ADMIN_NETWORK_CHARSET--}: + + {--ADMIN_NETWORK_REQUIRE_ID_CARD--} + + + + + + {--ADMIN_NETWORK_QUERY_AMOUNT--}: + + +   diff --git a/templates/de/html/admin/admin_list_networks.tpl b/templates/de/html/admin/admin_list_networks.tpl index 40f913413a..31281f0b48 100644 --- a/templates/de/html/admin/admin_list_networks.tpl +++ b/templates/de/html/admin/admin_list_networks.tpl @@ -2,18 +2,18 @@
- + - + - - + + diff --git a/templates/de/html/admin/admin_list_networks_row.tpl b/templates/de/html/admin/admin_list_networks_row.tpl index b4e3966fdc..e57d2e72a6 100644 --- a/templates/de/html/admin/admin_list_networks_row.tpl +++ b/templates/de/html/admin/admin_list_networks_row.tpl @@ -15,10 +15,10 @@ [$content[network_title]]
   - {--ADMIN_NETWORK_SEPERATOR--} + {--ADMIN_NETWORK_SEPARATOR--}   
{--ID_SELECT--} {--ADMIN_NETWORK_SHORT_NAME--} {--ADMIN_NETWORK_REFERAL_LINK--}{--ADMIN_NETWORK_DATA_SEPERATOR2--}{--ADMIN_NETWORK_ROW_SEPERATOR2--}{--ADMIN_NETWORK_DATA_SEPARATOR2--}{--ADMIN_NETWORK_ROW_SEPARATOR2--} {--ADMIN_NETWORK_REQUEST_TYPE--} {--ADMIN_NETWORK_CHARSET--} {--ADMIN_NETWORK_REQUIRE_ID_CARD--} - $content[network_data_seperator] + $content[network_data_separator] - $content[network_row_seperator] + $content[network_row_separator] $content[network_request_type] -- 2.39.5