phase;
if (isset($time) && $myrow->now >= $time && $phase == $from_phase) {
$sql = "UPDATE status SET phase = '$to_phase'";
mysql_query($sql);
$phase = $to_phase;
}
return $phase;
}
$db = wsmsql_connect("localhost", "heckler_db_admin", "eTVaPs5MXUadYkG0");
if (!$db) {
echo "
ERROR: Database server is down. Please try again later
\n";
exit();
}
mysql_select_db($auction_db, $db);
$auto_preview = get_option("auto_preview");
$auto_open = get_option("auto_open");
$phase = FALSE;
if ($auto_preview) {
$phase = do_auto_start($auto_preview, "Announce", "Preview");
}
if ($auto_open) {
$phase = do_auto_start($auto_open, "Preview", "Open");
}
if ($phase === FALSE) {
$result = mysql_query("SELECT phase FROM status") or die("ERROR: status");
$myrow = mysql_fetch_object($result);
$phase = $myrow->phase;
}
// 'Idle', 'Announce', 'Preview', 'Open', 'Paused', 'Callback', 'Closed'
if ($phase == "Idle" || $phase == "Announce") {
include("page-single.shtm");
}
else {
include("index-auction.shtm");
}
?>