-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patharticle_update.php
More file actions
executable file
·78 lines (73 loc) · 2.14 KB
/
article_update.php
File metadata and controls
executable file
·78 lines (73 loc) · 2.14 KB
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
71
72
73
74
75
76
77
78
<?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: 8.0.0
* * * * Modified: 07/06/2025
*
* File Authors:
* Guy Hendrickx
*.
*/
require_once(__DIR__ . "/include/verif.php");
include_once(__DIR__ . "/include/config/common.php");
include_once(__DIR__ . "/include/config/var.php");
include_once(__DIR__ . sprintf('/include/language/%s.php', $lang));
$nom=isset($_POST['nom'])?$_POST['nom']:"";
$num=isset($_POST['num'])?$_POST['num']:"";
$prix=floatval(isset($_POST['prix'])?$_POST['prix']:"");
$commentaire=isset($_POST['commentaire'])?$_POST['commentaire']:"";###
$marge=floatval(isset($_POST['marge'])?$_POST['marge']:"");
$stock=floatval(isset($_POST['stock'])?$_POST['stock']:"");
$max=floatval(isset($_POST['max'])?$_POST['max']:"");
$min=floatval(isset($_POST['min'])?$_POST['min']:"");
$categorie=intval(isset($_POST['categorie'])?$_POST['categorie']:"");
$article=isset($_POST['article'])?$_POST['article']:"";### ‘ ‘ ‘ Left single quotation mark ::: 4 change Single quote (') http://ascii-code.com/
$uni=isset($_POST['uni'])?$_POST['uni']:"";
$taux_tva=floatval(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) || die(sprintf('<p>Erreur Mysql<br/>%s<br/>', $sql2).mysql_error()."</p>");
$message= sprintf('<h2>%s «%s»</h2>', $lang_stock_jour, $nom);
include_once(__DIR__ . "/lister_articles.php");