<?php



/**

 * 会员注册登录

 */

namespace Mobile\Controller;

use Common\Controller\PhonegameController;

class SearchController extends PhonegameController {
    //登录
	public function index() {

        $data=I('name');


        $keywords = '%'.$data.'%';  
        //获取搜索关键字 
        $where['gamename'] = array('like',$keywords);  
        
        $data = M('m_game')->where($where)->select();
        
        /*游戏类型 */
        $type  = array('1'=>'角色扮演','2'=>'战争策略','3'=>'模拟经营','4'=>'休闲竞技','5'=>'3D');
        $this->assign ('type', $type);
        
        $this->assign('data',$data);
        $this->display($this->template.'/template1'.'/Search'.'/index');
        

    }

    
    
}

