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

📄 list.asp

📁 自己做的毕业设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/config.asp"-->
<!--#include file="inc/conndb.asp"-->
<!--#include file="inc/syfyl.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="zhuru.asp"-->
<%
name=Request.Cookies("mctb_name")
keys=request("q")
function formatQueryStr(str) '格式化sql中的like字符串
dim nstr
nstr = str
nstr = replace(nstr,chr(0),"")
nstr = replace(nstr," ","")
nstr = replace(nstr,",","")
nstr = replace(nstr,"+","")
formatQueryStr = nstr
end function
keys = formatQueryStr(keys)
if keys<>"" then
so=request("so")
if so="bbs" or so="" then
jh="words like '%"&keys&"%'"
elseif so="title" then
jh="title like '%"&keys&"%'"
elseif so="name" then
jh="name like '%"&keys&"%'"
elseif so="jinghua" then
jh="good=True"
end if
end if
Dim ors
Set ors=new Cls_vbsPage	
Set ors.Conn=conn
With ors
.PageSize=bbipage	
.PageName=PageName	
.DbType="AC"			
.RecType=-1	
.JsUrl="inc/"
.Pkey="id"
.Field="id,hits,recount,title,name,time,rename,good,tops"
.Table="zhuti"	
.Condition=""&jh&""	
.OrderBy="tops asc,retime desc"
End With
Rs=ors.ResultSet()
%> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=bbsname%>-单版面版</title>
<link href="images/hotlt.css" rel="stylesheet" type="text/css">
</head>

<body><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="250" valign="top"><img src="images/bbslogo.jpg" ></td>
    <td width="538"><form name="form1" method="get" action="index.asp" style="margin:5px;">
	  <input name="q" type="text" id="q" value="<%=keys%>" size="30">
      <input type="submit" value=" 搜 索 ">
     
      <input name="so" type="radio" value="title" checked>
搜索标题
<input type="radio" name="so" value="name">
搜索作者
    </form></td>
    <td width="160" align="center"><%
if name= "" then
response.write"<A href='login.asp'>登录</A> | <A href='reg.asp'>注册</A>"
elseif name<> "" then
response.write name&" | <A href='exit.asp'>退出</A>"
end if
%></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="tit">
  <tr bgcolor="#E8F3FF">
    <td height="25" bgcolor="#FFF5F0">&gt;&gt; <%=keys%> </td>
    <td width="20%" bgcolor="#FFF5F0">本论坛共有主题 <FONT color=#ff0000><%=ors.RecordCount()%></FONT> 篇</td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40">&nbsp;<a href="#new"><img src="images/fatie.gif" width="72" height="24" border="0"></a> <a href="list.asp?so=jinghua"><img src="images/pic05.gif" width="52" height="24"border="0"></a> <a href="help.htm"><img src="images/pic09.gif" width="72" height="24" border="0"></a></td>
    <td width="20%">&nbsp;</td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr align="center" bgcolor="#E8F3FF">
        <td width="6%" height="30" bgcolor="#FFF5F0">阅读数</td>
        <td width="6%" bgcolor="#FFF5F0">回复数</td>
        <td bgcolor="#FFF5F0"><FONT color=#002f7d>主题</FONT></td>
        <td width="15%" bgcolor="#FFF5F0">作者</td>
        <td width="10%" bgcolor="#FFF5F0">时间</td>
        <td width="15%" bgcolor="#FFF5F0">最后回复</td>
      </tr>
    </table>   
<%
If IsNull(Rs) Then%>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr align="center">
          <td width="6%" height="30" class="list">0</td>
          <td width="6%" class="list">0</td>
          <td align="left" class="list">  欢迎来到 <font color=red><%=keys%></font> 吧!谢谢大家发出的每一帖,衷心祝福!</td>
          <td width="15%" class="list">管理员</td>
          <td width="10%" class="list"><%=date()%></td>
          <td width="15%" class="list">管理员</td>
        </tr>
      </table>
<%
Else     
    For i=0 To Ubound(Rs,2)%>
      <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr align="center">
          <td width="6%" height="30" class="list"><%
hits=Rs(1,i)
if hits > hothits then
response.write"<font color=red><b>"&hits&"</b></font>"
else
response.write hits
end if
%></td>
          <td width="6%" class="list"><%
recount=Rs(2,i)
if recount > hotrehits then
response.write"<font color=red><b>"&recount&"</b></font>"
else
response.write recount
end if
%></td>
          <td align="left" class="list"><%
