2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 06/27/2013 *
4 * =================== Last change: 06/27/2013 *
6 * -------------------------------------------------------------------- *
7 * File : mode-update.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Payout extension *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Auszahlung-Erweiterung *
12 * -------------------------------------------------------------------- *
13 * Copyright (c) 2003 - 2009 by Roland Haeder *
14 * Copyright (c) 2009 - 2013 by Mailer Developer Team *
15 * For more information visit: http://mxchange.org *
17 * This program is free software; you can redistribute it and/or modify *
18 * it under the terms of the GNU General Public License as published by *
19 * the Free Software Foundation; either version 2 of the License, or *
20 * (at your option) any later version. *
22 * This program is distributed in the hope that it will be useful, *
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
25 * GNU General Public License for more details. *
27 * You should have received a copy of the GNU General Public License *
28 * along with this program; if not, write to the Free Software *
29 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
31 ************************************************************************/
33 // Some security stuff...
34 if (!defined('__SECURITY')) {
38 // @TODO Remove double tabs from all lines
39 switch (getCurrentExtensionVersion()) {
40 case '0.1.2': // SQL queries for v0.1.2
41 addAdminMenuSql('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.',8);
42 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='payouts',`title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1");
44 // Update notes (these will be set as task text!)
45 setExtensionUpdateNotes("Adminmenü hinzugefügt.");
48 case '0.1.3': // SQL queries for v0.1.3
49 addExtensionAddTableColumnSql('payout_types', 'from_account', "VARCHAR(255) NOT NULL DEFAULT ''");
50 addExtensionAddTableColumnSql('payout_types', 'from_pass', "VARCHAR(255) NOT NULL DEFAULT ''");
51 addExtensionAddTableColumnSql('payout_types', 'engine_url', "VARCHAR(255) NOT NULL DEFAULT ''");
52 addExtensionAddTableColumnSql('payout_types', 'engine_ret_ok', "VARCHAR(255) NOT NULL DEFAULT ''");
53 addExtensionAddTableColumnSql('payout_types', 'engine_ret_failed', "VARCHAR(255) NOT NULL DEFAULT ''");
54 addExtensionAddTableColumnSql('payout_types', 'pass_enc', "ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
56 // Update notes (these will be set as task text!)
57 setExtensionUpdateNotes("Daten für API-Auszahlung hinzugefügt.");
60 case '0.1.4': // SQL queries for v0.1.4
61 addExtensionAddTableColumnSql('user_payouts', 'password', "VARCHAR(255) NOT NULL DEFAULT ''");
63 // Update notes (these will be set as task text!)
64 setExtensionUpdateNotes("Passwort für Auszahlungsarten hinzugefügt (API).");
67 case '0.1.5': // SQL queries for v0.1.5
68 addExtensionAddTableColumnSql('user_payouts', 'target_url', 'LONGTEXT NOT NULL');
69 addExtensionAddTableColumnSql('user_payouts', 'banner_url', 'LONGTEXT NOT NULL');
70 addExtensionAddTableColumnSql('user_payouts', 'link_text', "VARCHAR(30) NOT NULL DEFAULT ''");
71 addExtensionAddTableColumnSql('payout_types', 'allow_url', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
73 // Update notes (these will be set as task text!)
74 setExtensionUpdateNotes("Daten für Banner und Textlink hinzugefügt (eventuell durch ext-clickbanner veraltet).");
77 case '0.1.6': // SQL queries for v0.1.6
78 addExtensionChangeTableColumnSql('payout_types', 'pass_enc', 'pass_enc', "ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'");
80 // Update notes (these will be set as task text!)
81 setExtensionUpdateNotes("Passwortverschlüsselung hinzugefügt.");
84 case '0.1.8': // SQL queries for v0.1.8
85 // Update notes (these will be set as task text!)
86 setExtensionUpdateNotes("Auflistung der Auszahlungen ausgelagert in Template <span class=\"bad\">member_payout.tpl</span>.");
89 case '0.1.9': // SQL queries for v0.1.9
90 // Update notes (these will be set as task text!)
91 setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
94 case '0.2.0': // SQL queries for v0.2.0
95 // Update notes (these will be set as task text!)
96 setExtensionUpdateNotes("5 Nachkommastellen implementiert.");
99 case '0.2.1': // SQL queries for v0.2.1
100 addExtensionChangeTableColumnSql('user_payouts', 'payout_total', 'payout_total', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
101 addExtensionChangeTableColumnSql('payout_types', 'rate', 'rate', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
103 // Update notes (these will be set as task text!)
104 setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
107 case '0.2.2': // SQL queries for v0.2.2
108 // Update notes (these will be set as task text!)
109 setExtensionUpdateNotes("Buttons aus Aufgabenauflisten ausgelagert");
112 case '0.2.3': // SQL queries for v0.2.3
113 // Update notes (these will be set as task text!)
114 setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
117 case '0.2.4': // SQL queries for v0.2.4
118 // Update notes (these will be set as task text!)
119 setExtensionUpdateNotes("Ausgabe der Auszahlungsmöglichkeiten im Mitgliedsbereich repariert.");
122 case '0.2.5': // SQL queries for v0.2.5
123 // Update notes (these will be set as task text!)
124 setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt.");
127 case '0.2.6': // SQL queries for v0.2.6
128 // Update notes (these will be set as task text!)
129 setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
132 case '0.2.7': // SQL queries for v0.2.7
133 // Update notes (these will be set as task text!)
134 setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
137 case '0.2.8': // SQL queries for v0.2.8
138 // Update notes (these will be set as task text!)
139 setExtensionUpdateNotes("Work-Arount-Lösung zu temporären Problemen mit der Task-Id eingebaut.");
142 case '0.2.9': // SQL queries for v0.2.9
143 // Update notes (these will be set as task text!)
144 setExtensionUpdateNotes("Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet.");
147 case '0.3.0': // SQL queries for v0.3.0
148 // Update notes (these will be set as task text!)
149 setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
152 case '0.3.1': // SQL queries for v0.3.1
153 // Update notes (these will be set as task text!)
154 setExtensionUpdateNotes("Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist.");
157 case '0.3.2': // SQL queries for v0.3.2
158 // Update notes (these will be set as task text!)
159 setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
162 case '0.3.3': // SQL queries for v0.3.3
163 // Update notes (these will be set as task text!)
164 setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
167 case '0.3.4': // SQL queries for v0.3.4
168 // Update notes (these will be set as task text!)
169 setExtensionUpdateNotes("Anzahl zu überweisende {?POINTS?} müssen immer grösser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab.");
172 case '0.3.5': // SQL queries for v0.3.5
173 // Update notes (these will be set as task text!)
174 setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle.");
177 case '0.3.6': // SQL queries for v0.3.6
178 // Update notes (these will be set as task text!)
179 setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
182 case '0.3.7': // SQL queries for v0.3.7
183 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Auszahlungsmanagement' WHERE `action`='payouts' AND (`what`='' OR `what` IS NULL) LIMIT 1");
185 // Update notes (these will be set as task text!)
186 setExtensionUpdateNotes("Verwaltung nach Management umgestellt.");
189 case '0.3.8': // SQL queries for v0.3.8
190 // Update notes (these will be set as task text!)
191 setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");