📄 msgbox.asp
字号:
<!-- #include file="密码验证.asp" -->
<%
if NOIPUserID =-1 then Response.Write "客人不能进行此项操作":Response.End
title="短信中心"%>
<!-- #include file="head.asp" -->
<script language=VBScript>
if instr(1,top.location,"index.asp")=0 then top.location="index.asp?url=" & replace(self.location ,"&","%26")
</script>
<%if Request.QueryString ("login")="ok" then %>
<SCRIPT>
if(self.top.location!=self.location )
{
top.document.frames["carnoc"].location.reload
}
</SCRIPT>
<%end if
menu=Request.QueryString("menu")
if menu="sendoutdelall" then
set rs = server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM 短信息 WHERE 来自=" & NOIPUSERID & " and 发到<0" , conn ,3,3
for i=1 to rs.recordcount
rs.delete
rs.update
rs.movenext
next
rs.close
set rs=nothing
menu="sendout"
end if
MSGid=clng( Request.QueryString("id"))
if MSGid <> 0 then
set rs = server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM 短信息 WHERE id=" & MSGid , conn ,3,3
if not( rs.eof or rs.bof) then
if(rs("来自") = NOIPUserID or rs("发到")=NOIPUserID) then
if clng(request("del"))=MSGid and (rs("发到")=NOIPUserID or (rs("来自")=NOIPUserID and rs("发到")<0)) then
a=rs("发到")
rs.delete
rs.update
if a<0 then Response.Redirect "MSGBox.asp?menu=sendout" else Response.Redirect "MSGBox.asp"
end if
MSGtitle=rs("信息标题")
MSGinner=rs("信息内容")
MSGwriter_id=RS("来自")
MSGto_id=RS("发到")
MSGwriter=id2name(RS("来自"))
MSGto=id2name(abs(RS("发到")))
MSGtime=RS("时间")
if rs("读否")=false then
RS("读否")=true
rs.update
rs.close
set rs=nothing
set rs = server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM NOIP选手 WHERE id=" & MSGto_id ,conn ,3,3
rs("短信")=rs("短信")-1
rs.update
end if
end if
rs.close
set rs=nothing
end if
end if
%>
<body link="#0000FF" vlink="#0000FF" alink="#0000FF">
<%valigntop()%>
<span style="font-style: 12px">
</span>
<table cellspacing="1" cellpadding="0" width="97%" align="center" border="0" class="a2"><tr height="25" id=TableTitleLink>
<td width="12%" height="24" class="a1" align="center">
<span style="font-style: 12px"><b><%
if menu="sendout" then
%>
已发送 <a href="#" onclick="vbscript:if msgbox('真的要全部已发送信息么?(对接收方没有影响)' ,vbyesno,'清空已发送')= vbyes then self.document.location='MSGBox.asp?menu=sendoutdelall'">全部清空</a><%else%>收件箱<%end if%>
</b></span></td>
</table>
<center>
<table class="a2" cellSpacing="1" cellPadding="0" width="97%" border="0" id="table11">
<tr>
<td class="a4" align="middle"><span style="font-size: 17px">
<a href=# onclick="javascript:window.open('SendMSG.asp','a','menubar=no,toolbar=no,location=no,directories=no,height=280,width=500,status=no,scrollbars=no')">
<img border="0" src="image/m_write.gif" width="40" height="40"></a>
<a href="MSGBox.asp">
<img border="0" src="image/m_inbox.gif" width="40" height="40"></a>
<a href="MSGBox.asp?menu=sendout">
<img border="0" src="image/M_issend.gif" width="40" height="40"></a></span></td></center>
</tr>
</table>
<% if MSGtitle <> "" then%>
<table cellspacing="1" cellpadding="0" width="97%" align="center" border="0" class="a2"><tr height="25" id=TableTitleLink>
<td width="12%" height="24" class="a1" align="center">
<span style="font-style: 12px"><b><%=MSGtitle%></b></span></td>
</table>
<center>
<table class="a2" cellSpacing="1" cellPadding="0" width="97%" border="0" id="table11">
<tr>
<td class="a4" align="middle" width="70%"><span style="font-size: 12px">
信息内容:<br>
<textarea rows="6" name="S1" cols="45"><%=server.HTMLEncode(MSGinner)%></textarea>
</td></center>
<td class="a4" align="left" width="30%"><span style="font-size: 12px">
信息标题:<%=MSGtitle%><br>
发信息人:<%=MSGwriter%><br>
收信息人:<%=MSGto%><br>
发生时间:<%=MSGtime%><br><br>
<a href=# onclick="javascript:window.open('SendMSG.asp?replay=<%=MSGwriter%>&NOIPmsgtitle=<%=replace(MSGtitle ,"&","%26")%>')">回复</a>
<a href=# onclick="vbscript:if msgbox('真的要删除这条信息么?' ,vbyesno,'删除')= vbyes then self.document.location='MSGBox.asp?del=<%=MSGid%>&id=<%=MSGid%>'">删除</a>
</td>
</tr>
</table>
<%end if%>
<center>
<table cellspacing="1" cellpadding="0" width="97%" align="center" border="0" class="a2"><tr height="25" id=TableTitleLink><td width="5%" class="a1"><td width="5%" class="a1">
<td align="middle" height="24" class="a1" width="51%">
信息标题</td>
<td align="middle" width="15%" height="24" class="a1"><%if menu="sendout" then%>发到<%else%>来自<%end if%></td>
<td width="20%" height="24" class="a1" align="center">发送时间</td>
</table>
<div align="center">
<table class="a2" cellSpacing="1" cellPadding="0" width="97%" border="0" id="table1">
<%
set rs = server.CreateObject("ADODB.Recordset")
if menu="sendout" then
rs.open "SELECT * FROM 短信息 WHERE 来自=" & NOIPUserID & " and 发到<0 Order by -id" ,conn ,3
else
rs.open "SELECT * FROM 短信息 WHERE 发到=" & NOIPUserID & " Order by -id" ,conn ,3
end if
shownum=20
totalrecord=rs.recordcount
rs.pagesize=shownum
maxpage=rs.pagecount
if request.querystring("page")<> "" then requestpage=clng(request.querystring("page"))
if requestpage="" or requestpage=0 then
requestpage=1
end if
resquestpage=maxpage
if resquestpage>maxpage then
end if
if not requestpage=1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.bof
%>
<tr height="25">
<td class="a4" align="middle" width="5%">
<img alt="" src="<%if rs("读否")=false then Response.Write "image/f_new.gif" else Response.Write "image/f_norm.gif"%>" border="0"></td>
<td class="a3" align="middle" width="5%">
<%if rs("读否")=false then Response.Write "<strong><font color='#FF0000'>New</font></strong>"%>
</td>
<td class="a4" width="51%">
<a href="MSGBox.asp?id=<%=rs("id")%>&page=<%=requestpage%><%
if menu="sendout" then Response.Write "&menu=sendout"
%>"> <%=rs("信息标题")%></a>
</td>
<td class="a3" align="middle" width="15%">
<%
if menu="sendout" then Response.Write id2name(abs(rs("发到"))) else Response.Write id2name(rs("来自"))%> </td>
<td class="a4" align="middle" width="20%">
<%=rs("时间")%></td>
<%
rs.movenext
if rs.eof then exit for
next %>
</table><%valignbottom()%><p align="right">
<%if rs.pagecount<>0 then
if requestpage-1 mod 10=0 then
p=(requestpage-1) \ 10
else
p=(requestpage-1) \ 10
end if
if requestpage=1 then
response.write "<font face=webdings color=""#FF0000"">9</font>"
else
Response.write "<a href=MSGBox.asp?page=1 title=首页><font face=webdings>9</font></a>"
end if
if p*10>0 then response.write "<a href=MSGBox.asp?page="& p*10 & " title=上十页><font face=webdings>7</font></a>"
response.write "<b>"
for ii=p*10+1 to P*10+10
if ii=requestpage then
response.write "<font color=""#FF0000"">"&ii&"</font> "
else
response.write "<a href=MSGBox.asp?page="&ii&">"&ii&"</a> "
end if
if ii=maxpage then exit for
next
response.write "</b>"
if ii<maxpage then response.write "<a href=MSGBox.asp?page="&ii&" title=下十页><font face=webdings>8</font></a>"
if requestpage=maxpage then
response.write "<font face=webdings color=""#FF0000"">:</font> "
else
response.write "<a href=MSGBox.asp?page="&maxpage&" title=尾页><font face=webdings>:</font></a>"
end if
end if
response.write" 总共有"&maxpage&"页 共"&totalrecord&"条信息</p>"
%>
<span style="font-style: 12px"><br>
</span>
</body>
<!-- #include file="foot.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -