<?php
$DEBUG=0;
$serie=15;
$edition="";
$tableSelect="station left join personnel on station.idutilisateur=personnel.idutilisateur"; 
$champs=array("idstation",
              "numero",
              "nomstation",
              "idmodele as modelestation", //chp bidon pour choix modele station
              "numserie as description", //chp bidon pour infos pc
              "ipecole",
              "station.idorganisme",
              "numserie",
              "notag",
              "concat(nom,' ',prenom) as utilisateur",
              "station.idservice",
              "station.idutilisateur",
              "idbatiment",
              "idetatstation",
              "idstation as idstationtransfert", //chp bidon pour transfert utilisateur  
              "idmodele",  //modele marque
              "idmarque",
              "idtypestation",
              "idsysteme",
              "seriesysteme",
              "dateatelier",
              "station.datescan",
              "dateachat",
              "idfournisseur",
              "bc",
              "garantie"); 
$selection="";
$sql_organisme="select idorganisme,liborganisme from organisme order by liborganisme";
$sql_modelestation="select idmodelestation,libmodelestation from modelestation order by libmodelestation";
$sql_numerostation="select max(numero) from station where numero like '";
$sql_numeroelement="select max(numero) from element where numero like '";
$sql_transfert="select idstation,numero from station inner join etatmateriel on station.idetatstation=etatmateriel.idetat where libetat='en stock' order by numero";
$sql_etat="select idetat,libetat from etatmateriel order by libetat";
$sql_etat_limite="select idetat,libetat from etatmateriel where libetat<>'affecté' order by libetat";
$sql_lieu="select idservice,libservice from service where scolaire=1 order by libservice";
$sql_typestation="select idtypestation,libtypestation from typestation order by libtypestation";
$sql_utilisateur="select idutilisateur,concat(' ',nom,' ',prenom) as utilisateur from personnel where idutilisateur=";
$sql_service="select idservice,libservice from service where scolaire=0 order by libservice";
$sql_toutservice="select idservice,libservice from service order by libservice";
$sql_batiment="select idbatiment,libbatiment from batiment order by libbatiment";
$sql_fournisseur="select idfournisseur,libfournisseur from fournisseur order by libfournisseur";
$sql_marque="select idmarque,libmarque from marque where publisheronly=0 order by libmarque";
$sql_modele="select idmodele,libmodele from modeleelement where nature='station' order by libmodele";
$sql_systeme="select idmodele,libmodele from modeleelement where nature='systeme' order by libmodele";
?>