Your IP : 216.73.217.64
<?php
//$Id: om_etat.inc.php 2381 2013-06-11 10:37:35Z fmichon $
//gen openMairie le 31/05/2013 17:15
$DEBUG=0;
$serie=15;
$ico="../img/ico_application.png";
$ent = _("parametrage")." -> "._("om_etat");
if(!isset($premier)) $premier='';
if(!isset($recherche1)) $recherche1='';
if(!isset($tricolsf)) $tricolsf='';
if(!isset($premiersf)) $premiersf='';
if(!isset($selection)) $selection='';
if(!isset($retourformulaire)) $retourformulaire='';
if (isset($idx) && $idx != ']' && trim($idx) != '') {
$ent .= "-> ".$idx." ";
}
if (isset($idz) && trim($idz) != '') {
$ent .= " ".strtoupper($idz)." ";
}
// FROM
$table = DB_PREFIXE."om_etat
LEFT JOIN ".DB_PREFIXE."om_collectivite
ON om_etat.om_collectivite=om_collectivite.om_collectivite
LEFT JOIN ".DB_PREFIXE."om_requete
ON om_etat.om_sql=om_requete.om_requete ";
// SELECT
$champAffiche = array(
'om_etat.om_etat as "'._("om_etat").'"',
'om_etat.id as "'._("id").'"',
'om_etat.libelle as "'._("libelle").'"',
"case om_etat.actif when 't' then 'Oui' else 'Non' end as \""._("actif")."\"",
'om_etat.orientation as "'._("orientation").'"',
'om_etat.format as "'._("format").'"',
'om_etat.logo as "'._("logo").'"',
'om_etat.logoleft as "'._("logoleft").'"',
'om_etat.logotop as "'._("logotop").'"',
'om_etat.titreleft as "'._("titreleft").'"',
'om_etat.titretop as "'._("titretop").'"',
'om_etat.titrelargeur as "'._("titrelargeur").'"',
'om_etat.titrehauteur as "'._("titrehauteur").'"',
'om_etat.titrefont as "'._("titrefont").'"',
'om_etat.titreattribut as "'._("titreattribut").'"',
'om_etat.titretaille as "'._("titretaille").'"',
'om_etat.titrebordure as "'._("titrebordure").'"',
'om_etat.titrealign as "'._("titrealign").'"',
'om_etat.corpsleft as "'._("corpsleft").'"',
'om_etat.corpstop as "'._("corpstop").'"',
'om_etat.corpslargeur as "'._("corpslargeur").'"',
'om_etat.corpshauteur as "'._("corpshauteur").'"',
'om_etat.corpsfont as "'._("corpsfont").'"',
'om_etat.corpsattribut as "'._("corpsattribut").'"',
'om_etat.corpstaille as "'._("corpstaille").'"',
'om_etat.corpsbordure as "'._("corpsbordure").'"',
'om_etat.corpsalign as "'._("corpsalign").'"',
'om_requete.libelle as "'._("om_sql").'"',
'om_etat.se_font as "'._("se_font").'"',
'om_etat.se_margeleft as "'._("se_margeleft").'"',
'om_etat.se_margetop as "'._("se_margetop").'"',
'om_etat.se_margeright as "'._("se_margeright").'"',
'om_etat.se_couleurtexte as "'._("se_couleurtexte").'"',
);
//
if ($_SESSION['niveau'] == '2') {
array_push($champAffiche, "om_collectivite.libelle as \""._("collectivite")."\"");
}
//
$champNonAffiche = array(
'om_etat.om_collectivite as "'._("om_collectivite").'"',
'om_etat.titre as "'._("titre").'"',
'om_etat.corps as "'._("corps").'"',
'om_etat.sousetat as "'._("sousetat").'"',
);
//
$champRecherche = array(
'om_etat.om_etat as "'._("om_etat").'"',
'om_etat.id as "'._("id").'"',
'om_etat.libelle as "'._("libelle").'"',
'om_etat.orientation as "'._("orientation").'"',
'om_etat.format as "'._("format").'"',
'om_etat.logo as "'._("logo").'"',
'om_etat.logoleft as "'._("logoleft").'"',
'om_etat.logotop as "'._("logotop").'"',
'om_etat.titreleft as "'._("titreleft").'"',
'om_etat.titretop as "'._("titretop").'"',
'om_etat.titrelargeur as "'._("titrelargeur").'"',
'om_etat.titrehauteur as "'._("titrehauteur").'"',
'om_etat.titrefont as "'._("titrefont").'"',
'om_etat.titreattribut as "'._("titreattribut").'"',
'om_etat.titretaille as "'._("titretaille").'"',
'om_etat.titrebordure as "'._("titrebordure").'"',
'om_etat.titrealign as "'._("titrealign").'"',
'om_etat.corpsleft as "'._("corpsleft").'"',
'om_etat.corpstop as "'._("corpstop").'"',
'om_etat.corpslargeur as "'._("corpslargeur").'"',
'om_etat.corpshauteur as "'._("corpshauteur").'"',
'om_etat.corpsfont as "'._("corpsfont").'"',
'om_etat.corpsattribut as "'._("corpsattribut").'"',
'om_etat.corpstaille as "'._("corpstaille").'"',
'om_etat.corpsbordure as "'._("corpsbordure").'"',
'om_etat.corpsalign as "'._("corpsalign").'"',
'om_requete.libelle as "'._("om_sql").'"',
'om_etat.se_font as "'._("se_font").'"',
'om_etat.se_margeleft as "'._("se_margeleft").'"',
'om_etat.se_margetop as "'._("se_margetop").'"',
'om_etat.se_margeright as "'._("se_margeright").'"',
'om_etat.se_couleurtexte as "'._("se_couleurtexte").'"',
);
//
if ($_SESSION['niveau'] == '2') {
array_push($champRecherche, "om_collectivite.libelle as \""._("collectivite")."\"");
}
$tri="ORDER BY om_etat.libelle ASC NULLS LAST";
$edition="om_etat";
if ($_SESSION['niveau']== '2')
$selection='';
else {
$selection=" where om_etat.om_collectivite = '".$_SESSION['collectivite']."'";
}
if ($retourformulaire== 'om_collectivite') {
if ($_SESSION['niveau']== '2'){
$selection=" WHERE (om_etat.om_collectivite ='".$idx."')";
}else{
$selection=" WHERE (om_etat.om_collectivite ='".$idx."') AND om_etat.om_collectivite = '".$_SESSION['collectivite']."'";
}
}
if ($retourformulaire== 'om_requete') {
if ($_SESSION['niveau']== '2'){
$selection=" WHERE (om_etat.om_sql ='".$idx."')";
}else{
$selection=" WHERE (om_etat.om_sql ='".$idx."') AND om_etat.om_collectivite = '".$_SESSION['collectivite']."'";
}
}
?>