国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.0KB

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