<div class="navh3">Links</div>
<?php
$select_links = yasDB_select("SELECT * FROM links WHERE approved='yes' ORDER BY `in` DESC LIMIT $setting[numblinks]");
while($links = $select_links->fetch_array(MYSQLI_ASSOC)){
	echo '<a href="' . $links['url'] . '" target="_blank" title="In: ' . $links['in'] . ' Out: ' . $links['out']. '" onClick="addHit(\''.$links['id'].'\');return true;">' . $links['text'] . '</a><br>';
}
if ($setting['seo'] == 'yes') {
	echo '<br/><a href="'. $setting['siteurl'] .'links.html">More links</a>';
	echo '<br/><br/><a href="'. $setting['siteurl'] .'addlink.html">Add your link</a>';
} 
else {
	echo '<br/><a href="'. $setting['siteurl'] .'index.php?act=links">More links</a>';
	echo '<br/><br/><a href="'. $setting['siteurl'] .'index.php?act=addlink">Add your link</a>';
}
?>