<?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>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title><?php echo $title_for_layout?></title>
<link rel="stylesheet" type="text/css" href="<?php echo $cnfg["sitebasefolder"];?>/css_responsive/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo $cnfg["sitebasefolder"];?>/css_responsive/animate.css">
<link rel="stylesheet" type="text/css" href="<?php echo $cnfg["sitebasefolder"];?>/css_responsive/responsive.css">
<link rel="stylesheet" type="text/css" href="<?php echo $cnfg["sitebasefolder"];?>/css_responsive/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo $cnfg["sitebasefolder"];?>/css_responsive/price-range.css">
<?php
if(isset($style)){
	echo $html->css($style); 
}else{
	echo $html->css("sony"); 
}
?> 
<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 } ?>
<script language="javascript" type="text/javascript">
function sub(){
	document.src.submit();
}
</script>

<?php
	echo $javascript->link('multilevelmenu.js');		
?>
<script type="text/javascript">
$(function(){
	$("#login_link").click(function(){
		$("#login-panel").slideToggle("slow");
		return false;
	});



	});

function validateLoginForm(){

	var frm = document.usrlogin;
	if(frm.username.value == ""){
		$("#login-panel").slideDown("slow");
		alert("Please enter your user name.");
		frm.username.focus();
		return false;
	}else if(frm.password.value == ""){
		$("#login-panel").slideDown("slow");
		alert("Please enter your password.");
		frm.password.focus();
		return false;
	}else {
		return true;
	}
        return false;
}

function clearText(thefield){
        if (thefield.defaultValue==thefield.value)
            thefield.value = ""

    }
    </script>
</head>
<body>
<center>

	<div id="layout">
	
	  <header id="header">
		<!--header area start -->
			<div class="header-middle"><!--header-middle-->
            <div class="container">
                <div class="row">
                <div class="col-sm-4">
					<div class="logo pull-left">
	                    <a href="<?php echo $html->url('/index.php');?>"><?php echo $html->image('/img/SiteLogo_disp.gif', array('width' => 48, 'height' => 46, 'border' => 0));?><?php echo $cnfg["site_name"]; ?></a>
	                </div>
				</div>
				<div align="right">
				  
				 <div class="col-sm-8">
                    <!--login area start -->
                    <div align="left"><br />
                      <br />
					   <?php if($session->check('Userlog') <> false && isset($sus["uname"]))
				{ ?>
				 <div id="username">You are logged in as <?php echo $sus["uname"]; ?> 
					  </div>
                    <?php } ?>
                    </div>
                    <!--login area end -->
</div></div><!--header area end -->
	<div class="clear"></div>
	</div>
	</div>
	</div>
