<?php
// $Id: tdb.php,v 1.3 2008-04-03 06:33:39 fgiva Exp $
include ("../dyn/session.inc");
//include_once "DB.php";
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");
}
//*
// * custom *
if(file_exists("../dyn/custom/lien.inc")) {
   include("../dyn/custom/lien.inc");
}
else {
  include("../dyn/lien.inc");
}
if(isset($_POST['recherche'])){
       $recherche=$_POST['recherche'];
       if (get_magic_quotes_gpc()) // magic_quotes_gpc = on
          $recherche1= StripSlashes($recherche);
       else
          $recherche1= $recherche;
} else
    if(isset($_GET['recherche'])){
           $recherche=$_GET['recherche'];
           if (get_magic_quotes_gpc()) // magic_quotes_gpc = on
              $recherche1= StripSlashes($recherche);
           else
              $recherche1= $recherche;
    } else
      $recherche="";
//connexion
$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>"; */
    // variables collectivites
    $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");
    echo "</head>";
    //
    echo "<body class='login'>";

    include ("../dyn/menu.inc");
    include ("../scr/recherche.php");
     
    echo "</body>";
    echo "</html>";

    $db->disconnect();
/*    if ($DEBUG == 1)
        echo "La base ".$dsn['database']." est déconnectée.<br>";*/
}
?>