当前位置: 首页>>代码示例>>PHP>>正文


PHP addquote函数代码示例

本文整理汇总了PHP中addquote函数的典型用法代码示例。如果您正苦于以下问题:PHP addquote函数的具体用法?PHP addquote怎么用?PHP addquote使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了addquote函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: searchPhantom

function searchPhantom($query, $without = '', $pj = false, $pere = 0, $limit = 0, $orderby = "gabarit_id,pere", $where = '', $etat_id = 0, $version_id = 0, $langue_id = 0)
{
    $langue_id = $langue_id == 0 && $_GET["la_langue"] == "" ? __defaultlangueid__ : ($langue_id != "" ? $langue_id : $_GET["la_langue"]);
    $pere = $pere === 0 ? "" : "and a.pere in (" . $pere . ")";
    $limit = $limit == 0 ? "" : "limit " . $limit;
    $orderby = "order by " . $orderby;
    $etat_id = $etat_id == 0 ? $_GET["etat_id"] : $etat_id;
    $version_id = $version_id == 0 ? $_GET["version_id"] : $version_id;
    $query = $without != '' ? $query . " -" . $without : $query;
    $wherepj = "";
    if ($pj) {
        $wherepj = "or c1.content_id in(select content_id from " . __racinebd__ . "fichiers where \r\n    MATCH(titre,abstract,contenu) against('" . addquote($query) . "' IN BOOLEAN MODE) and supprimer=0)";
    }
    $from = "" . __racinebd__ . "content c1 inner join " . __racinebd__ . "contenu c on c1.contenu_id=c.contenu_id  \r\n          inner join " . __racinebd__ . "arbre a on c.arbre_id=a.arbre_id and c.langue_id=" . $langue_id . " \r\n          and a.etat_id in(" . $etat_id . ") and c1.version_id in(" . $version_id . ")\r\n          inner join " . __racinebd__ . "gabarit g on g.gabarit_id=a.gabarit_id and g.search=1 where \r\n          (MATCH(titre1,titre2,contenu,abstract) against('" . addquote($query) . "' IN BOOLEAN MODE)\r\n          or c1.content_id in(select content_id from " . __racinebd__ . "tag_search ts inner join " . __racinebd__ . "tag_search_content tsc on ts.tag_search_id=tsc.tag_search_id where \r\n          MATCH(ts.libelle) against('" . addquote($query) . "' IN BOOLEAN MODE))\r\n          or c1.content_id in(select content_id from " . __racinebd__ . "tag t inner join " . __racinebd__ . "tag_content tsc on t.tag_id=tsc.tag_id where \r\n          MATCH(t.libelle) against('" . addquote($query) . "' IN BOOLEAN MODE))\r\n          {$wherepj}\r\n          ) and a.supprimer=0";
    $sql = "select c1.*,c.arbre_id,a.pere,a.gabarit_id,g.libelle from " . $from . " " . $pere . " " . $where . " " . $orderby . " " . $limit;
    //print $sql;
    $link = query($sql);
    $tbl_result_final = array();
    while ($tbl_result = fetch($link)) {
        $tbl_result_final[] = $tbl_result;
    }
    return $limit == "limit 1" ? $tbl_result_final[0] : $tbl_result_final;
}
开发者ID:jcmwc,项目名称:fleet,代码行数:23,代码来源:function_search.php

示例2: addquote

<?php

require "../../admin/require/function.php";
require "../../conf_front.php";
if ($_POST["mdp"] != "" && $_POST["ident"] != "") {
    //$sql="select * from users where username='".addquote($_POST["ident"])."' and active=1 and user_template_id is null";
    /*
    $sql="select u.*,c.compte_id,c.raisonsociale from users u 
    inner join ".__racinebd__."compte c on u.original_application_id=c.application_id and  actif=1 and supprimer=0
    where username='".addquote($_POST["ident"])."' and active=1 and user_template_id is null";
    */
    $sql = "select u.*,c.compte_id,c.raisonsociale from " . __racinebd__ . "usergps u\r\n  inner join " . __racinebd__ . "compte c on c.compte_id=u.compte_id\r\n  where c.supprimer=0 and u.supprimer=0\r\n  and username='" . addquote($_POST["ident"]) . "'";
    //print $sql;
    $link = query($sql);
    if (num_rows($link) > 0) {
        $tbl = fetch($link);
        if ($tbl["password"] == md5($_POST["mdp"])) {
            //verification si elle peut se connecter aujourd'hui
            $indicedujour = dayOfWeek(time());
            /*
            $sql="select mc.* from ".__racinebd__."jour_usersgps mc
            inner join ".__racinebd__."usergps u on u.usergps_id=mc.usergps_id and user_id=".$tbl["user_id"]." and jour_id=".$indicedujour;
            */
            $sql = "select * from " . __racinebd__ . "jour_usersgps where usergps_id=" . $tbl["usergps_id"] . " and jour_id=" . $indicedujour;
            //print $sql;
            $link2 = query($sql);
            if (num_rows($link2) == 0) {
                print "nok2";
                die;
            }
            //creation des sessions
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:login.php

示例3: query

    //vérification des droit du compte
    $sql = "update " . __racinebd__ . "categorie_compte set supprimer=1 where categorie_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__ . "categorie_compte (libelle,compte_id) values('" . addquote($_POST["libelle"]) . "'," . $_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__ . "categorie_compte set libelle ='" . addquote($_POST["libelle"]) . "'  where categorie_compte_id=" . $_POST["id"] . " and compte_id=" . $_SESSION["compte_id"];
    //print $sql."<br>";
    $link = query($sql);
    $msgsave = "modif";
}
$sql = "select * from " . __racinebd__ . "categorie_compte where compte_id=" . $_SESSION["compte_id"] . " and supprimer=0 order by libelle";
//$sql="select tlc.*,count(lc.device_id) as nb from ".__racinebd__."categorie_compte tlc left join ".__racinebd__."device lc on tlc.categorie_compte_id=lc.categorie_id and lc.supprimer=0 where tlc.supprimer=0 and lc.compte_id=".$_SESSION["compte_id"]." group by tlc.categorie_compte_id order by libelle";
$link = query($sql);
while ($tbl = fetch($link)) {
    $sql = "select * from " . __racinebd__ . "categorie_compte_device ccd inner join " . __racinebd__ . "device d on d.device_id=ccd.device_id and supprimer=0 and categorie_compte_id=" . $tbl["categorie_compte_id"];
    $link2 = query($sql);
    $tbl["nb"] = num_rows($link2);
    $tbl_list_categorie[] = $tbl;
    //  $key_list_agence[$tbl["categorie_compte_id"]]=$tbl["libelle"];
}
if ($_POST["id"] != "" && $_POST["mode"] == "") {
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:parametre-catveh.php

示例4: switch

     */
     require "../../include/template_list.php";
 } else {
     if ($_POST["save"] == "yes") {
         switch ($_GET["mode"]) {
             case "suppr":
                 $txtmsg = "Le tag a &eacute;t&eacute; supprim&eacute;";
                 $szQuery = "update {$table} set supprimer=1 where " . $tablekey . "='" . $_GET["id"] . "'";
                 break;
             case "ajout":
                 $txtmsg = "Le tag a &eacute;t&eacute; ajout&eacute;";
                 $szQuery = "insert into {$table} (libelle)\r\n          values ('" . addquote($_POST["libelle"]) . "')";
                 break;
             case "modif":
                 $txtmsg = "Le tag a &eacute;t&eacute; modifi&eacute;";
                 $szQuery = "update {$table} set \r\n\t\t\t\t\tlibelle='" . addquote($_POST["libelle"]) . "'\r\n          where {$tablekey}=" . $_GET["id"];
                 //print $szQuery;
                 break;
         }
         require "../../include/template_save.php";
     } else {
         $szQuery = "SELECT * FROM {$table} where {$tablekey}=" . $_GET["id"];
         //$query="select newsletter_etat_id,libelle from newsletter_etat order by libelle";
         //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("Libelle" => "libelle|txt(255)|yes");
         /*
         		$tabcolonne=array(
         		"Login"=>"login|txt(255)|yes",
         		"Password"=>"mdp|txt(255)|yes",
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:tag2.php

示例5: preg_replace

    //deplacement du fichier
    //move_uploaded_file($_FILES[ext]["tmp_name"],$_SERVER["DOCUMENT_ROOT"].__uploaddir__."u".$_SESSION['users_id']."/".$_FILES["ext"]["name"]);
    $filename = preg_replace('/[^a-z0-9_\\-\\.]/i', '_', $_FILES["ext"]["name"]);
    //if(move_uploaded_file($_FILES["ext"]["tmp_name"],$_SERVER["DOCUMENT_ROOT"].__uploaddir__."u".$_SESSION['users_id']."/".$filename)===false){
    //sauvegarde en base
    $ext = getext($_FILES["ext"]["name"]);
    $sql = "insert into " . __racinebd__ . "prix (montant,quantite,ref) value('" . addquote($_POST["prix"]) . "','" . addquote($_POST["quantite"]) . "','" . addquote($_POST["ref"]) . "')";
    $link = query($sql);
    $prix_id = insert_id();
    $querystring = "select * from " . __racinebd__ . "attribut where supprimer=0 order by libelle";
    $link = query($querystring);
    while ($tbl = fetch($link)) {
        //print "attr_".$tbl["attribut_id"]."<br>";
        //print $_POST["attr_".$tbl["attribut_id"]];
        if ($_POST["attr_" . $tbl["attribut_id"]] != "" && $_POST["attr_" . $tbl["attribut_id"]] != -1) {
            $sql = "insert into " . __racinebd__ . "valeur_prix (valeur_id,prix_id,attribut_id) value('" . addquote($_POST["attr_" . $tbl["attribut_id"]]) . "','" . $prix_id . "','" . $tbl["attribut_id"] . "')";
            query($sql);
        }
    }
    ?>
  <script>
  content='<table width="100%" style="border-bottom:1px solid black" id="table_prix_<?php 
    echo $prix_id;
    ?>
">';
  content+='<input type="hidden" name="listprix[]" value="<?php 
    echo $prix_id;
    ?>
"/>';
  content+='<input type="hidden" id="prix_<?php 
    echo $prix_id;
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:insertprice.php

示例6: set_time_limit

<?php

require "../../require/function.php";
require "../../require/back_include.php";
set_time_limit(3600);
if ($_POST["libelle"] != "") {
    $sql = "select max(ordre) as maxordre from " . __racinebd__ . "devisline where supprimer=0 and devis_id=" . $_GET["id"];
    $link = query($sql);
    $tbl = fetch($link);
    $sql = "insert into " . __racinebd__ . "devisline (devis_id,libelle,montant,ordre) \r\n  value('" . addquote($_GET["id"]) . "','" . addquote($_POST["libelle"]) . "','" . str_replace(",", ".", addquote($_POST["montant"])) . "','" . ($tbl["maxordre"] + 1) . "')";
    $link = query($sql);
    $mmontant_id = insert_id();
    ?>
  <script>
  //rafraichissement de la liste
  //alert(top.listidmontantiframelist.location)
  if(top.listidmontantiframelist.contentWindow)
  top.listidmontantiframelist.contentWindow.location.reload(true);
  else
  top.listidmontantiframelist.location.reload(true);
  </script>
  <?php 
}
?>
<html>
<head>
<META http-equiv="Content-Type" Content="text/html; charset=UTF-8">
<script>
function validateForm(obj){
	if(obj.libelle.value==""){
		alert('Veuillez indiquer un libelle');
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:insertfile.php

示例7: set_time_limit

<?php

require "../../require/function.php";
require "../../require/back_include.php";
$_GET["nomobj"] = "listval[]";
set_time_limit(3600);
if ($_POST["save"] == "yes") {
    //creation du repertoire tmp
    //@mkdir ($_SERVER["DOCUMENT_ROOT"].__uploaddir__."u".$_SESSION['users_id'], 0775);
    //deplacement du fichier
    //move_uploaded_file($_FILES[ext]["tmp_name"],$_SERVER["DOCUMENT_ROOT"].__uploaddir__."u".$_SESSION['users_id']."/".$_FILES["ext"]["name"]);
    //$filename2=preg_replace('/[^a-z0-9_\-\.]/i', '_', $_FILES["ext2"]["name"]);
    //if(move_uploaded_file($_FILES["ext"]["tmp_name"],$_SERVER["DOCUMENT_ROOT"].__uploaddir__."u".$_SESSION['users_id']."/".$filename)===false){
    //sauvegarde en base
    $sql = "update " . __racinebd__ . "list_val \r\n  set titre='" . addquote($_POST["titre"]) . "',\r\n  val='" . addquote($_POST["val"]) . "'\r\n  where val_id=" . $_POST["val_id"];
    /*
    ext1,nom_fichier1,titre2,ext2,nom_fichier2,lightbox,contenulightbox) 
    value(,'".$ext1."','".$filename1."','".addquote($_POST["titre_fichier2"])."','".$ext2."','".$filename2."','".$_POST["lightbox"]."','".$_POST["contenu"]."')";
    */
    $link = query($sql);
    //$images_id=insert_id();
    $sql = "select * from " . __racinebd__ . "list_val where val_id=" . $_POST["val_id"];
    $link = query($sql);
    $tbl_info = fetch($link);
    ?>
  <script>
  //parent.
  content='<table width="100%" style="border-bottom:1px solid black" id="table_val_<?php 
    echo $_POST["val_id"];
    ?>
">';
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:modiffile.php

示例8: savefile

             }
         }
     }
     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);
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:article.php

示例9: values

    for ($i = 0; $i < count($_POST["jour"]); $i++) {
        $sql = "insert into " . __racinebd__ . "jour_usersgps (usergps_id,jour_id) values(" . $_POST["id"] . "," . $_POST["jour"][$i] . ")";
        query($sql);
    }
    //sauvegarde des rapports
    $sql = "delete from " . __racinebd__ . "rapport_usersgps where usergps_id=" . $_POST["id"];
    query($sql);
    for ($i = 0; $i < count($_POST["rapport"]); $i++) {
        $sql = "insert into " . __racinebd__ . "rapport_usersgps (usergps_id,rapport_id) values(" . $_POST["id"] . "," . $_POST["rapport"][$i] . ")";
        query($sql);
    }
    $msgsave = "Sauvegarde effectuée";
}
//sauvegarde d'ajout
if ($_POST["id"] == "" && $_POST["mode"] == "ajout") {
    $sql = "insert into " . __racinebd__ . "usergps (tel,name,email,password,username,date_creation,compte_id) \r\n    values('" . addquote($_POST["tel"]) . "','" . addquote($_POST["name"]) . "','" . addquote($_POST["email"]) . "','" . md5($_POST["password"]) . "','" . addquote($_POST["username"]) . "',now(),'" . $_GET["pere"] . "')";
    query($sql);
    $usergpd_id = insert_id();
    //sauvegarde des agences
    for ($i = 0; $i < count($_POST["agence"]); $i++) {
        $sql = "insert into " . __racinebd__ . "agence_compte_usergps (usergps_id,agence_compte_id) values(" . $usergpd_id . "," . $_POST["agence"][$i] . ")";
        query($sql);
    }
    //sauvegarde des vehicules
    for ($i = 0; $i < count($_POST["vehicule"]); $i++) {
        $sql = "insert into " . __racinebd__ . "usergps_device (usergps_id,device_id) values(" . $usergpd_id . "," . $_POST["vehicule"][$i] . ")";
        query($sql);
    }
    //sauvegarde des modules
    for ($i = 0; $i < count($_POST["module"]); $i++) {
        $sql = "insert into " . __racinebd__ . "module_usersgps (usergps_id,module_id) values(" . $usergpd_id . "," . $_POST["module"][$i] . ")";
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:parametre-utilisateurs.php

示例10: values

             $szQuery = "insert into " . __racinebd__ . "device (devices_id,type_device_id,IMEI,serialnumber,vieprivee,modepieton,nomvehicule,telboitier,compte_id,date_creation,unitid) \r\n          values('" . $id . "','" . $_POST["type_device_id"] . "','" . addquote($_POST["IMEI"]) . "','" . addquote($_POST["serialnumber"]) . "','" . addquote($_POST["vieprivee"]) . "','" . addquote($_POST["modepieton"]) . "','" . addquote($_POST["nomvehicule"]) . "','" . addquote($_POST["telboitier"]) . "','" . $_GET["pere"] . "',now(),'" . addquote($_POST["unitid"]) . "')";
             //query($sql);
             //$szQuery="";
             break;
         case "modif":
             $txtmsg = "Le boitiers a &eacute;t&eacute; modifi&eacute;";
             //username='".addquote($_POST["username"])."',
             if ($_POST["type_device_id"] == 1) {
                 //orion on stock le serial
                 $uniqueId = $_POST["unitid"];
             } else {
                 $uniqueId = $_POST["IMEI"];
             }
             $sql = "update devices set uniqueId='" . addquote($uniqueId) . "' where id=" . $_POST["devices_id"];
             query($sql);
             $szQuery = "update {$table} set \r\n\t\t\t\t\tIMEI='" . addquote($_POST["IMEI"]) . "',\r\n\t\t\t\t\tserialnumber='" . addquote($_POST["serialnumber"]) . "',\r\n          unitid='" . addquote($_POST["unitid"]) . "',          \r\n          vieprivee='" . addquote($_POST["vieprivee"]) . "',\r\n          modepieton='" . addquote($_POST["modepieton"]) . "',\r\n          nomvehicule='" . addquote($_POST["nomvehicule"]) . "',\r\n          telboitier='" . addquote($_POST["telboitier"]) . "'                     \r\n          where {$tablekey}=" . $_GET["id"];
             //print $szQuery;
             //modification de la table device
             break;
     }
     require "../../include/template_save.php";
 } else {
     //$szQuery = "SELECT * FROM $table where $tablekey=".$_GET["id"];
     /* 
          $szQuery = "select * from $table t 
                 inner join ".__racinebd__."compte c on c.application_id=t.original_application_id 
                 inner join device d on d.owner_id=t.user_id
                 inner join ".__racinebd__."device pd on pd.owner_id=t.user_id
                 inner join user_template ut on ut.user_template_id=t.user_template_id	 and ut.application_id=c.application_id and template_name='Device'
                 where active=1 and  $tablekey=".$_GET["id"];
     */
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:device.php

示例11: while

                    while ($tbl_result = fetch($link)) {
                        $sql = "insert into " . __racinebd__ . "contenu (arbre_id,langue_id,nom,translate) values (" . $tbl_result["arbre_id"] . "," . $id . ",'" . $tbl_result["nom"] . "',0)";
                        query($sql);
                    }
                    $szQuery = "";
                    break;
                case "modif":
                    if ($_FILES["ext"]["tmp_name"] != "" && $_POST["ext_chk"] != 1) {
                        $myext = savefile("ext", $table);
                        tbl_img($table, $_GET["id"], getext($_FILES["ext"]["name"]), 16, 10);
                    } else {
                        if ($_POST["ext_chk"] == 1) {
                            $myext = ",ext=null ";
                        }
                    }
                    $txtmsg = "La langue a &eacute;t&eacute; modifi&eacute;e";
                    $szQuery = "update {$table} set \r\n\t\t\t\t\tlibelle='" . addquote($_POST["libelle"]) . "',\r\n\t\t\t\t\tshortlib='" . addquote($_POST["shortlib"]) . "',\r\n\t\t\t\t\tactive='" . addquote($_POST["active"]) . "'\r\n\t\t\t\t\t{$myext}\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)
            $querylist = "select langue_id,libelle from " . __racinebd__ . "langue";
            $tabcolonne = array("Langue" => "libelle|txt(255)|yes", "Code" => "shortlib|txt(255)|yes", "Icon" => "ext|file(gif,jpg,png)|yes", "Active" => "active|chk");
            require "../../include/template_detail.php";
        }
    }
}
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:langue.php

示例12: addquote

<?php

require "../../require/function.php";
require "../../require/back_include.php";
$sql = "update " . __racinebd__ . "prix set montant='" . addquote($_POST["montant"]) . "',montantremise='" . addquote($_POST["montantremise"]) . "',quantite='" . addquote($_POST["quantite"]) . "',ref='" . addquote($_POST["ref"]) . "' where prix_id=" . $_POST["indice"];
query($sql);
?>
okmodif
开发者ID:jcmwc,项目名称:fleet,代码行数:8,代码来源:savemodif.php

示例13: switch

        $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";
        }
    }
}
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:news.php

示例14: addquote

     $sql = "select * from " . __racinebd__ . "device where supprimer=0 and unitid='" . addquote($tablelem[4]) . "'";
     //print $sql;
     $link2 = query($sql);
     //if(num_rows($link2)==0&&$tablelem[5]!=""){
     if (num_rows($link2) == 0) {
         $compte_id = $tbl["compte_id"];
         $sql = "select max(id) as maxid from devices";
         $link = query($sql);
         $tbl = fetch($link);
         $sql = "insert into devices (name,uniqueId) \r\n      values('Device" . ($tbl["maxid"] + 1) . "','" . addslashes($tablelem[4]) . "')";
         //print $sql."<br>";
         query($sql);
         $id = insert_id();
         $sql = "INSERT INTO users_devices (users_id, devices_id) VALUES ('1', {$id})";
         //query($sql);
         $szQuery = "insert into " . __racinebd__ . "device (devices_id,type_device_id,IMEI,serialnumber,nomvehicule,telboitier,compte_id,date_creation,unitid,immatriculation) \r\n      values('" . $id . "',1,'" . addslashes($tablelem[4]) . "','" . addslashes($tablelem[4]) . "','" . addslashes($tablelem[2]) . "','+" . addslashes($tablelem[5]) . "','" . $compte_id . "',now(),'" . addquote($tablelem[4]) . "','" . addquote($tablelem[3]) . "')";
         //query($sql);
         //print $szQuery."<br>";
         query($szQuery);
         $device_id = insert_id();
         //device phantom_usergps_device
         $sql = "select * from " . __racinebd__ . "usergps where compte_id=" . $compte_id;
         $link_device = query($sql);
         while ($tbl_device = fetch($link_device)) {
             $sql = "insert into " . __racinebd__ . "usergps_device (device_id,usergps_id) values('" . $device_id . "','" . $tbl_device["usergps_id"] . "')";
             //print $sql."<br>";
             query($sql);
         }
     }
 } else {
     print "erreur compte '" . addslashes($tablelem[0]) . "' non trouvé<br>";
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:importantoine.php

示例15: query

             }
             //device phantom_usergps_device
             $sql = "select * from " . __racinebd__ . "device where compte_id=" . $_GET["pere"];
             $link = query($sql);
             while ($tbl = fetch($link)) {
                 $sql = "insert into " . __racinebd__ . "usergps_device (device_id,usergps_id) values('" . $tbl["device_id"] . "','" . $usergpd_id . "')";
                 query($sql);
             }
             $szQuery = "";
             break;
         case "modif":
             $txtmsg = "L'utilisateurs a &eacute;t&eacute; modifi&eacute;";
             if ($_POST["password2"] != "") {
                 $pwd = ",password='" . md5($_POST["password2"]) . "'";
             }
             $szQuery = "update {$table} set \r\n\t\t\t\t\tusername='" . addquote($_POST["username"]) . "',\r\n\t\t\t\t\tname='" . addquote($_POST["name"]) . "',\r\n          email='" . addquote($_POST["email"]) . "',\r\n          tel='" . addquote($_POST["tel"]) . "'\r\n          {$pwd}\r\n          where {$tablekey}=" . $_GET["id"];
             //print $szQuery;
             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)
     if ($_GET["mode"] == "ajout") {
         $tabcolonne = array("Username" => "username|txt(255)|yes", "Name" => "name|txt(255)|yes", "Password" => "password|password|yes", "Email" => "email|txt(255)|no", "Téléphone" => "tel|txt(255)|no");
     } else {
         $tabcolonne = array("Username" => "username|txt(255)|yes", "Name" => "name|txt(255)|yes", "Password (for change)" => "password2|password|no", "Email" => "email|txt(255)|no", "Téléphone" => "tel|txt(255)|no");
     }
     require "../../include/template_detail.php";
开发者ID:jcmwc,项目名称:fleet,代码行数:31,代码来源:users.php


注:本文中的addquote函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。