<%@ LANGUAGE=VBScript codepage ="936" %>
<html><title>npc管理</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=css/css.css type=text/css rel=stylesheet>
<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")
cwjh_jhdj=Session("cwjh_jhdj")
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"
npcid=request.querystring("gwid")
npcid=cint(npcid)
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("cwjh_usermdb")
if Trim(Request.QueryString("w"))="save" then
 zt=Trim(Request.Form("zt"))
 gj=Trim(Request("gj"))
 fy=Trim(request("fy"))
 tl=Trim(request("tl"))
 kill=Trim(request("kill"))
 gw_grade=Trim(request("gw_grade"))
 kills=Trim(request("kills"))
 sm=Trim(request("sm"))
 id=cint(request("id"))
 if id="" then response.end
 if zt="" or gj="" or fy="" or tl="" or kill="" or gw_grade="" or kills="" or sm="" then
	respoonse.end
 end if
 rs.open "select * from 怪物区 where id="&id,conn,2,3
 rs("状态")=zt
 rs("攻击")=gj
 rs("防御")=fy
 rs("体力")=tl
 rs("kill")=kill
 rs("grade")=gw_grade
 rs("杀人数")=kills
 rs("说明")=sm
 rs.update
 rs.close
 response.redirect "gw_list.asp"
end if
sqlstr="SELECT * FROM 怪物区 where id="&npcid
rs.Open sqlstr,conn
if rs.EOF or rs.BOF then
 Response.Write "<script language=javascript>alert('抱歉你所要查找的怪物我们找不到！请查看是否正确！');history.back();</script>"
end if
%>
<center><b>怪物修改</b>
<form method=post action=gw_edit.asp?w=save>
<input type=hidden size=4 name=id value="<%=npcid%>">
<table border="1" width="600" cellspacing="0" cellpadding="3" bordercolorlight="#000000" bordercolordark="#FFFFFF" align="center">
<tr>
<td>怪物：<input type=text size='20' name=name value='<%=rs("怪物")%>' readonly></td>
<td>状态：<input type=text size='20' name=zt value='<%=rs("状态")%>'></td>
</tr>
<tr>
<td>攻击：<input type=text size='20' name=gj value='<%=rs("攻击")%>'></td>
<td>防御：<input type=text size='20' name=fy value='<%=rs("防御")%>'></td>
</tr>
<tr>
<td>体力：<input type=text size='20' name=tl value='<%=rs("体力")%>'></td>
<td>kill：<input type=text size='20' name=kill value='<%=rs("kill")%>'></td>
</tr>
<tr>
<td>grade：<input type=text size='20' name=gw_grade value='<%=rs("grade")%>'></td>
<td>杀人数：<input type=text size='20' name=kills value='<%=rs("杀人数")%>'></td>
</tr>
<tr>
<td>说明：<input type=text size='20' name=sm value='<%=rs("说明")%>'></td>
<td align=center><input type=submit value=更新 name=submit></td>
</tr>
</table>
<%
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>