<?php
/*
 * 愚子方提供解码
 * 联系QQ: 179210540
 * 仅提供学习使用
 */
class RelateWidget extends Widget 
{
	public function render($request){
		
		
		$Alizi = new AliziAction();
		$aliziConfig = $Alizi->aliziConfig();
		if($aliziConfig['relate_item_show']){
			$num = $aliziConfig['relate_item_num'];
			
			$list = M('Item')->where("is_delete=0 AND status=1 AND category_id={$request['category_id']} AND id!={$request['id']}")->limit($num)->order('sort_order asc,is_hot desc,id desc')->select();
			if(empty($list)) return false;
			include('Order/Relate.php');
		}else{
			return false;
		}
	}
}
?>