<?php
ob_start();
//ini_set("session.gc_maxlifetime", 36000);
if (isset($_REQUEST['Logout'])) {
  session_start();
  session_destroy();
}
require_once("vendor/autoload.php");
require_once 'database.inc.php';
require_once 'compta.inc.php';
if ((!empty($User))) {
  $lg_user = $User;
  $lg_password = $Passwd;
  $_SESSION['lg_user'] = $User;
  $_SESSION['lg_password'] = $Passwd;
} else {
  if (isset($_SESSION['lg_user'])) {
    $lg_user = $_SESSION['lg_user'];
  } else {
    $lg_user = "";
  }
  if (isset($_SESSION['lg_password'])) {
    $lg_password = $_SESSION['lg_password'];
  } else {
    $lg_password = "";
  }
}

$firephp = new FirePHP();
$firephp->log($_SERVER, 'SERVER');
$firephp->log($_COOKIE, 'COOKIE');
$firephp->log($_ENV, 'ENV');
?>
<!DOCTYPE html>
<html>

<head>
  <meta http-equiv='content-type' content='text/html;charset=utf-8'>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  <title>WebBike V<?php echo VERSION; ?></title>
  <SCRIPT language=JavaScript src='valideformulaire.js' type=text/javascript></SCRIPT>
  <link rel="stylesheet" href="jquery/themes/ui-lightness/jquery-ui-1.9.2.custom.min.css">
  <script src="jquery/jquery-1.8.3.min.js"></script>
  <script src="jquery/jquery-ui-1.9.2.custom.min.js"></script>
  <script src="jquery/jquery.ui.datepicker-fr-CH.min.js"></script>
  <script src="beep.js?2"></script>
  <?php
  //<script src="jquery/ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
  if (Test_User($lg_user, $lg_password)) {
    $cache = get_cache();
    if ($cache != null) {
      ob_end_clean();
      echo $cache;
      exit;
    }
    include("menu/menu.php");
    include("notes/notes.php");
  }
  $size = 2;
  $requette = "SELECT * FROM postes WHERE IP=:ip";
  $statement = Connection::getStatement($requette);
  $statement->bindParam(":ip", $_SERVER["REMOTE_ADDR"]);
  $statement->execute();
  if ($ligne = $statement->fetch()) {
    $size = $ligne['Size'];
  }
  echo "<link href='css/style$size.css' rel='stylesheet' media='screen'>\n";

  echo "<link href='" . CSS_FOLDER . "style.css' rel='stylesheet' media='screen'>\n"
  ?>
</head>

