?? index.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"-->
<%
name=Request.Cookies("mctb_name")
keys=request("q")
keys = formatQueryStr(keys)
so=request("so")
if so="jinghua" then
jh="good=True"
elseif so="title" then
jh="title like '%"&keys&"%'"
elseif so="name" then
jh="name like '%"&keys&"%'"
end if
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.Open "Select sum(recount) as total From zhuti",conn,1,1
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">
<style type="text/css">
<!--
.STYLE1 {
color: #990000;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="247" align="left" valign="middle"><img src="images/bbslogo.jpg" width="180" height="50"></td>
<td width="751"><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="204" align="center"><%
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>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="tit">
<tr bgcolor="#E8F3FF">
<td height="25" bgcolor="#FFF5F0"> <a href="../index.asp">返回圖書館系統首頁</a> >> <a href="index.asp"><%=bbsname%></a> >> <%
if keys="" then
response.write "帖子列表"
else
response.write keys
end if
%></td>
<td width="30%" bgcolor="#FFF5F0">本共有主題 <FONT color=#ff0000><%=ors.RecordCount()%></FONT> 篇 / 回復 <FONT color=#ff0000><%=rs1("total")%></FONT> 篇 </td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40"> <a href="#new"><img src="images/fatie.gif" width="72" height="24" border="0"></a> <a href="index.asp?so=jinghua"><img src="images/pic05.gif" width="72" 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%"> </td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="99%" border="1" align="center" cellpadding="0" cellspacing="1" style="border-style:dashed; border-color:#FF9900">
<tr>
<td width="100%" height="30" style="border-style:none;"><table width="100%" 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></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> </td>
</tr>
<tr>
<td height=5></td>
</tr>
</table>
<table width=155 border=0 cellpadding=0 cellspacing=0>
<tr>
<td al align="center"><div style="padding:2px;font-size:12px"><%=bbsjianjie%></div></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);">
<table width=99% border=1 align="center" cellpadding=0 cellspacing=0 bordercolor="#FF9900" bgcolor=#FFF5F0 style="border-style:dashed">
<tr>
<td width="100%" height="100" style="border-style:none;"><table width=99% border=0 align="center" cellpadding=5 cellspacing=0 bgcolor=#FFF5F0>
<tr>
<td width="12%" align="right"><span class="STYLE1">標 題:</span></td>
<td width="88%"><input name="title" type="text" id="title" size="50"></td>
</tr>
<tr>
<td align="right" valign="top"><span class="STYLE1"><a name="new"></a>內 容:</span></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"><span class="STYLE1">圖 片:</span></td>
<td><input name="image" type="text" id="image" size="60"></td>
</tr>
<tr>
<td align="right"><span class="STYLE1">作 者:</span></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"><span class="STYLE1">驗證碼:</span></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 height="32" align="right"> </td>
<td><input type="submit" name="Submit" value="發表帖子">
<input type="reset" name="Submit" value="重新填寫"></td>
</tr>
</table></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">圖書館系統© 2008 免責聲明</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -