Place in main.tpl below {/strip}
Code:
<table width=894" height="300" align="center" cellspacing="0" cellpadding="0" border="0">
<td width="50%" rowspan="0" border="0" valign="top">
{if count($top_ten) gt 0}
<h3>{l}Top Ten Links{/l}</h3>
{foreach from=$top_ten item=link name=links}
{include file="link.tpl" link=$link}
{/foreach}
{/if}</td>
<td width="50%" rowspan="0" border="0" valign="top">
{if count($last_ten) gt 0}
<h3>{l}Latest Ten Links{/l}</h3>
{foreach from=$last_ten item=link name=links}
{include file="link.tpl" link=$link}
{/foreach}
{/if}
</td>
</table>
Place in index.php above echo $tpl->fetch('main.tpl', $id);
Code:
$top_ten = $db->GetAll("SELECT * FROM `{$tables['link']['name']}` WHERE `STATUS` = '2' ORDER BY `HITS` DESC LIMIT 0, 10");
$last_ten = $db->GetAll("SELECT * FROM `{$tables['link']['name']}` WHERE `STATUS` = '2' ORDER BY `ID` DESC LIMIT 0, 10");
$tpl->assign('top_ten' , $top_ten );
$tpl->assign('last_ten', $last_ten);