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

makehtml_js_action.php 1.9KB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * 生成js操作
  4. *
  5. * @version $Id: makehtml_js_action.php 1 11:04 2010年7月19日Z tianya $
  6. * @package DedeBIZ.Administrator
  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__)."/config.php");
  12. CheckPurview('sys_MakeHtml');
  13. require_once(DEDEINC."/archive/partview.class.php");
  14. if (empty($typeid)) $typeid = 0;
  15. if (empty($templet)) $templet = "plus/js.htm";
  16. if (empty($uptype)) $uptype = "all";
  17. if ($uptype == "all") {
  18. $row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE id>'$typeid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;");
  19. if (!is_array($row)) {
  20. echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
  21. echo "<div class=\"alert alert-success\" role=\"alert\">完成所有文件更新</div>";
  22. exit();
  23. } else {
  24. $pv = new PartView($row['id']);
  25. $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
  26. $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/static/js/".$row['id'].".js", 0);
  27. $typeid = $row['id'];;
  28. ShowMsg("成功更新".$cfg_cmspath."/static/js/".$row['id'].".js,继续执行任务", "makehtml_js_action.php?typeid=$typeid", 0, 100);
  29. exit();
  30. }
  31. } else {
  32. $pv = new PartView($typeid);
  33. $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
  34. $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/static/js/".$typeid.".js", 0);
  35. echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
  36. echo "<div class=\"alert alert-success\" role=\"alert\">成功更新".$cfg_cmspath."/static/js/".$typeid.".js";
  37. echo "预览:</div>";
  38. echo "<hr>";
  39. echo "<script src='".$cfg_cmspath."/static/js/".$typeid.".js'></script>";
  40. exit();
  41. }