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

66 lines
2.3KB

  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) 2007 - 2018, DesDev, Inc.
  8. * @copyright Copyright (c) 2020, DedeBIZ.COM
  9. * @license https://www.dedebiz.com/license/v6
  10. * @link https://www.dedebiz.com
  11. */
  12. require(dirname(__FILE__)."/config.php");
  13. CheckPurview('temp_Other');
  14. require_once(DEDEINC."/typelink.class.php");
  15. if(empty($dopost)) $dopost = '';
  16. $aid = intval($aid);
  17. $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'mytag_main.php' : $_COOKIE['ENV_GOBACK_URL'];
  18. if($dopost=='delete')
  19. {
  20. $dsql->ExecuteNoneQuery("DELETE FROM `#@__mytag` WHERE aid='$aid'");
  21. ShowMsg("成功删除一个自定义标记!",$ENV_GOBACK_URL);
  22. exit();
  23. }
  24. else if($dopost=="saveedit")
  25. {
  26. CheckCSRF();
  27. $starttime = GetMkTime($starttime);
  28. $endtime = GetMkTime($endtime);
  29. $query = "UPDATE `#@__mytag`
  30. SET
  31. typeid='$typeid',
  32. timeset='$timeset',
  33. starttime='$starttime',
  34. endtime='$endtime',
  35. normbody='$normbody',
  36. expbody='$expbody'
  37. WHERE aid='$aid' ";
  38. $dsql->ExecuteNoneQuery($query);
  39. ShowMsg("成功更改一个自定义标记!",$ENV_GOBACK_URL);
  40. exit();
  41. }
  42. else if($dopost=="getjs")
  43. {
  44. require_once(DEDEINC."/oxwindow.class.php");
  45. $jscode = "<script src='{$cfg_phpurl}/mytag_js.php?aid=$aid' language='javascript'></script>";
  46. $showhtml = "<xmp style='color:#333333;background-color:#ffffff'>\r\n\r\n$jscode\r\n\r\n</xmp>";
  47. $showhtml .= "<b>预览:</b><iframe name='testfrm' frameborder='0' src='mytag_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='250'></iframe>";
  48. $wintitle = "宏标记定义-获取JS";
  49. $wecome_info = "<a href='mytag_main.php'><u>宏标记定义</u></a>::获取JS";
  50. $win = new OxWindow();
  51. $win->Init();
  52. $win->AddTitle('以下为选定宏标记的JS调用代码:');
  53. $winform = $win->GetWindow('hand', $showhtml);
  54. $win->Display();
  55. exit();
  56. }
  57. else if($dopost=="testjs")
  58. {
  59. echo "<body bgcolor='#ffffff'>";
  60. echo "<script src='{$cfg_phpurl}/mytag_js.php?aid=$aid&nocache=1' language='javascript'></script>";
  61. exit();
  62. }
  63. $row = $dsql->GetOne("SELECT * FROM `#@__mytag` WHERE aid='$aid'");
  64. include DedeInclude('templets/mytag_edit.htm');