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

45 lines
1.9KB

  1. <?php
  2. /**
  3. * 增加自由列表
  4. *
  5. * @version $id:freelist_add.php 8:48 2010年7月13日 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_once(dirname(__FILE__)."/config.php");
  12. CheckPurview('c_FreeList');
  13. if (empty($dopost)) {
  14. require_once DEDEINC.'/typelink/typelink.class.php';
  15. include DedeInclude('templets/freelist_add.htm');
  16. exit();
  17. } else if ($dopost == 'save') {
  18. if (!isset($types)) $types = '';
  19. if (!isset($nodefault)) $nodefault = '0';
  20. $atts = " pagesize='$pagesize' col='$col' titlelen='$titlelen' orderby='$orderby' orderway='$order' ";
  21. $ntype = '';
  22. $edtime = time();
  23. if (empty($channel)) {
  24. showmsg('频道类型不能为空', '-1');
  25. exit();
  26. }
  27. if (is_array($types)) {
  28. foreach ($types as $v) $ntype .= $v.' ';
  29. }
  30. if ($ntype != '') $atts .= " type='".trim($ntype)."' ";
  31. if (!empty($typeid)) $atts .= " typeid='$typeid' ";
  32. if (!empty($channel)) $atts .= " channel='$channel' ";
  33. if (!empty($subday)) $atts .= " subday='$subday' ";
  34. if (!empty($keywordarc)) $atts .= " keyword='$keywordarc' ";
  35. if (!empty($att)) $atts .= " att='$att' ";
  36. $innertext = trim($innertext);
  37. if (!empty($innertext)) $innertext = stripslashes($innertext);
  38. $listTag = "{dede:list $atts}$innertext{/dede:list}";
  39. $listTag = addslashes($listTag);
  40. $inquery = "INSERT INTO `#@__freelist` (`title`,`namerule` , `listdir`,`defaultpage`,`nodefault`,`templet`,`edtime`, `maxpage`,`click`,`listtag`,`keywords`,`description`) VALUES ('$title','$namerule','$listdir','$defaultpage','$nodefault','$templet','$edtime','$maxpage','0','$listTag','$keywords','$description');";
  41. $dsql->ExecuteNoneQuery($inquery);
  42. ShowMsg("成功增加一个自由列表", "freelist_main.php");
  43. exit();
  44. }
  45. ?>