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

  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) 2007 - 2018, DesDev, Inc.
  8. * @copyright Copyright (c) 2020, DedeBIZ.COM
  9. * @license https://www.dedebiz.com/license/v6
  10. * @link https://www.dedebiz.com
  11. */
  12. require_once(dirname(__FILE__)."/config.php");
  13. CheckPurview('c_List');
  14. require_once(DEDEINC.'/datalistcp.class.php');
  15. setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
  16. $sql = "SELECT id,nid,typename,addtable,isshow,issystem FROM `#@__channeltype` ORDER BY id DESC";
  17. $dlist = new DataListCP();
  18. $dlist->SetTemplet(DEDEADMIN."/templets/mychannel_main.htm");
  19. $dlist->SetSource($sql);
  20. $dlist->display();
  21. function GetSta($sta,$id)
  22. {
  23. if($sta==1)
  24. {
  25. return ($id!=-1 ? "启用 &gt; <a href='mychannel_edit.php?dopost=hide&id=$id'><u>禁用</u></a>" : "固定项目");
  26. }
  27. else
  28. {
  29. return "禁用 &gt; <a href='mychannel_edit.php?dopost=show&id=$id'><u>启用</u></a>";
  30. }
  31. }
  32. function IsSystem($s)
  33. {
  34. return $s==1 ? "系统" : "自动";
  35. }