include_once("config.php"); # print_r($_SESSION); if(isset($file)){ $var=explode("-",$file); $prefix=$var[0]; $script=$var[1]; }else{ $file="c-home"; $prefix="c"; $script="home"; $modid=1; } if($script==""){ $script="home"; $modid=1; } switch ($prefix){ case "c": $module = "content"; break; default: $module = "content"; break; } $include_script = $module."/".$script.".php"; if(file_exists($include_script)) { include_once($include_script); } else { include_once("content/404error.php"); } $smarty->assign("COPYRIGHTS_TEXT",$COPYRIGHTS_TEXT); $smarty->assign("file",$file); $smarty->assign("msgs",$msgs); $smarty->assign("module",$module); $smarty->display("template.tpl"); unset($obj); unset($smarty); ?>