国内流行的内容管理系统(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.

38 lines
1.3KB

  1. <?php
  2. /**
  3. * 生成网站地图
  4. *
  5. * @version $Id: makehtml_map.php 1 11:17 2010年7月19日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2020, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__) . "/config.php");
  12. require_once(DEDEINC . "/sitemap.class.php");
  13. require_once(DEDEINC . "/dedetag.class.php");
  14. if (empty($dopost)) {
  15. ShowMsg("参数错误!", "-1");
  16. exit();
  17. }
  18. $serviterm = empty($serviterm) ? "" : $serviterm;
  19. $sm = new SiteMap();
  20. $maplist = $sm->GetSiteMap($dopost);
  21. if ($dopost == "site") {
  22. $murl = $cfg_cmspath . "/data/sitemap.html";
  23. $tmpfile = $cfg_basedir . $cfg_templets_dir . "/plus/sitemap.htm";
  24. } else {
  25. $murl = $cfg_cmspath . "/data/rssmap.html";
  26. $tmpfile = $cfg_basedir . $cfg_templets_dir . "/plus/rssmap.htm";
  27. }
  28. $dtp = new DedeTagParse();
  29. $dtp->LoadTemplet($tmpfile);
  30. $dtp->SaveTo($cfg_basedir . $murl);
  31. $dtp->Clear();
  32. echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
  33. echo "<div class=\"alert alert-success\" role=\"alert\">成功更新文件: $murl <a href='$murl' target='_blank' class='btn btn-secondary'>浏览...</a></div>";
  34. exit();