Subversion Repositories Applications.wikini

Rev

Rev 27 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27 Rev 46
Line 1... Line 1...
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='ISO-8859-1');
3
/**
3
/**
4
 * Handler renvoyant au navigateur le contenu HTML de la page wiki.
4
 * Handler renvoyant au navigateur le contenu HTML de la page wiki.
5
 * 
5
 *
6
 * @category	PHP 5.2
6
 * @category	PHP 5.2
7
 * @package		Framework
7
 * @package		Framework
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @copyright	Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
9
 * @copyright	Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
10
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
10
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
11
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2 
11
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
12
 * @version		$Id$
12
 * @version		$Id$
13
 */
13
 */
14
 
14
 
15
 
15
 
16
//Vérification de sécurité
16
//Vérification de sécurité
17
if (!eregi("wakka.php", $_SERVER['PHP_SELF'])) {
17
if (!eregi("wakka.php", $_SERVER['PHP_SELF'])) {
18
    die ("Acc&eacute;s direct interdit");
18
    die ("Acc&eacute;s direct interdit");
19
}
19
}
20
if ($this->HasAccess("read")) {
20
if ($this->HasAccess("read")) {
21
	if (!$this->page) {
21
	if (!$this->page) {
22
		return;
22
		return;
23
	} else {
23
	} else {
24
		header("Content-type: text/html");
24
		header("Content-type: text/html");
25
		// Affichage de la page HTML
25
		// Affichage de la page HTML
26
		$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
26
		$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
27
		$html .= '<html>'."\n";
27
		$html .= '<html>'."\n";
28
		$html .= '	<head>'."\n";
28
		$html .= '	<head>'."\n";
29
		$html .= '		<title>'.$this->GetPageTag().'</title>'."\n";
29
		$html .= '		<title>'.$this->GetPageTag().'</title>'."\n";
30
		$html .= '	</head>'."\n";
30
		$html .= '	</head>'."\n";
31
		$html .= '	<body>'."\n";
31
		$html .= '	<body>'."\n";
32
		$html .= $this->Format($this->page["body"], "wakka");
32
		$html .= $this->Format($this->page["body"], "wakka");
33
		$html .= '	</body>'."\n";
33
		$html .= '	</body>'."\n";
34
		$html .= '</html>';
34
		$html .= '</html>';
35
		echo $html;
35
		echo $html;
36
	}
36
	}
37
} else {
37
} else {
38
	return;
38
	return;
39
}
39
}
40
?>
40
?>
41
41