<?php
/**
 *
 * Author: Steve Bourgeois <owl@bozzit.com>
 *
 * Owl Ultra Lite
 *
 * Copyright (c) 2005-2006 Bozz IT Consulting Inc
 * Licensed under the GNU GPL. For full terms see http://www.gnu.org/licenses/licenses.html#TOCGPL
 *
 */


require_once(dirname(__FILE__) . "/config/owl.php");
require_once($default->root_fs . "/lib/owlulite.lib.php");

import_request_variables('pgc');

global $owl_lang;

if ($default->owl_read_only == 1)
{
   $default->permit_file_delete = 0;
   $default->permit_file_rename = 0;
   $default->permit_folder_rename = 0;
   $default->permit_folder_delete = 0;
   $default->permit_folder_creation = 0;
}

if ($default->permit_file_delete or $default->permit_folder_delete or $default->permit_folder_rename or $default->permit_file_email or $default->permit_file_rename)
{
   $iActionColumn = 1;
}
else
{
   $iActionColumn = 0;
}

$iNumberOfOptionalColumns = $default->display_permissions + $default->display_size + $default->display_last_modified + $iActionColumn;

$sid = $_REQUEST['sid'];

if (!isset($folder) || $folder == "" or $folder == "/" or $folder == "." or $folder == "..")
{
   if ($default->use_progress_bar == 1 and empty($sid))
   {
      $default->root_folder = $default->root_folder . "/" . $sRootFolderName;
      $sRecyclePath = $sRootFolderName;
      $folder = $sRootFolderName;
   }
   elseif ($default->use_progress_bar == 0)
   {
      $default->root_folder = $default->root_folder . "/" . $sRootFolderName;
      $sRecyclePath = $sRootFolderName;
      $folder = $sRootFolderName;
   }
}
else
{
      $folder = ereg_replace("\.\.","",$folder);
      $default->root_folder .= "/" . $folder;
      $sRecyclePath = $folder;
} 

if ($default->use_progress_bar == 1 and $sid)
{
   $qstr = join("",file("/tmp/{$sid}_qstring"));
   unlink("/tmp/{$sid}_qstring");

   parse_str($qstr);
   $_FILES['file']['name'] = $file['name'][0];
   $_FILES['file']['size'] = $file['size'][0];
   $_FILES['file']['tmp_name'] = $file['tmp_name'][0];
   $default->root_folder .= "/" . $folder;
   $sRecyclePath = $folder;
}

if ($default->owl_read_only == 0 and isset($btn_trash_can))
{
   header("Location: $default->root_url" . "/recycle.php");
   exit;
}

if(isset($btn_search))
{
   if(!empty($sSearchString))
   {
      header("Location: $default->root_url" . "/search.php?searchfor=" . urlencode($sSearchString));
      exit;
   }
   else
   {
      $sMessage = $owl_lang->err_seach_string_empty;
   }


}

if(isset($btn_add_file))
{

   $sMessage = "";

   switch ($_FILES['file']['error'])
   {
      case 0:
            $bPermitFile = true;
            break;
      case 1:
            $bPermitFile = false;
	    $sMessage = $owl_lang->err_upload_max_filesize;
            break;
      case 2:
            $bPermitFile = false;
	    $sMessage = $owl_lang->err_max_file_sise;
            break;
      case 3:
            $bPermitFile = false;
	    $sMessage = $owl_lang->err_partial_upload;
            break;
      case 4:
            if (empty($new_folder))
            {
	       $sMessage = $owl_lang->err_no_file_uploaded;
            }
            $bPermitFile = false;
            break;
      case 6:
            $bPermitFile = false;
	    $sMessage = $owl_lang->err_missing_tmp_folder;
            break;
      case 7:
            $bPermitFile = false;
	    $sMessage = $owl_lang->err_failed_writting_to_disk;
            break;
      default:
            $bPermitFile = false;
	    $sMessage = $owl_lang->err_unknown_exception;
            break;

   }
  
   if (isset($default->upload_permit_ext))
   {
      $file_extension = fFindFileExtension ( $_FILES['file']['name']);
      foreach ($default->upload_permit_ext as $permit)
      {
         if ($file_extension == $permit)
         {
            $bPermitFile = true;
            break;
         }
         else
         {
            $bPermitFile = false;
         }
      }
      if($bPermitFile === false)
      {
         $sMessage = $owl_lang->err_not_valid_file_type;
      }
   }   

   if ($bPermitFile === true)
   {
      $ftmp = $_FILES['file']['tmp_name'];
      $fname = $default->root_folder . "/" . $_FILES['file']['name'];

      if ($default->use_progress_bar == 1 and $sid)
      {
          rename($ftmp, $fname);
      }
      else
      {
         move_uploaded_file($ftmp, $fname);
      }
      chmod($fname,$default->file_permission); 
   }

   if (!empty($new_folder) and $default->permit_folder_creation == 1)
   {
      $new_folder = ereg_replace("\.\.","",$new_folder);
      $sNewFolder = $default->root_folder . "/" . $new_folder;
      mkdir($sNewFolder, $default->directory_mask);
   }
}   

