国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

一個BBS的源代碼(二)

2019-11-18 22:33:34
字體:
來源:轉載
供稿:網友
' 打開數據庫
Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "asp" , application("ConASP_RuntimeUserName") , Application("ConASP_RuntimePassWord")

Set RecBBS = Server.CreateObject("ADODB.RecordSet")
Set RecReply = Server.CreateObject("ADODB.RecordSet")
Set RecMember = Server.CreateObject("ADODB.RecordSet")


%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=gb2312">
<TITLE>經驗交流</TITLE>
<STYLE TYPE="TEXT/CSS">
td {
color: #ffffff;
font-size: 9pt;
}
td.menu {
color: #000000;
background-color: #f0f0d0;
font-size: 12pt;
}
input {
color: #000000;
font-size: 9pt;
border-top: 1px solid;
border-left: 1px solid;
border-right: 1px solid;
border-bottom: 1px solid;
}
select {
color: #000000;
font-size: 9pt;
border-top: 1px solid;
border-left: 1px solid;
border-right: 1px solid;
border-bottom: 1px solid;
}
textarea {
color: #000000;
font-size: 9pt;
border-top: 1px solid;
border-left: 1px solid;
border-right: 1px solid;
border-bottom: 1px solid;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</STYLE>
</HEAD>
<BODY bgcolor=#c0c0c0>

<P>
<TABLE align=center valign=top bgColor=#d0d0d0 border=1 borderColorDark=#f0f0f0 borderColorLight=#505050 cellPadding=5 cellSpacing=0 width=600 height=400>
<TR>
<TD valign=top>
<%


Job = Request("Job")
If Job = "" Then Job = "List"

'==============================
Select Case Job
'==============================

'=============================
Case "List"
'==============================
' 顯示文章
%>

<TABLE align=center border=0 cellPadding=1 cellSpacing=0 width=650>
<TR>
<TD>
<TABLE WIDTH="100%" ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR=#f0f0d0>
<TR>
<TD class=menu valign=top>
<A href="/">飛林莊</A>-&gt;<A href="<%= ASP_FILE_NAME %>">經驗交流</A>
</TD>
<TD class=menu></TD>
<TD align=right class=menu>
<FORM action="<%= ASP_FILE_NAME %>" method=get>
<INPUT type=hidden name=Job value=List>
[<A href="<%= ASP_FILE_NAME %>?Job=Write">發表文章</A>][<A href="<%= ASP_FILE_NAME %>?Job=Apply">申請賬號</A>]
<INPUT id=Keyword maxLength=20 name=Keyword size=18>
<INPUT type=Submit value=主題搜索>
</FORM>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<TABLE align=center bgColor=#000000 border=0 cellPadding=1 cellSpacing=1 width=650>
<%

If Request("Keyword") <> "" Then KeyWord = Request("Keyword") Else KeyWord = ""

If Request("Page") = "" Then
If IsNumeric( session("BBS_Page") ) Then
Page = Int(Session("BBS_Page"))
Else
Page = 1
End If
Else
Page = Int(Request("Page"))
End If
If Page < 1 Then Page = 1

RecBBS.PageSize = ListSize

SQL = "SELECT * FROM bbs "
If KeyWord <> "" Then
SQL = SQL + "WHERE [題目] LIKE '%" & KeyWord & "%' "
End If
SQL = SQL + "ORDER BY [序號] DESC"
RecBBS.Open SQL , Con , 3

PageCount = RecBBS.PageCount
RecordCount = RecBBS.RecordCount

If Page > PageCount Then Page = PageCount

Session("BBS_Page") = Page

If Not RecBBS.EOF Then
%>
<TR>
<TD>作者</TD>
<TD>題目</TD>
<TD>回復</TD>
<TD>點擊</TD>
<TD>時間</TD></TR>
<%
RecBBS.AbsolutePage = Page
For iRec = 1 To ListSize
If Not RecBBS.EOF Then
%>
<TR>
<TD><%= Server.HTMLEncode( RecBBS.Fields("作者") ) %></TD>
<TD>
<A href="<%= ASP_FILE_NAME %>?Job=Content&Which=<%= RecBBS.Fields("序號") %><% If KeyWord <> "" Then Response.Write "&Keyword=" & KeyWord %>">
<%= Server.HTMLEncode( RecBBS.Fields("題目") ) %>
</A>
</TD>
<TD><%= Server.HTMLEncode( RecBBS.Fields("回復") ) %></TD>
<TD><%= Server.HTMLEncode( RecBBS.Fields("點擊") ) %></TD>
<TD><%= Server.HTMLEncode( RecBBS.Fields("時間") ) %></TD></TR>
</TR>
<%
RecBBS.MoveNext
Else
Response.Write " <TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>" & Chr(13)
End If
Next
Else
%>
No Record
<%
End If

RecBBS.Close

%>
</TABLE>
<TABLE align=center border=0 cellPadding=1 cellSpacing=0 width=650>
<TR>
<TD class="menu">
共有 <%= PageCount %> 頁 <%= RecordCount %> 篇文章
<%
If Page > 1 Then
Response.Write "<A href=""" & ASP_FILE_NAME & "?Job=List&Page=" & Page-1
If KeyWord <> "" Then Response.Write "&Keyword=" & KeyWord
Response.Write """>"
End If
%>
上一頁
<% If Page > 1 Then Response.Write "</A>" %>
<%
If Page < PageCount Then
Response.Write "<A href=""" & ASP_FILE_NAME & "?Job=List&Page=" & Page+1
If KeyWord <> "" Then Response.Write "&Keyword=" & KeyWord
Response.Write """>"
End If
%>
下一頁
<% If Page < PageCount Then Response.Write "</A>" %>
<A href="javascr轉到</A>第<INPUT id=Page name=Page size=4 maxlength=4 >頁
<% Response.Write Page & "/" & PageCount %>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>

<%

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 德令哈市| 韶山市| 松滋市| 科技| 霍城县| 宜丰县| 江都市| 繁昌县| 昆明市| 礼泉县| 中宁县| 社会| 贵德县| 河西区| 桐庐县| 德化县| 保德县| 墨竹工卡县| 台湾省| 盘山县| 贡嘎县| 承德市| 炎陵县| 右玉县| 柳江县| 肃北| 闸北区| 巨野县| 安龙县| 南部县| 福贡县| 临沂市| 奉化市| 钟山县| 武陟县| 普安县| 博客| 湾仔区| 新巴尔虎右旗| 饶河县| 胶南市|