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.23 2005-12-01 17:03:34 florian Exp $
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.24 2005-12-16 15:44:40 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
* Fonctions du module bazar
|
25 |
* Fonctions du module bazar
|
26 |
*
|
26 |
*
|
27 |
*@package bazar
|
27 |
*@package bazar
|
28 |
//Auteur original :
|
28 |
//Auteur original :
|
29 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
29 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
30 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
31 |
//Autres auteurs :
|
31 |
//Autres auteurs :
|
32 |
*@copyright Tela-Botanica 2000-2004
|
32 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@version $Revision: 1.23 $ $Date: 2005-12-01 17:03:34 $
|
33 |
*@version $Revision: 1.24 $ $Date: 2005-12-16 15:44:40 $
|
34 |
// +------------------------------------------------------------------------------------------------------+
|
34 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
*/
|
35 |
*/
|
Line 36... |
Line 36... |
36 |
|
36 |
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
Line 308... |
Line 308... |
308 |
//------------------------------------------------------------------------------------------------
|
308 |
//------------------------------------------------------------------------------------------------
|
309 |
if ($mode == BAZ_DEPOSER_ANNONCE) {
|
309 |
if ($mode == BAZ_DEPOSER_ANNONCE) {
|
310 |
$res = '';
|
310 |
$res = '';
|
Line 311... |
Line 311... |
311 |
|
311 |
|
- |
|
312 |
//requete pour obtenir le nom et la description des types d'annonce
|
312 |
//requete pour obtenir le nom et la description des types d'annonce
|
313 |
$requete = "SELECT bn_id_nature, bn_label_nature, bn_description, bn_condition ".
|
- |
|
314 |
"FROM bazar_nature WHERE bn_ce_id_menu=".$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.
|
313 |
$requete = "SELECT bn_id_nature, bn_label_nature, bn_description, bn_condition FROM bazar_nature WHERE bn_ce_id_menu=".$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu." or bn_ce_id_menu=0 ORDER BY bn_label_nature ASC";
|
315 |
" or bn_ce_id_menu=0 ORDER BY bn_label_nature ASC";
|
314 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
316 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
315 |
if (DB::isError($resultat)) {
|
317 |
if (DB::isError($resultat)) {
|
316 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
318 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
317 |
}
|
319 |
}
|
318 |
$res.="<h2>".BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE.'</h2>'."\n";
|
320 |
$res.="<h2>".BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE.'</h2>'."\n";
|
319 |
$res.=BAZ_CHOIX_TYPEANNONCE.'<br />';
|
321 |
$res.=BAZ_CHOIX_TYPEANNONCE.'<br />';
|
320 |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) {
|
322 |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) {
|
321 |
$droitspers=niveau_droit($ligne["bn_id_nature"],$GLOBALS["id_user"]);
|
323 |
$droitspers=niveau_droit($ligne["bn_id_nature"],$GLOBALS["id_user"]);
|
322 |
if (($droitspers=='redacteur') or ($droitspers=='administrateur') or ($droitspers=='superadministrateur')) {
|
324 |
if (($droitspers=='redacteur') or ($droitspers=='administrateur') or ($droitspers=='superadministrateur' or !BAZ_RESTREINDRE_DEPOT)) {
|
323 |
$formtemplate->addElement('radio', 'typeannonce', '', '<strong>'.$ligne['bn_label_nature'].
|
325 |
$formtemplate->addElement('radio', 'typeannonce', '', '<strong>'.$ligne['bn_label_nature'].
|
324 |
':</strong><br />'.$ligne['bn_description'], $ligne['bn_label_nature'], array("id" => 'select'.$ligne['bn_id_nature'], "style" => 'float:left;'));
|
326 |
':</strong><br />'.$ligne['bn_description'], $ligne['bn_label_nature'], array("id" => 'select'.$ligne['bn_id_nature'], "style" => 'float:left;'));
|
325 |
}
|
327 |
}
|
326 |
}
|
328 |
}
|
Line 1341... |
Line 1343... |
1341 |
}
|
1343 |
}
|
Line 1342... |
Line 1344... |
1342 |
|
1344 |
|
1343 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1345 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1344 |
*
|
1346 |
*
|
- |
|
1347 |
* $Log: not supported by cvs2svn $
|
- |
|
1348 |
* Revision 1.23 2005/12/01 17:03:34 florian
|
- |
|
1349 |
* changement des chemins pour appli Pear
|
1345 |
* $Log: not supported by cvs2svn $
|
1350 |
*
|
1346 |
* Revision 1.22 2005/12/01 16:05:41 florian
|
1351 |
* Revision 1.22 2005/12/01 16:05:41 florian
|
1347 |
* changement des chemins pour appli Pear
|
1352 |
* changement des chemins pour appli Pear
|
1348 |
*
|
1353 |
*
|
1349 |
* Revision 1.21 2005/12/01 15:31:30 florian
|
1354 |
* Revision 1.21 2005/12/01 15:31:30 florian
|