451 lines
17 KiB
PHP
451 lines
17 KiB
PHP
<?php
|
|
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
|
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
|
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
|
header("Pragma: no-cache");
|
|
header( 'Content-Type: text/html; charset=utf-8' );
|
|
|
|
clearstatcache();
|
|
error_reporting(0);
|
|
shell_exec('2>&1 svn update G:/xampp/htdocs/gharda/ --non-interactive');
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
<meta charset="utf-8" />
|
|
<meta name="description" content="" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
|
|
|
<?php
|
|
include('log_entry.php');
|
|
include ('constants.php');
|
|
include ('includes/config/config.php');
|
|
include_once ("includes/functions.php");
|
|
include_once("includes/cached_functions.php");
|
|
|
|
$__currentPage = $_SERVER['REQUEST_URI'];
|
|
$__currentPage = substr($__currentPage, strripos($__currentPage, "/") + 1, strlen($__currentPage));
|
|
|
|
$opd_menu_id=getTableFieldValue('menu_master','menu_id','menu_url','"appointment_list.php"');
|
|
$top_user = $_SESSION['username'];
|
|
|
|
$sql_menu_exists= "select menu_id from menu_master where upper(menu_url)=upper('".$__currentPage."')";
|
|
$result_menu_exists = mysqli_query($conn,$sql_menu_exists);
|
|
$countAccessibleMenuPages_exists=mysqli_num_rows($result_menu_exists);
|
|
|
|
$sql_menu= "select menu_id from menu_master where upper(menu_url)=upper('".$__currentPage."') and menu_id in(select menu_id from assign_menu where role_id='".$_SESSION['RoleId']."')";
|
|
$result_menu = mysqli_query($conn,$sql_menu);
|
|
$countAccessibleMenuPages=mysqli_num_rows($result_menu);
|
|
|
|
if($countAccessibleMenuPages_exists!=0 && $countAccessibleMenuPages==0){
|
|
error_log("Invalid Access Attempt to a page by $top_user to the page : $__currentPage");
|
|
echo "<script>location.href='error.php'</script>";
|
|
}
|
|
if($row_menu = mysqli_fetch_array($result_menu)){
|
|
if (isset($row_menu['menu_id']) && $row_menu['menu_id']!= ''){
|
|
$_SESSION['menu_key'] = $row_menu['menu_id'];
|
|
}
|
|
}
|
|
$_SESSION['menu_current_page'] = $__currentPage;
|
|
include_once ('access.php');
|
|
|
|
// echo "top_user:".$top_user.":Manoj";
|
|
|
|
if ($top_user == null || $top_user = '') {
|
|
|
|
session_start();
|
|
|
|
session_unset();
|
|
|
|
session_destroy();
|
|
header("location:index.php");
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<head>
|
|
<title>OHCTech | EHS System</title>
|
|
|
|
<script src="includes/css-js/functions.js"></script>
|
|
|
|
<!-- bootstrap & fontawesome -->
|
|
<link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
|
|
<link rel="stylesheet" type="text/css" href="css/bootstrap-dialog.min.css" />
|
|
<link href="css/flexigrid.css" rel="stylesheet" />
|
|
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css" />
|
|
<link rel="stylesheet" type="text/css" href="css/bootstrap-datepicker.css" />
|
|
<!-- <link rel="stylesheet" href="adminLte/bower_components/ionicons/css/ionicons.min.css">
|
|
<link rel="stylesheet" href="adminLte/bower_components/jvectormap/jquery-jvectormap.css"> -->
|
|
|
|
|
|
|
|
|
|
<!-- page specific plugin styles -->
|
|
|
|
<!-- text fonts -->
|
|
<link rel="stylesheet" href="assets/css/fonts.googleapis.com.css" />
|
|
|
|
<!-- ace styles -->
|
|
<link rel="stylesheet" href="assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
|
|
<link rel="stylesheet" href="assets/css/ace-skins.min.css" />
|
|
<link rel="stylesheet" href="assets/css/ace-rtl.min.css" />
|
|
|
|
<link rel="stylesheet" href="assets/css/jquery-ui.min.css" />
|
|
<script src="assets/js/jquery-2.1.4.min.js"></script>
|
|
<script type="text/javascript">
|
|
if ('ontouchstart' in document.documentElement)
|
|
document.write("<script src='assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
|
|
</script>
|
|
<script src="assets/js/bootstrap.min.js"></script>
|
|
|
|
<!-- page specific plugin scripts -->
|
|
<script src="assets/js/jquery-ui.custom.min.js"></script>
|
|
<script src="assets/js/jquery-ui.min.js"></script>
|
|
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
|
|
<script src="assets/js/jquery.easypiechart.min.js"></script>
|
|
<script src="assets/js/jquery.sparkline.index.min.js"></script>
|
|
<script src="assets/js/jquery.flot.min.js"></script>
|
|
<script src="assets/js/jquery.flot.pie.min.js"></script>
|
|
<script src="assets/js/jquery.flot.resize.min.js"></script>
|
|
<script src="assets/js/autosize.min.js"></script>
|
|
<!-- ace scripts -->
|
|
<script src="assets/js/ace-elements.min.js"></script>
|
|
<script src="assets/js/ace.min.js"></script>
|
|
|
|
<!-- inline scripts related to this page -->
|
|
<script type="text/javascript" src="js/bootstrap-filestyle.min.js" />
|
|
</script>
|
|
|
|
<script type="text/javascript" src="js/bootstrap-dialog.min.js" />
|
|
</script>
|
|
|
|
<script type="text/javascript" src="js/bootstrap-datepicker.js" />
|
|
</script>
|
|
<script type="text/javascript" src="js/jquery.dataTables.min.js" />
|
|
</script>
|
|
<!-- ace settings handler -->
|
|
<script src="assets/js/ace-extra.min.js"></script>
|
|
<!--online css-->
|
|
<link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css">
|
|
|
|
<script src="js/jquery-migrate.js"></script>
|
|
<script src="js/flexigrid.js" langugage="Javascript" />
|
|
</script>
|
|
<script src="js/ohctech.js"></script>
|
|
|
|
<link rel="stylesheet" href="css/select2.min.css">
|
|
<script src="js/select2.full.min.js"></script>
|
|
|
|
<style>
|
|
.main-container:before,
|
|
.page-content {
|
|
background-color: <?php echo getTableFieldValue('ohc_type', 'background_color', 'ohc_type_id', $_SESSION["current_ohcttype"]) ?>;
|
|
}
|
|
|
|
.box {
|
|
position: relative;
|
|
border-radius: 3px;
|
|
background: #ffffff;
|
|
border-top: 3px solid #d2d6de;
|
|
margin-bottom: 20px;
|
|
width: 100%;
|
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.box.box-info {
|
|
border-top-color: #00c0ef;
|
|
}
|
|
|
|
.box.box-danger {
|
|
border-top-color: #dd4b39;
|
|
}
|
|
|
|
.box.modal-greytop {
|
|
border-top-color: #d2d6de;
|
|
}
|
|
|
|
.box.box-success {
|
|
border-top-color: #3C8DBC;
|
|
}
|
|
|
|
.box.box-warning {
|
|
border-top-color: #f39c12;
|
|
}
|
|
|
|
.box.box-primary {
|
|
border-top-color: #3c8dbc;
|
|
}
|
|
|
|
.box-header {
|
|
color: #444;
|
|
display: block;
|
|
padding: 10px;
|
|
position: relative;
|
|
}
|
|
|
|
.box-header.with-border {
|
|
border-bottom: 1px solid #f4f4f4;
|
|
}
|
|
|
|
.box-header>.fa,
|
|
.box-header>.glyphicon,
|
|
.box-header>.ion,
|
|
.box-header .box-title {
|
|
display: inline-block;
|
|
font-size: 18px;
|
|
margin: 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
.box-footer {
|
|
border-top-left-radius: 0;
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 3px;
|
|
border-bottom-left-radius: 3px;
|
|
border-top: 1px solid #f4f4f4;
|
|
padding: 10px;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.box-body {
|
|
border-top-left-radius: 0;
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 3px;
|
|
border-bottom-left-radius: 3px;
|
|
padding: 10px;
|
|
}
|
|
|
|
.modal-title {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body class="no-skin sidebar-collapse">
|
|
<div id="navbar" class="navbar navbar-default ace-save-state"
|
|
style="border-bottom: 6px solid #d2d6de;border-top: 3px solid #d2d6de;border-left: 3px solid #d2d6de;border-right: 3px solid #d2d6de;">
|
|
<div class="navbar-container ace-save-state" id="navbar-container" style="padding:0;">
|
|
<button type="button" class="navbar-toggle menu-toggler" id="menu-toggler" data-target="#sidebar">
|
|
<span class="sr-only">Toggle sidebar</span> <span class="icon-bar"></span>
|
|
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
|
</button>
|
|
<?php
|
|
$sql = "select * from company_profile ";
|
|
$result = mysqli_query($conn,$sql);
|
|
$row = mysqli_fetch_array($result);
|
|
?>
|
|
|
|
<?php if(isset($row['company_logo']) && $row['company_logo']!=null){?>
|
|
|
|
<div class="navbar-header pull-left" style="text-wrap:nowrap; border-right: 3px solid #d2d6de;">
|
|
<img src="data:<?=$row['image_type']?>;base64,<?=base64_encode( $row['company_logo'] )?>"
|
|
style="width:90px; height: 46px; margin:0px;padding:0px;">
|
|
</div>
|
|
<?php }else if(isset($row['right_com_logo']) && $row['right_com_logo']!=null){?>
|
|
<div class="navbar-header pull-left" style="text-wrap:nowrap; border-right: 3px solid #d2d6de;">
|
|
|
|
<img src="data:<?=$row['right_image_type']?>;base64,<?=base64_encode( $row['right_com_logo'] )?>"
|
|
style="width:90px; height: 46px; margin:0px;padding:0px;">
|
|
</div>
|
|
|
|
<?php } else {?>
|
|
<div class="navbar-header pull-left" style="text-wrap:nowrap; border-right: 3px solid #d2d6de;">
|
|
<img src="images/logo.jpg" style="width:90px; margin:0px;padding:0px;">
|
|
</div>
|
|
<?php }?>
|
|
,
|
|
<div class="navbar-header" style="position: relative; width:70%; height:1%; text-align:center;padding:0;">
|
|
<section class="content-header">
|
|
<h2 Style="color:#fff;text-align: center;margin-bottom: 3px;margin-top: 3px;">EHS System <small style="color:#fff">(<?=$row['address']?>,<?php
|
|
echo getTableFieldValue('ohc_type','ohc_type_name','ohc_type_id',$_SESSION['current_ohcttype']);
|
|
?>)</small> </h2>
|
|
</section>
|
|
</div>
|
|
|
|
<?php if(isset($row['right_com_logo']) && $row['right_com_logo']!=null){?>
|
|
<div class="navbar-header pull-right" style="text-wrap:nowrap; border-right: 3px solid #d2d6de;">
|
|
|
|
<img src="data:<?=$row['right_image_type']?>;base64,<?=base64_encode( $row['right_com_logo'] )?>"
|
|
style="width:100px; height: 46px; margin:0px;padding:0px;">
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
<!--Start of notification-->
|
|
<div class="navbar-buttons navbar-header pull-right" role="navigation">
|
|
<ul class="nav ace-nav">
|
|
<?php
|
|
$sql = "select * from patient_master where id = '" . $_SESSION['logged_user_empid'] . "' ";
|
|
$result = mysqli_query($conn,$sql);
|
|
$row = mysqli_fetch_array($result);
|
|
?>
|
|
<li class="light-blue dropdown-modal">
|
|
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
|
|
<?php if(isset($row['photo']) && $row['photo']!=null){?>
|
|
<img class="nav-user-photo"
|
|
src="data:<?=$row['image_type']?>;base64,<?=base64_encode( $row['photo'] )?>"
|
|
alt=" <?php echo($_SESSION['username']) ?>'s Photo" />
|
|
|
|
<?php
|
|
} else {
|
|
$gender = $row['gender'];
|
|
if ($gender == 'F') {
|
|
|
|
?>
|
|
<img class="nav-user-photo" src="images/female-profile.png"
|
|
alt=" <?php echo($_SESSION['username']) ?>'s Photo" />
|
|
<?php } else {?>
|
|
<img class="nav-user-photo" src="images/male-profile.png"
|
|
alt=" <?php echo($_SESSION['username']) ?>'s Photo" />
|
|
<?php }}?>
|
|
|
|
<?php if($_SESSION['current_ohcttype']!=null && $_SESSION['current_ohcttype']!=''){
|
|
?>
|
|
<span class="user-info"> <small>
|
|
<?php echo($_SESSION['username']).',';
|
|
?>
|
|
|
|
<?php }else{?>
|
|
|
|
<span class="user-info"> <small>Welcome,</small>
|
|
<?php echo($_SESSION['username']);
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
<br>
|
|
<?=getFieldFromTable('role_name','role_master','role_id',$_SESSION['RoleId']);?>
|
|
</small>
|
|
|
|
|
|
</span> <i class="ace-icon fa fa-caret-down"></i>
|
|
</a>
|
|
|
|
<ul
|
|
class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
|
|
<?php
|
|
$role_arr = explode (",", $_SESSION['roleids']);
|
|
$ohc_arr = explode (",", $_SESSION['ohctypes']);
|
|
?>
|
|
<?php if(sizeOf($ohc_arr)>1){?><li><a href="interim_ohc_selection.php"> <i
|
|
class="ace-icon fa fa-industry"></i> Switch OHC
|
|
</a></li><?php }?>
|
|
<?php if(sizeOf($role_arr)>1){?><li><a href="interim_role_selection.php"> <i
|
|
class="ace-icon fa fa-exchange"></i> Switch Role
|
|
</a></li><?php }?>
|
|
<li><a href="manage_signature.php"> <i class="ace-icon fa fa-paw"></i> Manage Signature
|
|
</a></li>
|
|
|
|
<?php if (!isset($_SESSION['__SSOAuthenticated_username'])) { ?><li><a
|
|
href="techsyn_chpass.php"> <i class="ace-icon fa fa-key"></i> Change Password
|
|
</a></li><?php }?>
|
|
<li class="divider"></li>
|
|
|
|
<li><a href="docs/OHCTECH_Manual_v1.docx"> <i class="ace-icon fa fa-book"></i>
|
|
Read Manual
|
|
</a></li>
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li><a href="<?php if (isset($_SESSION['__SSOAuthenticated_username'])) { ?>https://login.microsoftonline.com/common/wsfederation?wa=wsignout1.0<?php }else{ ?>logout.php<?php }?>"> <i class="ace-icon fa fa-power-off"></i>
|
|
Logout
|
|
</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!--End of notofication-->
|
|
</div>
|
|
<!-- /.navbar-container -->
|
|
</div>
|
|
|
|
<?php
|
|
// if($_SESSION['RoleCode'] != $__ROLE_RECEPTIONIST){
|
|
include('form/direct_checkup_selector.php');
|
|
// } ?>
|
|
<script>
|
|
// $(document).ready(function() {
|
|
// $("input[type=text]").keyup(function() {
|
|
// $(this).val($(this).val().toUpperCase());
|
|
// });
|
|
// $("textarea").keyup(function() {
|
|
// $(this).val($(this).val().replace(/\r\n|\r|\n/g, "\n"));
|
|
// $(this).val($(this).val().toUpperCase());
|
|
// });
|
|
// });
|
|
<?php
|
|
$unitMap =getKeyValueMap('unit_master','unit_id','unit_name');
|
|
//echo "unit Map: ". $unitMap['1'];
|
|
?>
|
|
var unitMap = $.parseJSON('<?php echo json_encode($unitMap) ?>');
|
|
|
|
function getUnitForChildItem(field_id, item_value, count) {
|
|
var item_id = item_value;
|
|
|
|
$.ajax({
|
|
url: 'getUnitByItemId.php',
|
|
method: 'POST',
|
|
data: {
|
|
item_id: item_id
|
|
},
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
if (data != null && data != "") {
|
|
$("#" + field_id + count).html(data.unit_name);
|
|
|
|
}
|
|
|
|
},
|
|
error: function(data) {
|
|
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
function getUnitForItem(item_value) {
|
|
var item_id = item_value;
|
|
var unit_name = "";
|
|
$.ajax({
|
|
url: 'getUnitByItemId.php',
|
|
method: 'POST',
|
|
data: {
|
|
item_id: item_id
|
|
},
|
|
async: false,
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
if (data != null && data != "") {
|
|
unit_name = data.unit_name;
|
|
|
|
}
|
|
|
|
},
|
|
error: function(data) {
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return unit_name;
|
|
}
|
|
</script>
|