</header>
<!--<div align="right" id="links_container"> 
      </div>-->
	  <div id="mainbody">
		  
		<section>
		<div class="container">
			<div class="row">
		<div align="left" id="banner_container1">
		<!--banner area start -->
				
				<div align="left" id="banner1"></div>
				
				<div align="left" >
  		          <!--banner area end -->
                </div>
		</div>
		<div class="main_body">
		<!--mainbody area start -->
		
				<div class="col-sm-3" id="body_left_area">
				<!--body left area start -->
								
				<div align="left" id="categories">
				
				<!--categories area start -->
				
						<div align="center">
							<h2 class="title text-center mainhd">Help Menu</h2>
						</div>
						<div align="left" id="" class="sidebarmenu">											
						<ul  id="sidebarmenu1">
						<?php
                                               
						foreach($help_cat as $key => $val) 
						{?>
						<li><a href="<?php echo $html->url('/Helps/userhelp/'.$key);?>"><?php echo $val;?></a></li>
						<?php } ?>
                                                <?php if($cnfg['admin_blog_settings']=='Y') { ?>
                                                    <li>
                                                <a href="<?php echo FULL_BASE_URL .$cnfg["sitebasefolder"]."/app/webroot/blog"?>" target="_blank">Blog</a></li>
                                <?php
                                } ?>
						</ul>
					</div>
				<!--categories area end -->
				</div>
				
				<!--body left area end -->
		  </div>
	 	  <div class="col-sm-9" class="bodyright" >
				<?php echo $content_for_layout ?> 
				</div>
		
		<div align="left" class="float_clear"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>		
	  </div>
	  </div>
	  </div>
	   <footer id="footer"><!--Footer-->
        <div class="footer-widget">
            <div class="container">
                <div class="row">
                    <?php
                //Setting the footer links              
                $flinks=array();
                foreach($footerlinks as $val)
                {
                  if(trim($val) <> '')
                  {
                      $lnk='';$lnk_txt='';
                      if(trim(strtolower($val)) == 'aboutus')  { $lnk_txt='About Us'; $lnk=$html->url('/cmspages/aboutus'); }
                      else  if(trim(strtolower($val)) == 'faq') { $lnk_txt='FAQ'; $lnk=$html->url('/cmspages/faq'); }
                      else  if(trim(strtolower($val)) == 'terms') { $lnk_txt='Terms & Conditions'; $lnk=$html->url('/cmspages/terms'); }    
                      else  if(trim(strtolower($val)) == 'testimonials') { $lnk_txt='Testimonials'; $lnk=$html->url('/cmspages/testimonials'); }    
                      else  if(trim(strtolower($val)) == 'community') { $lnk_txt='Community'; $lnk=$html->url('/cmspages/community'); }         
                      $flinks[]='<a href="'.$lnk.'">'.$lnk_txt.'</a>';
                  }   
                }
                $cnts_lnk=$html->url('/contacts/add');
                $flinks[]='<a href="'.$cnts_lnk.'">Contact Us</a>';
                //Setting the footer links
                 ?>
                    <div class="col-sm-4">
                        <div class="single-widget">
                            <h2>Quick Links</h2>
                            <ul class="nav nav-pills nav-stacked">
                                <li><a href="#"><?php echo implode($flinks);?></a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <div class="single-widget">
                            <h2>Follow Us</h2>
                            <ul class="nav nav-pills nav-stacked">
                                <li>
                                    <?php
                                     //Social media settings
                                    if(isset ($cnfg) ){
                                        ?>
                                    <div>
                                    <?php

                                        if(isset($cnfg['enable_facebook'])){
                                            if($cnfg['enable_facebook'] == 'Y'){?>
                                                <a href="<?php echo $html->url($cnfg['facebook_url']);?>"><?php echo $html->image('/img/Facebook.png', array('border' => 0));?></a>
                                        <?php    }
                                        }
                                        if(isset($cnfg['enable_twitter'])){
                                            if($cnfg['enable_twitter'] == 'Y'){?>
                                                <a href="<?php echo $html->url($cnfg['twitter_url']);?>"><?php echo $html->image('/img/Twitter.png', array('border' => 0));?></a>
                                        <?php    }
                                        }
                                  ?>
                                </div>
                                    <?php
                                      }
                                       //Social media settings ends
                                      ?>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <div class="single-widget">
                            <h2>Subscribe Newsletter</h2>
                             <form action="<?php echo $html->url('/users/subsnewsletter'); ?>" method="post" class="searchform">
                                <input id="txtEmail" name="txtEmail" type="text" placeholder="Enter Email Address" />
                                <input name="submit" id="submit" type="submit" class="subscribe_btn btn btn-default" value="Subscribe" />
                                 <?php if($session->read('NewsLetter') == 'yes'){ $session->del('NewsLetter'); if($session->check('Message.flash')) { ?>
                                                <p><font color="<?php if($session->read('NewsStatus') == 'fail'){  echo "#801A00 "; }else { echo "66FF33";} ?>" ><?php $session->flash(); ?></font></p><?php } } ?>
                                                <div class="clear"></div>
                            </form>
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
        
        <div class="footer-bottom">
            <div class="container">
                <div class="row">
                    <p class="">
                        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>
                    </p>
                </div>
            </div>
        </div>
        
    </footer><!--/Footer-->
		</section>
	  </div>
	</div>	
</center>
</body>
</html>