<?php


$stat_active = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 2");
$tpl->assign('stat_active', $stat_active);

$stat_featured = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 2 AND `FEATURED` = 1 ");
$tpl->assign('stat_featured', $stat_featured);

$stat_pending = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 1");
$tpl->assign('stat_pending', $stat_pending);

$stat_todays = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `DATE_ADDED` >= CURRENT_DATE");
$tpl->assign('stat_todays', $stat_todays);

$stat_cats = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` ");
$tpl->assign('stat_cats', $stat_cats);

?>