Fix: Correction plantage lors ajout charges si le libelle contient des quot.
Fix: Utilisation des $_POST au lieu des variables non initialises.
This commit is contained in:
parent
150021cf1d
commit
50e19ba363
@ -47,13 +47,13 @@ function valeur($sql)
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Ajout d'une charge sociale
|
||||
*/
|
||||
|
||||
if ($action == 'add')
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, libelle, date_ech, amount) ";
|
||||
$sql .= " VALUES ($type,'$libelle','$date',$amount);";
|
||||
$sql .= " VALUES (".$_POST["type"].",'".addslashes($_POST["libelle"])."','".$_POST["date"]."','".$_POST["amount"]."');";
|
||||
|
||||
if (! $db->query($sql) )
|
||||
{
|
||||
@ -61,6 +61,10 @@ if ($action == 'add')
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Suppression d'une charge sociale
|
||||
*/
|
||||
|
||||
if ($_GET["action"] == 'del')
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."chargesociales where rowid='".$_GET["id"]."'";
|
||||
@ -71,6 +75,7 @@ if ($_GET["action"] == 'del')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$year=$_GET["year"];
|
||||
$filtre=$_GET["filtre"];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user