Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 198 → Rev 201

/branches/livraison_menes/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.57.2.9 2007-03-06 16:23:24 jp_milcent Exp $
// CVS : $Id: bazar.fonct.php,v 1.57.2.10 2007-03-07 17:20:19 jp_milcent Exp $
/**
*
* Fonctions du module bazar
31,7 → 31,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.57.2.9 $ $Date: 2007-03-06 16:23:24 $
*@version $Revision: 1.57.2.10 $ $Date: 2007-03-07 17:20:19 $
// +------------------------------------------------------------------------------------------------------+
*/
 
57,7 → 57,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)) {
148,7 → 148,12
}
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
$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>';
 
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
 
return $res;
}
 
236,6 → 241,11
</fieldset>
</form>';
}
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
return $res;
}
 
408,11 → 418,6
}
}
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('pers');
$GLOBALS['_BAZAR_']['url']->removeQueryString('droits');
$GLOBALS['_BAZAR_']['url']->removeQueryString('idtypeannonce');
$table->altRowAttributes(1, array('class' => 'ligne_impaire'), array('class' => 'ligne_paire'));
$table->updateColAttributes(0, array('align' => 'left'));
422,6 → 427,13
$res.=$table->toHTML() ;
}
}
 
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('pers');
$GLOBALS['_BAZAR_']['url']->removeQueryString('droits');
$GLOBALS['_BAZAR_']['url']->removeQueryString('idtypeannonce');
 
return $res;
}
 
544,7 → 556,8
if ($mode == BAZ_ACTION_NOUVEAU) {
unset ($_SESSION['formulaire_annonce_valide']) ;
$lien_formulaire->addQueryString('action', BAZ_ACTION_NOUVEAU_V);
$formtemplate->updateAttributes(array('action' => str_replace('&amp;', '&', $lien_formulaire->getURL())));
$formtemplate->updateAttributes(array('action' => str_replace('&amp;', '&', $lien_formulaire->getURL())));
 
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate);
}
555,6 → 568,10
$res=baz_afficher_formulaire_annonce('modification',$formtemplate);
}
// Nettoyage de l'url avant les return
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
//------------------------------------------------------------------------------------------------
//CAS DE L'INSCRIPTION D'UNE ANNONCE
//------------------------------------------------------------------------------------------------
593,6 → 610,7
</fieldset>
</form>';
}
 
return $res;
}
 
1139,6 → 1157,11
</form>';
}
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('idtypeannonce');
$GLOBALS['_BAZAR_']['url']->removeQueryString('inscrip');
return $res;
}
 
1261,6 → 1284,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.57.2.9 2007/03/06 16:23:24 jp_milcent
* Nettoyage de l'url pour la gestion des droits.
*
* Revision 1.57.2.8 2007/03/05 14:33:44 jp_milcent
* Suppression de l'appel à Mes_Fiches dans la fonction baz_formulaire
*
/branches/livraison_menes/bibliotheque/bazar.fonct.formulaire.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.formulaire.php,v 1.22.2.1 2007-01-17 16:01:37 alexandre_tb Exp $
// CVS : $Id: bazar.fonct.formulaire.php,v 1.22.2.2 2007-03-07 17:20:19 jp_milcent Exp $
/**
* Formulaire
*
31,7 → 31,7
//Autres auteurs :
*@author Aleandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.22.2.1 $ $Date: 2007-01-17 16:01:37 $
*@version $Revision: 1.22.2.2 $ $Date: 2007-03-07 17:20:19 $
// +------------------------------------------------------------------------------------------------------+
*/
 
266,6 → 266,12
'<a href="'.$lien_supprimer->getURL().'" onclick="javascript:return confirm(\''.BAZ_CONFIRMATION_SUPPRESSION_LIEN.'\');" >'.BAZ_SUPPRIMER.'</a>'."\n")) ; // col 2 : supprimer
$lien_supprimer->removeQueryString('id_url');
}
 
// Nettoyage de l'url
$lien_supprimer->removeQueryString('action');
$lien_supprimer->removeQueryString('id_fiche');
$lien_supprimer->removeQueryString('typeannonce');
$table->altRowAttributes(1, array("class" => "ligne_impaire"), array("class" => "ligne_paire"));
$table->updateColAttributes(1, array("align" => "center"));
$html_url.= $table->toHTML()."\n".'</td>'."\n".'</tr>'."\n" ;
430,6 → 436,10
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.22.2.1 2007/01/17 16:01:37 alexandre_tb
* les dates ne s'affichent pas si elles sont vides.
* les champs dates propose 4 années avant l'année actuelle
*
* Revision 1.22 2006/06/02 09:29:07 florian
* debut d'integration de wikini
*
/branches/livraison_menes/bibliotheque/bazar.fonct.rss.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.rss.php,v 1.60.2.10 2007-03-06 09:41:15 alexandre_tb Exp $
// CVS : $Id: bazar.fonct.rss.php,v 1.60.2.11 2007-03-07 17:20:19 jp_milcent Exp $
/**
*
*@package bazar
28,7 → 28,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2006
*@version $Revision: 1.60.2.10 $
*@version $Revision: 1.60.2.11 $
// +------------------------------------------------------------------------------------------------------+
*/
 
462,6 → 462,11
$res .= '</div>'."\n";
}
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_commentaire');
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
return $res ;
}
 
526,6 → 531,9
}
else $res = BAZ_PAS_D_ANNONCES;
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
return $res;
}
 
686,6 → 694,11
}
$xml .= XML_Util::createEndElement ('channel');
$xml .= XML_Util::createEndElement('rss') ;
 
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
return $xml;
}
 
