<?php
$admin = 2;
$file = __FILE__;
include ("../inc/inc_common.php");
include ("../inc/inc_connect.php");
include ("../inc/inc_admincheck.php");
include ("../inc/inc_getdate.php");
include ("../inc/inc_forumname.php");
$page = "Admin - Analyse And Optimise";
$pagelink = $file;
include("../inc/inc_setonline.php");
$title = "$name1 Admin - $gfcookie[1] - Analyse And Optimise";
include ("../inc/inc_head.php");
include ("../inc/inc_body.php");
$title = "Analyse And Optimise";
include ("../inc/inc_title.php");
$count = 0;
print "<bR><bR><table border=1 cellspacing=0 cellpadding=2 bordercolor=\"$bordercolor\">";
while ($count < 19)
{
    if ($count == 0)
    {
        $query = "OPTIMIZE TABLE $admintable ";
    }
    if ($count == 1)
    {
        $query = "OPTIMIZE TABLE $buddytable ";
    }
    if ($count == 2)
    {
        $query = "OPTIMIZE TABLE $forumtable ";
    }
    if ($count == 3)
    {
        $query = "OPTIMIZE TABLE $grouptable ";
    }
    if ($count == 4)
    {
        $query = "OPTIMIZE TABLE $passwordtable ";
    }
    if ($count == 5)
    {
        $query = "OPTIMIZE TABLE $pmtable ";
    }
    if ($count == 6)
    {
        $query = "OPTIMIZE TABLE $topicsreadtable ";
    }
    if ($count == 7)
    {
        $query = "OPTIMIZE TABLE $userstable ";
    }
    if ($count == 8)
    {
        $query = "OPTIMIZE TABLE $votetable ";
    }
    if ($count == 9)
    {
        $query = "OPTIMIZE TABLE $votedtable ";
    }
    if ($count == 10)
    {
        $query = "OPTIMIZE TABLE $gallerycommentstable ";
    }
    if ($count == 11)
    {
        $query = "OPTIMIZE TABLE $searchtable ";
    }
    if ($count == 12)
    {
        $query = "OPTIMIZE TABLE $ratedtable ";
    }
    if ($count == 13)
    {
        $query = "OPTIMIZE TABLE $sweartable ";
    }
    if ($count == 14)
    {
        $query = "OPTIMIZE TABLE $calendartable ";
    }
    if ($count == 15)
    {
        $query = "OPTIMIZE TABLE $spelltable ";
    }
    if ($count == 16)
    {
        $query = "OPTIMIZE TABLE $wordtable ";
    }
    if ($count == 17)
    {
        $query = "OPTIMIZE TABLE $statstable ";
    }
    if ($count == 18)
    {
        $query = "OPTIMIZE TABLE $emailtable ";
    }

    $result = mysql_query($query, $link);

    $i = 0;
    $fields = array();
    while ($i < mysql_num_fields($result))
    {
        $meta = mysql_fetch_field($result);
        $i++;
        $fields[] = $meta;
    }
    print "<tr>";
    foreach($fields as $field)
    {
        $data = $field->name;
        echo "<td><b><font face=\"$font\" size=$fontsize>$data</b></td>\n";
    }
    print "</tr>";

    while($row = mysql_fetch_array($result))
    {
        echo "<tr>\n";
        foreach($fields as $field)
        {
            $data = $row[$field->name];
            echo "<td><font face=\"$font\" size=$fontsize>$data</td>\n";
        }
        echo "</tr>\n";
    }
    $count++;
}

print "</table>";


include ("../inc/inc_footer.php");
?>

