示例#1
0
<?php

if (!verifdroit("VEH")) {
    die;
}
if ($_GET["mode"] == "delete") {
    $sql = "update " . __racinebd__ . "device set supprimer=1 where device_id=" . $_GET["id"];
    query($sql);
    $msgsave = "Suppression effectuée";
}
//print_r($_POST);
//sauvegarde de modification
if ($_POST["id"] != "" && $_POST["mode"] == "modif") {
    $sql = "update " . __racinebd__ . "device set agence_compte_id='" . $_POST["agence_compte_id"] . "',\r\n  type_compte_id='" . $_POST["type_compte_id"] . "',consommation='" . addquote($_POST["consommation"]) . "',nomvehicule='" . addquote($_POST["nomvehicule"]) . "'\r\n  ,immatriculation='" . addquote($_POST["immatriculation"]) . "',chassis='" . addquote($_POST["chassis"]) . "',marque='" . addquote($_POST["marque"]) . "'\r\n  ,modele='" . addquote($_POST["modele"]) . "',kminit='" . addquote($_POST["kminit"]) . "',correctifkm='" . addquote($_POST["correctifkm"]) . "'\r\n  ,correctifh='" . addquote($_POST["correctifh"]) . "',type_moteur_id='" . $_POST["type_moteur_id"] . "',consommationtype='" . $_POST["consommationtype"] . "',tel='" . $_POST["tel"] . "' where device_id=" . $_POST["pdevice_id"];
    //print $sql."<br>";
    query($sql);
    //sauvegarde des categories
    $sql = "delete from " . __racinebd__ . "categorie_compte_device where device_id=" . $_POST["id"];
    query($sql);
    for ($i = 0; $i < count($_POST["categorie"]); $i++) {
        $sql = "insert into " . __racinebd__ . "categorie_compte_device (device_id,categorie_compte_id) values(" . $_POST["id"] . "," . $_POST["categorie"][$i] . ")";
        query($sql);
    }
    $msgsave = "Sauvegarde effectuée";
}
$sql = "select * from " . __racinebd__ . "categorie_compte where compte_id=" . $_SESSION["compte_id"] . " and supprimer=0 order by libelle";
$link = query($sql);
while ($tbl = fetch($link)) {
    $tbl_list_categorie[] = $tbl;
}
/*
示例#2
0
文件: parametre.php 项目: jcmwc/fleet
<?php

if (!verifdroit("AGE")) {
    die;
}
$msgsave = "";
if ($_POST["mode"] == "ajout") {
    //vérification des droit du compte
    $sql = "insert into " . __racinebd__ . "agence_compte (libelle,principal,compte_id) values('" . addquote($_POST["libelle"]) . "','" . $_POST["principal"] . "'," . $_SESSION["compte_id"] . ")";
    //print $sql."<br>";
    $link = query($sql);
    $msgsave = "ajout";
}
if ($_POST["id"] != "" && $_POST["mode"] == "modif") {
    //vérification des droit du compte
    $sql = "update " . __racinebd__ . "agence_compte set libelle ='" . addquote($_POST["libelle"]) . "' , principal='" . $_POST["principal"] . "' where agence_compte_id=" . $_POST["id"] . " and compte_id=" . $_SESSION["compte_id"];
    //print $sql."<br>";
    $link = query($sql);
    $msgsave = "modif";
}
$sql = "select * from " . __racinebd__ . "agence_compte where compte_id=" . $_SESSION["compte_id"] . " and supprimer=0 order by libelle";
$link = query($sql);
while ($tbl = fetch($link)) {
    $tbl_list_agence[] = $tbl;
    //  $key_list_agence[$tbl["agence_compte_id"]]=$tbl["libelle"];
}
if ($_POST["id"] != "" && $_POST["mode"] == "") {
    $sql = "select * from " . __racinebd__ . "agence_compte where compte_id=" . $_SESSION["compte_id"] . " and agence_compte_id=" . $_POST["id"] . " order by libelle";
    $link = query($sql);
    $tbl_modif_agence = fetch($link);
}
示例#3
0
<?php

if (!verifdroit("ENT")) {
    die;
}
$msgsave = "";
if ($_POST["mode"] == "delete") {
    //vérification des droit du compte
    $sql = "update " . __racinebd__ . "entretien_compte set supprimer=1 where entretien_compte_id=" . $_POST["id"] . " and compte_id=" . $_SESSION["compte_id"];
    query($sql);
    //print $sql."<br>";
    $msgsave = "Suppression effectuée";
}
if ($_POST["mode"] == "ajout") {
    //vérification des droit du compte
    $sql = "insert into " . __racinebd__ . "entretien_compte (libelle,icon,compte_id) values('" . addquote($_POST["libelle"]) . "','" . addquote($_POST["icon"]) . "'," . $_SESSION["compte_id"] . ")";
    //print $sql."<br>";
    $link = query($sql);
    $msgsave = "Sauvegarde effectuée";
}
if ($_POST["id"] != "" && $_POST["mode"] == "modif") {
    //vérification des droit du compte
    $sql = "update " . __racinebd__ . "entretien_compte set libelle ='" . addquote($_POST["libelle"]) . "',icon='" . addquote($_POST["icon"]) . "' where entretien_compte_id=" . $_POST["id"] . " and compte_id=" . $_SESSION["compte_id"];
    //print $sql."<br>";
    $link = query($sql);
    $msgsave = "Sauvegarde effectuée";
}
$sql = "select * from " . __racinebd__ . "entretien_compte where compte_id=" . $_SESSION["compte_id"] . " and supprimer=0 order by libelle";
$link = query($sql);
while ($tbl = fetch($link)) {
    $tbl_list_type[] = $tbl;
示例#4
0
        echo __racineweb__;
        ?>
/tpl/img/plus_ico.png" alt="See more">
          </div>
        </ul>
        <?php 
    }
    ?>
        <?php 
}
?>
        <?php 
if (testoption("ENTR")) {
    ?>
        <?php 
    if (verifdroit("ENT")) {
        ?>
        <ul>
          <li class="font-bold"><a href="#" class='<?php 
        if ($_GET["mainmenu"] == 3) {
            ?>
active_menu02<?php 
        }
        ?>
 see_more_param2'>Entretien</a></li>
          <div class="relative_info_bloc ss_img_bloc">
            <div class="ss_menu ">
              <li><a href="<?php 
        echo urlp($_GET["arbre"]);
        ?>
?template=tyentretien" <?php 
示例#5
0
<?php

if (!verifdroit("LIEU")) {
    die;
}
$msgsave = "";
if ($_POST["mode"] == "suppr") {
    //vérification des droit du compte
    $sql = "update " . __racinebd__ . "type_lieu_compte set supprimer=1 where type_lieu_compte_id=" . $_POST["id"] . " and compte_id=" . $_SESSION["compte_id"];
    //print $sql."<br>";
    $link = query($sql);
    $msgsave = "Suppression effectuée";
}
if ($_POST["mode"] == "ajout") {
    //vérification des droit du compte
    $sql = "insert into " . __racinebd__ . "type_lieu_compte (libelle,compte_id) values('" . addquote($_POST["libelle"]) . "'," . $_SESSION["compte_id"] . ")";
    //print $sql."<br>";
    $link = query($sql);
    $msgsave = "ajout effectué";
}
if ($_POST["id"] != "" && $_POST["mode"] == "modif") {
    //vérification des droit du compte
    $sql = "update " . __racinebd__ . "type_lieu_compte set libelle ='" . addquote($_POST["libelle"]) . "' where type_lieu_compte_id=" . $_POST["id"] . " and compte_id=" . $_SESSION["compte_id"];
    //print $sql."<br>";
    $link = query($sql);
    $msgsave = "Modification effectuée";
}
//$sql="select * from ".__racinebd__."type_lieu_compte where compte_id=".$_SESSION["compte_id"]." and supprimer=0 order by libelle";
$sql = "select tlc.*,count(lc.type_lieu_compte_id) as nb from " . __racinebd__ . "type_lieu_compte tlc left join " . __racinebd__ . "lieu_compte lc on tlc.type_lieu_compte_id=lc.type_lieu_compte_id and lc.supprimer=0 where tlc.supprimer=0 and compte_id=" . $_SESSION["compte_id"] . " group by tlc.type_lieu_compte_id order by libelle";
//print $sql;
$link = query($sql);
示例#6
0
文件: function.php 项目: jcmwc/fleet
function showexport($template, $menu, $champs)
{
    if (testoption("ECSV")) {
        if (verifdroit("EXP")) {
            ?>
    <a href="<?php 
            echo __racineweb__;
            ?>
/tpl/script/export.php?template=<?php 
            echo $template;
            ?>
&args=<?php 
            echo implodeargskey($_POST);
            ?>
&menu=<?php 
            echo implodeargs($menu);
            ?>
&champs=<?php 
            echo implodeargs($champs);
            ?>
"><img src="<?php 
            echo __racineweb__;
            ?>
/tpl/img/telecharger_ico.png"></a>
  <?php 
        }
    }
}