]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-lock_user.php
Even more rewritten
[mailer.git] / inc / modules / admin / what-lock_user.php
index b2ad76d35de0d65c37002f6226f321ea75e81c68..7bc533df5e41f9ecb647854e73330f76ebf9450f 100644 (file)
 
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
 }
 
 // Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
 
 // Is a userid set?
-if (REQUEST_ISSET_GET(('uid'))) {
+if (REQUEST_ISSET_GET('uid')) {
        // Load user's data
        $result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
         array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
@@ -61,7 +61,7 @@ if (REQUEST_ISSET_GET(('uid'))) {
                // Is a lock reason set?
                if ((REQUEST_ISSET_POST(('lock'))) && ($status != "LOCKED")) {
                        // Ok, lock the account!
-                       if (GET_EXT_VERSION("user") >= "0.3.5") {
+                       if (GET_EXT_VERSION('user') >= '0.3.5') {
                                // Lock with reason
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1",
                                        array(REQUEST_POST('reason'), bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
@@ -85,7 +85,7 @@ if (REQUEST_ISSET_GET(('uid'))) {
                        $ACT = true;
                } elseif ((REQUEST_ISSET_POST(('unlock'))) && ($status == "LOCKED")) {
                        // Ok, unlock the account!
-                       if (GET_EXT_VERSION("user") >= "0.3.5") {
+                       if (GET_EXT_VERSION('user') >= '0.3.5') {
                                // Reset lock reason as well
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1",
                                        array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
@@ -102,7 +102,7 @@ if (REQUEST_ISSET_GET(('uid'))) {
 
                                // Send away...
                                SEND_EMAIL(bigintval(REQUEST_GET('uid')), getMessage('ADMIN_UNLOCKED_SUBJ'), $msg);
-                               if (EXT_IS_ACTIVE("rallye")) {
+                               if (EXT_IS_ACTIVE('rallye')) {
                                        RALLYE_AUTOADD_USER(REQUEST_GET('uid'));
                                } // END - if
                        } // END - if
@@ -162,7 +162,7 @@ if (REQUEST_ISSET_GET(('uid'))) {
                                LOAD_TEMPLATE("admin_lock_user");
                        } else {
                                // Account does not exists!
-                               LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
                        }
                }
 
@@ -173,14 +173,14 @@ if (REQUEST_ISSET_GET(('uid'))) {
                } elseif ($ACT) {
                        // An action was performed...
                        if (!empty($message)) {
-                               LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_green\">".$message."</div>");
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_green\">".$message."</div>");
                        } else {
-                               LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_green\">".getMessage('ADMIN_USER_UPDATED')."</div>");
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_green\">".getMessage('ADMIN_USER_UPDATED')."</div>");
                        }
                }
        } else {
                // Account does not exists!
-               LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
        }
 } else {
        // List all users