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
|
public function Run()
{
if(isset($_SESSION['textForm'])) //Ce n'est pas le premier chargement
{
if(isset($_POST['textForm']))
{
$this->agenda = new $_POST['textForm']($this->xml);
$_SESSION['textForm'] = $_POST['textForm'];
$this->agendaCreation();
}
else
if(isset($_POST['record']))
{
$this->agenda = new $_SESSION['textForm']($this->xml);
$this->agendaCreation();
$this->recordControl();
}
else { exit('ARRAY $_POST[] INVALIDE !!'); }
}
else
{
$_SESSION['textForm'] = 'AgendaCongesFactory';//Agenda par defaut
$this->agenda = new $_SESSION['textForm']($this->xml);
$this->agendaCreation();
}
$page = $this->agenda->Run();
echo $page;
} |