* -------------------------------------------------------------------- *
* Kurzbeschreibung : Mitglieder loeschen *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: 856 $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: stelzi $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
ADD_DESCR("admin", __FILE__);
// User exists..
-if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'])))) {
+if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('reason'))))) {
// Delete users account
- $result_user = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 1) {
// Free memory
SQL_FREERESULT($result_user);
// Delete user account
- DELETE_USER_ACCOUNT(bigintval($_GET['u_id']), $_POST['reason']);
- OUTPUT_HTML("<STRONG class=\"admin_green\">".ADMIN_DEL_COMPLETED."</STRONG>");
+ DELETE_USER_ACCOUNT(REQUEST_GET('uid'), REQUEST_POST('reason'));
+
+ // Output message
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_DEL_COMPLETED'));
} else {
// Account does not exists!
- OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
-} elseif (!empty($_POST['no'])) {
+} elseif (REQUEST_ISSET_POST(('no'))) {
// Do not delete him...
- LOAD_URL("modules.php?module=admin&what=list_user&u_id=".$_GET['u_id']);
-} elseif (empty($_GET['u_id'])) {
+ LOAD_URL("modules.php?module=admin&what=list_user&uid=".REQUEST_GET('uid'));
+} elseif (!REQUEST_ISSET_GET(('uid'))) {
// 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=%s LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list ($email, $sname, $fname) = SQL_FETCHROW($result);
define('__EMAIL', CREATE_EMAIL_LINK($email, "user_data"));
define('__SNAME', $sname);
define('__FNAME', $fname);
- define('__UID' , $_GET['u_id']);
+ define('__UID' , REQUEST_GET('uid'));
// 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>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
}