⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showmessage.asp

📁 自由领域ASP+WAP同学录(V1.0)系统是一套仿ChinaRen的即可用电脑浏览又可以用手机访问的互动同学录单班级系统。这套系统同学录系统可以满足现在WAP普及的今天同学用手机上网交流的需求
💻 ASP
📖 第 1 页 / 共 2 页
字号:
              <tr>
                <td height="22" colspan="2"><img src="../images/signature.gif" width="500" height="17"><br>
                <% Response.Write UBBCode(rst("sign"),1)%> </td>
              </tr>
            </table> </td>
        </tr>
      </table>
      <%	
		row = not row
		rst.MoveNext
	  	Response.Flush()
        Next%>
      <table width="100%"  border="0" cellspacing="0" cellpadding="8">
        <tr> 
          <td class="rig1"> 共有留言 <b><span class="style1"><%=rst.RecordCount%></span> 
            条 共<span class="style1"><%=topage%></span>页 当前第 <span class="style2"><b><%=curpage%> 
            </b></span>页 每页显示<span class="style2"><b><%=pagesize%></b></span>条 
            </b></td>
          <td class="rig"> 
            <%Call showtitle%>
          </td>
        </tr>
      </table>
	  <form name="form1" method="post" action="?action=addforum" onkeydown="if(event.keyCode==13 && event.ctrlKey){if(check_walkman_form(this)){return true}}">
        <table width="769"  border="1" cellpadding="1" cellspacing="0" bordercolor="#666666" bgcolor="#FFFFFF" style="border-collapse:collapse;">
          <tr> 
            <td height="30" colspan="2" class="title">撰写留言 </td>
          </tr>
          <tr> 
            <td class="tar">留言表情:</td>
            <td style="padding-left:7px; padding-right:7px;line-height:1.5;word-break:break-all;"> 
              <% call showemot%>
            </td>
          </tr>
          <tr> 
            <td width="184" height="30" class="tar">插入UBB标签:<a name="pub"></a></td>
            <td height="22" bgcolor="#FFFFFF" style="padding-left:7px; padding-right:3px;line-height:1.5;"><a href="javascript:addcontent('[B]','[/B]');" title=粗体><img src="../images/ubb/bold.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[I]','[/I]');" title=斜体><img src="../images/ubb/italicize.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[U]','[/U]');" title=下划线><img src="../images/ubb/underline.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[ALIGN=CENTER]','[/ALIGN]');" title=居中><img src="../images/ubb/center.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[URL]','[/URL]');" title=链接><img src="../images/ubb/url1.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[EMAIL]','[/EMAIL]');" title=邮件><img src="../images/ubb/email1.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[IMGA]','[/IMGA]');" title=图片><img src="../images/ubb/image.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[FLASH]','[/FLASH]');" title=Flash><img src="../images/ubb/swf.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[CODE]','[/CODE]');" title=代码><img src="../images/ubb/code.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[QUOTE]','[/QUOTE]');" title=引用><img src="../images/ubb/quote1.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[FLY]','[/FLY]');" title=飞行><img src="../images/ubb/fly.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[MOVE]','[/MOVE]');" title=移动><img src="../images/ubb/move.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[GLOW=255,RED,2]','[/GLOW]');" title=发光><img src="../images/ubb/glow.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[SHADOW=255,RED,2]','[/SHADOW]');" title=阴影><img src="../images/ubb/shadow.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[SIZE=3]','[/SIZE]');" title=3号字><img src="../images/ubb/size3.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[COLOR=blue]','[/COLOR]');" title=蓝色字><img src="../images/ubb/blue.gif" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[COLOR=red]','[/COLOR]');" title=红色字><img src="../images/ubb/red.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[MP=320,240]','[/MP]');" title=插入Media文件><img src="../images/ubb/media.gif" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[RM=320,240]','[/RM]');" title=插入RealPlay文件><img src="../images/ubb/real.gif" width="20" height="20" align="absmiddle" border=0></a></td>
          </tr>
          <tr> 
            <td class="tar">注意:<br>
              留言内容不要超过1000;<br>
              HTML标记 不支持;<br>
              UBB代码 
              <%If const_EnableMessageUBBCode=1 Then%>
              支持; 
              <%Else%>
              <font color="#FF0000">不支持;</font> 
              <%End IF%>
              <br> <input name="isubbcode" type="checkbox" id="isubbcode" value="1"  <%if const_EnableMessageUBBCode=1 then Response.Write("checked") else Response.Write("disabled") end if%>>
              是否是UBB代码<br> <input name="limitflag" type="checkbox" id="limitflag" value="1"> 
              <span class="style2">此留言只能班级成员浏览</span><br> <a href="../ubbhelp.asp" target="_blank">内容支持插入UBB标签<br>
              使用方法请参考帮助 <span class="style2"> </span></a></td>
            <td bgcolor="#FFFFFF" style="padding-left:7px; padding-right:3px;line-height:1.5;"> 
              <textarea name="Form_Content" cols="85" rows="11" id="Form_Content"></textarea> 
              <br> <div align="right" style="font-size:11px;color:#666666;padding-right:28px;">缩放输入框: 
                <font face="webdings" style="FONT-SIZE: 12px; CURSOR: hand" onclick="document.form1.Form_Content.rows+=4" title="放大输入框">6</font> 
                <font face="webdings" style="FONT-SIZE: 12px; CURSOR: hand"  onclick="if(document.form1.Form_Content.rows>=4)document.form1.Form_Content.rows-=4;else return false" title="缩小输入框">5</font></div></td>
          </tr>
          <tr class="liu"> 
            <td class="tar">插入表情,时间</td>
            <td height="22" class="content">&nbsp;&nbsp;<a href="javascript:addcontent('[em01]','');"><img src="../images/UBBicon/em01.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em02]','');"><img src="../images/UBBicon/em02.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em03]','');"><img src="../images/UBBicon/em03.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em04]','');"><img src="../images/UBBicon/em04.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em05]','');"><img src="../images/UBBicon/em05.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em06]','');"><img src="../images/UBBicon/em06.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em07]','');"><img src="../images/UBBicon/em07.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em08]','');"><img src="../images/UBBicon/em08.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em09]','');"><img src="../images/UBBicon/em09.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em10]','');"><img src="../images/UBBicon/em10.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em11]','');"><img src="../images/UBBicon/em11.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em12]','');"><img src="../images/UBBicon/em12.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em13]','');"><img src="../images/UBBicon/em13.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:addcontent('[em14]','');"><img src="../images/UBBicon/em14.GIF" width="20" height="20" align="absmiddle" border=0></a> 
              <a href="javascript:var d; d=new Date();addcontent(d.getYear()+'-'+rightStr('0'+(d.getMonth()+1),2)+'-'+rightStr('0'+d.getDate(),2)+' '+rightStr('0'+d.getHours(),2)+':'+rightStr('0'+d.getMinutes(),2)+':'+rightStr('0'+d.getSeconds(),2),'');" title="插入时间"><b>T</b></a> 
            </td>
          </tr>
          <tr> 
            <td colspan="2" style="text-align:center;" height="30"><input type="submit" name="Submit" value="确 认" onClick="return check_walkman_form(this.form)">
                <font color="#FF0000"><b>
              <input type="reset" name="Submit3" value="重 置">
              (Ctrl+Enter提交)</b></font></td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
