<?PHP
//Statistik
$total_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 2");
$tpl->assign('total_links', $total_links);
 
$pending_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 1");
$tpl->assign('pending_links', $pending_links);
 
$today_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `DATE_ADDED` >= CURRENT_DATE");
$tpl->assign('today_links', $today_links);
 
$categorys = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` = 0 ");
$tpl->assign('categorys', $categorys);
 
$subcategorys = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` > 0 ");
$tpl->assign('subcategorys', $subcategorys);
//Ende Statistik
?>