]> git.mxchange.org Git - mailer.git/blob - inc/extensions/ext-user.php
BLOB->TEXT rewritten, all _user tables now handled by ext-user, except user_book...
[mailer.git] / inc / extensions / ext-user.php
1 <?php
2 /************************************************************************
3  * MXChange v0.2.1                                    Start: 04/29/2004 *
4  * ================                             Last change: 10/29/2004 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : ext-user.php                                     *
8  * -------------------------------------------------------------------- *
9  * Short description : Swapped out user management                      *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Ausgelagertes Mitglieder-Management              *
12  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * Needs to be in all Files and every File needs "svn propset           *
18  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
19  * -------------------------------------------------------------------- *
20  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
21  * For more information visit: http://www.mxchange.org                  *
22  *                                                                      *
23  * This program is free software; you can redistribute it and/or modify *
24  * it under the terms of the GNU General Public License as published by *
25  * the Free Software Foundation; either version 2 of the License, or    *
26  * (at your option) any later version.                                  *
27  *                                                                      *
28  * This program is distributed in the hope that it will be useful,      *
29  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
30  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
31  * GNU General Public License for more details.                         *
32  *                                                                      *
33  * You should have received a copy of the GNU General Public License    *
34  * along with this program; if not, write to the Free Software          *
35  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
36  * MA  02110-1301  USA                                                  *
37  ************************************************************************/
38
39 // Some security stuff...
40 if (!defined('__SECURITY')) {
41         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
42         require($INC);
43 }
44
45 // Version number
46 EXT_SET_VERSION("0.3.5");
47
48 // Version history array (add more with , "0.1" and so on)
49 EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "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", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5"));
50
51 switch ($EXT_LOAD_MODE)
52 {
53 case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
54         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
55         ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_cats` (
56   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
57   `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
58   `cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
59 PRIMARY KEY  (`id`),
60 INDEX (`userid`),
61 INDEX (`cat_id`)
62 ) TYPE={!_TABLE_TYPE!}");
63
64         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
65         ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_data` (
66   `userid` BIGINT(22) NOT NULL AUTO_INCREMENT,
67   `surname` VARCHAR(255) NOT NULL DEFAULT '',
68   `family` VARCHAR(255) NOT NULL DEFAULT '',
69   `street_nr` VARCHAR(255) NOT NULL DEFAULT '',
70   `country` VARCHAR(4) NOT NULL DEFAULT '',
71   `zip` VARCHAR(6) NOT NULL DEFAULT '',
72   `city` VARCHAR(255) NOT NULL DEFAULT '',
73   `email` VARCHAR(255) NOT NULL DEFAULT '',
74   `birth_day` CHAR(2) NOT NULL DEFAULT '01',
75   `birth_month` CHAR(2) NOT NULL DEFAULT '01',
76   `birth_year` VARCHAR(4) NOT NULL DEFAULT '1970',
77   `password` VARCHAR(255) NOT NULL DEFAULT '',
78   `max_mails` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
79   `receive_mails` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
80   `refid` BIGINT(22) NOT NULL DEFAULT 0,
81   `status` ENUM('UNCONFIRMED','CONFIRMED','LOCKED') NOT NULL DEFAULT 'UNCONFIRMED',
82   `user_hash` VARCHAR(255) NULL DEFAULT NULL,
83   `REMOTE_ADDR` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
84   `last_online` VARCHAR(10) NOT NULL DEFAULT 0,
85   `last_module` VARCHAR(255) NOT NULL DEFAULT '',
86   `ref_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
87   `total_logins` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
88   `gender` ENUM('M','F') NOT NULL DEFAULT 'M',
89   `used_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
90   `emails_sent` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
91   `joined` VARCHAR(10) NOT NULL DEFAULT 0,
92   `last_update` VARCHAR(10) NOT NULL DEFAULT 0,
93   `last_profile_sent` VARCHAR(10) NOT NULL DEFAULT 0,
94   `notified` ENUM('Y','N') NOT NULL DEFAULT 'N',
95   `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
96   `last_login` VARCHAR(10) NOT NULL DEFAULT 0,
97   `login_failures` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
98   `last_failure` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
99 PRIMARY KEY  (`userid`),
100 UNIQUE (`user_hash`),
101 INDEX (`refid`),
102 INDEX `status_mails` (`status`,`max_mails`)
103 ) TYPE={!_TABLE_TYPE!}");
104
105         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
106         ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_points` (
107   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
108   `userid` BIGINT(22) NOT NULL DEFAULT 0,
109   `ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
110   `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
111   `locked_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
112 PRIMARY KEY  (`id`),
113 INDEX (`userid`)
114 ) TYPE={!_TABLE_TYPE!}");
115
116         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
117         ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_links` (
118   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
119   `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
120   `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
121   `link_type` ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL',
122 PRIMARY KEY  (`id`),
123 INDEX (`userid`),
124 INDEX (`stats_id`)
125 ) TYPE={!_TABLE_TYPE!}");
126
127         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
128         ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats` (
129   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
130   `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
131   `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
132   `payment_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
133   `subject` VARCHAR(200) NOT NULL DEFAULT '',
134   `url` TINYTEXT NOT NULL,
135   `max_rec` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
136   `timestamp_ordered` VARCHAR(10) NOT NULL DEFAULT '',
137   `pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
138   `timestamp_sstart` VARCHAR(10) NOT NULL DEFAULT '',
139   `timestamp_send` VARCHAR(10) NOT NULL DEFAULT '',
140   `is_stats` ENUM('Y','N') NOT NULL DEFAULT 'N',
141 PRIMARY KEY  (`id`),
142 INDEX (`userid`),
143 INDEX (`cat_id`),
144 INDEX (`payment_id`),
145 INDEX (`pool_id`)
146 ) TYPE={!_TABLE_TYPE!}");
147
148         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
149         ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats_data` (
150 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
151 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
152 `stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown',
153 `stats_data` VARCHAR(255) NOT NULL DEFAULT '',
154 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
155 PRIMARY KEY(`id`),
156 INDEX (`userid`),
157 INDEX (`stats_type`)
158 ) TYPE={!_TABLE_TYPE!} COMMENT='Member statistics data'");
159
160         // Admin menu
161         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)");
162         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied l&ouml;schen','L&ouml;schen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und l&ouml;schen Sie nicht gleich.',1)");
163         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen pr&uuml;fen','Pr&uuml;fen Sie hier neue Anmeldungen zu Ihrem System. Hier k&ouml;nnen Sie im Falle einer Fehler-Mail den Mitglied gleich wieder l&ouml;schen!',2)");
164         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbest&auml;tigte Mails haben oder gegen Ihre AGBs verstossen haben &uuml;ber diesen Men&uuml;punkt.',3)");
165         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschr&auml;nkt nach Suchkritieren Ihre Userdatenbank auf. Sie k&ouml;nen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)");
166         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie k&ouml;nnen dazu auch einen Kommentar mitsenden.',5)");
167         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes &auml;ndern.',6)");
168         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Men&uuml;punkt k&ouml;nnen Sie die generierten Referals eines Mitgliedes auflisten.',7)");
169         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbest&auml;tigte Mails','Mit diesem Men&uuml;punkt k&ouml;nnen Sie die vom Mitglied nicht best&auml;tigten Mails anzeigen.',8)");
170         ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_cats','Kategorien anzeigen','Listet die ausgew&auml;hlten Kategorien eines Mitgliedes auf.',9)");
171         break;
172
173 case "remove": // Do stuff when removing extension
174         // SQL commands to run
175         ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'");
176         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
177         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
178         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
179         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
180         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
181         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
182         ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
183         break;
184
185 case "activate": // Do stuff when admin activates this extension
186         // SQL commands to run
187         ADD_EXT_SQL("");
188         break;
189
190 case "deactivate": // Do stuff when admin deactivates this extension
191         // SQL commands to run
192         ADD_EXT_SQL("");
193         break;
194
195 case "update": // Update an extension
196         switch ($EXT_VER)
197         {
198         case "0.1": // SQL queries for v0.1
199                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20");
200
201                 // Update notes (these will be set as task text!)
202                 EXT_SET_UPDATE_NOTES("Seitenweises Anzeigen der User-Liste ist nun m&ouml;glich.");
203                 break;
204
205         case "0.1.1": // SQL queries for v0.1.1
206                 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_has_css`='Y' WHERE `ext_name`='user' AND `ext_has_css`='N' LIMIT 1");
207
208                 // This update depends on sql_patches update!
209                 EXT_ADD_UPDATE_DEPENDS("sql_patches");
210
211                 // Update notes (these will be set as task text!)
212                 EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
213
214         case "0.1.2": // SQL queries for v0.1.2
215                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
216
217                 // Update notes (these will be set as task text!)
218                 EXT_SET_UPDATE_NOTES("Dem Mitglied wird nun angezeigt, wie viele Mails er best&auml;tigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr ber&uuml;cksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.");
219                 break;
220
221         case "0.1.3": // SQL queries for v0.1.3
222                 // Update notes (these will be set as task text!)
223                 EXT_SET_UPDATE_NOTES("Den Pfad <em>Sie sind hier</em> im Men&uuml;punkt <u>Online-Liste</u> erweitert.");
224                 break;
225
226         case "0.1.4": // SQL queries for v0.1.4
227                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
228
229                 // Update notes (these will be set as task text!)
230                 EXT_SET_UPDATE_NOTES("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</big>");
231                 break;
232
233         case "0.1.5": // SQL queries for v0.1.5
234                 // Update notes (these will be set as task text!)
235                 EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
236                 break;
237
238         case "0.1.6": // SQL queries for v0.1.6
239                 // Update notes (these will be set as task text!)
240                 EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
241                 break;
242
243         case "0.1.7": // SQL queries for v0.1.7
244                 // Update notes (these will be set as task text!)
245                 EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
246                 break;
247
248         case "0.1.8": // SQL queries for v0.1.8
249                 // Update notes (these will be set as task text!)
250                 EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
251                 break;
252
253         case "0.1.9": // SQL queries for v0.1.9
254                 // Update notes (these will be set as task text!)
255                 EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
256                 break;
257
258         case "0.2.0": // SQL queries for v0.2.0
259                 // Update notes (these will be set as task text!)
260                 EXT_SET_UPDATE_NOTES("User-Liste ausgelagert in Templates und &uuml;berbreite Zeile in 2er-Zeile umgewandelt.");
261                 break;
262
263         case "0.2.1": // SQL queries for v0.2.1
264                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
265                 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)");
266
267                 // Update notes (these will be set as task text!)
268                 EXT_SET_UPDATE_NOTES("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt.");
269                 break;
270
271         case "0.2.2": // SQL queries for v0.2.2
272                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'");
273
274                 // Update notes (these will be set as task text!)
275                 EXT_SET_UPDATE_NOTES("Anrede &quot;Firma&quot; hinzugef&uuml;gt.");
276                 break;
277
278         case "0.2.3": // SQL queries for v0.2.3
279                 // Update notes (these will be set as task text!)
280                 EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
281                 break;
282
283         case "0.2.4": // SQL queries for v0.2.4
284                 // Update notes (these will be set as task text!)
285                 EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
286                 break;
287
288         case "0.2.5": // SQL queries for v0.2.5
289                 // Update notes (these will be set as task text!)
290                 EXT_SET_UPDATE_NOTES("SQL-Anweisungen abgesichert.");
291                 break;
292
293         case "0.2.6": // SQL queries for v0.2.6
294                 // Update notes (these will be set as task text!)
295                 EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
296                 break;
297
298         case "0.2.7": // SQL queries for v0.2.7
299                 // Update notes (these will be set as task text!)
300                 EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
301                 break;
302
303         case "0.2.8": // SQL queries for v0.2.8
304                 // Update notes (these will be set as task text!)
305                 EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
306                 break;
307
308         case "0.2.9": // SQL queries for v0.2.9
309                 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt &uuml;ber ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)");
310
311                 // Update notes (these will be set as task text!)
312                 EXT_SET_UPDATE_NOTES("Admin-Kontaktformular hinzugef&uuml;gt.");
313                 break;
314
315         case "0.3.0": // SQL queries for v0.3.0
316                 // Update notes (these will be set as task text!)
317                 EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes f&uuml;r <em>0.2.1-Beta1</em> Release.");
318                 break;
319
320         case "0.3.1": // SQL queries for v0.3.1
321                 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1");
322
323                 // Update notes (these will be set as task text!)
324                 EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt");
325                 break;
326
327         case "0.3.2": // SQL queries for v0.3.2
328                 // Update notes (these will be set as task text!)
329                 EXT_SET_UPDATE_NOTES("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbest&auml;tigten Mails gefixt.");
330                 break;
331
332         case "0.3.3": // SQL queries for v0.3.3
333                 // Update notes (these will be set as task text!)
334                 EXT_SET_UPDATE_NOTES("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und best&auml;tigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)");
335                 break;
336
337         case "0.3.4": // SQL queries for v0.3.4
338                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
339                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10");
340                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
341
342                 // Update notes (these will be set as task text!)
343                 EXT_SET_UPDATE_NOTES("Mitglieder werden per Zufall als Referal-ID ausgew&auml;hlt, die eine Mindestanzahl an best&auml;tigten Mails haben, wenn die Ref-Id 0 ist.");
344                 break;
345
346         case "0.3.5": // SQL queries for v0.3.5
347                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT");
348                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
349                 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
350                 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','L&ouml;schungen auflisten','Listet die L&ouml;schungen von Usern auf.', 9)");
351                 ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
352                 ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` (
353 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
354 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
355 `email` VARCHAR(255) NOT NULL DEFAULT '',
356 `surname` VARCHAR(255) NOT NULL DEFAULT '',
357 `family` VARCHAR(255) NOT NULL DEFAULT '',
358 `joined` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
359 `last_online` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
360 `del_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
361 `del_reason` TINYTEXT,
362 INDEX (`userid`),
363 PRIMARY KEY(`id`)
364 ) TYPE={!_TABLE_TYPE!} COMMENT='List of deleted users'");
365
366                 // Update notes (these will be set as task text!)
367                 EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim L&ouml;schen des Users mit ausgesendet.");
368                 break;
369         }
370         break;
371
372 case "modify": // When the extension got modified
373         break;
374
375 case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
376         break;
377
378 default: // Do stuff when extension is loaded
379         break;
380 }
381
382 // Keep this extension always active!
383 EXT_SET_ALWAYS_ACTIVE("Y");
384
385 // [EOF]
386 ?>