// 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']))))
-{
+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",
+ $result_user = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_user) == 1)
- {
+ 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
- {
+ 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>");
+ OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
}
-}
- elseif (!empty($_POST['no']))
-{
+} elseif (!empty($_POST['no'])) {
// Do not delete him...
- LOAD_URL(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&u_id=".$_GET['u_id']);
+} elseif (empty($_GET['u_id'])) {
// Output selection form with all confirmed user accounts listed
ADD_MEMBER_SELECTION_BOX();
-}
- else
-{
+} else {
// Realy want to delete?
- $result = SQL_QUERY_ESC("SELECT email, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+ $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__);
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
// Load data
list ($email, $sname, $fname) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Display form
LOAD_TEMPLATE("admin_del_user");
- }
- else
- {
+ } else {
// Account does not exists!
- OUTPUT_HTML ("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
+ OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
}
}
-CLOSE_TABLE();
+
//
?>