|
12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- /**
- * 手机端首页
- *
- * @version $id:index.php 10:46 2023年1月10日 xushubieli $
- * @package DedeBIZ.Libraries
- * @copyright Copyright (c) 2022, DedeBIZ.COM
- * @license https://www.dedebiz.com/license
- * @link https://www.dedebiz.com
- */
- if (!file_exists(dirname(__FILE__).'/../data/common.inc.php')) {
- header('Location:install/index.php');
- exit();
- }
- if (preg_match("#PHP (.*) Development Server#",$_SERVER['SERVER_SOFTWARE'])) {
- if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME']) ) {
- header('HTTP/1.1 301 Moved Permanently');
- header('Location:'.$_SERVER['REQUEST_URI'].'/');
- }
- }
- if (isset($_GET['upcache']) || !file_exists('index.html')) {
- require_once (dirname(__FILE__)."/../system/common.inc.php");
- require_once DEDEINC."/archive/partview.class.php";
- $GLOBALS['_arclistEnv'] = 'index';
- $row = $dsql->GetOne("Select * From `#@__homepageset`");
- $row['templet'] = MfTemplet($row['templet']);
- $pv = new PartView();
- $row['templet'] =str_replace('.htm','_m.htm',$row['templet']);
- if (!file_exists($cfg_basedir.$cfg_templets_dir."/".$row['templet'])) {
- echo "主题模板文件不存在,无法显示网页";
- exit();
- }
- $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$row['templet']);
- $pv->Display();
- exit();
- } else {
- header('HTTP/1.1 301 Moved Permanently');
- header('Location:index.html');
- }
- ?>
|