828,6 → 841,7
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->addQueryString($cle, $valeur);
$GLOBALS['_BAZAR_']['url']->addQueryString('recherche_avancee', '0');
$lien_recherche_de_base = '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_RECHERCHE_DE_BASE.'</a><br />';
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->removeQueryString($cle);
//lien recherche de base
labelhtml($formtemplate,'',$lien_recherche_de_base,'','','','','');
}
844,7 → 858,8
else {
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->addQueryString($cle, $valeur);
$GLOBALS['_BAZAR_']['url']->addQueryString('recherche_avancee', '1');
$lien_recherche_avancee = '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_RECHERCHE_AVANCEE.'</a><br />';
$lien_recherche_avancee = '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_RECHERCHE_AVANCEE.'</a><br />';
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->removeQueryString($cle);
}
}
945,6 → 960,13
$res .= '{{Syndication titre="'.BAZ_DERNIERES_FICHES.'" url="'.preg_replace ('/&amp;/', '&', $GLOBALS['_BAZAR_']['url']->getURL()).
'" nb=10 nouvellefenetre=0 formatdate="'.BAZ_TYPE_AFFICHAGE_LISTE.'"}}';
}
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('annonce');
$GLOBALS['_BAZAR_']['url']->removeQueryString('categorie_nature');
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee');
return $res;
}
 
1048,6 → 1070,12
$res .= '</ul>';
$res .= '<div class="bazar_numero">'.$pager->links.'</div>'."\n";
 
// Nettoyage de l'url
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee');
 
return $res ;
}
 
1054,6 → 1082,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.60.2.10 2007/03/06 09:41:15 alexandre_tb
* backport de corrections de bugs de la branche principale
*
* Revision 1.60.2.9 2007/02/27 15:32:40 alexandre_tb
* utilisation de la fonction xmlEntities pour transformer les &amp; en &#...;
* fixe les plantages des flux rss lorsque des guillemets ou des esperluettes étaient présents
/branches/livraison_menes/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.10.2.1 2007-02-15 13:42:16 jp_milcent Exp $
// CVS : $Id: bazar.fonct.cal.php,v 1.10.2.2 2007-03-07 17:20:19 jp_milcent 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.10.2.1 $ $Date: 2007-02-15 13:42:16 $
*@version $Revision: 1.10.2.2 $ $Date: 2007-03-07 17:20:19 $
// +------------------------------------------------------------------------------------------------------+
*/
 
41,24 → 41,24
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Day.php';
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Decorator.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
 
// Classe Utilitaire pour Calendrier
 
class DiaryEvent extends Calendar_Decorator {
var $entry=array();
function DiaryEvent($calendar) {
var $entry = array();
function DiaryEvent($calendar)
{
Calendar_Decorator::Calendar_Decorator($calendar);
}
function setEntry($entry) {
$this->entry[]=$entry;
function setEntry($entry)
{
$this->entry[] = $entry;
}
function getEntry() {
function getEntry()
{
return $this->entry;
}
}
66,15 → 66,13
 
// $type : calendrier
// $type : calendrier_appplette
 
function GestionAffichageCalendrier($type='calendrier') {
function GestionAffichageCalendrier($type = 'calendrier') {
$retour='';
$retour = '';
 
$url = $GLOBALS['_GEN_commun']['url'] ;
$db = &$GLOBALS['_GEN_commun']['pear_db'] ;
$auth = &$GLOBALS['_GEN_commun']['pear_auth'] ;
$db =& $GLOBALS['_GEN_commun']['pear_db'] ;
$auth =& $GLOBALS['_GEN_commun']['pear_auth'] ;
if (!isset($_GET['y'])) {
$_GET['y'] = date('Y');
84,30 → 82,31
$_GET['m'] = date('m');
}
// Construction Mois en Cours
$month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']);
 
$curStamp=$month->getTimeStamp();
$url->addQueryString ('y', date('Y',$curStamp));
$url->addQueryString ('m', date('n',$curStamp));
$url->addQueryString ('d', date('j',$curStamp));
$curStamp = $month->getTimeStamp();
$url->addQueryString('y', date('Y',$curStamp));
$url->addQueryString('m', date('n',$curStamp));
$url->addQueryString('d', date('j',$curStamp));
$cur = $url->getUrl();
// Navigation
$prevStamp = $month->prevMonth(true);
$url->addQueryString ('y', date('Y',$prevStamp));
$url->addQueryString ('m', date('n',$prevStamp));
$url->addQueryString ('d', date('j',$prevStamp));
$url->addQueryString('y', date('Y',$prevStamp));
$url->addQueryString('m', date('n',$prevStamp));
$url->addQueryString('d', date('j',$prevStamp));
$prev = $url->getUrl();
$nextStamp = $month->nextMonth(true);
$url->addQueryString ('y', date('Y',$nextStamp));
$url->addQueryString ('m', date('n',$nextStamp));
$url->addQueryString ('d', date('j',$nextStamp));
$url->addQueryString('y', date('Y',$nextStamp));
$url->addQueryString('m', date('n',$nextStamp));
$url->addQueryString('d', date('j',$nextStamp));
$next = $url->getUrl();
$fr_month = array( "1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN,
"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE);
 
$fr_month=array("1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN,"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE);
 
$retour.= "<div class=\"navi\">";
$retour.= "<a href=\"".$prev."\"> &lt;&lt; </a>";
 
304,9 → 303,13
' '.$_GET['d'].' '.$mois[$_GET['m']-1].' '.$_GET['y'].'</h1>' ;
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] .= baz_voir_fiches(0,$_GET['id_fiches'] );
}
 
// Nettoyage de l'url
$url->removeQueryString('id_fiches');
$url->removeQueryString('y');
$url->removeQueryString('m');
$url->removeQueryString('d');
return $retour;
}
 
?>