<?
   /**
    * grab parms from URL
    *
    */
   parse_str($_SERVER['QUERY_STRING']);

   /**
    * some settings
    *
    */
   isset($page) || $page   = "home";               // default page to show
   $page_directory  = "pages";              // directory with pages
   $page_current    = "$page_directory/$page.php";


   /**
    * Login
    *
    */
   session_start();
   if(isset($_POST['username']) and isset($_POST['password'])) {
           $user = $_POST['username'];
           $pass = $_POST['password'];

           if($user == $pass) {
                   $_SESSION['user'] = $user;
                   $_SESSION['logged_in'] = true;
           }
   }

   /**
    * Prepare links
    */
   $spath = dirname($_SERVER['SCRIPT_NAME']);
   if(strlen($spath) < 2)
           $spath = "";

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict //EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
   <head>
      <title> Bacula, the Network Backup Tool for Linux, Unix, and Windows </title>
      <link rel="stylesheet" type="text/css" href="bacula.css" title="blueish">
      <meta name="Description" content="Bacula a network backup and restore program">
      <meta name="Keywords" content="Bacula, backup, restore, file backup">
      <meta name="Copyright" content="Copyright (C) 2000-2007 Kern Sibbald">
      <meta name="Trademark" content="Bacula (R) is a registered trademark of John Walker">
   </head>

   <body>

   <!-- Top Search Bar -->
   <div class="searchBar">
   <table class="searchBar">
   <tr>
       <td style="text-align: left; vertical-align: middle; width: 50%">
               Bacula, the Network Backup Tool for Linux, Unix, Mac and Windows.
       </td>
       <td style="text-align: left; vertical-align: middle">
           <img alt="English" src="images/english-flag.jpg">
           &nbsp;&nbsp;&nbsp;
         <a href='/fr'>
           <img alt="Fran&ccedil;ais" src="images/french-flag.jpg">
         </a>&nbsp;&nbsp;&nbsp;
         <a href='/de'>
           <img alt="Deutsch" src="images/german-flag.jpg">
         </a>

       </td>
       <FORM method=GET  target="_blank" action=http://www.google.com/search>
       <td style="text-align: right; vertical-align: middle">
           <INPUT id="text" class="searchBar" type="text" name="q" size=20
             maxlength=255 value="">
          <INPUT id="button" class="searchBar" type="submit" name="sa" VALUE="Search">
          <input type="hidden" name="domains" value="www.bacula.org">
          <input type="hidden" name="sitesearch" value="www.bacula.org">
       </td>
       </FORM>
   </tr>
   </table>
   </div>

   <!-- Logo Bar -->
   <div class="pageLogo">
       <table class="pageLogo">
         <tr>
           <td style="text-align: left; vertical-align: middle">
               <img alt="Bacula Logo" src="images/bacu_logo-red.jpg">
           </td>
         </tr>
       </table>
   </div>

   <!-- User Bar - if logged in -->
   <?
   if($_SESSION['logged_in']) {
      printf('<div class="userBar">');
      printf('Welcome %s, <a style="color: white; text-decoration: none" href="/?page=logout">logout here</a>.', $_SESSION['user']);
      printf('</div>');
   }
   ?>

   <!-- Menu Left -->
   <div class="menuLeft">

        <!-- General -->
        <div class="menuHead"> General </div>
        <div class="menuItem">
           <ul class="menuitem">
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=news"> News </a></li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=home"> Bacula Home </a></li>
           <li class="menuItem"> <a href="dev-manual/What_is_Bacula.html"> What is Bacula? </a> </li>
           <li class="menuItem"> <a href="dev-manual/Current_State_Bacula.html"> Current State of Bacula </a> </li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=testimonials"> Testimonials</a> </li>
           <li class="menuItem"> <a href="http://sourceforge.net/projects/bacula"> SF Project Page </a> </li>
           <li class="menuItem"> <a href="dev-manual/System_Requirements.html"> Requirements </a> </li>
           <li class="menuItem"> <a href="dev-manual/Supported_Operating_Systems.html"> Operating&nbsp;Systems </a> </li>
           <li class="menuItem"> <a href="dev-manual/Supported_Tape_Drives.html"> Tapedrives </a> </li>
           <li class="menuItem"> <a href="dev-manual/Supported_Autochangers.html"> Autochangers </a> </li>
           <li class="menuItem"> <a href="dev-manual/Bacula_Copyri_Tradem_Licens.html"> License </a> </li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=fsfe"> FSFE License </a></li>
           </ul>
        </div>

        <!-- Documentation -->
        <!-- files need a version -->
        <div class="menuHead"> Documentation </div>
        <div class="menuItem">
           <ul class="menuitem">
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=documentation"> Documentation </a></li>
           <li class="menuItem"> <a href="http://wiki.bacula.org">Wiki </a></li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=presentations"> Presentations </a></li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=presskits"> Press Kits </a></li>
           </ul>
        </div>

        <!-- Downloads -->
        <div class="menuHead"> Downloads </div>
        <div class="menuItem">
           <ul class="menuitem">
           <li class="menuItem"> <a href="http://sourceforge.net/project/showfiles.php?group_id=50727"> Current Files </a> </li>
           <li class="menuItem"> <a href="http://sourceforge.net/project/showfiles.php?group_id=50727#files"> All Files </a> </li>
           <li class="menuItem"> <a href="http://sourceforge.net/svn/?group_id=50727"> SVN Repository </a> </li>
           </ul>
        </div>

        <!-- Support -->
        <div class="menuHead"> Support </div>
        <div class="menuItem">
           <ul class="menuitem">
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=support"> Getting Support </a> </li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=maillists"> Email Lists </a> </li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=bugs"> Bug Reports </a> </li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=professional"> Professional </a></li>
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=feature-request"> Feature Requests </a></li>
           </ul>
        </div>

        <!-- Projects -->
        <div class="menuHead"> Projects </div>
        <div class="menuItem">
           <ul class="menuitem">
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=projects"> Projects </a> </li>
  <!--
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=vote"> Project Vote </a> </li>
  -->
           </ul>
        </div>

        <div class="menuHead"> Donations </div>
        <div class="menuItem">
           <ul class="menuitem">
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=makedonation"> Make a Donation </a> </li>
  <!--
           <li class="menuItem"> <a href="<? echo $spath ?>/?page=donations"> Donations Received </a> </li>
  -->
           </ul>
        </div>
        <div class="menuHead">
        <div class="icons">
           <a href="http://www.ukfast.net"><img src="images/bacula_ukfast_logo.gif" alt="www.ukfast.net"></a>
           <!-- a href="http://validator.w3.org/check?uri=referer"><img src="images/valid-xhtml10.png" alt="valix w3c logo"></a -->
           <!-- a href="http://jigsaw.w3.org/css-validator/validator?uri=<? echo $_SERVER['HTTP_REFERER']; ?>"><img src="images/vcss.png" alt="valid css logo"></a-->
        </div>


        </div>

   </div>
   
   <div class="pageTopRight">
           It comes by night and sucks the vital essence from your computers.
   </div>

   <div class="pageContent">
