From 53b5edd1ee2b126087000ff842ac7bd0feea8814 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 12 Dec 2008 19:13:05 +0000 Subject: [PATCH] Unsupported extensions removed, several rewrites to extension handling, 'yoomedia' will become deprecated soon --- .gitattributes | 26 -- inc/databases.php | 2 +- inc/extensions.php | 17 +- inc/extensions/ext-yoomedia.php | 5 + inc/load_extensions.php | 31 +- inc/modules/admin/overview-inc.php | 5 +- inc/mysql-manager.php | 7 + .../inc/extensions/ext-affiliblatt.php | 142 ------- .../inc/language/affiliblatt_de.php | 95 ----- .../inc/libs/affiliblatt_functions.php | 369 ------------------ .../modules/admin/what-config_affiliblatt.php | 94 ----- .../admin/what-list_affiliblatt_tm.php | 142 ------- .../inc/reset/reset_affiliblatt.php | 49 --- .../de/html/admin/admin_affiliblatt_error.tpl | 8 - .../html/admin/admin_config_affiliblatt.tpl | 96 ----- .../html/admin/admin_list_affiliblatt_tm.tpl | 22 -- .../admin_list_affiliblatt_tm_already.tpl | 22 -- .../admin/admin_list_affiliblatt_tm_row.tpl | 23 -- .../de/html/admin/admin_send_affiliblatt.tpl | 77 ---- .../templates/de/html/ext/ext_affiliblatt.tpl | 5 - .../gollox/inc/extensions/ext-gollox.php | 142 ------- unsupported/gollox/inc/language/gollox_de.php | 95 ----- .../gollox/inc/libs/gollox_functions.php | 369 ------------------ .../inc/modules/admin/what-config_gollox.php | 94 ----- .../inc/modules/admin/what-list_gollox_tm.php | 142 ------- unsupported/gollox/inc/reset/reset_gollox.php | 49 --- .../de/html/admin/admin_config_gollox.tpl | 96 ----- .../de/html/admin/admin_gollox_error.tpl | 8 - .../de/html/admin/admin_list_gollox_tm.tpl | 22 -- .../admin/admin_list_gollox_tm_already.tpl | 22 -- .../html/admin/admin_list_gollox_tm_row.tpl | 23 -- .../de/html/admin/admin_send_gollox.tpl | 77 ---- .../templates/de/html/ext/ext_gollox.tpl | 5 - 33 files changed, 41 insertions(+), 2340 deletions(-) delete mode 100644 unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php delete mode 100644 unsupported/affiliblatt/inc/language/affiliblatt_de.php delete mode 100644 unsupported/affiliblatt/inc/libs/affiliblatt_functions.php delete mode 100644 unsupported/affiliblatt/inc/modules/admin/what-config_affiliblatt.php delete mode 100644 unsupported/affiliblatt/inc/modules/admin/what-list_affiliblatt_tm.php delete mode 100644 unsupported/affiliblatt/inc/reset/reset_affiliblatt.php delete mode 100644 unsupported/affiliblatt/templates/de/html/admin/admin_affiliblatt_error.tpl delete mode 100644 unsupported/affiliblatt/templates/de/html/admin/admin_config_affiliblatt.tpl delete mode 100644 unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm.tpl delete mode 100644 unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_already.tpl delete mode 100644 unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_row.tpl delete mode 100644 unsupported/affiliblatt/templates/de/html/admin/admin_send_affiliblatt.tpl delete mode 100644 unsupported/affiliblatt/templates/de/html/ext/ext_affiliblatt.tpl delete mode 100644 unsupported/gollox/inc/extensions/ext-gollox.php delete mode 100644 unsupported/gollox/inc/language/gollox_de.php delete mode 100644 unsupported/gollox/inc/libs/gollox_functions.php delete mode 100644 unsupported/gollox/inc/modules/admin/what-config_gollox.php delete mode 100644 unsupported/gollox/inc/modules/admin/what-list_gollox_tm.php delete mode 100644 unsupported/gollox/inc/reset/reset_gollox.php delete mode 100644 unsupported/gollox/templates/de/html/admin/admin_config_gollox.tpl delete mode 100644 unsupported/gollox/templates/de/html/admin/admin_gollox_error.tpl delete mode 100644 unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm.tpl delete mode 100644 unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_already.tpl delete mode 100644 unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_row.tpl delete mode 100644 unsupported/gollox/templates/de/html/admin/admin_send_gollox.tpl delete mode 100644 unsupported/gollox/templates/de/html/ext/ext_gollox.tpl diff --git a/.gitattributes b/.gitattributes index 23ff93abc8..00de3f9368 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1550,30 +1550,4 @@ theme/desert/images/help/left.jpg -text theme/desert/images/help/right.jpg -text theme/desert/images/help/up.jpg -text theme/desert/theme.php -text -unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php -text -unsupported/affiliblatt/inc/language/affiliblatt_de.php -text -unsupported/affiliblatt/inc/libs/affiliblatt_functions.php -text -unsupported/affiliblatt/inc/modules/admin/what-config_affiliblatt.php -text -unsupported/affiliblatt/inc/modules/admin/what-list_affiliblatt_tm.php -text -unsupported/affiliblatt/inc/reset/reset_affiliblatt.php -text -unsupported/affiliblatt/templates/de/html/admin/admin_affiliblatt_error.tpl -text -unsupported/affiliblatt/templates/de/html/admin/admin_config_affiliblatt.tpl -text -unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm.tpl -text -unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_already.tpl -text -unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_row.tpl -text -unsupported/affiliblatt/templates/de/html/admin/admin_send_affiliblatt.tpl -text -unsupported/affiliblatt/templates/de/html/ext/ext_affiliblatt.tpl -text -unsupported/gollox/inc/extensions/ext-gollox.php -text -unsupported/gollox/inc/language/gollox_de.php -text -unsupported/gollox/inc/libs/gollox_functions.php -text -unsupported/gollox/inc/modules/admin/what-config_gollox.php -text -unsupported/gollox/inc/modules/admin/what-list_gollox_tm.php -text -unsupported/gollox/inc/reset/reset_gollox.php -text -unsupported/gollox/templates/de/html/admin/admin_config_gollox.tpl -text -unsupported/gollox/templates/de/html/admin/admin_gollox_error.tpl -text -unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm.tpl -text -unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_already.tpl -text -unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_row.tpl -text -unsupported/gollox/templates/de/html/admin/admin_send_gollox.tpl -text -unsupported/gollox/templates/de/html/ext/ext_gollox.tpl -text /view.php -text diff --git a/inc/databases.php b/inc/databases.php index 190978cee9..54d09fe2db 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "619"); +define('CURR_SVN_REVISION', "620"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/extensions.php b/inc/extensions.php index cfe82ae48e..dd6cfa4b7d 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -38,17 +38,19 @@ if (!defined('__SECURITY')) { } // -function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) -{ +function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) { global $NOTES, $_CONFIG, $INC_POOL, $cacheInstance; + // This shall never do a non-admin user! + if (!IS_ADMIN()) return false; + + // Is this extension already installed? + if (EXT_IS_ACTIVE($ext_name)) return false; + // We want to register an extension and registration status is by default "failed" (= false) $EXT_LOAD_MODE = "register"; $ret = false; $SQLs = array(); $INC_POOL = array(); - // This shall never do a non-admin user! - if (!IS_ADMIN()) return false; - // By default the language prefix is the extension's name // @TODO: Do we really need this one anymore? Can't we just take $ext_name and done? $EXT_LANG_PREFIX = $ext_name; @@ -56,9 +58,6 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) // By default we have no failtures $EXT_REPORTS_FAILURE = false; - // Is this extension already installed? - if (EXT_IS_ACTIVE($ext_name)) return false; - // Generate file name $file = sprintf("%sinc/extensions/ext-%s.php", PATH, $ext_name); @@ -120,7 +119,7 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) // If versions mismatch update extension first $ext_ver = GET_EXT_VERSION($EXT_UPDATE_DEPENDS); - // Extension version set? + // Extension version set? If empty the extension is not registered if (empty($ext_ver)) { // Extension not registered so far so first load task's ID... $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE task_type='EXTENSION' AND subject LIKE '[%s:]%%' LIMIT 1", diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index c95239cc84..979d2d6ef9 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -46,6 +46,11 @@ if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) $EXT_VER_HISTORY = array("0.0"); +/* +print "
";
+debug_print_backtrace();
+print "
";
+*/
 
 switch ($EXT_LOAD_MODE)
 {
diff --git a/inc/load_extensions.php b/inc/load_extensions.php
index 87f1179fb1..1f443670ac 100644
--- a/inc/load_extensions.php
+++ b/inc/load_extensions.php
@@ -56,33 +56,33 @@ if (FILE_READABLE(PATH."inc/extensions/ext-sql_patches.php")) {
 	$cacheArray['active_extensions'] = array();
 }
 
+// By default no cache is set
+$cacheMode = "no";
+
 //
 // Load extensions
 //
 if (EXT_IS_ACTIVE("cache")) {
 	// Load cache extension alone
 	include_once(PATH."inc/libs/cache_functions.php");
-	$cacheMode = "";
 	include_once(PATH."inc/extensions/ext-cache.php");
+
+	// Check extension cache
 	switch (($cacheInstance->cache_file("extensions", true)) && ($cacheInstance->ext_version_matches("sql_patches"))) {
 		case true : $cacheMode = "load"; break;
 		case false: $cacheMode = "init"; break;
 	}
 
-	// Do not recreate cache file when it's switched off!
-
-	// If we need to init the cache init it now
-	if ($cacheMode == "init") {
+	// Do we need to init the cache?
+	if (($cacheMode == "init") && ($_CONFIG['cache_exts'] == "Y")) {
 		// Init cache file
 		$cacheInstance->cache_init("EXTENSIONS");
 		$cacheInstance->store_extension_version("sql_patches");
-
-		if ($_CONFIG['cache_exts'] == "N") $cacheMode = "skip";
-	} // END - if
-} else {
-	// Cache extension not active
-	$cacheMode = "no";
-}
+	} elseif ($_CONFIG['cache_exts'] == "N") {
+		// Cache will not be created for extensions
+		$cacheMode = "skip";
+	}
+} // END - if
 
 // Load cache?
 if ($cacheMode == "load") {
@@ -149,6 +149,9 @@ if ($cacheMode == "load") {
 		// Add ext name
 		$EXT_NAMES[$id] = $name;
 
+		// Add deprecated flag (defaults to "not deprecated")
+		$EXT_DUMMY['ext_deprecated'][$name] = "N";
+
 		// Mark it as active extension
 		$cacheArray['active_extensions']['$name'] = $EXT_DUMMY['ext_keep'][$k];
 		unset($EXT_DUMMY['ext_keep'][$k]);
@@ -235,7 +238,7 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1")
 			if (!empty($lang)) {
 				// Create language file
 				$file2 = sprintf("%sinc/language/%s_%s.php", PATH, $lang, GET_LANGUAGE());
-			}
+			} // END - if
 
 			if (FILE_READABLE($file3)) {
 				// Special functions file
@@ -330,7 +333,7 @@ if (!empty($DEL[0])) {
 			array($name), __FILE__, __LINE__);
 
 		// Remove (maybe?) found tasks (main task and possible updates
-		SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:] %' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
+		SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:]%%' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
 			array($name), __FILE__, __LINE__);
 	} // END - foreach
 
diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php
index fe806cb55e..cfbd6efc5f 100644
--- a/inc/modules/admin/overview-inc.php
+++ b/inc/modules/admin/overview-inc.php
@@ -94,8 +94,9 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
 					SQL_FREERESULT($result);
 				} // END - if
 
-				// Update extension
-				if (!empty($ext_ver)) EXTENSION_UPDATE($file, $ext, $ext_ver);
+				// Update extension if extension is installed and outdated
+				//* DEBUG: */ print "ext={$ext},ver={$ext_ver}/".GET_EXT_VERSION($ext)."
\n"; + if ((!empty($ext_ver)) && (EXT_IS_ACTIVE($ext)) && (GET_EXT_VERSION($ext) > $ext_ver)) EXTENSION_UPDATE($file, $ext, $ext_ver); if (!empty($cacheArray['active_extensions'][$ext])) { // Maybe we want to keept the current extension active? diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 1e4856595c..39a7f86b4d 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1856,6 +1856,13 @@ function SUB_POINTS ($subject, $uid, $points) { // Update config entries function UPDATE_CONFIG ($entries, $values, $updateMode="") { + global $CSS; + + // Do not update config in CSS mode + if (($CSS == "1") || ($CSS == -1)) { + return; + } // END - if + // Do we have multiple entries? if (is_array($entries)) { // Walk through all diff --git a/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php b/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php deleted file mode 100644 index 26ccb6e261..0000000000 --- a/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php +++ /dev/null @@ -1,142 +0,0 @@ -Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"; - - // Reload lock table - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_affliliblatt_reload`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_affliliblatt_reload` ( -`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`type` VARCHAR(255) NOT NULL DEFAULT 'general', -`y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0, -`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY (`id`), -UNIQUE `y_type` (`type`,`y_id`) -) TYPE=MyISAM COMMENT='Reload lock reminder for AffiliBlatt campaigns'"; - break; - -case "remove": // Do stuff when removing extension - // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `what` IN('config_affliliblatt','list_affliliblatt_tm') LIMIT 2"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_affliliblatt_reload`"; - break; - -case "activate": // Do stuff when admin activates this extension - // SQL commands to run - break; - -case "deactivate": // Do stuff when admin deactivates this extension - // SQL commands to run - break; - -case "update": // Update an extension - switch ($EXT_VER) - { - case "0.0.1": // SQL queries for v0.0.1 - $SQLs[] = ""; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = ""; - break; - } - break; - -default: // Do stuff when extension is loaded - // The translation table - $affliliblattTranslationTable = array( - // Error messages - 'error_codes' => array( - 1 => 'wrong_pass', - 2 => 'wrong_sid', - 3 => 'website_locked', - 4 => 'api_data_error', - 5 => 'requests_depleted', - 6 => 'zero_result', - 10 => 'incomplete_request' - ), - // For text mails - 'textmail' => array( - 0 => 'id', - 1 => 'name', - 2 => 'reload', - 3 => 'wait', - 4 => 'remain', - 5 => 'pay', - 6 => 'text' - ) - ); - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "affliliblatt"; - -// Keep this extension always active! -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/unsupported/affiliblatt/inc/language/affiliblatt_de.php b/unsupported/affiliblatt/inc/language/affiliblatt_de.php deleted file mode 100644 index 93138d0978..0000000000 --- a/unsupported/affiliblatt/inc/language/affiliblatt_de.php +++ /dev/null @@ -1,95 +0,0 @@ -Hinweise: Sollten Sie Erotik in Ihrem {!MT_WORD!} anzeigen wollen, so sollten Sie einen Jugendschutzbeauftragten haben und diesen im Impressum nennen. Das gesamte MXChange-Team weisst darauf hin, dass niemand aus dem Team Ihnen hierzu rechtsberatende Hinweise geben kann. Auch im Community-Forum erfolgt keine Rechtsberatung! Etwaige Postings werden entweder kommentarlos gelöscht oder gesperrt."); -define('ADMIN_CONFIG_AFFILIBLATT_TEST_FAILED', "Konfigurationsdaten stimmen nicht überein. Details entnehmen Sie bitte der Datei inc/cache/debug.log."); - -// Generic admin strings -define('ADMIN_AFFILIBLATT_REQUESTS_DEPLETED', "Ihr Abfragekonto der API ist erschöpft. Bitte surfen Sie auf www.AffiliBlatt.de und loggen Sie sich ein, um manuell Mails zu versenden."); -define('ADMIN_AFFILIBLATT_INVALID_RESULT', "Ungültige Antwort von der API erhalten. Ist www.affliliblatt.de erreichbar?"); -define('ADMIN_AFFILIBLATT_PREPARE_MAIL', "Bonusmail vorbereiten"); -define('ADMIN_AFFILIBLATT_REMOVE_MAIL', "Mail entfernen"); -define('ADMIN_AFFILIBLATT_UNLIST_MAIL', "Aus Ausschlussliste nehmen"); -define('ADMIN_AFFILIBLATT_TEXTMAIL_ALREADY_SENT', "Textmail wurde %s bereits versendet."); -define('ADMIN_AFFILIBLATT_TEXTMAIL_SEND_AGAIN', "Textmail kann in %s erneut versendet werden."); -define('ADMIN_AFFILIBLATT_TEXTMAIL_MANUALLY_LOCKED', "Textmail wurde manuell gesperrt."); -define('ADMIN_LIST_AFFILIBLATT_TITLE', "Alle Textmails von der AffiliBlatt API 2.0 anzeigen"); -define('ADMIN_LIST_AFFILIBLATT_NOTE', "Hinweise: Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie können eine Mail nur erneut aussenden, wenn die Reload-Sperre abgelaufen ist!"); -define('ADMIN_AFFILIBLATT_SEND_MAIL_TITLE', "Textmail aus AffiliBlatt API 2.0 versenden"); -define('ADMIN_AFFILIBLATT_RECEIVER_ARE_ALL_NOTE', "Es werden in der jeweiligen Kategorie alle verfügbaren Empfänger ausgewählt."); - -// Subject lines -define('ADMIN_AFFILIBLATT_SUBJECT_PREFIX', "Paidmail:"); -define('ADMIN_AFFILIBLATT_ENTER_URL_NOTE', "Die URL wird automatisch für Sie konstruiert!"); - -// Admin header lines -define('ADMIN_AFFILIBLATT_TM_ID', "Id"); -define('ADMIN_AFFILIBLATT_TM_NAME', "Betreff"); -define('ADMIN_AFFILIBLATT_TM_RELOAD', "Reloadsperre"); -define('ADMIN_AFFILIBLATT_TM_WAIT', "Mindestaufenthalt"); -define('ADMIN_AFFILIBLATT_TM_REMAIN', "Klicks übrig"); -define('ADMIN_AFFILIBLATT_TM_PAY', "Vergütung"); -define('ADMIN_AFFILIBLATT_TM_ACTIONS', "Aktionen"); - -// Error messages for admin -define('ADMIN_AFFILIBLATT_ERROR_FAILED', "Allgemeiner Fehler von API, nicht weiter spezifiziert."); -define('ADMIN_AFFILIBLATT_ERROR_TITLE', "Fehler bei Abfrage der AffiliBlatt API 2.0"); -define('ADMIN_AFFILIBLATT_ERROR_WRONG_PASS', "Falsches Interfacepasswort angegeben."); -define('ADMIN_AFFILIBLATT_ERROR_WRONG_SID', "Falsche Seiten-ID verwendet."); -define('ADMIN_AFFILIBLATT_ERROR_WEBSITE_LOCKED', "Ihre Webseite (Werbefläche) wurde bei AffiliBlatt gesperrt."); -define('ADMIN_AFFILIBLATT_ERROR_API_DATA_ERROR', "Fehler in API-Daten erkannt."); -define('ADMIN_AFFILIBLATT_ERROR_REQUESTS_DEPLETED', "Abfrageguthaben erschöpft."); -define('ADMIN_AFFILIBLATT_ERROR_ZERO_RESULT', "Keine Buchungenz zur Auswahl gefunden."); -define('ADMIN_AFFILIBLATT_ERROR_INCOMPLETE_REQUEST', "Abfragedaten sind nicht komplett."); - -// -?> diff --git a/unsupported/affiliblatt/inc/libs/affiliblatt_functions.php b/unsupported/affiliblatt/inc/libs/affiliblatt_functions.php deleted file mode 100644 index e5617b1719..0000000000 --- a/unsupported/affiliblatt/inc/libs/affiliblatt_functions.php +++ /dev/null @@ -1,369 +0,0 @@ - 10); -} - -// Queries the given AffiliBlatt API 2.0 script -function AFFILIBLATT_QUERY_API ($script, $countQuery = true) { - global $_CONFIG; - - // Init response array - $response = array(); - - // Enougth queries left? - if (($_CONFIG['affliliblatt_requests_remain'] > 0) || (!$countQuery)) { - // Prepare the low-level request - $requestString = sprintf("http://www.affliliblatt.de/interface_2.0/%s?id=%s&sid=%s&pw=%s&reload=%s&ma=%s&uebrig=%s&verguetung=%s&erotik=%s", - $script, - bigintval($_CONFIG['affliliblatt_id']), - bigintval($_CONFIG['affliliblatt_sid']), - $_CONFIG['affliliblatt_passwd'], - bigintval($_CONFIG['affliliblatt_tm_max_reload']), - bigintval($_CONFIG['affliliblatt_tm_min_wait']), - bigintval($_CONFIG['affliliblatt_tm_clicks_remain']), - bigintval($_CONFIG['affliliblatt_tm_min_pay']), - bigintval($_CONFIG['affliliblatt_erotic_allowed']) - ); - - // Run the query - $response = GET_URL($requestString); - - // Shall we count the query as used? - if ($countQuery) { - // Then update the config! - UPDATE_CONFIG("affliliblatt_requests_remain", 1, "-"); - } // END - if - } // END - if - - // Return the data - return $response; -} - -// "Getter" for a parsed result for all text mails. This means an array without -// the header lines will be returned -function AFFILIBLATT_GET_PARSED_RESULT_TEXTMAILS () { - // Get the raw response - $response = AFFILIBLATT_QUERY_API("out_textmail.php"); - - // Parse the response - $result = AFFILIBLATT_PARSE_RESPONSE($response, "textmail"); - - // Return result - return $result; -} - -// Parser function for AffiliBlatt API responses -function AFFILIBLATT_PARSE_RESPONSE ($response, $type) { - // Init result - $result = array(); - - // Cut off the header - $dummy = $response; - foreach ($response as $line) { - // Remove line - array_shift($dummy); - - // Is this line empty? - if (empty($line)) { - // Then stop here - break; - } // END - if - } // END - foreach - - // The result is now still raw, so we must split it up and trim spaces away - $responseLine = trim(implode("\n", $dummy)); - - // Last line should never be a pipe! - if (substr($responseLine, -1, 1) == "|") $responseLine = substr($responseLine, 0, -1); - - // Now, explode all in one array - $dataArray = explode("|", $responseLine); - - // Now make the result array with two dimensions - $cnt = 0; $entry = 0; - foreach ($dataArray as $line) { - // Add the line - $result[$entry][AFFILIBLATT_TRANSLATE_INDEX($type, $cnt)] = $line; - - // End of data of first entry reached? - if ($cnt == 6) { - // Then advance to next entry and reset counter - $entry++; - $cnt = 0; - } else { - // Count up - $cnt++; - } - } // END - foreach - - // Return it - return $result; -} - -// Prepares a bonus mail for delivery. Works only if extension "bonus" is active -function AFFILIBLATT_PREPARE_MAIL_DELIVERY ($data) { - global $_CONFIG; - - // Is this an admin? - if (!IS_ADMIN()) { - // Abort here - return false; - } elseif (!EXT_IS_ACTIVE("bonus")) { - // Abort here - return false; - } - - // Is the waiting time below one second? Then fix it to one (zero seconds are not yet supported!) - if ($data['wait'] < 1) $data['wait'] = 1; - - // Half of waiting time is a good reward! - $data['reward'] = round($data['wait'] / 2 + 0.4); - - // Is the reward below one? - if ($data['reward'] < 1) $data['reward'] = 1; - - // Add website id - $data['sid'] = $_CONFIG['affliliblatt_sid']; - - // Add total receivers - $data['all'] = TRANSLATE_COMMA(GET_TOTAL_RECEIVERS()); - - // Add categories - $data['categories'] = ADD_CATEGORY_OPTIONS("normal"); - - // Load template - LOAD_TEMPLATE("admin_send_affliliblatt", false, $data); -} - -// Adds the mail to the bonus mail pool -function AFFILIBLATT_SEND_BONUS_MAIL ($data, $mode) { - global $_CONFIG; - - // Is this an admin? - if (!IS_ADMIN()) { - // Abort here - return false; - } elseif (!EXT_IS_ACTIVE("bonus")) { - // Abort here - return false; - } - - // Add dummy receiver to avoid notice - $data['receiver'] = 0; - - // HTML or normal? (normal is default...) - $type = "t"; - if (($mode == "html") && (EXT_IS_ACTIVE("html"))) $type = "h"; - - // Auto-generate URL - $data['url'] = sprintf("http://www.affliliblatt.de/code/%s-mail.php?id=%s&sid=%s", - $type, - $data['id'], - $data['sid'] - ); - - // Lock this mail for new delivery - AFFILIBLATT_RELOAD_LOCK($data, $mode); - - // Call the lower function - ADD_NEW_BONUS_MAIL($data, $mode); -} - -// Lockdown given id -function AFFILIBLATT_EXCLUDE_MAIL ($data, $mode) { - // Search for the entry - if (AFFILIBLATT_CHECK_RELOAD($data['id'], $data['reload'], $mode) === false) { - // Convert mode for mails - $mode = AFFILIBLATT_CONVERT_MODE($mode); - - // Add the entry - $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_affliliblatt_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')", - array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__); - } // END - if -} - -// Remove lock of given mail -function AFFILIBLATT_UNLIST_MAIL ($data, $mode) { - // Convert mode for mails - $mode = AFFILIBLATT_CONVERT_MODE($mode); - - // Add the entry - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_affliliblatt_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", - array($mode, bigintval($data['id'])), __FILE__, __LINE__); -} - -// "Translates" the index number into an assosiative value -function AFFILIBLATT_TRANSLATE_INDEX ($type, $index) { - global $affliliblattTranslationTable; - - // Default is the index - $return = $index; - - // Is the element there? - if (isset($affliliblattTranslationTable[$type][$index])) { - // Use this element - $return = $affliliblattTranslationTable[$type][$index]; - } else { - // Not found! - DEBUG_LOG(__FUNCTION__, __LINE__, " type={$type},index={$index} not found."); - } - - // Return value - return $return; -} - -// "Translate" error code -function AFFILIBLATT_TRANSLATE_ERROR ($errorCode) { - global $affliliblattTranslationTable; - - // Default is "failed" - $return = "failed"; - - // Is the entry there? - if (isset($affliliblattTranslationTable['error_codes'][$errorCode])) { - // Entry found! - $return = $affliliblattTranslationTable['error_codes'][$errorCode]; - } else { - // Log missing entries - DEBUG_LOG(__FUNCTION__, __LINE__, " errorCode={$errorCode}"); - } - - // Return value - return $return; -} - -// Checks if the mail id is in reload lock -function AFFILIBLATT_CHECK_RELOAD ($id, $reload, $type) { - // Default is not in reload lock - $reloaded = false; - - // Query database - $result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `"._MYSQL_PREFIX."_affliliblatt_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", - array($type, bigintval($id)), __FILE__, __LINE__); - - // Entry found? - if (SQL_NUMROWS($result) == 1) { - // Load time - list($id, $time) = SQL_FETCHROW($result); - - // Are we ready to sent again? - if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) { - // Remove entry - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_affliliblatt_reload WHERE id=%s LIMIT 1", - array($id), __FILE__, __LINE__); - } else { - // Dont' sent again this mail - $reloaded = $time; - } - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return result - return $reloaded; -} - -// Lock given mail down for reload lock -function AFFILIBLATT_RELOAD_LOCK ($data, $mode) { - // Search for the entry - if (AFFILIBLATT_CHECK_RELOAD($data['id'], $data['reload'], $mode) === false) { - // Convert mode for mails - $mode = AFFILIBLATT_CONVERT_MODE($mode); - - // Add the entry - $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_affliliblatt_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)", - array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__); - } // END - if -} - -// Convert mode for mails -function AFFILIBLATT_CONVERT_MODE ($mode) { - // Convert mode for normal/html - switch ($mode) { - case "normal": - $mode = "textmail"; - break; - - case "html": - $mode = "htmlmail"; - break; - } // END - switch - - // Return result - return $mode; -} - -// -?> diff --git a/unsupported/affiliblatt/inc/modules/admin/what-config_affiliblatt.php b/unsupported/affiliblatt/inc/modules/admin/what-config_affiliblatt.php deleted file mode 100644 index 533796f5b7..0000000000 --- a/unsupported/affiliblatt/inc/modules/admin/what-config_affiliblatt.php +++ /dev/null @@ -1,94 +0,0 @@ - bigintval($_CONFIG['affliliblatt_id']), - 'affliliblatt_sid' => bigintval($_CONFIG['affliliblatt_sid']), - 'affliliblatt_passwd' => $_CONFIG['affliliblatt_passwd'], - 'affliliblatt_tm_max_reload' => bigintval($_CONFIG['affliliblatt_tm_max_reload']), - 'affliliblatt_tm_min_wait' => bigintval($_CONFIG['affliliblatt_tm_min_wait']), - 'affliliblatt_tm_clicks_remain' => bigintval($_CONFIG['affliliblatt_tm_clicks_remain']), - 'affliliblatt_tm_min_pay' => bigintval($_CONFIG['affliliblatt_tm_min_pay']) - ); - - // Erotic? - switch ($_CONFIG['affliliblatt_erotic_allowed']) { - case 0: // No erotic at all - define('__CFG_AFFILIBLATT_EROTIC_NONE' , " selected=\"selected\""); - define('__CFG_AFFILIBLATT_EROTIC_INCLUDE', ""); - define('__CFG_AFFILIBLATT_EROTIC_ONLY' , ""); - break; - - case 1: // Include erotic - define('__CFG_AFFILIBLATT_EROTIC_NONE' , ""); - define('__CFG_AFFILIBLATT_EROTIC_INCLUDE', " selected=\"selected\""); - define('__CFG_AFFILIBLATT_EROTIC_ONLY' , ""); - break; - - case 2: // Erotic only - define('__CFG_AFFILIBLATT_EROTIC_NONE' , ""); - define('__CFG_AFFILIBLATT_EROTIC_INCLUDE', ""); - define('__CFG_AFFILIBLATT_EROTIC_ONLY' , " selected=\"selected\""); - break; - } - - // Load template - LOAD_TEMPLATE("admin_config_affliliblatt", false, $content); -} - -// -?> diff --git a/unsupported/affiliblatt/inc/modules/admin/what-list_affiliblatt_tm.php b/unsupported/affiliblatt/inc/modules/admin/what-list_affiliblatt_tm.php deleted file mode 100644 index 05f4adfa28..0000000000 --- a/unsupported/affiliblatt/inc/modules/admin/what-list_affiliblatt_tm.php +++ /dev/null @@ -1,142 +0,0 @@ -", $code); - $code = $code[0]; - - // Output message - LOAD_TEMPLATE("admin_affliliblatt_error", false, sprintf("{--ADMIN_AFFILIBLATT_ERROR_%s--}", strtoupper(AFFILIBLATT_TRANSLATE_ERROR($code)))); - return false; -} - -// Prepare all entries -$OUT = ""; $SW = 2; -foreach ($result as $entry) { - // Translate some data - $entry['pay'] = TRANSLATE_COMMA($entry['pay'], true, 5); - $entry['remain'] = TRANSLATE_COMMA($entry['remain']); - $entry['sw'] = $SW; - - // Check reload lock - $reload = AFFILIBLATT_CHECK_RELOAD($entry['id'], $entry['reload'], "textmail"); - - // Is this mail already sent? - if ($reload !== false) { - // Init countdown - $countdown = 0; - - // Not manually locked? - if ($reload > 0) { - // Calculate countdown - $countdown = $reload + ($entry['reload'] * 60*60) - time(); - - // Countdown < 60 seconds and bigger zero? - if (($countdown < 60) && ($countdown > 0)) { - // Fix to one minute - $countdown = 60; - } // END - if - - // Add reload lock - $entry['already'] = sprintf(ADMIN_AFFILIBLATT_TEXTMAIL_SEND_AGAIN, CREATE_FANCY_TIME($countdown)); - } else { - // Never resentable unless manual removal - $entry['already'] = ADMIN_AFFILIBLATT_TEXTMAIL_MANUALLY_LOCKED; - } - - // Load row template for displaying - $OUT .= LOAD_TEMPLATE("admin_list_affliliblatt_tm_already", true, $entry); - } else { - // Load row template with buttons - $OUT .= LOAD_TEMPLATE("admin_list_affliliblatt_tm_row", true, $entry); - } - - // Switch color - $SW = 3 - $SW; -} // END - if - -// Load main template -LOAD_TEMPLATE("admin_list_affliliblatt_tm", false, $OUT); - -// -?> diff --git a/unsupported/affiliblatt/inc/reset/reset_affiliblatt.php b/unsupported/affiliblatt/inc/reset/reset_affiliblatt.php deleted file mode 100644 index d23db4b6da..0000000000 --- a/unsupported/affiliblatt/inc/reset/reset_affiliblatt.php +++ /dev/null @@ -1,49 +0,0 @@ - diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_affiliblatt_error.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_affiliblatt_error.tpl deleted file mode 100644 index 62d64ff949..0000000000 --- a/unsupported/affiliblatt/templates/de/html/admin/admin_affiliblatt_error.tpl +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - -
{--ADMIN_AFFILIBLATT_ERROR_TITLE--}
$content
diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_config_affiliblatt.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_config_affiliblatt.tpl deleted file mode 100644 index acbf552976..0000000000 --- a/unsupported/affiliblatt/templates/de/html/admin/admin_config_affiliblatt.tpl +++ /dev/null @@ -1,96 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {--ADMIN_CONFIG_AFFILIBLATT_TITLE--} -
 
- {--ADMIN_CONFIG_AFFILIBLATT_ID--} - - -
 
- {--ADMIN_CONFIG_AFFILIBLATT_SID--} - - -
 
- {--ADMIN_CONFIG_AFFILIBLATT_PASSWD--} - - -
 
- {--ADMIN_CONFIG_AFFILIBLATT_TM_MAX_RELOAD--} - - -
 
- {--ADMIN_CONFIG_AFFILIBLATT_TM_MIN_WAIT--} - - -
 
- {--ADMIN_CONFIG_AFFILIBLATT_TM_CLICKS_REMAIN--} - - -
 
- {--ADMIN_CONFIG_AFFILIBLATT_TM_MIN_PAY--} - - -
 
- {--ADMIN_CONFIG_AFFILIBLATT_EROTIC_ALLOWED--} - - -
 
-
- -
- {--ADMIN_CONFIG_AFFILIBLATT_EROTIC_NOTE--} -
diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm.tpl deleted file mode 100644 index 369786bc3c..0000000000 --- a/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm.tpl +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - -$content - - - -
- {--ADMIN_LIST_AFFILIBLATT_TITLE--} -
{--ADMIN_AFFILIBLATT_TM_ID--}{--ADMIN_AFFILIBLATT_TM_NAME--}{--ADMIN_AFFILIBLATT_TM_RELOAD--}{--ADMIN_AFFILIBLATT_TM_WAIT--}{--ADMIN_AFFILIBLATT_TM_REMAIN--}{--ADMIN_AFFILIBLATT_TM_PAY--}{--ADMIN_AFFILIBLATT_TM_ACTIONS--}
diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_already.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_already.tpl deleted file mode 100644 index 1610a2d50c..0000000000 --- a/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_already.tpl +++ /dev/null @@ -1,22 +0,0 @@ - - $content[id] -  $content[name] - $content[reload] {--_HOURS--} - $content[wait] {--_SECONDS--} - $content[remain] - $content[pay] € - - - - - -
- $content[already] -
- - - -
-
- - diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_row.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_row.tpl deleted file mode 100644 index 73fedd042d..0000000000 --- a/unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_row.tpl +++ /dev/null @@ -1,23 +0,0 @@ - - $content[id] -  $content[name] - $content[reload] {--_HOURS--} - $content[wait] {--_SECONDS--} - $content[remain] - $content[pay] € - -
- - - - - - - - - - -
-
- - diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_send_affiliblatt.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_send_affiliblatt.tpl deleted file mode 100644 index 2f44b38330..0000000000 --- a/unsupported/affiliblatt/templates/de/html/admin/admin_send_affiliblatt.tpl +++ /dev/null @@ -1,77 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {--ADMIN_AFFILIBLATT_SEND_MAIL_TITLE--} -
 
