Пример #1
0
function testGenRulesDie($lib)
{
    global $trad;
    testIpDie();
    if (!testGenRules($lib)) {
        require $_SERVER["DOCUMENT_ROOT"] . __racineadmin__ . "/include/template_haut.php";
        ?>
    <div id="error">
      <?php 
        echo $trad["Vous n'avez pas les droits pour effectuer cette action"];
        ?>
 
    </div> 
    <?php 
        require $_SERVER["DOCUMENT_ROOT"] . __racineadmin__ . "/include/template_bas.php";
        die;
    }
}
Пример #2
0
<?php

if (testGenRules("USR")) {
    $tabmenu2[] = array($trad["Utilisateur"], __racineadminmenucore__ . "/utilisateur/index.php");
    $tabmenu2[] = array($trad["Groupe"], __racineadminmenucore__ . "/utilisateur/groupe.php");
}
if (testGenRules("GAB")) {
    $tabmenu2[] = array($trad["Gabarit"], __racineadminmenucore__ . "/gabarit/index.php");
}
if (testGenRules("TRAD")) {
    $tabmenu2[] = array($trad["Traduction"], __racineadminmenucore__ . "/langue/index.php");
}
if (testGenRules("LAN")) {
    $tabmenu2[] = array($trad["Langue"], __racineadminmenucore__ . "/langue/langue.php");
}
if (testGenRules("EMPT")) {
    $tabmenu2[] = array($trad["Suppression des logs"], __racineadminmenucore__ . "/log/index.php");
}
Пример #3
0
function lockNode($node_id)
{
    //on regarde si on est au premier niveau
    $sql = "select * from " . __racinebd__ . "arbre where arbre_id=" . $node_id;
    $link = query($sql);
    $tbl_result = fetch($link);
    $droit = true;
    if ($tbl_result["pere"] == "") {
        $droit = testGenRules("RULR");
    }
    $droit = $droit || testdroitarbre($node_id, "VER");
    if ($droit) {
        $requete_child2 = "select users_id_verrou from " . __racinebd__ . "arbre where arbre_id = " . $node_id;
        $link_child2 = query($requete_child2);
        while ($ligne2 = fetch($link_child2)) {
            $result = $ligne2['users_id_verrou'];
        }
        if ($result == 0) {
            $requete_update = "update " . __racinebd__ . "arbre set users_id_verrou = " . $_SESSION["users_id"] . " where arbre_id = " . $node_id;
        } else {
            $requete_update = "update " . __racinebd__ . "arbre set users_id_verrou = NULL where arbre_id = " . $node_id;
        }
        $link_update = query($requete_update);
    }
    return $droit;
}
Пример #4
0
<?php

require "../../require/function.php";
//vérification des droits
$droit = true;
if ($_GET["pere"] == "") {
    $droit = testGenRules("RULR");
}
$droit = $droit || testdroitarbre($_GET["arbre_id"], "PUB");
if ($droit) {
    require "../../include/template_haut.php";
    if ($_POST["mode"] == "save") {
        $sql = "update " . __racinebd__ . "arbre set datepublication='" . datetimebdd($_POST["datepublication"]) . "' where arbre_id=" . $_GET["arbre_id"];
        $link = query($sql);
        ?>
    <center><?php 
        echo $trad["L'élément a &eacute;t&eacute; modifi&eacute;"];
        ?>
</center>
  <?php 
    } else {
        $sql = "select * from " . __racinebd__ . "arbre where arbre_id=" . $_GET["arbre_id"];
        $link = query($sql);
        $tbl = fetch($link);
        ?>
  <form  target="framecontent" action="<?php 
        echo $_SERVER["PHP_SELF"];
        ?>
?arbre_id=<?php 
        echo $_GET["arbre_id"];
        ?>
Пример #5
0
  }else if(branch.getParent()&&branch.getParent().struct.id=='pb'){
  <?php 
if (testGenRules("REST")) {
    ?>
    myMenuItems[myMenuItems.length] = {
        name: '<?php 
    echo $trad["Restaurer"];
    ?>
',
        callback: function() {
          branch.restore();
        }
      };
  <?php 
}
if (testGenRules("FDEL")) {
    ?>
    myMenuItems[myMenuItems.length] = {
        name: '<?php 
    echo $trad["Suppression définitive"];
    ?>
',
        callback: function() {
          branch.finishDelete();
        }
      };
  <?php 
}
?>
  
    myMenuItems[myMenuItems.length] = {
Пример #6
0
<?php

/*
if(testGenRules("TAG")){
  $tabmenu[]=array("Tags",array("Primaire"=>__racineadminmenu__."/tag/tag1.php","Secondaire"=>__racineadminmenu__."/tag/tag2.php"));
}
*/
if (testGenRules("USR")) {
    //$tabmenu[]=array("Configuration",array("Commerciaux"=>__racineadminmenu__."/compte/commercial.php","Type de boitier"=>__racineadminmenu__."/compte/boitier.php"));
    $tabmenu[] = array("Configuration", array("Commerciaux" => __racineadminmenu__ . "/compte/commercial.php"));
    $tabmenu[] = array("Compte", __racineadminmenu__ . "/compte/index.php");
    //$tabmenu[]=array("Boitiers",__racineadminmenu__."/compte/device.php");
    //Voir plus tard
    $tabmenu[] = array("Nouveautés", __racineadminmenu__ . "/compte/news.php");
    $tabmenu[] = array("Stats", __racineadminmenu__ . "/compte/stat.php");
    /*
    $tabmenu[]=array("Stats",__racineadminmenu__."/compte/stats.php");
    $tabmenu[]=array("Imports",array("Véhicules"=>__racineadminmenu__."/compte/importvehicule.php","Dallas"=>__racineadminmenu__."/compte/importdallas.php"));
    */
}
Пример #7
0
$droit = true;
if ($dropID == "_2") {
    //si c'est une suppression
    $droit = testdroitarbre($dragID, "DEL");
} else {
    //on verifie si on a le droit d'utiliser le contenu de départ
    $droitdepart = testdroitarbre($dragID, "ADD") || testdroitarbre($dragID, "UPD");
    if ($hitMode == "after" || $hitMode == "before") {
        $sql = "select pere,ordre from " . __racinebd__ . "arbre where arbre_id=" . $dragID;
        $link = query($sql);
        $ligne = fetch($link);
        $pere = $ligne["pere"];
        $droitarrive = testdroitarbre($pere, "ADD") || testdroitarbre($pere, "UPD");
    } else {
        if ($dropID == "root1") {
            $droitarrive = testGenRules("RULR");
        } else {
            $droitarrive = testdroitarbre($dropID, "ADD");
        }
    }
    $droit = $droit && ($droitdepart && $droitarrive);
}
//print $droit;
//die;
if (!$droit) {
    echo '{';
    echo '"ok" : false,';
    echo '"msg" : "' . $trad["Vous n\\'avez pas les droits pour effectuer cette action"] . '"';
    echo '}';
    die;
}