Unsupported/non-working extensions gollox and affiliblatt added, yoomedia extension...
authorRoland Häder <roland@mxchange.org>
Sun, 23 Nov 2008 23:49:05 +0000 (23:49 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 23 Nov 2008 23:49:05 +0000 (23:49 +0000)
30 files changed:
.gitattributes
inc/databases.php
inc/libs/yoomedia_functions.php
inc/modules/admin/what-config_yoomedia.php
unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php [new file with mode: 0644]
unsupported/affiliblatt/inc/language/affiliblatt_de.php [new file with mode: 0644]
unsupported/affiliblatt/inc/libs/affiliblatt_functions.php [new file with mode: 0644]
unsupported/affiliblatt/inc/modules/admin/what-config_affiliblatt.php [new file with mode: 0644]
unsupported/affiliblatt/inc/modules/admin/what-list_affiliblatt_tm.php [new file with mode: 0644]
unsupported/affiliblatt/inc/reset/reset_affiliblatt.php [new file with mode: 0644]
unsupported/affiliblatt/templates/de/html/admin/admin_affiliblatt_error.tpl [new file with mode: 0644]
unsupported/affiliblatt/templates/de/html/admin/admin_config_affiliblatt.tpl [new file with mode: 0644]
unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm.tpl [new file with mode: 0644]
unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_already.tpl [new file with mode: 0644]
unsupported/affiliblatt/templates/de/html/admin/admin_list_affiliblatt_tm_row.tpl [new file with mode: 0644]
unsupported/affiliblatt/templates/de/html/admin/admin_send_affiliblatt.tpl [new file with mode: 0644]
unsupported/affiliblatt/templates/de/html/ext/ext_affiliblatt.tpl [new file with mode: 0644]
unsupported/gollox/inc/extensions/ext-gollox.php [new file with mode: 0644]
unsupported/gollox/inc/language/gollox_de.php [new file with mode: 0644]
unsupported/gollox/inc/libs/gollox_functions.php [new file with mode: 0644]
unsupported/gollox/inc/modules/admin/what-config_gollox.php [new file with mode: 0644]
unsupported/gollox/inc/modules/admin/what-list_gollox_tm.php [new file with mode: 0644]
unsupported/gollox/inc/reset/reset_gollox.php [new file with mode: 0644]
unsupported/gollox/templates/de/html/admin/admin_config_gollox.tpl [new file with mode: 0644]
unsupported/gollox/templates/de/html/admin/admin_gollox_error.tpl [new file with mode: 0644]
unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm.tpl [new file with mode: 0644]
unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_already.tpl [new file with mode: 0644]
unsupported/gollox/templates/de/html/admin/admin_list_gollox_tm_row.tpl [new file with mode: 0644]
unsupported/gollox/templates/de/html/admin/admin_send_gollox.tpl [new file with mode: 0644]
unsupported/gollox/templates/de/html/ext/ext_gollox.tpl [new file with mode: 0644]

index 08db658..7164938 100644 (file)
@@ -1510,4 +1510,30 @@ 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
index a0cf9b0..befcddf 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "545");
+define('CURR_SVN_REVISION', "546");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 6cf2f20..04deb26 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Test if the extension settings did work
-function YOOMEDIDA_TEST_CONFIG ($data) {
+function YOOMEDIA_TEST_CONFIG ($data) {
        global $_CONFIG;
 
        // Is this admin?
index 1fb9597..338dc08 100644 (file)
@@ -46,7 +46,7 @@ ADD_DESCR("admin", __FILE__);
 // Was the form submitted?
 if (isset($_POST['ok'])) {
        // Test Yoo!Media config
-       if (YOOMEDIDA_TEST_CONFIG($_POST)) {
+       if (YOOMEDIA_TEST_CONFIG($_POST)) {
                // Save settings
                ADMIN_SAVE_SETTINGS($_POST);
        } else {
diff --git a/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php b/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php
new file mode 100644 (file)
index 0000000..fef5dfb
--- /dev/null
@@ -0,0 +1,142 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 08/27/2008 *
+ * ================                             Last change: 08/27/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-affliliblatt.php                             *
+ * -------------------------------------------------------------------- *
+ * Short description : Extension for contacting the API of AffiliBlatt  *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Erweitertung zur Anbindung an die API von        *
+ *                     AffiliBlatt                                      *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+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");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_id` BIGINT(20) NOT NULL DEFAULT 0";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_sid` BIGINT(20) NOT NULL DEFAULT 0";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_passwd` VARCHAR(255) NOT NULL DEFAULT ''";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8)."";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 60";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_total` SMALLINT(6) NOT NULL DEFAULT 200";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200";
+
+       // Admin menu
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_affliliblatt','AffiliBlatt Interface 2.0','Einstellungen zum AffiliBlatt Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_affliliblatt_tm','AffiliBlatt Textmails','Listet Textmail-Buchungen &uuml;ber das Interface 2.0 von AffiliBlatt nach Ihren eingestellten Kriterien auf. <strong>Vorsicht:</strong> 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) NOT NULL AUTO_INCREMENT,
+`type` VARCHAR(255) NOT NULL DEFAULT 'general',
+`y_id` BIGINT(20) NOT NULL DEFAULT 0,
+`y_reload` SMALLINT(6) 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
new file mode 100644 (file)
index 0000000..93138d0
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/10/2008 *
+ * ===============                              Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : affliliblatt_de.php                              *
+ * -------------------------------------------------------------------- *
+ * Short description : German langugage support                         *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Deutsche Sprachunterstuetzung                    *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Admin config strings
+define('ADMIN_CONFIG_AFFILIBLATT_TITLE', "Einstellungen f&uuml;r AffiliBlatt Interface 2.0");
+define('ADMIN_CONFIG_AFFILIBLATT_ID', "Ihre User-ID:");
+define('ADMIN_CONFIG_AFFILIBLATT_SID', "Seiten-ID:");
+define('ADMIN_CONFIG_AFFILIBLATT_PASSWD', "Interface-Passwort:");
+define('ADMIN_CONFIG_AFFILIBLATT_TM_MAX_RELOAD', "Maximale Reloadsperre der Kampagnen in Stunden:");
+define('ADMIN_CONFIG_AFFILIBLATT_TM_MIN_WAIT', "Mindestaufenthalt in Sekunden:");
+define('ADMIN_CONFIG_AFFILIBLATT_TM_CLICKS_REMAIN', "Mindestanzahl der restlichen Klicks:");
+define('ADMIN_CONFIG_AFFILIBLATT_TM_MIN_PAY', "Mindestverg&uuml;tung der Kampagne:");
+define('ADMIN_CONFIG_AFFILIBLATT_EROTIC_ALLOWED', "Kampagnen mit erotischen Inhalt anzeigen?");
+define('ADMIN_CONFIG_AFFILIBLATT_EROTIC_NONE', "Keine Erotik anzeigen");
+define('ADMIN_CONFIG_AFFILIBLATT_EROTIC_INCLUDE', "Auch Erotik anzeigen");
+define('ADMIN_CONFIG_AFFILIBLATT_EROTIC_ONLY', "Nur Erotik anzeigen");
+define('ADMIN_CONFIG_AFFILIBLATT_EROTIC_NOTE', "<strong>Hinweise:</strong> 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&ouml;scht oder gesperrt.");
+define('ADMIN_CONFIG_AFFILIBLATT_TEST_FAILED', "Konfigurationsdaten stimmen nicht &uuml;berein. Details entnehmen Sie bitte der Datei <u>inc/cache/debug.log</u>.");
+
+// Generic admin strings
+define('ADMIN_AFFILIBLATT_REQUESTS_DEPLETED', "Ihr Abfragekonto der API ist ersch&ouml;pft. Bitte surfen Sie auf <a href=\"http://www.affliliblatt.de\" target=\"_blank\">www.AffiliBlatt.de</a> und loggen Sie sich ein, um manuell Mails zu versenden.");
+define('ADMIN_AFFILIBLATT_INVALID_RESULT', "Ung&uuml;ltige Antwort von der API erhalten. Ist <a href=\"http://www.affliliblatt.de\" target=\"_blank\">www.affliliblatt.de</a> 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 <strong>%s</strong> bereits versendet.");
+define('ADMIN_AFFILIBLATT_TEXTMAIL_SEND_AGAIN', "Textmail kann in <strong>%s</strong> 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', "<strong>Hinweise:</strong> Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie k&ouml;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&uuml;gbaren Empf&auml;nger ausgew&auml;hlt.");
+
+// Subject lines
+define('ADMIN_AFFILIBLATT_SUBJECT_PREFIX', "Paidmail:");
+define('ADMIN_AFFILIBLATT_ENTER_URL_NOTE', "Die URL wird automatisch f&uuml;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 &uuml;brig");
+define('ADMIN_AFFILIBLATT_TM_PAY', "Verg&uuml;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&auml;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&ouml;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
new file mode 100644 (file)
index 0000000..e5617b1
--- /dev/null
@@ -0,0 +1,369 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/10/2008 *
+ * ===============                              Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : affliliblatt_functions.php                       *
+ * -------------------------------------------------------------------- *
+ * Short description : Special functions for affliliblatt extension     *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Spezielle Funktion fuer AffiliBlatt-Erweiterung  *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Test if the extension settings did work
+function AFFILIBLATT_TEST_CONFIG ($data) {
+       global $_CONFIG;
+
+       // Is this admin?
+       if (!IS_ADMIN()) {
+               // No admin!
+               return false;
+       } // END - if
+
+       // Transfer config data
+       $_CONFIG = array_merge($_CONFIG, $data);
+
+       // Temporary allow maximum
+       $_CONFIG['affliliblatt_tm_max_reload']    = 1000;
+       $_CONFIG['affliliblatt_tm_min_wait']      = 0;
+       $_CONFIG['affliliblatt_tm_clicks_remain'] = 10;
+       $_CONFIG['affliliblatt_tm_min_pay']       = 0;
+       $_CONFIG['affliliblatt_erotic_allowed']   = 1;
+
+       // Query the API with a test request without couting it
+       // If zero reply comes back the data is invalid!
+       $response = AFFILIBLATT_QUERY_API("out_textmail.php", true); // TODO Ask AffiliBlatt for test script
+
+       // Log the response if failed
+       if (count($response) == 0) {
+               // Queries depleted (as we count here!)
+               DEBUG_LOG(__FUNCTION__, __LINE__, " Requested depleted. Maxmimum was: ".$_CONFIG['affliliblatt_requests_total']);
+       } elseif (count($response) <= 10) {
+               // Log serialized raw response
+               DEBUG_LOG(__FUNCTION__, __LINE__, " Raw response=".base64_encode(serialize($response)));
+       } // END - if
+
+       // Do we have some data there?
+       return (count($response) > 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
new file mode 100644 (file)
index 0000000..91dbe13
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/10/2008 *
+ * ================                             Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-affliliblatt.php                            *
+ * -------------------------------------------------------------------- *
+ * Short description : Setup default statistics mode                    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Standart Modus der Statistiken einstellen        *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} elseif ((!EXT_IS_ACTIVE("affliliblatt")) && (!IS_ADMIN())) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "affliliblatt");
+       return;
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", __FILE__);
+
+// Was the form submitted?
+if (isset($_POST['ok'])) {
+       // Test AffiliBlatt config
+       if (AFFILIBLATT_TEST_CONFIG($_POST)) {
+               // Save settings
+               ADMIN_SAVE_SETTINGS($_POST);
+       } else {
+               // Config not saved
+               LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_CONFIG_AFFILIBLATT_TEST_FAILED);
+       }
+} else {
+       // Prepare content
+       $content = array(
+               'affliliblatt_id'               => 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
new file mode 100644 (file)
index 0000000..05f4adf
--- /dev/null
@@ -0,0 +1,142 @@
+<?php
+/************************************************************************
+ * M-XChange v0.2.1                                   Start: 10/10/2008 *
+ * ================                             Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-list_affliliblatt_tm.php                    *
+ * -------------------------------------------------------------------- *
+ * Short description : List AffiliBlatt text mails                      *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auflisten von AffiliBlatt Textmails              *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software. You can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License.       *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
+       require($INC);
+} elseif (!EXT_IS_ACTIVE("affliliblatt")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "affliliblatt");
+       return;
+} elseif (!EXT_IS_ACTIVE("bonus")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus");
+       return;
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", __FILE__);
+
+// Do actions here
+if (isset($_POST['ok'])) {
+       // Prepare mail for delivery
+       AFFILIBLATT_PREPARE_MAIL_DELIVERY($_POST);
+       return;
+} elseif (isset($_POST['sent'])) {
+       // Sent mail
+       AFFILIBLATT_SEND_BONUS_MAIL($_POST, "normal");
+} elseif (isset($_POST['remove'])) {
+       // Add mail to exclude list
+       AFFILIBLATT_EXCLUDE_MAIL($_POST, "normal");
+} elseif (isset($_POST['unlist'])) {
+       // Remove mail from exclude list
+       AFFILIBLATT_UNLIST_MAIL($_POST, "normal");
+}
+
+// Enougth queries left?
+if ($_CONFIG['affliliblatt_requests_remain'] == 0) {
+       // Output message
+       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_AFFILIBLATT_REQUESTS_DEPLETED);
+
+       // Abort here!
+       return false;
+} // END - if
+
+// Get parsed array back
+$result = AFFILIBLATT_GET_PARSED_RESULT_TEXTMAILS();
+
+// Sanity-check on result array
+if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) {
+       // Invalid result
+       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_AFFILIBLATT_INVALID_RESULT);
+       return false;
+} elseif (count($result[0]) < 7) {
+       // Error received so prepare error code
+       $code = explode(" ", $result[0]['id']);
+       $code = $code[0];
+       $code = explode("<br>", $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
new file mode 100644 (file)
index 0000000..d23db4b
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/10/2008 *
+ * ===============                              Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : reset_affliliblatt.php                           *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} elseif (!EXT_IS_ACTIVE("affliliblatt")) {
+       return;
+}
+
+// Do not execute when script is in CSS mode or no daily reset
+if (($CSS == 1) || (!defined('__DAILY_RESET'))) return;
+
+// Simply reset the requests here
+UPDATE_CONFIG("affliliblatt_requests_remain", $_CONFIG['affliliblatt_requests_total']);
+
+//
+?>
diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_affiliblatt_error.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_affiliblatt_error.tpl
new file mode 100644 (file)
index 0000000..62d64ff
--- /dev/null
@@ -0,0 +1,8 @@
+<TABLE border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="400">
+       <TR>
+               <TD class="admin_title bottom2">{--ADMIN_AFFILIBLATT_ERROR_TITLE--}</TD>
+       </TR>
+       <TR>
+               <TD align="center"><STRONG>$content</STRONG></TD>
+       </TR>
+</TABLE>
diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_config_affiliblatt.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_config_affiliblatt.tpl
new file mode 100644 (file)
index 0000000..acbf552
--- /dev/null
@@ -0,0 +1,96 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=config_affiliblatt" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="500">
+<tr>
+       <td colspan="2" align="center" class="admin_title bottom2" height="30">
+               <strong>{--ADMIN_CONFIG_AFFILIBLATT_TITLE--}</strong>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_AFFILIBLATT_ID--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="5" maxlength="20" name="affiliblatt_id" value="$content[affiliblatt_id]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_AFFILIBLATT_SID--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="5" maxlength="20" name="affiliblatt_sid" value="$content[affiliblatt_sid]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_AFFILIBLATT_PASSWD--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="20" maxlength="255" name="affiliblatt_passwd" value="$content[affiliblatt_passwd]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_AFFILIBLATT_TM_MAX_RELOAD--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="3" maxlength="6" name="affiliblatt_tm_max_reload" value="$content[affiliblatt_tm_max_reload]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_AFFILIBLATT_TM_MIN_WAIT--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="3" maxlength="6" name="affiliblatt_tm_min_wait" value="$content[affiliblatt_tm_min_wait]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_AFFILIBLATT_TM_CLICKS_REMAIN--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="5" maxlength="20" name="affiliblatt_tm_clicks_remain" value="$content[affiliblatt_tm_clicks_remain]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_AFFILIBLATT_TM_MIN_PAY--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="3" maxlength="6" name="affiliblatt_tm_min_pay" value="$content[affiliblatt_tm_min_pay]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_AFFILIBLATT_EROTIC_ALLOWED--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <select name="affiliblatt_erotic_allowed" class="admin_select" size="1">
+                       <option value="0"{!__CFG_AFFILIBLATT_EROTIC_NONE!}>{--ADMIN_CONFIG_AFFILIBLATT_EROTIC_NONE--}</option>
+                       <option value="1"{!__CFG_AFFILIBLATT_EROTIC_INCLUDE!}>{--ADMIN_CONFIG_AFFILIBLATT_EROTIC_INCLUDE--}</option>
+                       <option value="2"{!__CFG_AFFILIBLATT_EROTIC_ONLY!} />{--ADMIN_CONFIG_AFFILIBLATT_EROTIC_ONLY--}</option>
+               </select>
+       </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td colspan="2" class="admin_footer">
+               <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+               <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" />
+       </td>
+</tr>
+</table>
+</form>
+
+<div class="admin_note">
+       {--ADMIN_CONFIG_AFFILIBLATT_EROTIC_NOTE--}
+</div>
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
new file mode 100644 (file)
index 0000000..369786b
--- /dev/null
@@ -0,0 +1,22 @@
+<table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed">
+<tr>
+       <td colspan="7" class="admin_title" height="30">
+               <strong>{--ADMIN_LIST_AFFILIBLATT_TITLE--}</strong>
+       </td>
+</tr>
+<tr>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_AFFILIBLATT_TM_ID--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_AFFILIBLATT_TM_NAME--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_AFFILIBLATT_TM_RELOAD--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_AFFILIBLATT_TM_WAIT--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_AFFILIBLATT_TM_REMAIN--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_AFFILIBLATT_TM_PAY--}</strong></td>
+       <td class="admin_title bottom2" width="280"><strong>{--ADMIN_AFFILIBLATT_TM_ACTIONS--}</strong></td>
+</tr>
+$content
+<tr>
+       <td colspan="7" class="admin_footer">
+               <span class="admin_note">{--ADMIN_LIST_AFFILIBLATT_NOTE--}</span>
+       </td>
+</tr>
+</table>
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
new file mode 100644 (file)
index 0000000..1610a2d
--- /dev/null
@@ -0,0 +1,22 @@
+<tr>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[id]</td>
+       <td class="switch_sw$content[sw] bottom2 right2">&nbsp;$content[name]</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[reload] {--_HOURS--}</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[wait] {--_SECONDS--}</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[remain]</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[pay] &euro;</td>
+       <td class="switch_sw$content[sw] bottom2" style="padding:2px">
+               <table border="0" cellspacing="0" cellpadding="0" width="100%">
+               <tr>
+                       <td align="center">
+                               $content[already]
+                               <form action="{!URL!}/modules.php?module=admin&amp;what=list_affiliblatt_tm" method="post" style="padding-bottom:0px">
+                               <input type="hidden" name="id" value="$content[id]" />
+                               <input type="hidden" name="reload" value="$content[reload]" />
+                               <input type="submit" class="admin_delete" name="unlist" value="{--ADMIN_AFFILIBLATT_UNLIST_MAIL--}" />
+                               </form>
+                       </td>
+               </tr>
+               </table>
+       </td>
+</tr>
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
new file mode 100644 (file)
index 0000000..73fedd0
--- /dev/null
@@ -0,0 +1,23 @@
+<tr>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[id]</td>
+       <td class="switch_sw$content[sw] bottom2 right2">&nbsp;$content[name]</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[reload] {--_HOURS--}</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[wait] {--_SECONDS--}</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[remain]</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[pay] &euro;</td>
+       <td class="switch_sw$content[sw] bottom2" align="center" style="padding-left:1px;padding-right:1px;padding-top:2px;padding-bottom:2px">
+               <form action="{!URL!}/modules.php?module=admin&amp;what=list_affiliblatt_tm" method="post" style="padding-bottom:0px">
+                       <input type="hidden" name="id" value="$content[id]" />
+                       <input type="hidden" name="name" value="$content[name]" />
+                       <input type="hidden" name="wait" value="$content[wait]" />
+                       <input type="hidden" name="text" value="$content[text]" />
+                       <input type="hidden" name="reload" value="$content[reload]" />
+                       <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                       <tr>
+                               <td><input type="submit" class="admin_submit" name="ok" value="{--ADMIN_AFFILIBLATT_PREPARE_MAIL--}" /></td>
+                               <td><input type="submit" class="admin_delete" name="remove" value="{--ADMIN_AFFILIBLATT_REMOVE_MAIL--}" /></td>
+                       </tr>
+                       </table>
+               </form>
+       </td>
+</tr>
diff --git a/unsupported/affiliblatt/templates/de/html/admin/admin_send_affiliblatt.tpl b/unsupported/affiliblatt/templates/de/html/admin/admin_send_affiliblatt.tpl
new file mode 100644 (file)
index 0000000..2f44b38
--- /dev/null
@@ -0,0 +1,77 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=list_affiliblatt_tm" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed" align="center">
+<tr>
+       <td colspan="2" class="admin_title bottom2" height="30">
+               <strong>{--ADMIN_AFFILIBLATT_SEND_MAIL_TITLE--}</strong>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="10">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--SELECT_CATEGORY--}:</td>
+       <td>
+               <select name="cat" size="1" class="admin_select">
+                       <option value="" disabled>{--PLEASE_SELECT--}</option>
+                       <option value="0">{--ALL_MEMBERS--} ($content[all])</option>
+                       $content[categories]
+               </select>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td width="150" align="right" style="padding-right:5px" valign="top">{--ENTER_RECEIVER--}:</td>
+       <td width="530">
+               <span class="admin_note"><em>{--ADMIN_AFFILIBLATT_RECEIVER_ARE_ALL_NOTE--}</em></span>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--ENTER_POINTS--}:</td>
+       <td>
+               <input type="text" name="points" class="admin_normal" size="4" maxlength="5" value="$content[reward]" /> {!POINTS!}
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--ENTER_SECONDS--}:</td>
+       <td>
+               <input type="text" name="seconds" class="admin_normal" size="4" maxlength="5" value="$content[wait]" /> {--_SECONDS--}
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--ENTER_SUBJECT--}:</td>
+       <td>
+               <input type="text" name="subject" class="admin_normal" size="30" maxlength="150" value="{--ADMIN_AFFILIBLATT_SUBJECT_PREFIX--} $content[name]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px" valign="top">{--ENTER_TEXT--}:</td>
+       <td>
+               <textarea name="text" class="admin_normal" rows="8" cols="60">$content[text]</textarea>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="10">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--MEMBER_ENTER_URL--}:</td>
+       <td>
+               http://www.affiliblatt.de/code/t-mail.php?id=$content[id]&amp;sid=$content[sid]
+               <input type="hidden" name="id" value="$content[id]" />
+               <input type="hidden" name="sid" value="$content[sid]" />
+               <input type="hidden" name="reload" value="$content[reload]" />
+       </td>
+</tr>
+<tr>
+       <td colspan="2" align="center">
+               <span class="admin_note"><em>{--ADMIN_AFFILIBLATT_ENTER_URL_NOTE--}</em></span>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator bottom2" height="10">&nbsp;</td></tr>
+<tr>
+       <td colspan="2" align="center" class="admin_footer">
+               <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+               <input type="submit" name="sent" class="admin_submit" value="{--ADMIN_SEND_MAIL--}" />
+       </td>
+</tr>
+</table>
+</form>
diff --git a/unsupported/affiliblatt/templates/de/html/ext/ext_affiliblatt.tpl b/unsupported/affiliblatt/templates/de/html/ext/ext_affiliblatt.tpl
new file mode 100644 (file)
index 0000000..a340027
--- /dev/null
@@ -0,0 +1,5 @@
+Erweiterung zur Anbindung an die API (Interface 2.0!) von [<a
+ href="http://www.affiliblatt.de/?sid=MTAzNQ==&site=home" target="_blank" rel="external"
+ title="Referal-Link, bitte ID stehen lassen!">AffiliBlatt</a>]. Diese Erweiterung
+muss aktiviert sein, damit die t&auml;glichen freien Abfragen wieder
+zur&uuml;ckgesetzt werden.
diff --git a/unsupported/gollox/inc/extensions/ext-gollox.php b/unsupported/gollox/inc/extensions/ext-gollox.php
new file mode 100644 (file)
index 0000000..cf0d87b
--- /dev/null
@@ -0,0 +1,142 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 08/27/2008 *
+ * ================                             Last change: 08/27/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-gollox.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Extension for contacting the API of GolloX       *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Erweitertung zur Anbindung an die API von        *
+ *                     GolloX                                           *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+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");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_id` BIGINT(20) NOT NULL DEFAULT 0";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_sid` BIGINT(20) NOT NULL DEFAULT 0";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_passwd` VARCHAR(255) NOT NULL DEFAULT ''";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8)."";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 60";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_total` SMALLINT(6) NOT NULL DEFAULT 200";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200";
+
+       // Admin menu
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_gollox','GolloX Interface 2.0','Einstellungen zum GolloX Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_gollox_tm','GolloX Textmails','Listet Textmail-Buchungen &uuml;ber das Interface 2.0 von GolloX nach Ihren eingestellten Kriterien auf. <strong>Vorsicht:</strong> 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) NOT NULL AUTO_INCREMENT,
+`type` VARCHAR(255) NOT NULL DEFAULT 'general',
+`y_id` BIGINT(20) NOT NULL DEFAULT 0,
+`y_reload` SMALLINT(6) 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
new file mode 100644 (file)
index 0000000..63d5523
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/10/2008 *
+ * ===============                              Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : gollox_de.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : German langugage support                         *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Deutsche Sprachunterstuetzung                    *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Admin config strings
+define('ADMIN_CONFIG_GOLLOX_TITLE', "Einstellungen f&uuml;r GolloX Interface 2.0");
+define('ADMIN_CONFIG_GOLLOX_ID', "Ihre User-ID:");
+define('ADMIN_CONFIG_GOLLOX_SID', "Seiten-ID:");
+define('ADMIN_CONFIG_GOLLOX_PASSWD', "Interface-Passwort:");
+define('ADMIN_CONFIG_GOLLOX_TM_MAX_RELOAD', "Maximale Reloadsperre der Kampagnen in Stunden:");
+define('ADMIN_CONFIG_GOLLOX_TM_MIN_WAIT', "Mindestaufenthalt in Sekunden:");
+define('ADMIN_CONFIG_GOLLOX_TM_CLICKS_REMAIN', "Mindestanzahl der restlichen Klicks:");
+define('ADMIN_CONFIG_GOLLOX_TM_MIN_PAY', "Mindestverg&uuml;tung der Kampagne:");
+define('ADMIN_CONFIG_GOLLOX_EROTIC_ALLOWED', "Kampagnen mit erotischen Inhalt anzeigen?");
+define('ADMIN_CONFIG_GOLLOX_EROTIC_NONE', "Keine Erotik anzeigen");
+define('ADMIN_CONFIG_GOLLOX_EROTIC_INCLUDE', "Auch Erotik anzeigen");
+define('ADMIN_CONFIG_GOLLOX_EROTIC_ONLY', "Nur Erotik anzeigen");
+define('ADMIN_CONFIG_GOLLOX_EROTIC_NOTE', "<strong>Hinweise:</strong> 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&ouml;scht oder gesperrt.");
+define('ADMIN_CONFIG_GOLLOX_TEST_FAILED', "Konfigurationsdaten stimmen nicht &uuml;berein. Details entnehmen Sie bitte der Datei <u>inc/cache/debug.log</u>.");
+
+// Generic admin strings
+define('ADMIN_GOLLOX_REQUESTS_DEPLETED', "Ihr Abfragekonto der API ist ersch&ouml;pft. Bitte surfen Sie auf <a href=\"http://www.gollox.de\" target=\"_blank\">www.GolloX.de</a> und loggen Sie sich ein, um manuell Mails zu versenden.");
+define('ADMIN_GOLLOX_INVALID_RESULT', "Ung&uuml;ltige Antwort von der API erhalten. Ist <a href=\"http://www.gollox.de\" target=\"_blank\">www.gollox.de</a> 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 <strong>%s</strong> bereits versendet.");
+define('ADMIN_GOLLOX_TEXTMAIL_SEND_AGAIN', "Textmail kann in <strong>%s</strong> 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', "<strong>Hinweise:</strong> Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie k&ouml;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&uuml;gbaren Empf&auml;nger ausgew&auml;hlt.");
+
+// Subject lines
+define('ADMIN_GOLLOX_SUBJECT_PREFIX', "Paidmail:");
+define('ADMIN_GOLLOX_ENTER_URL_NOTE', "Die URL wird automatisch f&uuml;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 &uuml;brig");
+define('ADMIN_GOLLOX_TM_PAY', "Verg&uuml;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&auml;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&ouml;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
new file mode 100644 (file)
index 0000000..86151ac
--- /dev/null
@@ -0,0 +1,369 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/10/2008 *
+ * ===============                              Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : gollox_functions.php                             *
+ * -------------------------------------------------------------------- *
+ * Short description : Special functions for gollox extension           *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Spezielle Funktion fuer GolloX-Erweiterung       *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Test if the extension settings did work
+function GOLLOX_TEST_CONFIG ($data) {
+       global $_CONFIG;
+
+       // Is this admin?
+       if (!IS_ADMIN()) {
+               // No admin!
+               return false;
+       } // END - if
+
+       // Transfer config data
+       $_CONFIG = array_merge($_CONFIG, $data);
+
+       // Temporary allow maximum
+       $_CONFIG['gollox_tm_max_reload']    = 1000;
+       $_CONFIG['gollox_tm_min_wait']      = 0;
+       $_CONFIG['gollox_tm_clicks_remain'] = 10;
+       $_CONFIG['gollox_tm_min_pay']       = 0;
+       $_CONFIG['gollox_erotic_allowed']   = 1;
+
+       // Query the API with a test request without couting it
+       // If zero reply comes back the data is invalid!
+       $response = GOLLOX_QUERY_API("out_textmail.php", true); // TODO Ask GolloX for test script
+
+       // Log the response if failed
+       if (count($response) == 0) {
+               // Queries depleted (as we count here!)
+               DEBUG_LOG(__FUNCTION__, __LINE__, " Requested depleted. Maxmimum was: ".$_CONFIG['gollox_requests_total']);
+       } elseif (count($response) <= 10) {
+               // Log serialized raw response
+               DEBUG_LOG(__FUNCTION__, __LINE__, " Raw response=".base64_encode(serialize($response)));
+       } // END - if
+
+       // Do we have some data there?
+       return (count($response) > 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
new file mode 100644 (file)
index 0000000..ef99505
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/10/2008 *
+ * ================                             Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-gollox.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Setup default statistics mode                    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Standart Modus der Statistiken einstellen        *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} elseif ((!EXT_IS_ACTIVE("gollox")) && (!IS_ADMIN())) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "gollox");
+       return;
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", __FILE__);
+
+// Was the form submitted?
+if (isset($_POST['ok'])) {
+       // Test GolloX config
+       if (GOLLOX_TEST_CONFIG($_POST)) {
+               // Save settings
+               ADMIN_SAVE_SETTINGS($_POST);
+       } else {
+               // Config not saved
+               LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_CONFIG_GOLLOX_TEST_FAILED);
+       }
+} else {
+       // Prepare content
+       $content = array(
+               'gollox_id'               => 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
new file mode 100644 (file)
index 0000000..60118c5
--- /dev/null
@@ -0,0 +1,142 @@
+<?php
+/************************************************************************
+ * M-XChange v0.2.1                                   Start: 10/10/2008 *
+ * ================                             Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-list_gollox_tm.php                          *
+ * -------------------------------------------------------------------- *
+ * Short description : List GolloX text mails                           *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auflisten von GolloX-Textmails                   *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software. You can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License.       *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
+       require($INC);
+} elseif (!EXT_IS_ACTIVE("gollox")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "gollox");
+       return;
+} elseif (!EXT_IS_ACTIVE("bonus")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus");
+       return;
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", __FILE__);
+
+// Do actions here
+if (isset($_POST['ok'])) {
+       // Prepare mail for delivery
+       GOLLOX_PREPARE_MAIL_DELIVERY($_POST);
+       return;
+} elseif (isset($_POST['sent'])) {
+       // Sent mail
+       GOLLOX_SEND_BONUS_MAIL($_POST, "normal");
+} elseif (isset($_POST['remove'])) {
+       // Add mail to exclude list
+       GOLLOX_EXCLUDE_MAIL($_POST, "normal");
+} elseif (isset($_POST['unlist'])) {
+       // Remove mail from exclude list
+       GOLLOX_UNLIST_MAIL($_POST, "normal");
+}
+
+// Enougth queries left?
+if ($_CONFIG['gollox_requests_remain'] == 0) {
+       // Output message
+       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_GOLLOX_REQUESTS_DEPLETED);
+
+       // Abort here!
+       return false;
+} // END - if
+
+// Get parsed array back
+$result = GOLLOX_GET_PARSED_RESULT_TEXTMAILS();
+
+// Sanity-check on result array
+if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) {
+       // Invalid result
+       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_GOLLOX_INVALID_RESULT);
+       return false;
+} elseif (count($result[0]) < 7) {
+       // Error received so prepare error code
+       $code = explode(" ", $result[0]['id']);
+       $code = $code[0];
+       $code = explode("<br>", $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
new file mode 100644 (file)
index 0000000..d152d1a
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/10/2008 *
+ * ===============                              Last change: 10/10/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : reset_gollox.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} elseif (!EXT_IS_ACTIVE("gollox")) {
+       return;
+}
+
+// Do not execute when script is in CSS mode or no daily reset
+if (($CSS == 1) || (!defined('__DAILY_RESET'))) return;
+
+// Simply reset the requests here
+UPDATE_CONFIG("gollox_requests_remain", $_CONFIG['gollox_requests_total']);
+
+//
+?>
diff --git a/unsupported/gollox/templates/de/html/admin/admin_config_gollox.tpl b/unsupported/gollox/templates/de/html/admin/admin_config_gollox.tpl
new file mode 100644 (file)
index 0000000..3c6219f
--- /dev/null
@@ -0,0 +1,96 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=config_gollox" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="500">
+<tr>
+       <td colspan="2" align="center" class="admin_title bottom2" height="30">
+               <strong>{--ADMIN_CONFIG_GOLLOX_TITLE--}</strong>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_GOLLOX_ID--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="5" maxlength="20" name="gollox_id" value="$content[gollox_id]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_GOLLOX_SID--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="5" maxlength="20" name="gollox_sid" value="$content[gollox_sid]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_GOLLOX_PASSWD--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="20" maxlength="255" name="gollox_passwd" value="$content[gollox_passwd]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_GOLLOX_TM_MAX_RELOAD--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="3" maxlength="6" name="gollox_tm_max_reload" value="$content[gollox_tm_max_reload]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_GOLLOX_TM_MIN_WAIT--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="3" maxlength="6" name="gollox_tm_min_wait" value="$content[gollox_tm_min_wait]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_GOLLOX_TM_CLICKS_REMAIN--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="5" maxlength="20" name="gollox_tm_clicks_remain" value="$content[gollox_tm_clicks_remain]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_GOLLOX_TM_MIN_PAY--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <input type="text" class="admin_normal" size="3" maxlength="6" name="gollox_tm_min_pay" value="$content[gollox_tm_min_pay]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" width="300" height="30">
+               {--ADMIN_CONFIG_GOLLOX_EROTIC_ALLOWED--}
+       </td>
+       <td width="200" style="padding-left: 10px">
+               <select name="gollox_erotic_allowed" class="admin_select" size="1">
+                       <option value="0"{!__CFG_GOLLOX_EROTIC_NONE!}>{--ADMIN_CONFIG_GOLLOX_EROTIC_NONE--}</option>
+                       <option value="1"{!__CFG_GOLLOX_EROTIC_INCLUDE!}>{--ADMIN_CONFIG_GOLLOX_EROTIC_INCLUDE--}</option>
+                       <option value="2"{!__CFG_GOLLOX_EROTIC_ONLY!} />{--ADMIN_CONFIG_GOLLOX_EROTIC_ONLY--}</option>
+               </select>
+       </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td colspan="2" class="admin_footer">
+               <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+               <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" />
+       </td>
+</tr>
+</table>
+</form>
+
+<div class="admin_note">
+       {--ADMIN_CONFIG_GOLLOX_EROTIC_NOTE--}
+</div>
diff --git a/unsupported/gollox/templates/de/html/admin/admin_gollox_error.tpl b/unsupported/gollox/templates/de/html/admin/admin_gollox_error.tpl
new file mode 100644 (file)
index 0000000..21d31f6
--- /dev/null
@@ -0,0 +1,8 @@
+<TABLE border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="400">
+       <TR>
+               <TD class="admin_title bottom2">{--ADMIN_GOLLOX_ERROR_TITLE--}</TD>
+       </TR>
+       <TR>
+               <TD align="center"><STRONG>$content</STRONG></TD>
+       </TR>
+</TABLE>
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
new file mode 100644 (file)
index 0000000..4b4794e
--- /dev/null
@@ -0,0 +1,22 @@
+<table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed">
+<tr>
+       <td colspan="7" class="admin_title" height="30">
+               <strong>{--ADMIN_LIST_GOLLOX_TITLE--}</strong>
+       </td>
+</tr>
+<tr>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_GOLLOX_TM_ID--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_GOLLOX_TM_NAME--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_GOLLOX_TM_RELOAD--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_GOLLOX_TM_WAIT--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_GOLLOX_TM_REMAIN--}</strong></td>
+       <td class="admin_title bottom2 right2"><strong>{--ADMIN_GOLLOX_TM_PAY--}</strong></td>
+       <td class="admin_title bottom2" width="280"><strong>{--ADMIN_GOLLOX_TM_ACTIONS--}</strong></td>
+</tr>
+$content
+<tr>
+       <td colspan="7" class="admin_footer">
+               <span class="admin_note">{--ADMIN_LIST_GOLLOX_NOTE--}</span>
+       </td>
+</tr>
+</table>
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
new file mode 100644 (file)
index 0000000..23363e8
--- /dev/null
@@ -0,0 +1,22 @@
+<tr>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[id]</td>
+       <td class="switch_sw$content[sw] bottom2 right2">&nbsp;$content[name]</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[reload] {--_HOURS--}</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[wait] {--_SECONDS--}</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[remain]</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[pay] &euro;</td>
+       <td class="switch_sw$content[sw] bottom2" style="padding:2px">
+               <table border="0" cellspacing="0" cellpadding="0" width="100%">
+               <tr>
+                       <td align="center">
+                               $content[already]
+                               <form action="{!URL!}/modules.php?module=admin&amp;what=list_gollox_tm" method="post" style="padding-bottom:0px">
+                               <input type="hidden" name="id" value="$content[id]" />
+                               <input type="hidden" name="reload" value="$content[reload]" />
+                               <input type="submit" class="admin_delete" name="unlist" value="{--ADMIN_GOLLOX_UNLIST_MAIL--}" />
+                               </form>
+                       </td>
+               </tr>
+               </table>
+       </td>
+</tr>
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
new file mode 100644 (file)
index 0000000..4bcbf29
--- /dev/null
@@ -0,0 +1,23 @@
+<tr>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[id]</td>
+       <td class="switch_sw$content[sw] bottom2 right2">&nbsp;$content[name]</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[reload] {--_HOURS--}</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[wait] {--_SECONDS--}</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[remain]</td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[pay] &euro;</td>
+       <td class="switch_sw$content[sw] bottom2" align="center" style="padding-left:1px;padding-right:1px;padding-top:2px;padding-bottom:2px">
+               <form action="{!URL!}/modules.php?module=admin&amp;what=list_gollox_tm" method="post" style="padding-bottom:0px">
+                       <input type="hidden" name="id" value="$content[id]" />
+                       <input type="hidden" name="name" value="$content[name]" />
+                       <input type="hidden" name="wait" value="$content[wait]" />
+                       <input type="hidden" name="text" value="$content[text]" />
+                       <input type="hidden" name="reload" value="$content[reload]" />
+                       <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                       <tr>
+                               <td><input type="submit" class="admin_submit" name="ok" value="{--ADMIN_GOLLOX_PREPARE_MAIL--}" /></td>
+                               <td><input type="submit" class="admin_delete" name="remove" value="{--ADMIN_GOLLOX_REMOVE_MAIL--}" /></td>
+                       </tr>
+                       </table>
+               </form>
+       </td>
+</tr>
diff --git a/unsupported/gollox/templates/de/html/admin/admin_send_gollox.tpl b/unsupported/gollox/templates/de/html/admin/admin_send_gollox.tpl
new file mode 100644 (file)
index 0000000..268d065
--- /dev/null
@@ -0,0 +1,77 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=list_gollox_tm" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed" align="center">
+<tr>
+       <td colspan="2" class="admin_title bottom2" height="30">
+               <strong>{--ADMIN_GOLLOX_SEND_MAIL_TITLE--}</strong>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="10">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--SELECT_CATEGORY--}:</td>
+       <td>
+               <select name="cat" size="1" class="admin_select">
+                       <option value="" disabled>{--PLEASE_SELECT--}</option>
+                       <option value="0">{--ALL_MEMBERS--} ($content[all])</option>
+                       $content[categories]
+               </select>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td width="150" align="right" style="padding-right:5px" valign="top">{--ENTER_RECEIVER--}:</td>
+       <td width="530">
+               <span class="admin_note"><em>{--ADMIN_GOLLOX_RECEIVER_ARE_ALL_NOTE--}</em></span>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--ENTER_POINTS--}:</td>
+       <td>
+               <input type="text" name="points" class="admin_normal" size="4" maxlength="5" value="$content[reward]" /> {!POINTS!}
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--ENTER_SECONDS--}:</td>
+       <td>
+               <input type="text" name="seconds" class="admin_normal" size="4" maxlength="5" value="$content[wait]" /> {--_SECONDS--}
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--ENTER_SUBJECT--}:</td>
+       <td>
+               <input type="text" name="subject" class="admin_normal" size="30" maxlength="150" value="{--ADMIN_GOLLOX_SUBJECT_PREFIX--} $content[name]" />
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px" valign="top">{--ENTER_TEXT--}:</td>
+       <td>
+               <textarea name="text" class="admin_normal" rows="8" cols="60">$content[text]</textarea>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="10">&nbsp;</td></tr>
+<tr>
+       <td align="right" style="padding-right:5px">{--MEMBER_ENTER_URL--}:</td>
+       <td>
+               http://www.gollox.de/code/t-mail.php?id=$content[id]&amp;sid=$content[sid]
+               <input type="hidden" name="id" value="$content[id]" />
+               <input type="hidden" name="sid" value="$content[sid]" />
+               <input type="hidden" name="reload" value="$content[reload]" />
+       </td>
+</tr>
+<tr>
+       <td colspan="2" align="center">
+               <span class="admin_note"><em>{--ADMIN_GOLLOX_ENTER_URL_NOTE--}</em></span>
+       </td>
+</tr>
+<tr><td colspan="2" class="seperator bottom2" height="10">&nbsp;</td></tr>
+<tr>
+       <td colspan="2" align="center" class="admin_footer">
+               <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+               <input type="submit" name="sent" class="admin_submit" value="{--ADMIN_SEND_MAIL--}" />
+       </td>
+</tr>
+</table>
+</form>
diff --git a/unsupported/gollox/templates/de/html/ext/ext_gollox.tpl b/unsupported/gollox/templates/de/html/ext/ext_gollox.tpl
new file mode 100644 (file)
index 0000000..acc6850
--- /dev/null
@@ -0,0 +1,5 @@
+Erweiterung zur Anbindung an die API (Interface 2.0!) von [<a
+ href="http://www.gollox.de/?id=720" target="_blank" rel="external"
+ title="Referal-Link, bitte ID stehen lassen!">GolloX</a>]. Diese Erweiterung
+muss aktiviert sein, damit die t&auml;glichen freien Abfragen wieder
+zur&uuml;ckgesetzt werden.