<?php
/*秀影数据调用API文件*/
class ApiController extends Easy_Controller_Action {
	public function Init(){
		header('Content-type: application/x-javascript');i
	}
	public function keywordAction(){
		$limit = (int)$this->_Request->getParam('rows') ? (int)$this->_Request->getParam('rows') : 6 ; //定义显示搜索最高的6个关键词
		$keyword = new KeywordModel();
		$where = 'click>99';
		foreach($keyword->getAll($where, $limit) as $row){
			echo 'document.write(\'&nbsp;<a href="'.INSTALLDIR.'content/search/type/title/keyword/'.urlencode($row['keyword']).'/">'.urldecode($row['keyword']).'('.$row['click'].')</a>&nbsp;\');';
		}
		exit();
	}
	/*热门影片*/
	public function hotsAction(){
		$movie = new MovieModel();
	}
}?>