<body>
	<div id="body_wrapper">
	  <div id="top">
		  <?php if (!isset($_SESSION['user'])) { ?>
			  <div style="float:right; width:115px; margin-top:20px;">
			  <a href="<?php echo $setting['siteurl'];?>login.php?site=facebook"><img src="<?php echo $setting['siteurl'].'templates/'.$setting['theme'].'/skins/'.$setting['skin'].'/images/fb_login.png';?>" width="115px" height="46px"></a>
			  <a href="<?php echo $setting['siteurl'];?>login.php?site=twitter"><img src="<?php echo $setting['siteurl'].'templates/'.$setting['theme'].'/skins/'.$setting['skin'].'/images/tw_login.png';?>" width="115px" height="46px"></a>
			  </div>
		  <?php } ?> 	
	  </div>
	  <div id="menu">
		<div>
			<?php
			$query = yasDB_select("SELECT * FROM categories WHERE active='yes' AND parent='yes' ORDER BY `order` desc");
			while ($row = $query->fetch_array(MYSQLI_ASSOC)) {
				if ($setting['seo']=='yes') {
					echo '<a href="' . $setting['siteurl'] . 'category/' . $row['id'] .'/1.html">' . $row['name'] . '</a>&nbsp;|&nbsp;';					  
				} else {
					echo '<a href="' . $setting['siteurl'] . 'index.php?act=cat&id=' . $row['id'] .'">' . $row['name'] . '</a>&nbsp;|&nbsp;';
				}
			}
			?>
		</div>
	</div>
	<div id="bar">
		<div>
			<?php
			if ($setting['seo']=='yes') {
				echo '<a href="'. $setting['siteurl'] .'">Home</a> |&nbsp; <a href="'. $setting['siteurl'] .'contactus.html">Contact-Us</a> |&nbsp; <a href="'. $setting['siteurl'] .'links.html">links</a> |&nbsp; <a href="'. $setting['siteurl'] .'addlink.html">Link Exchange</a> |&nbsp; <a href="'. $setting['siteurl'] .'news.html">News</a> |&nbsp; <a href="'. $setting['siteurl'] .'members.html">Members</a> |&nbsp; <a href="'. $setting['siteurl'] .'terms.html">Terms/F.A.Q./Legal</a>';
			} else {
				echo '<a href="'. $setting['siteurl'] .'">Home</a> |&nbsp; <a href="'. $setting['siteurl'] .'index.php?act=contactus">Contact-Us</a> |&nbsp; <a href="'. $setting['siteurl'] .'index.php?act=links">Links</a> |&nbsp; <a href="'. $setting['siteurl'] .'index.php?act=addlink">Link Exchange</a> |&nbsp; <a href="'. $setting['siteurl'] .'index.php?act=news">News</a> |&nbsp; <a href="'. $setting['siteurl'] .'index.php?act=members">Members</a> |&nbsp; <a href="'. $setting['siteurl'] .'index.php?act=terms">Terms/F.A.Q./Legal</a>';
			} 
			?>
		</div>
	</div>
	<div id="content_wrapper">