X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-lock_sponsor.php;h=384fd186c73b373ac47241a50310ccfd8deee978;hb=1355d2c0b29510dbd407f9cde9f41a5ac02d01fa;hp=e640e77360babcfe5794fcd493a305b0e17bc295;hpb=7b0f17cd637e388049d2167811e4332cec1e979b;p=mailer.git diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index e640e77360..384fd186c7 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -40,7 +40,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); -} +} // END - if // Add description as navigation point ADD_DESCR('admin', __FILE__); @@ -49,26 +49,26 @@ $message = ''; if (REQUEST_ISSET_GET('id')) { // Check for selected sponsor $result = SQL_QUERY_ESC("SELECT gender, surname, family, email, status FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Get sponsor's current status and let only confirmed and locked status pass list($gender, $sname, $fname, $email, $status) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if (($status == 'CONFIRMED') || ($status == "LOCKED")) { + if (($status == 'CONFIRMED') || ($status == 'LOCKED')) { // Transfer data to constants define('__GENDER' , translateGender($gender)); define('__SURNAME', $sname); define('__FAMILY' , $fname); define('__ID' , bigintval(REQUEST_GET('id'))); - if (IS_FORM_SENT()) { + if (isFormSent()) { // Create messages if ($status == 'CONFIRMED') { // Message when sponsor's account got lock define('__EMAIL_MSG', getMessage('SPONSOR_ACCOUNT_LOCKED')); $subject = getMessage('SPONSOR_SUBJECT_LOCKED'); - $status = "LOCKED"; + $status = 'LOCKED'; } else { // Message when sponsor's account got unlock define('__EMAIL_MSG', getMessage('SPONSOR_ACCOUNT_UNLOCKED')); @@ -84,8 +84,8 @@ if (REQUEST_ISSET_GET('id')) { // Update sponsor's account SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='".$status."' WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); - } elseif (REQUEST_ISSET_POST(('no'))) { + array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + } elseif (REQUEST_ISSET_POST('no')) { // No don't lock / unlock now! redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(REQUEST_GET('id'))); } else {