📄 sms.asp
字号:
<!--#include file="up.asp"--><!--#include file="inc/ubbcode.asp"-->
<%
if isnull(lguserid) or lguserid="" then Response.Redirect"login.asp"%>
<script>messages = new Array()
messages[0]=" <font color=red><b>珍惜每一点空间,麻烦你及时删除无用的短消息。谢谢!</b></font>"
messages[1]=" <font color=blue>每删除一封信件,可获积分 3 点。</font>"</script>
<table align="center" bordercolor="<%=c1%>" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" height="28">
<tr>
<td class=td1 width="120" bgcolor="<%=c1%>" background="<%=tbg%>"> <img border="0" src="pic/gl.gif"><font color="<%=c3%>"> 控制面板</font></td>
<td bgcolor="<%=c2%>" width="100" align="center"><a href=usersetup.asp>我的资料</a></td>
<td bgcolor="<%=c2%>" width="100" align="center"><a href=?action=myinfo>修改资料</a></td>
<td bgcolor="<%=c2%>" width="100" align="center"><span lang="zh-cn">
<a href="usersetup.asp?action=mypwd">修改密码</a></span></td>
<td bgcolor="<%=c2%>" width="100" align="center">
<a href="sms.asp">我的信箱</a></td>
<td bgcolor="<%=c2%>" width="100" align="center">
<a href="usersetup.asp?action=display">论坛显示设置</a></td>
<td bgcolor="<%=c2%>" width="100" align="center"><a href="usersetup.asp?action=administrator">管理团队</a> </td>
<td bgcolor="<%=c2%>"> </td>
</tr>
</table><br><div id=content align=center></div><SCRIPT>jspaper()</SCRIPT> <script>ttop()</script>
<table align="center" bgcolor=#ffffff width="<%=tbw%>" cellpadding="0" cellspacing="1" style="border-collapse: collapse" width=100% bordercolor="<%=c1%>" border="1">
<tr>
<td background="<%=tbg%>" bgcolor="<%=c1%>" height="28" colspan="2"> <img src="pic/gl.gif" border="0"> 我的信箱</td>
</tr>
<tr>
<td width="20%" class=td1 valign=top>
<table align="center" border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width='90%'>
<tr><td><a href=sms.asp><img border="0" src="pic/sms1.gif" align="absmiddle"> 收件箱</a></td></tr>
<tr><td><a href=sms.asp?action=sendsms><img border="0" src="pic/sms2.gif" align="absmiddle"> 发件箱</a></td></tr>
<tr><td><a href=sms.asp?action=write><img border="0" src="pic/sms3.gif" align="absmiddle"> 写短消息</a></td></tr>
<tr><td><a href=sms.asp?action=delall onclick="{if(confirm('确定清除你的信箱中所有的短消息吗?')){return true;}return false;}"><img border="0" src="pic/sms4.gif" align="absmiddle"> 清空收件箱</a></td></tr>
</table>
</td>
<td valign=top class=c3>
<%
dim action,toname,bad,b
action=request.querystring("action")
select case action
case""
conn.execute("update sms set new=false where touserid="&lguserid&"")
dim sql,pagesetup,count,totalpage,pagecount,ii,iii,usern,userinfo,topicuserid,sms,smsuserid
id=false
response.write"<script language='javascript'>function Check(){var Name=document.form.topage.value;document.location='?topage='+Name+'';}</script>"
sql="select*from sms where touserid="&lguserid&" order by id desc"
pagesetup=5
set rs = server.createobject("adodb.recordset")
rs.Open sql,conn,1
TotalPage=0
Count=rs.recordcount
if not rs.eof then
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
pagecount= 0
rs.moveFirst
if Request.QueryString("ToPage")<>"" and isnumeric(Request.QueryString("ToPage")) then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
rs.move (PageCount-1) * pagesetup
i=1
%>
<div style="height:26px;padding:5px"> <b>收 件 箱</b></div>
<table align="center" border="0" cellpadding="0" cellspacing="1" style='border-collapse: collapse' width='100%'>
<%
do while not rs.eof
smsuserid=rs("fromuserid")
sms=rs("content")
sms=split(sms,"|")
set usern=conn.execute("select top 1 name,userinfo from [user] where userid="&smsuserid&"")
userinfo=usern("userinfo")
userinfo=split(userinfo,"|")
%>
<tr>
<td width="25%" align="center" valign="top" class=c2>
发件人:<font><%=kbbs(usern("name"))%><br>
<%if userinfo(11)="1" and userinfo(3)<>"" then%><img vspace="5" src="http://qqshow-user.tencent.com/<%=kbbs(userinfo(3))%>/11/00/"><%else%><img vspace="5" src="<%=kbbs(userinfo(5))%>" width=<%=kbbs(userinfo(6))%> height=<%=kbbs(userinfo(7))%> border=0><%end if%>
</td>
<td valign="top">
<div style="height:26px"> <a href=userinfo.asp?userid=<%=smsuserid%>><img border="0" src="pic/info.gif"></a>
<a href=sms.asp?action=write&toname=<%=kbbs(usern("name"))%>><img border="0" src="pic/newmail.gif"></a>
<a href=sms.asp?action=del&id=<%=rs("id")%>><img border="0" src="pic/del.gif"></a> <img border="0" src="images/skin/<%=sid%>/fle.gif"> 接收时间:<%=ubb(sms(1))%></div>
<blockquote>
<p style="line-height: 120%">
<%=ubb(sms(0))%></p>
</blockquote>
</td>
</tr>
<%
set usern=nothing
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
response.write"</table>"
end if
rs.Close
set rs=nothing
response.write"<div align='center'><TABLE class=c2 cellSpacing=0 cellPadding=0 width='100%' border=0><TR height=25><TD> <img border='0' src='pic/fl.gif'> 收件箱共 <b>"&count&"</b> 条短消息,每页 <b>"&pagesetup&"</b> 条,分 <b>"&TotalPage&"</b> 页: "
if PageCount=1 then
Response.Write " <font face=Webdings title=首页 color=888888>9</font> <font face=Webdings title=上页 color=888888>7</font> "
else
Response.Write " <a href=?topage=1><font face=Webdings title=首页>9</font></a> <a href=?topage="&PageCount-1&"><font face=Webdings title=上页>7</font></a> "
end if
ii=PageCount-4
iii=PageCount+4
if ii < 1 then
ii=1
end if
if iii > TotalPage then
iii=TotalPage
end if
if PageCount > 5 then
Response.Write "<a href=?topage=1>1</a> ... "
end if
for i=ii to iii
If i<>PageCount then
Response.Write " <a href=?topage="& i &">" & i & "</a> "
else
Response.Write " <font color=red><b>"&i&"</b></font> "
end if
next
if TotalPage > PageCount+4 then
Response.Write " ... <a href=?topage="&TotalPage&">"&TotalPage&"</a>"
end if
if PageCount=TotalPage then
Response.Write " <font face=Webdings title=下页 color=888888>8</font> <font face=Webdings title=尾页 color=888888>:</font> "
else
Response.Write " <a href=?topage="&PageCount+1&"><font face=Webdings title=下页>8</font></a> <a href=?topage="&TotalPage&"><font face=Webdings title=尾页>:</font></a> "
end if
response.write" </TD><form name=form method='POST' action=javascript:Check()><TD height=2 align='right'>页码:<input style=FONT-SIZE:9pt maxLength='6' size='6' name='topage' value='"&PageCount&"'><input style=FONT-SIZE:9pt value='GO!' type='submit'></TD></form></TR></TABLE>"
case "sendsms"
id=false
response.write"<script language='javascript'>function Check(){var Name=document.form.topage.value;document.location='?action=sendsms&topage='+Name+'';}</script>"
sql="select*from sms where fromuserid="&lguserid&" order by id desc"
pagesetup=5
set rs = server.createobject("adodb.recordset")
rs.Open sql,conn,1
TotalPage=0
Count=rs.recordcount
if not rs.eof then
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
pagecount= 0
rs.moveFirst
if Request.QueryString("ToPage")<>"" and isnumeric(Request.QueryString("ToPage")) then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
rs.move (PageCount-1) * pagesetup
i=1
%>
<div style="height:26px;padding:5px" class=c2> <b>发 件 箱</b></div>
<table align="center" border="0" cellpadding="0" cellspacing="1" style='border-collapse: collapse' width='100%'>
<%
do while not rs.eof
smsuserid=rs("touserid")
sms=rs("content")
sms=split(sms,"|")
set usern=conn.execute("select top 1 name,userinfo from [user] where userid="&smsuserid&"")
userinfo=usern("userinfo")
userinfo=split(userinfo,"|")
%>
<tr>
<td width="25%" align="center" valign="top" class=c2>
收件人:<b><%=kbbs(usern("name"))%></b><br>
<%if userinfo(11)="1" and userinfo(3)<>"" then%><img vspace="5" src="http://qqshow-user.tencent.com/<%=kbbs(userinfo(3))%>/11/00/"><%else%><img vspace="5" src="<%=kbbs(userinfo(5))%>" width=<%=kbbs(userinfo(6))%> height=<%=kbbs(userinfo(7))%> border=0><%end if%>
</td>
<td valign="top">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -