<?php 
ob_start();
session_start();
error_reporting(0);
  include "../config/koneksi.php";
  include "../config/session_admin.php";
  include "../config/fungsi_indotgl.php";
  include "../config/class_paging.php";
  include "../config/library.php";
  include "../config/fungsi_rupiah.php";
  include "kodeauto.php";

if ($_SESSION[leveluser]=='karyawan' AND $_SESSION[status]=='biasa'){
    $status = 'kasir';
}elseif ($_SESSION[leveluser]=='karyawan' AND $_SESSION[status]=='grosir'){
    $status = 'grosir';
}elseif ($_SESSION[leveluser]=='admin' AND $_SESSION[status]=='biasa'){
    $status = 'admin';
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Optik Minang & Citra Group - Point of Sale (Aplikasi Penjualan)</title>
<meta name="author" content="Robby Prihandaya">
<link rel="stylesheet" type="text/css" href="../view/css/main.css">
<link rel="stylesheet" type="text/css" href="../view/css/demo_table.css">
<link rel="stylesheet" href="../view/css/colorbox.css" type="text/css" media="all" />
<script type="text/javascript" src="../view/js/ga.js"></script>
<script type="text/javascript" src="../view/js/jscript_jquery-1.6.4.js"></script>
<script type="text/javascript" src="../view/js/xdarkbox.js"></script>
<script type="text/javascript" src="../view/js/xeasyTooltip.js"></script>
<script type="text/javascript" src="../view/js/xjquery.easing.1.3.js"></script>
<script type="text/javascript" src="../view/js/xjquery.jqtransform.js"></script>
<script type="text/javascript" src="../view/js/zhover.js"></script>
<script type="text/javascript" src="../view/js/jquery-func.js"></script>
<script type="text/javascript" src="../view/js/colorbox/jquery.min.js"></script>
<script type="text/javascript" src="../view/js/clock.js"></script>
<script type="text/javascript" src="../view/js/colorbox/jquery.colorbox.js"></script>
<script type="text/javascript" src="../view/js/jquery.validate.min.js"></script>

<!-- Auto Complete -->
<script type="text/javascript" src="../view/js/autocomplete/jquery-1.4.2.js"></script>
<script type='text/javascript' src="../view/js/autocomplete/jquery.autocomplete.js"></script>
<link rel="stylesheet" type="text/css" href="../view/js/autocomplete/jquery.autocomplete.css" />
<script type="text/javascript">
$().ready(function() {
	$("#instansi").autocomplete("cari_instansi.php",
	$("#dokter").autocomplete("cari_dokter.php",
	$("#sales").autocomplete("cari_sales.php",
	$("#type").autocomplete("cari_type.php",
	$("#jenis").autocomplete("cari_jenis.php", 
	$("#ukuran").autocomplete("cari_ukuran.php", {
		width: 210,
		matchContains: true,
		selectFirst: true
	}))))));
});
</script>
<!-- End Auto Complete -->

<!-- Date Picker -->	
    <link type="text/css" href="../view/development-bundle/themes/base/ui.all.css" rel="stylesheet" />  	

    <script type="text/javascript" src="../view/development-bundle/ui/ui.core.js"></script>
    <script type="text/javascript" src="../view/development-bundle/ui/ui.datepicker.js"></script>
    <script type="text/javascript"> 
      $(document).ready(function(){
        $("#tgl1").datepicker();
      });
	  
	  $(function() {
        $( "#tgl1" ).datepicker();
       $( "#tgl1" ).change(function() {
             $( "#tgl1" ).datepicker( "option", "dateFormat","dd/mm/yy" );
         });
       });
    </script>
    
	    <script type="text/javascript"> 
      $(document).ready(function(){
        $("#tgl2").datepicker();
      });
	  
	  $(function() {
        $( "#tgl2" ).datepicker();
       $( "#tgl2" ).change(function() {
             $( "#tgl2" ).datepicker( "option", "dateFormat","dd/mm/yy" );
         });
       });
    </script>
	<script type="text/javascript"> 
      $(document).ready(function(){
        $("#tgl3").datepicker();
      });
	  
	  $(function() {
        $( "#tgl3" ).datepicker();
       $( "#tgl3" ).change(function() {
             $( "#tgl3" ).datepicker( "option", "dateFormat","dd/mm/yy" );
         });
       });
    </script>
		<script type="text/javascript"> 
      $(document).ready(function(){
        $("#tgl5").datepicker();
      });
	  
	  $(function() {
        $( "#tgl5" ).datepicker();
       $( "#tgl5" ).change(function() {
             $( "#tgl5" ).datepicker( "option", "dateFormat","dd/mm/yy" );
         });
       });
    </script>
<!-- Date Picker End -->

		<script src="../view/js/table/jquery.dataTables.js" type="text/javascript"></script>
        <script src="../view/js/table/jquery.dataTables.columnFilter.js" type="text/javascript"></script>
		<script type="text/javascript" charset="utf-8">
			$(document).ready( function () {
				$('#example').dataTable().columnFilter();	
			} );
		</script>
	<script type="text/javascript"> 
		$(function(){
			var url = window.location.href; 
			$("#dropMenu a").each(function() {
				if(url == (this.href)) { 
					$(this).closest(".li").addClass("active");
					$(this).closest(".submenu1").addClass("active");
					$(this).closest(".submenu").addClass("active");
				}
			});
		});
	</script>
	<style>
	.active a { color: red !important; background: #cecece !important;}
	</style>
	<script src="../view/js/jquery.shortcuts.min.js" type="text/javascript"></script>
	<script>
		$.Shortcuts.add({
			type: 'down',
			mask: 'F1',
			handler: function() {
				window.open('print_resep.php?id=<?php echo $_SESSION[id_pesanan_eceran] ?>', '_blank');
			}
		}).start();

		$.Shortcuts.add({
			type: 'down',
			mask: 'F2',
			handler: function() {
				window.open('print_nota.php?id=<?php echo $_SESSION[id_pesanan_eceran] ?>', '_blank');
			}
		}).start();

		$.Shortcuts.add({
			type: 'down',
			mask: 'F3',
			handler: function() {
				var r = confirm('Anda yakin ingin reset transaksi ini?');
				if (r == true) {
			        window.open('aksi.php?module=keranjang&act=reset', '_self');
			    } else {
			        window.open('keranjang-belanja.html', '_self');
			    }
			}
		}).start();

		$.Shortcuts.add({
			type: 'down',
			mask: 'F4',
			handler: function() {
				document.forms['submitecer'].submit();
			}
		}).start();

		$.Shortcuts.add({
			type: 'down',
			mask: 'F5',
			handler: function() {
				window.open('simpan-transaksi.html', '_self');
			}
		}).start();
	</script>


</head>
<body id="indexBody">
<div class="extra">
	<div class="main-width">
		<div id="header">
			<div class="wrapper">
				<div class="logo">
						<a class="header" href="home"><span style='color:red; text-transform:uppercase'><?php echo $status; ?></span> - OPTIK MINANG & CITRA GROUP</a>
						<p style='color: #e3e3e3; margin-top: 4px;'>Jl.K.H. Ahmad Dahlan No 140 B Solok, No Telephone : (0755) 21060, Sumatra Barat, Indonesia.</p>
				</div>
			</div>

			  <div id="dropMenu">
					<?php
						if ($status == 'admin'){
							include "menu/menu-admin.php";
						}elseif($status == 'grosir'){
							include "menu/menu-grosir.php";
						}elseif($status == 'kasir'){
							include "menu/menu-kasir.php";
						}
					?>
			  </div>
		</div>

		<div class="wrapper bnrs">
			<div style='min-height:300px' id="bannerOne">
				<?php echo "<br/>"; include "kiri.php"; ?>
			</div>
		</div>
    </div>
		<div id="footer">
			<div class="wrapper">
				<div class="copyright">
						Copyright (c) <?php echo date("Y"); ?> <a href="#" target="_blank">Optik Minang Solok</a>. Develop by <a href="#" target="_blank">Robby Prihandaya</a>
				</div><div></div>
			</div>
		</div>
</div>
</body>
</html>

