X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-del_user.php;h=9a0536f2e5f8c80787b027dc7b58320ea9f19602;hb=2142149f3f72f1a2476f95a87937c044d63bbaf2;hp=c18b248419d4fbdc5699b82fc801cbd3ef32741b;hpb=a1ef1533f17e1ca5db81a9912632491e72626694;p=mailer.git
diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php
index c18b248419..9a0536f2e5 100644
--- a/inc/modules/admin/what-del_user.php
+++ b/inc/modules/admin/what-del_user.php
@@ -32,55 +32,41 @@
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((!defined('__SECURITY')) || (!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", "");
+ADD_DESCR("admin", __FILE__);
// 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=%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);
+ SQL_FREERESULT($result_user);
// Delete user account
DELETE_USER_ACCOUNT(bigintval($_GET['u_id']), $_POST['reason']);
OUTPUT_HTML("".ADMIN_DEL_COMPLETED."");
- }
- else
- {
+ } else {
// Account does not exists!
OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."");
}
-}
- elseif (!empty($_POST['no']))
-{
+} elseif (!empty($_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']))
-{
+} 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=%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);
@@ -93,13 +79,11 @@ if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason']
// Display form
LOAD_TEMPLATE("admin_del_user");
- }
- else
- {
+ } else {
// Account does not exists!
OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."");
}
}
-CLOSE_TABLE();
+
//
?>