📄 sms.asp
字号:
<!--#include file="up.asp"--><!--#include file="inc/ubbcode.asp"-->
<%
if isnull(lguserid) or lguserid="" then Response.Redirect"login.asp"
dim action,toname,bad,b
action=request.querystring("action")
select case action
case""
conn.execute("update sms set new=false where touserid="&lguserid&"")
%><SCRIPT src=inc/menu.js></script>
<script>messages = new Array()
messages[0]=" <font color=<%=c1%>>珍惜每一点空间,麻烦你及时删除无用的留言信息。谢谢!</font>"
messages[1]=" <font color=<%=c1%>>每删除一封信件,可获积分 3 点。</font>"</script>
<%=ttop%><table align="center" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
<tr>
<td class=td1 width="100%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28" colspan="2"> <img src="pic/gl.gif" border="0"> 个人留言板</td>
</tr>
<tr>
<td width="25%" bgcolor="<%=c2%>" height="28"> <a href=sms.asp?action=write><img border="0" src="pic/xie.gif"> 发送留言</a>
<a href=sms.asp?action=delall onclick="{if(confirm('确定清除你的留言板中所有的留言吗?')){return true;}return false;}"><img border="0" src="pic/del.gif"> 清空留言板</a></td>
<td width="75%" bgcolor="<%=c2%>" height="28"><div id=content></div><SCRIPT>jspaper()</SCRIPT></td>
</tr>
</table>
<%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
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,"|")
%>
<table align="center" border="1" cellpadding="0" cellspacing="0" style='border-collapse: collapse;TABLE-LAYOUT: fixed; WORD-BREAK: break-all' width="<%=tbw%>">
<tr>
<td width="25%" bgcolor="<%=c2%>" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="28" align="center"><font color=<%=c1%>><%=kbbs(usern("name"))%></font></td>
</tr>
<tr>
<td align="center"><p style="margin: 5"><%response.write"<img src="&kbbs(userinfo(5))&" width="&kbbs(userinfo(6))&" height="&kbbs(userinfo(7))&" border=0></a>"%></td>
</tr>
</table>
</td>
<td width="75%" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="28" bgcolor="<%=c2%>">
<tr>
<td width="40%" style='border-bottom-style: solid; border-bottom-width: 1;'> <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></td>
<td width="60%" align="right" style='border-bottom-style: solid; border-bottom-width: 1;'>
<img border="0" src="pic/xie.gif"> <%=kbbs(sms(1))%> </td>
</tr>
</table>
<blockquote>
<p style="line-height: 120%">
<img border="0" src="pic/fle.gif"><br><%=ubb(sms(0))%></p>
</blockquote>
</td>
</tr>
</table>
<p style="margin: 4"></p>
<%
set usern=nothing
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
end if
rs.Close
set rs=nothing
response.write"<TABLE align='center' bgcolor="&c1&" cellSpacing=0 cellPadding=0 width='"&tbw&"' border=0 style='border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px'><TBODY><TR height=25><TD height=2><TABLE cellSpacing=0 cellPadding=3 width='100%' border=0 background='"&tbg&"' style='border-collapse: collapse; border-left-width:0; border-top-width:0; border-bottom-width:0'><TBODY><TR><TD><b><font color='#FFFFFF'><img border='0' src='pic/fl.gif'> 你的留言板共有</font><font color='#00FFFF'> "&TotalPage&" </font><font color='#FFFFFF'>页,<font color='#00FFFF'> "&count&" </font>条留言,每页有<font color='#00FFFF'> "&pagesetup&" </font> 条留言 >> ["
ii=PageCount-5
iii=PageCount+5
if ii < 1 then
ii=1
end if
if iii > TotalPage then
iii=TotalPage
end if
if PageCount > 6 then
Response.Write "<a href=?topage=1><font color=yellow>1</font></a> ... "
end if
for i=ii to iii
If i<>PageCount then
Response.Write " <a href=?topage="& i &"><font color=yellow>" & i & "</font></a> "
else
Response.Write " <font color=red><b>"&i&"</b></font> "
end if
next
if TotalPage > PageCount+5 then
Response.Write " ... <a href=?topage="&TotalPage&"><font color=yellow>"&TotalPage&"</font></a>"
end if
response.write" ]</font></b></TD><form name=form method='POST' action=javascript:Check()><TD height=2 align='right'><font color='#FFFFFF'>页码: <input style=FONT-SIZE:9pt maxLength='6' size='6' name='topage' value='"&PageCount&"'> <input style=FONT-SIZE:9pt value='GO!' type='submit'></font></TD></form></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>"&tbottom&""
%>
<%case"write"
toname=replace(request.querystring("toname"),"'","")
%><SCRIPT src=inc/ybbcode.js></script>
<SCRIPT>function openwin()
{
document.form1.topic.value="发送给 "+document.topic.toname.value+" 的留言";
document.form1.content.value=document.topic.content.value;
var popupWin = window.open('paper.asp?action=preview', 'showgg', 'width=500,height=400,resizable=1,scrollbars=yes,menubar=no,status=yes');
document.form1.submit()
}
</SCRIPT>
<form method="POST" action="sms.asp?action=savesms" name="topic">
<%=ttop%>
<table align="center" border="1" bordercolor=<%=c2%> cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
<tr>
<td class=td1 width="100%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28"> <img src="pic/gl.gif" border="0"> 发送留言</td>
</tr>
<tr>
<td width="100%" height="26">
<table border="1" bgcolor=f2f2f2 cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<tr>
<td width="30%">
<p style="line-height: 120%; margin: 4"><b>留言对象:</b></td>
<td width="70%">
<p style="line-height: 120%; margin: 4">
<input type="text" name="toname" size="35" value="<%=kbbs(toname)%>"></td>
</tr>
<tr>
<td valign="top">
<p style="line-height: 120%; margin: 4"><font color="#0466CC"><b>公告内容:</b></font><br>
·<a href="javascript:emoticon('[sup]内容[/sup]')">上标</a> ·<a href="javascript:emoticon('[sub]内容[/sub]')">下标</a><br>
·<a href="javascript:emoticon('[code]内容[/code]')">插入代码</a><br>·文字大小:<select onchange=ybbsize(this.options[this.selectedIndex].value) name=a style="font-size: 9pt"><OPTION value=1>1</OPTION><OPTION value=2>2</OPTION><OPTION value=3>3</OPTION><OPTION value=4>4</OPTION></SELECT><br>·<span lang=zh-cn>颜色:<select onchange=COLOR(this.options[this.selectedIndex].value) name="111" style="font-size: 9pt"><option style='COLOR:000000;BACKGROUND-COLOR:000000' value=000000>黑色</option><option style='COLOR:FFFFFF;BACKGROUND-COLOR:FFFFFF' value=FFFFFF>白色</option><option style='COLOR:008000;BACKGROUND-COLOR:008000' value=008000>绿色</option><option style='COLOR:800000;BACKGROUND-COLOR:800000' value=800000>褐色</option><option style='COLOR:808000;BACKGROUND-COLOR:808000' value=808000>橄榄色</option><option style='COLOR:000080;BACKGROUND-COLOR:000080' value=000080>深蓝色</option><option style='COLOR:800080;BACKGROUND-COLOR:800080' value=800080>紫色</option><option style='COLOR:808080;BACKGROUND-COLOR:808080' value=808080>灰色</option><option style='COLOR:FFFF00;BACKGROUND-COLOR:FFFF00' value=FFFF00>黄色</option><option style='COLOR:00FF00;BACKGROUND-COLOR:00FF00' value=00FF00>浅绿色</option><option style='COLOR:00FFFF;BACKGROUND-COLOR:00FFFF' value=00FFFF>浅蓝色</option><option style='COLOR:FF00FF;BACKGROUND-COLOR:FF00FF' value=FF00FF>粉红色</option><option style='COLOR:C0C0C0;BACKGROUND-COLOR:C0C0C0' value=C0C0C0>银白色</option><option style='COLOR:FF0000;BACKGROUND-COLOR:FF0000' value=FF0000>红色</option><option style='COLOR:0000FF;BACKGROUND-COLOR:0000FF' value=0000FF>蓝色</option><option style='COLOR:008080;BACKGROUND-COLOR:008080' value=008080>蓝绿色</option></select></td>
<td>
<p style="margin: 4"><img onclick=fly() alt=飞行字 src="pic/fly.gif" border=0>
<img onclick=move() alt=移动字 src="pic/move.gif" border=0>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -