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

38 lines
1.3KB

  1. <?php
  2. /**
  3. * 增加自定义标记
  4. *
  5. * @version $Id: mytag_add.php 1 15:35 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. if($dopost=="save")
  16. {
  17. CheckCSRF();
  18. $tagname = trim($tagname);
  19. $row = $dsql->GetOne("SELECT typeid FROM `#@__mytag` WHERE typeid='$typeid' AND tagname LIKE '$tagname'");
  20. if(is_array($row))
  21. {
  22. ShowMsg("在相同栏目下已经存在同名的标记!","-1");
  23. exit();
  24. }
  25. $starttime = GetMkTime($starttime);
  26. $endtime = GetMkTime($endtime);
  27. $inQuery = "INSERT INTO `#@__mytag`(typeid,tagname,timeset,starttime,endtime,normbody,expbody)
  28. VALUES('$typeid','$tagname','$timeset','$starttime','$endtime','$normbody','$expbody'); ";
  29. $dsql->ExecuteNoneQuery($inQuery);
  30. ShowMsg("成功增加一个自定义标记!","mytag_main.php");
  31. exit();
  32. }
  33. $startDay = time();
  34. $endDay = AddDay($startDay,30);
  35. $startDay = GetDateTimeMk($startDay);
  36. $endDay = GetDateTimeMk($endDay);
  37. include DedeInclude('templets/mytag_add.htm');