-
Notifications
You must be signed in to change notification settings - Fork 3
/
article_update.php
executable file
·70 lines (67 loc) · 1.97 KB
/
article_update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/*
* Factux le facturier libre
* Copyright (C) 2003-2005 Guy Hendrickx, 2017 Thomas Ingles
*
* Licensed under the terms of the GNU General Public License:
* http://opensource.org/licenses/GPL-3.0
*
* For further information visit:
* http://factux.free.fr
*
* File Name: article_update.php
* saisie de la modification d'un article
*
* * Version: 5.0.0
* * * * Modified: 07/10/2016
*
* File Authors:
* Guy Hendrickx
*.
*/
require_once("include/verif.php");
include_once("include/config/common.php");
include_once("include/config/var.php");
include_once("include/language/$lang.php");
$nom=isset($_POST['nom'])?$_POST['nom']:"";
$num=isset($_POST['num'])?$_POST['num']:"";
$prix=isset($_POST['prix'])?$_POST['prix']:"";
$commentaire=isset($_POST['commentaire'])?apostrophe($_POST['commentaire']):"";###
$marge=isset($_POST['marge'])?$_POST['marge']:"";
$stock=isset($_POST['stock'])?$_POST['stock']:"";
$max=isset($_POST['max'])?$_POST['max']:"";
$min=isset($_POST['min'])?$_POST['min']:"";
$categorie=isset($_POST['categorie'])?$_POST['categorie']:"";
$article=isset($_POST['article'])?apostrophe($_POST['article']):"";### ‘ ‘ ‘ Left single quotation mark ::: 4 change Single quote (') http://ascii-code.com/
$uni=isset($_POST['uni'])?$_POST['uni']:"";
$taux_tva=isset($_POST['taux_tva'])?$_POST['taux_tva']:"";
$set='';
if($article!="")#jamais commandé
$set.=",
`article`='".$article."'
";
if($uni!="")#jamais commandé
$set.=",
`uni`='".$uni."'
";
if($taux_tva!="")#jamais commandé
$set.=",
`taux_tva`='".$taux_tva."'
";
$sql2 = "
UPDATE " . $tblpref ."article
SET
`prix_htva`='".$prix."',
`commentaire`='".$commentaire."',
`marge`='".$marge."',
`stock`='".$stock."',
`stomin`='".$min."',
`stomax`='".$max."',
`cat`='".$categorie."'
$set
WHERE num ='".$num."'
LIMIT 1
";
mysql_query($sql2) OR die("<p>Erreur Mysql<br/>$sql2<br/>".mysql_error()."</p>");
$message= "<h2>$lang_stock_jour «$nom»</h2>";
include_once("lister_articles.php");