X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fmodules%2Fadmin%2Fwhat-lock_user.php;h=88b2fff97b3ca99a86f72a40b2b682455765ca5e;hb=4e828541f3977c085ef54d3490b3e0069eb09a06;hp=e96c9a5847c08f6f707d6898169bda8bb981ee0f;hpb=1e6e1b8fbc79df082c8463f3e7eb72ae4761287c;p=mailer.git diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index e96c9a5847..88b2fff97b 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__); // Is a userid set? if (!empty($_GET['u_id'])) { // 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", + $result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); $ACT = false; if (SQL_NUMROWS($result_user) == 1) { @@ -58,11 +58,11 @@ if (!empty($_GET['u_id'])) { // Ok, lock the account! 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", + SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1", array($_POST['reason'], bigintval($_GET['u_id'])), __FILE__, __LINE__); } else { // Lock with no lock reason saved - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='LOCKED' WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); } @@ -82,11 +82,11 @@ if (!empty($_GET['u_id'])) { // Ok, unlock the account! 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", + 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($_GET['u_id'])), __FILE__, __LINE__); } else { // No lock reason to reset - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED' WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); } @@ -96,7 +96,7 @@ if (!empty($_GET['u_id'])) { $msg = LOAD_EMAIL_TEMPLATE("unlock-user", array('text' => $_POST['reason']), bigintval($_GET['u_id'])); // Send away... - SEND_EMAIL(bigintval($_GET['u_id']), ADMIN_UNLOCKED_SUBJ, $msg); + SEND_EMAIL(bigintval($_GET['u_id']), getMessage('ADMIN_UNLOCKED_SUBJ'), $msg); if (EXT_IS_ACTIVE("rallye")) { RALLYE_AUTOADD_USER($_GET['u_id']); } // END - if @@ -108,12 +108,12 @@ if (!empty($_GET['u_id'])) { } elseif (isset($_POST['del'])) { // Delete the account $ACT = true; - require_once(PATH."inc/modules/admin/what-del_user.php"); + LOAD_INC_ONCE("inc/modules/admin/what-del_user.php"); } elseif (!empty($_POST['no'])) { // Do not lock him... - $URL = URL."/modules.php?module=admin&what=list_user&u_id=".bigintval($_GET['u_id']); + $URL = "modules.php?module=admin&what=list_user&u_id=".bigintval($_GET['u_id']); } else { - $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s 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__); // Entry found? @@ -156,7 +156,7 @@ if (!empty($_GET['u_id'])) { LOAD_TEMPLATE("admin_lock_user"); } else { // Account does not exists! - OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2.""); + LOAD_TEMPLATE("admin_settings_saved", false, "