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

  1. <?php
  2. /**
  3. * 增加自定义标记
  4. *
  5. * @version $id:mytag_add.php 15:35 2010年7月20日 tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022 DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require(dirname(__FILE__)."/config.php");
  12. if (DEDEBIZ_SAFE_MODE) {
  13. die(DedeAlert("系统已启用安全模式,无法使用当前功能",ALERT_DANGER));
  14. }
  15. CheckPurview('temp_Other');
  16. require_once(DEDEINC."/typelink/typelink.class.php");
  17. if (empty($dopost)) $dopost = "";
  18. if ($dopost == "save") {
  19. CheckCSRF();
  20. $tagname = trim($tagname);
  21. $row = $dsql->GetOne("SELECT typeid FROM `#@__mytag` WHERE typeid='$typeid' AND tagname LIKE '$tagname'");
  22. if (is_array($row)) {
  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) 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');
  38. ?>