<?php
session_start();
include('../custom/db1.php'); //get db name
 //set db creds
$host = 'localhost'; 
$username = 'restaura_taste';
$password = 'Daughters2'; 
include('../includes/mysql_connect.php'); //connect to db

$query = "SELECT * from storePrefs";
$rt=mysql_query($query);
while($nt=mysql_fetch_array($rt)){
	$tastepos_enabled=$nt[tastepos_enabled];
	$tastepos_active=$nt[tastepos_active];
	$tastepos_subscribed=$nt[tastepos_subscribed];
}
if($tastepos_enabled!='1' || $tastepos_active!='1' || $tastepos_subscribed!='1'){
	//taste systems pos not enabled - redirect now
	$redirect_url = "../index.php";
	header("Location: $redirect_url");
	die();
}
if($_GET['action']=="logout"){
	session_unset(); 
	session_destroy();
	echo "You are logged out.";
}
?>
<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Taste Systems POS</title>

<?php include('headlinks.php') ?>

</head>

<body>

<div id="warning-message">
    Landscape mode required for this system. Please rotate 90 degrees.
</div>


<div id="screen-wrapper">

<div id="welcome-logo">
<img src="images/welcome-logo.png" alt="welcome" />
</div>

<div id="welcome-buttons">
<ul>
<li><a href="new-order.php">POS Kiosk</a></li>
<li><a href="">POS Admin</a></li>
</ul>
</div>
    
</div><!-- end screen wrapper -->

</body>
</html>
