<?php

include "navigation.php";

$pt = readtree();

$pagetype = "front";
$pagetitle = $pt->title;

$modtime = strftime("%Y-%m-%d", filemtime("pagetree.xml"));
$pwuid_record = posix_getpwuid(fileowner("pagetree.xml"));
$modname = $pwuid_record["name"];
// $contactmail = 'sysadm@coli.uni-sb.de';
$contactmail = 'help@coli.uni-saarland.de';

// output header
include "/web/www.coli.uni-saarland.de/html/common_start.html";
echo "    <tr>\n\n      <td colspan=2> <table  border=\"0\"
cellspacing=\"0\" cellpadding=\"10\" width=\"720\">\n      <tr><td>&nbsp;</td></tr>";

// output frontpage
for( $y = 0; $y < $pt->fp_y; $y++ ) {
  echo "      <tr>\n <td width=\"10%\"></td>\n";
  
  for( $x = 0; $x < $pt->fp_x; $x++ ) {
    $section =& $pt->find($pt->frontpage[$x][$y]);

    echo "	
	    <td align=\"left\" valign=\"top\" width=\"90%\">\n
	     <span style=\"font-size:23pt;\" class=\"index-header\">\n
	        $section->title\n<br />
	     </span><br>	 
	     <span class=\"index-items\">\n"
	;
    
    while( list($key,$child) = each($section->children) ) {
      echo "     <a href=\"" . $child->getURL($pt->docroot) . "\">$child->title</a>";
      echo "<br />";
      if( $child->hasflag("new") ) {
	echo "    <img alt=\"New\" src=\"/images/new-s.gif\">";
      }
    
      if( !$child->exists() ) {
	echo "&nbsp;<font color=red>?</font>";
      } else if( $child->isnew(14) ) {
	echo "&nbsp;<font color=red>+</font>";
      }
      
      echo "<br>\n";
    }
    echo "	  </span>\n	</td>\n";
    if( $x < $pt->fp_x - 1 ) {
      // nicht letzte Spalte => Abstand zur naechsten Spalte
      echo "	<td width=\"5%\"></td>\n";
    }
  }
  echo "	</tr>\n      <tr><td>&nbsp;</td></tr>\n";
}
// output footer
echo "    </table>";

// please no more tables !!!
echo "<p style=\"margin-left:83px;\">";
echo "If you have any questions, suggestions or complaints, please feel free to contact <br />\n";
echo "us via email to <img src=\"contents/bild.png\" width=\"240\" height=\"20\" /> <br /><br />\n";
echo "We kindly ask you to schedule an appointment befor visiting us in building  C74, room 0.01<br /><br />\n";
echo "<B>By appointment only. Termine nach Vereinbarung.</B>";
echo "</p>";
// Mehr Abstand
echo "<br /><br /><br /><br />";
echo "</td>\n";

include "/web/www.coli.uni-saarland.de/html/common_end.html";


?>
