-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1 Start: 10/07/2004 *\r
- * ================ Last change: 07/08/2007 *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * File : ext-transfer.php *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Point transfers between members *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung : Punktetransfers zwischen Mitgliedern *\r
- * -------------------------------------------------------------------- *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 by Roland Haeder *\r
- * For more information visit: http://www.mxchange.org *\r
- * *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or *\r
- * (at your option) any later version. *\r
- * *\r
- * This program is distributed in the hope that it will be useful, *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\r
- * GNU General Public License for more details. *\r
- * *\r
- * You should have received a copy of the GNU General Public License *\r
- * along with this program; if not, write to the Free Software *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *\r
- * MA 02110-1301 USA *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))\r
-{\r
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
- require($INC);\r
-}\r
-\r
-// Version number\r
-$EXT_VERSION = "0.2.9";\r
-\r
-// Auto-set extension version\r
-if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;\r
-\r
-// Version history array (add more with , "0.1" and so on)\r
-$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9");\r
-\r
-switch ($EXT_LOAD_MODE)\r
-{\r
-case "register": // Do stuff when installtion is running\r
- // SQL commands to run\r
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_in";\r
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_out";\r
-\r
- // Transfer from a member\r
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_in (\r
-id bigint(20) not null auto_increment,\r
-userid bigint(20) not null default '0',\r
-from_uid bigint(20) not null default '0',\r
-points bigint(20) not null default '0',\r
-reason varchar(255) not null default '',\r
-time_trans varchar(14) not null default '0',\r
-trans_id varchar(12) not null default '',\r
-KEY (userid),\r
-KEY (from_uid),\r
-PRIMARY KEY(id)\r
-) Type=MyISAM";\r
-\r
- // Transfers to a member\r
- $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_out (\r
-id bigint(20) not null auto_increment,\r
-userid bigint(20) not null default '0',\r
-to_uid bigint(20) not null default '0',\r
-points bigint(20) not null default '0',\r
-reason varchar(255) not null default '',\r
-time_trans varchar(14) not null default '0',\r
-trans_id varchar(12) not null default '',\r
-KEY (userid),\r
-KEY (to_uid),\r
-PRIMARY KEY(id)\r
-) Type=MyISAM";\r
-\r
- // Admin menu\r
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('transfer', '', '{!POINTS!}-Transfer', 'Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)";\r
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('transfer', 'list_transfer', 'Auflisten', 'Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)";\r
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('transfer', 'config_transfer', 'Einstellungen', 'Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)";\r
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('transfer', 'del_transfer', 'Manuell löschen', 'Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)";\r
-\r
- // Member menu\r
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES ('main', 'transfer', '{!POINTS!}-Transfer', 'Y', 'Y', 5)";\r
-\r
- // Add config values\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_max bigint(20) not null default '50'";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_age bigint(20) not null default '".(ONE_DAY*28)."'";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_timeout bigint(20) not null default '".ONE_DAY."'";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_balance bigint(20) not null default '100'";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_code bigint(20) not null default '5'";\r
-\r
- // Add row(s) to user's data\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD opt_in enum('Y', 'N') not null default 'N'";\r
- break;\r
-\r
-case "remove": // Do stuff when removing extension\r
- // SQL commands to run\r
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_in";\r
- $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_out";\r
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='transfer' LIMIT 4";\r
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='transfer' LIMIT 1";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_max";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_age";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_timeout";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_balance";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_code";\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP opt_in";\r
- break;\r
-\r
-case "activate": // Do stuff when admin activates this extension\r
- // SQL commands to run\r
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1";\r
- break;\r
-\r
-case "deactivate": // Do stuff when admin deactivates this extension\r
- // SQL commands to run\r
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='transfer' LIMIT 1";\r
- break;\r
-\r
-case "update": // Update an extension\r
- switch ($EXT_VER)\r
- {\r
- case "0.0.2": // SQL queries for v0.0.2\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Fehler <FONT class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227</FONT> behoben.";\r
- break;\r
-\r
- case "0.0.3": // SQL queries for v0.0.3\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt.";\r
- break;\r
-\r
- case "0.0.3": // SQL queries for v0.0.3\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.";\r
- break;\r
-\r
- case "0.0.5": // SQL queries for v0.0.5\r
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_transfer enum('Y', 'N') not null default 'Y'";\r
-\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Link <I>Auflisten</LI> im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!";\r
- break;\r
-\r
- case "0.0.6": // SQL queries for v0.0.6\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.";\r
- break;\r
-\r
- case "0.0.7": // SQL queries for v0.0.7\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";\r
- break;\r
-\r
- case "0.0.8": // SQL queries for v0.0.8\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Problem mit E in Transaktionsnummer beseitigt.";\r
- break;\r
-\r
- case "0.0.9": // SQL queries for v0.0.9\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt.";\r
- break;\r
-\r
- case "0.1.0": // SQL queries for v0.1.0\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.";\r
- break;\r
-\r
- case "0.1.1": // SQL queries for v0.1.1\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Design "Solid-Business" eingebaut.";\r
- break;\r
-\r
- case "0.1.2": // SQL queries for v0.1.2\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Seit <A href=\"".SERVER_URL."/patches/340-Gast_Mitgliedsmenue_Deaktivieren.zip\">Patch 340</A> überflüssige HTML-Tags entfernt.";\r
- break;\r
-\r
- case "0.1.3": // SQL queries for v0.1.3\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.";\r
- break;\r
-\r
- case "0.1.4": // SQL queries for v0.1.4\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion <U>ADMIN_USER_PROFILE_LINK()</U> ausgelagert.";\r
- break;\r
-\r
- case "0.1.5": // SQL queries for v0.1.5\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Template <u>admin_config_transfer_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!";\r
- break;\r
-\r
- case "0.1.6": // SQL queries for v0.1.6\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Wörter <STRONG>Mailtausch</STRONG>, <STRONG>Mailtausches</STRONG> und <STRONG>Mailtauscher</STRONG> sind austauschbar.";\r
- break;\r
-\r
- case "0.1.7": // SQL queries for v0.1.7\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Wort <STRONG>Punkte</STRONG> dynamisiert.";\r
- break;\r
-\r
- case "0.1.8": // SQL queries for v0.1.8\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.";\r
- break;\r
-\r
- case "0.1.9": // SQL queries for v0.1.9\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Parser-Error im Mitgliedsbereich beseitigt.";\r
- break;\r
-\r
- case "0.2.0": // SQL queries for v0.2.0\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Abspeichern von Einstellungen repariert.";\r
- break;\r
-\r
- case "0.2.1": // SQL queries for v0.2.1\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Durchführung des Transfers korregiert.";\r
- break;\r
-\r
- case "0.2.2": // SQL queries for v0.2.2\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle.";\r
- break;\r
-\r
- case "0.2.3": // SQL queries for v0.2.3\r
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')";\r
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')";\r
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')";\r
-\r
- // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin\r
- $EXT_UPDATE_DEPENDS = "sql_patches";\r
-\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Erweiterung in's neue Menüsystem integriert.";\r
- break;\r
-\r
- case "0.2.4": // SQL queries for v0.2.4\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "<STRONG>Touring-Code wiederholen</STRONG> nach <STRONG>Touring-Code eingeben</STRONG> hin geändert.";\r
- break;\r
-\r
- case "0.2.5": // SQL queries for v0.2.5\r
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='5' WHERE what='transfer' LIMIT 1";\r
-\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Mitgliedsmenü komplett geändert.";\r
- break;\r
-\r
- case "0.2.6": // SQL queries for v0.2.6\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Hash-Erstellung von <STRONG>md5()</STRONG> auf bessere Funktion <STRONG>generateHash()</STRONG> umgestellt.";\r
- break;\r
-\r
- case "0.2.7": // SQL queries for v0.2.7\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Die ".POINTS." können nun wieder wie gewohnt transferiert werden. Der Grund für <em>".TRANSFER_INVALID_PASSWORD."</em> war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/";\r
- break;\r
-\r
- case "0.2.8": // SQL queries for v0.2.8\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Fehlermeldung <em>Notice: Undefined index: to_uid in ".PATH."/inc/modules/member/what-transfer.php on line 301</em> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-8.html\" target=\"_blank\" title=\"Forumprofil von Piter01\">Piter01</a>.";\r
- break;\r
-\r
- case "0.2.9": // SQL queries for v0.2.9\r
- // Update notes (these will be set as task text!)\r
- $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert.";\r
- break;\r
- }\r
- break;\r
-\r
-default: // Do stuff when extension is loaded\r
- $DUMMY = LOAD_CONFIG("0");\r
- // Maximum of listed transfers for out- and in-transfers\r
- $CONFIG['transfer_max'] = $DUMMY['transfer_max'];\r
- // Age in seconds\r
- $CONFIG['transfer_age'] = $DUMMY['transfer_age'];\r
- // Lock timeout for member settings\r
- $CONFIG['transfer_timeout'] = $DUMMY['transfer_timeout'];\r
- // Balance after points transfer\r
- $CONFIG['transfer_balance'] = $DUMMY['transfer_balance'];\r
- // Length of touring code\r
- $CONFIG['transfer_code'] = $DUMMY['transfer_code'];\r
- // Length of touring code\r
- $CONFIG['ap_transfer'] = $DUMMY['ap_transfer'];\r
- unset($DUMMY);\r
-\r
- if ((defined('__DAILY_RESET')) && ($CONFIG['ap_transfer'] == "Y"))\r
- {\r
- // Automatically remove outdated or not displayed transactions\r
- TRANSFER_AUTPPURGE($CONFIG['transfer_max'], $CONFIG['transfer_age']);\r
- }\r
- break;\r
-}\r
-// Language file prefix\r
-$EXT_LANG_PREFIX = "transfer";\r
-\r
-// Extension is always active?\r
-$EXT_ALWAYS_ACTIVE = "N";\r
-\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 10/07/2004 *
+ * ================ Last change: 07/08/2007 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : ext-transfer.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Point transfers between members *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Punktetransfers zwischen Mitgliedern *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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 ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
+{
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.2.9";
+
+// 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", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running
+ // SQL commands to run
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_in";
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_out";
+
+ // Transfer from a member
+ $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_in (
+id bigint(20) not null auto_increment,
+userid bigint(20) not null default '0',
+from_uid bigint(20) not null default '0',
+points bigint(20) not null default '0',
+reason varchar(255) not null default '',
+time_trans varchar(14) not null default '0',
+trans_id varchar(12) not null default '',
+KEY (userid),
+KEY (from_uid),
+PRIMARY KEY(id)
+) Type=MyISAM";
+
+ // Transfers to a member
+ $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_out (
+id bigint(20) not null auto_increment,
+userid bigint(20) not null default '0',
+to_uid bigint(20) not null default '0',
+points bigint(20) not null default '0',
+reason varchar(255) not null default '',
+time_trans varchar(14) not null default '0',
+trans_id varchar(12) not null default '',
+KEY (userid),
+KEY (to_uid),
+PRIMARY KEY(id)
+) Type=MyISAM";
+
+ // Admin menu
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('transfer', '', '{!POINTS!}-Transfer', 'Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('transfer', 'list_transfer', 'Auflisten', 'Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('transfer', 'config_transfer', 'Einstellungen', 'Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('transfer', 'del_transfer', 'Manuell löschen', 'Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)";
+
+ // Member menu
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES ('main', 'transfer', '{!POINTS!}-Transfer', 'Y', 'Y', 5)";
+
+ // Add config values
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_max bigint(20) not null default '50'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_age bigint(20) not null default '".(ONE_DAY*28)."'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_timeout bigint(20) not null default '".ONE_DAY."'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_balance bigint(20) not null default '100'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_code bigint(20) not null default '5'";
+
+ // Add row(s) to user's data
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD opt_in enum('Y', 'N') not null default 'N'";
+ break;
+
+case "remove": // Do stuff when removing extension
+ // SQL commands to run
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_in";
+ $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_out";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='transfer' LIMIT 4";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_max";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_age";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_timeout";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_balance";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP transfer_code";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP opt_in";
+ break;
+
+case "activate": // Do stuff when admin activates this extension
+ // SQL commands to run
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1";
+ break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='transfer' LIMIT 1";
+ break;
+
+case "update": // Update an extension
+ switch ($EXT_VER)
+ {
+ case "0.0.2": // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Fehler <FONT class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227</FONT> behoben.";
+ break;
+
+ case "0.0.3": // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt.";
+ break;
+
+ case "0.0.3": // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.";
+ break;
+
+ case "0.0.5": // SQL queries for v0.0.5
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_transfer enum('Y', 'N') not null default 'Y'";
+
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Link <I>Auflisten</LI> im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!";
+ break;
+
+ case "0.0.6": // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.";
+ break;
+
+ case "0.0.7": // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";
+ break;
+
+ case "0.0.8": // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Problem mit E in Transaktionsnummer beseitigt.";
+ break;
+
+ case "0.0.9": // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt.";
+ break;
+
+ case "0.1.0": // SQL queries for v0.1.0
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.";
+ break;
+
+ case "0.1.1": // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Design "Solid-Business" eingebaut.";
+ break;
+
+ case "0.1.2": // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Seit <A href=\"".SERVER_URL."/patches/340-Gast_Mitgliedsmenue_Deaktivieren.zip\">Patch 340</A> überflüssige HTML-Tags entfernt.";
+ break;
+
+ case "0.1.3": // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.";
+ break;
+
+ case "0.1.4": // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion <U>ADMIN_USER_PROFILE_LINK()</U> ausgelagert.";
+ break;
+
+ case "0.1.5": // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Template <u>admin_config_transfer_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!";
+ break;
+
+ case "0.1.6": // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Wörter <STRONG>Mailtausch</STRONG>, <STRONG>Mailtausches</STRONG> und <STRONG>Mailtauscher</STRONG> sind austauschbar.";
+ break;
+
+ case "0.1.7": // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Wort <STRONG>Punkte</STRONG> dynamisiert.";
+ break;
+
+ case "0.1.8": // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.";
+ break;
+
+ case "0.1.9": // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Parser-Error im Mitgliedsbereich beseitigt.";
+ break;
+
+ case "0.2.0": // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Abspeichern von Einstellungen repariert.";
+ break;
+
+ case "0.2.1": // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Durchführung des Transfers korregiert.";
+ break;
+
+ case "0.2.2": // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle.";
+ break;
+
+ case "0.2.3": // SQL queries for v0.2.3
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')";
+
+ // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
+ $EXT_UPDATE_DEPENDS = "sql_patches";
+
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Erweiterung in's neue Menüsystem integriert.";
+ break;
+
+ case "0.2.4": // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "<STRONG>Touring-Code wiederholen</STRONG> nach <STRONG>Touring-Code eingeben</STRONG> hin geändert.";
+ break;
+
+ case "0.2.5": // SQL queries for v0.2.5
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='5' WHERE what='transfer' LIMIT 1";
+
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Mitgliedsmenü komplett geändert.";
+ break;
+
+ case "0.2.6": // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Hash-Erstellung von <STRONG>md5()</STRONG> auf bessere Funktion <STRONG>generateHash()</STRONG> umgestellt.";
+ break;
+
+ case "0.2.7": // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Die ".POINTS." können nun wieder wie gewohnt transferiert werden. Der Grund für <em>".TRANSFER_INVALID_PASSWORD."</em> war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/";
+ break;
+
+ case "0.2.8": // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Fehlermeldung <em>Notice: Undefined index: to_uid in ".PATH."/inc/modules/member/what-transfer.php on line 301</em> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-8.html\" target=\"_blank\" title=\"Forumprofil von Piter01\">Piter01</a>.";
+ break;
+
+ case "0.2.9": // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert.";
+ break;
+ }
+ break;
+
+default: // Do stuff when extension is loaded
+ $DUMMY = LOAD_CONFIG("0");
+ // Maximum of listed transfers for out- and in-transfers
+ $CONFIG['transfer_max'] = $DUMMY['transfer_max'];
+ // Age in seconds
+ $CONFIG['transfer_age'] = $DUMMY['transfer_age'];
+ // Lock timeout for member settings
+ $CONFIG['transfer_timeout'] = $DUMMY['transfer_timeout'];
+ // Balance after points transfer
+ $CONFIG['transfer_balance'] = $DUMMY['transfer_balance'];
+ // Length of touring code
+ $CONFIG['transfer_code'] = $DUMMY['transfer_code'];
+ // Length of touring code
+ $CONFIG['ap_transfer'] = $DUMMY['ap_transfer'];
+ unset($DUMMY);
+
+ if ((defined('__DAILY_RESET')) && ($CONFIG['ap_transfer'] == "Y"))
+ {
+ // Automatically remove outdated or not displayed transactions
+ TRANSFER_AUTPPURGE($CONFIG['transfer_max'], $CONFIG['transfer_age']);
+ }
+ break;
+}
+// Language file prefix
+$EXT_LANG_PREFIX = "transfer";
+
+// Extension is always active?
+$EXT_ALWAYS_ACTIVE = "N";
+
+//
+?>