<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			*/
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2010 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts VistaCart                     |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $title_for_layout?></title>
<?php
if(isset($style)){
	echo $html->css($style); 
}else{
	echo $html->css("style"); 
}
?> 
<link rel="icon" href="<?php echo $this->webroot . 'favicon.ico'; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->webroot . 'favicon.ico'; ?>" type="image/x-icon" />
<?php echo $scripts_for_layout ?> 
<?php if (isset($meta_description) && !empty($meta_description)) { ?>
    <meta name="description" content="<?php echo $meta_description; ?>" />
<?php } ?>
<?php if (isset($meta_keywords) && !empty($meta_keywords)) { ?>
    <meta name="keywords" content="<?php echo $meta_keywords; ?>" />
<?php } ?>
<?php
	echo $javascript->link('multilevelmenu.js');		
?>
</head>
<body>
<center>

	<div align="left" id="layout">
	
	
	<div class="center_main_content">
	
	  <div align="left" id="header">
		<!--header area start -->
				
				<div align="left" id="logo"><span class="logo"><a href="<?php echo $html->url(array('controller' => 'Admins', 'action' => 'index'));?>"><?php echo $html->image('/img/SiteLogo_disp.gif', array('width' => 48, 'height' => 46, 'border' => 0));?><?php echo $cnfg["site_name"]; ?></a></span></div>
				<div align="right">
				  
				  <div align="right">
                    <!--login area start -->
                    <div align="left"><br />
                      <br />
					
                    </div>
                    <!--login area end -->
