<?php
function salefty($cfgValue,$wapid = null){
	if($wapid == null)
	{ 
		$wapid = WAPID;
	}
	$cfgValue -> intoOne(
		array(
			$wapid.'_urlgl' => 'AND|and|order|by|ORDER|UNION|union|select|SEARCH|from|FROM|or|<|>|xor',
			$wapid.'_strgl' => '色情|阴道|乳房|鸡巴|阴茎|阴毛|睾丸|性交|口交|阴蒂|做爱|黄色|射精|习近平|毛泽东',
			'mysqlconn'     => 'c',
			$wapid.'_re'              => 'no',
		)
	);
	if($cfgValue->getValue($wapid.'_re') == 'ok'){
		define('RE','ok');
	}else{
		define('RE','no');
	}
$urlArray = $cfgValue->getValue($wapid.'_urlgl');
	if ($cfg['GET']['GL'] == TRUE) {
		$ZZ = '/' . $urlArray . '/';
		$GETURL = $_SERVER['QUERY_STRING'];
		if (preg_match($ZZ, $GETURL, $ERROR))
		{
			
			die('您好，您提交的网址中含有非法字符，已经被拦截!');
			exit();
		}
	}
$CHARGL = $cfgValue->getValue($wapid.'_strgl');
	if($_POST != NULL)
	{
		$CGL = '/' . $CHARGL . '/';
		$CGLSTR = explode("|",$CHARGL);
		foreach($CGLSTR as $keyword)
		{
		$strstr[$keyword] = '**';
		}
		foreach ($_POST as $key => $value)
		{
			$_POST[$key] = strtr($value,$strstr);
			$_POST[$key] = htmlspecialchars($_POST[$key], ENT_QUOTES);
	
		}
	}

}