index.php 536 B

123456789101112131415161718192021
  1. <?php
  2. //管理后台入口文件
  3. define('IN_T',true);
  4. require 'include/init.php';
  5. //请求模块
  6. $module = isset($_REQUEST['m']) ? Common::sfilter($_REQUEST['m']) : 'index';
  7. //未登录
  8. if($admin['id']<=0 && $module!='login'){
  9. Common::base_header("Location:".$_lang['host']."".ADMIN_PATH."/?m=login\n");
  10. }
  11. if(file_exists($module_file= 'module/'.$module.'.php')){
  12. require $module_file;
  13. $tp->assign('title','管理后台');
  14. $tp->assign('module',$module);
  15. $tp->display('index.tpl');
  16. }
  17. else{
  18. die('hacking attempt');
  19. }
  20. ?>