Retour [./2.19_1/index.php]
show/hide
0
1 <?php
2    
// TigerWiki 2 (Version 2.19 - 2006-11-02)
3    // Copyleft (C) Arsenic 2005-2006, licence GNU/GPL (disponible sur www.gnu.org)
4    // http://chabel.org/ - root chez chabel point org
5    
$WIKI_VERSION "TigerWiki 2.19+";
6
7    
//Fichier de configuration
8    
include("_config.php");
9
10    
// Trouver la page a afficher
11    
if (! $PAGE_TITLE stripslashes($_GET["page"]))
12    {
13       if (
$_GET["action"] == "search")
14          if (
$_GET["query"] != "")
15             
$PAGE_TITLE "$SEARCH_RESULTS \"$_GET[query]\"";
16          else
17             
$PAGE_TITLE $LIST " (" count(glob("$PAGES_DIR/*.*")) . ")";
18       elseif (
$_GET["action"] == "recent")
19          
$PAGE_TITLE "$RECENT_CHANGES";
20       elseif (
$_GET["action"] == "upload"// JJL upload
21          
$PAGE_TITLE $UPLOAD_BUTTON;
22       else
23          
$PAGE_TITLE "$START_PAGE";
24    }
25    if (
$_GET["page"] == $UPLOAD_BUTTON)
26       
$action="upload";
27    else
28       
$action $_GET["action"];
29    
30    if (isset(
$_GET["time"]))
31       
$gtime $_GET["time"];
32    
$datetw date("Y/m/d H:i"mktime(date("H") + $LOCAL_HOUR));
33
34    
// Arreter les acces malicieux via repertoire et accents
35    
if (preg_match("/\//"$PAGE_TITLE))
36       
$PAGE_TITLE $START_PAGE;
37    if (
preg_match("/\//"$gtime))
38       
$gtime '';
39
40    
// Ecrire les modifications, s'il y a lieu
41    
if ($_POST["content"] != "")
42    {
43       if (
$_SERVER["REQUEST_METHOD"] == "POST")
44       {
45          if (
$_POST["sc"] == $PASSWORD || $_COOKIE['AutorisationTigerWiki'] == md5($PASSWORD))
46          {
47             
setcookie('AutorisationTigerWiki'md5($PASSWORD), time() + 365*24*3600);
48             if (! 
$file = @fopen($PAGES_DIR stripslashes($_POST["page"]) . ".txt""w"))
49                die(
"Could not write page!");
50             if (
get_magic_quotes_gpc())
51                
fputs($filetrim(stripslashes($_POST["content"])));
52             else
53                
fputs($filetrim($_POST["content"]));
54             
fclose($file);
55             if (
$BACKUP_DIR <> '')
56             {
57                
$complete_dir_s $BACKUP_DIR $_POST["page"] . "/";
58                if (! 
$dir = @opendir($complete_dir_s))
59                {
60                   
mkdir($complete_dir_s);
61                   
chmod($complete_dir_s,0777);
62                }
63                if (! 
$file = @fopen($complete_dir_s date("Ymd-Hi"mktime(date("H") + $LOCAL_HOUR)) . ".bak""a"))
64                   die(
"Could not write backup of page!");
65                
fputs($file"\n// " $datetw " / " " " $_SERVER['REMOTE_ADDR'] . "\n");
66                if (
get_magic_quotes_gpc())
67                   
fputs($filetrim(stripslashes($_POST["content"])));
68                else
69                   
fputs($filetrim($_POST["content"]) . "\n\n");
70                
fclose($file);
71             }
72             include(
"ModuleRSS.php");
73             
header("location: ./?page=" urlencode(stripslashes($_POST[page])));
74          }
75          else
76          {
77             
header("location: ./?page=" $_POST[page]."&action=edit&error=1");
78          }
79       }
80    }
81    elseif (isset(
$_POST["content"]) && $_POST["content"] == "")
82    {
83       if (
$_POST["sc"] == $PASSWORD || $_COOKIE['AutorisationTigerWiki'] == md5($PASSWORD))
84       {
85          
setcookie('AutorisationTigerWiki'md5($PASSWORD), time() + 365*24*3600);
86          
unlink($PAGES_DIR stripslashes($_POST["page"]) . ".txt");
87       }
88       else
89          
header("location: ./?page=".$_POST["page"]."&action=edit&error=1");
90    }
91
92    
// Lecture et analyse du modèle de page
93    
if (! $file = @fopen("template.html""r"))
94       die(
"'template.html' is missing!");
95    
$template fread($filefilesize("template.html"));
96    
fclose($file);
97
98    
// Lecture du contenu et de la date de modification de la page
99    
if (($file = @fopen($PAGES_DIR $PAGE_TITLE ".txt""r")) || $action <> "")
100    {
101       if (
file_exists($PAGES_DIR $PAGE_TITLE ".txt"))
102          
$TIME date("Y/m/d H:i", @filemtime($PAGES_DIR $PAGE_TITLE ".txt") + $LOCAL_HOUR 3600);
103       
$CONTENT "\n" . @fread($file, @filesize($PAGES_DIR $PAGE_TITLE ".txt")) . "\n";
104       
// Restaurer une page
105       
if (isset($_GET["page"]) && isset($gtime) && $_GET["restore"] == 1)
106          if (
$file = @fopen($BACKUP_DIR $PAGE_TITLE "/" $gtime"r"))
107             
$CONTENT "\n" . @fread($file, @filesize($BACKUP_DIR $PAGE_TITLE "/" $gtime)) . "\n";
108       @
fclose($file);
109       
$CONTENT preg_replace("/\\$/Umsi""&#036;"$CONTENT);
110       
$CONTENT preg_replace("/\\\/Umsi""&#092;"$CONTENT);
111    }
112    else
113    {
114       if (!
file_exists($PAGES_DIR $PAGE_TITLE ".txt"))
115          
$CONTENT "\n" $DEFAULT_CONTENT;
116       else
117          
$action "edit";
118    }
119
120    
// Déterminer le mode d'accès
121    
if ($action == "edit" || $action == "search" || $action == "recent" || $action == "upload")
122       
$html preg_replace('/{EDIT}/'$EDIT_BUTTON$template);
123    elseif (
is_writable($PAGES_DIR $PAGE_TITLE ".txt") || !file_exists($PAGES_DIR $PAGE_TITLE ".txt"))
124       
$html preg_replace('/{EDIT}/'"<a href=\"./?page=".$PAGE_TITLE."&amp;action=edit\" accesskey=\"5\">$EDIT_BUTTON</a>"$template);
125    else
126       
$html preg_replace('/{EDIT}/'$PROTECTED_BUTTON$template);
127    if (
$action == "recent" || $action == "upload")
128       
$html preg_replace('/{RECENT_CHANGES}/'$RECENT_CHANGES$html);
129    else
130       
$html preg_replace('/{RECENT_CHANGES}/'"<a href=\"./?action=recent\" accesskey=\"3\">$RECENT_CHANGES</a>"$html);
131    
132
133    
// Remplacer les variables par des valeurs (dans le style de page)
134    
$html preg_replace('/{PAGE_TITLE_BRUT}/'$PAGE_TITLE$html);
135    if (
$action != "" && $action != "recent" && $action != "search" && $action != "upload")
136       
$html preg_replace('/{PAGE_TITLE}/'"<a href=\"./?page=".$PAGE_TITLE."\">".$PAGE_TITLE."</a>"$html);
137    else
138       
$html preg_replace('/{PAGE_TITLE}/'$PAGE_TITLE$html);
139    if (
$PAGE_TITLE == $START_PAGE && $action <> "search")
140       
$html preg_replace('/{HOME}/'$HOME_BUTTON$html);
141    else
142       
$html preg_replace('/{HOME}/'"<a href=\"./?page=".$START_PAGE."\" accesskey=\"1\">$HOME_BUTTON</a>"$html);
143    
$html preg_replace('/{WIKI_TITLE}/'$WIKI_TITLE$html);
144    
$html preg_replace('/{LAST_CHANGE}/'$LAST_CHANGES." :"$html);
145    if (
$action != "edit")
146       
$html preg_replace('/{HELP}/'""$html);
147    else
148       
$html preg_replace('/{HELP}/'"(<a href=\"./?page=$HELP_BUTTON\" accesskey=\"2\">$HELP_BUTTON</a>)"$html);
149    
$html preg_replace('/{SEARCH}/'"<form method=\"get\" action=\"./?page=".$_GET[page]."\"><div><input type=\"hidden\" name=\"action\" value=\"search\" /><input type=\"text\" name=\"query\" value=\"$_GET[query]\" /> <input type=\"submit\" value=\"$SEARCH_BUTTON\" accesskey=\"q\" /></div></form>"$html);
150    if (
$action == "edit")
151    {
152       
$html preg_replace('/{HISTORY}/'"/ <a href=\"?page=".$PAGE_TITLE."&amp;action=history\" accesskey=\"6\">".$HISTORY_BUTTON."</a> / <a href=./?action=upload>".$UPLOAD_BUTTON."</a><br />"$html);
153       
$CONTENT "<form method=\"post\" action=\"./\"><textarea name=\"content\" cols=\"83\" rows=\"30\" style=\"width: 100%;\">$CONTENT</textarea><input type=\"hidden\" name=\"page\" value=\"".$PAGE_TITLE."\" /><br /><p align=\"right\">";
154       if (
$PASSWORD != "" && $_COOKIE['AutorisationTigerWiki'] != md5($PASSWORD))
155          
$CONTENT .= $MDP." : <input type=\"password\" name=\"sc\" />";
156       
$CONTENT .= " <input type=\"submit\" value=\"$DONE_BUTTON\" accesskey=\"s\" /></p></div></form>";
157    }
158    elseif (
$action != "history")
159       
$html preg_replace('/{HISTORY}/'""$html);
160
161    
// Liste des versions historiques d'une page
162    
if ($action == "history" && !isset($gtime))
163    {
164       
$html preg_replace('/{HISTORY}/'"/ ".$HISTORY_BUTTON$html);
165       
$complete_dir $BACKUP_DIR $_GET["page"] . "/";
166       if (
$opening_dir = @opendir($complete_dir))
167       {
168          while (
false !== ($filename = @readdir($opening_dir)))
169             
$files[] = $filename;
170          
sort ($files);
171          for (
$cptfiles 2$files[$cptfiles] != ''$cptfiles++)
172             
$affichage $affichage."<a href=\"?page=".$_GET["page"]."&amp;action=history&amp;time=".$files[$cptfiles]."\">".$files[$cptfiles]."</a><br />";
173          
$html preg_replace('/{CONTENT}/'$affichage$html);
174       }
175       else
176          
$html preg_replace('/{CONTENT}/'$NO_HISTORY$html);
177    }
178
179    
// Affichage d'un fichier historique
180    
if ($action == "history" && isset($gtime))
181    {
182       
$complete_dir $BACKUP_DIR $PAGE_TITLE "/";
183       if (
$file = @fopen($BACKUP_DIR $PAGE_TITLE "/" $gtime"r"))
184       {
185          
$html preg_replace('/{HISTORY}/'"/ <a href=\"?page=".$PAGE_TITLE."&amp;action=history\">".$HISTORY_BUTTON."</a> (<a href=\"?page=".$PAGE_TITLE."&amp;action=edit&amp;time=".$gtime."&amp;restore=1\">".$RESTORE."</a>)"$html);
186          
$CONTENT = @fread($file, @filesize($complete_dir $gtime)) . "\n";
187       }
188       else
189          
$html preg_replace('/{HISTORY}/'"/ <a href=\"?page=".$PAGE_TITLE."&amp;action=history\">".$HISTORY_BUTTON."</a> (-)"$html);
190    }
191
192    
// affichage/gestion des fichiers uploadés
193    
if ($action == "upload")
194    {
195       
$affichage .= "Choississez le fichier &agrave; uploader en cliquant sur <i>Parcourir</i>. Entrez votre mot de passe et cliquez sur <i>Envoyer</i><br/>Si vous &ecirc;tes identifi&eacute;, vous pouvez effacer un fichier en cliquant sur &dagger;<hr/>";
196       
// Copie du fichier
197       // $affichage .= var_export($_FILES,true);
198       
if(!empty($_FILES['fichier']['tmp_name']))
199       { 
//Un fichier a été envoyé, nous pouvons le traiter
200          
if ($_POST["sc"] == $PASSWORD || $_COOKIE['AutorisationTigerWiki'] == md5($PASSWORD))
201          {  
// password is ok
202             
setcookie('AutorisationTigerWiki'md5($PASSWORD), time() + 365*24*3600);
203             if(
is_uploaded_file($_FILES['fichier']['tmp_name']))
204             {
205                
move_uploaded_file($_FILES['fichier']['tmp_name'],$DATA_DIR."/".$_FILES['fichier']['name'] );
206             }
207             
//~ else
208                //~ $affichage .= "not upload";
209          
}
210          else
211          {
212             
header("location: ./?action=".$action."&error=1");
213          }
214       }
215       
//~ else
216          //~ $affichage .= "no file";
217          
218       
if (isset($_GET['del']))
219       { 
// Fichier à effacer
220          
if ($_COOKIE['AutorisationTigerWiki'] == md5($PASSWORD))
221          {  
// cookie is ok
222             
unlink(urldecode($_GET['del']));
223          }
224          else
225          {
226             
header("location: ./?action=".$action."&error=1");
227          }
228       }
229
230       
// liste des fichiers
231       
$complete_dir $DATA_DIR "/";
232       if (
$opening_dir = @opendir($complete_dir))
233       {
234          while (
false !== ($filename = @readdir($opening_dir)))
235             
$files[] = $filename;
236          
sort ($files);
237          for (
$cptfiles 2$files[$cptfiles] != ''$cptfiles++)
238          {
239             
$affichage $affichage.'<a href="'.$complete_dir.$files[$cptfiles].'">'.$files[$cptfiles].'</a>';
240             if (
$_COOKIE['AutorisationTigerWiki'] == md5($PASSWORD))
241                
// authentifié donc peut effacer
242                
$affichage .= ' (</font><a title="delete" href="./?action=upload&del='.urlencode($complete_dir.$files[$cptfiles]).'">&dagger;</a>)';
243             
$affichage .= '<br />';
244          }
245       }
246       else
247          
$affichage $NO_DATA;
248       
// formulaire d'upload
249       
$affichage .= "<br/><form method=\"post\" action=\"./?action=".$action."\" enctype= \"multipart/form-data\"><p align=\"right\">";
250       if (
$PASSWORD != "" && $_COOKIE['AutorisationTigerWiki'] != md5($PASSWORD))
251          
$affichage .= $MDP." : <input type=\"password\" name=\"sc\" /> <br />";
252       
$affichage .= $FILE.' : <input type="file" name="fichier" /> <br/>';
253       
$affichage .= " <input type=\"submit\" value=\"$SEND_BUTTON\" accesskey=\"s\" /></p></div></form>";
254       
255       
$html preg_replace('/{CONTENT}/'$affichage$html);
256    }
257
258    
// Erreur du mot de passe
259    
if ($_GET['error'] == 1)
260       
$html preg_replace('/{ERROR}/'$ERROR$html);
261    else
262       
$html preg_replace('/{ERROR}/'""$html);
263
264    
// Effacement du cookie
265    
if ($_GET['erasecookie'] == 1)
266       
setcookie('AutorisationTigerWiki');
267
268    
// Page de recherche
269    
if ($action == "search")
270    {
271       
$dir opendir(getcwd() . "/$PAGES_DIR");
272       while (
$file readdir($dir))
273       {
274          if (
preg_match("/.txt/"$file))
275          {
276             
$handle fopen($PAGES_DIR $file"r");
277             @
$content fread($handlefilesize($PAGES_DIR $file));
278             
fclose($handle);
279             if (
preg_match("/$_GET[query]/i"$content) || preg_match("/$_GET[query]/i""$PAGES_DIR/$file"))
280             {
281                
$file substr($file0strlen($file) - 4);
282                
$CONTENT .= "<a href=\"./?page=$file\">$file</a><br />";
283             }
284          }
285       }
286    }
287
288    
// Changements récents
289    
elseif ($action == "recent")
290    {
291       
$dir opendir(getcwd() . "/$PAGES_DIR");
292       while (
$file readdir($dir))
293          if (
preg_match("/.txt/"$file))
294             
$filetime[$file] = filemtime($PAGES_DIR $file);
295       
arsort($filetime);
296       
$filetime array_slice($filetime010);
297       foreach (
$filetime as $filename => $timestamp)
298       {
299          
$filename substr($filename0strlen($filename) - 4);
300          
$CONTENT .= "<a href=\"./?page=$filename\">$filename</a> (" strftime("$TIME_FORMAT"$timestamp $LOCAL_HOUR 3600) . ")<br />";
301       }
302    }
303
304    
// Formatage de page
305    
elseif ($action <> "edit")
306    {
307
308       if (
preg_match("/%html%\s/"$CONTENT))
309
310          
$CONTENT preg_replace("/%html%\s/"""$CONTENT);
311       else
312       {
313          
$CONTENT htmlentities($CONTENT);
314          
$CONTENT preg_replace("/&amp;#036;/Umsi""&#036;"$CONTENT);
315          
$CONTENT preg_replace("/&amp;#092;/Umsi""&#092;"$CONTENT);
316          
// JJL fleches (c) (r)
317          
$CONTENT preg_replace("/&lt;\-\-&gt;/Umsi""&harr;"$CONTENT);
318          
$CONTENT preg_replace("/-\-&gt;/Umsi""&rarr;"$CONTENT);
319          
$CONTENT preg_replace("/&lt;\--/Umsi""&larr;"$CONTENT);
320          
$CONTENT preg_replace("/\([cC]\)/Umsi""&copy;"$CONTENT);
321          
$CONTENT preg_replace("/\([rR]\)/Umsi""&reg;"$CONTENT);
322          
323          
$CONTENT preg_replace("/\^(.)/Umsie""'&#'.ord('\\1').';'"$CONTENT);
324          
$CONTENT preg_replace('#\[(.+)\|([0-9a-zA-Z\.\'\s\#/~\-_%=\?\&amp;,\+]*)\]#U''<a href="$2" class="url">$1</a>'$CONTENT);
325          
$CONTENT preg_replace('#\[(.+)\|h(ttps?://[0-9a-zA-Z\.\#/~\-_%=\?\&amp;,\+]*)\]#U''<a href="xx$2" class="url">$1</a>'$CONTENT);
326          
$CONTENT preg_replace('#\[h(ttps?://[0-9a-zA-Z\.\&amp;\#\:/~\-_%=?]*\.(jpg|gif|png))\]#i''<img src="xx$1" />'$CONTENT);
327          
$CONTENT preg_replace('#\[([0-9a-zA-Z\.\&amp;\#\:/~\-_%=?]*\.(jpg|gif|png))\]#i''<img src="$1" />'$CONTENT);
328          
$CONTENT preg_replace('#(https?://[0-9a-zA-Z\.\&amp;\#\:/~\-_%=?]*)#i''<a href="$0" class="url">$1</a>'$CONTENT);
329          
$CONTENT preg_replace('#xxttp#''http'$CONTENT);
330          
preg_match_all("/\[([^\/]+)\]/U"$CONTENT$matchesPREG_PATTERN_ORDER); //Pour bloquer les liens accentués : "/\[([0-9a-zA-Z\- :\.,\(\)\']+)\]/U"
331          
foreach ($matches[1] as $match)
332             if (
file_exists(html_entity_decode($PAGES_DIR."$match.txt")))
333                
$CONTENT str_replace("[$match]""<a href=\"./?page=".$match."\">$match</a>"$CONTENT);
334             else
335                
$CONTENT str_replace("[$match]""<a class=\"pending\" href=\"./?page=".$match."\">$match</a>"$CONTENT);
336          
$CONTENT preg_replace('#(\[\?(.+)\]*)#i''<a href="http://fr.wikipedia.org/wiki/$0" class="url">$0</a>'$CONTENT);
337          
$CONTENT preg_replace('#([0-9a-zA-Z\./~\-_]+@[0-9a-z\./~\-_]+)#i''<a href="mailto:$0">$0</a>'$CONTENT);
338          
$CONTENT preg_replace('/^\*\*\*(.*)(\n)/Um'"<ul><ul><ul><li>$1</li></ul></ul></ul>$2"$CONTENT);
339          
$CONTENT preg_replace('/^\*\*(.*)(\n)/Um'"<ul><ul><li>$1</li></ul></ul>$2"$CONTENT);
340          
$CONTENT preg_replace('/^\*(.*)(\n)/Um'"<ul><li>$1</li></ul>$2"$CONTENT);
341          
$CONTENT preg_replace('/^\#\#\#(.*)(\n)/Um'"<ol><ol><ol><li>$1</li></ol></ol></ol>$2"$CONTENT);
342          
$CONTENT preg_replace('/^\#\#(.*)(\n)/Um'"<ol><ol><li>$1</li></ol></ol>$2"$CONTENT);
343          
$CONTENT preg_replace('/^\#(.*)(\n)/Um'"<ol><li>$1</li></ol>$2"$CONTENT);
344
345          
$CONTENT preg_replace('/(<\/ol>\n*<ol>|<\/ul>\n*<ul>)/'""$CONTENT);
346          
$CONTENT preg_replace('/(<\/ol>\n*<ol>|<\/ul>\n*<ul>)/'""$CONTENT);
347          
$CONTENT preg_replace('/(<\/ol>\n*<ol>|<\/ul>\n*<ul>)/'""$CONTENT);
348
349
350          
$CONTENT preg_replace('/^!!!(.*)(\n)/Um''<h1>$1</h1>$2'$CONTENT);
351          
$CONTENT preg_replace('/^!!(.*)(\n)/Um''<h2>$1</h2>$2'$CONTENT);
352          
$CONTENT preg_replace('/^!(.*)(\n)/Um''<h3>$1</h3>$2'$CONTENT);
353          while (
preg_match('/^  /Um'$CONTENT))
354             
$CONTENT preg_replace('/^( +) ([^ ])/Um''$1&nbsp;&nbsp;&nbsp;&nbsp;$2'$CONTENT);
355          
$CONTENT preg_replace('/^ /Um''&nbsp;&nbsp;&nbsp;&nbsp;'$CONTENT);
356          
$CONTENT preg_replace('/----*(\r\n|\r|\n)/m''<hr />'$CONTENT);
357          
$CONTENT preg_replace('/\n/''<br />'$CONTENT);
358          
$CONTENT preg_replace('#</ul>(<br />)*#'"</ul>"$CONTENT);
359          
$CONTENT preg_replace('#</ol>(<br />)*#'"</ol>"$CONTENT);
360
361          
$CONTENT preg_replace('#</li><ul><li>*#'"<ul><li>"$CONTENT);
362          
$CONTENT preg_replace('#</ul></ul>*#'"</ul></li></ul>"$CONTENT);
363          
$CONTENT preg_replace('#</ul></ul>*#'"</ul></li></ul>"$CONTENT);
364          
$CONTENT preg_replace('#</li></ul><li>*#'"</li></ul></li><li>"$CONTENT);
365
366          
$CONTENT preg_replace('#</li><ol><li>*#'"<ol><li>"$CONTENT);
367          
$CONTENT preg_replace('#</ol></ol>*#'"</ol></li></ol>"$CONTENT);
368          
$CONTENT preg_replace('#</ol></ol>*#'"</ol></li></ol>"$CONTENT);
369          
$CONTENT preg_replace('#</li></ol><li>*#'"</li></ol></li><li>"$CONTENT);
370
371          
$CONTENT preg_replace('#(</h[123]>)<br />#'"$1"$CONTENT);
372          
$CONTENT preg_replace("/{(.+)}/Ue""'<pre><code>' . preg_replace('#<br />#', '', '\\1') . '</code></pre>'"$CONTENT);
373          
$CONTENT preg_replace("/'''''(.*)'''''/Um"'<strong><em>$1</em></strong>'$CONTENT);
374          
$CONTENT preg_replace("/'''(.*)'''/Um"'<strong>$1</strong>'$CONTENT);
375          
$CONTENT preg_replace("/''(.*)''/Um"'<em>$1</em>'$CONTENT);
376          
// JJL chaine barree/soulignée
377          
$CONTENT preg_replace("/'--(.*)--'/Um"'<strike>$1</strike>'$CONTENT);
378          
$CONTENT preg_replace("/'__(.*)__'/Um"'<u>$1</u>'$CONTENT);
379          
$CONTENT substr($CONTENT6strlen($CONTENT) - 6);
380          
$CONTENT html_entity_decode($CONTENT);
381       }
382    }
383    if (
$action != "" && $action != "edit" || (!file_exists($PAGES_DIR $PAGE_TITLE ".txt")))
384       
$TIME "-";
385    
$html preg_replace("/{CONTENT}/"$CONTENT$html);
386    
$html preg_replace("/{LANG}/"$LANG$html);
387    
$html preg_replace("/{WIKI_VERSION}/"$WIKI_VERSION$html);
388    
$html preg_replace("/{CHARSET}/"$CHARSET$html);
389    
$html preg_replace('/{TIME}/'$TIME$html);
390    
$html preg_replace('/{DATE}/'$datetw$html);
391    
$html preg_replace('/{IP}/'$_SERVER['REMOTE_ADDR'], $html);
392    if (
$_COOKIE['AutorisationTigerWiki'] != "")
393       
$html preg_replace('/{COOKIE}/''-- <a href="./?page='.$PAGE_TITLE.'&erasecookie=1">'.$ERASE_COOKIE.'</a>'$html);
394    else
395       
$html preg_replace('/{COOKIE}/'''$html);
396
397    
// Affichage de la page
398    
echo $html;
399
400
?>
401

402