<!--#include file="inc_const.asp"-->
<%response.expires=0
Response.CacheControl = "Private"
application.lock

set cschat=server.createobject("ffcschat.cssbchat")

my_level=cschat.getLevel(Session,Application(ConstStr & "_user_list"),Application(ConstStr & "_room_list"))

application.unlock
if my_level-application(ConstStr & "_superlevel")<>0 then
  response.redirect("showerr.asp?errtext=请问你是谁呀？")
  set cschat=nothing
  response.end
end if

myname=cschat.myname
room_id=cschat.room_id

username=request("name")
if instr(Application( ConstStr & "_user_list"),"<$"&username&"$>")<>0 and username<>myname then
  response.redirect("showerr.asp?errtext=该用户正在聊天室里！")
  set cschat=nothing
  response.end
end if
if request("cmdYes")="确认" then
  new_name=left(trim(request("new_name")),10)
  if new_name="" then
    response.redirect("showerr.asp?errtext=经验不能为空！")
    set cschat=nothing
    response.end
  end if
  Set Conn=Server.CreateObject("ADODB.Connection")
  conn.open Application( ConstStr & "_connstr")
  set rs=conn.execute("select * from user where username='"&username&"'")
  if rs.eof or rs.bof then
    response.redirect("showerr.asp?errtext=该用户还没有注册！")
    set cschat=nothing
    rs.close
    set rs=nothing
    conn.close
    Set conn=nothing
    response.end
  elseif rs("user_level")-application( ConstStr & "_superlevel")=0 and username<>myname then
    response.redirect("showerr.asp?errtext=该用户不能被修改属性！")
    set cschat=nothing
    rs.close
    set rs=nothing
    conn.close
    Set conn=nothing
    response.end
  end if
  set rs=conn.execute("select * from user where username='"&new_name&"'")
  

  conn.execute("update user set exp_num='"&new_name&"' where username='"&username&"'")
  occ_env=cschat.GetListValue(Application(ConstStr & "_room_list"), room_id, 0)&">"&myname&">"&Request.ServerVariables("REMOTE_ADDR")&">"&username&">修改为 "&new_name&" >此处只作记录>修改%%的经验值"
  conn.Execute("INSERT INTO record (stype,occ_time,occ_env) VALUES (58,'"&now()&"','"&occ_env&"')")
  rs.close
  set rs=nothing
  conn.close
  Set conn=nothing
  set cschat=nothing
  response.redirect("showerr.asp?errtext=你成功的修改了聊友<u>"&username&"</u>的经验值！")
else
set cschat=nothing%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="chat.css">
<style>u{color:red}</style>
<body style="background-color:EAF2FF;color:112233;scrollbar-Base-Color: #b0d8ff;SCROLLBAR-DARKSHADOW-COLOR:#b0d8ff;SCROLLBAR-arrow-COLOR:#336699;SCROLLBAR-TRACK-COLOR: EAF2FF;SCROLLBAR-3DLIGHT-COLOR: #b0d8ff;SCROLLBAR-SHADOW-COLOR: #336699;SCROLLBAR-HIGHLIGHT-COLOR: #b0d8ff;" leftmargin=3 topmargin=20 >
  <table width=400 align=center cellspacing=0 cellpadding=0 border=1 BORDERCOLORLIGHT=#000000 BORDERCOLORDARK=#ffffff>
  <tr>
    <td class=navy1>修改〖<%=username%>〗的经验值</td>
  </tr>
 <form name="modusername" action="moduserexp_num.asp" method="post">
 <input type=hidden name="name" value="<%=username%>">
  <tr>
      <td height=40>请输入新的经验值得: 
        <input type=text size=10 maxlength=10 name="new_name" >
  <tr><td height=40><input class=navy1 type="submit" name="cmdYes" value="确认" >
    <input class=navy1 type="reset" name="cmdClear" value="清除">
    </td></tr></form><tr><td><ul><li>你是超级用户，对你的输入不做检查，请不要输入禁止字符！<li>如果你修改自己的名字，修改后请退出聊天室！</ul></table><tr<td><br><center>[<a href='javascript:history.go(-1)'>后退</a>]</table></body></html>
<%end if%>













