<?php 
include '../comm/conn.php';
include '../comm/config.php';
include '../comm/checkpostandget1.php';
include 'check.php';
$id=$_GET['id'];
$link = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$link) {
	die('数据库链接出错: ' . mysql_error());
}
else
{
	mysql_query("set names gbk");
	$sql="select * from websetting where id=1";
	mysql_select_db($dbname);
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$appKey = $row[appKey];  
		$appSecret =$row[appSecret]; 
		$userpid = $row[userpid]; 
		$usernick = $row[usernick];
		$fxbl=$row[fxbl]; 
		$tgbl=$row[tgbl]; 
		$webtitle=$row[webtitle]; 
		$keyword=$row[keyword]; 
		$description=$row[description]; 
		$url=$row[url]; 
		$txyf=$row[txyf]; 
	    $zzfl=$row[zzfl]; 
		$surl=$row[surl]; 
		$email=$row[email]; 
		$icp=$row[icp]; 
		$tongji=$row[tongji]; 
		$qq =$row[qq]; 
		$usercenter =$row[usercenter]; 
	}

}	
?><!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=gb2312" />
<title>管理中心</title>
<link href="../images/style1.css" rel="stylesheet" type="text/css">
<link href="../images/sty.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="js/jquerly.js"></script>
<script language="JavaScript" src="js/chkpost.js"></script>
<style type="text/css">
<!--
.STYLE3 {
	color: #FF0000;
	font-weight: bold;
}
-->
</style>
<SCRIPT language=JavaScript>
<!-- 
  //校验输入框 -->
function CheckForm()
{
	if (document.form1.txyf.value.length == 0) {
		alert("请输入最低提现金额.");
		document.form1.txyf.focus();
		return false;
	}
	if (document.form1.zzfl.value.length == 0) {
		alert("请输入注册会员赠送金额.");
		document.form1.zzfl.focus();
		return false;
	}
	var reg	= new RegExp(/^\d*\.?\d{0,2}$/);
	if (! reg.test(document.form1.txyf.value))
	{
        alert("请正确输入最低提现金额");
		document.form1.txyf.focus();
		return false;
	}
	if (Number(document.form1.txyf.value) < 1) {
		alert("最低提现金额最小是1.");
		document.form1.txyf.focus();
		return false;
	}
	var reg1	= new RegExp(/^\d*\.?\d{0,2}$/);
	if (! reg1.test(document.form1.zzfl.value))
	{
        alert("请正确输入注册会员赠送金额");
		document.form1.zzfl.focus();
		return false;
	}
	if (Number(document.form1.zzfl.value) < 1) {
		alert("注册会员赠送金额最小是1.");
		document.form1.zzfl.focus();
		return false;
	}
        if (Number(document.form1.zzfl.value) > Number(document.form1.txyf.value)) {
		alert("注册会员赠送金额必须小于最低提现金额.");
		document.form1.txyf.focus();
		return false;
	}
	        if (Number(document.form1.txyf.value) == Number(document.form1.zzfl.value)) {
		alert("注册会员赠送金额必须小于最低提现金额.");
		document.form1.zzfl.focus();
		return false;
	}
}  

<!-- 
  //控制文字显示 -->
function glowit(which){
if (document.all.glowtext[which].filters[0].strength==2)
document.all.glowtext[which].filters[0].strength=1
else
document.all.glowtext[which].filters[0].strength=2
}
function glowit2(which){
if (document.all.glowtext.filters[0].strength==2)
document.all.glowtext.filters[0].strength=1
else
document.all.glowtext.filters[0].strength=2
}
function startglowing(){
if (document.all.glowtext&&glowtext.length){
for (i=0;i<glowtext.length;i++)
eval('setInterval("glowit('+i+')",150)')
}
else if (glowtext)
setInterval("glowit2(0)",150)
}
if (document.all)
window.onload=startglowing