{--SELECT_CATEGORY--}: - -
 
{--ENTER_RECEIVER--}: - {--ADMIN_AFFILIBLATT_RECEIVER_ARE_ALL_NOTE--} -
 
{--ENTER_POINTS--}: - {!POINTS!} -
 
{--ENTER_SECONDS--}: - {--_SECONDS--} -
 
{--ENTER_SUBJECT--}: - -
 
{--ENTER_TEXT--}: - -
 
{--MEMBER_ENTER_URL--}: - http://www.affiliblatt.de/code/t-mail.php?id=$content[id]&sid=$content[sid] - - - -
- {--ADMIN_AFFILIBLATT_ENTER_URL_NOTE--} -
 
-
diff --git a/unsupported/affiliblatt/templates/de/html/ext/ext_affiliblatt.tpl b/unsupported/affiliblatt/templates/de/html/ext/ext_affiliblatt.tpl deleted file mode 100644 index a340027f24..0000000000 --- a/unsupported/affiliblatt/templates/de/html/ext/ext_affiliblatt.tpl +++ /dev/null @@ -1,5 +0,0 @@ -Erweiterung zur Anbindung an die API (Interface 2.0!) von [AffiliBlatt]. Diese Erweiterung -muss aktiviert sein, damit die täglichen freien Abfragen wieder -zurückgesetzt werden. diff --git a/unsupported/gollox/inc/extensions/ext-gollox.php b/unsupported/gollox/inc/extensions/ext-gollox.php deleted file mode 100644 index 96eed4df0d..0000000000 --- a/unsupported/gollox/inc/extensions/ext-gollox.php +++ /dev/null @@ -1,142 +0,0 @@ -Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"; - - // Reload lock table - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_gollox_reload`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_gollox_reload` ( -`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`type` VARCHAR(255) NOT NULL DEFAULT 'general', -`y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0, -`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY (`id`), -UNIQUE `y_type` (`type`,`y_id`) -) TYPE=MyISAM COMMENT='Reload lock reminder for GolloX campaigns'"; - break; - -case "remove": // Do stuff when removing extension - // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `what` IN('config_gollox','list_gollox_tm') LIMIT 2"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_gollox_reload`"; - break; - -case "activate": // Do stuff when admin activates this extension - // SQL commands to run - break; - -case "deactivate": // Do stuff when admin deactivates this extension - // SQL commands to run - break; - -case "update": // Update an extension - switch ($EXT_VER) - { - case "0.0.1": // SQL queries for v0.0.1 - $SQLs[] = ""; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = ""; - break; - } - break; - -default: // Do stuff when extension is loaded - // The translation table - $golloxTranslationTable = array( - // Error messages - 'error_codes' => array( - 1 => 'wrong_pass', - 2 => 'wrong_sid', - 3 => 'website_locked', - 4 => 'api_data_error', - 5 => 'requests_depleted', - 6 => 'zero_result', - 10 => 'incomplete_request' - ), - // For text mails - 'textmail' => array( - 0 => 'id', - 1 => 'name', - 2 => 'reload', - 3 => 'wait', - 4 => 'remain', - 5 => 'pay', - 6 => 'text' - ) - ); - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "gollox"; - -// Keep this extension always active! -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/unsupported/gollox/inc/language/gollox_de.php b/unsupported/gollox/inc/language/gollox_de.php deleted file mode 100644 index 63d5523aa1..0000000000 --- a/unsupported/gollox/inc/language/gollox_de.php +++ /dev/null @@ -1,95 +0,0 @@ -Hinweise: Sollten Sie Erotik in Ihrem {!MT_WORD!} anzeigen wollen, so sollten Sie einen Jugendschutzbeauftragten haben und diesen im Impressum nennen. Das gesamte MXChange-Team weisst darauf hin, dass niemand aus dem Team Ihnen hierzu rechtsberatende Hinweise geben kann. Auch im Community-Forum erfolgt keine Rechtsberatung! Etwaige Postings werden entweder kommentarlos gelöscht oder gesperrt."); -define('ADMIN_CONFIG_GOLLOX_TEST_FAILED', "Konfigurationsdaten stimmen nicht überein. Details entnehmen Sie bitte der Datei inc/cache/debug.log."); - -// Generic admin strings -define('ADMIN_GOLLOX_REQUESTS_DEPLETED', "Ihr Abfragekonto der API ist erschöpft. Bitte surfen Sie auf www.GolloX.de und loggen Sie sich ein, um manuell Mails zu versenden."); -define('ADMIN_GOLLOX_INVALID_RESULT', "Ungültige Antwort von der API erhalten. Ist www.gollox.de erreichbar?"); -define('ADMIN_GOLLOX_PREPARE_MAIL', "Bonusmail vorbereiten"); -define('ADMIN_GOLLOX_REMOVE_MAIL', "Mail entfernen"); -define('ADMIN_GOLLOX_UNLIST_MAIL', "Aus Ausschlussliste nehmen"); -define('ADMIN_GOLLOX_TEXTMAIL_ALREADY_SENT', "Textmail wurde %s bereits versendet."); -define('ADMIN_GOLLOX_TEXTMAIL_SEND_AGAIN', "Textmail kann in %s erneut versendet werden."); -define('ADMIN_GOLLOX_TEXTMAIL_MANUALLY_LOCKED', "Textmail wurde manuell gesperrt."); -define('ADMIN_LIST_GOLLOX_TITLE', "Alle Textmails von der GolloX API 2.0 anzeigen"); -define('ADMIN_LIST_GOLLOX_NOTE', "Hinweise: Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie können eine Mail nur erneut aussenden, wenn die Reload-Sperre abgelaufen ist!"); -define('ADMIN_GOLLOX_SEND_MAIL_TITLE', "Textmail aus GolloX API 2.0 versenden"); -define('ADMIN_GOLLOX_RECEIVER_ARE_ALL_NOTE', "Es werden in der jeweiligen Kategorie alle verfügbaren Empfänger ausgewählt."); - -// Subject lines -define('ADMIN_GOLLOX_SUBJECT_PREFIX', "Paidmail:"); -define('ADMIN_GOLLOX_ENTER_URL_NOTE', "Die URL wird automatisch für Sie konstruiert!"); - -// Admin header lines -define('ADMIN_GOLLOX_TM_ID', "Id"); -define('ADMIN_GOLLOX_TM_NAME', "Betreff"); -define('ADMIN_GOLLOX_TM_RELOAD', "Reloadsperre"); -define('ADMIN_GOLLOX_TM_WAIT', "Mindestaufenthalt"); -define('ADMIN_GOLLOX_TM_REMAIN', "Klicks übrig"); -define('ADMIN_GOLLOX_TM_PAY', "Vergütung"); -define('ADMIN_GOLLOX_TM_ACTIONS', "Aktionen"); - -// Error messages for admin -define('ADMIN_GOLLOX_ERROR_FAILED', "Allgemeiner Fehler von API, nicht weiter spezifiziert."); -define('ADMIN_GOLLOX_ERROR_TITLE', "Fehler bei Abfrage der GolloX API 2.0"); -define('ADMIN_GOLLOX_ERROR_WRONG_PASS', "Falsches Interfacepasswort angegeben."); -define('ADMIN_GOLLOX_ERROR_WRONG_SID', "Falsche Seiten-ID verwendet."); -define('ADMIN_GOLLOX_ERROR_WEBSITE_LOCKED', "Ihre Webseite (Werbefläche) wurde bei GolloX gesperrt."); -define('ADMIN_GOLLOX_ERROR_API_DATA_ERROR', "Fehler in API-Daten erkannt."); -define('ADMIN_GOLLOX_ERROR_REQUESTS_DEPLETED', "Abfrageguthaben erschöpft."); -define('ADMIN_GOLLOX_ERROR_ZERO_RESULT', "Keine Buchungenz zur Auswahl gefunden."); -define('ADMIN_GOLLOX_ERROR_INCOMPLETE_REQUEST', "Abfragedaten sind nicht komplett."); - -// -?> diff --git a/unsupported/gollox/inc/libs/gollox_functions.php b/unsupported/gollox/inc/libs/gollox_functions.php deleted file mode 100644 index 86151ac95b..0000000000 --- a/unsupported/gollox/inc/libs/gollox_functions.php +++ /dev/null @@ -1,369 +0,0 @@ - 10); -} - -// Queries the given GolloX API 2.0 script -function GOLLOX_QUERY_API ($script, $countQuery = true) { - global $_CONFIG; - - // Init response array - $response = array(); - - // Enougth queries left? - if (($_CONFIG['gollox_requests_remain'] > 0) || (!$countQuery)) { - // Prepare the low-level request - $requestString = sprintf("http://www.gollox.de/interface_2.0/%s?id=%s&sid=%s&pw=%s&reload=%s&ma=%s&uebrig=%s&verguetung=%s&erotik=%s", - $script, - bigintval($_CONFIG['gollox_id']), - bigintval($_CONFIG['gollox_sid']), - $_CONFIG['gollox_passwd'], - bigintval($_CONFIG['gollox_tm_max_reload']), - bigintval($_CONFIG['gollox_tm_min_wait']), - bigintval($_CONFIG['gollox_tm_clicks_remain']), - bigintval($_CONFIG['gollox_tm_min_pay']), - bigintval($_CONFIG['gollox_erotic_allowed']) - ); - - // Run the query - $response = GET_URL($requestString); - - // Shall we count the query as used? - if ($countQuery) { - // Then update the config! - UPDATE_CONFIG("gollox_requests_remain", 1, "-"); - } // END - if - } // END - if - - // Return the data - return $response; -} - -// "Getter" for a parsed result for all text mails. This means an array without -// the header lines will be returned -function GOLLOX_GET_PARSED_RESULT_TEXTMAILS () { - // Get the raw response - $response = GOLLOX_QUERY_API("out_textmail.php"); - - // Parse the response - $result = GOLLOX_PARSE_RESPONSE($response, "textmail"); - - // Return result - return $result; -} - -// Parser function for GolloX API responses -function GOLLOX_PARSE_RESPONSE ($response, $type) { - // Init result - $result = array(); - - // Cut off the header - $dummy = $response; - foreach ($response as $line) { - // Remove line - array_shift($dummy); - - // Is this line empty? - if (empty($line)) { - // Then stop here - break; - } // END - if - } // END - foreach - - // The result is now still raw, so we must split it up and trim spaces away - $responseLine = trim(implode("\n", $dummy)); - - // Last line should never be a pipe! - if (substr($responseLine, -1, 1) == "|") $responseLine = substr($responseLine, 0, -1); - - // Now, explode all in one array - $dataArray = explode("|", $responseLine); - - // Now make the result array with two dimensions - $cnt = 0; $entry = 0; - foreach ($dataArray as $line) { - // Add the line - $result[$entry][GOLLOX_TRANSLATE_INDEX($type, $cnt)] = $line; - - // End of data of first entry reached? - if ($cnt == 6) { - // Then advance to next entry and reset counter - $entry++; - $cnt = 0; - } else { - // Count up - $cnt++; - } - } // END - foreach - - // Return it - return $result; -} - -// Prepares a bonus mail for delivery. Works only if extension "bonus" is active -function GOLLOX_PREPARE_MAIL_DELIVERY ($data) { - global $_CONFIG; - - // Is this an admin? - if (!IS_ADMIN()) { - // Abort here - return false; - } elseif (!EXT_IS_ACTIVE("bonus")) { - // Abort here - return false; - } - - // Is the waiting time below one second? Then fix it to one (zero seconds are not yet supported!) - if ($data['wait'] < 1) $data['wait'] = 1; - - // Half of waiting time is a good reward! - $data['reward'] = round($data['wait'] / 2 + 0.4); - - // Is the reward below one? - if ($data['reward'] < 1) $data['reward'] = 1; - - // Add website id - $data['sid'] = $_CONFIG['gollox_sid']; - - // Add total receivers - $data['all'] = TRANSLATE_COMMA(GET_TOTAL_RECEIVERS()); - - // Add categories - $data['categories'] = ADD_CATEGORY_OPTIONS("normal"); - - // Load template - LOAD_TEMPLATE("admin_send_gollox", false, $data); -} - -// Adds the mail to the bonus mail pool -function GOLLOX_SEND_BONUS_MAIL ($data, $mode) { - global $_CONFIG; - - // Is this an admin? - if (!IS_ADMIN()) { - // Abort here - return false; - } elseif (!EXT_IS_ACTIVE("bonus")) { - // Abort here - return false; - } - - // Add dummy receiver to avoid notice - $data['receiver'] = 0; - - // HTML or normal? (normal is default...) - $type = "t"; - if (($mode == "html") && (EXT_IS_ACTIVE("html"))) $type = "h"; - - // Auto-generate URL - $data['url'] = sprintf("http://www.gollox.de/code/%s-mail.php?id=%s&sid=%s", - $type, - $data['id'], - $data['sid'] - ); - - // Lock this mail for new delivery - GOLLOX_RELOAD_LOCK($data, $mode); - - // Call the lower function - ADD_NEW_BONUS_MAIL($data, $mode); -} - -// Lockdown given id -function GOLLOX_EXCLUDE_MAIL ($data, $mode) { - // Search for the entry - if (GOLLOX_CHECK_RELOAD($data['id'], $data['reload'], $mode) === false) { - // Convert mode for mails - $mode = GOLLOX_CONVERT_MODE($mode); - - // Add the entry - $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_gollox_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')", - array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__); - } // END - if -} - -// Remove lock of given mail -function GOLLOX_UNLIST_MAIL ($data, $mode) { - // Convert mode for mails - $mode = GOLLOX_CONVERT_MODE($mode); - - // Add the entry - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_gollox_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", - array($mode, bigintval($data['id'])), __FILE__, __LINE__); -} - -// "Translates" the index number into an assosiative value -function GOLLOX_TRANSLATE_INDEX ($type, $index) { - global $golloxTranslationTable; - - // Default is the index - $return = $index; - - // Is the element there? - if (isset($golloxTranslationTable[$type][$index])) { - // Use this element - $return = $golloxTranslationTable[$type][$index]; - } else { - // Not found! - DEBUG_LOG(__FUNCTION__, __LINE__, " type={$type},index={$index} not found."); - } - - // Return value - return $return; -} - -// "Translate" error code -function GOLLOX_TRANSLATE_ERROR ($errorCode) { - global $golloxTranslationTable; - - // Default is "failed" - $return = "failed"; - - // Is the entry there? - if (isset($golloxTranslationTable['error_codes'][$errorCode])) { - // Entry found! - $return = $golloxTranslationTable['error_codes'][$errorCode]; - } else { - // Log missing entries - DEBUG_LOG(__FUNCTION__, __LINE__, " errorCode={$errorCode}"); - } - - // Return value - return $return; -} - -// Checks if the mail id is in reload lock -function GOLLOX_CHECK_RELOAD ($id, $reload, $type) { - // Default is not in reload lock - $reloaded = false; - - // Query database - $result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `"._MYSQL_PREFIX."_gollox_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", - array($type, bigintval($id)), __FILE__, __LINE__); - - // Entry found? - if (SQL_NUMROWS($result) == 1) { - // Load time - list($id, $time) = SQL_FETCHROW($result); - - // Are we ready to sent again? - if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) { - // Remove entry - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_gollox_reload WHERE id=%s LIMIT 1", - array($id), __FILE__, __LINE__); - } else { - // Dont' sent again this mail - $reloaded = $time; - } - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return result - return $reloaded; -} - -// Lock given mail down for reload lock -function GOLLOX_RELOAD_LOCK ($data, $mode) { - // Search for the entry - if (GOLLOX_CHECK_RELOAD($data['id'], $data['reload'], $mode) === false) { - // Convert mode for mails - $mode = GOLLOX_CONVERT_MODE($mode); - - // Add the entry - $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_gollox_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)", - array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__); - } // END - if -} - -// Convert mode for mails -function GOLLOX_CONVERT_MODE ($mode) { - // Convert mode for normal/html - switch ($mode) { - case "normal": - $mode = "textmail"; - break; - - case "html": - $mode = "htmlmail"; - break; - } // END - switch - - // Return result - return $mode; -} - -// -?> diff --git a/unsupported/gollox/inc/modules/admin/what-config_gollox.php b/unsupported/gollox/inc/modules/admin/what-config_gollox.php deleted file mode 100644 index 801e075ccc..0000000000 --- a/unsupported/gollox/inc/modules/admin/what-config_gollox.php +++ /dev/null @@ -1,94 +0,0 @@ - bigintval($_CONFIG['gollox_id']), - 'gollox_sid' => bigintval($_CONFIG['gollox_sid']), - 'gollox_passwd' => $_CONFIG['gollox_passwd'], - 'gollox_tm_max_reload' => bigintval($_CONFIG['gollox_tm_max_reload']), - 'gollox_tm_min_wait' => bigintval($_CONFIG['gollox_tm_min_wait']), - 'gollox_tm_clicks_remain' => bigintval($_CONFIG['gollox_tm_clicks_remain']), - 'gollox_tm_min_pay' => bigintval($_CONFIG['gollox_tm_min_pay']) - ); - - // Erotic? - switch ($_CONFIG['gollox_erotic_allowed']) { - case 0: // No erotic at all - define('__CFG_GOLLOX_EROTIC_NONE' , " selected=\"selected\""); - define('__CFG_GOLLOX_EROTIC_INCLUDE', ""); - define('__CFG_GOLLOX_EROTIC_ONLY' , ""); - break; - - case 1: // Include erotic - define('__CFG_GOLLOX_EROTIC_NONE' , ""); - define('__CFG_GOLLOX_EROTIC_INCLUDE', " selected=\"selected\""); - define('__CFG_GOLLOX_EROTIC_ONLY' , ""); - break; - - case 2: // Erotic only - define('__CFG_GOLLOX_EROTIC_NONE' , ""); - define('__CFG_GOLLOX_EROTIC_INCLUDE', ""); - define('__CFG_GOLLOX_EROTIC_ONLY' , " selected=\"selected\""); - break; - } - - // Load template - LOAD_TEMPLATE("admin_config_gollox", false, $content); -} - -// -?> diff --git a/unsupported/gollox/inc/modules/admin/what-list_gollox_tm.php b/unsupported/gollox/inc/modules/admin/what-list_gollox_tm.php deleted file mode 100644 index 60118c53ed..0000000000 --- a/unsupported/gollox/inc/modules/admin/what-list_gollox_tm.php +++ /dev/null @@ -1,142 +0,0 @@ -", $code); - $code = $code[0]; - - // Output message - LOAD_TEMPLATE("admin_gollox_error", false, sprintf("{--ADMIN_GOLLOX_ERROR_%s--}", strtoupper(GOLLOX_TRANSLATE_ERROR($code)))); - return false; -} - -// Prepare all entries -$OUT = ""; $SW = 2; -foreach ($result as $entry) { - // Translate some data - $entry['pay'] = TRANSLATE_COMMA($entry['pay'], true, 5); - $entry['remain'] = TRANSLATE_COMMA($entry['remain']); - $entry['sw'] = $SW; - - // Check reload lock - $reload = GOLLOX_CHECK_RELOAD($entry['id'], $entry['reload'], "textmail"); - - // Is this mail already sent? - if ($reload !== false) { - // Init countdown - $countdown = 0; - - // Not manually locked? - if ($reload > 0) { - // Calculate countdown - $countdown = $reload + ($entry['reload'] * 60*60) - time(); - - // Countdown < 60 seconds and bigger zero? - if (($countdown < 60) && ($countdown > 0)) { - // Fix to one minute - $countdown = 60; - } // END - if - - // Add reload lock - $entry['already'] = sprintf(ADMIN_GOLLOX_TEXTMAIL_SEND_AGAIN, CREATE_FANCY_TIME($countdown)); - } else { - // Never resentable unless manual removal - $entry['already'] = ADMIN_GOLLOX_TEXTMAIL_MANUALLY_LOCKED; - } - - // Load row template for displaying - $OUT .= LOAD_TEMPLATE("admin_list_gollox_tm_already", true, $entry); - } else { - // Load row template with buttons - $OUT .= LOAD_TEMPLATE("admin_list_gollox_tm_row", true, $entry); - } - - // Switch color - $SW = 3 - $SW; -} // END - if - -// Load main template -LOAD_TEMPLATE("admin_list_gollox_tm", false, $OUT); - -// -?> diff --git a/unsupported/gollox/inc/reset/reset_gollox.php b/unsupported/gollox/inc/reset/reset_gollox.php deleted file mode 100644 index d152d1ad83..0000000000 --- a/unsupported/gollox/inc/reset/reset_gollox.php +++ /dev/null @@ -1,49 +0,0 @@ - diff --git a/unsupported/gollox/templates/de/html/admin/admin_config_gollox.tpl b/unsupported/gollox/templates/de/html/admin/admin_config_gollox.tpl deleted file mode 100644 index 3c6219f6fe..0000000000 --- a/unsupported/gollox/templates/de/html/admin/admin_config_gollox.tpl +++ /dev/null @@ -1,96 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {--ADMIN_CONFIG_GOLLOX_TITLE--} -
 
