|
- <?php
- /**
- * 更新手机端首页
- *
- * @version $id:makehtml_m_homepage.php 15:15 2022年3月10日 xushubieli $
- * @package DedeBIZ.Libraries
- * @copyright Copyright (c) 2022, DedeBIZ.COM
- * @license https://www.dedebiz.com/license
- * @link https://www.dedebiz.com
- */
- 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']);
- $row['showmod'] = isset($row['showmod'])? $row['showmod'] : 0;
- $GLOBALS['dedebiz_path'] = isset($GLOBALS['dedebiz_path']) ? $GLOBALS['dedebiz_path'] : '/m';
- $pv->SaveToHtml(DEDEROOT.$GLOBALS['dedebiz_path'].'/index.html');
- ShowMsg("更新手机端首页成功,<a href='{$GLOBALS['dedebiz_path']}/index.html' target='_blank' class='txt-success'>浏览首页</a>","javascript:;");
- ?>
|