<?php

/*

'**************************************************************************************************

' 软件名称: 黑色幻想舞曲管理系统CMS2.0

' 版本编号: hshxsdj 2.0

' 官方网站: http://www..hshxs.com

' 官方论坛：http://bbs.hshxs.com

' 版权所有: 黑色幻想开发团队    噬己翼(QQ:532917920)

' 郑重声明:

'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；

'    2、黑色幻想网络事业部保留此软件的法律追究权利

'**************************************************************************************************

*/

include "../include/conn.php";

include "../include/function.php";

include "../include/qqlogin.php";

include "admin_version.php";

include "admin_loginstate.php";

?>

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=gbk" />

<title>QQ登入设置设置</title>

<link href="images/style.css" rel="stylesheet" type="text/css" />

<link href="images/alerts.css" rel="stylesheet" type="text/css" />

<script language="javascript" src="js/jquery.js"></script>

<script type="text/javascript" language="javascript">var tentpath='<?php echo S_SitePath?>';</script>

<script language="javascript" src="js/jquery.js"></script>

<script language="javascript" src="js/alerts.js"></script>

</head>

<body>

<?php SystemPer(1);?>

<div class="r_main" style="margin-top:10px;">

	<div class="r_content">

		<div class="r_content_1">

          <form action="?action=saveconf" method="post" name="form4" id="form4">

 <table  border="0" cellpadding="0" cellspacing="0" class="tb_Style" width="98%" style="margin:0 auto;">

  <tr>

    <td colspan="3" class="td_title" height="30">&nbsp;QQ登入基本参数设置&nbsp;&nbsp;&nbsp;---->&nbsp;<font color=red>如没有以下参数，<a href="http://connect.qq.com/intro/login/" target="_blank"><<点此注册>></a></font></td>

  </tr>

<tr >

<td width="14%" height="30" align="left" class="td_border">&nbsp;appid：</td>

<td align="left" class="td_border" colspan="2">&nbsp;<input type="text" name="appid" id="appid" value="<?php echo appid?>" />

&nbsp;<font color="#FF0000">＊appid，如：210000</font>

</td>

</tr>

<tr >

<td height="30" align="left" class="td_border">&nbsp;appkey：</td>

<td align="left" class="td_border" colspan="2">&nbsp;<input type="text" size="65" name="appkey" id="appkey" value="<?php echo appkey?>" />

</br>&nbsp;<font color="#FF0000">＊appkey(32位)，如：a5e946c646fb8cc6d7fdb6f306000000</font>

</td>

</tr>

<tr >

<td height="30" align="left" class="td_border">&nbsp;输入您的网站：</td>

<td align="left" class="td_border" colspan="2">&nbsp;<input type="text" size="65" name="Url" id="Url" value="<?php echo callback ?>" />

</br>&nbsp;<font color="#FF0000">＊域名，如：www.hshxs.com</font></td>

</tr>

<tr> 

<th colspan=5 style="text-align:center; height:40px;"><input name="submit" type="submit" class="rb1" id="submit" value="更新信息参数" /></th>

</tr>

</form>

</table>

      </div>

	</div>

</div>



<?php

$action=SafeRequest("action","get");

if($action=="saveconf"){

	$S_MQQid=SafeRequest("appid","post");

	$S_MKey=SafeRequest("appkey","post");

	$Url=SafeRequest("Url","post");

	$S_MUrl="http://".$Url."/user/qq/oauth/get_access_token.php";

	$strs="<?php"."\n";

	$strs=$strs."define(\"appid\",".$S_MQQid.");\n";

	$strs=$strs."define(\"appkey\",\"".$S_MKey."\");\n";	

	$strs=$strs."define(\"callback\",\"".$S_MUrl."\");\n";

	$strs=$strs."?>";

	$ifile = new iFile('../include/qqlogin.php','w');

	$ifile->WriteFile($strs,3); 

	echo "<script>window.location='admin_qq.php';</script>";}

?>

<?php include "admin_bottom.php"; ?>

</body>

</html>