-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patharticle_new.php
More file actions
executable file
·45 lines (44 loc) · 2 KB
/
Copy patharticle_new.php
File metadata and controls
executable file
·45 lines (44 loc) · 2 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
<?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_new.php
* Enregistrement des nouveaux articles
*
* * * * 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));
$article=isset($_POST['article'])?$_POST['article']:"";### ‘ ‘ ‘ Left single quotation mark ::: 4 change Single quote (') http://ascii-code.com/
$uni=isset($_POST['uni'])?$_POST['uni']:"";
$prix=floatval(isset($_POST['prix'])?$_POST['prix']:"");
$taux_tva=floatval(isset($_POST['taux_tva'])?$_POST['taux_tva']:"");
$commentaire=isset($_POST['commentaire'])?$_POST['commentaire']:"";###
$stock=floatval(isset($_POST['stock'])?$_POST['stock']:"");
$stomin=floatval(isset($_POST['stomin'])?$_POST['stomin']:"");
$stomax=floatval(isset($_POST['stomax'])?$_POST['stomax']:"");
$categorie=isset($_POST['categorie'])?$_POST['categorie']:"";
$marge=floatval(isset($_POST['marge'])?$_POST['marge']:"");
if($article=='' || $prix==''|| $taux_tva=='' || $uni=='' ){
$message = sprintf('<h1>%s</h1>', $lang_oubli_champ);
include(__DIR__ . '/form_article.php');
exit;
}
$sql1 = "INSERT INTO " . $tblpref .sprintf("article(article, prix_htva, taux_tva, commentaire, uni, stock, stomin, stomax, cat, marge) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", $article, $prix, $taux_tva, $commentaire, $uni, $stock, $stomin, $stomax, $categorie, $marge);
mysql_query($sql1) || die('Erreur SQL !<br>'.$sql1.'<br>'.mysql_error());
$message = sprintf('<h2>%s<br>%s %s</h2>', $lang_nouv_art, $lang_commentaire, $commentaire);
include(__DIR__ . "/form_article.php");