コード例 #1
0
ファイル: commun.inc.php プロジェクト: fedecbn/codex
$base_file = substr(basename(__FILE__), 0, -4);
$droit_page = acces($id_page, 'd1', $base_file, $_SESSION["droit_user"][$id_page]);
if ($droit_page) {
    //------------------------------------------------------------------------------ CONSTANTES du module
    $ouinon_txt = array("Non", "Oui");
    $id_rub = "liste_rouge";
    $niveau = $_SESSION['niveau'];
    $table = "news";
    $aColumns = array('id', 'libelle_subject', 'title', 'abstract', 'libelle_tag', 'link', 'link_2', 'date');
    $sIndexColumn = 'id';
    $bool_txt = array("" => "", "f" => "", "t" => "<b>Oui</b>");
    $niveau = $_SESSION['niveau_lsi'];
    $id_user = $_SESSION['id_user'];
    $config = $_SESSION['id_config'];
    $lang_select = $_COOKIE['lang_select'];
    $onglet = ref_onglet($id_page);
    //------------------------------------------------------------------------------ QUERY du module
    $query_liste = "\nSELECT count(*) OVER() AS total_count,news.id,news.id_subject,title,abstract,string_agg(libelle_tag,' / ') as libelle_tag,link,link_2,date\nFROM lsi.news \nLEFT JOIN lsi.coor_news_tag ON news.id=coor_news_tag.id\nLEFT JOIN lsi.tag ON coor_news_tag.id_tag=tag.id_tag  \nLEFT JOIN lsi.subject ON news.id_subject=subject.id_subject \nWHERE 1=1 ";
    $group_by = "GROUP BY news.id,news.id_subject,title,abstract,link,link_2,date ";
    $query_export = "SELECT  n.id,libelle_subject,title,abstract,libelle_tag,link,date\n\t\t\t\tFROM lsi.news AS n \n\t\t\t\tLEFT JOIN lsi.coor_news_tag nt ON n.id=nt.id\n\t\t\t\tLEFT JOIN lsi.tag t ON nt.id_tag=t.id_tag  \n\t\t\t\tLEFT JOIN lsi.subject s ON n.id_subject=s.id_subject";
    $id_export = "n.id";
    $query_user = "******" . $id_page . ", utilisateur.ref_" . $id_page . "\n\tFROM applications.utilisateur\n\tWHERE utilisateur.niveau_" . $id_page . " <> 0";
    //------------------------------------------------------------------------------ VOCABULAIRE du module
    $lang['fr']['groupe_lsi_1'] = "Ajout de news";
    $lang['it']['groupe_lsi_1'] = "";
    $lang['fr']['lsi'] = "News";
    $lang['it']['lsi'] = "";
    $lang['fr']['liste_lsi'] = "Les news";
    $lang['it']['liste_lsi'] = "";
    $lang['fr']['add_lsi'] = "Ajouter une news";
    $lang['it']['add_lsi'] = "";
コード例 #2
0
ファイル: commun.inc.php プロジェクト: fedecbn/codex
/*------------------------------------------------------------------------------ INITIALISATION*/
require_once "../commun/commun.inc.php";
require_once "desc.inc.php";
/*D1 : Droit accès à la page*/
$base_file = substr(basename(__FILE__), 0, -4);
$droit_page = acces($id_page, 'd1', $base_file, $_SESSION["droit_user"][$id_page]);
if ($droit_page) {
    //------------------------------------------------------------------------------ CONSTANTES du module
    $id_rub = "lr";
    $rub[$id_rub] = 'true';
    $title = $lang['fr']['titre_web'] . " - " . $id_page;
    $niveau = $_SESSION['niveau_' . $id_page];
    $id_user = $_SESSION['id_user'];
    $config = $_SESSION['id_config'];
    $lang_select = $_COOKIE['lang_select'];
    $onglet = ref_onglet($id_rub);
    //------------------------------------------------------------------------------ QUERY du module
    $query_module = "\n\tSELECT t.*,c.*,e.* \n\tFROM lr.taxons AS t \n\tLEFT JOIN lr.chorologie AS c ON c.uid=t.uid \n\tLEFT JOIN lr.evaluation AS e ON e.uid=t.uid\n\tJOIN refnat.taxons a ON a.uid = t.uid \n\tWHERE a.{$id_rub} = TRUE AND t.uid=";
    $query_liste[$id_page] = "\n\tSELECT count(*) OVER() AS total_count,\n\tchorologie.*,evaluation.*, validation.*,taxons.*\n\tFROM lr.taxons\n\tLEFT JOIN lr.chorologie ON chorologie.uid=taxons.uid \n\tLEFT JOIN lr.evaluation ON evaluation.uid=taxons.uid  \n\tLEFT OUTER JOIN lr.validation ON validation.uid=taxons.uid  AND evaluation.etape = validation.etape_val AND evaluation.version = validation.version_val AND id_user = '******'\n\tJOIN refnat.taxons a ON a.uid = taxons.uid \n\tWHERE a.{$id_rub} = TRUE ";
    $query_liste["user"] = $query_liste["user"] . "'" . $id_page . "' ";
    $query_export = "\nSELECT *\n\tFROM lr.taxons AS t  \n\tLEFT JOIN lr.chorologie AS c ON c.uid=t.uid \n\tLEFT JOIN lr.evaluation AS e ON e.uid=t.uid\n\tJOIN refnat.taxons a ON a.uid = t.uid \n\tWHERE a.{$id_rub} = TRUE;\n\t";
    $export_id = "t.uid";
    $query_user = "******" . $id_page . ", utilisateur.ref_" . $id_page . "\n\tFROM applications.utilisateur\n\tWHERE utilisateur.niveau_" . $id_page . " <> 0";
    $query_discussion = "\n\tSELECT prenom||' '||nom||' ('||cd_cbn||') le '||to_char(datetime, 'dd/MM/YYYY')||' à '||to_char(datetime, 'HH24')||'h'||to_char(datetime, 'MI'), commentaire_eval \n\tFROM lr.discussion a JOIN referentiels.cbn z ON a.id_cbn = z.id_cbn \n\tWHERE uid = ";
    $rang = array('' => '', 'ES' => 'ES', 'SSES' => 'SSES', 'VAR' => 'VAR', 'SVAR' => 'SVAR', 'FO' => 'FO', 'SSFO' => 'SSFO', 'CAR' => 'CAR');
    $tables = array('taxons', 'chorologie', 'evaluation');
    //------------------------------------------------------------------------------ VOCABULAIRE du module
    $lang['fr'][$id_page] = "Liste rouge";
    $lang['it'][$id_page] = "";
    $lang['fr']['titre_lr'] = "Liste rouge";
    $lang['it']['titre_lr'] = "";