<?php	
	require_once('indexCode.php'); 
	$rs = mysql_fetch_array($result_rate);
	
?>

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel = "shortcut icon" href = "img/etl_favicon.ico" type = "image/x-icon" />
	<link type="text/css" rel="stylesheet" href="css/layout_template.css" />
	<link type="text/css" rel="stylesheet" href="css/element.css" />
	<link type="text/css" rel="stylesheet" href="css/calendar.css"  />
	<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
	<link type="text/css" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" /> 
	<!-- time picker 
	<link type="text/css" rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.21.custom.css" />  -->
	<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
	<!--<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>-->
	
	<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>

	<!-- <script type="text/javascript" src="js/jquery-ui-1.8.21.custom.min.js"></script> -->
	<script type="text/javascript" src="js/timepicker.js"></script> 
	
	<!-- New add, edit Direct -->

	<script type="text/javascript" src="js/Action.js"></script>
	<script type='text/javascript' src='js/jquery.autocomplete.js'></script>	
	<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />
	<script type="text/javascript" src="js/jquery.validate.min.js"></script>
	<script type="text/javascript" src="js/validation.js"></script>
	<!-- <script type="text/javascript" src="js/get_date.js"></script> -->
	<script type="text/javascript" src="js/DecimalFormat.js"></script>
	<script type="text/javascript" src="js/calculate.js"></script>
	<!--- <script type="text/javascript" src="js/setting_rate.js"></script> -->
	<script type="text/javascript" src="js/addition-methods.js"></script>
		
<?php function htmltage($title){ ?>
<title><?php echo $title; ?></title>
<?php }  ?>
</head>
<?php if($_GET['d']=="document/docin/docin_add" || $_GET['d']=="document/docout/docout_add") $cursor_focus="onLoad='document.frm_add_docin.doc_code.focus()'"; ?>
<body <?php echo $cursor_focus; ?>>
<?php
if($_GET['chpwd']== "chpwd"){
	include_once("v_changepwd.php");
}
?>
<div id="container">
	<div id="header">
		<a href="?d=index"><img src="img/header.png"/></a>
	</div>
	<div id="topbar">
		<div class="right">
			<ul>
				<a href="?d=index"><li><i class="fa fa-home fa-lg"></i>&nbsp;ຫນ້າຫລັກ</li></a>
				<?php if ($_SESSION['orgunitid_r'] == "" || $_SESSION['sys_type']=="counter" || $_SESSION['sys_type']=="secretary") { ?>
				<a href="?d=document/docin/docin"><li><i class="fa fa-download fa-lg"></i>&nbsp;ເອກະສານຂາເຂົ້າ</li></a>
				<a href="?d=document/docout/docout"><li><i class="fa fa-upload fa-lg"></i>&nbsp;ເອກະສານຂາອອກ</li></a>
				<?php }else{?>
				<a href="?d=document/docin/docin_dept"><li><i class="fa fa-download fa-lg"></i>&nbsp;ເອກະສານຂາເຂົ້າ</li></a>
				<a href="?d=document/docout/docout_dept"><li><i class="fa fa-upload fa-lg"></i>&nbsp;ເອກະສານຂາອອກ</li></a>
				<? } ?>
				<a href="logout.php"><li><i class="fa fa-sign-out fa-lg"></i>&nbsp;ອອກຈາກລະບົບ</li></a>				
			</ul>
						
		</div>		
	</div>	
	<div id="mainzone">
		<div id="leftbar">
		<?php if(isset($_SESSION['sys_id'])) {  ?>		
			<div class="leftbox">	
			<?php if ($_SESSION['role_id'] == 1 && $_SESSION['orgunitid_r'] == "") { ?>
			
            <a href="?d=webmaster/index"><li><i class="fa fa-cog fa-lg"></i>&nbsp;ຈັດການຂໍ້ມູນລະບົບ&nbsp;<i class="fa fa-caret-down fa-lg"></i></li></a>	
			<? } ?>
			<?php if ($_SESSION['orgunitid_r'] == "" || $_SESSION['sys_type']=="counter" || $_SESSION['sys_type']=="secretary") { ?>
			<a href="?d=document/docin/docin"><li><i class="fa fa-download fa-lg"></i>&nbsp;ເອກະສານຂາເຂົ້າ</li></a>
			<a href="?d=document/docout/docout"><li><i class="fa fa-upload fa-lg"></i>&nbsp;ເອກະສານຂາອອກ</li></a>
			<?php }else{?>
			<a href="?d=document/docin/docin_dept"><li><i class="fa fa-download fa-lg"></i>&nbsp;ເອກະສານຂາເຂົ້າ</li></a>
			<a href="?d=document/docout/docout_dept"><li><i class="fa fa-upload fa-lg"></i>&nbsp;ເອກະສານຂາອອກ</li></a>
			<? } ?>
			</div>								
		<?php } ?>
		<?php if (isset($_SESSION['sys_id'])) { ?> 	
		<div class="leftbox user_profile">
			<h1 class="h1 login_name">ສະບາຍດີ, <?= $_SESSION['first_name_s'] ?></h1>
			<p class="bold italic"><i class="fa fa-calendar fa-lg"></i>&nbsp;Date:
				<?php
        	$today = mktime(0,0,0,date("m"), date("d"), date("Y"));
          echo date("D, jS M Y", $today);
        ?>
			</p>			
			<a href="?d=<?=$_GET['d']?>&chpwd=chpwd"><li><i class="fa fa-unlock fa-lg"></i>&nbsp;ປ່ຽນລະຫັດຜ່ານ</li></a>		
		</div>
		<?php } ?>
		</div>				
		<div id="contentpage">
			<div id = "breadcrumb"><?//=breadcrumbs(); ?></div>
			<?php if (file_exists($vfilename)) include($vfilename); ?>
		</div>
	</div>
	<div id="footer">
		<p class="centered">
			&copy ໂດຍ: ພະແນກ ໄອຊີທີ (ອທອ), ພາກສ່ວນ ພັດທະນາໂປຼແກຼມ@&nbsp;14-2-2017
			<!-- <a href="#">Right Reserved@2014</a> &copy; <a href="#">by ICT Staff</a><a href="http://report.etllao.com/index_old.php" class="old right">&rArr;&nbsp;ລະບົບເອກະສານເກົ່າ&nbsp;&nbsp;</a> -->
		</p>
	</div>
</div>
</body>
</html>