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