dbut restructuration du code

This commit is contained in:
Regis Houssin 2006-02-21 11:21:48 +00:00
parent dbfa477d25
commit 1a8a5a2238
3 changed files with 11 additions and 8 deletions

View File

@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2005 Davoleau Brice <brice.davoleau@gmail.com>
* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2005 Davoleau Brice <brice.davoleau@gmail.com>
* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006 Regis Houssin <regis.houssin@cap-networks.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Regis Houssin <regis.houssin@cap-networks.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -150,7 +151,7 @@ print '<tr><td valign="top" width="30%" class="notopnoleft">';
echo "<p>".$langs->trans ("ErrForgotField")." \"".$langs->trans ("Label")."\"</p>";
$OK = false;
}
else if ($c->already_exists($_POST["nom"],$cat_mere)) // on regarde si le nom n'existe pas déjà en tant que catégorie ou sous-catégorie
else if ($categorie->already_exists($_POST["nom"],$cat_mere)) // on regarde si le nom n'existe pas déjà en tant que catégorie ou sous-catégorie
{
echo "<p>".$langs->trans ("ErrCatAlreadyExists")."</p>";
$OK = false;

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2006 Regis Houssin <regis.houssin@cap-networks.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -47,10 +48,10 @@ $categorie = new Categorie($db);
$categorie->label = $_REQUEST["nom"];
$categorie->description = $_REQUEST["description"];
$cats_meres = isset($_REQUEST['cats_meres']) ? $_REQUEST['cats_meres'] : array ();
$cats_meres = isset($_REQUEST['cats_meres']) ? $_REQUEST['cats_meres'] : array();
$res = $categorie->create();
if ($res < 0)
{
print "<p>Impossible d'ajouter la catégorie ".$categorie->label.".</p>";