DedeV6移动版
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

27 linhas
1.2KB

  1. <?php
  2. /**
  3. * 更新手机端首页
  4. *
  5. * @version $id:makehtml_m_homepage.php 15:15 2022年3月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. require_once (dirname(__FILE__)."/../system/common.inc.php");
  12. require_once DEDEINC."/archive/partview.class.php";
  13. $GLOBALS['_arclistEnv'] = 'index';
  14. $row = $dsql->GetOne("SELECT * FROM `#@__homepageset`");
  15. $row['templet'] = MfTemplet($row['templet']);
  16. $pv = new PartView();
  17. $row['templet'] =str_replace('.htm','_m.htm',$row['templet']);
  18. if (!file_exists($cfg_basedir.$cfg_templets_dir."/".$row['templet'])) {
  19. echo "主题模板文件不存在,无法显示网页";
  20. exit();
  21. }
  22. $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$row['templet']);
  23. $row['showmod'] = isset($row['showmod'])? $row['showmod'] : 0;
  24. $GLOBALS['dedebiz_path'] = isset($GLOBALS['dedebiz_path']) ? $GLOBALS['dedebiz_path'] : '/m';
  25. $pv->SaveToHtml(DEDEROOT.$GLOBALS['dedebiz_path'].'/index.html');
  26. ShowMsg("更新手机端首页成功,<a href='{$GLOBALS['dedebiz_path']}/index.html' target='_blank' class='txt-success'>浏览首页</a>","javascript:;");
  27. ?>