public function Restore_Room($roomId) { $MU = new ManageUsers(); $MU->userId = $_SESSION['empl_id']; if (!$MU->isAdminUser()) { return false; } $result = execute_sqlUpdate('tblRooms', array('roomActive' => 'Y'), array('roomId' => $roomId)); return true; }
<?php include_once "include_db.php"; include_once "include_functions.php"; if (!$_SESSION["uname"]) { header('Location: logout.php'); exit; } $CURRENT_USER = $_SESSION["uname"]; $TMP_MU = new ManageUsers(); $TMP_MU->userId = $_SESSION['empl_id']; if (!$TMP_MU->isAdminUser()) { echo 'You are not authorised to access this page.'; exit; } $cname = $_POST['c_name']; $result = 1; setAppVariable('comp_Name', $cname); $size = $_FILES['c_logo']['size']; $type = $_FILES['c_logo']['type']; $errors = $_FILES['c_logo']['error']; $file_name = $_FILES['c_logo']['name']; $comp_Id = 1; if (in_array($type, array('image/gif', 'image/jpeg', 'image/png', 'image/pjpeg', 'image/bmp'))) { if ($errors == UPLOAD_ERR_OK) { $tmp_name = $tmp_names; if ($type == "image/gif") { $name = $comp_Id . ".gif"; } else { if ($type == "image/jpeg") { $name = $comp_Id . ".jpg";
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // HTTP/1.0 $CURRENT_USER = $_SESSION["uname"]; $CURRENT_USERID = $_SESSION["empl_id"]; $CURRENT_SCRIPTNAME = getCurrentScriptFileName(); $GMU = new ManageUsers(); $GMU->userId = $CURRENT_USERID; $AM_I_ADMIN = $GMU->isAdminUser(); $AM_I_PRIVILEGEDUSER = $GMU->isPrivilagedUser(); ?> <html lang="en-US"> <HEAD> <TITLE><?php echo APPNAME; ?> </TITLE> <meta charset="UTF-8"> <script type="text/javascript" src="js/alljs.php?t=13"></script> <link rel="stylesheet" href="css/allcss.php?t=6" type="text/css" charset="utf-8"> <?php if (in_array($CURRENT_SCRIPTNAME, array('chatroom.php', 'bookmarks.php', 'directory.php'))) { ?> <link rel="stylesheet" href="prettyPhoto/css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />