<script>

var screenWidth = window.screen.width,

    screenHeight = window.screen.height;

</script>



<?php

include("admin_globals.php");



//print_r($_SESSION);

echo "<div align=center>Welcome, {$_SESSION['FirstName']}, <br> You are now logged into your marketing tool admin page. <br><br>";





//if not viewing a specific admin area, show all buttons

if(empty($_GET['area']) || $_GET['area']==""){

	echo '<div id="small-admin-wrapper">';

	echo '<ul>';

	//ecommerce section

	echo '<li><a '.$ecommerce_class.' href="'.$ecommerce_url.'" data-tooltip="Sell products or services online.">';

	echo '	<span id="admin-icon"><img src="images/admin-ecommerce-icon.png"></span><br />E-Commerce</a></li>';

	

	//menu section

	echo '<li><a '.$menu_class.' href="'.$menu_url.'" data-tooltip="Modify your menu information">';

	echo '	<span id="admin-icon"><img src="images/admin-menu-icon.png"></span><br />Menu Management</a></li>';

	

	//menu board section

	echo '<li><a '.$menu_board_class.' href="'.$menu_board_url.'" data-tooltip="Display your menu, specials, etc. on digital monitors">';

	echo '<span id="admin-icon"><img src="images/admin-board-icon.png"></span><br />Digital Display</a></li>';

	

	//web content section

	echo '<li><a '.$content_class.' href="'.$content_url.'" data-tooltip="Add or edit content to your website pages">';

	echo '<span id="admin-icon"><img src="images/admin-web-icon.png"></span><br />Web Content</a></li>';

	

	//online ordering section

	echo '<li><a '.$online_ordering_class.' href="'.$online_ordering_url.'" data-tooltip="Allow customers to order your menu items online">';

	echo '<span id="admin-icon"><img src="images/admin-online-order-icon.png"></span><br />Online Ordering</a></li>';

	

	//business/store preferences section

	echo '<li><a '.$prefs_class.' href="'.$prefs_url.'" data-tooltip="Phone, contact, hours and general business information">';

	echo '<span id="admin-icon"><img src="images/admin-preferences-icon.png"></span><br />Business Preferences</a></li>';

	

	//marketing section

	echo '<li><a '.$marketing_class.' href="'.$marketing_url.'" data-tooltip="Market to your customers with email and texting campaigns">';

	echo '<span id="admin-icon"><img src="images/admin-marketing-icon.png"></span><br />Marketing</a></li>';

	

	//quick links section

	echo '<li><a '.$quicklinks_class.' href="'.$quicklinks_url.'" data-tooltip="Quickly access related links">';

	echo '<span id="admin-icon"><img src="images/admin-quick-icon.png"></span><br />Quick Links</a></li>';

	

	echo '</ul>';

	echo '</div>';



}			

			

			echo "<div id='admin-wrapper'>

			<table width=100% border=0><td>

			<!--<div align=center>Welcome, {$_SESSION['FirstName']}, <br> You are now logged into your marketing tool admin page. <br><br>-->";

			echo "<div align='left'>";

			################## left column starts here #########################	

			//if restaurant package enabled, show menu admin area

			if($restaurant_pkg=='1'){

				if($_GET['area']=="menu"){				

					//**********RESTAURANT MENU ADMIN SECTION BEGINS

					echo "<div id='admin-left-column'>

					<div id='admin-left-column-top'>

					<ul><li>MANAGE YOUR MENU

					<div class='info-link'><a href='#' class='popup' data-popup-id='0'><img src='images/info-icon.png'></a></div>

					 <div class='toPopDiv' id='popup_0'> 

					<div class='close'></div>

					<span class='ecs_tooltip'>Esc to close <span class='arrow'></span></span>

					<div id='popup_content'> <!--your content start-->

					<h2>Recommended procedure for entering your menu content:</h2>
<div style='width:92%;'>
					<ul>

					<li><strong>FIRST</strong><br />Create your categories - All items must be placed in a category first or they will not display on your site. NOTE: make sure you check the Active checkbox to have your categories display on your site. Uncheck this box if you want the category hidden while you are entering your menu content (this also applies to your menu items).</li>

					<li><strong>SECOND</strong><br />Set up your item sizes - You can use the built-in sizes, or create your own custom sizes. 

					Add all sizes that you will use for all your various foods and beverages.  Doing so in advance will save you time later on when you apply sizes to your menu items.</li>

					<li><strong>THIRD</strong><br />Enter your Options and Fixings <font color='red'>(Only necessary for Online Ordering)</font> - <strong>Fixings</strong> are add-ons to your menu items, you can apply additional cost or no cost to these items. <strong>Options</strong> are choices such as wheat or white bread, etc... there is no additional pricing option for the Options category - so if you are adding cost to an extra for a menu item you should use the Fixings category.</li>

					<li><strong>FOURTH</strong><br />Start entering your menu items - You are now ready to start entering your 

					menu item information. You can always go back and make changes at anytime.</li>

					</ul>
</div>
					

					</div> <!--your content end-->

					</div> <!--toPopup end-->

					<div class='loader'></div>

					<div id='backgroundPopup'></div>

					</li></ul></div>

					<div id='admin-content-bg'>";

					if(empty($menudatabase))  { //only allow editing menu if not linked to another store's database

						echo"<ul>

						<li><a href='menu_admin.php' data-tooltip='Add, remove, rename or schedule your online menus.'>Menus</a></li>

						<li><a href='editmenucat.php' data-tooltip='Add, edit or delete menu categories'>Categories</a></li>

						<li><a href='editmenuitem.php' data-tooltip='Add, edit or delete menu item information'>Items</a></li>

						

						";

						echo "

						<li><a href='editsizes.php' data-tooltip='Add, edit or delete all sizes for your menu items - all sizes need to be created in this area'>Sizes</a></li>";

						if($ordering_subscribed==1){	//show upsell options only if online ordering is in use

							echo "<li><a href='editupsell.php' data-tooltip='Add upsell options to visitors order before check out - Available for online ordering users only'>Upsells</a></li>";

						} else {

							echo "<li><a href='editupsell.php'>Upsells</a></li>";

						}  echo "<li><a href='index.php?admin-page=2&rev=menu' data-tooltip='Manage menu reviews'>Reviews</a></li>";					

						echo "</ul>";

					} else{

						echo"Menu managed by another site.<br><br><br><br>";

					}

					echo "<div id='clear-both'></div></div></div>";

					//**********RESTAURANT MENU ADMIN SECTION ENDS

				}

			} 

			

			//if ecommerce package enabled, show product admin area

			if($ecommerce_pkg=='1'){

				if($_GET['area']=="ecommerce"){

				//**********ECOMMERCE PRODUCT ADMIN SECTION BEGINS

				echo "<div id='admin-left-column'>

				<div id='admin-left-column-top'>

				<ul><li>MANAGE YOUR PRODUCTS

				<div class='info-link'><a href='#' class='popup'><img src='images/info-icon.png'></a></div>

				 <div id='toPopup'> 

				<div class='close'></div>

				<span class='ecs_tooltip'>Esc to close <span class='arrow'></span></span>

				<div id='popup_content'> <!--your content start-->

				<h2>Recommended procedure for entering your product catalog:</h2>

				<ul>

				<li><strong>FIRST</strong><br />Create your product categories - All products must be placed in a category first or they will not display on your site. NOTE: make sure you check the Active checkbox to have your categories display on your site. Uncheck this box if you want the category hidden while you are entering your product category content (this also applies to your individual products).</li>

				<li><strong>SECOND</strong><br />Set up your item sizes - You can use the built-in sizes, or create your own custom sizes. This is a database setup to store all available size options for all products.

				Add all sizes that you will use for all your various products.  Doing so in advance will save you time later on when you apply sizes to your products.</li>

				<li><strong>THIRD</strong><br />Enter the available Options for each product. <font color='red'>(Only necessary for Online Ordering)</font> <strong>Options</strong> are choices such as size, color, etc...</li>

				<li><strong>FOURTH</strong><br />Start entering your products - You are now ready to start entering your 

				individual product item information. You can always go back and make changes at anytime.</li>

				</ul>

				<br />

				</div> <!--your content end-->

				</div> <!--toPopup end-->

				<div class='loader'></div>

				<div id='backgroundPopup'></div>

				</li></ul></div>

				<div id='admin-content-bg'>";

				if(empty($menudatabase))  { //only allow editing menu if not linked to another store's database

					echo"<ul>

					<li><a href='editprodcat.php'>Categories</a></li>

					<li><a href='editproducts.php'>Products</li></li>";

					echo "<li><a href='editsizes.php'>Sizes</a></li>

					<li><a href='index.php?admin-page=2&rev=prod' data-tooltip='Manage Product Reviews'>Reviews</a></li>

					";					

					/*if($ordering_subscribed==1){	//show upsell options only if online ordering is in use

						echo "<a href='editupsell.php'><li>Upsell Options</li></a>";

					} else {

						echo "<span style='color:#A0A0A0;'><li>Upsell Options</li></span>";

					}*/

					echo "</ul>";

				} else{

					echo"Product Catalog managed by another site.<br><br><br><br>";

				}

				echo "<div id='clear-both'></div></div></div>";

				//**********ECOMMERCE PRODUCT ADMIN SECTION ENDS

				}

			}



			//if auto package enabled, show inventory admin area

			if($auto_pkg=='1'){			

				//**********AUTO DEALER ADMIN SECTION BEGINS

				echo "<div id='admin-left-column'>

				<div id='admin-left-column-top'>

				<ul><li>MANAGE YOUR INVENTORY

				<div class='info-link'><a href='#' class='popup' data-popup-id='0'><img src='images/info-icon.png'></a></div>

				 <div class='toPopDiv' id='popup_0'> 

				<div class='close'></div>

				<span class='ecs_tooltip'>Esc to close <span class='arrow'></span></span>

				<div id='popup_content'> <!--your content start-->

				<h2>Recommended procedure for entering your menu content:</h2>
<div style='width:92%;'>
				<ul>

				<li><strong>FIRST</strong><br />Create your categories - All items must be placed in a category first or they will not display on your site. NOTE: make sure you check the Active checkbox to have your categories display on your site. Uncheck this box if you want the category hidden while you are entering your menu content (this also applies to your menu items).</li>

				<li><strong>SECOND</strong><br />Set up your item sizes - You can use the built-in sizes, or create your own custom sizes. 

				Add all sizes that you will use for all your various foods and beverages.  Doing so in advance will save you time later on when you apply sizes to your menu items.</li>

				<li><strong>THIRD</strong><br />Enter your Options and Fixings <font color='red'>(Only necessary for Online Ordering)</font> - <strong>Fixings</strong> are add-ons to your menu items, you can apply additional cost or no additional cost to these items. <strong>Options</strong> are choices such as wheat or white bread, etc... there is no additional pricing option for the Options category - so if you are adding cost to an extra for a menu item you should use the Fixings category.</li>

				<li><strong>FOURTH</strong><br />Start entering your menu items - You are now ready to start entering your 

				menu item information. You can always go back and make changes at anytime.</li>

				</ul>
</div>
				<br />

				</div> <!--your content end-->

				</div> <!--toPopup end-->

				<div class='loader'></div>

				<div id='backgroundPopup'></div>

				</li></ul></div>

				<div id='admin-content-bg'>";

				if(empty($menudatabase))  { //only allow editing menu if not linked to another store's database

					echo"<ul><li><a href='editmenucat.php'>Menu Categories</a></li>

					<li><a href='editmenuitem.php'>Menu Items</a></li></div>";

					echo "<div id='float-left-admin'><li><a href='editsizes.php'>Menu Sizes</a></li>";

					if($ordering_subscribed==1){	//show upsell options only if online ordering is in use

						echo "<li><a href='editupsell.php'>Upsell Options</a></li>";

					} else {

						echo "<li><span style='color:#A0A0A0;'>Upsell Options</span></li>";

					}

					echo "</ul>";

				} else{

					echo"Menu managed by another site.<br><br><br><br>";

				}

				echo "<div id='clear-both'></div></div></div>";

				//**********RESTAURANT MENU ADMIN SECTION ENDS

			} 

			

			//if no ecommerce option selected, show admin panel to signup for ecommerce

			/*if(($ecommerce_pkg!='1')&&($restaurant_pkg!='1')&&($auto_pkg!='1')){

				//**********ECOMMERCE PRODUCT ADMIN SECTION BEGINS

				echo "<div id='admin-left-column'>

				<div id='admin-left-column-top'>

				<ul><li>ECOMMERCE OPTIONS

				<div class='info-link'><a href='#' class='popup'><img src='images/info-icon.png'></a></div>

				 <div id='toPopup'> 

				<div class='close'></div>

				<span class='ecs_tooltip'>Esc to close <span class='arrow'></span></span>

				<div id='popup_content'> <!--your content start-->

				<h2>Recommended procedure for entering your product catalog:</h2>

				<ul>

				<li><strong>FIRST</strong><br />Create your product categories - All products must be placed in a category first or they will not display on your site. NOTE: make sure you check the Active checkbox to have your categories display on your site. Uncheck this box if you want the category hidden while you are entering your product category content (this also applies to your individual products).</li>

				<li><strong>SECOND</strong><br />Set up your item sizes - You can use the built-in sizes, or create your own custom sizes. This is a database setup to store all available size options for all products.

				Add all sizes that you will use for all your various products.  Doing so in advance will save you time later on when you apply sizes to your products.</li>

				<li><strong>THIRD</strong><br />Enter the available Options for each product. <font color='red'>(Only necessary for Online Ordering)</font> <strong>Options</strong> are choices such as size, color, etc...</li>

				<li><strong>FOURTH</strong><br />Start entering your products - You are now ready to start entering your 

				individual product item information. You can always go back and make changes at anytime.</li>

				</ul>

				<br />

				</div> <!--your content end-->

				</div> <!--toPopup end-->

				<div class='loader'></div>

				<div id='backgroundPopup'></div>

				</li></ul></div>

				<div id='admin-content-bg'>";

				

				echo"<div><li>To enable eCommerce options, please email us at <a href='mailto:support@pilotwebsolutions.com&subject=Please enable eCommerce on my website&body=My name: [Your name here]%0D%0AI can be reached at: [your phone number and/or email here]'>support@pilotwebsolutions.com</a>.</li>

				</div>";

				echo "";

				echo "";

				

				echo "<div id='clear-both'></div></div></div>";

				//**********ECOMMERCE PRODUCT ADMIN SECTION ENDS

			} */

if($_GET['area']=="preferences"){

		if(($menu_only=='0')||($_SESSION['masterAdmin']=='1')){

			echo '<div id="admin-left-column">

			<div id="admin-left-column-top">

			<ul><li>STORE PREFERENCES 

	<div class="info-link"><a href="#" class="popup" data-popup-id="3"><img src="images/info-icon.png"></a></div>

			    

    <div class="toPopDiv" id="popup_3"> 

    	

        <div class="close"></div>

       	<span class="ecs_tooltip">Esc to close <span class="arrow"></span></span>

		<div id="popup_content"> <!--your content start-->

            <h2>Enter your business and online ordering information:</h2>
<div style="width:92%;"">
			<ul>

			<li>Enter your contact information in this area - you can update and change it at any time.</li>

			<li>If you have Facebook, Twitter, Google social media accounts you can create links quickly and easily in this area</li>

			<li>Add new users or remove user access by clicking the Users link.</li>

			</ul>
</div>
			<br />

        </div> <!--your content end-->

    </div> <!--toPopup end-->

		<div class="loader"></div>

   		<div id="backgroundPopup"></div>

			

			

			</li></ul></div>

			<div id="admin-content-bg">';

			echo "<ul>

			<li><a href='editusers.php'>Users</a><li>";

			echo "<li><a href='editprefs.php' data-tooltip='Edit contact info, hours, general business information'>Store Info</a></li>";			

			

			//echo "<li><a href='editsocial.php' data-tooltip='Edit or add your social network links and icons to your site'>Social Networking</a></li>";

			//echo "<li><a href='editseo.php' data-tooltip='Edit your global search engine optimization settings'>SEO Settings</a></li>

			//</ul>";	

			

			echo"<div id='clear-both'></div></div></div>";

			

		}	

	}	

if($_GET['area']=="quicklinks"){		

			echo '<div id="admin-left-column">

			<div id="admin-left-column-top">
			<ul><li>QUICK LINKS

				<div class="info-link"><a href="#" class="popup" data-popup-id="8"><img src="images/gear-icon.png"></a></div>';

	

	echo '<div class="toPopDiv" id="popup_8">   	

        <div class="close"></div>

       	<span class="ecs_tooltip">Esc to close <span class="arrow"></span></span>

		<div id="popup_content"> <!--your content start-->

		<h2>Manage Quick Links:</h2><p align="center">Add commonly used links to your admin panel below.</p> ';

		//process any changes before displaying links

		if($_POST['add_link']){

			if((!empty($_POST['display_text']))&&(!empty($_POST['url']))){

				$url = mysql_real_escape_string($_POST['url']);

				$display_text = mysql_real_escape_string($_POST['display_text']);

				if($_POST['popup_width']){$popup_width = mysql_real_escape_string($_POST['popup_width']);} else {$popup_width=0;}

				if($_POST['popup_height']){$popup_height = mysql_real_escape_string($_POST['popup_height']);} else {$popup_height=0;}

				if(($popup_height>0)&&($popup_width>0)){

					$use_popup=1;

				} else {

					$use_popup=0;

				}

				$qry = "insert into admin_links (url, display_text, open_in_popup, popup_width, popup_height) values ('$url','$display_text','$use_popup','$popup_width','$popup_height')";

				//echo $qry;

				mysql_query($qry);

			}

		}

		if($_POST['update_link']){

			if((!empty($_POST['display_text']))&&(!empty($_POST['url']))){

				$url = mysql_real_escape_string($_POST['url']);

				$display_text = mysql_real_escape_string($_POST['display_text']);

				if($_POST['popup_width']){$popup_width = mysql_real_escape_string($_POST['popup_width']);} else {$popup_width=0;}

				if($_POST['popup_height']){$popup_height = mysql_real_escape_string($_POST['popup_height']);} else {$popup_height=0;}

				if(($popup_height>0)&&($popup_width>0)){

					$use_popup=1;

				} else {

					$use_popup=0;

				}

				$qry = "update admin_links set url='$url',display_text='$display_text', open_in_popup='$use_popup', popup_width='$popup_width', popup_height='$popup_height' where recordkey='$_POST[recordkey]'";

				//echo $qry;

				mysql_query($qry);

			}

		}

		if($_POST['remove_link']){

			$qry="delete from admin_links where recordkey='$_POST[recordkey]'";

			mysql_query($qry);

		}

		

		

		//manage quicklinks in popup

			$query2="select recordkey, url, display_text, icon_image_path, open_in_popup, popup_width, popup_height from admin_links";

			$rt2=mysql_query($query2); 

			

			echo'<table><tr><td><td>Display as<td>Link URL<td>Popup size<br><font size="1"><i>(if using popup)</i></font><td><td>';

			//line for adding new link

			echo "<tr><td><form action='' method='POST'><td><input type='text' name='display_text' value='$nt2[display_text]'></input><td><input type='text' name='url' value='' size='40'> <td>W:<input type='text' name='popup_width' value='$nt2[popup_width]' size='2'> H:<input type='text' name='popup_height' value='$nt2[popup_height]' size='2'><td><input id='save-button' type='submit' name='add_link' value='Add this Link'> </form>";	

			echo'<tr><td height="15">';

			//show existing links

			while($nt2=mysql_fetch_array($rt2)){

				echo "<tr><td><form action='' method='POST'><td><input type='hidden' name='recordkey' value='$nt2[recordkey]'><input type='text' name='display_text' value='$nt2[display_text]'></input><td><input type='text' name='url' value='$nt2[url]' size='40'> <td>W:<input type='text' name='popup_width' value='$nt2[popup_width]' size='2'> H:<input type='text' name='popup_height' value='$nt2[popup_height]' size='2'><td><input id='save-button' type='submit' name='update_link' value='Save'> <input id='save-button' type='submit' name='remove_link' value='Remove'></form>";			

			}

			

		echo'</table>';

	echo '<br />		

        </div> <!--your content end-->

		</div> <!--toPopup end-->';

	

	

		echo'<div class="loader"></div>

   		<div id="backgroundPopup"></div>



</li></ul></div>';



		echo '<div id="admin-content-bg">';

			//echo "<div id='float-left-admin-icons'><!--<a href=p'><img src='images/facebook-icon.png'></a>-->";

			//echo "<a href=''><img src='images/twitter-icon.png'></a>";

			//echo "<a href=''><img src='images/google-plus-icon.png'></a>";

			//echo "</div>";

			$query="select recordkey, url, display_text, icon_image_path, open_in_popup, popup_width, popup_height from admin_links";

			$rt=mysql_query($query); 

			while($nt=mysql_fetch_array($rt)){

				// $nt['open_in_popup'] = 0;

				if ($nt['open_in_popup'] == 1) {

					echo '<div class="info-link"><a href="#" class="popup export_link" data-popup-id="'.(intval($nt['recordkey'])+100).'" onclick="loadPopupIframe(this, \''.$nt[url].'\')">'.$nt['display_text'].'</a></div>';

					$popupWidth = intval($nt['popup_width']);

					$popupHeight = intval($nt['popup_height']);

					$popupMarginLeft = $popupWidth / 2;

					//adjust top edge higher for larger popups

					if($popupHeight>500){

						$popupMarginTop = -150;

					} else {

						$popupMarginTop = -10;

					}

					$iframeHeight = $popupHeight-40;

					

					echo '<div class="toPopDiv" id="popup_'.(intval($nt['recordkey'])+100).'" style="width:'.$popupWidth.'px;height:'.$popupHeight.'px;margin-left:-'.$popupMarginLeft.'px;margin-top:'.$popupMarginTop.'px;"> 

					        <div class="close"></div>

					       	<span class="ecs_tooltip">Esc to close <span class="arrow"></span></span>

							<div id="popup_content" style="height:'.$iframeHeight.'px;"> <!--your content start-->

							<h2>'.$nt[display_text].'</h2>

							<iframe class="popup-iframe" src=""></iframe>



							<div class="close-popup">Close</div>

					        </div> <!--your content end-->

					    </div> <!--toPopup end-->';

				} else {

					echo "<a href='$nt[url]' target='blank'><li>".$nt[display_text]."</li></a>";

				}

			

			}

			echo "<div id='clear-both'></div></div></div>";

} //end of QUICKLINKS			

			

################## right column starts here #########################			

	if($_GET['area']=="content"){

		echo'<div id="admin-left-column">

			<div id="admin-left-column-top">';

			echo '<ul><li>MANAGE YOUR PAGE CONTENT

				<div class="info-link"><a href="#" class="popup" data-popup-id="2"><img src="images/info-icon.png"></a></div>

			    

    <div class="toPopDiv" id="popup_2"> 

    	

        <div class="close"></div>

       	<span class="ecs_tooltip">Esc to close <span class="arrow"></span></span>

		<div id="popup_content"> <!--your content start-->

           <h2>Adding content to your pages or creating new pages:</h2>
<div style="width:92%;">
			<ul>

			<li><strong>Create or Modify Web Pages</strong> - You can easily modify your website pages by going to the <i>Page Content</i> section. Each page has its own editor for modifying or entering new content.</li>

			<li><strong>Navigation</strong> - Change your website navigation by dragging and dropping pages in the order in which you want them to appear.</li>
			<li><strong>Footer Links</strong> - Add or remove navigation links to your website footer in this section.</li>
			<li><strong>Galleries</strong> - Create image galleries. You can create as many galleries as you like then assign them to any page on your website.</li>
			<li><strong>Custom Forms</strong> - Easily add an online form or multiple forms to your website. First you create the form in the <i>Custom Forms</i> area and then you assign them to a web page.</li>
			<li><strong>Widgets</strong> - Widgets are sections you can add to your website that are separate from your main page content area. Typically used in a sidebar or above or below your main content area.</li>
			<li><strong>PDF Library</strong> - Upload PDF documents and make them available to visitors on your site.</li>

			</ul>
</div>
			<br />

        </div> <!--your content end-->

    </div> <!--toPopup end-->

		<div class="loader"></div>

   		<div id="backgroundPopup"></div>

</li></ul></div>

			<div id="admin-content-bg">';

			//first column

			echo "<ul><li><a href='editpages.php'>Page Content</a></li>";

			echo "<li><a href='editnavmenu.php'>Standard Navigation</a></li>";

			if($_SESSION[enable_mobile]==1){

				echo "<li><a href='editmnavmenu.php'>Mobile Navigation</a></li>";

			    echo "<a href='editmobileslider.php'><li>Mobile Slider Menu</li></a>";

			}

			echo "<li><a href='editfooterlinks.php'>Footer Links</a></li>";

			echo "<li><a href='editcoupons.php'>Coupons</a</li>";

			echo "<li><a href='editspecials.php'>Widget Specials</a></li>";

			echo "<li><a href='editdocs.php'>PDF Library</a></li>";

			echo "<li><a href='editgalleries.php'>Galleries</a></li>";

			echo "<li><a href='editwidgets.php'>Widgets</a></li>";

			echo "<li><a href='editforms.php'>Custom Forms</a></li>";

			echo "<li><a href='index.php?admin-page=3'>Blog Admin</a></li></ul>";

			echo "<div id='clear-both'></div>

			</div></div>";

	}		

			

	if($_GET['area']=="marketing"){

        echo '<div id="admin-left-column"><div id="admin-left-column-top">

			<ul><li>CUSTOMERS/MARKETING

			

				<!--<div class="info-link"><a href="#" class="popup" data-popup-id="4"><img src="images/info-icon.png"></a></div>-->

			    

    <div class="toPopDiv" id="popup_4"> 

    	

        <div class="close"></div>

       	<span class="ecs_tooltip">Esc to close <span class="arrow"></span></span>

		<div id="popup_content"> <!--your content start-->

		<h2>Customers & Marketing:</h2>

		<ul>

		<li>This is where you can access your customers information, manage email & SMS campaigns and view reports.</li>

		</ul>

		<br />

		

        </div> <!--your content end-->

    </div> <!--toPopup end-->

		<div class="loader"></div>

   		<div id="backgroundPopup"></div>



</li></ul></div>



		<div id="admin-content-bg">';

			echo "<ul>

			<li><a href='customers.php'>Customer List</a></li>";

			echo "<li><a href='index.php?admin-page=9'>Email Campaigns</a></li>";

			if($sms_enabled=='1'){

				echo "<li><a href='index.php?admin-page=1'>SMS/Text Campaigns</a></li>";

			} else {

				echo "<li><a class='inactive' href='#'>SMS/Text Campaigns</a></li>";

			}



			//echo "<a href='reporting.php'><font color='blue'><li>Reporting</li></font></a>";

			echo "<li><a href='index.php?admin-page=2'>Reviews</a></li>";

			echo "<li><a href='index.php?admin-page=4'>XML sitemap</a></li>";

			echo "<li><a href='index.php?admin-page=17'>Robots.txt</a></li>";

			echo "<li><a href='index.php?admin-page=11'>Embeddable links</a></li>";

			echo "<li><a href='index.php?admin-page=12'>SEO Evaluation</a></li>";

			echo "<li><a href='index.php?admin-page=13'>Customer Accounts</a></li>";

			echo "<li><a href='index.php?admin-page=16'>User Folders</a></li>";

			echo "<li><a href='index.php?admin-page=15'>Marketing Materials</a></li>";

			echo "<li><a href='?admin-page=14'>Reporting</a></li>";

			

			if($_SESSION[menu_boards] > 0){

				echo "<li><a href='index.php?admin-page=5'>Menu Boards</a></li>";

			}

			echo "<li><a href='editseo.php' data-tooltip='Edit your global search engine optimization settings'>SEO Defaults</a></li>";

			

			

			echo"</ul>

			<div id='clear-both'></div></div></div>";

			

			}	





			

			

