<?php
/*
　* @$Id
　* @
　* @Ver: 2.0
　* @Create: 2009-11-18 8:10
　* @Modify: 
　* @Author: CPWEB http://www.cpweb.net.cn
　* @Copyright (C) 2008 www.cpweb.net.cn. All Rights Reserved.
　* @License CPWEB is free software and use is subject to license terms
　*/
class ArticleAction extends GlobalAction 
{
	function _initialize(){
		parent::_initialize();
		$this->cpweb_model='model';
		$this->cpweb_find['view']='View';
	}
	public function index()
	{
		$this->cpweb_find['order']='Article.isgood desc,Article.id desc';
		$this->cpweb_list();
		$this->cpweb_category_list();
		$this->cpweb_display('Article:index');
	}
	public function sorts()
	{
		$this->cpweb_find['order']='Article.isgood desc,Article.id desc';
		$this->cpweb_find['category']=intval($_REQUEST['id']);
		$this->cpweb_list();
		$this->cpweb_category_list();
		$this->cpweb_category();
		$this->cpweb_display('Article:sorts');
	}
	public function read(){
		$this->cpweb_find['setInc']='hits';
		$this->cpweb_find['front']=true;
		$this->cpweb_find['after']=true;
		$this->cpweb_read();
		$this->cpweb_category_list();
		$this->cpweb_display('Article:read');
	}
}
?>