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