<?PHP
$adplacement = rand(0, 1);
if (is_admin()){
    echo("<br /><br /><strong style=\"text-decoration: underline;\">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 href='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 href='wiki_validate.php'><strong>Validate Edits (".$unvalid_count.")</strong></a>");
    $unvalid_count = mysql_num_rows(mysql_query("SELECT * FROM ".$prefix.$main_table."Comment WHERE comment_valid = 0"));
    echo("<br /><a href='comments_validate.php'><strong>Validate Comments (".$unvalid_count.")</strong></a>");
    echo("<br /><a href='fixpoints_X.php'><strong>Check Point Errors</strong></a>");
    echo("<br /><a href='duplicate_X.php'><strong>Check Duplicates</strong></a>");
    if (!eregi("racetag_X.php", $_SERVER['SCRIPT_NAME'])) {
        echo("<br /><a onClick=\"return confirmClear('Are you sure you want to clear race tags prior to today?','racetag_X.php')\"><strong>Clear Old Racetags</strong></a>");
    }
} 
?>
