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

37 lines
1.1KB

  1. <?php
  2. /**
  3. * 自定义模型管理
  4. *
  5. * @version $Id: mychannel_main.php 1 15:26 2010年7月20日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_List');
  13. require_once(DEDEINC.'/datalistcp.class.php');
  14. setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
  15. $sql = "SELECT id,nid,typename,addtable,isshow,issystem FROM `#@__channeltype` ORDER BY id DESC";
  16. $dlist = new DataListCP();
  17. $dlist->SetTemplet(DEDEADMIN."/templets/mychannel_main.htm");
  18. $dlist->SetSource($sql);
  19. $dlist->display();
  20. function GetSta($sta,$id)
  21. {
  22. if($sta==1)
  23. {
  24. return ($id!=-1 ? "启用 &gt; <a href='mychannel_edit.php?dopost=hide&id=$id'><u>禁用</u></a>" : "固定项目");
  25. }
  26. else
  27. {
  28. return "禁用 &gt; <a href='mychannel_edit.php?dopost=show&id=$id'><u>启用</u></a>";
  29. }
  30. }
  31. function IsSystem($s)
  32. {
  33. return $s==1 ? "系统" : "自动";
  34. }