setTemplateDir('/home/baldig/projects/opensim/universalcampus/html/templates'); $smarty->setCompileDir('/home/baldig/projects/opensim/universalcampus/html/Smarty-3.0.7/demo/templates_c'); $smarty->setCacheDir('/home/baldig/projects/opensim/universalcampus/html/Smarty-3.0.7/demo/cache'); $smarty->setConfigDir('/home/baldig/projects/opensim/universalcampus/html/Smarty-3.0.7/demo/configs'); //$smarty->force_compile = true; //$smarty->debugging = true; $smarty->caching = false; if (!empty($_GET['page'])) $page = $_GET['page']; else $page = "home"; switch($page){ case $page == 'home': $smarty->assign('page_content', 'home.tpl'); $smarty->assign('page_title', 'Universal Campus'); $smarty->assign('page_header', ''); break; case $page == 'client-setup': $smarty->assign('page_content', 'client-setup.tpl'); $smarty->assign('page_title', 'Universal Campus::Client Setup'); $smarty->assign('page_header', 'Client Setup'); break; case $page == 'server-setup': $smarty->assign('page_content', 'server-setup.tpl'); $smarty->assign('page_title', 'Universal Campus::Server Setup'); $smarty->assign('page_header', 'Linux Server Setup'); break; case $page == 'server-update': $smarty->assign('page_content', 'server-update.tpl'); $smarty->assign('page_title', 'Universal Campus::Server Update'); $smarty->assign('page_header', 'Linux Server Update'); break; case $page == 'screenshots': $smarty->assign('page_content', 'screenshots.tpl'); $smarty->assign('page_title', 'Universal Campus::Screenshots'); $smarty->assign('page_header', 'Screenshots'); break; case $page == 'download': $smarty->assign('page_content', 'download.tpl'); $smarty->assign('page_title', 'Universal Campus::Download'); $smarty->assign('page_header', 'Download'); break; case $page == 'faq': $smarty->assign('page_content', 'faq.tpl'); $smarty->assign('page_title', 'Universal Campus::FAQ'); $smarty->assign('page_header', 'FAQ'); break; default: $smarty->assign('page_content', 'home.tpl'); $smarty->assign('page_title', 'Universal Campus'); $smarty->assign('page_header', ''); break; } $smarty->display('index.tpl'); ?>