<?php
/*
 +----------------------------------------------------------------------
 | TEMMOKUMVC [ NO BEST, ONLY BETTER ]
 +----------------------------------------------------------------------
 | Copyright (c) 2018~2019 https://www.temmoku.cn All rights reserved.
 +----------------------------------------------------------------------
 | Author: 张宗强 Email:webmaster@temmoku.cn QQ:158726877 516669373 TEL:17895221001 微信:temmokumvc
 +---------------------------------------------------------------------- 
*/
namespace plugin\sms\home\controller;
use \temmoku\db;
use \temmoku\controller;
class index extends controller{
	public function vendor(){
		if(!$_GET['name'] ){
			$this->err('缺少参数');
		}
		$son_controller=$_GET['c'] ? strtolower($_GET['c']) :'index';
		$son_method=$_GET['m'] ? strtolower($_GET['m']) :'index';
		$_GET['name']=strtolower($_GET['name']);
		$file= APP_PATH."plugin/".MODULE."/vendor/".$_GET['name']."/home/".$son_controller.".php";
	    if(!is_file($file)){
	    		$this->err('不存在的控制器文件<br>'.$file);
	    }
	    @include_once $file;
	    define('home_login_url',WEBURL."/".MODULE.'/index/vendor/name/'.$_GET['name']."/");
		$Modular_Class= "plugin\\".MODULE."\\vendor\\".$_GET['name']."\\home\\".$son_controller;
	    if (class_exists($Modular_Class)) {
		    //加载类
		    $Class=new $Modular_Class(C('more_login_list.'.$_GET['name']));
		    //加载方法
		    Load_Method($Class,$son_method,$Modular_Class);
		}else{
			E($Modular_Class.'控制器不存在');
		}
	}
}
?>