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

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