DedeV6移动版
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

index.php 1.4KB

hace 2 años
12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * 手机端首页
  4. *
  5. * @version $id:index.php 10:46 2023年1月10日 xushubieli $
  6. * @package DedeBIZ.Libraries
  7. * @copyright Copyright (c) 2022, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. if (!file_exists(dirname(__FILE__).'/../data/common.inc.php')) {
  12. header('Location:install/index.php');
  13. exit();
  14. }
  15. if (preg_match("#PHP (.*) Development Server#",$_SERVER['SERVER_SOFTWARE'])) {
  16. if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME']) ) {
  17. header('HTTP/1.1 301 Moved Permanently');
  18. header('Location:'.$_SERVER['REQUEST_URI'].'/');
  19. }
  20. }
  21. if (isset($_GET['upcache']) || !file_exists('index.html')) {
  22. require_once (dirname(__FILE__)."/../system/common.inc.php");
  23. require_once DEDEINC."/archive/partview.class.php";
  24. $GLOBALS['_arclistEnv'] = 'index';
  25. $row = $dsql->GetOne("Select * From `#@__homepageset`");
  26. $row['templet'] = MfTemplet($row['templet']);
  27. $pv = new PartView();
  28. $row['templet'] =str_replace('.htm','_m.htm',$row['templet']);
  29. if (!file_exists($cfg_basedir.$cfg_templets_dir."/".$row['templet'])) {
  30. echo "主题模板文件不存在,无法显示网页";
  31. exit();
  32. }
  33. $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$row['templet']);
  34. $pv->Display();
  35. exit();
  36. } else {
  37. header('HTTP/1.1 301 Moved Permanently');
  38. header('Location:index.html');
  39. }
  40. ?>