<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file="../inc/function.asp"-->
<%
if request("jle")="qian" then
id=replace(trim(request("id")),"'","‘")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [jle_shop] where id="&cstr(id) 
rs.open sql,conn,1,1
if rs.eof then
response.write "还没有任何用户数据！"
response.end
end if
Response.cookies("jle")("username")=rs("username")
Response.cookies("jle")("com")=rs("com")
Response.cookies("jle")("vip")=rs("vip")
Response.cookies("jle")("domain")=Request.ServerVariables("SERVER_NAME")
Response.cookies("jle")("id")=rs("id")
rs.close
set rs=nothing
closedb
response.redirect "../shop_user.asp"
end if
%>

<%
if request("e")<>"" then
dim rs,sql,id,username,email,a,jf
hb=HtmlEncode(trim(request("hb")))
jf=HtmlEncode(trim(request("jf")))
id=trim(request("id"))
if not isnumeric(hb) or hb="" then
response.write "<li>客币只能为数字！"
cl
response.end
end if
if not isnumeric(jf) or jf="" then
response.write "<li>积分只能为数字！"
cl
response.end
end if
if not isnumeric(id) or id="" then
response.write "<li>参数错误1！"
cl
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select hb,jf from [jle_shop] where id="&id
rs.open sql,conn,1,3
if rs.eof or rs.bof then
response.write "<li>参数错误！"
cl
response.end
end if
rs("hb")=hb
rs("jf")=jf
rs.update
rs.close
set rs=nothing
closedb
response.write "<li>恭喜您，修改成功！"
call cl()
%> <%sub cl()%> <body onLoad="setTimeout(window.close, 2000)"><%end sub%> <%
else
id=trim(request("id"))
if not isnumeric(id) or id="" then
response.write "<li>参数错误！"
response.end
end if
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select hb,jf from [jle_shop] where id="&cstr(id)
rs.open sql,conn,1,1
%> 
<meta http-equiv="Content-Language" content="zh-cn">
<link href="inc_style.css" rel="stylesheet" type="text/css">
<title>修改客币积分数量</title>
<body topmargin="0" leftmargin="0">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cac8c9" width="180" height="35">
<form action="?id=<%=id%>" method="POST">
<tr><td width="80" height="25"><p align="center">积分：</td>
<td width="101" height="25"><input type="text" name="jf" size="10" value="<%=rs("jf")%>" maxlength="10">个</td>
</tr><tr><td width="80" height="25"><p align="center">客币：</td>
<td width="101" height="25"><input type="text" name="hb" size="10" value="<%=rs("hb")%>" maxlength="10">个</td></tr>
<tr><td width="80" height="6"></td><td width="101" height="6"><input type="submit" value="修改" name="e"></td></tr>
<tr><td width="181" height="6" colspan="2"><p align="center"><font color="#FF0000">必须为数字</font></td></tr></form></table></center></div><%
rs.close
set rs=nothing
closedb
end if
%>