<?php if (!isset($_SESSION['FirstName'])) {
	session_start();
}
//require_once ('includes/mysql_connect.php');

    include ('includes/db1config.php');
    include ('../includes/mysql_connect.php');
    include ('menudatabase.php');
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
function close_window() {
    close();
}
</script>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<?php
if(!isset($_GET['reports'])){	//don't refresh if viewing reports
	echo '<meta http-equiv="refresh" content="90" />';
}
?>
<?php //include('title.php'); ?>
<title>Menuetta Live Orders</title>

<link href="css/main_style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/print_style.css" rel="stylesheet" type="text/css" media="print" />
<link href='https://fonts.googleapis.com/css?family=Bevan' rel='stylesheet' type='text/css'>

<meta name="viewport" content="user-scalable=0, initial-scale=1.0, width=device-width" />


<meta name="apple-mobile-web-app-capable" content="yes" />

<link rel="apple-touch-icon" href="touch-icon-iphone.png"> 
<link rel="apple-touch-icon" sizes="76x76" href="images/touch-icon-ipad.png"> 
<link rel="apple-touch-icon" sizes="120x120" href="images/touch-icon-iphone-retina.png"> 
<link rel="apple-touch-icon" sizes="152x152" href="images/touch-icon-ipad-retina.png"> 

<meta name="apple-mobile-web-app-status-bar-style" content="black"> 


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"> </script>
<script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">



</head>
<body id="live-order-page">

<div id="wrapper">

<!-- start header -->
<?php include('includes/header.inc.php'); ?>
<!-- end header-->


<!-- start page -->
<div id="page-container-nobg">
<div id="page-bg-top">

   
	<!-- start content -->
<div id="content-one-column" class="live-order">
   
		<div class="post">
		  <div class="entry">
          <div id="live-order-top">
				<h1>Online Order System</h1>
                
<?php 
if($_SESSION['adminkey']=="security"){
  //echo '<center><div style="padding:0% 2% 0% 2%"><i>Auto-refresh occurs every 90 seconds, or use button to refresh immediately.</i><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><input id="save-button_refresh" type="submit" value="Refresh"></form></div>';    
include "liveorderssub.php";

	echo"</div></center>";
} else {
	$uri = $_SERVER['REQUEST_URI'];
	if( $uri!='' && in_array('liveorders.php',explode('/',$uri))){
		include('login.php');
	}else{
		echo '<div id="live-order-top"><div style="padding:0% 2% 0% 2%"><font color="red"><center>You are not authorized to view this page. <br />Please <a href="index.php"><font color="blue">login here</font></a>.</center></font></div></div>';
	}

}

?>            
       

</div><!-- end entry-->



</div><!-- end post-->
    

<script>
	
	$(document).ready(function() {
		$('#datepicker1').datepicker({ dateFormat: 'yy-mm-dd' });
		$('#datepicker2').datepicker({ dateFormat: 'yy-mm-dd' });	

		$(".reset").click(function() {
		    $(this).closest('form').find("input[type=text]").val("");
		    $(this).closest('form').submit();
		});

	});
</script>
<div style="clear: both;">&nbsp;</div>
<div id="page-bg-btm">
</div><!-- end page-bg-btm div -->
</div><!-- end page-bg-top div -->
</div><!-- end page-container -->



</div><!-- end wrapper div-->

<!-- end page -->


<!--footer-->



</body>
</html>
