Subversion Repositories Applications.bazar

Rev

Rev 72 | Rev 87 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72 Rev 84
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.php,v 1.23 2006-01-17 10:07:36 alexandre_tb Exp $
22
// CVS : $Id: bazar.php,v 1.24 2006-01-26 11:06:43 alexandre_tb Exp $
23
/**
23
/**
24
* 
24
* 
25
*@package bazar
25
*@package bazar
26
//Auteur original :
26
//Auteur original :
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
28
*@author        Florian Schmitt <florian@ecole-et-nature.org>
28
*@author        Florian Schmitt <florian@ecole-et-nature.org>
29
//Autres auteurs :
29
//Autres auteurs :
30
*@copyright     Tela-Botanica 2000-2004
30
*@copyright     Tela-Botanica 2000-2004
31
*@version       $Revision: 1.23 $ $Date: 2006-01-17 10:07:36 $
31
*@version       $Revision: 1.24 $ $Date: 2006-01-26 11:06:43 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
Line 97... Line 97...
97
//initialisation de la variable globale de bazar
97
//initialisation de la variable globale de bazar
98
//**********************************************************************************************************
98
//**********************************************************************************************************
99
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
99
$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID);
Line 100... Line 100...
100
 
100
 
-
 
101
//Recuperer les eventuelles variables passees en GET ou en POST
101
//Recuperer les eventuelles variables passees en GET ou en POST
102
if (isset($_REQUEST['id_fiche'])) {
-
 
103
	$GLOBALS['_BAZAR_']['id_fiche']=$_REQUEST['id_fiche'];
-
 
104
	// récupération du type d'annonce à partir de la fiche
-
 
105
	$requete = 'select bf_ce_nature from bazar_fiche where bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'] ;
-
 
106
	$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
-
 
107
	if (DB::isError($resultat)) {
-
 
108
		echo $resultat->getMessage().'<br />'.$resultat->getInfoDebug();	
-
 
109
	}
-
 
110
	$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
-
 
111
	$GLOBALS['_BAZAR_']['id_typeannonce'] = $ligne->bf_ce_nature ;
-
 
112
	$resultat->free();
102
if (isset($_REQUEST['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_REQUEST['id_fiche'];		
113
}		
103
if (isset($_REQUEST['typeannonce'])) {
114
if (isset($_REQUEST['typeannonce'])) {
104
	$GLOBALS['_BAZAR_']['id_typeannonce']=$_REQUEST['typeannonce'];
115
	$GLOBALS['_BAZAR_']['id_typeannonce']=$_REQUEST['typeannonce'];
Line 105... Line 116...
105
}
116
}
Line 125... Line 136...
125
// |                                           LISTE de FONCTIONS                                         |
136
// |                                           LISTE de FONCTIONS                                         |
126
// +------------------------------------------------------------------------------------------------------+
137
// +------------------------------------------------------------------------------------------------------+
127
if ($GLOBALS['_BAZAR_']['affiche_menu']) {
138
if ($GLOBALS['_BAZAR_']['affiche_menu']) {
128
	//---------------le menu de l'appli-----------
139
	//---------------le menu de l'appli-----------
129
	function afficherContenuNavigation () {
140
	function afficherContenuNavigation () {
130
		$res ='<ul>'."\n";
141
		$res ='<ul id="BAZ_menu">'."\n";
131
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
142
		$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
132
		$GLOBALS['_BAZAR_']['url']->addQueryString('nature', 'toutes');
143
		$GLOBALS['_BAZAR_']['url']->addQueryString('nature', 'toutes');
133
		//partie consultation d'annonces
144
		//partie consultation d'annonces
134
		$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n";
145
		$res .= '<li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n";
135
		$GLOBALS['_BAZAR_']['url']->removeQueryString('nature');
146
		$GLOBALS['_BAZAR_']['url']->removeQueryString('nature');
Line 211... Line 222...
211
 
222
 
212
 
223
 
213
/* +--Fin du code ----------------------------------------------------------------------------------------+
224
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
225
*
-
 
226
* $Log: not supported by cvs2svn $
-
 
227
* Revision 1.23  2006/01/17 10:07:36  alexandre_tb
214
*
228
* en cours
215
* $Log: not supported by cvs2svn $
229
*
216
* Revision 1.22  2006/01/16 15:11:28  alexandre_tb
230
* Revision 1.22  2006/01/16 15:11:28  alexandre_tb
217
* simplification code
231
* simplification code
218
*
232
*