Your IP : 216.73.217.64


Current Path : /home3/gp97/baillifpre.97gp.net/gen/sql/pgsql/
Upload File :
Current File : //home3/gp97/baillifpre.97gp.net/gen/sql/pgsql/om_lettretype.inc.php

<?php
//$Id: om_lettretype.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_lettretype");
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 .= "->&nbsp;".$idx."&nbsp;";
}
if (isset($idz) && trim($idz) != '') {
    $ent .= "&nbsp;".strtoupper($idz)."&nbsp;";
}
// FROM 
$table = DB_PREFIXE."om_lettretype
    LEFT JOIN ".DB_PREFIXE."om_collectivite 
        ON om_lettretype.om_collectivite=om_collectivite.om_collectivite 
    LEFT JOIN ".DB_PREFIXE."om_requete 
        ON om_lettretype.om_sql=om_requete.om_requete ";
// SELECT 
$champAffiche = array(
    'om_lettretype.om_lettretype as "'._("om_lettretype").'"',
    'om_lettretype.id as "'._("id").'"',
    'om_lettretype.libelle as "'._("libelle").'"',
    "case om_lettretype.actif when 't' then 'Oui' else 'Non' end as \""._("actif")."\"",
    'om_lettretype.orientation as "'._("orientation").'"',
    'om_lettretype.format as "'._("format").'"',
    'om_lettretype.logo as "'._("logo").'"',
    'om_lettretype.logoleft as "'._("logoleft").'"',
    'om_lettretype.logotop as "'._("logotop").'"',
    'om_lettretype.titreleft as "'._("titreleft").'"',
    'om_lettretype.titretop as "'._("titretop").'"',
    'om_lettretype.titrelargeur as "'._("titrelargeur").'"',
    'om_lettretype.titrehauteur as "'._("titrehauteur").'"',
    'om_lettretype.titrefont as "'._("titrefont").'"',
    'om_lettretype.titreattribut as "'._("titreattribut").'"',
    'om_lettretype.titretaille as "'._("titretaille").'"',
    'om_lettretype.titrebordure as "'._("titrebordure").'"',
    'om_lettretype.titrealign as "'._("titrealign").'"',
    'om_lettretype.corpsleft as "'._("corpsleft").'"',
    'om_lettretype.corpstop as "'._("corpstop").'"',
    'om_lettretype.corpslargeur as "'._("corpslargeur").'"',
    'om_lettretype.corpshauteur as "'._("corpshauteur").'"',
    'om_lettretype.corpsfont as "'._("corpsfont").'"',
    'om_lettretype.corpsattribut as "'._("corpsattribut").'"',
    'om_lettretype.corpstaille as "'._("corpstaille").'"',
    'om_lettretype.corpsbordure as "'._("corpsbordure").'"',
    'om_lettretype.corpsalign as "'._("corpsalign").'"',
    'om_requete.libelle as "'._("om_sql").'"',
    );
//
if ($_SESSION['niveau'] == '2') {
    array_push($champAffiche, "om_collectivite.libelle as \""._("collectivite")."\"");
}
//
$champNonAffiche = array(
    'om_lettretype.om_collectivite as "'._("om_collectivite").'"',
    'om_lettretype.titre as "'._("titre").'"',
    'om_lettretype.corps as "'._("corps").'"',
    );
//
$champRecherche = array(
    'om_lettretype.om_lettretype as "'._("om_lettretype").'"',
    'om_lettretype.id as "'._("id").'"',
    'om_lettretype.libelle as "'._("libelle").'"',
    'om_lettretype.orientation as "'._("orientation").'"',
    'om_lettretype.format as "'._("format").'"',
    'om_lettretype.logo as "'._("logo").'"',
    'om_lettretype.logoleft as "'._("logoleft").'"',
    'om_lettretype.logotop as "'._("logotop").'"',
    'om_lettretype.titreleft as "'._("titreleft").'"',
    'om_lettretype.titretop as "'._("titretop").'"',
    'om_lettretype.titrelargeur as "'._("titrelargeur").'"',
    'om_lettretype.titrehauteur as "'._("titrehauteur").'"',
    'om_lettretype.titrefont as "'._("titrefont").'"',
    'om_lettretype.titreattribut as "'._("titreattribut").'"',
    'om_lettretype.titretaille as "'._("titretaille").'"',
    'om_lettretype.titrebordure as "'._("titrebordure").'"',
    'om_lettretype.titrealign as "'._("titrealign").'"',
    'om_lettretype.corpsleft as "'._("corpsleft").'"',
    'om_lettretype.corpstop as "'._("corpstop").'"',
    'om_lettretype.corpslargeur as "'._("corpslargeur").'"',
    'om_lettretype.corpshauteur as "'._("corpshauteur").'"',
    'om_lettretype.corpsfont as "'._("corpsfont").'"',
    'om_lettretype.corpsattribut as "'._("corpsattribut").'"',
    'om_lettretype.corpstaille as "'._("corpstaille").'"',
    'om_lettretype.corpsbordure as "'._("corpsbordure").'"',
    'om_lettretype.corpsalign as "'._("corpsalign").'"',
    'om_requete.libelle as "'._("om_sql").'"',
    );
//
if ($_SESSION['niveau'] == '2') {
    array_push($champRecherche, "om_collectivite.libelle as \""._("collectivite")."\"");
}
$tri="ORDER BY om_lettretype.libelle ASC NULLS LAST";
$edition="om_lettretype";
if ($_SESSION['niveau']== '2')
    $selection='';
else {
    $selection=" where om_lettretype.om_collectivite = '".$_SESSION['collectivite']."'";
}
if ($retourformulaire== 'om_collectivite') {
    if ($_SESSION['niveau']== '2'){
        $selection=" WHERE (om_lettretype.om_collectivite ='".$idx."')";
    }else{
        $selection=" WHERE (om_lettretype.om_collectivite ='".$idx."') AND om_lettretype.om_collectivite = '".$_SESSION['collectivite']."'";
    }
}
if ($retourformulaire== 'om_requete') {
    if ($_SESSION['niveau']== '2'){
        $selection=" WHERE (om_lettretype.om_sql ='".$idx."')";
    }else{
        $selection=" WHERE (om_lettretype.om_sql ='".$idx."') AND om_lettretype.om_collectivite = '".$_SESSION['collectivite']."'";
    }
}
?>