Файл: id2759/PHP Version/fileman/index.php
Строк: 655
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | Aquonics File Manager |
// +----------------------------------------------------------------------+
// | Copyright (c) 2001 Aquonics Scripting |
// +----------------------------------------------------------------------+
// | You may not remove the copyright or redistribute the script in any |
// | form. This program is Freeware, please read the license at |
// | http://www.aquonics.com/license.php |
// | |
// | Visit www.aquonics.com for more top scripts, free and custom. |
// +----------------------------------------------------------------------+
// | Authors: Stephen Ball <stephen@aquonics.com> |
// +----------------------------------------------------------------------+
//
// $Id$
error_reporting(0); /* Turn off ugly error messages */
set_time_limit(60); /* Ensure the script doesn't time out */
// Try to include important files
// or die with an error message
if (!(include("./common.lib.php"))) {
die("<html><head><title>Error!</title></head><body bgcolor="#FFFFFF"><font size="2" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000"><center><b>There was an error loading the library file.</b></center></font></body></html>");
}
if (!(include("./settings.inc.php"))) {
die("<html><head><title>Error!</title></head><body bgcolor="#FFFFFF"><font size="2" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000"><center><b>There was an error loading the settings file.</b></center></font></body></html>");
}
$username = $HTTP_COOKIE_VARS["username"];
$password = $HTTP_COOKIE_VARS["password"];
// Find out the starttime
$starttime = starttime();
// Ensure the user is valid
if (validate_user($username, $password) == 0) {
header("Location: ./" . $login_script . "");
exit;
}
// Get the users level
$level = user_level($username, $password);
// Print the page header
html_header("File Manager");
function remove_dir($dir)
{
// Create arrays to store files and directories
$dir_files = array();
$dir_subdirs = array();
// Change to directory
chdir($dir);
// Open directory;
if (!($handle = opendir($dir))) {
// Or return false
return false;
}
// Loop through all directory entries, construct
// two temporary arrays containing files and sub directories
while($entry = readdir($handle))
{
if (is_dir($entry) && $entry != ".." && $entry != ".") {
$dir_subdirs[] = $entry;
}
else if ($entry != ".." && $entry != ".") {
$dir_files[] = $entry;
}
}
// Delete all files in the curent directory
// return false and halt if a file
// cannot be removed
for($i=0; $i<count($dir_files); $i++) {
if (!(unlink($dir_files[$i]))) {
return true;
}
}
// Empty sub directories and then
// remove the directory
for($i=0; $i<count($dir_subdirs); $i++) {
remove_dir($dir . $dir_subdirs[$i]);
if (!(rmdir($dir . $dir_subdirs[$i]))) {
return false;
}
}
// Close directory
closedir($handle);
// Success, ever thing is gone
// return true
return true;
}
function traverse_dir($dir)
{
global $PHP_SELF, $root_dir, $ascii, $root_url, $format;
global $source_script, $edit_script, $login_script, $main_script, $space_script;
// Get the Operating System
$os = php_uname();
// Create arrays to store files and directories
$subdirs = array();
$files = array();
// Change into the active directory
chdir($dir);
// Set Space Used to 0
$totalsize = 0;
// Open the directory
if (!($handle = opendir($dir))) {
if ($dir == $root_dir) {
// If it can't be opened and it is the root dir
// display a fatal error
echo " <tr>rn";
echo " <th align="left" bgcolor="#4682B4" valign="middle"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#FFFFFF">Fatal Error</font></th>rn";
echo " </tr>rn";
echo " <tr>rn";
echo " <td align="left" bgcolor="#F5F5F5" valign="middle"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">" . getmsg(1) . "</font></td>rn";
echo " </tr>rn";
}
else {
// Otherwise display a simple warning
// and change back to the root dir
msg(2);
traverse_dir($root_dir);
}
}
else {
$title = str_replace($root_dir, "/", $dir);
// Print the active directory and navigation icons
echo " <tr>rn";
echo " <td align="left" bgcolor="#4682B4" colspan="4">rn";
echo " <table border="0" width="100%">rn";
echo " <tr>rn";
echo " <th align="left" bgcolor="#4682B4" valign="middle" width="99%"><img src="images/folder.gif" alt="$title" border="0" /> <font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#FFFFFF">$title</font></th>rn";
echo " <td align="right" bgcolor="#4682B4" valign="middle" width="1%" nowrap="nowrap"><a href="$PHP_SELF"><img src="images/home.gif" alt="Home" border="0" /></a> <a href="" . $space_script . ""><img src="images/space.gif" alt="Server Space" border="0" /></a> <a href="" . $login_script . "?op=out"><img src="images/logout.gif" alt="Logout" border="0" /></a></td>rn";
echo " </tr>rn";
echo " </table>rn";
echo " </td>rn";
echo " </tr>rn";
// Loop through all files and directories and
// place them in their respective arrays.
while($entry = readdir($handle)) {
if (is_dir($entry) && $entry != ".") {
$subdirs[] = $entry;
}
else if ($entry != ".." && $entry != ".") {
$files[] = $entry;
}
}
// Sort files and directories how a human would
// not how a computer would
natcasesort($files);
natcasesort($subdirs);
// Loop though each array and place the element
// in new arrays to sort the keys into order again
foreach($subdirs as $var) {
$dir_subdirs[] = $var;
}
foreach($files as $var) {
$dir_files[] = $var;
}
// Finds out the current directory
$curdir = str_replace($root_dir, "", $dir);
$curdir = substr($curdir, 0, strlen($curdir) - 1);
// Print all folders in the active directory
for($i=0; $i<count($dir_subdirs); $i++) {
if ($dir_subdirs[$i] == "..") {
$folder = eregi_replace(basename($dir) . "/", "", $dir);
$folder = str_replace($root_dir, "", $folder);
$folder = ereg_replace("/$", "", $folder);
// Remove the current folder for the link back
// Other wise will will end up with a URL like
// ?dir=/usr/local/apache/htdocs/folder/../
if ($dir != $root_dir) {
if ($folder == $root_dir || $folder == "") {
// If the folder will be the root directory
// don't worry about the ?dir= on the URL
$link = $PHP_SELF;
}
else {
// Otherwise print out the link with the ?dir=
$link = "$PHP_SELF?dir=" . encoded($folder);
}
echo " <tr>rn";
echo " <td align="left" bgcolor="#FFFFFF" valign="middle" colspan="2"><img src="images/back.gif" alt="$dir" border="0" /> <font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000"><a href="$link">$dir_subdirs[$i]</a></font></td>rn";
echo " </tr>rn";
}
}
else {
// Get the path of the new folder
// without the root_dir in it
$folder = $dir . $dir_subdirs[$i] . "/";
$folder = str_replace($root_dir, "", $folder);
$folder = ereg_replace("/$", "", $folder);
$overlib = "";
if (!(eregi("win", $os))) {
$chmod_val = chmod_value($dir_subdirs[$i]);
$owner = fileowner($dir_subdirs[$i]);
$group = filegroup($dir_subdirs[$i]);
$owner_array = posix_getpwuid($owner);
$group_array = posix_getgrgid($group);
$overlib .= "<b>CHMOD Value</b>: " . $chmod_val . "<br><b>Folder Owner</b>: " . $owner_array['name'] . "<br><b>Folder Group</b>: " . $group_array['name'] . "<br>";
}
$overlib .= "<b>Date Created</b>: " . date($format, filectime($dir_subdirs[$i]));
echo " <tr>rn";
echo " <td align="left" bgcolor="#FFFFFF" valign="middle" width="90%" nowrap="nowrap"><img src="images/folderclosed.gif" alt="$dir_subdirs[$i]" border="0" /> <font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000"><a href="$PHP_SELF?dir=" . encoded($folder) . "" onmouseover="return overlib('" . $overlib . "', CAPTION, 'Folder Details', FGCOLOR, '#FFFFFF', DELAY , '750')" onmouseout="return nd()">$dir_subdirs[$i]</a></font></td>rn";
echo " <td align="left" bgcolor="#FFFFFF" valign="middle" width="10%" nowrap="nowrap"><a href="JavaScript:delDir('" . encoded($dir_subdirs[$i]) . "', '$curdir')"><img src="images/delete.gif" alt="Delete Folder" border="0" /></a> <a href="JavaScript:rename('" . encoded($dir_subdirs[$i]) . "', '$curdir')"><img src="images/rename.gif" alt="Rename Folder" border="0" /></a> <a href="JavaScript:chmod('". encoded($dir_subdirs[$i]) . "', '$curdir')"><img src="images/chmod.gif" alt="CHMOD Folder" border="0" /></a></td>rn";
echo " </tr>rn";
}
}
// Print all files in the active directory
for($i=0; $i<count($dir_files); $i++) {
// Find out the file extension
$ext = getext($dir_files[$i]);
$size = filesize($dir_files[$i]);
$totalsize += $size;
$size = formatsize($size);
$overlib = "";
if (!(eregi("win", $os))) {
$chmod_val = chmod_value($dir_files[$i]);
$owner = fileowner($dir_files[$i]);
$group = filegroup($dir_files[$i]);
$owner_array = posix_getpwuid($owner);
$group_array = posix_getgrgid($group);
$overlib .= "<b>CHMOD Value</b>: " . $chmod_val . "<br><b>File Owner</b>: " . $owner_array['name'] . "<br><b>File Group</b>: " . $group_array['name'] . "<br>";
}
$overlib .= "<b>Date Created</b>: " . date($format, filectime($dir_subdirs[$i])) . "<br><b>File Size</b>: " . $size;
$images = "<a href="JavaScript:delFile('" . encoded($dir_files[$i]) . "', '$curdir')"><img src="images/delete.gif" alt="Delete File" border="0" /></a> <a href="JavaScript:rename('" . encoded($dir_files[$i]) . "', '$curdir')"><img src="images/rename.gif" alt="Rename File" border="0" /></a> <a href="JavaScript:chmod('" . encoded($dir_files[$i]) . "', '$curdir')"><img src="images/chmod.gif" alt="CHMOD File" border="0" /></a>";
// If the file is in the ASCII array
// allow the user to edit and view source
if (in_array($ext, $ascii)) {
if ($dir == $root_dir) {
$sourcefile = encoded($dir_files[$i]);
$extra = "";
$text = "<a href="" . $root_url . "/" . $dir_files[$i] . "" target="_blank" onmouseover="return overlib('" . $overlib . "', CAPTION, 'File Details', DELAY , '750')" onmouseout="return nd()">" . $dir_files[$i] ."</a> (<a href="JavaScript:open_window('" . $source_script . "?$sourcefile')">View Source</a>)";
}
else {
$sourcefile = $curdir . "/" . encoded($dir_files[$i]);
$extra = "&dir=$curdir";
$text = "<a href="" . $root_url . "/" . $curdir . "/" . $dir_files[$i] . "" target="_blank" onmouseover="return overlib('" . $overlib . "', CAPTION, 'File Details', DELAY , '750')" onmouseout="return nd()">" . $dir_files[$i] ."</a> (<a href="JavaScript:open_window('" . $source_script . "?$sourcefile')">View Source</a>)";
}
$images = $images . " <a href="" . $edit_script . "?file=" . encoded($dir_files[$i]) . "&op=edit" . $extra . ""><img src="images/edit.gif" alt="Edit File" border="0" /></a>";
}
else {
if ($dir == $root_dir) {
$text = "<a href="" . $root_url . "/" . $dir_files[$i] . "" target="_blank" onmouseover="return overlib('" . $overlib . "', CAPTION, 'File Details', DELAY , '750')" onmouseout="return nd()">" . $dir_files[$i] ."</a>";
}
else {
$text = "<a href="" . $root_url . "/" . $curdir . "/" . $dir_files[$i] . "" target="_blank" onmouseover="return overlib('" . $overlib . "', CAPTION, 'File Details', DELAY , '750')" onmouseout="return nd()">" . $dir_files[$i] ."</a>";
}
}
echo " <tr>rn";
echo " <td align="left" bgcolor="#F5F5F5" valign="middle" width="90%" nowrap="nowrap"><img src="images/" . get_icon($ext) . "" alt="$dir_files[$i]" border="0" /> <font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">$text</font></td>rn";
echo " <td align="left" bgcolor="#F5F5F5" valign="middle" width="10%" nowrap="nowrap"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">$images</font></td>rn";
echo " </tr>rn";
}
// Close the active directory
closedir($handle);
}
if ($totalsize != 0) {
echo "</table>rn";
echo "<br />rn";
echo "<table border="0" width="85%" bgcolor="#000000" cellpadding="4" cellspacing="1">rn";
echo " <tr>rn";
echo " <td align="right" bgcolor="#F5F5F5" valign="middle" width="95%" nowrap="nowrap"><font size="1" face="Verdana, Geneva, Ariial, Helvetica, Sans-Serif" color="#000000"><b>Total Space Used</b>: " . formatsize($totalsize) . "</font></td>rn";
echo " </tr>rn";
echo "</table>rn";
echo "<br />rn";
echo "<table border="0" width="85%" bgcolor="#000000" cellpadding="4" cellspacing="1">rn";
}
}
// Stop "undefined variable" errors
if (empty($op)) {
$op = "";
}
if ($op == "chmod") {
// User is trying to CHMOD
// make sure there is no double slash (//)
// and that they has the required access rights
settype($chmod, "integer");
$path = trimslash($root_dir . $dir . "/" . $file);
if ($level > 2) {
$m = 29;
}
else if (chmod($path, octdec($chmod)) == false) {
// CHMOD the file, show message
$m = 3;
}
else {
// Couldn't CHMOD the file, show message
$m = 4;
}
}
else if ($op == "del") {
// User is trying to delete file
// make sure there is no double slash (//)
// and that they has the required access rights
$path = trimslash($root_dir . $dir . "/" . $file);
if ($level > 2) {
$m = 29;
}
else if (unlink($path) == false) {
// Delete the file, show message
$m = 6;
}
else {
// Couldn't Delete the file, show message
$m = 7;
}
}
else if ($op == "mkdir") {
// User is trying to make a new directory
// make sure there is no double slash (//)
// and that they has the required access rights
$path = trimslash($root_dir . $dir . "/" . $newdir);
if ($level > 2) {
$m = 29;
}
else if (file_exists($path)) {
// Directory already exists, show message
$m = 8;
}
else if (mkdir($path, 0755) == false) {
// Directory created, show message
$m = 9;
}
else {
// Directory not created, show message
$m = 10;
}
}
else if ($op == "deldir") {
// User is trying to make a delete a whole directory
// make sure there is no double slash (//)
// and that they has the required access rights
$path = trimslash($root_dir . $dir . "/" . $rmdir . "/");
if ($level > 2) {
$m = 29;
}
else if (file_exists($path) == false) {
// File does not exists (what the hell is the user trying to do?), show message
$m = 11;
}
else if (remove_dir($path) == false || rmdir($path) == false) {
// Directory not completly removed, show message
$m = 12;
}
else {
// Directory completly removed, show message
$m = 13;
}
}
else if ($op == "rename") {
// User is trying to rename a file or directory
// make sure there is no double slash (//)
// and that they has the required access rights
$filename = trimslash($file);
$foldername = trimslash($root_dir . $dir . "/");
$newname = rawurldecode($new);
if ($level > 2) {
$m = 29;
}
else if (file_exists($foldername . $filename) == false) {
// File does not exists (what the hell is the user trying to do?), show message
$m = 15;
}
else if (rename($foldername . $filename, $foldername . $newname) == false) {
// File can not be renamed, show message
$m = 16;
}
else {
// File has been renamed, show message
$m = 17;
}
}
else if ($op == "upload") {
// User is trying to make a upload a file
// make sure there is no double slash (//)
// and that they has the required access rights
$new = trimslash($root_dir . $dir . "/" . $newname);
if ($level > 2) {
$m = 29;
}
else if (file_exists($new) == true) {
// File already exists, show message
$m = 18;
}
else if (copy($filename, $new) == false) {
// File can not be copied, show message
$m = 19;
}
else {
// File has been renamed, show message
$m = 20;
}
}
if (isset($dir)) {
// Remove url data
$dir = rawurldecode($dir);
$dir = $root_dir . cleanpath($dir) . "/";
}
else {
$dir = $root_dir;
}
// Find out if the owner wants to hide the folder
if(file_exists($dir . "/.hide")) {
$m = 30;
$dir = $root_dir;
}
// If $m contains a value, find out
// the message and show it
if (isset($m)) {
msg($m);
}
// Check to make sure the user isn't
// trying to access a file outside the
// root directory
if (ereg($root_dir, $dir)) {
// If they aren't then browse
// the selected directory
traverse_dir($dir);
}
else {
// Otherwise browse the
// root directory
traverse_dir($root_dir);
}
?>
</table>
<br />
<?php
// Finds out the current directory
$curdir = str_replace($root_dir, "", $dir);
$curdir = substr($curdir, 0, strlen($curdir) - 1);
// If the user is an admin
// display the upload form
if ($level > 0 && $level < 4) {
if ($level == 1) {
$title = "Admin Options";
}
else {
$title = "Upload File";
}
?>
<table border="0" width="85%" bgcolor="#000000" cellpadding="4" cellspacing="1">
<tr>
<th align="left" bgcolor="#4682B4" valign="middle"><font size="2" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#FFFFFF"><?=$title;?></font></th>
</tr>
<tr>
<td align="left" bgcolor="#F5F5F5" valign="middle">
<form name="upload" action="<?=$PHP_SELF;?>" enctype="multipart/form-data" method="post" style="margin: 0">
<input type="hidden" name="dir" value="<?=$curdir;?>" />
<input type="hidden" name="op" value="upload" />
<table border="0" width="100%" cellpadding="4">
<tr>
<td align="left" width="15%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Local File</font></td>
<td align="left" width="85%"><input type="file" name="filename" onblur="NewFileName()" size="50" /></td>
</tr>
<tr>
<td align="left" width="15%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Filename</font></td>
<td align="left" width="85%"><input type="text" name="newname" size="50" /></td>
</tr>
<tr>
<td align="left" width="100%" colspan="2"><input type="submit" onclick="JavaScript:return isValid(upload.newname.value)" value="Upload File" /></td>
</tr>
<?php
if ($dir == $root_dir || $dir == "") {
$extra = "";
}
else {
$extra = "?dir=$curdir";
}
// If the user is a Super-Admin
// display user options
if ($level == 1) {
?>
<tr>
<td align="left" width="100%" colspan="2"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">(<a href="<?=$user_script;?>?op=add">Add User</a>) (<a href="<?=$user_script;?>?op=edit">Edit User</a>) (<a href="<?=$user_script;?>?op=remove">Remove User</a>)</font></td>
</tr>
<?php
}
?>
<tr>
<td align="left" width="100%" colspan="2"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">(<a href="<?php echo $edit_script . $extra; ?>">New File</a>) (<a href="JavaScript:mkdir('<?=$curdir;?>')">New Directory</a>)</font></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<br />
<?php
}
?>
<table border="0" width="85%" bgcolor="#000000" cellpadding="4" cellspacing="1">
<tr>
<th align="left" bgcolor="#4682B4" valign="middle"><font size="2" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#FFFFFF">Legend</font></th>
</tr>
<tr>
<td align="left" bgcolor="#F5F5F5" valign="middle">
<table border="0" width="100%" cellpadding="4">
<tr>
<td align="left" width="5%"><img src="images/folderclosed.gif" alt="Folder" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Folder</font></td>
<td align="left" width="5%"><img src="images/sound.gif" alt="Sound" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Sound</font></td>
</tr>
<tr>
<td align="left" width="5%"><img src="images/image.gif" alt="Image File" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Image</font></td>
<td align="left" width="5%"><img src="images/movie.gif" alt="Movie" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Movie</font></td>
</tr>
<tr>
<td align="left" width="5%"><img src="images/text.gif" alt="Text File" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Text File</font></td>
<td align="left" width="5%"><img src="images/pdf.gif" alt="PDF" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">PDF File</font></td>
</tr>
<tr>
<td align="left" width="5%"><img src="images/script.gif" alt="Script" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Script</font></td>
<td align="left" width="5%"><img src="images/database.gif" alt="Database" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">SQL or database</font></td>
</tr>
<tr>
<td align="left" width="5%"><img src="images/zip.gif" alt="Compressed" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Compressed File</font></td>
<td align="left" width="5%"><img src="images/html.gif" alt="HTML" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">HTML/CSS</font></td>
</tr>
<tr>
<td align="left" width="5%"><img src="images/binary.gif" alt="Executable" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Executable File</font></td>
<td align="left" width="5%"><img src="images/unknown.gif" alt="Unknown" border="0" /></td>
<td align="left" width="45%"><font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Unknown Type</font></td>
</tr>
<tr>
<td align="left" colspan="4"> </td>
</tr>
<tr>
<td align="left" colspan="4">
<table border="0" width="100%" cellpadding="2">
<tr>
<td align="left" width="25%"><img src="images/delete.gif" alt="Delete File" border="0" /> <font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Delete File</font></td>
<td align="left" width="25%"><img src="images/rename.gif" alt="Rename File" border="0" /> <font size="1" face="Verdana, Geneva, Aria, Helvetica, Sans-Serif" color="#000000">Rename File</font></td>
<td align="left" width="25%"><img src="images/chmod.gif" alt="CHMOD File" border="0" /> <font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">CHMOD File</font></td>
<td align="left" width="25%"><img src="images/edit.gif" alt="Edit File" border="0" /> <font size="1" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" color="#000000">Edit File</font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
// Print out the page footer
html_footer($starttime);
?>