<?php } elseif ($thisPage == 'updateUserStatus') { if ($thisPageAction == 'processUpdates') { $userArrayToBeProcessed = filter_input(INPUT_POST, 'updateUserList', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY); // get the list of user ID's to process $newStatus = filter_input(INPUT_POST, 'newStatus'); // get the list of user ID's to process /* echo '<pre>'; print_r($newStatus); print_r($userArrayToBeProcessed); die(__CLASS__ . ':' . __LINE__); */ $resultArray = array(); foreach ($userArrayToBeProcessed as $key => $boxUserId) { $resultArray[$boxUserId] = updateUserStatus($boxUserId, $newStatus); } } else { $thisTimestamp = filter_input(INPUT_GET, 'timestamp'); $allUsers = getUserRecordsFromDatabase('LATEST'); //echo '<pre>'; print_r($allUsers); die(__CLASS__ . ':' . __LINE__); if (empty($allUsers)) { die('no users found in the database'); } } ?> <!-- page to display all users --> <!DOCTYPE html> <html lang="en"> <head>
<?php session_start(); if (isset($_SESSION['admin_email'])) { include "dbconnection.php"; $user_id = mysql_real_escape_string($_REQUEST['user_id']); $user_status = mysql_real_escape_string($_REQUEST['status']); updateUserStatus($user_id, $user_status); header("location:users.php"); } else { header("location:index.php"); }
//} $stat = "1"; $msg = "User <strong>"" . "{$strDBUserName}" . ""</strong> " . "{$MsgNewUserStatus}" . " successfully."; } else { if ($strUpdStatus == 2) { $stat = "0"; $msg = "Nothing is updated."; } else { $stat = "0"; $msg = 'Error in while updating.'; } } } } else { try { $arrUserStatus = updateUserStatus($strDBUserId, $strDBUserName, $strNewUserStatus, $strDBOldUserStatus, $objDataHelper); } catch (Exception $e) { throw new Exception("index.php : updInvitationStatus Failed : " . $e->getMessage(), 1126); } $strUpdStatus = trim($arrUserStatus[0]['@STATUS']); if ($strUpdStatus == 1) { // if ($strNewUserStatus == 3) // { // $strLicense = 1; // $OperationType = 4; // $gmt_datetime = GM_DATE; // try // { // $insClientLicense = insClientLicenseDetails($strSetClient_ID, $strLicense, $OperationType, $gmt_datetime, $objDataHelper); // } // catch (Exception $a)