cmd.asp

来自「一个VB做的语音系统控件」· ASP 代码 · 共 34 行

ASP
34
字号
<!--#include file="cfg.asp"-->
<!--#include file="usercheck.asp"-->
<%set rs=conn.execute("select room_master from room where room_id="&session("room_id")&"")
 room_master=trim(rs("room_master"))
 set rs=nothing
 if userlevel="站长" or room_master=UserName then
        ActiveEnable="true"
 else
    set ds=server.createobject("adodb.recordset")
    ds.open "select user_ph from user_info where user_name='"&UserName&"'",conn,1,2
    if ds("user_ph")>=50 then 
         ds("user_ph")=ds("user_ph")-50
         ds.update
         ActiveEnable="true"
    end if
    ds.close
    set ds=nothing
  end if
  if ActiveEnable="true" then
   name=request.querystring("name")
   set rs=conn.execute("select socketindex from active where name='"&name&"'")
   NowType=ucase(request.querystring("type"))
   if not rs.eof then
    str="#"&NowType&"#"&rs("socketindex")
    conn.execute "insert into cmd(cmd,name) values('"&str&"','"&username&"')"
   end if
  call db_close()
  set rs=nothing
  response.write "<script>alert('执行成功!');</script>"
  else
  response.write "<script>alert('执行未成功!');</script>"
  end if
  response.write "<script>document.location.href='userlist.asp'"
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?