You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
958 B
PHTML
34 lines
958 B
PHTML
5 years ago
|
<?php
|
||
|
// +----------------------------------------------------------------------
|
||
|
// | OneThink [ WE CAN DO IT JUST THINK IT ]
|
||
|
// +----------------------------------------------------------------------
|
||
|
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
|
||
|
// +----------------------------------------------------------------------
|
||
|
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
|
||
|
// +----------------------------------------------------------------------
|
||
|
|
||
|
namespace Media\Widget;
|
||
|
use Think\Controller;
|
||
|
|
||
|
/**
|
||
|
* 分类widget
|
||
|
* 用于动态调用分类信息
|
||
|
*/
|
||
|
|
||
|
class BaseWidget extends Controller{
|
||
|
|
||
|
/* 显示指定分类的同级分类或子分类列表 */
|
||
|
public function ranking(){
|
||
|
$map = array('game_status'=>1);
|
||
|
$game = M('Game','tab_');
|
||
|
|
||
|
$data = $game
|
||
|
->field(true)
|
||
|
->limit(10)
|
||
|
->where($map)->order('sort asc')->select();
|
||
|
$this->assign("list_rank",$data);
|
||
|
$this->display('Base/ranking');
|
||
|
}
|
||
|
|
||
|
}
|