Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.74.2.7 2008-01-29 14:35:22 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.74.2.8 2008-02-01 09:56:56 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
* Fonctions du module bazar
|
25 |
* Fonctions du module bazar
|
26 |
*
|
26 |
*
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
31 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.74.2.7 $ $Date: 2008-01-29 14:35:22 $
|
34 |
*@version $Revision: 1.74.2.8 $ $Date: 2008-02-01 09:56:56 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
Line 631... |
Line 631... |
631 |
//------------------------------------------------------------------------------------------------
|
631 |
//------------------------------------------------------------------------------------------------
|
632 |
//AFFICHAGE DU FORMULAIRE CORRESPONDANT AU TYPE DE L'ANNONCE CHOISI PAR L'UTILISATEUR
|
632 |
//AFFICHAGE DU FORMULAIRE CORRESPONDANT AU TYPE DE L'ANNONCE CHOISI PAR L'UTILISATEUR
|
633 |
//------------------------------------------------------------------------------------------------
|
633 |
//------------------------------------------------------------------------------------------------
|
634 |
if ($mode == BAZ_ACTION_NOUVEAU) {
|
634 |
if ($mode == BAZ_ACTION_NOUVEAU) {
|
635 |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V);
|
635 |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V);
|
636 |
$formtemplate->updateAttributes(array(BAZ_VARIABLE_ACTION => str_replace('&', '&', $lien_formulaire->getURL())));
|
636 |
$formtemplate->updateAttributes(array('action' => str_replace('&', '&', $lien_formulaire->getURL())));
|
637 |
// Appel du modele
|
637 |
// Appel du modele
|
638 |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
|
638 |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
|
639 |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
|
639 |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
|
640 |
$html = $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE, $GLOBALS['_BAZAR_']['langue'],$GLOBALS['_BAZAR_']['categorie_nature']);
|
640 |
$html = $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE, $GLOBALS['_BAZAR_']['langue'],$GLOBALS['_BAZAR_']['categorie_nature']);
|
641 |
if (!PEAR::isError($html)) {
|
641 |
if (!PEAR::isError($html)) {
|
Line 660... |
Line 660... |
660 |
//CAS DE L'INSCRIPTION D'UNE ANNONCE
|
660 |
//CAS DE L'INSCRIPTION D'UNE ANNONCE
|
661 |
//------------------------------------------------------------------------------------------------
|
661 |
//------------------------------------------------------------------------------------------------
|
662 |
if ($mode == BAZ_ACTION_NOUVEAU_V) {
|
662 |
if ($mode == BAZ_ACTION_NOUVEAU_V) {
|
663 |
if ($formtemplate->validate()) {
|
663 |
if ($formtemplate->validate()) {
|
664 |
$formtemplate->process('baz_insertion', false) ;
|
664 |
$formtemplate->process('baz_insertion', false) ;
|
- |
|
665 |
// Redirection vers mes_fiches pour eviter la revalidation du formulaire
|
- |
|
666 |
$GLOBALS['_BAZAR_']['url']->addQueryString (BAZ_VARIABLE_VOIR, BAZ_VOIR_MES_FICHES);
|
- |
|
667 |
header ('Location: '.str_replace ('&', '&', $GLOBALS['_BAZAR_']['url']->getURL())) ;
|
665 |
return;
|
668 |
exit();
|
666 |
}
|
669 |
}
|
667 |
}
|
670 |
}
|
Line 668... |
Line 671... |
668 |
|
671 |
|
669 |
//------------------------------------------------------------------------------------------------
|
672 |
//------------------------------------------------------------------------------------------------
|
Line 672... |
Line 675... |
672 |
if ($mode == BAZ_ACTION_MODIFIER_V) {
|
675 |
if ($mode == BAZ_ACTION_MODIFIER_V) {
|
673 |
if ($formtemplate->validate()) {
|
676 |
if ($formtemplate->validate()) {
|
674 |
$formtemplate->process('baz_mise_a_jour', false) ;
|
677 |
$formtemplate->process('baz_mise_a_jour', false) ;
|
Line 675... |
Line 678... |
675 |
|
678 |
|
676 |
// Redirection vers mes_fiches pour eviter la revalidation du formulaire
|
679 |
// Redirection vers mes_fiches pour eviter la revalidation du formulaire
|
677 |
$GLOBALS['_BAZAR_']['url']->addQueryString (BAZ_VARIABLE_ACTION, BAZ_ACTION_VOIR_VOS_ANNONCES);
|
680 |
$GLOBALS['_BAZAR_']['url']->addQueryString (BAZ_VARIABLE_VOIR, BAZ_VOIR_MES_FICHES);
|
678 |
header ('Location: '.$GLOBALS['_BAZAR_']['url']->getURL()) ;
|
681 |
header ('Location: '.str_replace ('&', '&', $GLOBALS['_BAZAR_']['url']->getURL())) ;
|
679 |
return ;
|
682 |
exit();
|
680 |
}
|
683 |
}
|
681 |
}
|
684 |
}
|
682 |
}
|
685 |
}
|
Line 946... |
Line 949... |
946 |
mail ($mail, $sujet, $corps);
|
949 |
mail ($mail, $sujet, $corps);
|
947 |
}
|
950 |
}
|
948 |
}
|
951 |
}
|
949 |
}
|
952 |
}
|
Line 950... |
Line -... |
950 |
|
- |
|
951 |
// Redirection vers mes_fiches pour eviter la revalidation du formulaire
|
- |
|
952 |
$GLOBALS['_BAZAR_']['url']->addQueryString (BAZ_VARIABLE_ACTION, BAZ_ACTION_VOIR_VOS_ANNONCES);
|
- |
|
953 |
header ('Location: '.$GLOBALS['_BAZAR_']['url']->getURL()) ;
|
953 |
|
954 |
return ;
|
954 |
return ;
|
Line 955... |
Line 955... |
955 |
}
|
955 |
}
|
Line 1333... |
Line 1333... |
1333 |
}
|
1333 |
}
|
Line 1334... |
Line 1334... |
1334 |
|
1334 |
|
1335 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1335 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1336 |
*
|
1336 |
*
|
- |
|
1337 |
* $Log: not supported by cvs2svn $
|
- |
|
1338 |
* Revision 1.74.2.7 2008-01-29 14:35:22 alexandre_tb
|
- |
|
1339 |
* suppression de l identification pour l abonnement au fluxRSS
|
1337 |
* $Log: not supported by cvs2svn $
|
1340 |
*
|
1338 |
* Revision 1.74.2.6 2008-01-29 09:55:07 alexandre_tb
|
1341 |
* Revision 1.74.2.6 2008-01-29 09:55:07 alexandre_tb
|
1339 |
* suppression de l identification pour l abonnement au fluxRSS
|
1342 |
* suppression de l identification pour l abonnement au fluxRSS
|
1340 |
*
|
1343 |
*
|
1341 |
* Revision 1.74.2.5 2008-01-29 09:35:36 alexandre_tb
|
1344 |
* Revision 1.74.2.5 2008-01-29 09:35:36 alexandre_tb
|