
<?php
include('admin-config.php');
if (isset($_SESSION['FirstName'])&&($_SESSION['adminkey']=="security")) {
//print_r($_SESSION);

//echo $_SERVER['HTTP_HOST'];
if(stristr($_SERVER['HTTP_HOST'], "restaurant-online.biz")){
	$root_path = "http://www.restaurant-online.biz/".$_SESSION['root_folder'];
} elseif(stristr($_SERVER['HTTP_HOST'], "tastedisplay.com")){
	$root_path = "http://www.tastedisplay.com/".$_SESSION['root_folder'];
} else {
	$root_path="";
}
$linkPosFlag = 0;
$monitorFlag = 0;

$getUseLinkPosQuery = "Select use_linkpos from admin_options";
$lresult = mysql_query($getUseLinkPosQuery);
$lrow = mysql_fetch_array($lresult);
if(isset($lrow) && !empty($lrow))
{
	$linkPosFlag = $lrow['use_linkpos'];
	$getMonitorFlagQuery = "Select flag from monitoring_changes where user_id = '".$_SESSION['UserID']."'";
	$result = mysql_query($getMonitorFlagQuery);
	$row = mysql_fetch_array($result);
	if(isset($row) && !empty($row)){
		$monitorFlag = $row['flag'];
	}
}
?>
<script>
function warningAction(flag1,flag2) {

	if(flag1 == 1 && flag2 == 1){
		if (confirm("Warning: There have been changes to the menu. Please be sure you export the menu to LinkPOS") == true) {
		        return true;
		    }else {
		       return false;
		    }
	}
}

</script>

<?
// echo '<div id="warningPopup" class="toPopDiv" style="disply:none">
// 			<div id="close_btn"></div>
// 			<div class="close close_warning" onclick="closeWarningPopup()"></div>
// 				<span class="ecs_tooltip">Esc to close <span class="arrow"></span></span>
// 				<div id="popup_content"> <!-- your content start -->';
// 				echo '</div> <!-- your content end -->
// 							Hello
// 						</div> <!-- to popup end -->';


echo'<div id="sidebar">
<ul>
<li>
            
<div id="header-custom-buttons">
<ul class="admin-left-sidebar">
<a href="../index.php" target="_blank"><li><div id="sidebar-logo"><img src="'.$root_path.'/custom/images/header-logo.png" /></div>
VIEW MY SITE</li></a>
<!--<li><a href="http://www.restaurantonline.biz/wwwroot/roo-resources/roo-quick-start-guide.pdf" target="_blank">QUICK START GUIDE</a></li>-->
<a href="index.php"><li>HOME ADMIN</li></a>
<a href="logout.php" id="logout-li" onclick="return warningAction('.$linkPosFlag.','.$monitorFlag.')"><li>LOG OUT</li></a>';
if($linkPosFlag == 1 && $monitorFlag == 1){
	echo '<li id="warning-li"><font color=red>Warning: Menu Export Required</font></li>';
}
echo '</ul>
</div>';


	if($_SESSION['iframed']!=1){
		                echo '<div id="help-box">
		                <h2>Recommended Links</h2>
						<ul>
						<li><span class="sidebar-links">Submit your site to <a href="https://www.google.com/webmasters/tools/submit-url" target="_blank">Google</a></span></li>
						<li><span class="sidebar-links">Submit your site to <a href="http://www.bing.com/toolbox/submit-site-url" target="_blank">Bing</a></span></li>
						<li><span class="sidebar-links"><a href="http://www.google.com/analytics" target="_blank">Google Analytics</a></span></li>
						<li><span class="sidebar-links"><a href="http://www.google.com/business/placesforbusiness" target="_blank">Google Business</a></span></li>
						</ul>
						</div>
		
						<div id="help-box">
						<center><p><img src="images/paypal-logo.png"><br />
						<strong>Accept Online Payments <br />Securely with 
						<strong><a href="https://www.paypal.com/webapps/merchantboarding/webflow/unifiedflow?execution=e1s1" target="_blank">PayPal</a></strong><br /> or <strong>
						<a href="https://registration.paypal.com?producttype=C2&country=US&mode=live&partner=restaurantonline" target="_blank">PayPal Payflow Pro</a> </strong>
						</p>
						</center>
						
						</div>
						
						</div>
						';
		}
		                
	echo '</li>    
	</ul>
	</div>';
} else {
	echo'<div id="sidebar">
	<ul>
	<li>
	            
	<div id="header-custom-buttons">
	<ul>
	<li><div id="sidebar-logo" style="height:466px;"><img src="../custom/images/header-logo.png" /></div></li>
	

	</ul>';
	echo '</div>';	
	echo '</div>';	
}

?>