<%end sub%>
<% sub  showtitle()%>
	<div align=right> 
	<%if curpage<>1 then%>
		<A title=首页 href="?curpage=1"><font face="webdings" color="#0033FF">9</font></A> 
	<%else%>
		<font face="webdings" color="#0033FF" title="首页" class=good>9</font> 
	<%end if%>
	<%if p=1 Then%>
		<font face=webdings title="已经是最前面了" class=good>7</font>
	<%else%>
		<a href="?p=<%=p-1%>"><font face=webdings title="前10页" class=good>7</font></a>
	<%end if%>
	<%for i=(p-1)*10+1 to (p-1)*10+10
		if i>topage then exit for
		if curpage=i then 
			Response.Write "<font color='ff0000'>"&i&"</font>"
		else%>
			<a title="第<%=i%>页" href="?curpage=<%=i%>"><%=i%></a> 
		<%End IF
	Next%>
	<%if p>=xx Then%>
		<font face=webdings class=good title="已经是最后面了">8</font>
	<%else%>
		<a href="?p=<%=p+1%>"><font face=webdings title="后10页" class=good>8</font></a>
	<%end if%>
	<%if curpage<>topage then%>
		<A title=尾页 href="?curpage=<%=topage%>"><FONT face=webdings>:</FONT></A> 
	<%else%>
		<A title=尾页 href="#"><FONT face=webdings>:</FONT></A> 
	<%end if%>
	</div>
