Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 544 → Rev 545

/trunk/client/bazar/bazar.calendrier.applette.php
32,7 → 32,7
// pris connaissance de la licence CeCILL, et que vous en avez accepté les
// termes.
// ----
// CVS : $Id: bazar.calendrier.applette.php,v 1.3 2005-10-14 12:59:24 ddelon Exp $
// CVS : $Id: bazar.calendrier.applette.php,v 1.4 2005-10-17 13:41:34 ddelon Exp $
/**
* bazar_calendrier : programme affichant les evenements du bazar sous forme de Calendrier
*
40,7 → 40,7
*@package Bazar
//Auteur original :
*@author David DELON <david.delon@clapas.net>
*@version $Revision: 1.3 $ $Date: 2005-10-14 12:59:24 $
*@version $Revision: 1.4 $ $Date: 2005-10-17 13:41:34 $
// +------------------------------------------------------------------------------------------------------+
*/
 
67,7 → 67,4
}
?>
 
 
 
?>
/trunk/client/bottin/index.php
1,3 → 1,3
<?php
header('Location:inscription.php');
?>
?>
/trunk/client/integrateur_wikini/integrateur_wikini.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: integrateur_wikini.php,v 1.10 2005-10-01 11:13:43 ddelon Exp $
// CVS : $Id: integrateur_wikini.php,v 1.11 2005-10-17 13:41:34 ddelon Exp $
/**
* Integrateur de page Wikini
*
33,7 → 33,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.10 $ $Date: 2005-10-01 11:13:43 $
*@version $Revision: 1.11 $ $Date: 2005-10-17 13:41:34 $
*
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
41,204 → 41,6
 
 
 
 
/** Inclusion de la classe PEAR de gestion des URL. */
 
 
$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
 
require_once 'Net/URL.php';
 
// TODO : un seul fichier de configuration ?
/** Inclusion du fichier de configuration de cette application.*/
require_once 'client/integrateur_wikini/configuration/adwi_configuration.inc.php';
 
require_once ADWI_CHEMIN_BIBLIOTHEQUE.'adwi_wikini.fonct.php';
 
/** Inclusion du fichier de configuration général de IntegrateurWikini.*/
require_once 'client'.GEN_SEP.'integrateur_wikini'.GEN_SEP.'configuration'.GEN_SEP.'iw_config.inc.php';
 
/** Inclusion du fichier permettant d'encoder du texte mais pas les balises XHTML.*/
require_once IW_CHEMIN_BIBLIO.'iw_encodage.fonct.php';
/** Inclusion du fichier permettant d'inclure les données dans du XHTML.*/
require_once IW_CHEMIN_BIBLIO.'iw_affichage_xhtml.fonct.php';
 
global $wikini_config_defaut;
global $wiki;
global $wiki_p;
 
// $_REQUEST['wiki'] est obligatoire, car wakka.php envoie un redirect si non detecté, avec perte de tout l'environnement !
 
if ( ! isset( $_REQUEST['wiki'] ) ) {
$_REQUEST['wiki'] = $wikini_config_defaut['root_page'];
}
 
$server=$_SERVER['PHP_SELF'];
$_SERVER['PHP_SELF']="wakka.php";
 
// Utilise le wakkaconfig de la racine ...
// TODO : Prevoir de revoir la contrib menu ... qui doit être switchable, ou plutot,
// TODO : Customiser son menu avec papyrus ...
// TODO : un wiki par défaut pour chaque papyrus à l'installation de Papyrus
// TODO : message erreur session
// TODO : message erreur interwiki
// TODO : verifier bon dimensionnement des champs et clef de la table papyrus_wiki
// TODO : creation des tables par defaut à l'installation d'un wikini
// TODO : Fusion des fichiers de configuration ?
// TODO : creation automatique des Wikis ...
 
ob_start();
 
