<%@ LANGUAGE=VBScript codepage ="936" %>
<html>
<head>
<title>封神榜管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css">
</head>
<body bgColor=#dcdec6 text=#000000 link=#003366 vLink=#006666>
<%Response.Expires=0
Response.Buffer=true
cwjh_name=Session("cwjh_name")
cwjh_grade=Session("cwjh_grade")
if cwjh_name="" then Response.Redirect "../error.asp?id=440"
if session("cwjh_adminok")<>true then Response.Redirect "../chat/readonly/bomb.htm"
if cwjh_grade<>10 or instr(Application("cwjh_admin"),cwjh_name)=0  then Response.Redirect "../error.asp?id=439"
if cwjh_name<>Application("cwjh_user") then 
	Response.Write "<script Language=Javascript>alert('提示：你不是正站长，你不能操作！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
id=clng(Request("id"))
Set conn=Server.CreateObject("ADODB.CONNECTION")
conn.open Application("cwjh_usermdb")
'更新
if Trim(Request.QueryString("w"))="save" then
 id=request("id")
 tb=Ucase(Trim(Request.Form("pic")))
 zs=Trim(Request.Form("zs"))
 dj=Trim(Request.Form("dj"))
 jb=Trim(Request.Form("jb"))
 sx=Trim(Request.Form("sx"))
 if tb="" then
%>
<script language=javascript>
     history.back()
     alert("警告:填写内容不能为空！")
</script>
<%
 respoonse.end
 end if
 if not Isnumeric(zs) or not Isnumeric(dj) or not Isnumeric(jb) or not Isnumeric(sx) then
	response.write "数字型的有错误"
	response.end
 end if
 Set rs=Server.CreateObject("ADODB.RecordSet")
 rs.open "select * from 封神榜 where id="&id,conn,2,3
 rs("图标")=tb
 rs("转生")=zs
 rs("等级")=dj
 rs("金币")=jb
 rs("上限加")=sx
 rs.update
 rs.close
 response.redirect "fs_list.asp"
end if
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open "select * from 封神榜 where id="&id,conn,1,3
if rs.eof then
Response.Write ("提示:参数有错...")
response.end
end if
%>
<table width=680 border=1 cellspacing=0 cellpadding=3 bordercolorlight=#000000 bordercolordark=#FFFFFF align=center>
<tr align=center><td height=30 align=center colspan=2><b>欢迎您姜子牙来修改封神参数</b></td></tr>
<form action="?w=save&id=<%=rs("id")%>" method=POST>
<tr>
<td align=right width=11%>封神名：</td>
<td><input name="name" type="text" size=10 maxlength=5 value="<%=RS("名号")%>" readonly>
</tr>
<tr>
<td align=right width=11%>显示图标：</td>
<td width=*><input name="pic" size=3 value="<%=RS("图标")%>"> <font color=red>* 大写A代表<img src=../twt/fengshen/pic/time_star.gif>　大写B代表<img src=../twt/fengshen/pic/time_yueliang.gif>　大写C代表<img src=../twt/fengshen/pic/time_sun.gif></font></td></tr>
<tr> 
<td align=right>需转生：</td>
<td><input name="zs" value="<%=RS("转生")%>" size=4></td>
</tr>
<tr> 
<td align=right>需等级：</td>
<td><input name="dj" value="<%=RS("等级")%>" size=4></td>
</tr>
<tr> 
<td align=right>需金币：</td>
<td><input name="jb" value="<%=RS("金币")%>" size=10></td>
</tr>
<tr> 
<td align=right>加上限：</td>
<td><input name="sx" value="<%=RS("上限加")%>" size=5></td>
</tr>
<tr><td align=center colspan=2>
<input type="SUBMIT" name="Submit" value="更新">
<input type="RESET" name="Reset" value="重填">
</td>
</tr>
</form>
</table>
</body>
</html>
<%
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>