Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 529 → Rev 530

/trunk/sites/commun/generique/squelettes/defaut.html
26,6 → 26,10
<!-- Papyrus Selecteur Site Xhtml : -->
<!-- PAPYRUS_SELECTEUR_SITES_XHTML -->
</div>
<div id="bazar_applette_calendrier">
<!-- Client bazar calendrier : -->
<!-- CLIENT_BAZAR_CALENDRIER -->
</div>
<div id="logo">
<a href="/" title="Retour en page d'accueil">
<img src="sites/<!-- PAPYRUS_SITE_CODE_ALPHA -->/<!-- PAPYRUS_SITE_LANGUE -->/images/logo_papyrus.png" width="183" height="63" alt="Logo Papyrus" />
/trunk/client/bazar/presentations/styles/calendrier.css
File deleted
/trunk/client/bazar/bazar.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.php,v 1.9 2005-10-12 13:35:07 florian Exp $
// CVS : $Id: bazar.php,v 1.10 2005-10-12 17:20:33 ddelon Exp $
/**
*
*@package bazar
28,7 → 28,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.9 $ $Date: 2005-10-12 13:35:07 $
*@version $Revision: 1.10 $ $Date: 2005-10-12 17:20:33 $
// +------------------------------------------------------------------------------------------------------+
*/
 
44,7 → 44,7
define ('BAZ_GERER_DROITS', 5) ;
define ('BAZ_ADMINISTRER_ANNONCES', 6) ;
define ('BAZ_MODIFIER_FICHE', 7) ;
define ('BAZ_VOIR_FICHE', 8) ;
if (!defined('BAZ_VOIR_FICHE')) define ('BAZ_VOIR_FICHE', 8) ;
define ('BAZ_SUPPRIMER_FICHE', 9) ;
define ('BAZ_ACTION_NOUVEAU', 10) ;
define ('BAZ_ACTION_NOUVEAU_V', 11) ;
207,6 → 207,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.9 2005/10/12 13:35:07 florian
* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources
*
* Revision 1.8 2005/09/30 13:00:05 ddelon
* Fiche bazar generique
*
/trunk/client/bazar/bazar.calendrier.applette.php
New file
0,0 → 1,70
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// Copyright (C) 1999-2004 Tela Botanica (accueil@tela-botanica.org)
//
// Ce logiciel est un programme informatique servant à gérer du contenu et des
// applications web.
// Ce logiciel est régi par la licence CeCILL soumise au droit français et
// respectant les principes de diffusion des logiciels libres. Vous pouvez
// utiliser, modifier et/ou redistribuer ce programme sous les conditions
// de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
// sur le site "http://www.cecill.info".
 
// En contrepartie de l'accessibilité au code source et des droits de copie,
// de modification et de redistribution accordés par cette licence, il n'est
// offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,
// seule une responsabilité restreinte pèse sur l'auteur du programme, le
// titulaire des droits patrimoniaux et les concédants successifs.
 
// A cet égard l'attention de l'utilisateur est attirée sur les risques
// associés au chargement, à l'utilisation, à la modification et/ou au
// développement et à la reproduction du logiciel par l'utilisateur étant
// donné sa spécificité de logiciel libre, qui peut le rendre complexe à
// manipuler et qui le réserve donc à des développeurs et des professionnels
// avertis possédant des connaissances informatiques approfondies. Les
// utilisateurs sont donc invités à charger et tester l'adéquation du
// logiciel à leurs besoins dans des conditions permettant d'assurer la
// sécurité de leurs systèmes et ou de leurs données et, plus généralement,
// à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.
 
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
// pris connaissance de la licence CeCILL, et que vous en avez accepté les
// termes.
// ----
// CVS : $Id: bazar.calendrier.applette.php,v 1.1 2005-10-12 17:20:33 ddelon Exp $
/**
* bazar_calendrier : programme affichant les evenements du bazar sous forme de Calendrier
*
*
*@package Bazar
//Auteur original :
*@author David DELON <david.delon@clapas.net>
*@version $Revision: 1.1 $ $Date: 2005-10-12 17:20:33 $
// +------------------------------------------------------------------------------------------------------+
*/
 
if (!defined('BAZ_VOIR_FICHE')) {
define ('BAZ_VOIR_FICHE', 8);
}
 
include_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar
include_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar
 
include_once 'bibliotheque/bazar.fonct.cal.php'; //fichier des fonctions de Bazar
 
 
 
$GLOBALS['_CAL_']['nom_fonction'] = 'afficherCalendrier';
$_GEN_commun['info_applette_nom_fonction'] = $GLOBALS['_CAL_']['nom_fonction'];
// Balise : CLIENT_BAZAR_CALENDRIER
$_GEN_commun['info_applette_balise'] = 'BAZAR_CALENDRIER';
 
 
function afficherCalendrier() {
return GestionAffichageCalendrier('');
}
?>
/trunk/client/bazar/documentation/balises.txt
New file
0,0 → 1,2
Affichage calendrier :
CLIENT_BAZAR_CALENDRIER
/trunk/client/bazar/bazar.calendrier.php
32,7 → 32,7
// pris connaissance de la licence CeCILL, et que vous en avez accepté les
// termes.
// ----
// CVS : $Id: bazar.calendrier.php,v 1.4 2005-10-01 11:21:39 ddelon Exp $
// CVS : $Id: bazar.calendrier.php,v 1.5 2005-10-12 17:20:33 ddelon Exp $
/**
* bazar_calendrier : programme affichant les evenements du bazar sous forme de Calendrier
*
40,229 → 40,23
*@package Bazar
//Auteur original :
*@author David DELON <david.delon@clapas.net>
*@version $Revision: 1.4 $ $Date: 2005-10-01 11:21:39 $
*@version $Revision: 1.5 $ $Date: 2005-10-12 17:20:33 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// TODO : afficher evenement sur plusieur jours
// TODO : traduction entete mois calendrier
// Parametrage EVENEMENT : template
 
// Fonction Calendrier de Pear
 
require_once 'Calendar/Month/Weekdays.php';
require_once 'Calendar/Day.php';
require_once 'Calendar/Decorator.php';
 
define ('BAZ_VOIR_FICHE', 8) ;
if (!defined('BAZ_VOIR_FICHE')) {
define ('BAZ_VOIR_FICHE', 8);
}
include_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar
include_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar
 
 
include_once 'bibliotheque/bazar.fonct.cal.php'; //fichier des fonctions de Bazar
 
// Classe Utilitaire pour Calendrier
 
class DiaryEvent extends Calendar_Decorator {
var $entry=array();
function DiaryEvent($calendar) {
Calendar_Decorator::Calendar_Decorator($calendar);
}
function setEntry($entry) {
$this->entry[]=$entry;
}
function getEntry() {
return $this->entry;
}
}
 
 
function afficherContenuCorps() {
// Ajout d'une feuille de style externe
GEN_stockerStyleExterne ('wikini', 'client/bazar/presentations/styles/calendrier.css') ;
return GestionAffichageCalendrier('');
$retour='';
 
$url = $GLOBALS['_GEN_commun']['url'] ;
$db = &$GLOBALS['_GEN_commun']['pear_db'] ;
$auth = &$GLOBALS['_GEN_commun']['pear_auth'] ;
}
if (!isset($_GET['y'])) {
$_GET['y'] = date('Y');
}
if (!isset($_GET['m'])) {
$_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));
$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));
$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));
$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);
 
$retour.= "<div class=\"navi\">";
$retour.= "<a href=\"".$prev."\"> &lt;&lt; </a>";
 
$retour.= "&nbsp;&nbsp;";
$retour.= "<a href=\"".$cur;
$retour.= "\"> ";
$retour.= $fr_month[(date('n',$curStamp))];
$retour.= "&nbsp;";
$retour.= (date('Y',$curStamp));
$retour.= "</a>";
$retour.= "&nbsp;&nbsp;";
$retour.= "<a href=\"".$next."\"> &gt;&gt; </a>";
 
$retour.= "</div>";
 
$retour.="<br></br>";
 
// Vue Mois
if (!isset($_GET['id_fiche'])) {
// Recherche evenement de la periode selectionnée
// TODO : Selectionner element du mois en cours
$requete_evenements = "SELECT DISTINCT bf_id_fiche, bf_titre, bf_lieu_evenement, day(bf_date_debut_evenement) as bf_jour_debut_evenement , bf_date_fin_evenement, bf_description FROM bazar_fiche, bazar_nature where year(bf_date_debut_evenement) =".date('Y',$curStamp)." and month(bf_date_debut_evenement)=".date('m',$curStamp)." and bf_ce_nature=bn_id_nature and bn_label_nature='Évènements'";
$resultat_evenement = $db->query($requete_evenements);
(DB::isError($resultat_evenement))
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_evenement->getMessage(), $requete_evenements))
: '';
$calcom="";
$selection=array();
$evenements=array();
$prev_curday_ymd=0;
while ($ligne_evenements = $resultat_evenement->fetchRow(DB_FETCHMODE_OBJECT)) {
$curday_ymd=date('Ym',$curStamp).$ligne_evenements->bf_jour_debut_evenement;
if ($curday_ymd!=$prev_curday_ymd) {
$Day = new Calendar_Day(date('Y',$curStamp),date('m',$curStamp), $ligne_evenements->bf_jour_debut_evenement);
$DiaryEvent = new DiaryEvent($Day);
$prev_curday_ymd=$curday_ymd;
}
$DiaryEvent->setEntry($ligne_evenements);
// Add the decorator to the selection
$selection[] = $DiaryEvent;
}
// Affichage Calendrier
$month->build($selection);
$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);
// Other month : mois
//
while ($day = $month->fetch() ) {
$dayStamp = $day->thisDay(true);
$day_ymd=date('Ymd',$dayStamp);
if ( $day->isEmpty() ) {
$class = "other_month";
}
else {
if (($day_ymd < $today_ymd)) {
$class="previous_month";
}
else {
if ($day_ymd == $today_ymd) {
$class="current_day";
}
else {
$class="current_month";
}
}
}
$url->addQueryString ('y', date('Y',$dayStamp));
$url->addQueryString ('m', date('n',$dayStamp));
$url->addQueryString ('d', date('j',$dayStamp));
$link = $url->getUrl();
// isFirst() to find start of week
if ($day->isFirst())
$retour.= ( "<tr>\n" );
$retour.= ( "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n" );
if ($day->isSelected() ) {
$evenements=$day->getEntry();
while ($ligne_evenement=array_pop($evenements)) {
$url->addQueryString ('id_fiche',$ligne_evenement->bf_id_fiche);
$link = $url->getUrl();
$retour.= ( "<a href=\"".$link."\">".$ligne_evenement->bf_titre."</a>\n" );
}
}
$retour.= ( "</td>\n" );
// isLast() to find end of week
if ( $day->isLast() )
$retour.= ( "</tr>\n" );
}
$retour.= "</table>";
return $retour;
}
else {
// Vue jour
if (isset($_GET['id_fiche'])) {
return $retour.baz_voir_fiche(0, $_GET['id_fiche']);
}
}
}
?>
/trunk/client/bazar/bibliotheque/bazar.fonct.cal.php
New file
0,0 → 1,255
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | 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.1 2005-10-12 17:20:33 ddelon Exp $
/**
*
* Fonctions calendrier du module bazar
*
*@package bazar
//Auteur original :
*@author David Delon <david.delon@clapas.net>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-10-12 17:20:33 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
require_once 'Calendar/Month/Weekdays.php';
require_once 'Calendar/Day.php';
require_once 'Calendar/Decorator.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
 
// Classe Utilitaire pour Calendrier
 
class DiaryEvent extends Calendar_Decorator {
var $entry=array();
function DiaryEvent($calendar) {
Calendar_Decorator::Calendar_Decorator($calendar);
}
function setEntry($entry) {
$this->entry[]=$entry;
}
function getEntry() {
return $this->entry;
}
}
 
 
function GestionAffichageCalendrier($prefixe_cal) {
$retour='';
 
$url = $GLOBALS['_GEN_commun']['url'] ;
$db = &$GLOBALS['_GEN_commun']['pear_db'] ;
$auth = &$GLOBALS['_GEN_commun']['pear_auth'] ;
if (!isset($_GET['y'])) {
$_GET['y'] = date('Y');
}
if (!isset($_GET['m'])) {
$_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));
$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));
$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));
$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);
 
$retour.= "<div class=\"navi\">";
$retour.= "<a href=\"".$prev."\"> &lt;&lt; </a>";
 
$retour.= "&nbsp;&nbsp;";
$retour.= "<a href=\"".$cur;
$retour.= "\"> ";
$retour.= $fr_month[(date('n',$curStamp))];
$retour.= "&nbsp;";
$retour.= (date('Y',$curStamp));
$retour.= "</a>";
$retour.= "&nbsp;&nbsp;";
$retour.= "<a href=\"".$next."\"> &gt;&gt; </a>";
 
$retour.= "</div>";
 
$retour.="<br></br>";
 
// Vue Mois
if (!isset($_GET['id_fiche'])) {
// Recherche evenement de la periode selectionnée
// TODO : Selectionner element du mois en cours
$requete_evenements = "SELECT DISTINCT bf_id_fiche, bf_titre, bf_lieu_evenement, day(bf_date_debut_evenement) as bf_jour_debut_evenement , bf_date_fin_evenement, bf_description FROM bazar_fiche, bazar_nature where year(bf_date_debut_evenement) =".date('Y',$curStamp)." and month(bf_date_debut_evenement)=".date('m',$curStamp)." and bf_ce_nature=bn_id_nature and bn_label_nature='Évènements'";
$resultat_evenement = $db->query($requete_evenements);
(DB::isError($resultat_evenement))
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_evenement->getMessage(), $requete_evenements))
: '';
$calcom="";
$selection=array();
$evenements=array();
$prev_curday_ymd=0;
while ($ligne_evenements = $resultat_evenement->fetchRow(DB_FETCHMODE_OBJECT)) {
$curday_ymd=date('Ym',$curStamp).$ligne_evenements->bf_jour_debut_evenement;
if ($curday_ymd!=$prev_curday_ymd) {
$Day = new Calendar_Day(date('Y',$curStamp),date('m',$curStamp), $ligne_evenements->bf_jour_debut_evenement);
$DiaryEvent = new DiaryEvent($Day);
$prev_curday_ymd=$curday_ymd;
}
$DiaryEvent->setEntry($ligne_evenements);
// Add the decorator to the selection
$selection[] = $DiaryEvent;
}
// Affichage Calendrier
$month->build($selection);
$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);
// Other month : mois
//
while ($day = $month->fetch() ) {
$dayStamp = $day->thisDay(true);
$day_ymd=date('Ymd',$dayStamp);
if ( $day->isEmpty() ) {
$class = "other_month";
}
else {
if (($day_ymd < $today_ymd)) {
$class= "previous_month";
}
else {
if ($day_ymd == $today_ymd) {
$class= "current_day";
}
else {
$class="current_month";
}
}
}
$url->addQueryString ('y', date('Y',$dayStamp));
$url->addQueryString ('m', date('n',$dayStamp));
$url->addQueryString ('d', date('j',$dayStamp));
$link = $url->getUrl();
// isFirst() to find start of week
if ($day->isFirst())
$retour.= ( "<tr>\n" );
$retour.= ( "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n" );
if ($day->isSelected() ) {
$evenements=$day->getEntry();
while ($ligne_evenement=array_pop($evenements)) {
$url->addQueryString ('id_fiche',$ligne_evenement->bf_id_fiche);
$link = $url->getUrl();
$retour.= ( "<a href=\"".$link."\">".$ligne_evenement->bf_titre."</a>\n" );
}
}
$retour.= ( "</td>\n" );
// isLast() to find end of week
if ( $day->isLast() )
$retour.= ( "</tr>\n" );
}
$retour.= "</table>";
return $retour;
}
else {
// Vue jour
if (isset($_GET['id_fiche'])) {
return $retour.baz_voir_fiche(0, $_GET['id_fiche']);
}
}
;
}
 
?>
/trunk/client/bazar/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.10 2005-10-12 15:14:06 florian Exp $
// CVS : $Id: bazar.fonct.php,v 1.11 2005-10-12 17:20:33 ddelon 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.10 $ $Date: 2005-10-12 15:14:06 $
*@version $Revision: 1.11 $ $Date: 2005-10-12 17:20:33 $
// +------------------------------------------------------------------------------------------------------+
*/
 
38,6 → 38,12
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// TODO : afficher evenement sur plusieur jours
// TODO : traduction entete mois calendrier
// Parametrage EVENEMENT : template
 
 
 
require_once 'HTML/QuickForm.php' ;
require_once 'HTML/QuickForm/checkbox.php' ;
require_once 'HTML/QuickForm/textarea.php' ;
1362,6 → 1368,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.10 2005/10/12 15:14:06 florian
* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources
*
* Revision 1.9 2005/10/10 16:22:52 alexandre_tb
* Correction de bug. Lorsqu'on revient en arrière après avoir validé un formulaire.
*
/trunk/papyrus/pap_rendu.inc.php
32,7 → 32,7
// pris connaissance de la licence CeCILL, et que vous en avez accepté les
// termes.
// ----
// CVS : $Id: pap_rendu.inc.php,v 1.18 2005-09-22 14:02:49 ddelon Exp $
// CVS : $Id: pap_rendu.inc.php,v 1.19 2005-10-12 17:20:33 ddelon Exp $
/**
* Rendu : programme traitant l'url demandée et retournant la page compressé au navigateur.
*
48,7 → 48,7
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@author Laurent COUDOUNEAU <laurent.coudouneau@ema.fr>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.18 $ $Date: 2005-09-22 14:02:49 $
*@version $Revision: 1.19 $ $Date: 2005-10-12 17:20:33 $
// +------------------------------------------------------------------------------------------------------+
*/
 
306,7 → 306,7
$GLOBALS['_GEN_commun']['info_applette'][$i]->applette_fonction = $GLOBALS['_GEN_commun']['info_applette_nom_fonction'];
} else {
// Ne devrait pas arréter le programme! Mais instancier le gestionnaire de déboguage.
die('ERREUR Papyrus : Impossible de trouver le fichier de l\'applette. <br />'.
echo('ERREUR Papyrus : Impossible de trouver le fichier de l\'applette. <br />'.
'Nom applette : '.$GLOBALS['_GEN_commun']['info_applette'][$i]->gap_nom.' <br />'.
'Chemin fichier applette : '.$GLOBALS['_GEN_commun']['info_applette'][$i]->gap_chemin.' <br />'.
'Ligne n° : '. __LINE__ .'<br />'.
377,7 → 377,7
$GLOBALS['_GEN_commun']['balise_prefixe'] = 'PAPYRUS_';
 
// +------------------------------------------------------------------------------------------------------+
// Gestion des appels des fonctions d'applettes
// Gestion des appels des fonctions d'applettes de papyrus
 
for ($i = 0; $i < count($GLOBALS['_GEN_commun']['info_applette']); $i++) {
// Recherche du nombre de balise d'une applette donnée présentes dans le squelette
416,7 → 416,51
}
}
 
 
 
// +------------------------------------------------------------------------------------------------------+
// Gestion des appels des fonctions d'applettes des applications clientes de papyrus
 
$GLOBALS['_GEN_commun']['balise_prefixe_client'] = 'CLIENT_';
 
for ($i = 0; $i < count($GLOBALS['_GEN_commun']['info_applette']); $i++) {
// Recherche du nombre de balise d'une applette donnée présentes dans le squelette
$GLOBALS['_PAPYRUS_']['applette']['nbr_balise'] = preg_match_all(
'/<!-- '.$GLOBALS['_GEN_commun']['balise_prefixe_client'].'('.$GLOBALS['_GEN_commun']['info_applette'][$i]->applette_balise.') -->/',
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette'],
$GLOBALS['_PAPYRUS_']['applette']['applet_arguments'],
PREG_SET_ORDER);
// Si on trouve au moins une balise, on lance la boucle pour les remplacer
for ($j = 0; $j <= ($GLOBALS['_PAPYRUS_']['applette']['nbr_balise'] - 1); $j++) {
// Nous vérifions que le nom de la fonction principale de l'applette existe.
if (function_exists($GLOBALS['_GEN_commun']['info_applette'][$i]->applette_fonction)) {
// Nous comptabilisons le nombre d'utilisation des applettes dans un squelette:
if (!isset($GLOBALS['_PAPYRUS_']['applette']['comptage'][$GLOBALS['_GEN_commun']['info_applette'][$i]->applette_fonction])) {
$GLOBALS['_PAPYRUS_']['applette']['comptage'][$GLOBALS['_GEN_commun']['info_applette'][$i]->applette_fonction] = 1;
} else {
$GLOBALS['_PAPYRUS_']['applette']['comptage'][$GLOBALS['_GEN_commun']['info_applette'][$i]->applette_fonction]++;
}
$GLOBALS['_PAPYRUS_']['applette']['contenu_applette'] =
call_user_func( $GLOBALS['_GEN_commun']['info_applette'][$i]->applette_fonction,
$GLOBALS['_PAPYRUS_']['applette']['applet_arguments'][$j],
$GLOBALS['_GEN_commun']);
} else {
$GLOBALS['_PAPYRUS_']['applette']['contenu_applette'] =
'<!-- '."\n".
$GLOBALS['_PAPYRUS_']['applette']['applet_arguments'][$j][1].' : '.
'fonction de l\'applette "'.$GLOBALS['_GEN_commun']['info_applette'][$i]->gap_nom.'" introuvable! '."\n".
'Fonction : '.$GLOBALS['_GEN_commun']['info_applette'][$i]->applette_fonction."\n".
' -->';
}
// Remplacement des balises d'applette de Génésia dans le squelette
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette'] =
str_replace( '<!-- '.$GLOBALS['_GEN_commun']['balise_prefixe_client'].$GLOBALS['_PAPYRUS_']['applette']['applet_arguments'][$j][1].' -->',
$GLOBALS['_PAPYRUS_']['applette']['contenu_applette'],
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette']);
}
}
 
// +------------------------------------------------------------------------------------------------------+
// Continuation recherche d'info provenant de Papyrus pour la complétion du squelette
 
// Une fois l'application appelé est executé nous affichons le contenu de l'entête qui a pu
457,6 → 501,9
/* +--Fin du code ---------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.18 2005/09/22 14:02:49 ddelon
* nettoyage annuaire et php5
*
* Revision 1.17 2005/09/20 17:01:22 ddelon
* php5 et bugs divers
*
/trunk/papyrus/bibliotheque/fonctions/pap_style.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: pap_style.fonct.php,v 1.2 2004-12-06 17:53:32 jpm Exp $
// CVS : $Id: pap_style.fonct.php,v 1.3 2005-10-12 17:20:33 ddelon Exp $
/**
* Les fonctions permettant d'inclure des styles CSS.
*
34,7 → 34,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2004-12-06 17:53:32 $
*@version $Revision: 1.3 $ $Date: 2005-10-12 17:20:33 $
// +------------------------------------------------------------------------------------------------------+
*/
// +------------------------------------------------------------------------------------------------------+
107,12 → 107,7
$_GEN_commun['style_externe'][$id_fichier]['media'] = $media;
$_GEN_commun['style_externe'][$id_fichier]['titre'] = $titre;
$_GEN_commun['style_externe'][$id_fichier]['chemin'] = $chemin_fichier;
} else {
die('ERREUR Papyrus : cet identifiant de fichier à déjà été enregistré par GEN_stockerStyleExterne(). <br />'.
'Identifiant : '. $id_fichier .'<br />'.
'Ligne n° : '. __LINE__ .'<br />'.
'Fichier : '. __FILE__);
}
}
}
 
/** Fonction GEN_afficherStyle() - Permet de renvoyer les styles dans l'entete.
165,6 → 160,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2004/12/06 17:53:32 jpm
* Correction Génésia en Papyrus.
*
* Revision 1.1 2004/06/15 15:14:32 jpm
* Changement de nom et d'arborescence de Genesia en Papyrus.
*