if Rs(8,i)=True then
response.write"<font color=#ff0000>[置顶]</font>"
end if
%> <a href="show.asp?id=<%=Rs(0,i)%>"> <%=Rs(3,i)%></a> <%
if Rs(7,i)=True then
response.write"<font color=#ff0000>[精华]</font>" 
end if
%></td>
          <td width="15%" class="list"><%=Rs(4,i)%></td>
          <td width="10%" class="list"><%=FormatDateTime(Rs(5,i),2)%></td>
          <td width="15%" class="list"><%=Rs(6,i)%></td>
        </tr>
      </table>
<%
    Next	
End If
%> 
      <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFF5F0">
        <tr align="center">
          <td width="10%" height="30"><%ors.ShowPage()%></td>
        </tr>
      </table></td>
    <td width="20%" valign="top"><table width=165 border=0 align="center" cellpadding=0 cellspacing=0>
      <tr>
        <td width=165 align=center bgcolor="#F1E2DD"><b> </b></td>
      </tr>
    </table>
      <table width=165 border=0 align="center" cellpadding=0 cellspacing=0 bgcolor="#FFF5F0">
        <tr>
          <td  align=center><table width=139 border=0 cellpadding=0 cellspacing=0>
              <tr>
                <td height=11></td>
              </tr>
              <tr>
                <td><img src="<%=bbsimages%>"  border=0> </td>
              </tr>
              <tr>
                <td height=5></td>
              </tr>
            </table>
              <table width=139 border=0 cellpadding=0 cellspacing=0>
                <tr>
                  <td><%=bbsjianjie%></td>
                </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40"><br><form name="save" method="post" action="tzsave.asp" onSubmit="return regcheck(this);">
	<input name="words" type="hidden" id="words" value="<%=keys%>">
      <table width=99% border=0 align="center" cellpadding=0 cellspacing=0 bgcolor=#FFF5F0>
      <tr>
        <td><img src="images/pic19.gif" width="2" height="2" alt=""></td>
        <td background="images/pic20.gif"></td>
        <td><img src="images/pic21.gif" width="2" height="2" alt=""></td>
      </tr>
      <tr>
        <td background="images/pic22.gif" width="2"></td>
        <td align=center><table width=90% border=0 align="center" cellpadding=5 cellspacing=0 bgcolor=#FFF5F0>
            <tr>
              <td width="10%" align="right"><strong>标 题:</strong></td>
              <td><input name="title" type="text" id="title" size="50"></td>
            </tr>
            <tr>
              <td align="right" valign="top"><strong><a name="new"></a>内 容:</strong></td>
              <td><textarea name="content" cols="60" rows="5" id="content"></textarea>	
              <img src="images/pic16.gif" width="16" height="16" alt='图片说明' border=0>
              <a href=#hotlt onClick="javascript:document.save.content.value=document.save.content.value+'[img][/img] \n';">插入图片</a> <a href=#hotlt onClick="javascript:document.save.content.value=document.save.content.value+'[mp3][/mp3] \n';">插入MP3</a></td>
            </tr>
            <tr>
              <td align="right"><strong>图 片:</strong></td>
              <td><input name="image" type="text" id="image" size="60"></td>
            </tr>
            <tr>
              <td align="right"><strong>作 者:</strong></td>
              <td><%
if name= "" then
response.write"您目前是匿名发表 <A href='../userlogin.asp'>登录</A> | <A href='../zc.asp'>注册</A>"
elseif name<> "" then
response.write name&" | <A href='exit.asp'>退出</A>"
end if
%> </td>
            </tr>
		<%if name="" then%><tr>
              <td align="right"><strong>验证码:</strong></td>
              <td><input name="verify_code" type="text" id="verify_code" size="4" maxlength="4"> 
                <img src="inc/yzmi.asp"></td>
            </tr><%end if%>
            <tr>
              <td align="right"> </td>
              <td><input type="submit" name="Submit" value="发表帖子">
&nbsp;&nbsp;
            <input type="reset" name="Submit" value="重新填写"></td>
            </tr>
        </table></td>
        <td background="images/pic23.gif" width="2"></td>
      </tr>
      <tr>
        <td><img src="images/pic24.gif" width="2" height="2" alt=""></td>
        <td background="images/pic25.gif"></td>
        <td><img src="images/pic26.gif" width="2" height="2" alt=""></td>
      </tr>
    </table>
    <br>   </form> </td>
    <td width="20%"> </td>
  </tr>
</table>
<script language="JavaScript1.2">
function regcheck(formct){
	if (formct.title.value=='' ){
		alert('标题不能为空,请填写');
		return false; 
	}
		if (formct.content.value=='' ){
		alert('内容不能为空,请填写');
		return false; 
	}
		if (formct.verify_code.value=='' ){
		alert('验证码不能为空,请填写');
		return false; 
	}

	formct.Submit.disabled=true;
}
</script>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="#FFF5F0">图书馆系统 </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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