$curd = date( "D d M" );
$curt = date( "H:i:s" );
echo "Listing restarts up until
\n";
echo "day/time = $curd/$curt
\n";
echo "Click here for totals per Jodrell
version
\n";
include "jopsdb.php";
$conn = db_connect();
if( !$conn )
{
echo "Failed to connect to database server :(";
exit();
}
mysql_select_db( "Stats", $conn );
$q = "select * from JCCSRestart";
$result = mysql_query( $q, $conn );
if( !$result )
{
echo "Failed to query database :(";
exit();
}
if( !mysql_num_rows($result) )
{
echo "Bummer. No records found.";
exit();
}
echo "\n";
echo "\n";
$idcol = -1;
$cnt = 0;
$left = false;
while( $cnt".mysql_field_name($result,$cnt)."\n";
$left = true;
$cnt++;
}
echo "
\n";
$nf = mysql_num_fields($result);
while( ($row=mysql_fetch_row($result)) )
{
echo "\n";
$fcnt = 0;
$left = false;
while( $fcnt<$nf )
{
if( $fcnt!=$idcol )
{
$class = "right";
if( $left )
{
$class="left";
}
echo " ".$row[$fcnt]." | \n";
$left = true;
}
$fcnt++;
continue;
}
echo "
\n";
}
?>