159b71ad6a97afd927e0db6d5e6280a3c9725c67
[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  *                                                                      *
14  * -------------------------------------------------------------------- *
15  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
16  * For more information visit: http://www.mxchange.org                  *
17  *                                                                      *
18  * This program is free software; you can redistribute it and/or modify *
19  * it under the terms of the GNU General Public License as published by *
20  * the Free Software Foundation; either version 2 of the License, or    *
21  * (at your option) any later version.                                  *
22  *                                                                      *
23  * This program is distributed in the hope that it will be useful,      *
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
26  * GNU General Public License for more details.                         *
27  *                                                                      *
28  * You should have received a copy of the GNU General Public License    *
29  * along with this program; if not, write to the Free Software          *
30  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
31  * MA  02110-1301  USA                                                  *
32  ************************************************************************/
33
34 // Some security stuff...
35 if (!defined('__SECURITY')) {
36         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
37         require($INC);
38 }
39
40 // Version number
41 $EXT_VERSION = "0.3.3";
42
43 // Version history array (add more with , "0.1" and so on)
44 $EXT_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");
45
46 switch ($EXT_LOAD_MODE)
47 {
48 case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
49         // SQL commands to run
50         $SQLs[] = "";
51
52         // Load CSS-File?
53         $EXT_CSS = "Y";
54         break;
55
56 case "remove": // Do stuff when removing extension
57         // SQL commands to run
58         $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_user' OR what='user_contct' LIMIT 2";
59         break;
60
61 case "activate": // Do stuff when admin activates this extension
62         // SQL commands to run
63         $SQLs[] = "";
64         break;
65
66 case "deactivate": // Do stuff when admin deactivates this extension
67         // SQL commands to run
68         $SQLs[] = "";
69         break;
70
71 case "update": // Update an extension
72         switch ($EXT_VER)
73         {
74         case "0.1": // SQL queries for v0.1
75                 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_limit INT(7) NOT NULL DEFAULT '20'";
76
77                 // Update notes (these will be set as task text!)
78                 $UPDATE_NOTES = "Seitenweises Anzeigen der User-Liste ist nun m&ouml;glich.";
79                 break;
80
81         case "0.1.1": // SQL queries for v0.1.1
82                 $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='user' AND ext_has_css='N' LIMIT 1";
83
84                 // This update depends on sql_patches update!
85                 $EXT_UPDATE_DEPENDS = "sql_patches";
86
87                 // Update notes (these will be set as task text!)
88                 $UPDATE_NOTES = "CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.";
89
90         case "0.1.2": // SQL queries for v0.1.2
91                 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mails_confirmed BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
92
93                 // Update notes (these will be set as task text!)
94                 $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.";
95                 break;
96
97         case "0.1.3": // SQL queries for v0.1.3
98                 // Update notes (these will be set as task text!)
99                 $UPDATE_NOTES = "Den Pfad <I>Sie sind hier</I> im Men&uuml;punkt <U>Online-Liste</U> erweitert.";
100                 break;
101
102         case "0.1.4": // SQL queries for v0.1.4
103                 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD emails_received BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
104
105                 // Update notes (these will be set as task text!)
106                 $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. <BIG>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</BIG>";
107                 break;
108
109         case "0.1.5": // SQL queries for v0.1.5
110                 // Update notes (these will be set as task text!)
111                 $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";
112                 break;
113
114         case "0.1.6": // SQL queries for v0.1.6
115                 // Update notes (these will be set as task text!)
116                 $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";
117                 break;
118
119         case "0.1.7": // SQL queries for v0.1.7
120                 // Update notes (these will be set as task text!)
121                 $UPDATE_NOTES = "Erweiterung bleibt wegen integrierten Schalters immer aktiv.";
122                 break;
123
124         case "0.1.8": // SQL queries for v0.1.8
125                 // Update notes (these will be set as task text!)
126                 $UPDATE_NOTES = "Seit <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;ssige HTML-Tags entfernt.";
127                 break;
128
129         case "0.1.9": // SQL queries for v0.1.9
130                 // Update notes (these will be set as task text!)
131                 $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion <U>ADMIN_USER_PROFILE_LINK()</U> ausgelagert.";
132                 break;
133
134         case "0.2.0": // SQL queries for v0.2.0
135                 // Update notes (these will be set as task text!)
136                 $UPDATE_NOTES = "User-Liste ausgelagert in Templates und &uuml;berbreite Zeile in 2er-Zeile umgewandelt.";
137                 break;
138
139         case "0.2.1": // SQL queries for v0.2.1
140                 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_alpha TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'";
141                 $SQLs[] = "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)";
142
143                 // Update notes (these will be set as task text!)
144                 $UPDATE_NOTES = "User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt.";
145                 break;
146
147         case "0.2.2": // SQL queries for v0.2.2
148                 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE gender gender ENUM('M','F','C') NOT NULL DEFAULT 'M'";
149
150                 // Update notes (these will be set as task text!)
151                 $UPDATE_NOTES = "Anrede &quot;Firma&quot; hinzugef&uuml;gt.";
152                 break;
153
154         case "0.2.3": // SQL queries for v0.2.3
155                 // Update notes (these will be set as task text!)
156                 $UPDATE_NOTES = "Datumsformat festgelegt auf ausf&uuml;hrlich.";
157                 break;
158
159         case "0.2.4": // SQL queries for v0.2.4
160                 // Update notes (these will be set as task text!)
161                 $UPDATE_NOTES = "W&ouml;rter <STRONG>Mailtausch</STRONG>, <STRONG>Mailtausches</STRONG> und <STRONG>Mailtauscher</STRONG> sind austauschbar.";
162                 break;
163
164         case "0.2.5": // SQL queries for v0.2.5
165                 // Update notes (these will be set as task text!)
166                 $UPDATE_NOTES = "SQL-Anweisungen abgesichert.";
167                 break;
168
169         case "0.2.6": // SQL queries for v0.2.6
170                 // Update notes (these will be set as task text!)
171                 $UPDATE_NOTES = "Abspeichern von Einstellungen repariert.";
172                 break;
173
174         case "0.2.7": // SQL queries for v0.2.7
175                 // Update notes (these will be set as task text!)
176                 $UPDATE_NOTES = "Sicherheitsupdate f&uuml;r die Include-Befehle.";
177                 break;
178
179         case "0.2.8": // SQL queries for v0.2.8
180                 // Update notes (these will be set as task text!)
181                 $UPDATE_NOTES = "if-Anweisungen auf Funktion <STRONG>empty()</STRONG> umgestellt.";
182                 break;
183
184         case "0.2.9": // SQL queries for v0.2.9
185                 $SQLs[] = "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)";
186
187                 // Update notes (these will be set as task text!)
188                 $UPDATE_NOTES = "Admin-Kontaktformular hinzugef&uuml;gt.";
189                 break;
190
191         case "0.3.0": // SQL queries for v0.3.0
192                 // Update notes (these will be set as task text!)
193                 $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.";
194                 break;
195
196         case "0.3.1": // SQL queries for v0.3.1
197                 $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Mitglieder-Management' WHERE action = 'user' AND (what='' OR what IS NULL) LIMIT 1";
198
199                 // Update notes (these will be set as task text!)
200                 $UPDATE_NOTES = "Verwaltung auf Management umgestellt";
201                 break;
202
203         case "0.3.2": // SQL queries for v0.3.2
204                 // Update notes (these will be set as task text!)
205                 $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.";
206                 break;
207
208         case "0.3.3": // SQL queries for v0.3.3
209                 // Update notes (these will be set as task text!)
210                 $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>!)";
211                 break;
212         }
213         break;
214
215 default: // Do stuff when extension is loaded
216         break;
217 }
218
219 // Language file prefix
220 $EXT_LANG_PREFIX = "user";
221
222 // Extension is always active?
223 $EXT_ALWAYS_ACTIVE = "Y";
224
225 //
226 ?>