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

📄 showmessage.asp

📁 自由领域ASP+WAP同学录(V1.0)系统是一套仿ChinaRen的即可用电脑浏览又可以用手机访问的互动同学录单班级系统。这套系统同学录系统可以满足现在WAP普及的今天同学用手机上网交流的需求
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file=../INC/txlconst.asp-->
<!--#include file=../INC/txlfun.asp-->
<!--#include file=../INC/UbbCode.asp-->
<!--
<pre>
┌─ 自由领域ASP+WAP同学录系统 ─────────────────┐
│                                                               │
│  感谢你使用 自由领域ASP+WAP同学录系统(测试版)                │
│  使用本免费源码您必须遵守以下规定                             │
│    不得公开发表代码 不得用做商业用途,不得向其他使用者收费。  │
│                                                               │
│  使用时,请保留此段信息,谢谢配合                             │
│                                                               │
│                                       2004/12/19              │
│                                                               │
└────────────────  http://99167.jahee.com ───┘
</per>
-->
<%
'on error resume next
dim const_txl_HomeUrl,errstr,i
Dim sql,rst,topage,curpage,p,xx
errstr=""
const_txl_HomeUrl="../"
OpenDatabase
call online
if Request.QueryString("action")="addforum" then
	txl_SiteHead const_txlname&"-班级留言"
	call	addforum
	SiteBottom
elseif Request.QueryString("action")="export" then
	call	export
else
	txl_SiteHead const_txlname&"-班级留言"
	call main
	SiteBottom
end if
CloseDatabase
sub main
	If const_forum_login_limit=1	Then	'留言登录查看限制
		If session("username")="" Then
			errstr="<li>当前同学录状态已经设置为<font color=red>班级留言只有登录之后才能看到</font>!</li>"
			errstr=errstr&"<li>你现在还没有登录或者会话超时,点<a href='../user/login.asp'>这里登录</a>!</li>"
			errstr=errstr&"<li>如果还有疑问请与管理员联系!</li>"
			Call printerror("查看班级留言出错!",errstr,779)
			Exit Sub
		End If
	ElseIf const_forum_login_limit=2 Then
		If session("username")="" Then
			errstr="<li>当前同学录状态已经设置为<font color=red>班级留言只有班级成员和嘉宾有查看权限</font>!</li>"
			errstr=errstr&"<li>你现在还没有登录或者会话超时,点<a href='../user/login.asp'>这里登录</a>!</li>"
			errstr=errstr&"<li>如果还有疑问请与管理员联系!</li>"
			Call printerror("查看班级留言出错!",errstr,779)
			Exit Sub
		End If
		If not (session("usertype")=3 or session("usertype")=4)  Then
			errstr="<li>当前同学录状态已经设置为<font color=red>班级留言只有班级成员和嘉宾有查看权限</font>!</li>"
			errstr=errstr&"<li>你目前的身份没有该权限!</li>"
			errstr=errstr&"<li>如果还有疑问请与管理员联系!</li>"
			Call printerror("查看班级留言出错!",errstr,779)
			Exit Sub
		End If
	End	If
    sql="select ec.*,forum.* from ec,forum where ec.studentid=forum.studentid order by forum.id desc"
            Set rst=Server.CreateObject ("ADODB.Recordset")
            rst.open sql,conn,1
            const pagesize=6
            rst.PageSize=pagesize
            topage=rst.PageCount 
           IF rst.eof Then 
              Response.Write "当前无留言……"
           Else
           curpage=Request.QueryString("curpage")
           if curpage="" Then curpage=1
           curpage=cint(curpage)
            p=(curpage-1)\10+1
            if Request.QueryString ("p")<>"" Then
               p=cint(Request.QueryString ("p"))
               curpage=(cint(Request.QueryString ("p"))-1)*10+1
            end if
           rst.AbsolutePage=curpage     
           if topage mod 10=0 then
                 xx=(topage\10)
           else
                 xx=(topage\10)+1
           end if
		end if

%>
<script>
function addcontent(str1,str2)
	{
		form1.Form_Content.focus();
		if ((document.selection)&&(document.selection.type== "Text"))
		{
			var range= document.selection.createRange();
			var ch_text=range.text;
			range.text= str1 + ch_text + str2;
		} 
		else
		{
			document.form1.Form_Content.value=document.form1.Form_Content.value+str1+str2;
			form1.Form_Content.focus();
		}
	}
</script>
      <script>
	  var submitflag
	  submitflag=false
	  function check_walkman_form(walkman_frm)
	  {
	  //walkman编写
	  if (walkman_frm.Form_Content.value==""){
	  	alert("请输入留言内容!");
		walkman_frm.Form_Content.focus();
		return false
	  }
	  if (walkman_frm.Form_Content.value.length>1000){
	  	alert("留言内容不能超过1000个字符,当前留言长度"+walkman_frm.Form_Content.value.length+"!");
		walkman_frm.Form_Content.focus();
		return false
	  }
	  if(!submitflag){
		walkman_frm.submit();
		walkman_frm.Submit.disabled=true
		submitflag=true
		 return true
		}
		else
		{
		alert("请不要重复提交");
		return false;
		}
	  }
  </script>
<style type="text/css">
<!--
body,table,th,td,p
{ font-family:Verdana, Arial, Helvetica, sans-serif;}
.style1 {
	font-weight: bold;
}
.style2 {color: #FF0000}
-->
</style>
<table width="779" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td background="" style="padding:5px;vertical-align:top; "> 
	<table width="100%" border="0" cellpadding="0" cellspacing="8">
        <tr> 
          <td colspan="2" class="rig1"><span class="style1">当前位置:</span><a href="<%=const_homepageurl%>">首页</a> 
            &gt;&gt; <a href="<%=const_txl_HomeUrl&const_txlurl%>"><%=const_txlname%></a> 
            &gt;&gt; <a href="showmessage.asp">班级留言</a>
		</td></tr>
	</table>
      <table width="100%"  border="0" cellpadding="0" cellspacing="8" bgcolor="#FFFFFF" style="margin-bottom:5px;border:#666666 1px solid;">
		<tr><td colspan="2" style="line-height:1.8;">
			 ·<span class="style1">请注意:</span>每页显示 <b><span class="style2"><b><%=pagesize%></b></span></b> 
                条记录,每次显示<span class="style2">10</span>页,翻看其余的留言请点<span class="style2"><font face="webdings">8</font></span>和<span class="style2"><font face="webdings">7</font></span>标记,自己有权<font color="#FF0000">删除</font>自己发布的留言<br>
			  ·<span class="style1">留言导出:</span>&nbsp;<a href="?action=export" title="导出为TXT文本,班级成员和嘉宾权限">导出前100条留言记录 
                </a>(<font color="#FF0000">只对班级成员和嘉宾有效</font>)<br>
			·<b>我要发表留言</b> <a href="#pub">点击这里发表留言</a>			</td>
        </tr>
        <tr> 
          <td class="rig1"> 共有留言<span class="style1"><%=rst.RecordCount%></span>条 
            共<span class="style1"><%=topage%></span>页 当前第<span class="style1"><%=curpage%> 
            </span>页 每页显示<span class="style1"><%=pagesize%></span>条 </td>
          <td class="rig"><%Call showtitle%></td>
        </tr>
      </table>
	  <%dim ta
	  	dim row
	    row=false
	    For i=1 to rst.PageSize
	   		if rst.EOF then 
				exit for
			end if
			 if rst("sex")="女"	then
				ta="她"
			 else
			 	ta="他"	
			 end if
	  %>
      <table width="769"  border="1" cellspacing="0" cellpadding="1" bgcolor="#<%if row=true then response.Write("f7f7f7") else response.Write("ffffff")%>" bordercolor="#666666" style="border-collapse:collapse;">
        <tr> 
          <td width="164" valign="top" style="vertical-align:center;"> 
            <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="8" style="text-align:center;line-height:1.5;">
              <tr> 
                <td align="left"><font color="#0000FF"><%=rst("sname")%></font></td>
              </tr>
			  <tr> 
                <td height="45" align="left"> 
                  <a href="../user/showuserinfo.asp?username=<%=rst("studentid")%>"><%=showuserpic(rst("pic"),rst("picwidth"),rst("picheight"))%></a>
                </td>
              </tr>
              <tr> 
                <td align="left"> <strong><%=rst("studentid")%></strong></td>
              </tr>
              <tr> 
                <td align="left">留言数:<%=rst("forumtimes")%></td>
              </tr>
              <tr> 
                <td align="left">登录数:<%=rst("logintimes")%></td>
              </tr>
              <tr> 
                <td align="left">上次登录:<span style="font-size:10px;"><%=datevalue(rst("lastedtime"))%></span></td>
              </tr>
            </table></td>
          <td width="595" valign="top" class="content"> 
            <table width="100%" border="0" cellpadding="0" cellspacing="5" bordercolor="#576F9F">
              <tr> 
                <td height="22"> <img src="<%=const_txl_HomeUrl&const_emoturl&rst("forumemot")%>" align="absmiddle"> 发表于:<span style="font-size:10px;"><%=rst("pubtime")%></span></td>
                <td align="right"><img src="../images/profile.gif" width="16" height="16" align="absmiddle"> <a href="../user/showuserinfo.asp?username=<%=rst("studentid")%>">查看<%=ta%>的资料</a> <img src="../images/pmto.gif" width="16" height="16" align="absmiddle"> <a href=javacript:; onclick="javascript:winsteps_open_window('../user/showpermsg.asp?towho=<%=rst("studentid")%>&action=showsendmsgfrm',520,300,'msg');return false" title="发短信给<%=rst("studentid")%>">给<%=ta%>发短信</a> <img src="../bbs/images/Del.gif" alt="删除此留言" width="16" height="16" border="0" align="absmiddle"><a href="delmessage.asp?action=del&id=<%=rst("id")%>" title="删除该留言,管理员操作权限" onClick="return confirm('你确实要删除吗?')">删除留言</a></td>
              </tr>
              <tr> 
                <td height="1" colspan="2" bgcolor="#576F9F"></td>
              </tr>
              <tr> 
                <td colspan="2" valign="top">
                  <table width="595" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="595"> 
                        <table width="99%" height="110" border="0" cellpadding="1" cellspacing="1">
                          <tr>
                            <td>
                              <%
							  dim lookflag
						  lookflag=false
						  if Session("usertype")="" then
								lookflag=false
						 else
							if Session("usertype")=3 or Session("usertype")=4 then
								lookflag=true
							else
								lookflag=false
							end if
						end if
				if rst("limitflag")=1 and not(lookflag) 	then
					Response.Write "<font color=""#FF0000"">此留言只有班级成员和嘉宾才能查看</font><br>"&Vbcrlf
                  		Response.Write "<br><a href=""../help.asp"">点此查看同学录帮助</a>"&Vbcrlf
				else
						if rst("isubbcode")=1 then
							Response.Write	BadWords_Deal(UBBCode(rst("content"),1))
						else
							Response.Write	BadWords_Deal(UBBCode(rst("content"),2))
						end if
				end if
				%>
                            </td>
                          </tr>
                        </table> </td>
                    </tr>
                </table> </td>
              </tr>

⌨️ 快捷键说明

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