1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| <?php
class Index
{
private $tpl;
function GetURLSelectFrame($urlChoix)
{
if(isSet($_GET[$urlChoix])==0)
$Choix=ACCUEIL;
else
$Choix=$_GET[$urlChoix];
return $Choix;
}
function Index($tMenu)
{
$this->tpl=new Template(".");
$this->tpl->set_file("index","./index.tpl");
foreach($tMenu as $id => $item)
$html.="<a href='index.php?pg=".$id."'>".$item."</a>\n";
$this->tpl->set_var("MENU",$html);
}
function copieTpl($id,$str)
{
//echo $id;
$this->tpl->set_var($id,$str);
}
function __destruct()
{
//$tpl=new Template(".");
//echo "destruction";
$this->tpl->parse("INDEX","index");
$this->tpl->p("INDEX");
return 0;
}
} |
Partager