<!--{include(pe_tpl('header.html'));}-->
<div class="right">
<div class="title">
  <h1>VIP会员专区</h1>
</div>
	<div class="con">
	<div class="nav">
		<div class="l">
			<li><a href="user.php?mod=lesson&act=list" <!--{if(empty($_g_cid)):}-->class="sel"<!--{endif;}-->>首&nbsp;&nbsp;页</a></li>
			<!--{foreach($category_pid_arr as $v):}-->
			<li><a href="user.php?mod=lesson&act=list&package_id={$_g_package_id}&cid={$v['category_id']}" <!--{if($category_tid==$v['category_id']):}-->class="sel"<!--{endif;}-->>{$v['category_name']}</a><!--{if($v['vip']):}--><img src="{$pe['host_tpl']}images/vip.gif" width="16" height="16" alt="vip栏目"/><!--{endif;}--></li>
			<!--{endforeach;}-->
		</div>
		<!--<span class="fr mat5 c666">共为您找到<span class="cred">{$db->page->listnums}</span>个课程</span>-->
		<div class="clear"></div>
	</div>
	<!--{if(isset($_g_cid)):}-->
	<!--{if(is_array($cache_category_arr[$category_tid])):}-->
	<div class="subnav">
		<p>分　类：
				<!--{foreach($cache_category_arr[$category_tid] as $v):}-->
				<!--{if($v['vip']):}-->[vip]<!--{endif;}--><a href="user.php?mod=lesson&act=list&package_id={$_g_package_id}&cid={$v['category_id']}" <!--{if($v['category_id']==$_g_cid):}-->class="sel"<!--{endif;}-->>{$v['category_name']}</a>
				<!--{endforeach;}-->
		</p>
			<div class="clear"></div>
	</div>
	<!--{endif;}-->
	<div class="list">
		<!--{foreach($info_list as $v):}-->
		<div class="l">
			<h3><!--{if($v['lesson_state']==1):}--><i>[置顶]</i><!--{endif;}--><a href="user.php?mod=lesson&id={$v['lesson_id']}">{$v['lesson_name']}</a></h3><span>{pe_date($v['lesson_atime'])}</span>
			<div class="clear"></div>
			<p>{pe_text($v['lesson_text'],570)}</p>
		</div>
		<!--{endforeach;}-->
		<div class="pages">{$db->page->html}</div>
		<div class="clear"></div>
	</div>
	<!--{else:}-->
	<div class="cat">
	<!--{if(is_array($cache_category)):}-->
	<?php $x=0;?>
	<!--{foreach($category_pid_arr as $v):}-->
	<?php $x++;$y=$x%2;?>
	<div class="box<?php if($y)echo ' fl';else echo ' fr';?>">
		<div class="t"><b>{$v['category_name']}</b><!--{if($v['vip']):}--><img src="{$pe['host_tpl']}images/vip.gif" width="16" height="16" alt="vip栏目"/><!--{endif;}--><span><a href="user.php?mod=lesson&act=list&cid={$v['category_id']}">更多&gt;&gt;</a></span></div>
	<?php 
		$category_id_arr = $class_category->getcid_arr($cache_category,$v['category_id'], $init = 1);
		$category_id_arr[] = $v['category_id'];
			//获取顶级分类id
		$category_tid = $class_category->gettid($cache_category,$v['category_id']);
		$sqlwhere = " and `category_id` in('".implode("','", (array)$category_id_arr)."')";
		$sqlwhere .= " order by `lesson_state` desc, `lesson_id` desc";
		$info_list = $db->pe_selectall('lesson', $sqlwhere, '*', array(5));
	?>	
		<ul>
		<!--{foreach($info_list as $r):}-->
		<li><a href="user.php?mod=lesson&id={$r['lesson_id']}">{$r['lesson_name']}</a><i>{date('m-d',$r['lesson_atime'])}</i></li>
		<!--{endforeach;}-->	
		</ul>		
	</div>			
	<!--{endforeach;}-->
	<!--{endif;}-->
</div>
	<!--{endif;}-->
	</div>
</div>
<!--{include(pe_tpl('footer.html'));}-->