| 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.57.2.9 2007-03-06 16:23:24 jp_milcent Exp $
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.57.2.10 2007-03-07 17:20:19 jp_milcent 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.57.2.9 $ $Date: 2007-03-06 16:23:24 $
|
34 |
*@version $Revision: 1.57.2.10 $ $Date: 2007-03-07 17:20:19 $
|
| 35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
| 36 |
*/
|
36 |
*/
|
| Line 37... |
Line 37... |
| 37 |
|
37 |
|
| 38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 55... |
Line 55... |
| 55 |
* @param integer Id de la personne (par défaut la personne loguée)
|
55 |
* @param integer Id de la personne (par défaut la personne loguée)
|
| 56 |
*
|
56 |
*
|
| 57 |
* @return string Retourne 'redacteur', 'administrateur', 'superadministrateur', ou 'aucun'
|
57 |
* @return string Retourne 'redacteur', 'administrateur', 'superadministrateur', ou 'aucun'
|
| 58 |
*/
|
58 |
*/
|
| 59 |
function niveau_droit($id_nature_offre='0', $personne) {
|
59 |
function niveau_droit($id_nature_offre='0', $personne) {
|
| 60 |
$requete = 'select bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='.$personne.
|
60 |
$requete = 'SELECT bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='.$personne.
|
| 61 |
' AND (bd_id_nature_offre="'.$id_nature_offre.'" OR bd_id_nature_offre=0)';
|
61 |
' AND (bd_id_nature_offre="'.$id_nature_offre.'" OR bd_id_nature_offre=0)';
|
| 62 |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
|
62 |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
|
| 63 |
if (DB::isError($resultat)) {
|
63 |
if (DB::isError($resultat)) {
|
| 64 |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
64 |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
| 65 |
}
|
65 |
}
|
| Line 146... |
Line 146... |
| 146 |
else {
|
146 |
else {
|
| 147 |
$res .= '<p class="zone_info">'.BAZ_PAS_DE_FICHE_A_VALIDER.'</p>'."\n" ;
|
147 |
$res .= '<p class="zone_info">'.BAZ_PAS_DE_FICHE_A_VALIDER.'</p>'."\n" ;
|
| 148 |
}
|
148 |
}
|
| 149 |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
|
149 |
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
|
| 150 |
$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>';
|
150 |
$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>';
|
| - |
|
151 |
|
| - |
|
152 |
// Nettoyage de l'url
|
| 151 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
153 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| - |
|
154 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
|
| - |
|
155 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
|
| - |
|
156 |
|
| 152 |
return $res;
|
157 |
return $res;
|
| 153 |
}
|
158 |
}
|
| Line 154... |
Line 159... |
| 154 |
|
159 |
|
| Line 234... |
Line 239... |
| 234 |
<input type="password" id="password" name="password" maxlength="80" tabindex="2" value="mot de passe" />
|
239 |
<input type="password" id="password" name="password" maxlength="80" tabindex="2" value="mot de passe" />
|
| 235 |
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" />
|
240 |
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" />
|
| 236 |
</fieldset>
|
241 |
</fieldset>
|
| 237 |
</form>';
|
242 |
</form>';
|
| 238 |
}
|
243 |
}
|
| - |
|
244 |
// Nettoyage de l'url
|
| - |
|
245 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| - |
|
246 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
|
| - |
|
247 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
|
| - |
|
248 |
|
| 239 |
return $res;
|
249 |
return $res;
|
| 240 |
}
|
250 |
}
|
| Line 241... |
Line 251... |
| 241 |
|
251 |
|
| 242 |
/** baz_gestion_droits() interface de gestion des droits
|
252 |
/** baz_gestion_droits() interface de gestion des droits
|
| Line 406... |
Line 416... |
| 406 |
'<a href='.$lien_passer_redacteur->getURL().'>'.BAZ_DROIT_REDACTEUR.'</a>',
|
416 |
'<a href='.$lien_passer_redacteur->getURL().'>'.BAZ_DROIT_REDACTEUR.'</a>',
|
| 407 |
'<a href='.$lien_passer_admin->getURL().'>'.BAZ_DROIT_ADMIN.'</a>'));
|
417 |
'<a href='.$lien_passer_admin->getURL().'>'.BAZ_DROIT_ADMIN.'</a>'));
|
| Line 408... |
Line 418... |
| 408 |
|
418 |
|
| 409 |
}
|
419 |
}
|
| 410 |
}
|
- |
|
| 411 |
// Nettoyage de l'url
|
- |
|
| 412 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
- |
|
| 413 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('pers');
|
- |
|
| 414 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('droits');
|
- |
|
| Line 415... |
Line 420... |
| 415 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('idtypeannonce');
|
420 |
}
|
| 416 |
|
421 |
|
| 417 |
$table->altRowAttributes(1, array('class' => 'ligne_impaire'), array('class' => 'ligne_paire'));
|
422 |
$table->altRowAttributes(1, array('class' => 'ligne_impaire'), array('class' => 'ligne_paire'));
|
| 418 |
$table->updateColAttributes(0, array('align' => 'left'));
|
423 |
$table->updateColAttributes(0, array('align' => 'left'));
|
| 419 |
$table->updateColAttributes(1, array('align' => 'left'));
|
424 |
$table->updateColAttributes(1, array('align' => 'left'));
|
| 420 |
$table->updateColAttributes(2, array('align' => 'left'));
|
425 |
$table->updateColAttributes(2, array('align' => 'left'));
|
| 421 |
$table->updateColAttributes(3, array('align' => 'left'));
|
426 |
$table->updateColAttributes(3, array('align' => 'left'));
|
| 422 |
$res.=$table->toHTML() ;
|
427 |
$res.=$table->toHTML() ;
|
| - |
|
428 |
}
|
| - |
|
429 |
}
|
| - |
|
430 |
|
| - |
|
431 |
// Nettoyage de l'url
|
| - |
|
432 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| - |
|
433 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('pers');
|
| - |
|
434 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('droits');
|
| 423 |
}
|
435 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('idtypeannonce');
|
| 424 |
}
|
436 |
|
| Line 425... |
Line 437... |
| 425 |
return $res;
|
437 |
return $res;
|
| 426 |
}
|
438 |
}
|
| Line 542... |
Line 554... |
| 542 |
//AFFICHAGE DU FORMULAIRE CORRESPONDANT AU TYPE DE L'ANNONCE CHOISI PAR L'UTILISATEUR
|
554 |
//AFFICHAGE DU FORMULAIRE CORRESPONDANT AU TYPE DE L'ANNONCE CHOISI PAR L'UTILISATEUR
|
| 543 |
//------------------------------------------------------------------------------------------------
|
555 |
//------------------------------------------------------------------------------------------------
|
| 544 |
if ($mode == BAZ_ACTION_NOUVEAU) {
|
556 |
if ($mode == BAZ_ACTION_NOUVEAU) {
|
| 545 |
unset ($_SESSION['formulaire_annonce_valide']) ;
|
557 |
unset ($_SESSION['formulaire_annonce_valide']) ;
|
| 546 |
$lien_formulaire->addQueryString('action', BAZ_ACTION_NOUVEAU_V);
|
558 |
$lien_formulaire->addQueryString('action', BAZ_ACTION_NOUVEAU_V);
|
| 547 |
$formtemplate->updateAttributes(array('action' => str_replace('&', '&', $lien_formulaire->getURL())));
|
559 |
$formtemplate->updateAttributes(array('action' => str_replace('&', '&', $lien_formulaire->getURL())));
|
| - |
|
560 |
|
| 548 |
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate);
|
561 |
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate);
|
| 549 |
}
|
562 |
}
|
| Line 550... |
Line 563... |
| 550 |
|
563 |
|
| 551 |
//------------------------------------------------------------------------------------------------
|
564 |
//------------------------------------------------------------------------------------------------
|
| 552 |
//CAS DE LA MODIFICATION D'UNE ANNONCE (FORMULAIRE DE MODIFICATION)
|
565 |
//CAS DE LA MODIFICATION D'UNE ANNONCE (FORMULAIRE DE MODIFICATION)
|
| 553 |
//------------------------------------------------------------------------------------------------
|
566 |
//------------------------------------------------------------------------------------------------
|
| 554 |
if ($mode == BAZ_ACTION_MODIFIER) {
|
567 |
if ($mode == BAZ_ACTION_MODIFIER) {
|
| 555 |
$res=baz_afficher_formulaire_annonce('modification',$formtemplate);
|
568 |
$res=baz_afficher_formulaire_annonce('modification',$formtemplate);
|
| Line -... |
Line 569... |
| - |
|
569 |
}
|
| - |
|
570 |
|
| - |
|
571 |
// Nettoyage de l'url avant les return
|
| - |
|
572 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| 556 |
}
|
573 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
|
| 557 |
|
574 |
|
| 558 |
//------------------------------------------------------------------------------------------------
|
575 |
//------------------------------------------------------------------------------------------------
|
| 559 |
//CAS DE L'INSCRIPTION D'UNE ANNONCE
|
576 |
//CAS DE L'INSCRIPTION D'UNE ANNONCE
|
| 560 |
//------------------------------------------------------------------------------------------------
|
577 |
//------------------------------------------------------------------------------------------------
|
| Line 591... |
Line 608... |
| 591 |
<input type="password" id="password" name="password" maxlength="80" tabindex="2" value="mot de passe" />
|
608 |
<input type="password" id="password" name="password" maxlength="80" tabindex="2" value="mot de passe" />
|
| 592 |
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" />
|
609 |
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" />
|
| 593 |
</fieldset>
|
610 |
</fieldset>
|
| 594 |
</form>';
|
611 |
</form>';
|
| 595 |
}
|
612 |
}
|
| - |
|
613 |
|
| 596 |
return $res;
|
614 |
return $res;
|
| 597 |
}
|
615 |
}
|
| Line 598... |
Line 616... |
| 598 |
|
616 |
|
| 599 |
/** baz_afficher_formulaire_annonce() - Genere le formulaire de saisie d'une annonce
|
617 |
/** baz_afficher_formulaire_annonce() - Genere le formulaire de saisie d'une annonce
|
| Line 1137... |
Line 1155... |
| 1137 |
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" />
|
1155 |
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" />
|
| 1138 |
</fieldset>
|
1156 |
</fieldset>
|
| 1139 |
</form>';
|
1157 |
</form>';
|
| 1140 |
}
|
1158 |
}
|
| Line -... |
Line 1159... |
| - |
|
1159 |
|
| - |
|
1160 |
// Nettoyage de l'url
|
| - |
|
1161 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
|
| - |
|
1162 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('idtypeannonce');
|
| - |
|
1163 |
$GLOBALS['_BAZAR_']['url']->removeQueryString('inscrip');
|
| 1141 |
|
1164 |
|
| 1142 |
return $res;
|
1165 |
return $res;
|
| Line 1143... |
Line 1166... |
| 1143 |
}
|
1166 |
}
|
| Line 1259... |
Line 1282... |
| 1259 |
}
|
1282 |
}
|
| Line 1260... |
Line 1283... |
| 1260 |
|
1283 |
|
| 1261 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1284 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| 1262 |
*
|
1285 |
*
|
| - |
|
1286 |
* $Log: not supported by cvs2svn $
|
| - |
|
1287 |
* Revision 1.57.2.9 2007/03/06 16:23:24 jp_milcent
|
| - |
|
1288 |
* Nettoyage de l'url pour la gestion des droits.
|
| 1263 |
* $Log: not supported by cvs2svn $
|
1289 |
*
|
| 1264 |
* Revision 1.57.2.8 2007/03/05 14:33:44 jp_milcent
|
1290 |
* Revision 1.57.2.8 2007/03/05 14:33:44 jp_milcent
|
| 1265 |
* Suppression de l'appel à Mes_Fiches dans la fonction baz_formulaire
|
1291 |
* Suppression de l'appel à Mes_Fiches dans la fonction baz_formulaire
|
| 1266 |
*
|
1292 |
*
|
| 1267 |
* Revision 1.57.2.7 2007/03/05 10:28:03 alexandre_tb
|
1293 |
* Revision 1.57.2.7 2007/03/05 10:28:03 alexandre_tb
|