"; if ($CONFIG_server_type > 0) { // Backups are for athena only // Open the backup text file $file = fopen("last_backup.txt", "a+"); $data = fread($file, 2000); if (!$data) { // File is empty, reset the counter fputs($file, 1); $data = 1; } // Determine how long it's been since last update $difference = time() - $data; // Time duration to display $days = floor($difference / 86400); $hours = floor(($difference - ($days * 86400)) / 3600); $minutes = floor(($difference - ($days * 86400) - ($hours * 3600)) / 60); $seconds = floor(($difference - ($days * 86400) - ($hours * 3600) - ($minutes * 60))); if ($difference > 60 * 60 * ($CONFIG_backup_interval + 6)) { // Over six hours past due backup time $bold_tag = ""; $bold_close = ""; } elseif ($difference > 60 * 60 * $CONFIG_backup_interval) { // Longer than the backup duration $bold_tag = ""; $bold_close = ""; } else { // Less than the backup duration $bold_tag = ""; $bold_close = ""; } if ($data == "1") { $last_string = $lang['nobackup']; } else { $last_string = sprintf($lang['backup'], $days, $hours, $minutes, $seconds); } echo " "; if ($STORED_level > 2) { // Gives GMs/Admins a chance to backup the server echo " "; } } echo "
$welcome
{$bold_tag}$last_string{$bold_close}
{$lang['backupnow']}
"; EchoHead(80); echo " {$lang['userheader']} {$lang['poster']} {$lang['message']} {$lang['date']} "; $query = USER_ANNOUNCE; $result = execute_query($query, "home.php", $CONFIG_max_announce); while ($line = $result->FetchRow()) { echo " "; foreach ($line as $display_index => $col_value) { $col_value = del_escape($col_value); if ($display_index == 2) { $col_value = convert_date($col_value); } switch ($display_index) { case 0: $width = "25%"; break; case 1: $width = "50%"; break; case 2: $width = "25%"; break; } echo "$col_value"; } echo " "; } echo " {$lang['viewmore']}  "; if ($STORED_level > 1) { EchoHead(80); echo " {$lang['gmheader']} {$lang['poster']} {$lang['message']} {$lang['date']} "; $query = GM_ANNOUNCE; $result = execute_query($query, "home.php", $CONFIG_max_announce); while ($line = $result->FetchRow()) { echo " "; foreach ($line as $display_index => $col_value) { $col_value = del_escape($col_value); if ($display_index == 2) { $col_value = convert_date($col_value); } switch ($display_index) { case 0: $width = "25%"; break; case 1: $width = "50%"; break; case 2: $width = "25%"; break; } echo "$col_value"; } echo " "; } echo " {$lang['viewmore']}  "; } if ($STORED_level > 3) { EchoHead(80); echo " {$lang['adminheader']} {$lang['poster']} {$lang['message']} {$lang['date']} "; $query = ADMIN_ANNOUNCE; $result = execute_query($query, "home.php", $CONFIG_max_announce); while ($line = $result->FetchRow()) { echo " "; foreach ($line as $display_index => $col_value) { $col_value = del_escape($col_value); if ($display_index == 2) { $col_value = convert_date($col_value); } switch ($display_index) { case 0: $width = "25%"; break; case 1: $width = "50%"; break; case 2: $width = "25%"; break; } echo "$col_value"; } echo " "; } echo " {$lang['viewmore']}  "; } EchoHead(80); echo " {$lang['yourchars']} {$lang['yourname']} {$lang['yourclass']} {$lang['yourbase']} {$lang['yourjob']} {$lang['yourzeny']} "; $query = sprintf(HOME_CHARS, $STORED_id); $result = execute_query($query, 'home.php'); if ($result->RowCount() == 0) { echo " You have no characters! "; } else { while ($line = $result->FetchRow()) { echo ""; foreach ($line as $display_index => $col_value) { if ($display_index == 1) { $col_value = determine_class($col_value); } echo "$col_value"; } echo ""; } } } require 'footer.inc'; // displays the header ?>
Make your own free website on Tripod.com