国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

list.php 3.1KB

2 lat temu
2 lat temu
2 lat temu
3 lat temu
3 lat temu
1 rok temu
6 miesięcy temu
3 lat temu
3 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * 栏目页
  4. *
  5. * @version $id:list.php$
  6. * @package DedeBIZ.Site
  7. * @copyright Copyright (c) 2022 DedeBIZ.COM
  8. * @license GNU GPL v2 (https://www.dedebiz.com/license)
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__)."/../system/common.inc.php");
  12. $t1 = ExecTime();
  13. $tid = (isset($tid) && is_numeric($tid) ? $tid : 0);
  14. $mod = (isset($mod) && is_numeric($mod) ? $mod : 0);
  15. $channelid = (isset($channelid) && is_numeric($channelid) ? $channelid : 0);
  16. if ($tid == 0 && $channelid == 0) die("dedebiz");
  17. if (isset($TotalResult)) $TotalResult = intval(preg_replace("/[^\d]/", '', $TotalResult));
  18. //如果指定了文档模型id但没有指定栏目id,那么自动获得为这个文档模型的第一个顶级栏目作为栏目默认栏目
  19. if (!empty($channelid) && empty($tid)) {
  20. $tinfos = $dsql->GetOne("SELECT tp.id,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.channeltype='$channelid' And tp.reid=0 ORDER BY sortrank ASC");
  21. if (!is_array($tinfos)) die(" No catalogs in the channel! ");
  22. $tid = $tinfos['id'];
  23. } else {
  24. $tinfos = $dsql->GetOne("SELECT ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$tid' ");
  25. }
  26. if (empty($tinfos)) die( DedeAlert("栏目信息获取失败,请检查是否存在当前栏目", ALERT_DANGER));
  27. if ($tinfos['issystem'] == -1) {
  28. $nativeplace = ((empty($nativeplace) || !is_numeric($nativeplace)) ? 0 : $nativeplace);
  29. $infotype = ((empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype);
  30. if (!empty($keyword)) $keyword = FilterSearch($keyword);
  31. $cArr = array();
  32. if (!empty($nativeplace)) $cArr['nativeplace'] = $nativeplace;
  33. if (!empty($infotype)) $cArr['infotype'] = $infotype;
  34. if (!empty($keyword)) $cArr['keyword'] = $keyword;
  35. include(DEDEINC."/archive/sglistview.class.php");
  36. $lv = new SgListView($tid, $cArr, $mod);
  37. } else {
  38. include(DEDEINC."/archive/listview.class.php");
  39. $lv = new ListView($tid, 1, $mod);
  40. }
  41. //对设置了会员级别的栏目进行处理
  42. if (isset($lv->Fields['corank']) && $lv->Fields['corank'] > 0) {
  43. require_once(DEDEINC.'/memberlogin.class.php');
  44. $cfg_ml = new MemberLogin();
  45. if ($cfg_ml->M_Rank < $lv->Fields['corank']) {
  46. $dsql->Execute('me', "SELECT * FROM `#@__arcrank`");
  47. while ($row = $dsql->GetObject('me')) {
  48. $memberTypes[$row->rank] = $row->membername;
  49. }
  50. $memberTypes[0] = "游客或没权限会员";
  51. $msgtitle = "您没有权限浏览栏目:{$lv->Fields['typename']}";
  52. $moremsg = "该栏目需要等级".$memberTypes[$lv->Fields['corank']]."才能浏览,您目前等级是".$memberTypes[$cfg_ml->M_Rank]." <a href='{$cfg_memberurl}/buy.php' class='btn btn-success btn-sm'>升级会员</a>";
  53. include_once(DEDETEMPLATE.'/apps/view_msg_catalog.htm');
  54. exit();
  55. }
  56. }
  57. if ($lv->IsError) ParamError();
  58. $lv->Display();
  59. if (DEBUG_LEVEL === TRUE) {
  60. $queryTime = ExecTime() - $t1;
  61. echo DedeAlert("页面加载总消耗时间:{$queryTime}", ALERT_DANGER);
  62. }
  63. ?>