</div></div>
				<div align="right"  class="maintext_inner quickstart">		
		<?php
		$url=Router::url('/',true).'app/webroot/Quickstart.html';
		?>
	    <a title="Quick Start Guide" href="#" onClick="window.open('<?php echo $url;?>','QuickStartGuide','top=100,left=100,width=820,height=550,scrollbars=yes,toolbar=no,status=yrd');"><strong>Quick Start Guide</strong></a>	
		
		</div>
		<!--header area end -->
		<div class="clear"></div>
	  </div>
	  
	    
	  <div align="right" id="links_container">
	   <!--links area start -->
	   
		<!--links area end -->
      </div>

	  <div id="mainbody">
		  
		
		<div align="left" id="banner_container1">
		<!--banner area start -->
				
				<div align="left" id="banner1"></div>
				
  		        <div align="left">
  		          <!--banner area end -->
                </div>
		</div>
		<div align="left" class="main_body">
		<!--mainbody area start -->
		
				<div align="left" id="body_left_area">
				<!--body left area start -->
								
				<div align="left" id="categories">
				<!--categories area start -->
				
						<div align="center" class="subheading">
						  <div align="left"></div>
						</div>
						<div align="left" id="" class="sidebarmenu">
						<ul id="sidebarmenu1">
						 <?php if($session->check('Admin') <> false)
								{  
									$admsess	=	$session->read('Admin');
                                                                     
									}
									?>
						
										<li><?php echo $html->link('Home', array('controller' => 'Admins', 'action' => 'index'));?></li>
                                                                                <?php if($admsess["orders"] == 1){			?>
										<li><?php echo $html->link('Orders', array('controller' => 'Orders', 'action' => 'index'));?></li>
										
                                                                                <li><?php echo $html->link('Place an Order', array('controller' => 'Orders', 'action' => 'placeorder'));?></li>
                                                                                <?php } ?>
                                                                                 <?php if($cnfg["allow_rma"] == "Y" && $admsess["refund"] == 1){?>
									  	<li><?php echo $html->link('Refund Requests', array('controller' => 'refunds', 'action' => 'index'));?></li>
									 	 <?php } ?>
                                                                                <?php if($admsess["category"] == 1){ ?>
									  	<li><?php echo $html->link('Category', array('controller' => 'Categories', 'action' => 'index'));?></li>
										<?php } ?>
										<?php if($admsess["products"] == 1){ ?>
										<li><?php echo $html->link('Products', array('controller' => 'Products', 'action' => 'index'));?></li>
										<?php } ?>
                                                                                 <?php  if($admsess["custom"] == 1){ ?>
								  		<li><?php echo $html->link('Custom Fields', array('controller' => 'Customfields', 'action' => 'index'));?></li>
  										<li><?php echo $html->link('Custom Values', array('controller' => 'Customfieldvalues', 'action' => 'index'));?></li>
										<?php } ?>
                                                                                <?php if($admsess["products"] == 1){ ?>
                                                                                <li><a href="#">Import</a>
										   <ul>
										        <li><?php echo $html->link('Import Products', array('controller' => 'Products', 'action' => 'bulkupload'));?></li>
											<li><?php echo $html->link('Import Product Images', array('controller' => 'Products', 'action' => 'bulkuploadimage'));?></li>
                                                                                        <li><?php echo $html->link('Import Digital Product', array('controller' => 'Products', 'action' => 'bulkuploaddigitalproduct'));?></li>
                                                                                        <li><?php echo $html->link('Import Digital Product Files', array('controller' => 'Products', 'action' => 'bulkuploaddigitalproductfiles'));?></li>
											  </ul>
									  	</li>
										<?php } ?>
                                                                               
                                                                               
                                                                                <?php if($cnfg["allow_giftcard"] == "Y" && $admsess["giftcards"] == 1){?>
										<li><a href="#">Gift Cards</a>
										   <ul>
										   		<li><?php echo $html->link('Gift Cards', array('controller' => 'giftcards', 'action' => 'index'));?></li>
												 <?php if($admsess["giftcardusers"] == 1) {?>
												<li><?php echo $html->link('Gift Card users', array('controller' => 'giftcardusers', 'action' => 'index'));?></li>
												 <?php } ?>
												  </ul>
											</li>
									  <?php } ?>

									  <?php if($cnfg["allow_giftcoupon"] == "Y" && $admsess["promocodes"] == 1){?>
									 <li><?php echo $html->link('Promo Codes', array('controller' => 'coupons', 'action' => 'index'));?></li>
									 <?php } ?>
                                                                                
									  <?php if($admsess["users"] == 1){			?>
									 	<li><?php echo $html->link('Users', array('controller' => 'Users', 'action' => 'index'));?></li>
										<?php } ?>
                                                                                <?php if($admsess["adminusers"] == 1){			?>
									 	<li><?php echo $html->link('Admin Users', array('controller' => 'Admins', 'action' => 'lists'));?></li>
										<?php } ?>
                                                                                <?php if($admsess["reports"] == 1){			?>
										<li><a href="#">Reports</a>
										   <ul>
												<li><?php echo $html->link('Product Report', array('controller' => 'order_details', 'action' => 'index'));?></li>
											    <li><?php echo $html->link('Sales Report', array('controller' => 'orders', 'action' => 'reports'));?></li>
											    <li><?php echo $html->link('User Report', array('controller' => 'users', 'action' => 'reports'));?></li>
												<li><?php echo $html->link('User Activity Report', array('controller' => 'orders', 'action' => 'useractivity'));?></li>
												<li><?php echo $html->link('Promo Code Report', array('controller' => 'orders', 'action' => 'pcreports'));?></li>
										  </ul>
									  	</li>
										<?php } ?>
                                                                                <?php if($admsess["feedback"] == 1){?>
										<li><a href="#">Feedback</a>
										   <ul>
										      <li><?php echo $html->link('Products Feedback', array('controller' => 'feedbacks', 'action' => 'index'));?></li>
									           <li><?php echo $html->link(' Customer Feedback', array('controller' => 'contacts', 'action' => 'index'));?></li>
											  </ul>
									    </li>
									  <?php } ?>


									  <?php if($admsess["newsletter"] == 1){?>
										<li><a href="#">Newsletters</a>
										   <ul>
										       <li><?php echo $html->link('Newsletters', array('controller' => 'newsletters', 'action' => 'index'));?></li>
												<?php if($admsess["newsletterusers"] == 1){			?>
												<li><?php echo $html->link('Newsletter Subscribers', array('controller' => 'Newsletterusers', 'action' => 'index'));?></li>
												<?php } ?>
												  </ul>
											</li>
									  <?php } ?>
									  






									<?php if($admsess["settings"] == 1){			?>			
										<li><a href="#">Settings</a>
										   <ul>
										       <li><?php echo $html->link('General Settings', array('controller' => 'Settings', 'action' => 'indexm'));?></li>
											   <li><?php echo $html->link('Shipping Settings', array('controller' => 'Settings', 'action' => 'ship_setting'));?></li>
											   <li><?php echo $html->link('Payment Settings', array('controller' => 'Settings', 'action' => 'pay_setting'));?></li>		
											   <li><?php echo $html->link('Tax Settings', array('controller' => 'States', 'action' => 'index'));?></li>											  
											  </ul>								  
									  	</li>
								  <?php } ?>
								  <?php if($admsess["homepage"] == 1){			?>										
									    <li><?php echo $html->link('Manage Home Page', array('controller' => 'Homelayout', 'action' => 'index'));?></li>
									    <?php } ?>
									  	<?php if($admsess["help"] == 1){			?>			
										<li><?php echo $html->link('Manage Help', array('controller' => 'Helps', 'action' => 'index'));?></li>
									    <?php } ?>
										<?php if($admsess["websitecontent"] == 1){			?>		
										<li><?php echo $html->link('Website Content', array('controller' => 'Cmspages', 'action' => 'index'));?></li>
									 	<li><?php echo $html->link('Email Templates', array('controller' => 'Cmspages', 'action' => 'indexmail'));?></li>
									  	<?php } ?>
								 
																			
										
										 
										
                                                                         
                                                                                <!---------Admin Blog menu------>
                                                                               <?php if($cnfg["admin_blog_settings"] == "Y" ){?>
									 <li>
                                                                             <a href="<?php echo FULL_BASE_URL .$cnfg["sitebasefolder"]."/app/webroot/blog/wp-login.php?vista_login=1&uname=".$admsess["admin_name"].'&pass='.strtr(base64_encode($admsess["admin_pword"]), '+/=', '-_,');?>">Blog</a>
                                                                         </li>
									 <?php } ?>

										
										
											
										
									   
									  	
									  	
										<li><?php echo $html->link('Change Password', array('controller' => 'Admins', 'action' => 'chngpword'));?></li>	
										<li><a href="<?php echo FULL_BASE_URL .$cnfg["sitebasefolder"]."/Helps/adminhelp";?>" target="_blank">Get Help</a>		</li>
										<li><?php echo $html->link('Logout', array('controller' => 'Admins', 'action' => 'logout'));?></li>
								
									
								</ul>
						</div>
				<!--categories area end -->
				</div>
				
				<!--body left area end -->
		  </div>
				<div class="bodyright" >
				<?php echo $content_for_layout ?> 
				</div>
		</div>
		<div align="left" class="float_clear">
		<?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?>
		</div>
		
		
		
	  </div>
	   <div align="left" class="copyright_area">
		<!--copyright area start -->
		
				<div align="left" id="copyright_lft">
				
				</div>
				<div align="right" id="copyright_rgt">Powered by&nbsp;<a href="http://www.iScripts.com/vistacart" target="_blank">iScripts Vistacart</a>. A premium product from <a href="http://www.iScripts.com" target="_blank">iScripts.com</a> </div>
		
		        <!--copyright area start -->
				<div class="clear"></div>
		</div>
	  
	</div>
	  </div>
	  
	  </div>
</center>
</body>
</html>