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

50 lines
2.1KB

  1. <?php
  2. /**
  3. * 修改自定义标记
  4. *
  5. * @version $id:mytag_edit.php 15:37 2010年7月20日 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(dirname(__FILE__)."/config.php");
  12. if (DEDEBIZ_SAFE_MODE) {
  13. die(DedeAlert("系统已启用安全模式,无法使用当前功能",ALERT_DANGER));
  14. }
  15. CheckPurview('temp_Other');
  16. require_once(DEDEINC."/typelink/typelink.class.php");
  17. if (empty($dopost)) $dopost = '';
  18. $aid = intval($aid);
  19. $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'mytag_main.php' : $_COOKIE['ENV_GOBACK_URL'];
  20. if ($dopost == 'delete') {
  21. $dsql->ExecuteNoneQuery("DELETE FROM `#@__mytag` WHERE aid='$aid'");
  22. ShowMsg("成功删除一个自定义标记", $ENV_GOBACK_URL);
  23. exit();
  24. } else if ($dopost == "saveedit") {
  25. CheckCSRF();
  26. $starttime = GetMkTime($starttime);
  27. $endtime = GetMkTime($endtime);
  28. $query = "UPDATE `#@__mytag` SET typeid='$typeid',timeset='$timeset',starttime='$starttime',endtime='$endtime',normbody='$normbody',expbody='$expbody' WHERE aid='$aid' ";
  29. $dsql->ExecuteNoneQuery($query);
  30. ShowMsg("成功修改一个自定义标记", $ENV_GOBACK_URL);
  31. exit();
  32. } else if ($dopost == "getjs") {
  33. require_once(DEDEINC."/libraries/oxwindow.class.php");
  34. $jscode = "<script src='{$cfg_phpurl}/mytag_js.php?aid=$aid'></script>";
  35. $showhtml = "<xmp>\r\n\r\n$jscode\r\n\r\n</xmp>";
  36. $showhtml .= "<iframe name='testfrm' frameborder='0' id='testfrm' src='mytag_edit.php?aid={$aid}&dopost=testjs'></iframe>";
  37. $wecome_info = "<a href='mytag_main.php'>自定义宏标记</a> - 获取标签";
  38. $win = new OxWindow();
  39. $win->Init();
  40. $winform = $win->GetWindow("hand", $showhtml);
  41. $win->Display();
  42. exit();
  43. } else if ($dopost == "testjs") {
  44. echo "<body>";
  45. echo "<script src='{$cfg_phpurl}/mytag_js.php?aid=$aid&nocache=1'></script>";
  46. exit();
  47. }
  48. $row = $dsql->GetOne("SELECT * FROM `#@__mytag` WHERE aid='$aid'");
  49. include DedeInclude('templets/mytag_edit.htm');
  50. ?>