if($restaurant_pkg=='1'){			

	if($_GET['area']=="ordering"){

			echo '<div id="admin-left-column">

			<div id="admin-left-column-top">

			<ul><li>ONLINE ORDERING			

				<div class="info-link"><a href="#" class="popup" data-popup-id="5"><img src="images/info-icon.png"></a></div>			    

		    <div class="toPopDiv" id="popup_5"> 		    	

		        <div class="close"></div>

		       	<span class="ecs_tooltip">Esc to close <span class="arrow"></span></span>

				<div id="popup_content"> <!--your content start-->

				<h2>Customer information:</h2>

				<ul>

				<li>Information about online ordering</li>

				</ul>

				<br />			

		        </div> <!--your content end-->

		    </div> <!--toPopup end-->

				<div class="loader"></div>

		   		<div id="backgroundPopup"></div>		

			</li></ul></div>

			<div id="admin-content-bg"><ul>';

			if($ordering_subscribed==1){	//show upsell options only if online ordering is in use

				echo "<li><a href='archiveorders.php' target='blank'>Archived Orders</a></li>";

				echo "<li><a href='editpayprefs.php'>Payment Settings</a></li>";

				echo "<li><a href='edittextnotice.php'>Text Notifications</a></li>";

				echo "<li><a href='liveorders.php' target='blank'>Live Order System</a></li>";

				echo "<a href='index.php?admin-page=7'><li>Delivery Zones</li></a>";

				//echo "<div id='float-left-admin'><!--<a href='editziplist.php'><li>Delivery Zip Codes</li></a>-->";	

				

				

				//echo "<a href='ordertrack.php' target='blank'><font color='blue'><li>Order Tracking</li></font></a>";

						

			

			} else {

				echo "<li><span style='color:#A0A0A0;'>Archived Orders</span></li>";

				echo "<li><span style='color:#A0A0A0;'>Payment Settings</span></li>";

				echo "<li><span style='color:#A0A0A0;'>Text Notifications</span></li>";

			}

			echo"</ul><div id='clear-both'></div></div></div>";

	}



	echo "</div>"; //end of right-admin-wrapper

}			

			

			echo "</div></table></div>";

			

echo $bottom_links;

			

?>









	

	





