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

65 lines
2.2KB

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