📄 sms.asp
字号:
<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> <img border="0" src="images/skin/<%=sid%>/fle.gif"> 发送时间:<%=ubb(sms(1))%></div>
<blockquote>
<p style="line-height: 120%">
<br><%=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&action=sendsms><font face=Webdings title=首页>9</font></a> <a href=?topage="&PageCount-1&"&action=sendsms><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=?action=sendsms&topage=1>1</a> ... "
end if
for i=ii to iii
If i<>PageCount then
Response.Write " <a href=?action=sendsms&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=?action=sendsms&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&"&action=sendsms><font face=Webdings title=下页>8</font></a> <a href=?topage="&TotalPage&"&action=sendsms><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"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>
<div id='MaoDiv' style='position: absolute; width:570px; height:160px; display:none;'><iframe id='MView' name='MView' src='about:blank' frameborder='0' scrolling='no' valign='top' width='100%' height='100%'></iframe></div>
<form method="POST" action="sms.asp?action=savesms" name="topic">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width='100%' class=tabbg>
<tr><td class=c2 height=26> <img src="pic/gl.gif" border="0"> 发送短消息</td></tr>
<tr><td height="26"> <b>发给:</b><input type="text" name="toname" size="76" value="<%=kbbs(toname)%>"></td></tr>
<tr><td>
<p style="line-height: 120%; margin: 4">文字大小:<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><OPTION value=5>5</OPTION><OPTION value=6>6</OPTION><OPTION value=7>7</OPTION></SELECT>·<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></tr>
<tr><td>
<p style="margin: 4"><%call qian%><br> <textarea rows="9" name="content" cols="82" style="font-family: 宋体; font-size: 9pt" onbeforepaste="if(document.getElementById('x_paste').checked){window.clipboardData.setData('content',trans());this.focus();}" onkeydown=presskey(); onkeyup=gbcount(this.form.content,this.form.total,this.form.used,this.form.remain);></textarea><IFRAME id=rtf style="WIDTH: 0px; HEIGHT: 0px" marginWidth=0 marginHeight=0 src="about:blank" scrolling=no></IFRAME><SCRIPT>rtf.document.designMode="On";</SCRIPT>
<SCRIPT>
function emoticon(theSmilie){
document.topic.content.value +=theSmilie + '';
document.topic.content.focus();
}
function presskey(eventobject)
{
if(event.ctrlKey && window.event.keyCode==13){this.document.topic.submit();}else{return false}
}
</SCRIPT>
<br></td>
</tr>
<tr>
<td align="center" height="40" class=c2>
<input class=submit type=submit value=OK_!发送 name=B1> <input class=submit type=button value="预 览!" onclick=openwin()> <input class=submit type=reset value=NO_!重写 name=B2> [ 按 Alt+Enter 直接发送 ]</td>
</tr>
</table>
</form>
<form name=form1 action=paper.asp?action=preview method=post target=showgg>
<input type=hidden name=topic value=><input type=hidden name=content value=>
</form>
<%case"savesms"
dim content,cansend,touserid,content2,contentok
cansend=true
function checkbad(str)
if isnull(str) then exit function
bad=split(application(prefix&"badcontent"), "|")
for b=0 to ubound(bad)
str=Replace(str,bad(b),string(len(bad(b)),"*"))
next
checkbad=str
end function
toname=Replace(Request.Form("toname"),"'","")
content=checkbad(left(Request.Form("content"),15000))
content=replace(content,"|","│")
content=replace(content,"'","''")
contentok=Replace(content," ","")
contentok=Replace(content," ","")
if toname="" or contentok="" then
cansend=false
mes="·请填写完整留言对象和留言内容。<br>"
else
if toname=lgname then
cansend=false
mes="·不能给自己留言。<br>"
else
if checkname(toname)=false then
cansend=false
mes="·论坛不存在 "&kbbs(toname)&" 这个用户。<br>"
else
set rs=conn.execute("select top 1 userid from [user] where name='"&toname&"'")
if rs.eof then
cansend=false
mes="·论坛不存在 "&kbbs(toname)&" 这个用户。<br>"
else
touserid=rs("userid")
end if
set rs=nothing
end if
end if
end if
set rs=conn.execute("select top 1 mark from [user] where userid="&lguserid&"")
if rs("mark")<5 then
cansend=false
mes=mes&"·你的论坛积分为 <b>"&rs("mark")&"</b> ,不能够发送留言。<br>·请你发贴挣积分后再发送。<br>"
end if
if cansend=false then
call sendinfo("","<b>对不起!留言发送失败,可能存在以下问题。</b><br>"&mes&"·<a href='javascript:history.go(-1)'><img src=pic/re.gif align=absmiddle border=0> 返回重新填写</a>")
elseif cansend=true then
content2=content&"|"&now()+timeset/24
conn.execute("insert into sms(fromuserid,touserid,content) values("&lguserid&","&touserid&",'"&content2&"')")
conn.execute("update [user] set mark=mark-"&bbsinfo(15)&" where userid="&lguserid&"")
call sendinfo(1,"·已经成功的给 "&kbbs(toname)&" 留言。<br>·论坛收取了你 <b>"&bbsinfo(15)&"</b> 元钱邮费。<br>·<img src=pic/re.gif border=0> <a href=sms.asp>返回留言板</a>")
end if
%><%case"del"
if conn.execute("select top 1 id from sms where id="&id&" and touserid="&lguserid&"").eof then
call sendinfo(0,"·你的留言板不存在你所要删除的留言。<br>·<img src=pic/re.gif border=0> <a href=sms.asp>返回留言板</a>")
else
conn.execute("delete*from sms where id="&id&" and touserid="&lguserid&"")
conn.execute("update [user] set mark=mark+3 where userid="&lguserid&"")
call sendinfo(1,"·已经删除了选中的留言。<br>·<img src=pic/re.gif border=0> <a href=sms.asp>返回留言板</a>")
end if
%><%case"delall"
dim delnum,addmark
delnum=conn.execute("select count(id) from sms where touserid="&lguserid&"")(0)
addmark=6*int(delnum)
conn.execute("update [user] set mark=mark+"&int(addmark)&" where userid="&lguserid&"")
conn.execute("delete*from sms where touserid="&lguserid&"")
call sendinfo(1,"·已经成功的清空留言板。<br>·你获得了 <b>"&addmark&"</b> 点积分。<br>·<img src=pic/re.gif border=0> <a href=sms.asp>返回留言板</a>")%><%end select
Response.Write "</td></tr></table><script>tbottom()</script>"
call down
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -