<?php
require_once 'Config.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="css/css.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.8.1.min.js" type="text/javascript" ></script>
<script src="js/buttons.js" type="text/javascript"></script>
<script src="js/bootstrap.js" type="text/javascript"></script>
<title>-引导页-</title>
<style>
body{background:#efefef}
.wrapper{ width:700px; height:auto; overflow:hidden;margin:50px auto 0 auto;}

.g1{width:100%;}.g2{width:100%;padding-top:100px;}
.g1 p{line-height:200%}.g1 p b{color:#f00;}
</style>
</head>
<body>
<?php
if ($_REQUEST['uname'] != "") $uname=$_REQUEST['uname'];
if ($_REQUEST['AppKey'] != "") $AppKey=$_REQUEST['AppKey'];
if ($_REQUEST['upass'] != "") $upass=$_REQUEST['upass'];

if ($_REQUEST['uname'] != "" && $_REQUEST['AppKey'] != "")
{
	$content = "<?php"."\n";
	$content .="\$uname = \"".$uname."\";"."\n";
	$content .="\$AppKey = \"".$AppKey."\";";
	$filename = 'Config.php'; 
	if (is_writable($filename)) { 
		$file = fopen($filename,'w');
		fwrite($file,$content);
		fclose($file);
		echo "<script language=javascript>alert('您的用户名：".$uname."\\n用户密码：".$upass."');window.location.href='index.php';</script>";
	} else { 
		echo "<script language=javascript>alert('您的空间没有写入权限，请手动配置或联系客服协助配置\n');</script>";
		echo "<script language=javascript>alert('您的用户名：".$uname."\\n用户密码：".$upass."');window.location.href='Guide.php';</script>";
	} 
}
?>

<div class="wrapper">
    <div class="g1">
    	<p>1.首次登陆平台的代理商，请先到代理平台注册账号，账号注册地址：<a href="http://admin.lanhaipingtai.com/Adminacc/wt_login.asp?acttpe=reg&rurl=http://<?php echo $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] ?>">点击进入</a></p>
        <p>2.已经有代理账号的代理商，请在下方填写用户的账号和AppKey，手动配置Config.php文件。</p>
        <p>提示：用户的账号和AppKey在<b>代理商后台：账号管理->我的信息</b>里显示。</p>
    </div>
  <div class="g2">
		<p>配置方法：</p>
        <p>用记事本打开Config.php文件，如下图：</p>
        <p><img src="images/app.jpg"></p>
        <?php if ($uname!="" && $AppKey!="") {?>
    	<p>复制以下信息：</p>
      	<p>&lt;?php</p>
        <p>
			$uname = "<?php echo $uname;?>"	'用户名<br />
			$AppKey = "<?php echo $AppKey;?>" '用户AppKey
		</p>
        <p>?&gt;</p>
        <?php }?>
      	<p>修改用户信息后保存。</p>
        <p>点击<a href="index.php">返回首页</a></p>
  </div>
    
</div>



</body>
</html>