<?php
include "../config.php";
$newcountertime = $autoapprovetimerhourcounter+1;
$counterq = "update settings set autoapprovetimerhourcounter=autoapprovetimerhourcounter+1";
$counterr = mysql_query($counterq);
if ($autoapprovetimerhours >= $newcountertime)
{
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'banners'"))==1) 
{
mysql_query("update banners set status=1 where status=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'botnav'"))==1) 
{
mysql_query("update botnav set status=1 where status=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'buttons'"))==1) 
{
mysql_query("update buttons set status=1 where status=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'cashsolos'"))==1) 
{
mysql_query("update cashsolos set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'dailybonus'"))==1) 
{
mysql_query("update dailybonus set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'footerads'"))==1) 
{
mysql_query("update footerads set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'headerads'"))==1) 
{
mysql_query("update headerads set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'headlineads'"))==1) 
{
mysql_query("update headlineads set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'hheaderads'"))==1) 
{
mysql_query("update hheaderads set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'hheadlineads'"))==1) 
{
mysql_query("update hheadlineads set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'hotlinks'"))==1) 
{
mysql_query("update hotlinks set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'hpcsolos'"))==1) 
{
mysql_query("update hpcsolos set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'hpsolos'"))==1) 
{
mysql_query("update hpsolos set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'loginads'"))==1) 
{
mysql_query("update loginads set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'navlink'"))==1) 
{
mysql_query("update navlink set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'ptcads'"))==1) 
{
mysql_query("update ptcads set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'snfcsolos'"))==1) 
{
mysql_query("update snfcsolos set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'snfsolos'"))==1) 
{
mysql_query("update snfsolos set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'solos'"))==1) 
{
mysql_query("update solos set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'surfurls'"))==1) 
{
mysql_query("update surfurls set approved=1 where approved=0");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'tlinks'"))==1) 
{
mysql_query("update tlinks set approved=1 where approved=0 and added=1");
}
if (mysql_num_rows(mysql_query("SHOW TABLES LIKE 'topnav'"))==1) 
{
mysql_query("update topnav set status=1 where status=0 and added=1");
}
$counterq2 = "update settings set autoapprovetimerhourcounter=0";
$counterr2 = mysql_query($counterq2);
} # if ($autoapprovetimerhours >= $newcountertime)
exit;
?>