Subversion Repositories Applications.bazar

Rev

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

Rev 64 Rev 65
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.26 2006-01-03 10:19:31 florian Exp $
22
// CVS : $Id: bazar.fonct.php,v 1.27 2006-01-04 15:30: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.26 $ $Date: 2006-01-03 10:19:31 $
34
*@version       $Revision: 1.27 $ $Date: 2006-01-04 15:30:56 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 311... Line 311...
311
			$res = '';
311
			$res = '';
Line 312... Line 312...
312
		
312
		
313
			//requete pour obtenir le nom et la description des types d'annonce
313
			//requete pour obtenir le nom et la description des types d'annonce
314
			$requete = "SELECT bn_id_nature, bn_label_nature, bn_description, bn_condition, bn_image_titre ".
314
			$requete = "SELECT bn_id_nature, bn_label_nature, bn_description, bn_condition, bn_image_titre ".
315
						"FROM bazar_nature WHERE bn_ce_id_menu=".$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.
315
						"FROM bazar_nature WHERE bn_ce_id_menu=".$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.
316
						" or  bn_ce_id_menu=0 ORDER BY bn_label_nature ASC";
316
						" or  bn_ce_id_menu=0 ORDER BY bn_label_nature ASC";echo $requete;
317
			$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
317
			$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
318
			if (DB::isError($resultat)) {
318
			if (DB::isError($resultat)) {
319
				die ($resultat->getMessage().$resultat->getDebugInfo()) ;
319
				die ($resultat->getMessage().$resultat->getDebugInfo()) ;
320
			}
320
			}
321
			$res.="<h2>".BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE.'</h2>'."\n";
321
			$res.="<h2>".BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE.'</h2>'."\n";
322
			$res.='<br />'.BAZ_CHOIX_TYPEANNONCE.'<br /><br />'."\n";
322
			$res.='<br />'.BAZ_CHOIX_TYPEANNONCE.'<br /><br />'."\n";
323
			while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) {
323
			while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) {
-
 
324
				$droitspers=niveau_droit($ligne["bn_id_nature"],$GLOBALS["id_user"]);
324
				$droitspers=niveau_droit($ligne["bn_id_nature"],$GLOBALS["id_user"]);
325
				if (($droitspers=='redacteur') or ($droitspers=='administrateur') 
-
 
326
								or ($droitspers=='superadministrateur' or !BAZ_RESTREINDRE_DEPOT)) {
325
				if (($droitspers=='redacteur') or ($droitspers=='administrateur') or ($droitspers=='superadministrateur' or !BAZ_RESTREINDRE_DEPOT)) {
327
					if (isset($ligne['bn_image_titre'])) {
-
 
328
						$titre='&nbsp;<img src="client/bazar/images/'.$ligne['bn_image_titre'].'" alt="'.
-
 
329
										constant($ligne['bn_label_nature']).'" />'.'<br />'."\n";
326
					if (isset($ligne['bn_image_titre'])) {$titre='&nbsp;<img src="client/bazar/images/'.$ligne['bn_image_titre'].'" alt="'.constant($ligne['bn_label_nature']).'" />'.'<br />'."\n";}
330
					} else {
-
 
331
						$titre='<strong>'.constant($ligne['bn_label_nature']).' : </strong><br />'."\n";
327
					else {$titre='<strong>'.constant($ligne['bn_label_nature']).' : </strong><br />'."\n";}
332
					}
328
					$formtemplate->addElement('radio', 'typeannonce', '', $titre.$ligne['bn_description'].'<br /><br />'."\n", $ligne['bn_id_nature'], array("id" => 'select'.$ligne['bn_id_nature'], "style" => 'float:left;'));
333
					$formtemplate->addElement('radio', 'typeannonce', '', $titre.$ligne['bn_description'].'<br /><br />'."\n", $ligne['bn_id_nature'], array("id" => 'select'.$ligne['bn_id_nature'], "style" => 'float:left;'));
329
				}		
334
				}		
330
			}
335
			}
Line 1346... Line 1351...
1346
}
1351
}
Line 1347... Line 1352...
1347
 
1352
 
1348
/* +--Fin du code ----------------------------------------------------------------------------------------+
1353
/* +--Fin du code ----------------------------------------------------------------------------------------+
1349
*
1354
*
-
 
1355
* $Log: not supported by cvs2svn $
-
 
1356
* Revision 1.26  2006/01/03 10:19:31  florian
-
 
1357
* Mise à jour pour accepter des parametres dans papyrus: faire apparaitre ou non le menu, afficher qu'un type de fiches, définir l'action par défaut...
1350
* $Log: not supported by cvs2svn $
1358
*
1351
* Revision 1.25  2005/12/20 14:49:35  ddelon
1359
* Revision 1.25  2005/12/20 14:49:35  ddelon
1352
* Fusion Head vers Livraison
1360
* Fusion Head vers Livraison
1353
*
1361
*
1354
* Revision 1.24  2005/12/16 15:44:40  alexandre_tb
1362
* Revision 1.24  2005/12/16 15:44:40  alexandre_tb