Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 38 → Rev 39

/trunk/bibliotheque/bazar.fonct.rss.php
249,9 → 249,21
$res .= '<div class="BAZ_cadre_fiche_bas">&nbsp;</div>'."\n";
$res .= '</div>'."\n";
//on ajoute les appropriations, s'il le faut
if (($danslappli==1)and($GLOBALS['_BAZAR_']['appropriation']==1)) {
$res .= '<br />'."\n".'<div class="BAZ_cadre_fiche">'."\n";
$res .= '<div class="BAZ_cadre_fiche_haut">&nbsp;</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_corps">'."\n";
$res .= '<h3>'.BAZ_LES_STRUCTURES_POSSEDANT_UNE_RESSOURCE.'</h3>'."\n";
$res .= '</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_bas">&nbsp;</div>'."\n";
$res .= '</div>'."\n";
}
//on ajoute les commentaires, s'il le faut
if (($danslappli==1)and($GLOBALS['_BAZAR_']['commentaire']==1)) {
$res .= '<div class="BAZ_cadre_fiche">'."\n";
$res .= '<br />'."\n".'<div class="BAZ_cadre_fiche">'."\n";
$res .= '<div class="BAZ_cadre_fiche_haut">&nbsp;</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_corps">'."\n";
$res .= '<h3>'.BAZ_LES_COMMENTAIRES.'</h3>'."\n";
308,17 → 320,6
$res .= '</div>'."\n";
}
//on ajoute les appropriations, s'il le faut
if (($danslappli==1)and($GLOBALS['_BAZAR_']['appropriation']==1)) {
$res .= '<div class="BAZ_cadre_fiche">'."\n";
$res .= '<div class="BAZ_cadre_fiche_haut">&nbsp;</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_corps">'."\n";
$res .= '</div>'."\n";
$res .= '<div class="BAZ_cadre_fiche_bas">&nbsp;</div>'."\n";
$res .= '</div>'."\n";
}
return $res ;
}
 
457,12 → 458,8
$lien_formulaire=preg_replace ('/&amp;/', '&', $GLOBALS['_BAZAR_']['url']->getURL()) ;
$formtemplate = new HTML_QuickForm('formulaire', 'post', $lien_formulaire) ;
$squelette =&$formtemplate->defaultRenderer();
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'<ul>'."\n".'{content}'."\n".'</ul>'."\n".'</form>'."\n");
$squelette->setElementTemplate( '<li class="enligne">'."\n".'{element}'."\n".
'</li>'."\n");
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'<ul>'."\n".'{content}'."\n".'</ul>'."\n".'</form>'."\n");
$squelette->setElementTemplate( '<li class="enligne">'."\n".'{element}'."\n".'</li>'."\n");
//requete pour obtenir l'id et le label des types d'annonces
$requete = 'SELECT bn_label_nature '.
'FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu.
475,7 → 472,7
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$type_annonce_select[$ligne['bn_label_nature']] = $ligne['bn_label_nature'];
}
$option=array('style'=>'width: 130px;', 'onchange'=>'this.form.submit();');
$option=array('style'=>'width: 160px;', 'onchange'=>'this.form.submit();');
$formtemplate->addElement ('select', 'nature', BAZ_TYPEANNONCE, $type_annonce_select, $option) ;
//requete pour obtenir l'id, le nom et prénom de toutes les personnes ayant une fiche publiée actuellement
491,7 → 488,7
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$personnes_select[$ligne[BAZ_CHAMPS_ID]] = $ligne[BAZ_CHAMPS_NOM]." ".$ligne[BAZ_CHAMPS_PRENOM] ;
}
$option=array('style'=>'width: 130px;', 'onchange'=>'this.form.submit();');
$option=array('style'=>'width: 160px;', 'onchange'=>'this.form.submit();');
$formtemplate->addElement ('select', 'personnes', BAZ_EMETTEUR, $personnes_select, $option) ;
//champs texte pour entrer les mots clés
517,7 → 514,7
}
}
//génération de la liste de flux à afficher
$res.=RSSversHTML(gen_RSS($_POST['nature'], '', $_POST['personnes'], 1, $requeteSQL), 1, 'jm') ;
$res.=RSSversHTML(gen_RSS($_POST['nature'], '', $_POST['personnes'], 1, $requeteSQL), 1, BAZ_TYPE_AFFICHAGE_LISTE) ;
}
else {
//on affiche toutes les annonces
/trunk/bibliotheque/bazar.fonct.cal.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.cal.php,v 1.2 2005-10-14 12:59:24 ddelon Exp $
// CVS : $Id: bazar.fonct.cal.php,v 1.3 2005-10-21 16:15:04 florian Exp $
/**
*
* Fonctions calendrier du module bazar
29,7 → 29,7
*@author David Delon <david.delon@clapas.net>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2005-10-14 12:59:24 $
*@version $Revision: 1.3 $ $Date: 2005-10-21 16:15:04 $
// +------------------------------------------------------------------------------------------------------+
*/
 
64,10 → 64,7
}
 
 
// $type : calendrier
// $type : calendrier_appplette
 
function GestionAffichageCalendrier($type='calendrier') {
function GestionAffichageCalendrier($prefixe_cal) {
$retour='';
125,9 → 122,8
 
$retour.="<br></br>";
 
// Vue Mois calendrier ou vue applette
if ((!isset($_GET['id_fiche']) && ($type=='calendrier')) || ($type=='calendrier_applette')){
// Vue Mois
if (!isset($_GET['id_fiche'])) {
// Recherche evenement de la periode selectionnée
170,36 → 166,19
$month->build($selection);
if ($type=='calendrier') {
$retour.= "<table class=\"calendar\">
<tr>
<th> ". BAZ_LUNDI ."</th>
<th> ". BAZ_MARDI ."</th>
<th> ". BAZ_MERCREDI ."</th>
<th> ". BAZ_JEUDI ."</th>
<th> ". BAZ_VENDREDI ."</th>
<th> ". BAZ_SAMEDI ."</th>
<th> ". BAZ_DIMANCHE ."</th>
</tr>
";
}
else {
$retour.= "<table class=\"calendar\">
<tr>
<th> ". BAZ_LUNDI_COURT ."</th>
<th> ". BAZ_MARDI_COURT ."</th>
<th> ". BAZ_MERCREDI_COURT ."</th>
<th> ". BAZ_JEUDI_COURT ."</th>
<th> ". BAZ_VENDREDI_COURT ."</th>
<th> ". BAZ_SAMEDI_COURT ."</th>
<th> ". BAZ_DIMANCHE_COURT ."</th>
</tr>
";
}
$retour.= "<table class=\"calendar\">
<tr>
<th> ". BAZ_LUNDI ."</th>
<th> ". BAZ_MARDI ."</th>
<th> ". BAZ_MERCREDI ."</th>
<th> ". BAZ_JEUDI ."</th>
<th> ". BAZ_VENDREDI ."</th>
<th> ". BAZ_SAMEDI ."</th>
<th> ". BAZ_DIMANCHE ."</th>
</tr>
";
$todayStamp=time();
$today_ymd=date('Ymd',$todayStamp);
239,36 → 218,16
if ($day->isFirst())
$retour.= ( "<tr>\n" );
//$retour.= ( "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n" );
$retour.= ( "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n" );
if ($type=='calendrier') {
$retour.= "<td class=\"".$class."\">".$day->thisDay()."\n";
if ($day->isSelected() ) {
$evenements=$day->getEntry();
while ($ligne_evenement=array_pop($evenements)) {
$id_fiches=array();
$id_fiches[]=$ligne_evenement->bf_id_fiche;
$url->addQueryString ('id_fiches',$id_fiches);
$link = $url->getUrl();
$retour.= "<a href=\"".$link."\">".$ligne_evenement->bf_titre."</a>\n";
$url->removeQueryString ('id_fiches');
}
}
}
else {
$lien_date= "<td class=\"".$class."\">".$day->thisDay()."\n";
if ($day->isSelected() ) {
$evenements=$day->getEntry();
$id_fiches=array();
while ($ligne_evenement=array_pop($evenements)) {
$id_fiches[]=$ligne_evenement->bf_id_fiche;
}
$url->addQueryString ('id_fiches',$id_fiches);
if ($day->isSelected() ) {
$evenements=$day->getEntry();
while ($ligne_evenement=array_pop($evenements)) {
$url->addQueryString ('id_fiche',$ligne_evenement->bf_id_fiche);
$link = $url->getUrl();
$lien_date= "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n";
$url->removeQueryString ('id_fiches');
$retour.= ( "<a href=\"".$link."\">".$ligne_evenement->bf_titre."</a>\n" );
}
$retour.=$lien_date;
}
$retour.= ( "</td>\n" );
280,17 → 239,17
$retour.= "</table>";
}
return $retour;
// Vue detail
if ((isset($_GET['id_fiches']))) {
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = baz_voir_fiches(0,$_GET['id_fiches'] );
}
return $retour;
else {
// Vue jour
if (isset($_GET['id_fiche'])) {
return $retour.baz_voir_fiche(0, $_GET['id_fiche']);
}
}
;
}
 
?>
/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.12 2005-10-14 13:59:23 alexandre_tb Exp $
// CVS : $Id: bazar.fonct.php,v 1.13 2005-10-21 16:15:04 florian Exp $
/**
*
* Fonctions du module bazar
30,7 → 30,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.12 $ $Date: 2005-10-14 13:59:23 $
*@version $Revision: 1.13 $ $Date: 2005-10-21 16:15:04 $
// +------------------------------------------------------------------------------------------------------+
*/
 
63,7 → 63,7
* @return string Retourne 'redacteur', 'administrateur', 'superadministrateur', ou 'aucun'
*/
function niveau_droit($id_nature_offre='0', $personne) {
$requete = 'select bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur="'.$personne.'"'.
$requete = 'select bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='.$personne.
' AND (bd_id_nature_offre='.$id_nature_offre.' OR bd_id_nature_offre=0)';
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ;
if (DB::isError($resultat)) {
476,8 → 476,6
// Clique sur son bouton précédent
if ($mode == BAZ_ACTION_NOUVEAU) unset($_SESSION['formulaire_annonce_valide']) ;
echo $mode;
echo $_SESSION['formulaire_annonce_valide'] ;
}
//requete pour obtenir l'id du type d'annonce