<?php
$DEBUG=0;
$serie=20;
$ent="Modèle <img src='../img/fleche_droite.png' align='bottom'  border='0'> ";
$edition="";
$fiche="";
$table="modeleelement";
$tri= " order by libmodele";
$selection=" where nature ='$nat'";
//
switch ($nat) {
case "appareilphoto":
  $ent.="Appareil Numérique";
  $ico="../img/photo.png";
  $champAffiche=array("idmodele as id","libmodele","format as carte","taille as MPxs","integre as Batterie");
  $champRecherche=array("libmodele","format");
  break;
case "camescope":
  $ent.="Camescope";
  $ico="../img/webcam.png";
  $champAffiche=array("idmodele as id","libmodele");
  $champRecherche=array("libmodele");
  break;
case "clavier":
  $ent.="Clavier";
  $ico="../img/clavier.png";
  $champAffiche=array("idmodele as id","libmodele","typecomp as type");
  $champRecherche=array("libmodele","typecomp");
  break;
case "copieur":
  $ent.="Copieur";
  $ico="../img/copieur.png";
  $champAffiche=array("idmodele as id","libmodele","couleur");
  $champRecherche=array("libmodele");
  break;
case "ecran":
  $ent.="Ecran";
  $ico="../img/ecran.png";
  $champAffiche=array("idmodele as id","libmodele","taille","typecomp as type","integre as hp");
  $champRecherche=array("libmodele","taille","typecomp","integre");
  break;
case "enceintes":
  $ent.="Enceintes";
  $ico="../img/son.png";
  $champAffiche=array("idmodele as id","libmodele","taille as Puissance","typecomp as Type");
  $champRecherche=array("libmodele","typecomp");
  break;
case "hubusb":
  $ent.="Hub USB/Firewire";
  $ico="../img/reseau.png";
  $champAffiche=array("idmodele as id","libmodele","typecomp as type","taille as nbports");
  $champRecherche=array("libmodele","typecomp","taille");
  break;
case "imprimante":
  $ent.="Imprimante";
  $ico="../img/imprimante.png";
  $champAffiche=array("idmodele as id","libmodele","typecomp","format","connecteur","couleur","reseau");
  $champRecherche=array("libmodele","connecteur","typecomp","format");
  break;
case "lecteurcarte":
  $ent.="Lecteur de carte";
  $ico="../img/cleusb.png";
  $champAffiche=array("idmodele as id","libmodele","typecomp as Type");
  $champRecherche=array("libmodele","typecomp");
  break;
case "lecteurzip":
  $ent.="Lecteur Zip";
  $ico="../img/zip.png";
  $champAffiche=array("idmodele as id","libmodele","taille as Capacité","connecteur");
  $champRecherche=array("libmodele","taille");
  break;
case "memoireflash":
  $ent.="Mémoire Flash";
  $ico="../img/cleusb.png";
  $champAffiche=array("idmodele as id","libmodele","typecomp as Type","taille as Mem");
  $champRecherche=array("libmodele","taille");
  break;
case "disqueext":
  $ent.="Disque externe";
  $ico="../img/disquedur.png";
  $champAffiche=array("idmodele as id","libmodele","typecomp as Type","taille");
  $champRecherche=array("libmodele","taille");
  break;
case "micro":
  $ent.="Micro";
  $ico="../img/son.png";
  $champAffiche=array("idmodele as id","libmodele");
  $champRecherche=array("libmodele");
  break;
case "onduleur":
  $ent.="Onduleur";
  $ico="../img/battery.png";
  $champAffiche=array("idmodele as id","libmodele");
  $champRecherche=array("libmodele");
  break;
case "organiseur":
  $ent.="Organiseur";
  $ico="../img/pda.png";
  $champAffiche=array("idmodele as id","libmodele","frequence as freq","taille as RAM","connecteur");
  $champRecherche=array("libmodele");
  break;
case "scanner":
  $ent.="Scanner";
  $ico="../img/scanner.png";
  $champAffiche=array("idmodele as id","libmodele","format","connecteur");
  $champRecherche=array("libmodele","connecteur","format");
  break;
case "souris":
  $ent.="Souris";
  $ico="../img/souris.png";
  $champAffiche=array("idmodele as id","libmodele","typecomp as type","connecteur","integre as roulette");
  $champRecherche=array("libmodele","typecomp","connecteur");
  break;
case "stationaccueil":
  $ent.="Station d'accueil";
  $ico="../img/intervention.png";
  $champAffiche=array("idmodele as id","libmodele");
  $champRecherche=array("libmodele");
  break;
case "tablette":
  $ent.="Tablette Graphique";
  $ico="../img/scanner.png";
  $champAffiche=array("idmodele as id","libmodele","format");
  $champRecherche=array("libmodele");
  break;
case "telecommande":
  $ent.="Télécommande";
  $ico="../img/souris.png";
  $champAffiche=array("idmodele as id","libmodele");
  $champRecherche=array("libmodele");
  break;
case "videoprojecteur":
  $ent.="Vidéoprojecteur";
  $ico="../img/ecran.png";
  $champAffiche=array("idmodele as id","libmodele");
  $champRecherche=array("libmodele");
  break;
case "webcam":
  $ent.="Webcam";
  $ico="../img/webcam.png";
  $champAffiche=array("idmodele as id","libmodele");
  $champRecherche=array("libmodele");
  break;
}
// sous formulaire
switch ($nat) {
case "organiseur":
case "appareilphoto":
case "memoireflash":
case "videoprojecteur":
case "camescope":
  $sousformulaire=array("periphlibre");
  break;
case "copieur":
  $sousformulaire=array("copieur");
  break;
case "imprimante":
  $sousformulaire=array("station","imprimante");
  break;
default:
  $sousformulaire=array("station");
}
$sousformulaire_class="sousformulaire"; // dans cg => voir customs ???
$soustab="onglet";
?>