433 |
ddelon |
1 |
<?php
|
|
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
|
|
3 |
// +------------------------------------------------------------------------------------+
|
|
|
4 |
// | Code Bota Wikini |
|
|
|
5 |
// +------------------------------------------------------------------------------------+
|
|
|
6 |
// | Copyright (c) Tela Botanica 1999 - 2004 |
|
|
|
7 |
// +------------------------------------------------------------------------------------+
|
|
|
8 |
// | Licence |
|
|
|
9 |
// +------------------------------------------------------------------------------------+
|
|
|
10 |
/**
|
|
|
11 |
* Code Bota Wikini page principale
|
|
|
12 |
*
|
|
|
13 |
* Ce programme permet d'afficher le contenu d'un page d'un wikini. C'est seulement une interface de visualisation
|
|
|
14 |
* du contenu du wikini. Les fonctionnalités d'édition du Wikini ne sont pas reprises ici.
|
|
|
15 |
*
|
|
|
16 |
*@package Code_Bota_Wikini
|
|
|
17 |
//Auteur original :
|
|
|
18 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
|
|
19 |
//Autres auteurs :
|
|
|
20 |
*@author Aucun
|
|
|
21 |
*@copyright Tela-Botanica 2000-2004
|
|
|
22 |
*@version $Date: 2005-08-18 10:19:59 $
|
|
|
23 |
// +------------------------------------------------------------------------------------+
|
|
|
24 |
//
|
|
|
25 |
// $Id: code_bota_wikini.php,v 1.1 2005-08-18 10:19:59 ddelon Exp $
|
|
|
26 |
// FICHIER : $RCSfile: code_bota_wikini.php,v $
|
|
|
27 |
// AUTEUR : $Author: ddelon $
|
|
|
28 |
// VERSION : $Revision: 1.1 $
|
|
|
29 |
// DATE : $Date: 2005-08-18 10:19:59 $
|
|
|
30 |
// +------------------------------------------------------------------------------------+
|
|
|
31 |
**/
|
|
|
32 |
|
|
|
33 |
//==============================================================================
|
|
|
34 |
// Inclusion du fichier contenant les constantes
|
|
|
35 |
// ATTENTION : il doit se situer dans le même dossier que le fichier courrant.
|
|
|
36 |
// Il définit les chemins d'accé et les noms des autres fichiers à inclure !
|
|
|
37 |
//
|
|
|
38 |
//==============================================================================
|
|
|
39 |
include_once 'code_bota_wikini_config.php';
|
|
|
40 |
|
|
|
41 |
//==============================================================================
|
|
|
42 |
// Inclue la librairie de styles.
|
|
|
43 |
//Définition du style à utiliser si on est dans GSITE.
|
|
|
44 |
//==============================================================================
|
|
|
45 |
if(STYLE_GSITE == 1){//Nous sommes dans une interface GSITE
|
|
|
46 |
global $var_style;
|
|
|
47 |
$var_style=STYLE;
|
|
|
48 |
include_once LIB_STYLE;
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
//==============================================================================
|
|
|
52 |
// Inclusion du fichier permettant l'utilisation de la classe wiki.
|
|
|
53 |
//
|
|
|
54 |
//==============================================================================
|
|
|
55 |
include_once LIB_WIKINI;
|
|
|
56 |
|
|
|
57 |
//==============================================================================
|
|
|
58 |
// Inclue la librairie gérant les textes.
|
|
|
59 |
// La fonction remplaceEntiteDsHTLM() est utilisée dans le fichier contenant les fonctions d'inclusion du html.
|
|
|
60 |
//
|
|
|
61 |
//==============================================================================
|
|
|
62 |
include_once LIB_TEXTE;
|
|
|
63 |
|
|
|
64 |
//==============================================================================
|
|
|
65 |
// Inclue le fichier contenant les fonctions d'inclusion du html
|
|
|
66 |
//
|
|
|
67 |
//==============================================================================
|
|
|
68 |
include_once HTML;
|
|
|
69 |
|
|
|
70 |
/**
|
|
|
71 |
//==================================== FUNCTION ==================================
|
|
|
72 |
* La fonction putFrame() renvoie le corps de la page html.
|
|
|
73 |
*
|
|
|
74 |
* Cette fonction retourne le corps de la page html renvoyée au client.
|
|
|
75 |
* Dans le cas présent (Code Bota Wikini), on retourne :
|
|
|
76 |
* le contenue d'un page wikini
|
|
|
77 |
*
|
|
|
78 |
*
|
|
|
79 |
* @return string contient la chaîne html à afficher.
|
|
|
80 |
//==============================================================================
|
|
|
81 |
*/
|
|
|
82 |
|
|
|
83 |
function putFrame ()
|
|
|
84 |
{
|
|
|
85 |
global $wiki;
|
|
|
86 |
global $wikini_config_defaut;
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
$wakkaConfig = $wikini_config_defaut;
|
|
|
90 |
|
|
|
91 |
// Démarrage de session php
|
|
|
92 |
//session_start();
|
|
|
93 |
|
|
|
94 |
// Récupération du nom de la page wikini recherchée
|
|
|
95 |
if ( ! isset( $_REQUEST["wiki"] ) ) {
|
|
|
96 |
$wiki = 'CinB';
|
|
|
97 |
}
|
|
|
98 |
else {
|
|
|
99 |
$wiki = $_REQUEST["wiki"];
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
// Gestion de la variable de session "linktracking"
|
|
|
103 |
if ( ! isset( $_SESSION["linktracking"] ) ) {
|
|
|
104 |
$_SESSION["linktracking"] = 1;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
// Suppression des slash.
|
|
|
109 |
$wiki = preg_replace("/^\//", "", $wiki);
|
|
|
110 |
|
|
|
111 |
// split into page/method
|
|
|
112 |
if ( preg_match( "#^(.+?)/(.*)$#", $wiki, $matches ) ) {
|
|
|
113 |
list(, $page, $method) = $matches;
|
|
|
114 |
}
|
|
|
115 |
else if ( preg_match( "#^(.*)$#", $wiki, $matches ) ) {
|
|
|
116 |
list(, $page) = $matches;
|
|
|
117 |
}
|
|
|
118 |
|
|
|
119 |
// create wiki object
|
|
|
120 |
$wiki = new Wiki( $wikini_config_defaut );
|
|
|
121 |
|
|
|
122 |
// Vérification de la méthode d'affichage employée!
|
|
|
123 |
if ( ! isset( $method ) ) {
|
|
|
124 |
$method = '';
|
|
|
125 |
}
|
|
|
126 |
//Récupération du contenu de la page Wikini
|
|
|
127 |
$sortie = $wiki->Run($page, $method);
|
|
|
128 |
|
|
|
129 |
return $sortie;
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
/**
|
|
|
133 |
//==================================== FUNCTION ==================================
|
|
|
134 |
* La fonction putFooter() renvoie le pied de page HTML.
|
|
|
135 |
*
|
|
|
136 |
*Cette fonction retourne le pied de la page html de l'application Code Bota Wikini.
|
|
|
137 |
*
|
|
|
138 |
* @return string contient la chaîne html à afficher en pied de page.
|
|
|
139 |
//==============================================================================
|
|
|
140 |
*/
|
|
|
141 |
|
|
|
142 |
function putFooter()
|
|
|
143 |
{
|
|
|
144 |
return inclusion_html('pied_page');
|
|
|
145 |
}//Fin de la fonction putFooter().
|
|
|
146 |
|
|
|
147 |
// +- Fin du code source --------------------------------------------------------------+
|
|
|
148 |
/*
|
|
|
149 |
* $Log: not supported by cvs2svn $
|
|
|
150 |
* Revision 1.1 2005/03/02 13:12:53 jpm
|
|
|
151 |
* Fichiers d'un wikini transformés en API.
|
|
|
152 |
*
|
|
|
153 |
* Revision 1.3 2004/02/06 10:18:16 jpm
|
|
|
154 |
* Suppression du code de test.
|
|
|
155 |
*
|
|
|
156 |
* Revision 1.2 2004/02/03 12:39:41 jpm
|
|
|
157 |
* L'affichage du contenu du wikini fonctionne et ne renvoit pas de notice.
|
|
|
158 |
*
|
|
|
159 |
* Revision 1.1 2004/02/02 16:11:34 jpm
|
|
|
160 |
* Le fichier principal de l'application Code_Bota_Wikini.
|
|
|
161 |
*
|
|
|
162 |
*
|
|
|
163 |
*/
|
|
|
164 |
?>
|