<%end sub%>
<%sub addforum
		dim str_succ
		if outsitesubmit then
			printerror "发布班级留言出错","<li>请不要外部提交数据!</li>,779"
			exit sub
		end if
		if session("username")="" then
			printerror "发布班级留言出错","<li>您还没有登录,请先<a href='"&const_txl_HomeUrl&"user/login.asp'>登录</a>再发布留言!</li>",779
			exit sub
		end if
		dim studentid,content,pubtime,limitflag,id,forumemot,isubbcode
		studentid=Session("username")
		pubtime=now()
		content=Trim(Request.Form("Form_Content"))
		limitflag=Request.Form("limitflag")
		if limitflag="1" then
			limitflag=1
		else
			limitflag=0
		end if
		isubbcode=Request.Form("isubbcode")
		if isubbcode="1" then
			isubbcode=1
		else
			isubbcode=0
		end if
		forumemot=Trim(Request.Form("Form_FaceIcon"))
		if isubbcode=0 then
			content=HtmlEncode(content)
		end if 
		if content="" or isnull(content) Then
			printerror "发布班级留言出错","<li>请输入留言内容!</li>",779
			exit sub
		end if
		'Response.Write(isubbcode&"<br>"&content)
		Dim rs
		set rs=Server.CreateObject("Adodb.Recordset")
		rs.open "select top 1 * from forum order by id desc",conn,1,3
		if rs.eof  then
			id=1
		else
			id=rs("id")+1
		end if
		rs.addnew()
			'rs("id")=id
			rs("studentid")=studentid
			rs("content")=content
			rs("pubtime")=pubtime
			rs("limitflag")=limitflag
			rs("forumemot")=forumemot
			rs("isubbcode")=isubbcode
		rs.update
		rs.close
		set rs=nothing
		conn.execute ("update  ec set forumtimes=forumtimes+1 where studentid='"&studentid&"'")
		str_succ="<li>恭喜你,发布留言成功!"&Vbcrlf
	str_succ=str_succ&"<li><a href='?' title='浏览你刚才发布的留言'>点这里浏览你刚才发布的留言</a>,系统5秒转到新留言!</li>"&Vbcrlf
	Call printsuc("发布班级留言成功",str_succ,779)
	Response.write "<meta http-equiv=""refresh"" content='5;URL=?'>" 
end sub
sub showemot
	dim rs,emot,k,check
	set rs=conn.execute ("select emoturl from config")
	emot=rs(0)
	emot=Split(emot,"|")
	for k=0 to ubound(emot)-1
		check=""
		'Response.Write(emot(k))
		if k=0 then check="checked"
		Response.Write "<input name=Form_FaceIcon  type=radio value='"&emot(k)&"' "&check&"><img src="&const_txl_HomeUrl&const_emoturl&emot(k)&"  align=absmiddle >"
		if k mod 14=13 then Response.Write("<br>")
	next
	
end sub

SUb export
	If Session("username")="" Then
		errstr=errstr&"<li>你现在还没有登录或者会话超时,点<a href='../user/login.asp'>这里登录</a>!</li>"
		errstr=errstr&"<li>如果还有疑问请与管理员联系!</li>"
		txl_SiteHead const_txlname&"-班级留言"
		Call printerror("导出留言出错!",errstr,779)
		SiteBottom
		Exit Sub
	End If
	If not (Session("usertype")=3 or Session("usertype")=4)Then
		errstr=errstr&"<li>班级好友和准班级成员没有这个权限</li>"
		errstr=errstr&"<li>如果还有疑问请与管理员联系!</li>"
		txl_SiteHead const_txlname&"-班级留言"
		Call printerror("导出留言出错!",errstr,779)
		SiteBottom
		Exit Sub
	End IF

	Dim Rs,sql,exportstr,i
	sql="select top 100 forum.*,ec.sname from forum,ec where ec.studentid=forum.studentid order by forum.id desc"
	'sql="select  forum.*,ec.sname from forum,ec where ec.studentid=forum.studentid order by forum.id desc"
	set Rs=Conn.Execute (sql)
	exportstr=""
	If Rs.eof then exportstr="没有记录!"
	i=0
	While not Rs.Eof 
		i=i+1
		exportstr=exportstr&i&"."&Rs("sname")&"("&Rs("studentid")&")于 "&rs("pubtime")&" 留言:"&Vbcrlf
		exportstr=exportstr&vbTab&rs("content")&Vbcrlf&Vbcrlf
		Rs.movenext
	Wend
	Rs.close
	set Rs=nothing
	Response.ContentType = "text/txt"  
	Response.AddHeader "Content-Disposition", "attachment; filename=ClassForum_"& month(now) & "_" & day(now) & ".txt"
	Response.Write exportstr
End Sub

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -