<?php
// $Id: doc.php,v 1.1 2006-05-16 18:44:59 fgiva Exp $
include ("../dyn/session.inc");
require_once "DB.php";
include ("../dyn/connexion.php");
// * custom *
if(file_exists("../dyn/custom/var.inc")) {
   include("../dyn/custom/var.inc");
}
else {
  include("../dyn/var.inc");
}
//*
$DEBUG=0;
// dsn
$db=& DB :: connect($dsn, $db_option);
if (DB :: isError($db)) {
    die($db->getMessage());
    }
 else{
    if($DEBUG==1)
    echo "La base ".$dsn['database']." est connectée.<br>";
}
// Paramètre collectivité
$res = $db->query($sql_collectivite);
if (DB :: isError($res))
   die($res->getMessage()."erreur ".$sql_collectivite);
else{
   while ($row=& $res->fetchRow()){
              $ville=$row[0];
              $logo=$row[1];
}}
$res->free();
// * custom *
include("../dyn/cg.css");
if(file_exists("../dyn/custom/cg.css")) {
  include("../dyn/custom/cg.css");
}
//*
echo "<html>";
echo"<head>";
include("../dyn/entete.inc");
// * custom *
if(file_exists("../dyn/custom/lien.inc")) {
   include("../dyn/custom/lien.inc");
}
else {
  include("../dyn/lien.inc");
}
//*
echo "</head>";
echo "<body>";
echo "<div>";
echo "<table id='entete' border='0'>";
echo "<tr><td>À Propos <img src='../img/fleche_droite.png' align='bottom'  border='0'> Documentation</td></tr>";
echo "</table></div>";
echo "<div id='sansrecherche'>";
//
  $dir=getcwd();
  $dir=substr($dir,0,strlen($dir)-4)."/doc/";
  $dossier = opendir($dir);
  echo "<table class='tabdoc'><tr>";
  $col=0;
  while ($entree = readdir($dossier))
  {
    $col=$col+1;
    if ($entree == "." || $entree ==".."){
       continue;
    }else{
    if ($col==3) echo "</tr><tr>";
    echo "<td>";
    // * custom *
    if(file_exists("../dyn/custom/img/ico_fleche.png")) {
       echo "<img src='../dyn/custom/img/ico_fleche.png' align='top' hspace='5' vspace='0' border='0'>";
    }
    else {
       echo "<img src='../img/ico_fleche.png' align='top' hspace='5' vspace='0' border='0'>";
    }
    //*
    echo "<a class='lienTable' href='../doc/".$entree."' target='_blanck'>";
    echo $entree."</a></td>";
    if ($col==3) $col=0;
    }
  }
  echo "</tr></table>";
  closedir($dossier);
echo "</div>";
include ("../dyn/menu.inc");
echo "</body>";
?>