Posto uno script che non funge con la versione php5....
if(!$glob['pag'])
{
$glob['pag']='home';
}
if($glob['act'] && !$glob['skip_action'])
{
include_once("php/gen/func_perm.php");
list($cls_name,$func_name )=split("-",$glob['act']);
if(($cls_name)&&($func_name)&&(is_file("classes/cls_".$cls_name.".php"))&&($func_access[$cls_name][$func_name]))
{
if($user_level<=$func_access[$cls_name][$func_name])
{
include_once("classes/cls_".$cls_name.".php");
$cls_name= new $cls_name;
if (!$cls_name->$func_name($glob))
{
if($debug)
{
$glob['error'].="Failed to execute function $func_name";
}
}
unset($cls_name);
unset($func_name);
}
else
{
if($debug)
{
$glob['error']= "You are not allowed to run this function !";
}
$glob['pag']= "home";
}
}
else
{
if($debug)
{
echo "Can not find cls_".$cls_name.".php file
";
}
}
}
include_once("php/gen/page_perm.php");
if($glob['pag'])
{
if($page_access[$glob['pag']]['perm'] && $page_access[$glob['pag']]['perm'] >= $user_level)
{
$page=include("php/".$glob['pag'].".php");
}
else
{
$page=include("php/home.php");
}
}
//$menu=include("php/gen/menu.php");
// mio ultimi
$ultimi=include("index_last_home.php") ;
$vetrina=include("car_vetrina_home.php") ;
$marche=include("marche.php") ;
// fine mio ultimi
$ftm=new FastTemplate("");
$ftm->define(array('main'=>"main_template.html"));
$ftm->assign('PAGE',$page);
$ftm->assign('ULTIMO',$ultimo);
$ftm->assign('VETRINA',$vetrina);
$ftm->assign('MARCHE',$marche);
//$ftm->assign('MENU',$menu);
$ftm->parse('CONTENT','main');
$ftm->fastprint('CONTENT');
![]()
![]()
![]()