include_once("config.php"); include_once ("./content/home_functionality.php"); 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; } //following code finds out the modules from sufiix and find out the script name switch ($prefix){ case "c": $module = "content"; break; case "m": $module = "myaccount"; break; default: $module = "content"; break; } //following code finds out the modules from suffix and find out the script name $include_script = $module."/".$script.".php"; if(file_exists($include_script)) { include_once($include_script); } else { include_once("content/error.php"); } $smarty->assign("COPYRIGHTS_TEXT",$COPY_RIGHT); $smarty->assign("file",$file); $smarty->assign("msgs",$msgs); $smarty->assign("module",$module); $smarty->display("template.tpl"); unset($obj); unset($smarty); ?>