- {--ADMIN_CONFIG_GOLLOX_ID--} - - -
 
- {--ADMIN_CONFIG_GOLLOX_SID--} - - -
 
- {--ADMIN_CONFIG_GOLLOX_PASSWD--} - - -
 
- {--ADMIN_CONFIG_GOLLOX_TM_MAX_RELOAD--} - - -
 
- {--ADMIN_CONFIG_GOLLOX_TM_MIN_WAIT--} - - -
 
- {--ADMIN_CONFIG_GOLLOX_TM_CLICKS_REMAIN--} - - -
 
- {--ADMIN_CONFIG_GOLLOX_TM_MIN_PAY--} - - -
 
- {--ADMIN_CONFIG_GOLLOX_EROTIC_ALLOWED--} - - -
 
-
- -
- {--ADMIN_CONFIG_GOLLOX_EROTIC_NOTE--} -
diff --git a/unsupported/gollox/templates/de/html/admin/admin_gollox_error.tpl b/unsupported/gollox/templates/de/html/admin/admin_gollox_error.tpl deleted file mode 100644 index 21d31f6747..0000000000 --- a/unsupported/gollox/templates/de/html/admin/admin_gollox_error.tpl +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - -
{--ADMIN_GOLLOX_ERROR_TITLE--}
$content
diff --git a/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm.tpl b/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm.tpl deleted file mode 100644 index 4b4794e79e..0000000000 --- a/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm.tpl +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - -$content - - - -
- {--ADMIN_LIST_GOLLOX_TITLE--} -
{--ADMIN_GOLLOX_TM_ID--}{--ADMIN_GOLLOX_TM_NAME--}{--ADMIN_GOLLOX_TM_RELOAD--}{--ADMIN_GOLLOX_TM_WAIT--}{--ADMIN_GOLLOX_TM_REMAIN--}{--ADMIN_GOLLOX_TM_PAY--}{--ADMIN_GOLLOX_TM_ACTIONS--}
diff --git a/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_already.tpl b/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_already.tpl deleted file mode 100644 index 23363e8984..0000000000 --- a/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_already.tpl +++ /dev/null @@ -1,22 +0,0 @@ - - $content[id] -  $content[name] - $content[reload] {--_HOURS--} - $content[wait] {--_SECONDS--} - $content[remain] - $content[pay] € - - - - - -
- $content[already] -
- - - -
-
- - diff --git a/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_row.tpl b/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_row.tpl deleted file mode 100644 index 4bcbf29275..0000000000 --- a/unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_row.tpl +++ /dev/null @@ -1,23 +0,0 @@ - - $content[id] -  $content[name] - $content[reload] {--_HOURS--} - $content[wait] {--_SECONDS--} - $content[remain] - $content[pay] € - -
- - - - - - - - - - -
-
- - diff --git a/unsupported/gollox/templates/de/html/admin/admin_send_gollox.tpl b/unsupported/gollox/templates/de/html/admin/admin_send_gollox.tpl deleted file mode 100644 index 268d0658d0..0000000000 --- a/unsupported/gollox/templates/de/html/admin/admin_send_gollox.tpl +++ /dev/null @@ -1,77 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {--ADMIN_GOLLOX_SEND_MAIL_TITLE--} -
 
{--SELECT_CATEGORY--}: - -
 
{--ENTER_RECEIVER--}: - {--ADMIN_GOLLOX_RECEIVER_ARE_ALL_NOTE--} -
 
{--ENTER_POINTS--}: - {!POINTS!} -
 
{--ENTER_SECONDS--}: - {--_SECONDS--} -
 
{--ENTER_SUBJECT--}: - -
 
{--ENTER_TEXT--}: - -
 
{--MEMBER_ENTER_URL--}: - http://www.gollox.de/code/t-mail.php?id=$content[id]&sid=$content[sid] - - - -
- {--ADMIN_GOLLOX_ENTER_URL_NOTE--} -
 
-
diff --git a/unsupported/gollox/templates/de/html/ext/ext_gollox.tpl b/unsupported/gollox/templates/de/html/ext/ext_gollox.tpl deleted file mode 100644 index acc6850573..0000000000 --- a/unsupported/gollox/templates/de/html/ext/ext_gollox.tpl +++ /dev/null @@ -1,5 +0,0 @@ -Erweiterung zur Anbindung an die API (Interface 2.0!) von [GolloX]. Diese Erweiterung -muss aktiviert sein, damit die täglichen freien Abfragen wieder -zurückgesetzt werden. -- 2.30.2