<body>
  <?php
  if (Test_User($lg_user, $lg_password)) {
    if (!isset($Type)) {
      $Type = 0;
    }
    if (!isset($Sous_Type)) {
      $Sous_Type = 0;
    }
    if (!isset($Etape)) {
      $Etape = 0;
    }
    if (!isset($New)) {
      $New = 0;
    }
    if (!isset($NoVisu)) {
      $NoVisu = 0;
    }
    if (!isset($NoCommande)) {
      $NoCommande = "";
    }
    echo "<div class='div_header'><div class='div_logo'></div></div>\n";
    //echo "<BR />T $Type St $Sous_Type E $Etape N $New V $NoVisu ".phpversion()."<BR />\n";
    switch ($Type) {
      case 0:
        break;
      case 1:
        echo "<div class='div_articles'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>Affichage article</div>\n";
            include("menu/article/affichage.php");
            break;
          case 2:
            echo "<div class='div_titre_fonction'>Modification article</div>\n";
            include("menu/article/edition.php");
            break;
          case 3:
            echo "<div class='div_titre_fonction'>Nouvel article</div>\n";
            include("menu/article/nouveau.php");
            break;
          case 4:
            echo "<div class='div_titre_fonction'>Copier article</div>\n";
            include("menu/article/copie.php");
            break;
          case 5:
            echo "<div class='div_titre_fonction'>Supprimer article</div>\n";
            include("menu/article/suppression.php");
            break;
          case 6:
            echo "<div class='div_titre_fonction'>Liste articles</div>\n";
            include("menu/article/liste.php");
            break;
          case 7:
            echo "<div class='div_titre_fonction'>Importation articles</div>\n";
            include("menu/article/importation.php");
            break;
          case 701:
            echo "<div class='div_titre_fonction'>Importation articles honda</div>\n";
            include("menu/article/importation/honda.php");
            break;
          case 702:
            echo "<div class='div_titre_fonction'>Importation articles bridge</div>\n";
            include("menu/article/importation/bridge.php");
            break;
          case 703:
            echo "<div class='div_titre_fonction'>Importation articles honda</div>\n";
            include("menu/article/importation/honda_accesoires.php");
            break;
          case 704:
            echo "<div class='div_titre_fonction'>Importation articles ducati</div>\n";
            include("menu/article/importation/ducati.php");
            break;
          case 705:
            echo "<div class='div_titre_fonction'>Importation articles générique</div>\n";
            include("menu/article/importation/generique.php");
            break;
          case 706:
            echo "<div class='div_titre_fonction'>Importation articles kawasaki</div>\n";
            include("menu/article/importation/kawasaki.php");
            break;
          case 707:
            echo "<div class='div_titre_fonction'>Importation articles KTM</div>\n";
            include("menu/article/importation/ktm.php");
            break;
          case 8:
            echo "<div class='div_titre_fonction'>Liste mouvements article</div>\n";
            include("menu/article/mouvement.php");
            break;
          case 91:
            echo "<div class='div_titre_fonction'>Remise à zéro du stock</div>\n";
            include("menu/article/inventaire/zero.php");
            break;
          case 92:
            echo "<div class='div_titre_fonction'>Ajout dans le stock</div>\n";
            include("menu/article/inventaire/ajout.php");
            break;
          case 10:
            echo "<div class='div_titre_fonction'>Reception commande</div>\n";
            include("menu/article/reception.php");
            break;
          case 11:
            echo "<div class='div_titre_fonction'>Categories</div>\n";
            include("menu/article/categorie.php");
            break;
          case 12:
            echo "<div class='div_titre_fonction'>Categories</div>\n";
            include("menu/article/commandestock.php");
            break;
          case 13:
            echo "<div class='div_titre_fonction'>Recherche commande par destinataire</div>\n";
            include("menu/article/commandedestinataire.php");
            break;
          case 14:
            echo "<div class='div_titre_fonction'>Pieces non vendues</div>\n";
            include("menu/article/piecenonvendue.php");
            break;
        }
        echo "</div>\n";
        break;
      case 2:
        echo "<div class='div_vehicules'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>Affichage véhicule</div>\n";
            include("menu/vehicule/affichage.php");
            break;
          case 2:
            echo "<div class='div_titre_fonction'>Modification véhicule</div>\n";
            include("menu/vehicule/edition.php");
            break;
          case 3:
            echo "<div class='div_titre_fonction'>Nouveau véhicule</div>\n";
            include("menu/vehicule/nouveau.php");
            break;
          case 4:
            echo "<div class='div_titre_fonction'>Copier véhicule</div>\n";
            include("menu/vehicule/copie.php");
            break;
          case 5:
            echo "<div class='div_titre_fonction'>Supprimer véhicule</div>\n";
            include("menu/vehicule/suppression.php");
            break;
          case 6:
            echo "<div class='div_titre_fonction'>Liste véhicules</div>\n";
            include("menu/vehicule/liste.php");
            break;
          case 7:
            echo "<div class='div_titre_fonction'>Nouveau véhicule location</div>\n";
            include("menu/vehicule/location/nouveau.php");
            break;
          case 8:
            echo "<div class='div_titre_fonction'>Modification véhicule location</div>\n";
            include("menu/vehicule/location/edition.php");
            break;
          case 9:
            echo "<div class='div_titre_fonction'>Supprimer véhicule location</div>\n";
            include("menu/vehicule/location/suppression.php");
            break;
          case 10:
            echo "<div class='div_titre_fonction'>Véhicules occasion</div>\n";
            include("menu/vehicule/occasion.php");
            break;
          case 11:
            echo "<div class='div_titre_fonction'>Véhicules neufs</div>\n";
            include("menu/vehicule/neuf.php");
            break;
          case 12:
            echo "<div class='div_titre_fonction'>Tri véhicules location</div>\n";
            include("menu/vehicule/location/tri.php");
            break;
          case 13:
            echo "<div class='div_titre_fonction'>Rapport véhicules occasion</div>\n";
            include("menu/vehicule/rapport_occasion.php");
            break;
          case 14:
            echo "<div class='div_titre_fonction'>Suivi des services</div>\n";
            include("menu/vehicule/suivis/index.php");
            break;
          case 15:
            echo "<div class='div_titre_fonction'>Alertes</div>\n";
            include("menu/vehicule/alertes.php");
            break;
        }
        echo "</div>\n";
        break;
      case 3:
        echo "<div class='div_clients'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>Affichage client</div>\n";
            include("menu/client/affichage.php");
            break;
          case 2:
            echo "<div class='div_titre_fonction'>Modification client</div>\n";
            include("menu/client/edition.php");
            break;
          case 3:
            echo "<div class='div_titre_fonction'>Nouveau client</div>\n";
            include("menu/client/nouveau.php");
            break;
          case 4:
            echo "<div class='div_titre_fonction'>Copier client</div>\n";
            include("menu/client/copie.php");
            break;
          case 5:
            echo "<div class='div_titre_fonction'>Supprimer client</div>\n";
            include("menu/client/suppression.php");
            break;
          case 6:
            echo "<div class='div_titre_fonction'>Liste clients</div>\n";
            include("menu/client/liste.php");
            break;
          case 7:
            echo "<div class='div_titre_fonction'>Nettoyage clients</div>\n";
            include("menu/client/nettoyage.php");
            break;
          case 8:
            echo "<div class='div_titre_fonction'>Rabais clients</div>\n";
            include("menu/client/rabais.php");
            break;
          case 9:
            echo "<div class='div_titre_fonction'>SMS</div>\n";
            include("menu/client/sms.php");
            break;
          case 10:
            echo "<div class='div_titre_fonction'>Email</div>\n";
            include("menu/client/email.php");
            break;
          case 11:
            echo "<div class='div_titre_fonction'>Opportunités</div>\n";
            echo "<link href='" . CSS_FOLDER . "opportunite.css' rel='stylesheet' media='screen'>\n";
            include("menu/client/opportunites.php");
            break;
          case 12:
            echo "<div class='div_titre_fonction'>Demandes web</div>\n";
            include("menu/client/demandesweb.php");
            break;
          case 13:
            echo "<div class='div_titre_fonction'>Email</div>\n";
            include("menu/client/email2.php");
            break;
          case 14:
            echo "<div class='div_titre_fonction'>Alertes</div>\n";
            include("menu/client/alertes.php");
            break;
          case 15:
            echo "<div class='div_titre_fonction'>Liste clients par famille vhc</div>\n";
            include("menu/client/listefamillevhc.php");
            break;
          case 20:
            echo "<div class='div_titre_fonction'>Liste clients par type vhc</div>\n";
            include("menu/client/listevhctype.php");
            break;
        }
        echo "</div>\n";
        break;
      case 4:
        echo "<div class='div_commandes'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>Commandes</div>\n";
            echo "<link href='" . CSS_FOLDER . "commande.css' rel='stylesheet' media='screen'>\n";
            include("menu/commande/commande.php");
            break;
          case 22:
            echo "<div class='div_titre_fonction'>Transformer devis</div>\n";
            include("menu/commande/transformer/devis.php");
            break;
          case 24:
            echo "<div class='div_titre_fonction'>Transformer offre</div>\n";
            include("menu/commande/transformer/offre.php");
            break;
          case 26:
            echo "<div class='div_titre_fonction'>Transformer offre véhicule</div>\n";
            include("menu/commande/transformer/offre_vehicule.php");
            break;
          case 70:
            echo "<div class='div_titre_fonction'>Liste commandes</div>\n";
            include("menu/commande/liste.php");
            break;
          case 100:
            echo "<div class='div_titre_fonction'>Supprimer commande</div>\n";
            include("menu/commande/suppression.php");
            break;
          case 101:
            echo "<div class='div_titre_fonction'>Encaissement rapide commande</div>\n";
            include("menu/commande/encaissement_rapide.php");
            break;
          case 102:
            echo "<div class='div_titre_fonction'>Encaissement commande</div>\n";
            include("menu/commande/encaissement.php");
            break;
          case 103:
            echo "<div class='div_titre_fonction'>Commande pièces</div>\n";
            include("menu/commande/commande_piece.php");
            break;
          case 104:
            echo "<div class='div_titre_fonction'>Acompte pièces</div>\n";
            include("menu/commande/acompte_piece.php");
            break;
          case 105:
            echo "<div class='div_titre_fonction'>Impression d'un autre garage avec entête locale</div>\n";
            include("menu/commande/impression_autre_garage.php");
            break;
          case 107:
            echo "<div class='div_titre_fonction'>Commande KTM</div>\n";
            include("menu/commande/commande_ktm.php");
            break;
          case 31:
            echo "<div class='div_titre_fonction'>Ouverture caisse</div>\n";
            include("menu/commande/ouverture_caisse.php");
            break;
        }
        echo "</div>\n";
        break;
      case 5:
        echo "<div class='div_calendrier'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>Calendrier locations</div>\n";
            echo "<link href='" . CSS_FOLDER . "location.css' rel='stylesheet' media='screen'>\n";
            include("menu/calendrier/location.php");
            break;
          case 2:
            echo "<div class='div_titre_fonction'>Calendrier atelier</div>\n";
            echo "<link href='" . CSS_FOLDER . "atelier.css' rel='stylesheet' media='screen'>\n";
            include("menu/calendrier/atelier.php");
            break;
          case 3:
            echo "<div class='div_titre_fonction'>Calendrier employés</div>\n";
            include("menu/calendrier/employe.php");
            break;
          case 4:
            echo "<div class='div_titre_fonction'>Recherche calendrier atelier</div>\n";
            include("menu/calendrier/recherche_atelier.php");
            break;
        }
        echo "</div>\n";
        break;
      case 6:
        echo "<div class='div_comptabilite'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>Cash</div>\n";
            include("menu/comptabilite/cash.php");
            break;
          case 21:
            echo "<div class='div_titre_fonction'>Comptabilité ecran</div>\n";
            include("menu/comptabilite/compta/ecran.php");
            break;
          case 22:
            echo "<div class='div_titre_fonction'>Comptabilité PDF</div>\n";
            include("menu/comptabilite/compta/pdf.php");
            break;
          case 23:
            echo "<div class='div_titre_fonction'>Comptabilité ancienne</div>\n";
            include("menu/comptabilite/compta/ancienne.php");
            break;
          case 24:
            echo "<div class='div_titre_fonction'>Comptabilité tools</div>\n";
            echo "<big> Tools </big><br>\n";
            include("Fred/index.php");
            break;
          case 25:
            echo "<div class='div_titre_fonction'>Comptabilité erreur</div>\n";
            include("menu/comptabilite/compta/erreurs.php");
            break;
          case 3:
            echo "<div class='div_titre_fonction'>Employés</div>\n";
            include("menu/comptabilite/employes.php");
            break;
          case 4:
            echo "<div class='div_titre_fonction'>Transferts</div>\n";
            include("menu/comptabilite/transfert.php");
            break;
          case 51:
            echo "<div class='div_titre_fonction'>Set caisse</div>\n";
            include("menu/comptabilite/caisse/set.php");
            break;
          case 52:
            echo "<div class='div_titre_fonction'>Caisse</div>\n";
            include("menu/comptabilite/caisse/voir.php");
            break;
          case 6:
            echo "<div class='div_titre_fonction'>Liste transferts</div>\n";
            include("menu/comptabilite/liste_transfert.php");
            break;
          case 7:
            echo "<div class='div_titre_fonction'>TVA des marges</div>\n";
            include("menu/comptabilite/tva_marge.php");
            break;
          case 61:
            $lignelisterappel = Config::getLastRappel();
            echo "<div class='div_titre_fonction'>Liste rappels du " . $lignelisterappel["valeur"] . "</div>\n";
            include("menu/comptabilite/rappel/liste.php");
            break;
          case 62:
            echo "<div class='div_titre_fonction'>Générer rappels</div>\n";
            include("menu/comptabilite/rappel/generer.php");
            break;
          case 71:
            echo "<div class='div_titre_fonction'>Reprises non vendues</div>\n";
            include("menu/comptabilite/reprises.php");
            break;
          case 8:
            echo "<div class='div_titre_fonction'>Rapport mensuel</div>\n";
            include("menu/comptabilite/rapport_mensuel.php");
            break;
          case 9:
            echo "<div class='div_titre_fonction'>Check factures</div>\n";
            include("menu/comptabilite/check_factures.php");
            break;
        }
        echo "</div>\n";
        break;
      case 7:
        echo "<div class='div_message'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>Messages</div>\n";
            include("menu/message/edit.php");
            break;
        }
        echo "</div>\n";
        break;
      case 8:
        echo "<div class='div_anniversaire'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>Anniversaires</div>\n";
            include("menu/anniversaire/edit.php");
            break;
        }
        echo "</div>\n";
        break;
      case 9:
        echo "<div class='div_sms'>\n";
        switch ($Sous_Type) {
          case 1:
            echo "<div class='div_titre_fonction'>SMS atelier</div>\n";
            include("menu/sms/atelier.php");
            break;
        }
        echo "</div>\n";
        break;
      case 10:
        echo "<div class='div_configuration'>\n";
        switch ($Sous_Type) {
          case 11:
            echo "<div class='div_titre_fonction'>Nouvel utilisateur</div>\n";
            include("menu/configuration/utilisateur/nouveau.php");
            break;
          case 12:
            echo "<div class='div_titre_fonction'>Modifier utilisateur</div>\n";
            include("menu/configuration/utilisateur/edition.php");
            break;
          case 13:
            echo "<div class='div_titre_fonction'>Supprimer utilisateur</div>\n";
            include("menu/configuration/utilisateur/suppression.php");
            break;
          case 14:
            echo "<div class='div_titre_fonction'>Nouveau groupe</div>\n";
            include("menu/configuration/groupe/nouveau.php");
            break;
          case 15:
            echo "<div class='div_titre_fonction'>Modifier groupe</div>\n";
            include("menu/configuration/groupe/edition.php");
            break;
          case 16:
            echo "<div class='div_titre_fonction'>Supprimer groupe</div>\n";
            include("menu/configuration/groupe/suppression.php");
            break;
          case 21:
            echo "<div class='div_titre_fonction'>Champs formulaire articles</div>\n";
            include("menu/configuration/formulaire/article_champs.php");
            break;
          case 22:
            echo "<div class='div_titre_fonction'>Champs formulaire véhicules</div>\n";
            include("menu/configuration/formulaire/vehicule_champs.php");
            break;
          case 23:
            echo "<div class='div_titre_fonction'>Champs formulaire clients</div>\n";
            include("menu/configuration/formulaire/client_champs.php");
            break;
          case 24:
            echo "<div class='div_titre_fonction'>Types formulaires articles</div>\n";
            include("menu/configuration/formulaire/article_type.php");
            break;
          case 25:
            echo "<div class='div_titre_fonction'>Types formulaires véhicules</div>\n";
            include("menu/configuration/formulaire/vehicule_type.php");
            break;
          case 26:
            echo "<div class='div_titre_fonction'>Types formulaires clients</div>\n";
            include("menu/configuration/formulaire/client_type.php");
            break;
          case 31:
            echo "<div class='div_titre_fonction'>Champs recherche articles</div>\n";
            include("menu/configuration/recherche/article_champs.php");
            break;
          case 32:
            echo "<div class='div_titre_fonction'>Champs recherche véhicules</div>\n";
            include("menu/configuration/recherche/vehicule_champs.php");
            break;
          case 33:
            echo "<div class='div_titre_fonction'>Champs recherche clients</div>\n";
            include("menu/configuration/recherche/client_champs.php");
            break;
          case 34:
            echo "<div class='div_titre_fonction'>Champs recherche commandes</div>\n";
            include("menu/configuration/recherche/commande_champs.php");
            break;
          case 35:
            echo "<div class='div_titre_fonction'>Types recherches articles</div>\n";
            include("menu/configuration/recherche/article_type.php");
            break;
          case 36:
            echo "<div class='div_titre_fonction'>Types recherches véhicules</div>\n";
            include("menu/configuration/recherche/vehicule_type.php");
            break;
          case 37:
            echo "<div class='div_titre_fonction'>Types recherches clients</div>\n";
            include("menu/configuration/recherche/client_type.php");
            break;
          case 38:
            echo "<div class='div_titre_fonction'>Types recherches commandes</div>\n";
            include("menu/configuration/recherche/commande_type.php");
            break;
          case 39:
            echo "<div class='div_titre_fonction'>Resultat recherches articles</div>\n";
            include("menu/configuration/recherche/article_resultat.php");
            break;
          case 310:
            echo "<div class='div_titre_fonction'>Résultats recherches véhicules</div>\n";
            include("menu/configuration/recherche/vehicule_resultat.php");
            break;
          case 311:
            echo "<div class='div_titre_fonction'>Résultats recherches clients</div>\n";
            include("menu/configuration/recherche/client_resultat.php");
            break;
          case 312:
            echo "<div class='div_titre_fonction'>Résultats recherches commandes</div>\n";
            include("menu/configuration/recherche/commande_resultat.php");
            break;
          case 313:
            echo "<div class='div_titre_fonction'>Champs recherche cash</div>\n";
            include("menu/configuration/recherche/cash_champs.php");
            break;
          case 314:
            echo "<div class='div_titre_fonction'>Types recherches cash</div>\n";
            include("menu/configuration/recherche/cash_type.php");
            break;
          case 315:
            echo "<div class='div_titre_fonction'>Résultats recherches cash</div>\n";
            include("menu/configuration/recherche/cash_resultat.php");
            break;
          case 316:
            echo "<div class='div_titre_fonction'>Champs recherche atelier</div>\n";
            include("menu/configuration/recherche/atelier_champs.php");
            break;
          case 317:
            echo "<div class='div_titre_fonction'>Types recherches atelier</div>\n";
            include("menu/configuration/recherche/atelier_type.php");
            break;
          case 318:
            echo "<div class='div_titre_fonction'>Résultats recherches atelier</div>\n";
            include("menu/configuration/recherche/atelier_resultat.php");
            break;
          case 41:
            echo "<div class='div_titre_fonction'>Groupes rabais</div>\n";
            include("menu/configuration/rabais/groupe.php");
            break;
          case 42:
            echo "<div class='div_titre_fonction'>Nouveau code rabais</div>\n";
            include("menu/configuration/rabais/nouveau.php");
            break;
          case 43:
            echo "<div class='div_titre_fonction'>Modifier code rabais</div>\n";
            include("menu/configuration/rabais/edition.php");
            break;
          case 44:
            echo "<div class='div_titre_fonction'>Supprimer code rabais</div>\n";
            include("menu/configuration/rabais/suppression.php");
            break;
          case 45:
            echo "<div class='div_titre_fonction'>Affecter code rabais</div>\n";
            include("menu/configuration/rabais/affectation.php");
            break;
          case 51:
            echo "<div class='div_titre_fonction'>Nouvel employé</div>\n";
            include("menu/configuration/employe/nouveau.php");
            break;
          case 52:
            echo "<div class='div_titre_fonction'>Modifier employé</div>\n";
            include("menu/configuration/employe/edition.php");
            break;
          case 53:
            echo "<div class='div_titre_fonction'>Supprimer employé</div>\n";
            include("menu/configuration/employe/suppression.php");
            break;
          case 61:
            echo "<div class='div_titre_fonction'>Configuration poste</div>\n";
            include("menu/configuration/poste/configuration.php");
            break;
          case 71:
            echo "<div class='div_titre_fonction'>Nouvel catégorie location</div>\n";
            include("menu/configuration/categorie_location/nouveau.php");
            break;
          case 72:
            echo "<div class='div_titre_fonction'>Modifier catégorie location</div>\n";
            include("menu/configuration/categorie_location/edition.php");
            break;
          case 73:
            echo "<div class='div_titre_fonction'>Supprimer catégorie location</div>\n";
            include("menu/configuration/categorie_location/suppression.php");
            break;
          case 81:
            echo "<div class='div_titre_fonction'>Groupe marchandise vers compte comptable - Vente</div>\n";
            include("menu/configuration/GM2CC/vente.php");
            break;
          case 82:
            echo "<div class='div_titre_fonction'>Groupe marchandise vers compte comptable - Achat</div>\n";
            include("menu/configuration/GM2CC/achat.php");
            break;
          case 91:
            echo "<div class='div_titre_fonction'>Modifier service</div>\n";
            include("menu/configuration/service/edition.php");
            break;
          case 92:
            echo "<div class='div_titre_fonction'>Nouveau service</div>\n";
            include("menu/configuration/service/nouveau.php");
            break;
          case 93:
            echo "<div class='div_titre_fonction'>Supprimer service</div>\n";
            include("menu/configuration/service/supprimer.php");
            break;
          case 99:
            echo "<div class='div_titre_fonction'>Nettoyage factures</div>\n";
            include("menu/configuration/nettoyage_factures.php");
            break;
        }
        echo "</div>\n";
        break;
    }
  } else {
    echo "<SCRIPT language=JavaScript src='md5.js' type=text/javascript></SCRIPT>\n";
    echo "  <p align='center'>\n" .
      "   <big>Web Bike " . VERSION . "</big><BR>\n" .
      "  </p>\n" .
      "  <form  action='default.php' method='POST'>\n" .
      "   <TABLE align='center'>\n" .
      "    <TR>\n" .
      "     <TH>Utilisateur</TH><TD><input type='text' name='User' size='20'></TD>\n" .
      "    </TR>\n" .
      "    <TR>\n" .
      "     <TH>Mot de passe</TH><TD><input type='password' name='Passwd' size='20'></TD>\n" .
      "    </TR>\n" .
      "   </TABLE>\n" .
      "   <TABLE align='center'>\n" .
      "    <TR>\n" .
      "     <TD><input type='submit' value='Valider'></TD><TD><input type='reset' value='Effacer'></TD>\n" .
      "    </TR>\n" .
      "   </TABLE>\n" .
      "  </form>\n";
    echo "<script language=JavaScript>\n";
    echo "this.document.forms[0].User.focus();\n";
    echo "</script>\n";
  }
  ?>
  <div id="dialog" title="Recherche client">Dialog</div>
  <script src="mobile.js"></script>
  <script>
    $(function() {
      $("#dialog").dialog({
        autoOpen: false
      });
    });
  </script>
</body>

</html>
<?php
if (isset($must_save_cache)) {
  $cache = ob_get_flush();
  save_cache($cache);
  //ob_end_flush();
} else {
  ob_end_flush();
}
?>