Hôpital 2.0

 

 Actions/editphp.php

<? 
if (!defined("WIKINI_VERSION"))
{
die (
"accès direct interdit");
}
if (isset(
$_GET["page"])){$page=$_GET["page"];}
//if (!$this->GetParameter("page")){$page= $this->GetParameter("page");
if (!$page){echo $this->Format("//Le paramètre \"page\" est manquant.//");}
$content="";
if (
file_exists($page)) {
$inF fopen($page,"r"); 
$ptr ftell($inF); 
$ptr fseek($inF,$ptr-10); 
while (!
feof($inF)) {
$content=$content.fgets($inF4096);

 
fclose($inF);
 }else{echo 
$this->Format("##Le fichier $page n'existe pas !!!##"); } 
 list(
$rep,$fichier) = split('/',$this->tag);?>
<a href="<?php echo $this->config['base_url'].$this->tag.'/edit';?>">Modifier</a> le contenu de <a href="<?php echo $this->config["base_url"];?>gestiondesfichiers&amp;file=<?php echo $rep;?>"><?php echo $rep;?></a>/<a href="<?php echo $this->config["base_url"];?>gestiondesfichiers&amp;file=<?php echo $this->tag;?>"><?php echo $fichier;?></a><?php
 
echo $this->Format("
(".substr($page, -3, 3).")".$content."
");?>