📄 pm.asp
字号:
else%>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor1%> class=tdc colspan="6">没有聊天记录
</td>
</tr>
<%end if
set rs=nothing
end if
%>
</form>
</table>
</center>
</div>
<%end sub
sub showrecive()
if Request.QueryString("mode")="del" then
if chktopic(request("delall"))="清空收件箱" then
sqldel="DELETE from pm where q_receive='"&cpbusername&"'"
conn.execute(sqldel)
else
for i=1 to request("q_id").count
sqldel="DELETE from pm where q_id="&chktopic(Request("q_id")(i))&""
conn.Execute (sqldel)
next
end if
succmsg="<Li>邮件已经删除</Li>"
succmsg=succmsg&"<Li>正在返回您的短信中心,请稍后...<script language=javascript>setTimeout(""location.replace('pm.asp')"",1000)</script></Li>"
call succ(succmsg)
call bq()
response.end
end if
%> <table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=1 width=<%=tdc3%> style="border-collapse: collapse" align=center>
<tr>
<td height="21" width="67%" align="center" <%=hColor%> class=tdc1 colspan="6">
<%=cpbusername%> 你现在在你的收件箱(只保存<%=hpm%>封)</td>
</tr>
<% if Request.QueryString("mode")="kai" then
sql="select q_title,q_content,q_time,q_id,q_send from pm where q_id="&chktopic(Request.QueryString("q_id"))&""
set rs=conn.execute(sql)
sqlgrade2="update pm set q_read=1 where q_id="&chktopic(Request.QueryString("q_id"))&""
conn.Execute (sqlgrade2)%>
<tr>
<td height="21" width="100%" align="center" bgcolor=<%=tColor2%> class=tdc colspan="6">
<a href="pm.asp?mode=del&q_id=<%=rs("q_id")%>" onclick="{if(confirm('确定删除选定的纪录吗?')){return true;}return false;}"><img src=image/p_delete.gif border=0 alt=删除></a>
<a href="pm.asp?mode=add&action=add&username=<%=rs("q_send")%>&title=Re:<%=htmlencode(rs("q_title"))%>"><img src=image/p_reply.gif alt=回复 border=0></a>
<a href="pm.asp?action=add&id=<%=rs("q_id")%>"><img src=image/p_zf.gif alt=转发 border=0></a>
</td>
</tr>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor1%> class=tdc colspan="6">
<table border=0 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width=100% style="border-collapse: collapse" align=center>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor1%> class=tdc colspan="6">
来自<%=rs("q_send")%>的消息,发于<%=rs("q_time")%>
<hr color=<%=tdc2%> size=1></td>
</tr>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor2%> class=tdc colspan="6">消息标题:<%=htmlencode(rs("q_title"))%>
<hr color=<%=tdc2%> size=1></td>
</tr>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor1%> class=tdc colspan="6"><%=ubbsign(rs("q_content"))%>
</td>
</tr>
</table>
</td>
</tr>
<% set rs=nothing
else%>
<tr>
<td height="21" width="5%" align="center" <%=tColor%> class=tdc1>已读</td>
<td height="21" width="15%" align="center" <%=tColor%> class=tdc1>发送人</td>
<td height="21" width="15%" align="center" <%=tColor%> class=tdc1>标题</td>
<td height="21" width="20%" align="center" <%=tColor%> class=tdc1>时间</td>
<td height="21" width="8%" align="center" <%=tColor%> class=tdc1>大小</td>
<td height="21" width="12%" align="center" <%=tColor%> class=tdc1> 操作</td>
</tr>
<form method="POST" action="?mode=del">
<% sqlt = "select count(*) as tt from pm where q_receive='"&cpbusername&"'"
set rst=conn.execute(sqlt)
tt=rst("tt")
if tt>hpm then
for i=1 to (tt-hpm)
strsql = "delete from pm where q_id =(select min(q_id) from pm where q_receive='"&cpbusername&"')"
conn.Execute (strsql)
next
end if
set rst=nothing
page=request.querystring("page")
if page="" then page=1
pages = "10"
set rs_topic = server.createobject("adodb.recordset")
sql = "select * from pm where q_receive='"&cpbusername&"' order by q_time desc"
rs_topic.open sql,conn,1,1
if not (rs_topic.BOF or rs_topic.EOF) then
rs_topic.pagesize = pages
maxpagecount=rs_topic.pagecount
r=cint(rs_topic.RecordCount)'记录总数
rs_topic.absolutepage = page '当前页数
rcount=0
do while not rs_topic.eof and rcount <rs_topic.pagesize
%>
<tr>
<td height="21" width="5%" align="center" bgcolor=<%=tColor2%> class=tdc1><% if rs_topic("q_read")=1 then
response.write("<img src=image/p_issend_2.gif alt=已读>")
else
response.write("<img src=image/p_issend_1.gif alt=未读>")
end if %></td>
<td height="21" width="15%" align="center" bgcolor=<%=tColor2%> class=tdc><a href="viewuser.asp?username=<%=rs_topic("q_send")%>" target=_blank><%=rs_topic("q_send")%></a></td>
<td height="21" width="45%" bgcolor=<%=tColor2%> class=tdc></a>
<a href="pm.asp?mode=kai&q_id=<%=rs_topic("q_id")%>" title=<%=htmlencode(rs_topic("q_title"))%>><%=left(htmlencode(rs_topic("q_title")),30)%></a>
</td>
<td height="21" width="20%" align="center" bgcolor=<%=tColor2%> class=tdc><%=rs_topic("q_time")%></td>
<td height="21" width="8%" align="center" bgcolor=<%=tColor2%> class=tdc><%=len(rs_topic("q_content"))%>Byte</td>
<td height="21" width="12%" align="center" bgcolor=<%=tColor2%> class=tdc>
<input type="checkbox" name=q_id value="<%=rs_topic("q_id")%>">
</td>
</tr>
<%
rs_topic.MoveNext
rcount=rcount+1
loop
end if
rs_topic.close
set rs_topic=nothing
%>
<tr align="left">
<td colspan="3" bgcolor=<%=tColor2%> class=tdc >
<%
if maxpagecount="" then maxpagecount=1
if r="" then r=0
pagestart=page-5
pageend=page+5
if pagestart<1 then pagestart=1
if pageend>maxpagecount then pageend=maxpagecount
response.write(" [ ")
if maxpagecount > 6 then Response.Write ("<a href=pm.asp?page=1>1</a> ... ")
for i=pagestart to pageend
if i<>int(page) then
Response.Write (" <a href=pm.asp?page="&i&">" & i & "</a> ")
else
Response.Write ("<b>"&i&"</b> ")
end if
next
if maxpagecount > page +5 then Response.Write( " ... <a href=pm.asp?page="&maxpagecount&">"&maxpagecount&"</a>")
response.write(" ] ")
response.write("..页次:"&page&"/"&maxpagecount&"页 每页:"&pages&" 邮件数:"&r&" ")
%> </td> <td height="21" width="11%" align="center" bgcolor=<%=tColor2%> class=tdc colspan=3>
<input type=checkbox name=chkall value=on onclick="CheckAll(this.form)">选中所有显示记录 <input type="submit" value="删除" name="B1" class=bdtj onclick="{if(confirm('确定删除选定的纪录吗?')){return true;}return false;}">
<input type=submit name=delall onclick="{if(confirm('确定清除收件箱所有的纪录吗?')){return true;}return false;}" value="清空收件箱" class=bdtj>
</td>
</tr>
<% end if%>
</form>
</table>
</center>
<%end sub
sub send()%>
<center>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=1 width=<%=tdc3%> style="border-collapse: collapse" align=center >
<tr>
<td height="21" width="67%" align="center" <%=hColor%> class=tdc1 colspan="6">
<%=cpbusername%> 您现在在你的发件箱</td>
</tr>
<% if Request.QueryString("mode")="kai" then
sql="select * from pm where q_id="&chktopic(Request.QueryString("q_id"))&""
set rs=conn.execute(sql)
%>
<tr>
<td height="21" width="100%" align="center" bgcolor=<%=tColor2%> class=tdc colspan="6">
<a href="pm.asp?action=add&id=<%=rs("q_id")%>"><img src=image/p_zf.gif alt=转发 border=0></a>
</td>
</tr>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor1%> class=tdc colspan="6">
<table border=0 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width=100% style="border-collapse: collapse" align=center>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor1%> class=tdc colspan="6">
您发给 <B><%=rs("q_receive")%></b> 的消息,发于<%=rs("q_time")%>
<hr color=<%=tdc2%> size=1></td>
</tr>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor2%> class=tdc colspan="6">消息标题:<%=htmlencode(rs("q_title"))%>
<hr color=<%=tdc2%> size=1></td>
</tr>
<tr>
<td height="21" width="100%" align="left" bgcolor=<%=tColor1%> class=tdc colspan="6"><%=ubbsign(rs("q_content"))%></td>
</tr>
</table>
</td>
</tr>
<% else %>
<tr>
<td height="21" width="5%" align="center" <%=tColor%> class=tdc1>已读</td>
<td height="21" width="15%" align="center" <%=tColor%> class=tdc1>收件人</td>
<td height="21" width="15%" align="center" <%=tColor%> class=tdc1>标题</td>
<td height="21" width="20%" align="center" <%=tColor%> class=tdc1>时间</td>
<td height="21" width="8%" align="center" <%=tColor%> class=tdc1>大小</td>
</tr>
<%
page=request.querystring("page")
if page="" then page=1
pages = "10"
set rs_topic = server.createobject("adodb.recordset")
sql = "select * from pm where q_send='"&cpbusername&"' order by q_time desc"
rs_topic.open sql,conn,1,1
if rs_topic.BOF or rs_topic.EOF then
else
rs_topic.pagesize = pages
maxpagecount=rs_topic.pagecount
r=cint(rs_topic.RecordCount)'记录总数
rs_topic.absolutepage = page '当前页数
rcount=0
do while not rs_topic.eof and rcount <rs_topic.pagesize%>
<tr>
<td height="21" width="5%" align="center" bgcolor=<%=tColor2%> class=tdc1><% if rs_topic("q_read")=1 then
response.write("<img src=image/p_issend_2.gif alt=已读>")
else
response.write("<img src=image/p_issend_1.gif alt=未读>")
end if %></td>
<td height="21" width="15%" align="center" bgcolor=<%=tColor2%> class=tdc><a href="viewuser.asp?username=<%=rs_topic("q_receive")%>" target=_blank><%=rs_topic("q_receive")%></a></td>
<td height="21" width="52%" bgcolor=<%=tColor2%> class=tdc></a>
<a href="pm.asp?mode=kai&action=send&q_id=<%=rs_topic("q_id")%>" title=<%=htmlencode(rs_topic("q_title"))%>><%=left(htmlencode(rs_topic("q_title")),30)%></a>
</td>
<td height="21" width="22%" align="center" bgcolor=<%=tColor2%> class=tdc><%=rs_topic("q_time")%></td>
<td height="21" width="8%" align="center" bgcolor=<%=tColor2%> class=tdc><%=len(rs_topic("q_content"))%>Byte</td>
</tr>
<%
rs_topic.MoveNext
rcount=rcount+1
loop
end if
rs_topic.close
set rs_topic=nothing
%>
<tr align="left">
<td colspan="7" bgcolor=<%=tColor2%> class=tdc >
<% if maxpagecount="" then maxpagecount=1
if r="" then r=0
pagestart=page-5
pageend=page+5
if pagestart<1 then pagestart=1
if pageend>maxpagecount then pageend=maxpagecount
response.write(" [ ")
if maxpagecount > 6 then Response.Write ("<a href=pm.asp?action=send&page=1>1</a> ... ")
for i=pagestart to pageend
if i<>int(page) then
Response.Write (" <a href=pm.asp?action=send&page="&i&">" & i & "</a> ")
else
Response.Write ("<b>"&i&"</b> ")
end if
next
if maxpagecount > page +5 then Response.Write( " ... <a href=pm.asp?action=send&page="&maxpagecount&">"&maxpagecount&"</a>")
response.write(" ] ")
response.write("..页次:"&page&"/"&maxpagecount&"页 每页:"&pages&" 邮件数:"&r&" ")
%> </td></tr>
<% end if%>
</table>
</center>
<%end sub
end if%><!--#include file="bq.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -