<?php
/***
*
*@package binzcms
*@version $id:ModFrontRssClass.php, v 1.0
*@author 斌子
*@Sun Sep 12 15:04:28 GMT 2010
*@copyright (c) 2009-2010 binzcms
*
*/
if(!defined("BINZCMS")) {
	die("hacking");
}
/**
 *
 * ModFrontRssClass
 * rss
 * 
 */
class ModFrontRssClass extends BaseClass {
	/**
	 * __construct
	 *
	 * 构造函数
	 * @access  public（权限）
	 */
	public function __construct($act) {
		parent::__construct($act);
	}
	/**
	 * mod_front_article_rss
	 *
	 * rss输出
	 * @access  public（权限）
	 * @param   int		$num		文章数目
	 * @return  array
	 */
	public function mod_front_article_rss($num) {
		$article_array	= array();
		$article_sql	= '';

		$where					= "WHERE a.article_state=1";
		$article_sql			= "SELECT a.*,c.class_type_tag,c.class_name FROM #binz#article AS a
									INNER JOIN #binz#article_class AS c ON a.class_id=c.class_id
									$where
									ORDER BY a.article_time DESC LIMIT 0,".$num;
		$article_array	= $this->binz_db->set_select_sql($article_sql);
		
		return $article_array;
	}
	/**
	 * __destruct
	 *
	 * 析构函数
	 * @access  public（权限）
	 */
	public function __destruct() {

	}	
}
?>