</SCRIPT>
</head>
<?php
include("../comm/head.php");
?>
<body topmargin="5" leftmargin="0">
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="282" valign="top"><table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
          <table cellspacing="0" width="950" height="207" style="border:1px  solid #DCEAF7;">
            <tr>
              <td height="30" colspan="2" bgcolor="E9F2FB" class="bigtext"><strong>&nbsp;<img src="../images/arrow.gif" width="16" height="22" align="absmiddle" /> 网站基本信息设置</strong></td>
            </tr>
            <tr>
              <td width="950" colspan="2" valign="top"><table width="950" height="300" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top"><form id="form1" name="form1" onSubmit="return CheckForm();" method="post" action="savesetting.php">
                    <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="30" colspan="2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td width="129" height="30" align="right" class="bigtext">网站名称</td>
                        <td width="631" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="webtitle" id="webtitle" type="text" value="<?php echo $webtitle;?>" size="40" />
                        </label>
                          如YES风购物网</td>
                      </tr>
					  <tr>
                        <td width="129" height="30" align="right" class="bigtext">网站关键字</td>
                        <td width="631" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="keyword" type="text" value="<?php echo $keyword;?>" size="40"  />
                        </label></td>
                      </tr>
					   <tr>
                        <td width="129" height="30" align="right" class="bigtext">网站描述</td>
                        <td width="631" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="description" type="text" id="description"  value="<?php echo $description;?>" size="40"  />
                          </label></td>
                      </tr>
					  <tr>
                        <td width="129" height="30" align="right" class="bigtext">网站URL（全）</td>
                        <td width="631" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="url" type="text" id="url" value="<?php echo $url;?>" size="40"  />
                          如 http://www.yesfeng.com/<span class="STYLE3">[末尾加/] </span></label></td>
                      </tr>
					   <tr>
                        <td width="129" height="30" align="right" class="bigtext">站长Email</td>
                        <td width="631" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="email" type="text" id="email" value="<?php echo $email;?>" size="40"  />
                          </label></td>
                      </tr>
					   <tr>
                        <td width="129" height="30" align="right" class="bigtext">ICP备案号</td>
                        <td width="631" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="icp" type="text" id="icp" value="<?php echo $icp;?>" size="40"  />
                          </label></td>
                      </tr>
					   <tr>
                        <td width="129" height="30" align="right" class="bigtext">站长QQ</td>
                        <td width="631" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="qq" type="text" id="qq" value="<?php echo $qq;?>" size="40"  />
                          </label></td>
                      </tr>
					  <tr>
					    <td width="129" height="30" align="right" class="bigtext">网站域名</td>
					    <td width="631" class="bigtext">&nbsp;&nbsp;
					      <label>
					        <input name="surl" type="text" id="surl" value="<?php echo $surl;?>" size="40"  />
					        如 yesfeng.com                          </label></td>
					    </tr>
					  <tr>
                        <td width="129" height="30" align="right" class="bigtext">统计代码</td>
                        <td width="631" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <textarea name="tongji" cols="50" rows="3" id="tongji"> <?php echo $tongji;?> </textarea>
                          </label></td>
                      </tr>
					  <tr>
                        <td height="30" align="right" class="bigtext">&nbsp;</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label></label></td>
                      </tr>
					   <tr>
                        <td height="30" align="right" class="bigtext"><span class="STYLE3">授权</span>淘宝用户名</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <input name="uname" type="text" id="usernick" value="<?php echo $xigua;?>" size="40" disabled/></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext"><span class="STYLE3">授权</span>淘宝appKey</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="ukey" type="text" id="appKey" value="<?php echo $nuneng;?>" size="40"  disabled/>
                          </label></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext"><span class="STYLE3">授权</span>淘宝appSecret</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="usecret" type="text" id="appSecret" value="<?php echo $enneng;?>" size="40"  disabled/>
                          </label></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext"><span class="STYLE3">授权</span>淘宝联盟PID</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="usid" type="text" id="userpid" value="<?php echo $gela;?>" size="40"  disabled/>
 如 13882299 注：纯数字                        </label></td>
                      </tr>
					   <tr>
                        <td height="30" align="right" class="bigtext">最低提现金额</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="txyf" type="text" id="txyf" value="<?php echo $txyf;?>" size="10" maxlength="2"  />
                          元
                            
 &nbsp;&nbsp;（填写整数） 如20 表示会员用户的佣金需要达到20元才能提现                        </label></td>
                      </tr>
					  					   <tr>
                        <td height="30" align="right" class="bigtext">注册会员金额</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="zzfl" type="text" id="zzfl" value="<?php echo $zzfl;?>" size="10" maxlength="2"  />
                            
 元&nbsp;&nbsp;（填写整数） 如10表示用户注册成为会员就能得到10元【<span class="STYLE3">不能大于提现金额</span>】                        </label></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext">返现比率</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="fxbl" type="text" id="fxbl" value="<?php echo $fxbl*100;?>" size="10" maxlength="2"  />
                          %
 （填写0-100）如 50% 表示返现佣金的50%                         </label></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext">推广佣金比率</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input name="tgbl" type="text" id="tgbl" value="<?php echo $tgbl*100;?>" size="10" maxlength="2"  />
                          %
  （填写0-100）如 10% 表示返现佣金的10%                        </label></td>
                      </tr>
                      <tr>
                        <td height="30" align="right">&nbsp;</td>
                        <td height="30" class="bigtext">&nbsp;&nbsp;
                          <label>
                          <input type="submit" name="Submit" value=" 保 存 资 料 " />
                          </label></td>
                      </tr>
                    </table>
                  </form>
                  </td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>
<?php
include("footer.php");
?>
</body>
</html>
<?php mysql_close($link);?>
