<?php
//引入配置文件
require_once(dirname(__FILE__)."/../include/common.inc.php");
//http://www.dede.com/plus/list.php?tid=1 获得$tid = 1 频道为1
$tid = (isset($tid) && is_numeric($tid) ? $tid : 0);
include(DEDEINC."/arc.listview.class.php");
//实列化对象文档列表类
$lv = new ListView($tid);
echo "<pre>";
var_dump($lv);
//对设置了会员级别的栏目进行处理
// 内容模型列表类 + 栏目连接类 $this->Fields = $this->TypeLink->TypeInfos;
if(isset($lv->Fields['corank']) && $lv->Fields['corank'] > 0)
{
require_once(DEDEINC.'/memberlogin.class.php');
$cfg_ml = new MemberLogin();
if( $cfg_ml->M_Rank < $lv->Fields['corank'] )
{
$dsql->Execute('me' , "SELECT * FROM `#@__arcrank` ");
while($row = $dsql->GetObject('me'))
{
$memberTypes[$row->rank] = $row->membername;
}
$memberTypes[0] = "游客或没权限会员";
$msgtitle = "你没有权限浏览栏目:{$lv->Fields['typename']} !";
$moremsg = "这个栏目需要 <font color='red'>".$memberTypes[$lv->Fields['corank']]."</font> 才能访问,你目前是:<font color='red'>".$memberTypes[$cfg_ml->M_Rank]."</font> !";
include_once(DEDETEMPLATE.'/plus/view_msg_catalog.htm');
exit();
}
}