Beispiel #1
0
function menu_rubrique($niveau, $module)
{
    global $db;
    $ref_niveau = array(0 => 'pas d\'accès', 1 => 'lecteur', 64 => 'participant', 128 => 'évaluateur', 255 => 'administrateur');
    echo "<div lang=\"fr\" id=\"rubriques\"><center><ul>";
    $query = "SELECT * FROM applications.rubrique WHERE id_module='" . $module . "' ORDER BY pos;";
    $result = pg_query($db, $query) or fatal_error("Erreur pgSQL : " . pg_result_error($result), false);
    while ($row = pg_fetch_array($result, NULL, PGSQL_ASSOC)) {
        if ($niveau >= $row["niveau"]) {
            aff_pres($module, "header", FR, false);
            echo "<li><div class=\"icon\"><a href=\"" . $row['link'] . "\"><img src=\"../../_GRAPH/" . ICONES_SET . "/" . $row['icone'] . "\" align=left width=\"48\" height=\"48\" border=\"0\" /></a></div>";
            echo "<a href=\"" . $row["link"] . "\"><strong>" . $row["titre"] . "</strong>" . $row["descr"] . "</a></li>";
            echo "Droits d'accès à cette rubrique : <b> {$ref_niveau[$niveau]} </b>";
            aff_pres($module, "footer", FR, false);
        }
    }
    echo "</ul></div>";
    pg_free_result($result);
}
Beispiel #2
0
 $query = $query_list;
 $result = pg_query($db, $query) or fatal_error("Erreur pgSQL : " . pg_result_error($result), false);
 while ($row = pg_fetch_array($result, NULL, PGSQL_ASSOC)) {
     echo "<div lang=\"fr\" id=\"rubriques\"><center><ul>";
     $droit_rubrique = acces($row["id_module"], 'd1', 'index', $_SESSION["droit_user"][$row["id_module"]]);
     if ($_SESSION['EVAL_FLORE'] == "ok" and $droit_rubrique) {
         aff_pres($row["id_module"], "header", FR, false);
         echo "<li><div class=\"icon\"><a href=\"" . $row['link'] . "\"><img src=\"../../_GRAPH/" . ICONES_SET . "/" . $row['icone'] . "\" align=left width=\"48\" height=\"48\" border=\"0\" /></a></div>";
         echo "<a href=\"" . $row["link"] . "\"><strong>" . $row["titre"] . "</strong>" . $row["descr"] . "</a></li>";
         echo "Droits d'accès à cette rubrique : <b> " . implode($_SESSION["droit_user"][$row["id_module"]], ',') . " </b>";
         aff_pres($row["id_module"], "footer", FR, false);
     }
     echo "</ul></div>";
 }
 /*Affichage du footer*/
 aff_pres("home", "home_footer", FR, false);
 echo "</div>";
 // post
 echo "</div>";
 // narrowcolumn
 /*Affichage de la partie pour se logguer*/
 echo "<div id=\"sidebar\">";
 echo "<br><br>";
 if ($_SESSION['EVAL_FLORE'] != "ok") {
     echo "<form method=\"POST\" id=\"form1\" name=\"loginform\" action=\"index.php\" >";
     echo "<center><input type=\"hidden\" name=\"action\" value=\"valid\" />";
     echo $lang['fr']['Utilisateur'] . "<br><input type=\"text\" name=\"user_login\" id=\"login\" size=\"20\" maxlength=\"100\" class=\"required\" /><br><br>";
     echo $lang['fr']['pass'] . "<input type=\"password\" name=\"user_pw\" id=\"pw\" size=\"20\" maxlength=\"100\" class=\"required\" /><br><br>";
     echo "<button id=\"valider_fr\">Login</button></center>";
     echo "</form>";
     echo "<center><br>Contacts :<br>";