(php)".$this->page["body"]."
", "index");
}else{
echo $this->Format($this->page["body"], "index");
}
// if this is an old revision, display some buttons
if (($this->page["latest"] == "N") && $this->HasAccess("write"))
{
$latest = $this->LoadPage($this->tag);
?>
<br />
<?php echo $this->FormOpen("edit") ?>
<input type="hidden" name="previous" value="<?php echo $latest["id"] ?>" />
<input type="hidden" name="body" value="<?php echo htmlentities($this->page["body"]) ?>" />
<input type="submit" value="Rééditer cette version archivée" />
<?php echo $this->FormClose(); ?>
<?php
}
}
}
else
{
echo "<i>Vous n'êtes pas autorisé à lire cette page</i>" ;
}
?>
<hr class="hr_clear" />
<?php
if ($HasAccessRead)
{
// load comments for this page
$comments = $this->LoadComments($this->tag);
// store comments display in session
$tag = $this->GetPageTag();
if (!isset($_SESSION["show_comments"][$tag]))
$_SESSION["show_comments"][$tag] = ($this->UserWantsComments() ? "1" : "0");
if (isset($_REQUEST["show_comments"])){
switch($_REQUEST["show_comments"])
{
case "0":
$_SESSION["show_comments"][$tag] = 0;
break;
case "1":
$_SESSION["show_comments"][$tag] = 1;
break;
}
}
// display comments!
if ($this->page && $_SESSION["show_comments"][$tag])
{
if ($this->GetUser()){
// display comments header
?>
<div class="commentsheader">
Commentaires [<a href="<?php echo $this->href("", "", "show_comments=0") ?>">Cacher commentaires/formulaire</a>]
</div>
<?php
// display comments themselves
if ($comments)
{
foreach ($comments as $comment)
{
echo "<a name=\"",$comment["tag"],"\"></a>\n" ;
echo "<div class=\"comment\">\n" ;
echo $this->Format($comment["body"]),"\n" ;
echo "<div class=\"commentinfo\">\n-- ",$this->Format($comment["user"])," (".$comment["time"],")\n</div>\n" ;
echo "</div>\n" ;
}
}
}//fin si christophe
// display comment form
echo "<div class=\"commentform\">\n" ;
if ($this->HasAccess("comment"))
{
?><br/>
Ajouter un commentaire à cette page :<br />
<?php echo $this->FormOpen("addcomment"); ?>
<textarea name="body" rows="6" cols="65" style="width: 100%"></textarea><br />
<input type="submit" value="Ajouter Commentaire" accesskey="s" />
<?php echo $this->FormClose(); ?>
<?php
}
echo "</div>\n" ;
}
else
{
/*if ($this->GetUser()){?>
<div class="commentsheader">
<?php
switch (count($comments))
{
case 0:
echo "Il n'y a pas de commentaire sur cette page." ;
break;
case 1:
echo "Il y a un commentaire sur cette page." ;
break;
default:
echo "Il y a ",count($comments)," commentaires sur cette page." ;
}
?></div><?php }//fin si christophe*/
}
}
if (ereg("iscussion",$this->tag) && $this->tag!="Discussion" && $this->tag!="discussion"){echo $this->Format("{{include page=\"FinDiscussion\"}}");}
?></div>
<?php echo $this->Footer();?>