discourse-legacysite-perl/site/forum.slowtwitch.com/www/admin/dbase_to_validate.php
2024-06-17 22:27:49 +10:00

66 lines
4.3 KiB
PHP

<?PHP
require_once ("config.php");
echo ("<font face=\"Tahoma,Arial,Helvetica\" size=\"2\">");
$main_table = "Triathlons";
$field_lead = "";
$year_part = date( "Y", strtotime("-6 months") );
$min_date = ""+$year_part+"-01-01"; // start date for races that display
$base_url = "https://www.slowtwitch.com/calendar/";
echo("<br /><br /><strong style=\"text-decoration: underline;\">".$main_table." Admin:</strong>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table." WHERE ".$field_lead."valid = 0 AND ".$field_lead."date >= '".$min_date."'"));
echo("<br /><a target='_blank' href='".$base_url."validate.php'><strong>Validate Entries (".$unvalid_count.")</strong></a>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table."Edits"));
echo("<br /><a target='_blank' href='".$base_url."wiki_validate.php'><strong>Validate Edits (".$unvalid_count.")</strong></a>");
$main_table = "Retailers";
$field_lead = "retailer_";
$base_url = "https://www.slowtwitch.com/retailers/";
echo("<br /><br /><strong style=\"text-decoration: underline;\">".$main_table." Admin:</strong>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table." WHERE ".$field_lead."valid = 0"));
echo("<br /><a target='_blank' href='".$base_url."validate.php'><strong>Validate Entries (".$unvalid_count.")</strong></a>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table."Edits"));
echo("<br /><a target='_blank' href='".$base_url."wiki_validate.php'><strong>Validate Edits (".$unvalid_count.")</strong></a>");
$main_table = "Triclubs";
$field_lead = "triclub_";
$base_url = "https://www.slowtwitch.com/triclubs/";
echo("<br /><br /><strong style=\"text-decoration: underline;\">".$main_table." Admin:</strong>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table." WHERE ".$field_lead."valid = 0"));
echo("<br /><a target='_blank' href='".$base_url."validate.php'><strong>Validate Entries (".$unvalid_count.")</strong></a>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table."Edits"));
echo("<br /><a target='_blank' href='".$base_url."wiki_validate.php'><strong>Validate Edits (".$unvalid_count.")</strong></a>");
$main_table = "Runshops";
$field_lead = "runshop_";
$base_url = "https://www.slowtwitch.com/runshops/";
echo("<br /><br /><strong style=\"text-decoration: underline;\">".$main_table." Admin:</strong>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table." WHERE ".$field_lead."valid = 0"));
echo("<br /><a target='_blank' href='".$base_url."validate.php'><strong>Validate Entries (".$unvalid_count.")</strong></a>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table."Edits"));
echo("<br /><a target='_blank' href='".$base_url."wiki_validate.php'><strong>Validate Edits (".$unvalid_count.")</strong></a>");
$main_table = "Fitters";
$field_lead = "fitter_";
$base_url = "https://www.slowtwitch.com/fitters/";
echo("<br /><br /><strong style=\"text-decoration: underline;\">".$main_table." Admin:</strong>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table." WHERE ".$field_lead."valid = 0"));
echo("<br /><a target='_blank' href='".$base_url."validate.php'><strong>Validate Entries (".$unvalid_count.")</strong></a>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table."Edits"));
echo("<br /><a target='_blank' href='".$base_url."wiki_validate.php'><strong>Validate Edits (".$unvalid_count.")</strong></a>");
$main_table = "Coaches";
$field_lead = "coach_";
$base_url = "https://www.slowtwitch.com/coaches/";
echo("<br /><br /><strong style=\"text-decoration: underline;\">".$main_table." Admin:</strong>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table." WHERE ".$field_lead."valid = 0"));
echo("<br /><a target='_blank' href='".$base_url."validate.php'><strong>Validate Entries (".$unvalid_count.")</strong></a>");
$unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table."Edits"));
echo("<br /><a target='_blank' href='".$base_url."wiki_validate.php'><strong>Validate Edits (".$unvalid_count.")</strong></a>");
echo ("</font>");
?>