⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 songsendok.asp

📁 此程序为网上下载
💻 ASP
字号:
<%@ codepage ="936" %>
<%Response.Expires=0
callhb=Int(Application("wsaxhxf_c_dg"))
useronlinename=Application("wsaxhxf_c_useronlinename")
nickname=Session("hxf_u_nickname")
chatbgcolor=Application("wsaxhxf_c_chatbgcolor")
chatimage=Application("wsaxhxf_c_chatimage")
if chatbgcolor="" then chatbgcolor="008888"
if nickname="" or Session("hxf_u_inthechat")<>"1" or Instr(useronlinename," "&nickname&" ")=0 then Response.Redirect "chaterr.asp?id=001"
Sub Msg(v)
 Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><body bgcolor=" & winbgcolor & " text=#000000 background=" & winbgimage & ">"
 Response.Write "<script Language=JavaScript>"
 Response.Write "alert('" & v & "');history.go(-1);"
 Response.Write "</script>"
 Response.End
End Sub
hb=Int(Session("hxf_u_hb"))
if hb<callhb then Msg "您的货币不足,不能为别人点歌。\n\n此功能需要货币" & callhb & "¥。" 
towho=Trim(Request.Form("towho"))
if Instr(useronlinename," "&towho&" ")=0 then Msg ""&towho&"不在聊天室中,不能发送!"
songzc = Trim(Request.Form("songzj"))
song = Trim(Request.Form("song"))
zc = Trim(Request.Form("zc"))
zc = Server.HTMLEncode(zc)
If zc = "" Then Msg "祝词不能为空。"
If Len(zc) > 300 Then Msg "祝词不能超过 300 个字符。"
midipath = Server.MapPath("mid\" & songzc & "\" & song)
Set fs = CreateObject("Scripting.FileSystemObject")
cz = fs.FileExists(midipath)
Set fs = Nothing
If cz = False Then Msg "选定的曲目不存在!\n\n请返回并刷新曲目列表。"
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
Session("hxf_u_lasttime")=sj
wbq=Application("wsaxhxf_c_webicq")
wbqub=UBound(wbq)
if wbqub>0 then
 Dim wbqnew()
 j=1
 for i=1 to wbqub step 4
  if DateDiff("n",wbq(i),sj)<=10 then
   Redim Preserve wbqnew(j),wbqnew(j+1),wbqnew(j+2),wbqnew(j+3)
   wbqnew(j)=wbq(i)
   wbqnew(j+1)=wbq(i+1)
   wbqnew(j+2)=wbq(i+2)
   wbqnew(j+3)=wbq(i+3)
   j=j+4
  end if
 next
zc = Server.HTMLEncode(zc)
zc = Replace(zc, "\", "\\")
zc = Replace(zc, "/", "\/")
zc = Replace(zc, Chr(34), "\" & Chr(34))
zc = Replace(zc, "{]", "{<!>]")
zc = Replace(zc, Chr(13) & Chr(10), "<br>")
host = Request.ServerVariables("HTTP_HOST")
url = Request.ServerVariables("URL")
url = Left(url, Len(url) - 14)
url = "http://" & host & url & "mid/"
midipath = songzj & "/" & song
 if j>=4 then
  wbq=wbqnew
 else
  Dim wbqnull(0)
  wbq=wbqnull
 end if
 wbqub=UBound(wbq)
end if
Redim Preserve wbq(wbqub+1),wbq(wbqub+2),wbq(wbqub+3),wbq(wbqub+4)
wbq(wbqub+1)=sj
wbq(wbqub+2)=towho
wbq(wbqub+3)=nickname
wbq(wbqub+4) = "<a target=_blank href=" & url & midipath & ">[未经编码的链接]</a> <a target=_blank href=" & url & Server.URLEncode(midipath) & ">[经UTF-8编码的链接]</a><br>" & zc
wbqub=wbqub+4
webicqname=""
for i=1 to wbqub step 4
 webicqname=webicqname & " " & wbq(i+1)
next
webicqname=webicqname&" "
Application.Lock
Application("wsaxhxf_c_webicq")=wbq
Application("wsaxhxf_c_webicqname")=webicqname
Application.UnLock
Set conn=Server.CreateObject("ADODB.CONNECTION")
 Set rs=Server.CreateObject("ADODB.RecordSet")
 connstr=Application("wsaxhg_connstr")
 conn.open connstr
 sql="SELECT hb FROM reginfo WHERE kill='0' and username='" & nickname & "'"
 rs.open sql,conn,1,3
 if Not(rs.Eof and rs.Bof) then
  rs("hb")=rs("hb")-callhb
  Session("hxf_u_hb")=rs("hb")
  rs.Update
 rs.close
  sql = "SELECT value FROM system WHERE name='chatmoney'"
 rs.open sql, conn, 1, 3
 chatmoney = Int(rs("value")) + callhb 
 rs("value") = chatmoney
 rs.Update
 rs.Close
 Application.Lock
  Application("wsaxhxf_c_chatmoney") = chatmoney
 Application.UnLock
 conn.close
 set rs=nothing
 set conn=nothing
end if
%>
<html>
<head>
<title>好歌赠好友</title>
<meta http-equiv='content-type' content='text/html; charset=gb2312'>
<link rel="stylesheet" href="readonly/style.css">
</head>
<body oncontextmenu=self.event.returnValue=false bgcolor="<%=chatbgcolor%>" background="<%=chatimage%>" bgproperties="fixed" text="#FFFFFF">
<div align="center"><font color="#FFFF00" style="font-size:12pt">发送完毕</font></div>
<hr size=1 color=FFFF00><br>
<table border="0" width="100%">
  <form>
<tr>
      <td valign="top">已经将:<font color=FFFF00><%=song%></font> 
        <br>
        发送给:<font color=FFFF00><%=towho%><br>
        </font>祝福话语:<font color=FFFF00><%=zc%></font>
<script>alert("操作完成,您还剩货币 <%=Session("hxf_u_hb")%>¥");
javascript:window.close();</script>
<table border="0">
<tr>
<td> 
<input type="button" name="abort" value="返回" onClick="javascript:history.go(-2)">
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</body>
</html>

⌨️ 快捷键说明

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