国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2KB

  1. <?php
  2. /**
  3. * @version $Id: index.php 1 9:23 2010-11-11 tianya $
  4. * @package DedeCMS.Site
  5. * @copyright Copyright (c) 2020, DedeBIZ.COM
  6. * @license https://www.dedebiz.com/license
  7. * @link https://www.dedebiz.com
  8. */
  9. if (!file_exists(dirname(__FILE__) . '/data/common.inc.php')) {
  10. header('Location:install/index.php');
  11. exit();
  12. }
  13. //自动生成HTML版
  14. if (isset($_GET['upcache']) || !file_exists('index.html')) {
  15. require_once(dirname(__FILE__) . "/include/common.inc.php");
  16. require_once DEDEINC . "/arc.partview.class.php";
  17. $GLOBALS['_arclistEnv'] = 'index';
  18. $row = $dsql->GetOne("SELECT * FROM `#@__homepageset`");
  19. $row['templet'] = MfTemplet($row['templet']);
  20. $pv = new PartView();
  21. $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);
  22. $row['showmod'] = isset($row['showmod']) ? $row['showmod'] : 0;
  23. if ($row['showmod'] == 1) {
  24. $pv->SaveToHtml(dirname(__FILE__) . '/index.html');
  25. include(dirname(__FILE__) . '/index.html');
  26. exit();
  27. } else {
  28. $pv->Display();
  29. exit();
  30. }
  31. } else {
  32. header('HTTP/1.1 301 Moved Permanently');
  33. header('Location:index.html');
  34. }