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