Modif message erreur lors de doublon de ligne

This commit is contained in:
Rodolphe Quiedeville 2006-03-30 08:37:39 +00:00
parent 7266edeee1
commit 3e7c4d0cf8

View File

@ -163,6 +163,15 @@ if ($_POST["action"] == 'add')
$verif = "nok";
}
$ligne = new LigneTel($db);
$ligne->fetch("0".trim($_POST["cli"]));
if ($ligne->id > 0 && $verif == 'ok')
{
$mesg = "La ligne #1 : 0".$_POST["cli"]." existe déjà !";
$verif = "nok";
}
/* Ligne #2 */
if (strlen(trim($_POST["cli2"])) > 0 && $verif == 'ok')
@ -178,6 +187,14 @@ if ($_POST["action"] == 'add')
$mesg = "Numéro de ligne #2 (0".$_POST["cli2"].") incorrect";
$verif = "nok";
}
$ligne = new LigneTel($db);
$ligne->fetch("0".trim($_POST["cli2"]));
if ($ligne->id > 0 && $verif == 'ok')
{
$mesg = "La ligne #2 : 0".$_POST["cli2"]." existe déjà !";
$verif = "nok";
}
}
/* Ligne #3 */
@ -194,6 +211,14 @@ if ($_POST["action"] == 'add')
$mesg = "Numéro de ligne #3 (0".$_POST["cli3"].") incorrect";
$verif = "nok";
}
$ligne = new LigneTel($db);
$ligne->fetch("0".trim($_POST["cli3"]));
if ($ligne->id > 0 && $verif == 'ok')
{
$mesg = "La ligne #3 : 0".$_POST["cli3"]." existe déjà !";
$verif = "nok";
}
}
/* Verif Tarif */
@ -527,7 +552,7 @@ if ($_POST["action"] == 'add')
}
else
{
$mesg .= $error;
$mesg .= " (numéro erreur : $error)";
}
}