DedeV6移动版
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

2 yıl önce
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * 手机端栏目页
  4. *
  5. * @version $id:list.php 10:46 2023年1月10日 xushubieli $
  6. * @package DedeBIZ.Libraries
  7. * @copyright Copyright (c) 2022, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. define('DEDEMOB', 'Y');
  12. require_once(dirname(__FILE__)."/../system/common.inc.php");
  13. $tid = (isset($tid) && is_numeric($tid) ? $tid : 0);
  14. $channelid = (isset($channelid) && is_numeric($channelid) ? $channelid : 0);
  15. if ($tid==0 && $channelid==0) die("Request Error!");
  16. if (isset($TotalResult)) $TotalResult = intval(preg_replace("/[^\d]/", '', $TotalResult));
  17. //如果指定了内容模型ID但没有指定栏目id,那么自动获得为这个内容模型的第一个顶级栏目作为频道默认栏目
  18. if (!empty($channelid) && empty($tid)) {
  19. $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");
  20. if (!is_array($tinfos)) die(" No catalogs in the channel! ");
  21. $tid = $tinfos['id'];
  22. } else {
  23. $tinfos = $dsql->GetOne("SELECT ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$tid'");
  24. }
  25. if ($tinfos['issystem']==-1) {
  26. $nativeplace = ((empty($nativeplace) || !is_numeric($nativeplace)) ? 0 : $nativeplace );
  27. $infotype = ((empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype );
  28. if (!empty($keyword)) $keyword = FilterSearch($keyword);
  29. $cArr = array();
  30. if (!empty($nativeplace)) $cArr['nativeplace'] = $nativeplace;
  31. if (!empty($infotype)) $cArr['infotype'] = $infotype;
  32. if (!empty($keyword)) $cArr['keyword'] = $keyword;
  33. include(DEDEINC."/archive/sglistview.class.php");
  34. $lv = new SgListView($tid,$cArr);
  35. } else {
  36. include(DEDEINC."/archive/listview.class.php");
  37. $lv = new ListView($tid);
  38. //对设置了会员级别的栏目进行处理
  39. if (isset($lv->Fields['corank']) && $lv->Fields['corank'] > 0)
  40. {
  41. require_once(DEDEINC.'/memberlogin.class.php');
  42. $cfg_ml = new MemberLogin();
  43. if ( $cfg_ml->M_Rank < $lv->Fields['corank'] ) {
  44. $dsql->Execute('me' , "SELECT * FROM `#@__arcrank` ");
  45. while($row = $dsql->GetObject('me'))
  46. {
  47. $memberTypes[$row->rank] = $row->membername;
  48. }
  49. $memberTypes[0] = "游客或没权限会员";
  50. $msgtitle = "您没有权限浏览栏目:{$lv->Fields['typename']}";
  51. $moremsg = "该栏目需要<span class='text-primary'>".$memberTypes[$lv->Fields['corank']]."</span>才能浏览,您目前等级是<span class='text-primary'>".$memberTypes[$cfg_ml->M_Rank]."</span>";
  52. include_once(DEDETEMPLATE.'/plus/view_msg_catalog.htm');
  53. exit();
  54. }
  55. }
  56. }
  57. if ($lv->IsError) ParamError();
  58. $lv->Display();
  59. ?>