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

56 lines
2.2KB

  1. <?php
  2. /**
  3. * 自定义标记修改
  4. *
  5. * @version $Id: mytag_edit.php 1 15:37 2010年7月20日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(dirname(__FILE__)."/config.php");
  12. CheckPurview('temp_Other');
  13. require_once(DEDEINC."/typelink/typelink.class.php");
  14. if (empty($dopost)) $dopost = '';
  15. $aid = intval($aid);
  16. $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'mytag_main.php' : $_COOKIE['ENV_GOBACK_URL'];
  17. if ($dopost == 'delete') {
  18. $dsql->ExecuteNoneQuery("DELETE FROM `#@__mytag` WHERE aid='$aid'");
  19. ShowMsg("成功删除一个自定义标记", $ENV_GOBACK_URL);
  20. exit();
  21. } else if ($dopost == "saveedit") {
  22. CheckCSRF();
  23. $starttime = GetMkTime($starttime);
  24. $endtime = GetMkTime($endtime);
  25. $query = "UPDATE `#@__mytag`
  26. SET
  27. typeid='$typeid',
  28. timeset='$timeset',
  29. starttime='$starttime',
  30. endtime='$endtime',
  31. normbody='$normbody',
  32. expbody='$expbody'
  33. WHERE aid='$aid' ";
  34. $dsql->ExecuteNoneQuery($query);
  35. ShowMsg("成功修改一个自定义标记", $ENV_GOBACK_URL);
  36. exit();
  37. } else if ($dopost == "getjs") {
  38. require_once(DEDEINC."/libraries/oxwindow.class.php");
  39. $jscode = "<script src='{$cfg_phpurl}/mytag_js.php?aid=$aid'></script>";
  40. $showhtml = "<xmp style='color:#333333;background-color:#ffffff'>\r\n\r\n$jscode\r\n\r\n</xmp>";
  41. $showhtml .= "预览:<iframe name='testfrm' frameborder='0' src='mytag_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='250'></iframe>";
  42. $wintitle = "宏标记定义-获取JS";
  43. $wecome_info = "<a href='mytag_main.php'>宏标记定义</a>::获取JS";
  44. $win = new OxWindow();
  45. $win->Init();
  46. $win->AddTitle('以下为选定宏标记的JS调用代码:');
  47. $winform = $win->GetWindow('hand', $showhtml);
  48. $win->Display();
  49. exit();
  50. } else if ($dopost == "testjs") {
  51. echo "<body>";
  52. echo "<script src='{$cfg_phpurl}/mytag_js.php?aid=$aid&nocache=1'></script>";
  53. exit();
  54. }
  55. $row = $dsql->GetOne("SELECT * FROM `#@__mytag` WHERE aid='$aid'");
  56. include DedeInclude('templets/mytag_edit.htm');