Beispiel #1
0
<?php

$_POST["heure_debut"] = $_POST["heure_debut"] == "" ? "00:00" : $_POST["heure_debut"];
$_POST["heure_fin"] = $_POST["heure_fin"] == "" ? "23:59" : $_POST["heure_fin"];
$_POST["date_debut"] = $_POST["date_debut"] == "" ? date("d/m/Y", mktime(0, 0, 0, date("n"), date("j") - 1, date("Y"))) : $_POST["date_debut"];
$_POST["date_fin"] = $_POST["date_fin"] == "" ? date("d/m/Y") : $_POST["date_fin"];
$where = "";
if ($_POST["date_debut"] != "") {
    //$where.=" and addtime(min_time_stamp,'".__decalageheure__.":0:0')>='".datetimebdd($_POST["date_debut"]." ".$_POST["heure_debut"])."'";
    $where .= " and p.time>='" . datetimebdd($_POST["date_debut"] . " " . $_POST["heure_debut"]) . "'";
}
if ($_POST["date_fin"] != "") {
    $where .= " and p.time<='" . datetimebdd($_POST["date_fin"] . " " . $_POST["heure_fin"]) . "'";
}
$sql = "select * from " . __racinebd__ . "type_compte where compte_id=" . $_SESSION["compte_id"] . " and supprimer=0 order by libelle";
$link = query($sql);
while ($tbl = fetch($link)) {
    $tbl_list_type[] = $tbl;
    $key_list_type[$tbl["type_compte_id"]] = $tbl["libelle"];
}
if ($_POST["agence"] != "") {
    $where2 = " and agence_compte_id=" . $_POST["agence"];
}
if ($_POST["date_debut"] != "" || $_POST["date_fin"] != "") {
    $totalalldistance = 0;
    $totalallconso = 0;
    $totalallarret = 0;
    $totalallconduite = 0;
    $sql = getsqllistvehicule() . $where2;
    //$sql=getsqllistvehiculerapport($where).$where2;
    //print $sql;
Beispiel #2
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"];
        ?>
Beispiel #3
0
             }
         }
     }
     if ($_FILES["ext5"]["tmp_name"] != "" && $_POST["ext5_chk"] != 1) {
         $myext5 = savefile("ext5", $table . "5_");
     } else {
         if ($_POST["ext5"] != "" && $_POST["ext5_chk"] != 1) {
             $myext5 = ",ext5='" . $_POST["ext5"] . "'";
         } else {
             if ($_POST["ext5_chk"] == 1) {
                 $myext5 = ",ext5=null";
             }
         }
     }
     //si pas de changement d'etat
     $szQuery = "update {$table} set \r\n    \t\t\t\t\ttitre1='" . addquote($_POST["titre1"]) . "',\r\n    \t\t\t\t\ttitre2='" . addquote($_POST["titre2"]) . "',\r\n    \t\t\t\t\ttitre3='" . addquote($_POST["titre3"]) . "',\r\n    \t\t\t\t\ttitre4='" . addquote($_POST["titre4"]) . "',\r\n    \t\t\t\t\ttitre5='" . addquote($_POST["titre5"]) . "',\r\n    \t\t\t\t\tabstract='" . addquote($_POST["abstract"]) . "',\r\n              abstract2='" . addquote($_POST["abstract2"]) . "',\r\n    \t\t\t\t\tabstract3='" . addquote($_POST["abstract3"]) . "',\r\n    \t\t\t\t\tabstract4='" . addquote($_POST["abstract4"]) . "',\r\n    \t\t\t\t\tabstract5='" . addquote($_POST["abstract5"]) . "',\r\n    \t\t\t\t\tcontenu='" . addquote($_POST["contenu"]) . "',\r\n    \t\t\t\t\tdate_actu='" . datetimebdd($_POST["date_actu"]) . "',\r\n    \t\t\t\t\tdate_fin='" . datetimebdd($_POST["date_fin"]) . "',\r\n    \t\t\t\t\tnote='" . $_POST["note"] . "',\r\n    \t\t\t\t\tversion_id='" . $_POST["version_id"] . "',\r\n    \t\t\t\t\ttwitter='" . $_POST["twitter"] . "',\r\n    \t\t\t\t\ttva_id='" . $_POST["tva_id"] . "',\r\n    \t\t\t\t\tfournisseur_id='" . $_POST["fournisseur_id"] . "',\r\n              note1='" . $_POST["note1"] . "',\r\n              note2='" . $_POST["note2"] . "',\r\n              note3='" . $_POST["note3"] . "',\r\n              note4='" . $_POST["note4"] . "',\r\n              archive='" . $_POST["archive"] . "',\r\n              envoye='" . $_POST["envoye"] . "',\r\n              titleseo='" . addquote($_POST["titleseo"]) . "',\r\n              abstractseo='" . addquote($_POST["abstractseo"]) . "',\r\n              robotseo='" . addquote($_POST["robotseo"]) . "'\r\n    \t\t\t\t\t{$myext}\r\n    \t\t\t\t\t{$myext2}\r\n    \t\t\t\t\t{$myext3}\r\n    \t\t\t\t\t{$myext4}\r\n              {$myext5}\r\n              where content_id=" . $content_id;
     majfichier($content_id);
     majval($content_id);
     updateContent($content_id, $_GET["arbre_id"], $_GET["langue_id"]);
     createdefault("ext", $table, $content_id);
     createdefault("ext2", $table . "2_", $content_id);
     createdefault("ext3", $table . "3_", $content_id);
     createdefault("ext4", $table . "4_", $content_id);
     createdefault("ext5", $table . "5_", $content_id);
 }
 if ($_POST["version_id"] == 1) {
     $sql = "update " . __racinebd__ . "contenu set translate=1 where contenu_id=" . $contenu_id;
     query($sql);
 }
 $sql = "delete from " . __racinebd__ . "tag_content where content_id=" . $content_id;
 query($sql);
Beispiel #4
0
        $delete = true;
        $search = false;
        $notview = true;
        require "../../include/template_list.php";
    } else {
        if ($_POST["save"] == "yes") {
            switch ($_GET["mode"]) {
                case "suppr":
                    $txtmsg = "La nouveauté a &eacute;t&eacute; supprim&eacute;";
                    $szQuery = "update {$table} set supprimer=1 where " . $tablekey . "='" . $_GET["id"] . "'";
                    break;
                case "ajout":
                    $txtmsg = "La nouveauté a &eacute;t&eacute; ajout&eacute;";
                    $szQuery = "insert into {$table} (texte,date_creation)\r\n          values ('" . addquote($_POST["texte"]) . "','" . datetimebdd($_POST["date_creation"]) . "')";
                    break;
                case "modif":
                    $txtmsg = "La nouveauté a &eacute;t&eacute; modifi&eacute;";
                    $szQuery = "update {$table} set \r\n\t\t\t\t\ttexte='" . addquote($_POST["texte"]) . "',\r\n\t\t\t\t\tdate_creation='" . datetimebdd($_POST["date_creation"]) . "'\r\n          where {$tablekey}=" . $_GET["id"];
                    break;
            }
            require "../../include/template_save.php";
        } else {
            $szQuery = "SELECT * FROM {$table} where {$tablekey}=" . $_GET["id"];
            //libelle=>nom du champ|type|obligatoire|taille (facultatif)
            //les type sont les suivant
            // txt area html media date file email list(nom var requete) listmutiple(nom var requete)
            $tabcolonne = array("Texte" => "texte|area|yes", "Date" => "date_creation|date2|yes");
            require "../../include/template_detail.php";
        }
    }
}