include_once IW_CHEMIN_WIKINI_COURANT.'wakka.php';
ob_end_clean();
$_SERVER['PHP_SELF']=$server;
 
 
// On surcharge la classe Wiki pour en faire ce qu'on en veut
Class Wiki_Papyrus extends Wiki {
//TODO : a gauche !
function Header() {
return;
}
function Footer() {
return;
}
function FormOpen($method = "", $tag = "", $formMethod = "post") {
// Le diff ne fonctionne pas avec la methode get dans papyrus. On surcharge avec du post.
if (($method=="diff") && $formMethod=="get") {
$formMethod="post";
}
if ($method=="edit") {
$result = "<form id=\"ACEditor\" name=\"ACEditor\" action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
return $result;
}
return parent::FormOpen($method,$tag, $formMethod);
}
// Detournement des handlers : comme ca on peut faire ce que l'on veut ....
function Method($method) {
if ($method=="edit") {
echo $this->Header();
$result='';
if ($_POST) {
if ($_POST["submit"] == "Sauver") {
// check for overwriting
if ($this->page) {
if ($this->page["id"] != $_POST["previous"]) {
$error = "ALERTE : ".
"Cette page a &eacute;t&eacute; modifi&eacute;e par quelqu'un d'autre pendant que vous l'&eacute;ditiez.<br />\n".
"Veuillez copier vos changements et r&eacute;&eacute;diter cette page.\n";
}
}
// store
if (!$error) {
$body = str_replace("\r", "", $_POST["body"]);
// test si la nouvelle page est differente de la précédente
if(rtrim($body)==rtrim($this->page["body"])) {
$this->SetMessage("Cette page n\'a pas &eacute;t&eacute; enregistr&eacute;e car elle n\'a subi aucune modification.");
$this->Redirect($this->href());
}
// add page (revisions)
$this->SavePage($this->tag, $body);
// now we render it internally so we can write the updated link table.
$this->ClearLinkTable();
$this->StartLinkTracking();
$dummy = $this->Header();
$dummy .= $this->Format($body);
$dummy .= $this->Footer();
$this->StopLinkTracking();
$this->WriteLinkTable();
$this->ClearLinkTable();
// forward
$this->Redirect($this->href());
}
}
}
 
// fetch fields
if (!$previous = $_POST["previous"]) $previous = $this->page["id"];
if (!$body = $_POST["body"]) $body = $this->page["body"];
// preview?
if ($_POST["submit"] == "Aperçu")
{
$result .=
"<div class=\"prev_alert\"><strong>Aper&ccedil;u</strong></div>\n".
$this->Format($body)."\n\n".
$this->FormOpen("edit").
"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".
"<input type=\"hidden\" name=\"body\" value=\"".htmlentities($body)."\" />\n".
"<br />\n".
"<input name=\"submit\" type=\"submit\" value=\"Sauver\" accesskey=\"s\" />\n".
"<input name=\"submit\" type=\"submit\" value=\"R&eacute;&eacute;diter \" accesskey=\"p\" />\n".
"<input type=\"button\" value=\"Annulation\" onclick=\"document.location='".$this->href("")."';\" />\n".
$this->FormClose()."\n";
return $result;
}
else
{
require_once(IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.buttonsBar.php");
$result .=
$this->FormOpen("edit").
"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".$ACbuttonsBar.
"<textarea onkeydown=\"fKeyDown()\" name=\"body\" cols=\"60\" rows=\"40\" wrap=\"soft\" class=\"edit\">\n".
htmlspecialchars($body).
"\n</textarea><br />\n".
($this->config["preview_before_save"] ? "" : "<input name=\"submit\" type=\"submit\" value=\"Sauver\" accesskey=\"s\" />\n").
"<input name=\"submit\" type=\"submit\" value=\"Aper&ccedil;u\" accesskey=\"p\" />\n".
"<input type=\"button\" value=\"Annulation\" onclick=\"document.location='".$this->href("")."';\" />\n".
$this->FormClose();
return $result;
}
}
else {
return parent::Method($method);
}
}
// Surcharge Format a cause probleme de chemin.
function Format($text, $formatter = "wakka") {
return $this->IncludeBuffered(IW_CHEMIN_WIKINI_COURANT_FORMATTER.$formatter.".php", "<i>Impossible de trouver le formateur \"$formatter\"</i>", compact("text"));
}
}
 
// Appel du fichier de traduction des textes de l'application Integrateur Wikini
if (file_exists(IW_CHEMIN_LANGUES.'iw_langue_'.IW_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Integrateur Wikini. */
include_once IW_CHEMIN_LANGUES.'iw_langue_'.IW_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once IW_CHEMIN_LANGUES.'iw_langue_fr.inc.php';
}
 
$GLOBALS['_PAPYRUS_']['erreur']->setActive(1);
/**
* Renvoie le menu général de l'integrateur Wikini : derniers changement etc.
*
246,49 → 48,12
* @access public
*/
require_once 'client/integrateur_wikini/bibliotheque/iw_integrateur.fonct.php';
 
 
function afficherContenuMenu()
{
$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
 
// TODO
// Changement du niveau d'erreur pour éviter les Notices PHP dues à Wikini
// error_reporting(E_PARSE);
// Autre possibilite : la page speciale MENU
global $wiki;
global $wikini_config_defaut;
$sortie='';
$wakkaConfig = $GLOBALS['wikini_config_defaut'];
$wiki = new Wiki_Papyrus($wakkaConfig);
 
// Suppression des slash.
$_REQUEST['wiki'] = preg_replace("/^\//", '', $_REQUEST['wiki']);
 
// split into page/method
if ( preg_match( "#^(.+?)/(.*)$#", $_REQUEST['wiki'], $matches ) ) {
list(, $page, $method) = $matches;
} else if ( preg_match( "#^(.*)$#", $_REQUEST['wiki'], $matches ) ) {
list(, $page) = $matches;
}
 
$server=$_SERVER['PHP_SELF'];
$_SERVER['PHP_SELF']="wakka.php";
// Sinon Affichage Page Menu (configurable TODO ?)
$contenu=$wiki->LoadPage("PageMenu");
$sortie.=$wiki->Format("----");
$sortie.=$wiki->Format($contenu['body']);
 
$_SERVER['PHP_SELF']=$server;
$GLOBALS['_PAPYRUS_']['erreur']->setActive(1);
return $sortie;
return afficherPageMenuWikini();
}
303,65 → 68,9
*/
function afficherContenuCorps()
{
 
$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
return afficherPageWikini();
// Ajout d'une feuille de style externe
GEN_stockerStyleExterne ('wikini', 'client/integrateur_wikini/presentations/styles/wikini.css') ;
// TODO
// Changement du niveau d'erreur pour éviter les Notices PHP dues à Wikini
global $wiki;
global $wikini_config_defaut;
$sortie='';
$wakkaConfig = $GLOBALS['wikini_config_defaut'];
$wiki = new Wiki_Papyrus($wakkaConfig);
 
 
// Gestion de la variable de session "linktracking"
if ( ! isset( $_SESSION['linktracking'] ) ) {
$_SESSION['linktracking'] = 1;
}
 
// Suppression des slash.
$_REQUEST['wiki'] = preg_replace("/^\//", '', $_REQUEST['wiki']);
 
// split into page/method
if ( preg_match( "#^(.+?)/(.*)$#", $_REQUEST['wiki'], $matches ) ) {
list(, $page, $method) = $matches;
} else if ( preg_match( "#^(.*)$#", $_REQUEST['wiki'], $matches ) ) {
list(, $page) = $matches;
}
// Vérification de la méthode d'affichage employée!
if ( ! isset( $method ) ) {
$method = '';
}
//Récupération du contenu de la page Wikini
ob_start();
$server=$_SERVER['PHP_SELF'];
$_SERVER['PHP_SELF']="wakka.php";
$wiki->Run($page, $method);
$_SERVER['PHP_SELF']=$server;
$sortie.= ob_get_contents();
ob_end_clean();
 
$GLOBALS['_PAPYRUS_']['erreur']->setActive(1);
 
//return remplacerEntiteHTLM("<div id=\"wikini_page\" onLoad=\"thisForm=document.ACEditor;\" ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\" ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
}
 
 
// TODO : qu'affiche-t-on en pied ?
/** Fonction afficherContenuPied() - Fonction appelé par le gestionnaire Papyrus.
*
/trunk/client/integrateur_wikini/bibliotheque/iw_integrateur.fonct.php
New file
0,0 → 1,364
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Integrateur Wikini. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar 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 General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: iw_integrateur.fonct.php,v 1.1 2005-10-17 13:41:34 ddelon Exp $
/**
* Fonctions de l'integrateur de page Wikini
*
* Application permettant d'intégrer des pages wikini dans Papyrus.
*
*@package IntegrateurWikini
//Auteur original :
*@author David Delon <david.delon@clapas.net>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-10-17 13:41:34 $
*
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
 
/** Inclusion de la classe PEAR de gestion des URL. */
 
$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
 
require_once 'Net/URL.php';
 
// TODO : un seul fichier de configuration ?
/** Inclusion du fichier de configuration de cette application.*/
require_once 'client/integrateur_wikini/configuration/adwi_configuration.inc.php';
 
require_once ADWI_CHEMIN_BIBLIOTHEQUE.'adwi_wikini.fonct.php';
 
/** Inclusion du fichier de configuration général de IntegrateurWikini.*/
require_once 'client'.GEN_SEP.'integrateur_wikini'.GEN_SEP.'configuration'.GEN_SEP.'iw_config.inc.php';
 
/** Inclusion du fichier permettant d'encoder du texte mais pas les balises XHTML.*/
require_once IW_CHEMIN_BIBLIO.'iw_encodage.fonct.php';
/** Inclusion du fichier permettant d'inclure les données dans du XHTML.*/
require_once IW_CHEMIN_BIBLIO.'iw_affichage_xhtml.fonct.php';
 
global $wikini_config_defaut;
global $wiki;
global $wiki_p;
 
// $_REQUEST['wiki'] est obligatoire, car wakka.php envoie un redirect si non detecté, avec perte de tout l'environnement !
 
if ( ! isset( $_REQUEST['wiki'] ) ) {
$_REQUEST['wiki'] = $wikini_config_defaut['root_page'];
}
 
$server=$_SERVER['PHP_SELF'];
$_SERVER['PHP_SELF']="wakka.php";
 
// Utilise le wakkaconfig de la racine ...
// TODO : un wiki par défaut pour chaque papyrus à l'installation de Papyrus
// TODO : verifier bon dimensionnement des champs et clef de la table papyrus_wiki
// TODO : creation des tables par defaut à l'installation d'un wikini
// TODO : Fusion des fichiers de configuration ?
 
 
ob_start();
 
include_once IW_CHEMIN_WIKINI_COURANT.'wakka.php';
 
ob_end_clean();
$_SERVER['PHP_SELF']=$server;
 
 
// On surcharge la classe Wiki pour en faire ce qu'on en veut
Class Wiki_Papyrus extends Wiki {
//TODO : a gauche !
function Header() {
return;
}
function Footer() {
return;
}
function FormOpen($method = "", $tag = "", $formMethod = "post") {
// Le diff ne fonctionne pas avec la methode get dans papyrus. On surcharge avec du post.
if (($method=="diff") && $formMethod=="get") {
$formMethod="post";
}
if ($method=="edit") {
$result = "<form id=\"ACEditor\" name=\"ACEditor\" action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
return $result;
}
return parent::FormOpen($method,$tag, $formMethod);
}
// Detournement des handlers : comme ca on peut faire ce que l'on veut ....
function Method($method) {
if ($method=="edit") {
echo $this->Header();
$result='';
if ($_POST) {
if ($_POST["submit"] == "Sauver") {
// check for overwriting
if ($this->page) {
if ($this->page["id"] != $_POST["previous"]) {
$error = "ALERTE : ".
"Cette page a &eacute;t&eacute; modifi&eacute;e par quelqu'un d'autre pendant que vous l'&eacute;ditiez.<br />\n".
"Veuillez copier vos changements et r&eacute;&eacute;diter cette page.\n";
}
}
// store
if (!$error) {
$body = str_replace("\r", "", $_POST["body"]);
// test si la nouvelle page est differente de la précédente
if(rtrim($body)==rtrim($this->page["body"])) {
$this->SetMessage("Cette page n\'a pas &eacute;t&eacute; enregistr&eacute;e car elle n\'a subi aucune modification.");
$this->Redirect($this->href());
}
// add page (revisions)
$this->SavePage($this->tag, $body);
// now we render it internally so we can write the updated link table.
$this->ClearLinkTable();
$this->StartLinkTracking();
$dummy = $this->Header();
$dummy .= $this->Format($body);
$dummy .= $this->Footer();
$this->StopLinkTracking();
$this->WriteLinkTable();
$this->ClearLinkTable();
// forward
$this->Redirect($this->href());
}
}
}
 
// fetch fields
if (!$previous = $_POST["previous"]) $previous = $this->page["id"];
if (!$body = $_POST["body"]) $body = $this->page["body"];
// preview?
if ($_POST["submit"] == "Aperçu")
{
$result .=
"<div class=\"prev_alert\"><strong>Aper&ccedil;u</strong></div>\n".
$this->Format($body)."\n\n".
$this->FormOpen("edit").
"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".
"<input type=\"hidden\" name=\"body\" value=\"".htmlentities($body)."\" />\n".
"<br />\n".
"<input name=\"submit\" type=\"submit\" value=\"Sauver\" accesskey=\"s\" />\n".
"<input name=\"submit\" type=\"submit\" value=\"R&eacute;&eacute;diter \" accesskey=\"p\" />\n".
"<input type=\"button\" value=\"Annulation\" onclick=\"document.location='".$this->href("")."';\" />\n".
$this->FormClose()."\n";
return $result;
}
else
{
require_once(IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.buttonsBar.php");
$result .=
$this->FormOpen("edit").
"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".$ACbuttonsBar.
"<textarea onkeydown=\"fKeyDown()\" name=\"body\" cols=\"60\" rows=\"40\" wrap=\"soft\" class=\"edit\">\n".
htmlspecialchars($body).
"\n</textarea><br />\n".
($this->config["preview_before_save"] ? "" : "<input name=\"submit\" type=\"submit\" value=\"Sauver\" accesskey=\"s\" />\n").
"<input name=\"submit\" type=\"submit\" value=\"Aper&ccedil;u\" accesskey=\"p\" />\n".
"<input type=\"button\" value=\"Annulation\" onclick=\"document.location='".$this->href("")."';\" />\n".
$this->FormClose();
return $result;
}
}
else {
return parent::Method($method);
}
}
// Surcharge Format a cause probleme de chemin.
function Format($text, $formatter = "wakka") {
return $this->IncludeBuffered(IW_CHEMIN_WIKINI_COURANT_FORMATTER.$formatter.".php", "<i>Impossible de trouver le formateur \"$formatter\"</i>", compact("text"));
}
}
 
// Appel du fichier de traduction des textes de l'application Integrateur Wikini
if (file_exists(IW_CHEMIN_LANGUES.'iw_langue_'.IW_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Integrateur Wikini. */
include_once IW_CHEMIN_LANGUES.'iw_langue_'.IW_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once IW_CHEMIN_LANGUES.'iw_langue_fr.inc.php';
}
 
$GLOBALS['_PAPYRUS_']['erreur']->setActive(1);
/**
*
* Fonction afficherPageMenuWikini()
*
* Renvoie le contenu de la page Menu de Wikini
*
* @return string
* @access public
*/
function afficherPageMenuWikini()
{
$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
 
// TODO
// Changement du niveau d'erreur pour éviter les Notices PHP dues à Wikini
// error_reporting(E_PARSE);
// Autre possibilite : la page speciale MENU
global $wiki;
global $wikini_config_defaut;
$sortie='';
$wakkaConfig = $GLOBALS['wikini_config_defaut'];
$wiki = new Wiki_Papyrus($wakkaConfig);
 
// Suppression des slash.
$_REQUEST['wiki'] = preg_replace("/^\//", '', $_REQUEST['wiki']);
 
// split into page/method
if ( preg_match( "#^(.+?)/(.*)$#", $_REQUEST['wiki'], $matches ) ) {
list(, $page, $method) = $matches;
} else if ( preg_match( "#^(.*)$#", $_REQUEST['wiki'], $matches ) ) {
list(, $page) = $matches;
}
 
$server=$_SERVER['PHP_SELF'];
$_SERVER['PHP_SELF']="wakka.php";
// Sinon Affichage Page Menu (configurable TODO ?)
$contenu=$wiki->LoadPage("PageMenu");
$sortie.=$wiki->Format("----");
$sortie.=$wiki->Format($contenu['body']);
 
$_SERVER['PHP_SELF']=$server;
$GLOBALS['_PAPYRUS_']['erreur']->setActive(1);
return $sortie;
}
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Fonction afficherPageWikini() - Fonction appelé par le gestionnaire Papyrus.
*
* Elle retourne le contenu de l'application.
*
* @return string du code XHTML correspondant au contenu renvoyé par l'application.
*/
function afficherPageWikini()
{
 
$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
// Ajout d'une feuille de style externe
GEN_stockerStyleExterne ('wikini', 'client/integrateur_wikini/presentations/styles/wikini.css') ;
// TODO
// Changement du niveau d'erreur pour éviter les Notices PHP dues à Wikini
global $wiki;
global $wikini_config_defaut;
$sortie='';
$wakkaConfig = $GLOBALS['wikini_config_defaut'];
$wiki = new Wiki_Papyrus($wakkaConfig);
 
 
// Gestion de la variable de session "linktracking"
if ( ! isset( $_SESSION['linktracking'] ) ) {
$_SESSION['linktracking'] = 1;
}
 
// Suppression des slash.
$_REQUEST['wiki'] = preg_replace("/^\//", '', $_REQUEST['wiki']);
 
// split into page/method
if ( preg_match( "#^(.+?)/(.*)$#", $_REQUEST['wiki'], $matches ) ) {
list(, $page, $method) = $matches;
} else if ( preg_match( "#^(.*)$#", $_REQUEST['wiki'], $matches ) ) {
list(, $page) = $matches;
}
// Vérification de la méthode d'affichage employée!
if ( ! isset( $method ) ) {
$method = '';
}
//Récupération du contenu de la page Wikini
ob_start();
$server=$_SERVER['PHP_SELF'];
$_SERVER['PHP_SELF']="wakka.php";
$wiki->Run($page, $method);
$_SERVER['PHP_SELF']=$server;
$sortie.= ob_get_contents();
ob_end_clean();
 
$GLOBALS['_PAPYRUS_']['erreur']->setActive(1);
 
//return remplacerEntiteHTLM("<div id=\"wikini_page\" onLoad=\"thisForm=document.ACEditor;\" ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
return remplacerEntiteHTLM("<script type=\"text/javascript\" src=\"".IW_CHEMIN_BIBLIO_ACEDITOR."ACeditor.js\"></script><div id=\"wikini_page\" ondblclick=\"document.location='".$wiki->href("edit")."';"."\">"."\n".$sortie.'</div>'."\n");
}
 
 
?>
/trunk/client/projet/classes/projetControleur.class.php
20,7 → 20,7
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
 
// CVS : $Id: projetControleur.class.php,v 1.12 2005-10-14 08:49:32 alexandre_tb Exp $
// CVS : $Id: projetControleur.class.php,v 1.13 2005-10-17 13:41:34 ddelon Exp $
 
/**
* Application projet
33,7 → 33,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.12 $
*@version $Revision: 1.13 $
// +------------------------------------------------------------------------------------------------------+
*/
 
1704,7 → 1704,7
$liste = new HTML_TableFragmenteur () ;
$liste->construireEntete(array (PROJET_NOM_WIKINI,PROJET_PAGE, PROJET_SELECTIONNER)) ;
$liste->construireEntete(array (PROJET_NOM_WIKINI,PROJET_PAGE_WIKINI, PROJET_SELECTIONNER_WIKINI)) ;
$tableau_wikini = array() ;
1712,7 → 1712,7
$this->_url->addQueryString ('id_wikini', $ligne[0]) ;
array_push ($tableau_wikini, array ($ligne[1]."\n", // Première colonne, le nom de l'application
$ligne[2]."\n", // Deuxieme colonne, la page par defaut
'<a href="'.$this->_url->getURL()."&amp;".PROJET_VARIABLE_ACTION."=".PROJET_ACTION_ASSOCIER_WIKI_V."".'">'.PROJET_CHOISIR.'</a>'."\n",
'<a href="'.$this->_url->getURL()."&amp;".PROJET_VARIABLE_ACTION."=".PROJET_ACTION_ASSOCIER_WIKI_V."".'">'.PROJET_CHOISIR_WIKINI.'</a>'."\n",
));
}
$liste->construireListe($tableau_wikini) ;
1751,7 → 1751,33
}
} // end of member function creationWiki
 
/**
* Associe un wiki au projet courant
*
* @return void
* @access public
*/
 
function associationWiki( ) {
if (isset($_GET['id_wikini'])) {
$db = &$GLOBALS['_GEN_commun']['pear_db'] ;
$requete = "select gewi_code_alpha_wikini from gen_wikini where gewi_id_wikini = ".$_GET['id_wikini'] ;
$resultat = $db->query ($requete) ;
if (DB::isError ($resultat)) {
$GLOBALS['_GEN_commun']['debogage_erreur']->gererErreur(E_USER_WARNING, "Echec de la requete : $requete<br />".$resultat->getMessage(),
__FILE__, __LINE__, 'admin_wikini') ;
return ;
}
$ligne = $resultat->fetchRow();
$projet = new projet($this->_db, $this->_id_projet) ;
$projet->majNomWikini($ligne[0]);
}
}
 
/**
* Supprime le wiki du projet courant
*
/trunk/client/projet/actions/wikini.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: wikini.php,v 1.2 2005-09-27 16:43:53 alexandre_tb Exp $
// CVS : $Id: wikini.php,v 1.3 2005-10-17 13:41:35 ddelon Exp $
/**
* Application projet
*
31,7 → 31,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.2 $
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
44,21 → 44,27
//
 
 
 
$res = '' ;
$projet = new projet ($this->_db, $this->_id_projet) ;
$retour .= '<h1>'.PROJET_PROJET.' : '.$projet->getTitre()."</h1>" ;
$titre = '<h2>'.PROJET_WIKI_ASSOCIE.'</h2>'."\n" ;
 
$wiki_res = '' ;
// Les wikinis associés au projet
if ($projet->getWikini()) {
$wiki_res .= '<div><a href="'.PROJET_URL_WIKINI.'wakka.php?wiki=PagePrincipale&wikini='.$projet->getWikini().'" target="_blank">'.PROJET_WIKINI_ALLER.'</a>' ;
$wiki_res .= '</div>' ;
if ($wiki=$projet->getWikini()) {
$GLOBALS['_GEN_commun']['info_application']->wikini = $wiki;
$GLOBALS['_GEN_commun']['url']->addQueryString('act','wikini');
require_once 'client/integrateur_wikini/bibliotheque/iw_integrateur.fonct.php';
//$wiki_res.="TODO : placer integrateur wikini en fonction puis appeller integrateur_wikini et integrateur_wikini_projet";
$wiki_res.= afficherPageWikini();
//$wiki_res .= '<div><a href="'.PROJET_URL_WIKINI.'wakka.php?wiki=PagePrincipale&wikini='.$projet->getWikini().'" target="_blank">'.PROJET_WIKINI_ALLER.'</a>' ;
//$wiki_res .= '</div>' ;
} else {
$wiki_res .= '<div>'.PROJET_WIKINI_PAS.'</div>'."\n" ;
}
 
$retour .= $titre.$wiki_res ;
$retour .= $wiki_res ;
 
 
?>
/trunk/client/projet/documentation/projet.sql
151,5 → 151,5
`pt_id_type` tinyint(3) unsigned NOT NULL default '0',
`pt_label_type` varchar(255) NOT NULL default '',
PRIMARY KEY (`pt_id_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
)
/trunk/client/projet/langues/pro_langue_fr.inc.php
10,7 → 10,7
* | Auteur : Alexandre Granier <alexandre@tela-botanica.org> |
* +-----------------------------------------------------------------------+
 
* $Id: pro_langue_fr.inc.php,v 1.5 2005-10-07 08:28:30 alexandre_tb Exp $
* $Id: pro_langue_fr.inc.php,v 1.6 2005-10-17 13:41:35 ddelon Exp $
*/
 
 
175,8 → 175,9
define ('PROJET_WIKINI', 'Wikini') ;
 
define ("PROJET_NOM_WIKINI", "Nom Wikini") ;
define ("PROJET_PAGE", "Page de démarrage") ;
define ("PROJET_CHOISIR", "Choisir") ;
define ("PROJET_PAGE_WIKINI", "Page de démarrage") ;
define ("PROJET_CHOISIR_WIKINI", "Choisir") ;
define ("PROJET_SELECTIONNER_WIKINI", "Selection") ;
 
 
define ("PROJET_LISTE_PARTICIPANT", "Liste des participants") ;
251,7 → 252,6
define ('PROJET_RECEVOIR_LES_MESSAGES', 'Recevoir les messages') ;
define ('PROJET_NE_PAS_RECEVOIR', 'Pas de messages') ;
define ('PROJET_RECEVOIR_DES_RESUMES', 'Recevoir des résumés') ;
define ('PROJET_VOUS_N_ETES_PAS_INSCRIT', 'Vous n\'êtes pas inscrit à ce forum.') ;
define ('PROJET_VOUS_ETES_INSCRIT', 'Vous êtes inscrit à ce forum.') ;
 
// Label pour l'affichage des messages dans le forum
/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.20 2005-10-17 10:52:00 jp_milcent Exp $
// CVS : $Id: pap_rendu.inc.php,v 1.21 2005-10-17 13:41:34 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.20 $ $Date: 2005-10-17 10:52:00 $
*@version $Revision: 1.21 $ $Date: 2005-10-17 13:41:34 $
// +------------------------------------------------------------------------------------------------------+
*/
 
77,9 → 77,9
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// Recherche du squelette de la page demandée.
 
 
// Ouverture du squelette
if (empty($GLOBALS['_GEN_commun']['info_menu']->gm_fichier_squelette)) {
if (isset($GLOBALS['_GEN_commun']['traduction_info_site'])) {
94,6 → 94,7
$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'] = $GLOBALS['_GEN_commun']['info_menu']->gm_fichier_squelette;
}
}
 
// Si l'information concernant le chemin est réellement un chemin
if (! file_exists($GLOBALS['_PAPYRUS_']['general']['chemin_squelette'])) {
//Si ce n'est qu'un nom de fichier squelette
124,6 → 125,7
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette'] = file_get_contents($GLOBALS['_PAPYRUS_']['general']['chemin_squelette']);
 
 
 
// +------------------------------------------------------------------------------------------------------+
// Recherche des informations pour la complétion de l'entête du squelette de la page demandée.
 
142,6 → 144,7
$GLOBALS['_PAPYRUS_']['page']['titre']='';
}
 
 
$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = $GLOBALS['_PAPYRUS_']['page']['titre'];
 
// Construction des infos sur le site
501,6 → 504,9
/* +--Fin du code ---------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.20 2005/10/17 10:52:00 jp_milcent
* Mise en majuscule du jeu de caractère, conformément à la recommandation.
*
* Revision 1.19 2005/10/12 17:20:33 ddelon
* Reorganisation calendrier + applette
*
/trunk/papyrus.php
33,7 → 33,7
// pris connaissance de la licence CeCILL, et que vous en avez accepté les
// termes.
// ----
// CVS : $Id: papyrus.php,v 1.16 2005-08-31 17:34:52 ddelon Exp $
// CVS : $Id: papyrus.php,v 1.17 2005-10-17 13:41:35 ddelon Exp $
 
/**
* Papyrus : Programme principal appelant différent fichier à inclure dans un ordre précis.
49,7 → 49,7
*@author Alexandre GRANIER <alex@tela-botanica.org>
*@author Laurent COUDOUNEAU <laurent.coudouneau@ema.fr>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.16 $ $Date: 2005-08-31 17:34:52 $
*@version $Revision: 1.17 $ $Date: 2005-10-17 13:41:35 $
// +------------------------------------------------------------------------------------------------------+
*/
// +------------------------------------------------------------------------------------------------------+
64,6 → 64,7
 
// Première mesure du chronométrage
$GLOBALS['_CHRONO_']['depart'] = microtime();
 
 
// Vérification de la configuration de Papyrus
/** Inclusion du programme de vérification de Papyrus.
168,6 → 169,7
* Il appelle l'application demandée et créé la page grâce au fichier squelette et aux balises incluses dedans.
*/
require_once GEN_CHEMIN_PAP.'pap_rendu.inc.php';
 
$GLOBALS['_CHRONO_']['Rendu'] = microtime();
 
// +------------------------------------------------------------------------------------------------------+
192,6 → 194,9
 
/* +--Fin du code ---------------------------------------------------------------------------------------+
* $Log: not supported by cvs2svn $
* Revision 1.16 2005/08/31 17:34:52 ddelon
* Integrateur Wikini et administration des Wikini
*
* Revision 1.15 2005/08/18 10:20:05 ddelon
* Integrateur Wikini et Acces PEAR
*