00001 <?php
00002
00005
00006 require_once 'Smarty.class.php';
00007 require_once 'error.php';
00008 require_once 'const.php';
00009 require_once 'config.php';
00010 require_once('util.php');
00011
00015
00016 function redirect($url) {
00017 global $smarty, $debug_level;
00018
00019 if (empty($url)) {
00020 $url = "index.php";
00021 }
00022
00023 if (empty($smarty)) {
00024 $smarty =& smarty_init();
00025 }
00026
00027 $smarty->assign("url", $url);
00028 $smarty->assign("debug_level", $debug_level);
00029
00030 if ($debug_level == 0) {
00031 header("Location: $url");
00032 }
00033
00034 $smarty->display('header.tpl');
00035 $smarty->display('redirect.tpl');
00036 $smarty->display('footer.tpl');
00037 exit(0);
00038 }
00039
00040 ?>