if(isset($download))
{
   $fspath = $default->root_folder  . "/" . $download;

   if(file_exists($fspath))
   {
      $fsize = filesize($fspath); 
      header( 'Pragma: ' );
      header( 'Cache-Control: ' );
      header( 'Content-Type: application/octet-stream' );
      header( 'Content-Disposition: attachment; filename="' . $download . '"' );
      header("Content-Length: $fsize");
      header("Expires: 0");
   
      if (substr(php_uname(), 0, 7) != "Windows")
      {
         $fp = fopen("$fspath", "r");
      }
      else
      {
         $fp = fopen("$fspath", "rb");
      }
      fpassthru($fp);
      exit();
   }
   else
   {
      $sMessage = $owl_lang->err_file_not_accessible;
   }

}
if(isset($email_file) and $default->permit_file_email == 1)
{
   $fspath = $default->root_folder  . "/" . $email_file;

   if(file_exists($fspath))
   {
      header("Location: $default->root_url" . "/email.php?folder=" . urlencode($folder) . "&" . "email_file=" . urlencode($email_file));
      exit;
   }
   else
   {
      $sMessage = $owl_lang->err_file_not_accessible;
   }
}

if(isset($delete_file) and $default->permit_file_delete == 1)
{
   $fspath = $default->root_folder  . "/" . $delete_file;

   if(file_exists($fspath))
   {
      if ($default->collect_trash == 1)
      {
         $sTrashDir = explode('/', $folder);

         $sCreatePath = $default->trash_can_location;
         if (!file_exists($sCreatePath))
         {
            mkdir("$sCreatePath", $default->directory_mask);
         }
         foreach($sTrashDir as $sDir)
         {
           $sCreatePath .= "/" . $sDir;
           if (!file_exists($sCreatePath))
           {
              mkdir("$sCreatePath", $default->directory_mask);
           }
         }
         copy($fspath, $default->trash_can_location . "/" . $folder . "/" . $delete_file);
      }
      unlink($fspath);
   }
   else
   {
      $sMessage = $owl_lang->err_file_not_accessible;
   }
}

if(isset($delete_folder) and $default->permit_folder_delete == 1)
{
   $fspath = $default->root_folder  . "/" . $delete_folder;

   if(file_exists($fspath))
   {
      if ($default->collect_trash == 1)
      {
         $sTrashDir = explode('/', $folder);

         $sCreatePath = $default->trash_can_location;
         if (!file_exists($sCreatePath))
         {
            mkdir("$sCreatePath", $default->directory_mask);
         }
         foreach($sTrashDir as $sDir)
         {
           $sCreatePath .= "/" . $sDir;
           if (!file_exists($sCreatePath))
           {
              mkdir("$sCreatePath", $default->directory_mask);
           }
         }
         rename($fspath, $default->trash_can_location . "/" . $folder . "/" . $delete_folder);
       }
       else
       {
          mydelete($fspath);
       }
   }
   else
   {
      $sMessage = $owl_lang->err_file_not_accessible;
   }
}

include("lib/header.inc");
include("lib/userheader.inc");


if (!file_exists($default->root_folder))
{
   exit("$owl_lang->err_root_does_not_exists $default->root_folder");
}

if ($default->use_progress_bar == 1)
{
   $sid = md5(uniqid(rand()));
   print("<form name=\"FileList\" enctype=\"multipart/form-data\" action=\"/cgi-bin/upload.cgi?sid=$sid\" method=\"post\">\n");
   print("<input type=\"hidden\" name=\"sessionid\" value=\"$sid\"></input>\n");
}
else
{
   print("<form name=\"FileList\" enctype=\"multipart/form-data\" action=\"" . $_SERVER["PHP_SELF"] ."\" method=\"post\">\n");
   print("<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"$default->max_filesize\"></input>\n");
}

print("<input type=\"hidden\" name=\"folder\" value=\"$folder\"></input>\n");

print("<table class=\"border1\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"90%\"><tr><td align=\"left\" valign=\"top\" width=\"100%\">\n");
print("<br />\n");
print("<table class=\"border2\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td align=\"left\" valign=\"top\" width=\"100%\">\n");
                                                                                                                                                                                                 
print("<br />\n");

print("<table class=\"margin2\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td align=\"left\" valign=\"top\">\n");
print("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">");
if(!empty($sMessage))
{
   print("<tr><td class=\"admin3\" width=\"100%\" colspan=\"10\">$sMessage</td></tr>\n");
}
print("<tr><td class=\"admin1\" width=\"100%\" colspan=\"10\"><a href=\"http://owl.sourceforge.net\"><img src=\"$default->root_url/graphics/owl_lite.jpg\" alt=\"Owl Utra-Lite Version $default->version\" title=\"Owl Utra-Lite Version $default->version\" border=\"0\"></img></td></tr>\n");
print("<tr><td width=\"100%\" colspan=\"10\">&nbsp;</td></tr>\n");
print("<tr><td class=\"admin0\" width=\"100%\" colspan=\"10\">$owl_lang->site_title</td></tr>\n");

// 
// Show the Directories in the
// Recycle Bin
// 

$iCountLines = 0;

if ($Dir = opendir($default->root_folder))
{
   print("<tr><td class=\"dir1\" colspan=\"10\" height=\"20\" align=\"left\" wrap=\"nowrap\">$owl_lang->current_folder ");
   $aBreadCrumb = array();
   $aBreadCrumb =  split("\/",  $folder);
   $sPath  = $sRootFolderName;

   $iFirstime = true;

   foreach(  $aBreadCrumb as $sDirectory)
   {
      if ($iFirstime === false)
      {
         $sPath .= "/" . $sDirectory;
      }
      else
      {
         $iFirstime = false;
      }
      print("/<a class=\"lfile1\" href=\"" . $_SERVER["PHP_SELF"] . "?folder=" . $sPath . "\">$sDirectory</a>");
   }
   print("</td>\n</tr>\n");

   print("<tr><td class=\"title1\" align=\"left\">&nbsp;</td>");
   print("<td class=\"title1\" align=\"left\">$owl_lang->title_name</td>");
   if ($iActionColumn == 1)
   {
      print("<td class=\"title1\" align=\"left\">$owl_lang->title_actions</td>");
   }
   if ($default->display_permissions)
   {
      print("<td class=\"title1\" align=\"left\">$owl_lang->title_permission</td>");
   }
   if ($default->display_size)
   {
      print("<td class=\"title1\" align=\"left\">$owl_lang->title_size</td>");
   }
   if ($default->display_last_modified)
   {
      print("<td class=\"title1\" align=\"left\">$owl_lang->title_last_modified</td></tr>");
   }


   if (!($sRecyclePath == $sRootFolderName))
   { 
      $filesearch = explode('/', $sRecyclePath);
      $extensioncounter = 0;
      while ($filesearch[$extensioncounter + 1] != null)
      { 
         // pre-append a "." separator in the name for each
         // subsequent part of the the name of the file.
         if ($extensioncounter != 0)
         {
            $firstpart = $firstpart . "/";
         } 
         $firstpart = $firstpart . $filesearch[$extensioncounter];
         $extensioncounter++;
      } 

      if ($extensioncounter == 0)
      {
         $firstpart = $filename;
         $file_extension = '';
      } 
      else
      {
         $file_extension = $filesearch[$extensioncounter];
      } 

      print("\t\t\t\t<tr>");
      print("<td class=\"title1\" width=\"1%\" align=\"left\"><img src=\"$default->root_url/graphics/folder_closed.gif\" border=\"0\" alt=\"\"></img></td>\n");
      print("<td class=\"title1\" align=\"left\"><a class=\"lfile1\" href=\"" . $_SERVER["PHP_SELF"] . "?folder=" . $firstpart . "\">..</a></td>\n");
      if ($iActionColumn == 1)
      {
         print("<td class=\"title1\" align=\"left\">&nbsp;</td>");
      }
      if ($default->display_permissions)
      {
         print("<td class=\"title1\" align=\"left\">&nbsp;</td>\n");
      }
      if ($default->display_size)
      {
         print("<td class=\"title1\" align=\"left\">&nbsp;</td>\n");
      }
      if ($default->display_last_modified)
      {
         print("<td class=\"title1\" align=\"left\">&nbsp;</td>\n");
      }
      print("</tr>\n");
   } 

   while ($file = readdir($Dir))
   {
      if ($file[0] == '.')
      {
         continue;
      } 
      if (!is_file($default->root_folder . "/" . $file))
      {
         $iCountLines++;
         $iPrintLines = $iCountLines % 2;

         if ($iPrintLines == 0)
         {
            $sTrClass = "hover1";
            $sLfList = "lfile1";
            $sTrClassHilite = "mouseover1";
            $sTrClassHiliteAlt = "mouseover3";
         }
         else
         {
            $sTrClass = "hover2";
            $sLfList = "lfile1";
            $sTrClassHilite = "mouseover2";
            $sTrClassHiliteAlt = "mouseover3";
         }

         print("<tr id=\"foldertr" . $iCountLines  . "\" class=\"$sTrClassHilite\" onmouseover=\"alt_css_style('fcheckid" .  $iCountLines . "', this, '$sTrClassHiliteAlt')\"  onmouseout=\"alt_css_style('fcheckid" . $iCountLines . "', this, '$sTrClassHilite')\">\n");

         //print("<tr>\n");
         print("<td class=\"$sTrClass\"><img src=\"$default->root_url/graphics/folder_closed.gif\" border=\"0\" alt=\"\"></img></td>\n<td width=\"100%\" class=\"$sTrClass\"><a class=\"$sLfList\" href=\"" . $_SERVER["PHP_SELF"] ."?folder=" . $sRecyclePath . "/" . $file . "\">" . $file . "</a></td>\n");
         if ($iActionColumn == 1)
         {
            print("<td class=\"$sTrClass\" align=\"left\">");
         }
         if ($default->permit_folder_delete)
         {
            print("<a class=\"$sLfList\" href=\"" . $_SERVER["PHP_SELF"] ."?folder=" . $sRecyclePath . htmlentities("&") . "delete_folder=$file\"");
            print(" onclick=\"return confirm('");
            printf($owl_lang->reallydelete, $file);
            print("');\">");
            print("<img src=\"$default->root_url/graphics/trash.gif\" border=\"0\" alt=\"");
            printf($owl_lang->alt_reallydelete, $file);
            print("\"");
            print(" title=\"");
            printf($owl_lang->alt_reallydelete, $file);
            print("\">");
            print("</img>");
            print("</a>");
         }
         if ($default->permit_folder_rename)
         {
            print("<a class=\"$sLfList\" href=\"$default->root_url/modify.php?folder=" . $sRecyclePath . htmlentities("&") . "old_folder=$file\">");
            print("<img src=\"$default->root_url/graphics/edit.gif\" border=\"0\" alt=\"" . sprintf($owl_lang->alt_rename_file, $file) . "\" title=\"" . sprintf($owl_lang->alt_rename_file, $file) . "\"></img>");
            print("</a>");
         }
         if ($iActionColumn == 1)
         {
            print("&nbsp;</td>");
         }
         if ($default->display_permissions)
         {
            print("<td class=\"$sTrClass\" align=\"left\">&nbsp;</td>\n");
         }
         if ($default->display_size)
         {
            print("<td class=\"$sTrClass\" align=\"left\">&nbsp;</td>\n");
         }
         if ($default->display_last_modified)
         {
            print("<td class=\"$sTrClass\" align=\"left\">&nbsp;</td>\n");
         }
         print("</tr>\n");
      } 
   } 
} 
else
{
   exit($owl_lang->err_general);
} 
// 
// Show the Files in the
// Recycle Bin
// 
if ($Dir = opendir($default->root_folder))
{
   while ($file = readdir($Dir))
   {
      if ($file[0] == '.')
         continue;

      if (is_file($default->root_folder . "/" . $file))
      {
         $iCountLines++;
         $iPrintLines = $iCountLines % 2;

         if ($iPrintLines == 0)
         {
            $sTrClass = "hover1";
            $sLfList = "lfile1";
            $sTrClassHilite = "mouseover1";
            $sTrClassHiliteAlt = "mouseover3";
         }
         else
         {
            $sTrClass = "hover2";
            $sLfList = "lfile1";
            $sTrClassHilite = "mouseover2";
            $sTrClassHiliteAlt = "mouseover3";
         }

         print("<tr id=\"foldertr" . $iCountLines  . "\" class=\"$sTrClassHilite\" onmouseover=\"alt_css_style('fcheckid" .  $iCountLines . "', this, '$sTrClassHiliteAlt')\"  onmouseout=\"alt_css_style('fcheckid" . $iCountLines . "', this, '$sTrClassHilite')\">\n");

         print("<td  class=\"$sTrClass\" width=\"1%\">");


         $choped = split("\.", $file);
         $pos = count($choped);
         if ( $pos > 1 )
         {
            $ext = strtolower($choped[$pos-1]);
            $sDispIcon = $ext;
         }
         else
         {
            $sDispIcon = "NoExtension";
         }
                                                                                                                                                                                                     
         if (($ext == "gz") && ($pos > 2))
         {
            $exttar = strtolower($choped[$pos-2]);
            if (strtolower($choped[$pos-2]) == "tar")
               $ext = "tar.gz";
         }
                                                                                                                                                                                                  
         if (!file_exists("$default->root_fs/graphics/icon_filetype/$sDispIcon.gif"))
         {
            $sDispIcon = "file";
         }
         print("<img src=\"$default->root_url/graphics/icon_filetype/$sDispIcon.gif\" border=\"0\" alt=\"\"></img>");
         print("</td>\n<td class=\"$sTrClass\">");
         print("<a class=\"$sLfList\" href=\"" . $_SERVER["PHP_SELF"] ."?folder=" . $sRecyclePath . htmlentities("&") . "download=$file\">" . $file . "</a>");
         print("</td>\n");
         if ($iActionColumn == 1)
         {
            print("<td class=\"$sTrClass\" align=\"left\">");
         }
         if ($default->permit_file_delete)
         {
            print("<a class=\"$sLfList\" href=\"" . $_SERVER["PHP_SELF"] ."?folder=" . $sRecyclePath . htmlentities("&") . "delete_file=$file\"");
            print(" onclick=\"return confirm('");
            printf($owl_lang->reallydelete, $file);
            print("');\">");
            print("<img src=\"$default->root_url/graphics/trash.gif\" border=\"0\" alt=\"");
            printf($owl_lang->alt_reallydelete, $file);
            print("\"");
            print(" title=\"");
            printf($owl_lang->alt_reallydelete, $file);
            print("\">");
            print("</img>");
            print("</a>");
         }
         if ($default->permit_file_rename)
         {
            print("<a class=\"$sLfList\" href=\"$default->root_url/modify.php?folder=" . $sRecyclePath . htmlentities("&") . "old_file=$file\">");
            print("<img src=\"$default->root_url/graphics/edit.gif\" border=\"0\" alt=\"" . sprintf($owl_lang->alt_rename_file , $file) . "\" title=\"" . sprintf($owl_lang->alt_rename_file, $file) . "\"></img>");
            print("</a>");
         }
         if ($default->permit_file_email)
         {
            //print("<td class=\"$sTrClass\" align=\"left\">");
            print("<a class=\"$sLfList\" href=\"" . $_SERVER["PHP_SELF"] ."?folder=" . $sRecyclePath . htmlentities("&") . "email_file=$file\">");
            print("<img src=\"$default->root_url/graphics/email.gif\" border=\"0\" alt=\"");
            printf($owl_lang->email_file , $file);
            print("\"");
            print(" title=\"");
            printf($owl_lang->email_file, $file);
            print("\">");
            print("</img>");
            print("</a>");
            //print("</td>");
         }
         if ($default->permit_file_delete == 1 or $default->permit_file_email == 1);
         {
            print("&nbsp;</td>");
         }
         if ($default->display_permissions)
         {
            print("<td class=\"$sTrClass\">" . fShowPerms($default->root_folder . "/" . $file) ."</td>\n");
         }
         if ($default->display_size)
         {
            print("<td class=\"$sTrClass\">" . gen_filesize(filesize($default->root_folder . "/" . $file)) ."</td>\n");
         }
         if ($default->display_last_modified)
         {
            print("<td class=\"$sTrClass\">" . date("M d, Y \a\\t h:i a", filemtime($default->root_folder . "/" . $file)) ."</td>\n");
         }
         print("</tr>\n");
      } 
   } 
} 
else
{
   exit($owl_lang->err_general);
} 

if ($default->owl_read_only == 0)
{
   print("<tr><td  class=\"$sTrClass\" colspan=\"" . (2 + $iNumberOfOptionalColumns) . "\" height=\"40\" align=\"left\">");
   print("</td></tr>\n");
   print("<tr>\n");
   print("<td style=\"vertical-align: top\" colspan=\"" . (1 + $iNumberOfOptionalColumns) . "\" class=\"form1\">");
   print("<table>");
   print("<tr>");
   print("<td>$owl_lang->search</td><td align=\"left\" width=\"100%\" valign=\"middle\"><input type=\"text\" name=\"sSearchString\" size=\"20\"></input>&nbsp;");
   fPrintSubmitButton($owl_lang->btn_search, $owl_lang->alt_btn_search , "submit", "btn_search");
   print("</td>");

   print("</tr>");
   print("</table>");
   print("</td>");

   print("<td class=\"form2\" width=\"100%\" nowrap=\"nowrap\">");
   print("<table>");
   print("<tr>");
   print("<td>$owl_lang->new_file</td><td align=\"left\" width=\"100%\"> <input type=\"file\" name=\"file\" size=\"40\" maxlength=\"512\"></input></td>");
   print("</tr>");
   
   if ($default->use_progress_bar == 1)
   {
      $sJscript = " onClick=\"postIt();\"";
   }
   else
   {
      $sJscript = "";
   }
   
   $iPHPmaxSize = return_bytes(ini_get('upload_max_filesize'));
   
   if ($default->max_filesize > $iPHPmaxSize)
   {
      $iMaxUpload = $iPHPmaxSize;
      
   }
   else
   {
      $iMaxUpload = $default->max_filesize;
   }
   
   if ($default->permit_folder_creation == 1)
   {
      print("<tr><td>$owl_lang->new_folder </td><td align=\"left\" width=\"100%\"><input name='new_folder' type='text' value=''></input></td></td>");
   }
   
   print("<tr><td colspan=\"2\">");
   fPrintSubmitButton($owl_lang->btn_add_update, $owl_lang->alt_btn_add_update , "submit", "btn_add_file");
   print("<br />$owl_lang->max_upload_size (" . gen_filesize($iMaxUpload) .")</td></tr>");
   if ($default->collect_trash == 1 and $default->owl_read_only == 0)
   {
      print("<tr><td colspan=\"2\">");
      fPrintSubmitButton($owl_lang->btn_trash_can, $owl_lang->alt_btn_trash_can , "submit", "btn_trash_can");
      print("</td></tr>");
   }
   print("</table>");
   print("</td>");
   print("</tr>");
}
else
{
   print("<tr>\n");
   print("<td style=\"vertical-align: top\" colspan=\"" . (1 + $iNumberOfOptionalColumns) . "\" class=\"form1\">");
   print("<table>");
   print("<tr>");
   print("<td>$owl_lang->search</td><td align=\"left\" width=\"100%\"><input type=\"text\" name=\"sSearchString\" size=\"20\"></input><input name='btn_search' type='submit' value='$owl_lang->btn_search' title='$owl_lang->alt_btn_search'></input></td>");
   print("</tr>");
   print("</table>");
   print("</td>");

   print("<td class=\"form2\" width=\"100%\" nowrap=\"nowrap\">&nbsp;</td>");
   print("<table>");
   print("</tr>");

}

print("</table>");
print("</td></tr></table>\n");
print("<br />\n");
print("</td></tr></table>\n");

include("lib/footer.inc");

?>
