<?php
header('Content-Type: text/html; charset=UTF-8');
error_reporting(0);
@ini_set("short_open_tag", "on");
date_default_timezone_set('PRC');
$mysql=require("fuckyoumdyiscyab/db.php");
$dbhost=$mysql['DB_HOST'].':'.$mysql['DB_PORT'];
$dbuser=$mysql['DB_USER'];
$dbpassword=$mysql['DB_PWD'];
$dbmysql=$mysql['DB_NAME'];
if($con = mysql_connect($dbhost,$dbuser,$dbpassword)){
	mysql_select_db($dbmysql, $con);
}else{
	exit('数据库链接失败！');
}
mysql_query("set names utf8"); 
$tableqz=$mysql['DB_PREFIX'];
$result=mysql_query("select * from {$tableqz}webconfigs");
while($row = mysql_fetch_array($result)){ 
	$config[$row['vkey']]=$row['value'];
}
function get_curl($url){
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL,$url);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36');
	curl_setopt($ch, CURLOPT_ENCODING, "gzip");
	curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
	$ret = curl_exec($ch);
	curl_close($ch);
	return $ret;
}
$qq=$_GET['qq'];
$uin=$qq;
if(empty($qq)==true){
	exit('<script>
	var uin=prompt("请输入您要加入的QQ群","");//将输入的内容赋给变量 uin ，
    //这里需要注意的是，prompt有两个参数，前面是提示的话，后面是当对话框出来后，在对话框里的默认值
if(!/^(\+|-)?(\d+)(\.\d*)?$/g.test(uin)){ 

                document.write("请输入正确的QQ群！如需再次查询，请刷新本页！"); 

            }else if(uin)//如果返回的有内容
    {
		var str=uin.length;
		if(str < 5 || str >10){
			document.write("请输入大于4小于10的QQ群号码！如需再次查询，请刷新本页！"); 
		}else{
			window.location.href="/joingroup.php?qun="+uin;
		}
         
     }else{
		 document.write("请输入要加入的QQ群号码！如需再次查询，请刷新本页！");
	 }
	
	</script>');
}
else{
?>

<?php
}
?>

