function doLogout() { session_start(); $old_session = $_SESSION['auth_system']; if (!isset($old_session)) { session_unset(); session_destroy(); header("Location:" . LOGIN_FAIL_PAGE . ""); exit; } else { log_hist(3); session_unset(); session_destroy(); if (!empty($old_session)) { log_hist(2); header("Location:" . LOGIN_OK_PAGE . ""); exit; } else { array_push($this->_errors, "You cannot logout"); } } }
} } if (isset($_GET['did'])){ $did = trim($_GET['did']); $uid = $_SESSION['uid']; $date = date('Y-m-d H:i:s'); $del_q ="UPDATE user_level SET updID = '$uid', updDate ='$date', del = '1' WHERE id ='$did';"; if(@mysql_query($del_q)){ log_hist(17,$did); header("location:$this_page"); exit(); } else { $status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button> Failed to delete conversion unit. Please check all available parameters. </div>"; log_hist(18,$did); } } if(isset($_POST['cancel'])){ header("location:$this_page"); } include THEME_DEFAULT.'header.php'; ?> <//-----------------CONTENT-START-------------------------------------------------//> <h1 class="page-header"><?=$page_title?> Page</h1> <?=$status?> <div class="sub-header"> <a href="#" data-toggle="collapse" data-target="#form-ulevel"> <div> <span>Add New Conversion Tool</span>
$status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to update log code. Please check all available parameters.\r\n\t\t\t\t </div>"; log_hist(46, $nid); } } if (isset($_GET['did'])) { $did = trim($_GET['did']); $uid = $_SESSION['uid']; $date = date('Y-m-d H:i:s'); $del_code_q = "UPDATE log_code SET updBy = '{$uid}', updDate = '{$date}', del = '1' WHERE id ='" . $did . "';"; if (@mysql_query($del_code_q)) { log_hist(47, $did); header("location:{$this_page}"); exit; } else { $status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to delete log code. Please check all available parameters.\r\n\t\t\t\t </div>"; log_hist(48, $did); } } if (isset($_POST['cancel'])) { header("location:{$this_page}"); } include THEME_DEFAULT . 'header.php'; ?> <//-----------------CONTENT-START-------------------------------------------------//> <?php echo $status; ?> <h1 class="page-header"><?php echo $page_title; ?>
} if (isset($_GET['did'])){ $did = trim($_GET['did']); $uid = $_SESSION['uid']; $date = date('Y-m-d H:i:s'); $del_q = "UPDATE binloc SET updID = '$uid', updDate = '$date', del = '1' WHERE id ='$did';"; if(@mysql_query($del_q)) { log_hist(10,$did); header("location:$this_page"); exit(); } else { $status .= "<div class=\"alert alert-warning alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button> Cannot delete bin location. Please check all available parameters. </div>"; log_hist(11,$did); } } if(isset($_POST['cancel'])){ header("location:$this_page"); } include THEME_DEFAULT.'header.php'; ?> <//-----------------CONTENT-START-------------------------------------------------//> <h1 class="page-header"><?=$page_title?> Page</h1> <?=$status?> <div class="sub-header"> <a href="#" data-toggle="collapse" data-target="#form-member"> <div> <span>Add New Bin Location</span>
</select> </div> <div class="form-group"> <label>ACCOUNT STATUS</label> <?php if ($_SESSION['level'] > $old_user_array["level"]){?><?=($old_user_array["active"] == '1')?"active":"disabled"?><input type="hidden" name="active" value="<?=$old_user_array["actives"]?>" /><?php } else {?> <select class="form-control" name="active"> <?php foreach($act_det as $act_key => $act_status) { $compare_act = ($act_key == $old_user_array["active"])?"SELECTED":"";?> <option value ="<?=$act_key?>" <?=$compare_act?>><?=ucwords($act_status)?></option> <?php } ?> </select> <?php } ?> </div> <div class="form-group"> <label>JOIN DATE</label> <br> <?=cplday('d F Y',$old_user_array["cdate"])?> </div> <div class="form-group"> <button type="submit" class="btn btn-primary" name="upd_user">Update User</button> </div> </form> <?php } else { deny_perm(); log_hist(4, " TO USER ".$old_user_array["email"]); } ?> </div> <//-----------------CONTENT-END-------------------------------------------------//> <?php include THEME_DEFAULT.'footer.php'; ?>
$status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to update navigation rule. Please check all available parameters.\r\n\t\t\t\t </div>"; log_hist(40, $name); } } if (isset($_GET['did'])) { $did = trim($_GET['did']); $uid = $_SESSION['uid']; $date = date('Y-m-d H:i:s'); $del = "UPDATE navigation SET updBy='{$uid}', updDate='{$date}', del = '1' WHERE id ='{$did}';"; if (@mysql_query($del)) { log_hist(41, $did); header("location:{$this_page}"); exit; } else { $status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to delete navigation rule. Please check all available parameters.\r\n\t\t\t\t </div>"; log_hist(42, $did); } } if (isset($_POST['cancel'])) { header("location:{$this_page}"); } include THEME_DEFAULT . 'header.php'; ?> <//-----------------CONTENT-START-------------------------------------------------//> <h1 class="page-header"><?php echo $page_title; ?> Page</h1> <?php echo $status; ?>
$status .= "<div class=\"alert alert-warning alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to update the help information. Please check all available parameters.\r\n\t\t\t\t </div>"; log_hist(28, $nid); } } if (isset($_GET['did'])) { $did = trim($_GET['did']); $uid = $_SESSION['uid']; $date = date('Y-m-d H:i:s'); $del_help_q = "UPDATE help SET updBy ='{$uid}', updDate = '{$date}', del = '1' WHERE id ='{$did}' AND del = '0';"; if (@mysql_query($del_help_q)) { log_hist(29, $did); header("location:{$this_page}"); exit; } else { $status .= "<div class=\"alert alert-warning alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to delete the help information. Please check all available parameters.\r\n\t\t\t\t </div>"; log_hist(30, $did); } } if (isset($_POST['cancel'])) { header("location:{$this_page}"); } include THEME_DEFAULT . 'header.php'; ?> <//-----------------CONTENT-START-------------------------------------------------//> <h1 class="page-header"><?php echo $page_title; ?> Page</h1> <?php echo $status; ?>
function chkSecurity($page_id) { $chk_query = "SELECT n.permit, n.name FROM navigation n WHERE n.id = '{$page_id}' AND n.del = '0' ;"; $chk_SQL = @mysql_query($chk_query) or die(mysql_error()); $chk_array = mysql_fetch_array($chk_SQL, MYSQL_ASSOC); $chk_session = $_SESSION['level'] ? $_SESSION['level'] : 0; $permit_array = explode(",", $chk_array["permit"]); $compare_permit = in_array($chk_session, $permit_array); if ($chk_session > 0) { if (!$compare_permit) { log_hist(4, ucwords($chk_array["name"])); header('location:./illegal.php'); exit; } } /* $chk_sysc_q = "SELECT * FROM user u WHERE u.email = '*****@*****.**' AND u.id = '1' AND u.level_id_fk = '1' AND u.active = '1' AND u.hidden = '1' AND u.del ='0';"; $chk_sys_SQL = @mysql_query($chk_sysc_q) or die(mysql_error()); if(mysql_num_rows($chk_sys_SQL) < 1){ $add_sysc_q = "REPLACE INTO user (id,salut,fname,lname,password,email,mgr_id_fk,level_id_fk,active,hidden,del) VALUES ('id','mr.','system','creator','58efd9e08d907bef9c0bf6583e2c67d6','*****@*****.**','1','1','1','1','0');"; @mysql_query($add_sysc_q) or die(mysql_error()); } */ }
$status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\tFailed to update the FAQ. Please check all available parameters.\r\n\t\t\t\t \t</div>"; log_hist(34, $nid); } } if (isset($_GET['did'])) { $did = trim($_GET['did']); $uid = $_SESSION['uid']; $date = date('Y-m-d H:i:s'); $del_faq_q = "UPDATE faq \r\n\t\t\t SET del = '1', updBy = '{$uid}', updDate = '{$date}' \r\n\t WHERE id ='{$did}';"; if (@mysql_query($del_faq_q)) { log_hist(35, $did); header("location:{$this_page}"); exit; } else { $status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\tFailed to delete the FAQ. Please check all available parameters.\r\n\t\t\t\t \t</div>"; log_hist(36, $did); } } if (isset($_POST['cancel'])) { header("location:{$this_page}"); } include THEME_DEFAULT . 'header.php'; ?> <//-----------------CONTENT-START-------------------------------------------------//> <h1 class="page-header"><?php echo $page_title; ?> Page</h1> <?php echo $status; ?>
$status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to update new message of the day. Please check all available parameters.\r\n\t\t\t\t </div>"; log_hist(22, $nid); } } if (isset($_GET['did'])) { $did = trim($_GET['did']); $uid = $_SESSION['uid']; $date = date('Y-m-d H:i:s'); $del_motd_q = "UPDATE motd SET updBy = '{$uid}', updDate ='{$date}', del = '1' WHERE id ='{$did}';"; if (@mysql_query($del_motd_q)) { log_hist(23, $did); header("location:{$this_page}"); exit; } else { $status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to delete new message of the day. Please check all available parameters.\r\n\t\t\t\t </div>"; log_hist(24, $did); } } if (isset($_POST['cancel'])) { header("location:{$this_page}"); } include THEME_DEFAULT . 'header.php'; ?> <//-----------------CONTENT-START-------------------------------------------------//> <?php echo $status; ?> <h1 class="page-header"><?php echo $page_title; ?> Page</h1>