Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 285 → Rev 286

/trunk/bibliotheque/bazar.fonct.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bazar.fonct.php,v 1.67 2007-07-04 10:01:30 alexandre_tb Exp $
// CVS : $Id: bazar.fonct.php,v 1.68 2007-08-27 12:31:31 alexandre_tb Exp $
/**
*
* Fonctions du module bazar
31,7 → 31,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.67 $ $Date: 2007-07-04 10:01:30 $
*@version $Revision: 1.68 $ $Date: 2007-08-27 12:31:31 $
// +------------------------------------------------------------------------------------------------------+
*/
 
165,7 → 165,7
}
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
$res .= '<br /><ul style="clear:both;"><li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" title="'.BAZ_CONSULTER_FICHES_VALIDEES.'">'.BAZ_CONSULTER_FICHES_VALIDEES.'</a></li></ul>';
//$res .= '<br /><ul style="clear:both;"><li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" title="'.BAZ_CONSULTER_FICHES_VALIDEES.'">'.BAZ_CONSULTER_FICHES_VALIDEES.'</a></li></ul>';
 
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
262,7 → 262,7
*/
function mes_fiches() {
$res= '<h2>'.BAZ_VOS_ANNONCES.'</h2><br />'."\n";
if ($GLOBALS['AUTH']->getAuth()) {
if ($GLOBALS['AUTH']->getAuth()) {
// requete pour voir si l'utilisateur a des fiches a son nom, classees par date de MAJ et nature d'annonce
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_ce_utilisateur='. $GLOBALS['id_user'].
' AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') ORDER BY bf_date_maj_fiche DESC,bf_ce_nature ASC';
324,7 → 324,7
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
}
else {
$res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n" ;
/* $res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n" ;
$res .= '<form id="form_connexion" class="form_identification" action="' ;
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ACTION_VOIR_VOS_ANNONCES);
$res .= $GLOBALS['_BAZAR_']['url']->getURL();
342,8 → 342,11
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');*/
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
$res .= $modele->getTemplate(BAZ_TEMPLATE_MESSAGE_LOGIN, $GLOBALS['_BAZAR_']['langue']);
}
return $res;
}
 
603,7 → 606,10
if (DB::isError($resultat)) {
return ($resultat->getMessage().$resultat->getDebugInfo()) ;
}
$res.='<h2>'.BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE.'</h2>'."\n";
//$res.='<h2>'.BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE.'</h2>'."\n";
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
$res .= $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE_ACCUEIL, $GLOBALS['_BAZAR_']['langue']);
if ($resultat->numRows()==1) {
$ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC);
$GLOBALS['_BAZAR_']['id_typeannonce']=$ligne['bn_id_nature'];
661,8 → 667,15
unset ($_SESSION['formulaire_annonce_valide']) ;
$lien_formulaire->addQueryString('action', BAZ_ACTION_NOUVEAU_V);
$formtemplate->updateAttributes(array('action' => str_replace('&amp;', '&', $lien_formulaire->getURL())));
 
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate);
// Appel du modele
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
$html = $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE, $GLOBALS['_BAZAR_']['langue'],$GLOBALS['_BAZAR_']['categorie_nature']);
if (!PEAR::isError($html)) {
$res = str_replace ('{FORMULAIRE}', baz_afficher_formulaire_annonce('insertion',$formtemplate), $html);
} else {
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate);
}
}
//------------------------------------------------------------------------------------------------
747,7 → 760,7
}
//titre de la rubrique
$res= '<h2>'.BAZ_TITRE_SAISIE_ANNONCE.'&nbsp;'.$GLOBALS['_BAZAR_']['typeannonce'].'</h2><br />'."\n";
if (!BAZ_UTILISE_TEMPLATE) $res= '<h2>'.BAZ_TITRE_SAISIE_ANNONCE.'&nbsp;'.$GLOBALS['_BAZAR_']['typeannonce'].'</h2><br />'."\n";
if (($GLOBALS['_BAZAR_']['condition']!='')AND(!isset($_POST['accept_condition']))AND(!isset($_GET['url'])OR(!isset($_GET['fichier']))OR(!isset($_GET['image'])))) {
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/html.php';
$conditions= new HTML_QuickForm_html('<tr><td colspan="2" style="padding:5px; margin:5px; width: 90%; background: #C1CBA7;">'.$GLOBALS['_BAZAR_']['condition'].'</td>'."\n".'</tr>'."\n");
1409,6 → 1422,12
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.67 2007-07-04 10:01:30 alexandre_tb
* mise en place de divers templates :
* - mail pour admin (sujet et corps)
* - modele carte_google
* ajout de lignes dans bazar_template
*
* Revision 1.66 2007-06-25 12:15:06 alexandre_tb
* merge from narmer
*