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

52 lines
2.3KB

  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 style='color:#333333;background-color:#ffffff'>\r\n\r\n$jscode\r\n\r\n</xmp>";
  36. $showhtml .= "预览:<iframe name='testfrm' frameborder='0' src='mytag_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='250'></iframe>";
  37. $wintitle = "宏标记定义-获取js";
  38. $wecome_info = "<a href='mytag_main.php'>宏标记定义</a>::获取js";
  39. $win = new OxWindow();
  40. $win->Init();
  41. $win->AddTitle('以下为选定宏标记的js调用代码:');
  42. $winform = $win->GetWindow('hand', $showhtml);
  43. $win->Display();
  44. exit();
  45. } else if ($dopost == "testjs") {
  46. echo "<body>";
  47. echo "<script src='{$cfg_phpurl}/mytag_js.php?aid=$aid&nocache=1'></script>";
  48. exit();
  49. }
  50. $row = $dsql->GetOne("SELECT * FROM `#@__mytag` WHERE aid='$aid'");
  51. include DedeInclude('templets/mytag_edit.htm');
  52. ?>