/*
Table checker for Protector System v1.15.b1
*/
require_once("mainfile.php");
global $prefix, $db, $dbname,$user_prefix;
include("header.php");
echo "
Simple Database check for Protector System v1.15.b3 (v1.3)";
$local_query = $db->sql_query("SHOW FIELDS FROM ".$prefix."_authors LIKE 'radminblocker'");
if ($db->sql_numrows($local_query)>0) {}
else {
echo "
YOU MUST ADD the field radminblocker INTO YOUR TABLE ".$prefix."_authors
";
echo "Else wont you be able to use your admin panel. And only the logout icon will be shown for you!!!
";
echo "Just refresh this page and we will send the command below trying to add this field
";
echo "ALTER TABLE ".$prefix."_authors ADD radminblocker tinyint(2) NOT NULL default '0';";
echo "
Please run this checker again untill you see an OK all the way.";
$db->sql_query("ALTER TABLE ".$prefix."_authors ADD radminblocker tinyint(2) NOT NULL default '0'");
die(); }
$local_query = $db->sql_query("SHOW FIELDS FROM ".$user_prefix."_users LIKE 'last_seen_blocker'");
if ($db->sql_numrows($local_query)>0) {}
else {
echo "
YOU MUST ADD the field last_seen_blocker INTO YOUR TABLE ".$user_prefix."_users
";
echo "Else wont you be able to use your admin panel. And only the logout icon will be shown for you!!!
";
echo "Just refresh this page and we will send the command below trying to add this field
";
echo "ALTER TABLE ".$user_prefix."_users ADD last_seen_blocker INT(11) NOT NULL DEFAULT '0';";
echo "
Please run this checker again untill you see an OK all the way.";
$db->sql_query("ALTER TABLE ".$user_prefix."_users ADD last_seen_blocker INT(11) NOT NULL DEFAULT '0'");
die(); }
$local_query = 'SHOW TABLE STATUS FROM ' .$dbname;
$result = $db->sql_query($local_query);
$total = '0';
if ($db->sql_numrows($result))
{
echo "
Tables in your database | Tables required |
";
while ($row = $db->sql_fetchrow($result))
{
if($row[0] == "".$prefix."_blocked_denymod" or $row[0] == "".$prefix."_blocked_hammer" or $row[0] == "".$prefix."_blocked_settings" or $row[0] == "".$prefix."_blocked_protected" or $row[0] == "".$prefix."_blocked_config" or $row[0] == "".$prefix."_blocked_promodip" or $row[0] == "".$prefix."_blocked_promod" or $row[0] == "".$prefix."_blocked_robot" or $row[0] == "".$prefix."_blocked_iplist" or $row[0] == "".$prefix."_blocked" or $row[0] == "".$prefix."_blocked_pagetracker" or $row[0] == "".$prefix."_blocked_notes" or $row[0] == "".$prefix."_blocked_agent" or $row[0] == "".$prefix."_blocked_iptoc")
{
echo "$row[0] | ";
$total++;
}
}
echo " | ";
echo "";
echo "".$prefix."_blocked | ";
echo "".$prefix."_blocked_agent | ";
echo "".$prefix."_blocked_config | ";
echo "".$prefix."_blocked_denymod | ";
echo "".$prefix."_blocked_hammer | ";
echo "".$prefix."_blocked_iplist | ";
echo "".$prefix."_blocked_iptoc | ";
echo "".$prefix."_blocked_notes | ";
echo "".$prefix."_blocked_pagetracker | ";
echo "".$prefix."_blocked_promod | ";
echo "".$prefix."_blocked_promodip | ";
echo "".$prefix."_blocked_protected | ";
echo "".$prefix."_blocked_robot | ";
echo "".$prefix."_blocked_settings | ";
echo " ";
}
echo " |
";
if($total !=14)
{
echo "Your missing one or more tables. Upload install_blocked.php and it will install just the missing tables!";
echo "Pleas run this check again after that you have run the install_blocked.php for cheking if there is any missing fields in you tables!";
include("footer.php");
return;
}
else if($total == 14)
{
echo "
Great all tables is there lets look in them for missing fields!";
}
echo "
";
echo "Table check for ".$prefix."_blocked";
$query_blocked = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked");
$count_blocked = $db->sql_numrows($query_blocked);
if($count_blocked != '11')
{
echo "
Fileds in your table | Fields required |
";
while ($row = $db->sql_fetchrow($query_blocked))
{
echo "$row[0] | ";
}
echo " | ";
echo "";
echo "id | ";
echo "ip_from | ";
echo "ip_to | ";
echo "date | ";
echo "info | ";
echo "pers_info | ";
echo "hits | ";
echo "user | ";
echo "range | ";
echo "banned | ";
echo " ";
echo " |
";
echo "Your missing a field pleas reinstall table ".$prefix."_blocked
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_agent";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_agent");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '3')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_agent
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_config";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_config");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '22')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_config
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_denymod";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_denymod");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '3')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_denymod
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_hammer";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_hammer");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '12')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_hammer
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_iplist";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_iplist");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '19')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_iplist
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_iptoc";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_iptoc");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '5')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_iptoc
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_notes";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_notes");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '6')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_notes
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_pagetracker";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_pagetracker");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '4')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_pagetracker
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_promod";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_promod");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '2')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_promod
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_promodip";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_promodip");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '4')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_promodip
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_protected";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_protected");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '3')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_protected
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_robot";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_robot");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '3')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_robot
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
echo "
Table check for ".$prefix."_blocked_settings";
$query_blocked_config = $db->sql_query("SHOW FIELDS FROM ".$prefix."_blocked_settings");
$count_blocked = $db->sql_numrows($query_blocked_config);
if($count_blocked != '4')
{
echo "
Your missing a field pleas reinstall table ".$prefix."_blocked_settings
Just delet that table and upload install_blocked.php and it will reinstall just that table";
}
else
{
echo "Check OK";
}
echo "";
//phpinfo(10);
include("footer.php");
/*
echo "
Tables in your database | Tables required |
";
while ($row = sql_fetch_array($query_blocked))
{
echo "$row[0] | ";
//echo "$row[0] ";
}
echo " | ";
echo "";
echo "id | ";
echo "ip | ";
echo "date | ";
echo "info | ";
echo "hits | ";
echo "user | ";
echo "range | ";
echo "banned | ";
echo " ";
*/
?>
|