win32 to unix line delimiters changed
[mailer.git] / 0.2.1 / inc / modules / admin / what-del_user.php
index b518608063864c41a520b50a5f81cdfcab2de484..2bd7a7a95c8c0ab9c3c0893c29f8a5851803923b 100644 (file)
-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1                                    Start: 09/28/2003 *\r
- * ===============                              Last change: 06/10/2004 *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * File              : what-del_user.php                                *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Delete members                                   *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung  : Mitglieder l�schen                               *\r
- * -------------------------------------------------------------------- *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *\r
- * For more information visit: http://www.mxchange.org                  *\r
- *                                                                      *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or    *\r
- * (at your option) any later version.                                  *\r
- *                                                                      *\r
- * This program is distributed in the hope that it will be useful,      *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *\r
- * GNU General Public License for more details.                         *\r
- *                                                                      *\r
- * You should have received a copy of the GNU General Public License    *\r
- * along with this program; if not, write to the Free Software          *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *\r
- * MA  02110-1301  USA                                                  *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))\r
-{\r
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
-       require($INC);\r
-}\r
-\r
-// Display only title when no form was submitted\r
-ADD_DESCR("admin", basename(__FILE__));\r
-\r
-OPEN_TABLE("100%", "admin_content admin_content_align", "");\r
-\r
-// User exists..\r
-if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason']))))\r
-{\r
-       // Delete users account\r
-       $result_user = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",\r
-        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);\r
-       if (SQL_NUMROWS($result_user) == 1)\r
-       {\r
-               // Free memory\r
-               SQL_FREERESULT($result);\r
-\r
-               // Delete user account\r
-               DELETE_USER_ACCOUNT(bigintval($_GET['u_id']), $_POST['reason']);\r
-               OUTPUT_HTML ("<STRONG class=\"admin_green\">".ADMIN_DEL_COMPLETED."</STRONG>");\r
-       }\r
-        else\r
-       {\r
-               // Account does not exists!\r
-               OUTPUT_HTML ("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");\r
-       }\r
-}\r
- elseif (!empty($_POST['no']))\r
-{\r
-       // Do not delete him...\r
-       LOAD_URL(URL."/modules.php?module=admin&amp;what=list_user&amp;u_id=".$_GET['u_id']);\r
-}\r
- elseif (empty($_GET['u_id']))\r
-{\r
-       // Output selection form with all confirmed user accounts listed\r
-       ADD_MEMBER_SELECTION_BOX();\r
-}\r
- else\r
-{\r
-       // Realy want to delete?\r
-       $result = SQL_QUERY_ESC("SELECT email, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",\r
-        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);\r
-       if (SQL_NUMROWS($result) == 1)\r
-       {\r
-               // Load data\r
-               list ($email, $sname, $fname) = SQL_FETCHROW($result);\r
-               SQL_FREERESULT($result);\r
-\r
-               // Transfer data to constants for the template\r
-               define('__EMAIL', CREATE_EMAIL_LINK($email, "user_data"));\r
-               define('__SNAME', $sname);\r
-               define('__FNAME', $fname);\r
-               define('__UID'  , $_GET['u_id']);\r
-\r
-               // Display form\r
-               LOAD_TEMPLATE("admin_del_user");\r
-       }\r
-        else\r
-       {\r
-               // Account does not exists!\r
-               OUTPUT_HTML ("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");\r
-       }\r
-}\r
-CLOSE_TABLE();\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/28/2003 *
+ * ===============                              Last change: 06/10/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-del_user.php                                *
+ * -------------------------------------------------------------------- *
+ * Short description : Delete members                                   *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mitglieder l�schen                               *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
+{
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Display only title when no form was submitted
+ADD_DESCR("admin", basename(__FILE__));
+
+OPEN_TABLE("100%", "admin_content admin_content_align", "");
+
+// User exists..
+if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason']))))
+{
+       // Delete users account
+       $result_user = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+       if (SQL_NUMROWS($result_user) == 1)
+       {
+               // Free memory
+               SQL_FREERESULT($result);
+
+               // Delete user account
+               DELETE_USER_ACCOUNT(bigintval($_GET['u_id']), $_POST['reason']);
+               OUTPUT_HTML ("<STRONG class=\"admin_green\">".ADMIN_DEL_COMPLETED."</STRONG>");
+       }
+        else
+       {
+               // Account does not exists!
+               OUTPUT_HTML ("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
+       }
+}
+ elseif (!empty($_POST['no']))
+{
+       // Do not delete him...
+       LOAD_URL(URL."/modules.php?module=admin&amp;what=list_user&amp;u_id=".$_GET['u_id']);
+}
+ elseif (empty($_GET['u_id']))
+{
+       // Output selection form with all confirmed user accounts listed
+       ADD_MEMBER_SELECTION_BOX();
+}
+ else
+{
+       // Realy want to delete?
+       $result = SQL_QUERY_ESC("SELECT email, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+       if (SQL_NUMROWS($result) == 1)
+       {
+               // Load data
+               list ($email, $sname, $fname) = SQL_FETCHROW($result);
+               SQL_FREERESULT($result);
+
+               // Transfer data to constants for the template
+               define('__EMAIL', CREATE_EMAIL_LINK($email, "user_data"));
+               define('__SNAME', $sname);
+               define('__FNAME', $fname);
+               define('__UID'  , $_GET['u_id']);
+
+               // Display form
+               LOAD_TEMPLATE("admin_del_user");
+       }
+        else
+       {
+               // Account does not exists!
+               OUTPUT_HTML ("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
+       }
+}
+CLOSE_TABLE();
+//
+?>