1
<% option explicit %>
2
<%
3
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
4
'-=创建人: CMS
5
'-=日期: 2004-1-13 15:39
6
'-=描述: 自动发布
显示文章列表
7
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
8
%>
9
<%
10
Response.Buffer = true
11
%>
12
<!--#include virtual="/pubsystem/pubAdmin/_cmsCfg/_cmsCfg.asp"-->
13
<!--#include virtual="/pubsystem/pubAdmin/_cmsLib/asp/_cmsLib.asp"-->
14
<!--#include virtual="/pubsystem/pubAdmin/_cmsLib/asp/_cmsColumnLib.asp"-->
15
<%
16
dim U_ID,GUIDStr
17
U_ID = SESSION("U_ID")
18
GUIDStr = SESSION("GUIDStr")
19
20
dim columnId,ArticleId
21
22
ColumnId = getForm("ColumnId")
23
if (ColumnId = "") then
24
catchException(2)
25
end if
26
27
'身分验证
28
Call ConfirmUserRank(ColumnId)
29
30
31
'获得文章列表
32
dim sqlGetArticleList,sqlCount
33
sqlGetArticleList = "select articleid,articletitle,articledeliverdate,columnName from v_pubArticleInfo where Recommendcolumn = " & columnId & " And ArticleStateflag = 1 And columnStateFlag = 1 And ArticleDeliverDate <= getDate()"
34
sqlGetArticleList = ArticleListSql(sqlGetArticleList)
35
36
sqlGetArticleList = sqlGetArticleList & " order by RecommendOrder desc,ArticleDeliverDate desc,ArticleId desc"
37
38
sqlCount = "select count(*) from v_pubArticleInfo where Recommendcolumn = 252 And ArticleStateflag = 1 And ArticleDeliverDate <= getDate()"
39
sqlCount = ArticleListSql(sqlCount)
40
41
42
DB_Connect(DBString)
43
44
'得到当前栏目题图
45
dim sqlGetColumnPic,rsGetColumnPic
46
sqlGetColumnPic = "select ColumnDescribePic,ColumnName from tbl_PubColumnInfo where ColumnId = " & ColumnId
47
Set rsGetColumnPic = oConn.Execute(sqlGetColumnPic)
48
49
%>
50
<html>
51
<head>
52
<title> :: <% if((Not rsGetColumnPic.Eof) And (Not rsGetColumnPic.Bof)) then
53
Response.Write(Trim(rsGetColumnPic("ColumnName")))
54
end if %></title>
55
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
56
<link rel="stylesheet" type="text/css" href="/inc/style.css">
57
</head>
58
59
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
60
<center>
61
62
<!-- HEAD include: logo, mini navigator and main navigator -->
63
<!-- #include virtual="/inc/head.inc"-->
64
<table width="778" cellspacing="0" cellpadding="0" border="0" bgcolor="#ECECEC">
65
<tr>
66
<td colspan="2"><img src="/images/1ptrans.gif" border="0" width="1" height="10"></td>
67
</tr>
68
<tr>
69
<td width="192" align="center" valign="top" background="/images/inner_left_navi_bg.gif">
70
<table width="170" cellspacing="0" cellpadding="0" border="0" bgcolor="#FFFFFF">
71
<tr>
72
<td colspan="3"><img src="/images/inner_left_navi_head.gif" border="0"></td>
73
</tr>
74
<tr>
75
<td bgcolor="#3B3B3B"><img src="/images/1ptrans.gif" border="0" width="1" height="1"></td>
76
<td width="168" align="center">
77
<!-- Left navigation --><br>
78
<!--#include virtual="/inc/menu.asp"-->
79
</td>
80
<td bgcolor="#3B3B3B"><img src="/images/1ptrans.gif" border="0" width="1" height="1"></td>
81
</tr>
82
83
</table>
84
</td>
85
<td width="586" valign="top" background="/images/inner_left_main_bg.gif">
86
<!-- Core part Begin -->
87
<table width="574" cellspacing="0" cellpadding="0" border="0">
88
<tr>
89
<td><%
90
if((Not rsGetColumnPic.Eof) And (Not rsGetcolumnPic.Bof)) then
91
if(Not isNull(rsGetcolumnPic("ColumnDescribePic"))) then
92
Response.Write(unescape(Trim(rsGetcolumnPic("ColumnDescribePic"))))
93
end if
94
end if
95
96
Call DB_RSDisConnect(rsGetColumnPic)
97
%></td>
98
</tr>
99
<tr>
100
<td width="574" align="center">
101
<!-- Body content begin --><BR>
102
<table width="90%">
103
<%
104
' 分页显示结果集
105
Dim i, oRset
106
dim iPageNo : iPageNo= Request("pno")
107
if (iPageNo="") then iPageNo=1 else iPageNo= CInt(iPageNo)
108
109
dim iPageSize : iPageSize= MaxPerPage
110
111
set oRset = Server.CreateObject("ADODB.RecordSet")
112
oRset.PageSize = iPageSize
113
oRset.Open sqlGetArticleList, oConn, 1
114
dim iRecordSum : iRecordSum = oRset.RecordCount
115
dim iPageSum : iPageSum= ((iRecordSum-1)\iPageSize + 1)
116
if (not oRset.EOF) then
117
oRset.AbsolutePage = iPageNo
118
i=0
119
do while ((not oRset.EOF) and (i<iPageSize))
120
i= i+1
121
%>
122
<tr bgcolor="#FFFFFF">
123
<TD valign=top width=13><img src="/images/li.gif" border=0></TD>
124
<TD valign=top width=522><a href="/pubSystem/pubAdmin/switch.asp?ColumnId=<%= ColumnId %>&ArticleId=<%= Trim(oRset("ArticleId")) %>"><%= Trim(oRset("ArticleTitle")) %></a> (<%= CDate(oRset("ArticleDeliverDate")) %>)</td>
125
</tr>
126
<%
127
oRset.MoveNext
128
loop
129
end if
130
131
Call DB_RSDisConnect(oRset)
132
Call DB_DisConnect()
133
%>
134
</table>
135
<!-- Body content end -->
136
</td>
137
</tr>
138
</table>
139
<!-- Core part End -->
140
</td>
141
</tr>
142
143
<tr>
144
<td background="/images/inner_left_navi_bg.gif" align="center" valign="bottom">
145
<table width="170" cellspacing="0" cellpadding="0" border="0">
146
<tr>
147
<td bgcolor="#3B3B3B"><img src="/images/1ptrans.gif" border="0" width="1" height="3"></td>
148
</tr>
149
</table>
150
</td>
151
<td background="/images/inner_left_main_bg.gif"><br>
152
<table width="574" cellspacing="0" cellpadding="0" border="0">
153
<tr>
154
<td>
155
156
157
158
<TABLE width=100% align=center>
159
<TR>
160
<TD>
161
<FORM METHOD=POST ACTION="newslist.asp" style="margin:0px;" name="pgform">
162
<script language="JavaScript">
163
// 提交并返回指定页的结果
164
function openPage(aPageNo) {
165
var oForm= document.pgform;
166
if (isNaN(aPageNo) || aPageNo<1 || aPageNo><%= iPageSum %>) {
167
alert("需要介于1-<%= iPageSum %>之间的页码值");
168
return false;
169
}
170
oForm.pno.value=aPageNo;
171
oForm.submit();
172
return true;
173
}
174
</script>
175
<table width="75%" border="0" cellspacing="0" cellpadding="0" align=center>
176
<tr>
177
<td>共<%= iRecordSum %>条记录 </td>
178
<td align="right">
179
<table border="0" cellspacing="1" cellpadding="0" bgcolor="#cccccc">
180
<input type="hidden" name="pno" value="<%= iPageNo %>">
181
<input type="hidden" name="columnID" value="<%= columnID %>">
182
<tr>
183
<td bgcolor="#ececec" width=16 align=center>
184
<a href='#z' onClick='javascript:{<% if (iPageNo>1) then %>openPage(1);<% end if %>return false;}' title="首页"><img src="/images/img_jiantou_top.gif" border=0><!-- << --></a>
185
</td>
186
<%
187
' 计算需要显示的页码,前后各显示若干页
188
dim iPageNoStart, iPageNoEnd
189
dim iPageNoShowLimit : iPageNoShowLimit= 3 ' 配置:前后显示的页数
190
191
iPageNoStart= iPageNo-iPageNoShowLimit
192
iPageNoEnd = iPageNo+iPageNoShowLimit
193
if iPageNoStart<1 then
194
iPageNoStart=1
195
iPageNoEnd =1+iPageNoShowLimit*2
196
if iPageSum<iPageNoShowLimit*2+1 then
197
iPageNoEnd =iPageSum
198
end if
199
end if
200
if iPageNoEnd>iPageSum then
201
iPageNoStart=iPageSum-iPageNoShowLimit*2
202
iPageNoEnd =iPageSum
203
if iPageSum<iPageNoShowLimit*2+1 then
204
iPageNoStart=1
205
end if
206
end if
207
208
for i=iPageNoStart to iPageNoEnd
209
%>
210
<td bgcolor="<% if i=iPageNo then %>#0099CC<% else %>#ececec<% end if %>" width=16 align=center>
211
<a href='#z' onClick='javascript:{<% if (i<>iPageNo) then %>openPage("<%= i %>");<% end if %>return false;}' title="第<%= i %>页"><% if i=iPageNo then %><FONT COLOR="#FFFFFF"><%= i %></FONT> <%else Response.Write(i) end if%></a>
212
</td>
213
<%
214
next
215
%>
216
<td bgcolor="#ececec" width=16 align=center>
217
<a href='#z' onClick='javascript:{<% if (iPageNo<iPageSum) then %>openPage("<%= iPageSum %>");<% end if %>return false;}' title="末页"><img src="/images/img_jiantou_end.gif" border=0><!-- >> --></a>
218
</td>
219
</tr>
220
221
</table>
222
</td>
223
</tr>
224
</table>
225
</form>
226
</TD>
227
</TR>
228
</TABLE>
229
230
231
232
233
234
</td>
235
<td align="right"><a href="#top"><img src="/images/return_top.gif" border="0"></a></td>
236
</tr>
237
<tr>
238
<td bgcolor="#3B3B3B" colspan=2><img src="/images/1ptrans.gif" border="0" width="1" height="3"></td>
239
</tr>
240
</table>
241
</td>
242
</tr>
243
244
<tr>
245
<td colspan="2"><img src="/images/1ptrans.gif" border="0" width="1" height="10"></td>
246
</tr>
247
</table>
248
249
<!-- include: Company copyright -->
250
<!-- #include virtual="/inc/foot.inc" -->
251
252
</center>
253
</body>
254
</html>
<% option explicit %>2
<%3
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=4
'-=创建人: CMS5
'-=日期: 2004-1-13 15:396
'-=描述: 自动发布
显示文章列表7
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=8
%>9
<%10
Response.Buffer = true11
%>12
<!--#include virtual="/pubsystem/pubAdmin/_cmsCfg/_cmsCfg.asp"-->13
<!--#include virtual="/pubsystem/pubAdmin/_cmsLib/asp/_cmsLib.asp"-->14
<!--#include virtual="/pubsystem/pubAdmin/_cmsLib/asp/_cmsColumnLib.asp"-->15
<%16
dim U_ID,GUIDStr17
U_ID = SESSION("U_ID")18
GUIDStr = SESSION("GUIDStr")19
20
dim columnId,ArticleId21

22
ColumnId = getForm("ColumnId")23
if (ColumnId = "") then24
catchException(2) 25
end if26

27
'身分验证28
Call ConfirmUserRank(ColumnId)29
30
31
'获得文章列表32
dim sqlGetArticleList,sqlCount33
sqlGetArticleList = "select articleid,articletitle,articledeliverdate,columnName from v_pubArticleInfo where Recommendcolumn = " & columnId & " And ArticleStateflag = 1 And columnStateFlag = 1 And ArticleDeliverDate <= getDate()"34
sqlGetArticleList = ArticleListSql(sqlGetArticleList)35
36
sqlGetArticleList = sqlGetArticleList & " order by RecommendOrder desc,ArticleDeliverDate desc,ArticleId desc"37
38
sqlCount = "select count(*) from v_pubArticleInfo where Recommendcolumn = 252 And ArticleStateflag = 1 And ArticleDeliverDate <= getDate()"39
sqlCount = ArticleListSql(sqlCount)40
41
42
DB_Connect(DBString)43
44
'得到当前栏目题图45
dim sqlGetColumnPic,rsGetColumnPic46
sqlGetColumnPic = "select ColumnDescribePic,ColumnName from tbl_PubColumnInfo where ColumnId = " & ColumnId47
Set rsGetColumnPic = oConn.Execute(sqlGetColumnPic)48
49
%>50
<html>51
<head>52
<title> :: <% if((Not rsGetColumnPic.Eof) And (Not rsGetColumnPic.Bof)) then53
Response.Write(Trim(rsGetColumnPic("ColumnName")))54
end if %></title>55
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">56
<link rel="stylesheet" type="text/css" href="/inc/style.css">57
</head>58

59
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">60
<center>61

62
<!-- HEAD include: logo, mini navigator and main navigator -->63
<!-- #include virtual="/inc/head.inc"-->64
<table width="778" cellspacing="0" cellpadding="0" border="0" bgcolor="#ECECEC">65
<tr>66
<td colspan="2"><img src="/images/1ptrans.gif" border="0" width="1" height="10"></td>67
</tr>68
<tr>69
<td width="192" align="center" valign="top" background="/images/inner_left_navi_bg.gif">70
<table width="170" cellspacing="0" cellpadding="0" border="0" bgcolor="#FFFFFF">71
<tr>72
<td colspan="3"><img src="/images/inner_left_navi_head.gif" border="0"></td>73
</tr>74
<tr>75
<td bgcolor="#3B3B3B"><img src="/images/1ptrans.gif" border="0" width="1" height="1"></td>76
<td width="168" align="center">77
<!-- Left navigation --><br>78
<!--#include virtual="/inc/menu.asp"-->79
</td>80
<td bgcolor="#3B3B3B"><img src="/images/1ptrans.gif" border="0" width="1" height="1"></td>81
</tr>82

83
</table>84
</td>85
<td width="586" valign="top" background="/images/inner_left_main_bg.gif">86
<!-- Core part Begin -->87
<table width="574" cellspacing="0" cellpadding="0" border="0">88
<tr>89
<td><%90
if((Not rsGetColumnPic.Eof) And (Not rsGetcolumnPic.Bof)) then91
if(Not isNull(rsGetcolumnPic("ColumnDescribePic"))) then92
Response.Write(unescape(Trim(rsGetcolumnPic("ColumnDescribePic"))))93
end if94
end if95
96
Call DB_RSDisConnect(rsGetColumnPic) 97
%></td>98
</tr>99
<tr>100
<td width="574" align="center">101
<!-- Body content begin --><BR>102
<table width="90%">103
<%104
' 分页显示结果集105
Dim i, oRset106
dim iPageNo : iPageNo= Request("pno")107
if (iPageNo="") then iPageNo=1 else iPageNo= CInt(iPageNo)108

109
dim iPageSize : iPageSize= MaxPerPage110

111
set oRset = Server.CreateObject("ADODB.RecordSet")112
oRset.PageSize = iPageSize113
oRset.Open sqlGetArticleList, oConn, 1114
dim iRecordSum : iRecordSum = oRset.RecordCount115
dim iPageSum : iPageSum= ((iRecordSum-1)\iPageSize + 1)116
if (not oRset.EOF) then117
oRset.AbsolutePage = iPageNo118
i=0119
do while ((not oRset.EOF) and (i<iPageSize))120
i= i+1121
%>122
<tr bgcolor="#FFFFFF">123
<TD valign=top width=13><img src="/images/li.gif" border=0></TD>124
<TD valign=top width=522><a href="/pubSystem/pubAdmin/switch.asp?ColumnId=<%= ColumnId %>&ArticleId=<%= Trim(oRset("ArticleId")) %>"><%= Trim(oRset("ArticleTitle")) %></a> (<%= CDate(oRset("ArticleDeliverDate")) %>)</td>125
</tr> 126
<%127
oRset.MoveNext128
loop129
end if130

131
Call DB_RSDisConnect(oRset)132
Call DB_DisConnect()133
%>134
</table>135
<!-- Body content end -->136
</td>137
</tr>138
</table>139
<!-- Core part End -->140
</td>141
</tr>142

143
<tr>144
<td background="/images/inner_left_navi_bg.gif" align="center" valign="bottom">145
<table width="170" cellspacing="0" cellpadding="0" border="0">146
<tr>147
<td bgcolor="#3B3B3B"><img src="/images/1ptrans.gif" border="0" width="1" height="3"></td>148
</tr>149
</table>150
</td>151
<td background="/images/inner_left_main_bg.gif"><br>152
<table width="574" cellspacing="0" cellpadding="0" border="0">153
<tr>154
<td>155

156

157

158
<TABLE width=100% align=center>159
<TR>160
<TD>161
<FORM METHOD=POST ACTION="newslist.asp" style="margin:0px;" name="pgform">162
<script language="JavaScript">163
// 提交并返回指定页的结果164
function openPage(aPageNo) {165
var oForm= document.pgform;166
if (isNaN(aPageNo) || aPageNo<1 || aPageNo><%= iPageSum %>) {167
alert("需要介于1-<%= iPageSum %>之间的页码值");168
return false;169
}170
oForm.pno.value=aPageNo;171
oForm.submit();172
return true;173
}174
</script>175
<table width="75%" border="0" cellspacing="0" cellpadding="0" align=center>176
<tr>177
<td>共<%= iRecordSum %>条记录 </td>178
<td align="right">179
<table border="0" cellspacing="1" cellpadding="0" bgcolor="#cccccc">180
<input type="hidden" name="pno" value="<%= iPageNo %>">181
<input type="hidden" name="columnID" value="<%= columnID %>">182
<tr>183
<td bgcolor="#ececec" width=16 align=center>184
<a href='#z' onClick='javascript:{<% if (iPageNo>1) then %>openPage(1);<% end if %>return false;}' title="首页"><img src="/images/img_jiantou_top.gif" border=0><!-- << --></a>185
</td>186
<%187
' 计算需要显示的页码,前后各显示若干页188
dim iPageNoStart, iPageNoEnd189
dim iPageNoShowLimit : iPageNoShowLimit= 3 ' 配置:前后显示的页数190

191
iPageNoStart= iPageNo-iPageNoShowLimit192
iPageNoEnd = iPageNo+iPageNoShowLimit193
if iPageNoStart<1 then194
iPageNoStart=1195
iPageNoEnd =1+iPageNoShowLimit*2196
if iPageSum<iPageNoShowLimit*2+1 then197
iPageNoEnd =iPageSum198
end if199
end if200
if iPageNoEnd>iPageSum then201
iPageNoStart=iPageSum-iPageNoShowLimit*2202
iPageNoEnd =iPageSum203
if iPageSum<iPageNoShowLimit*2+1 then204
iPageNoStart=1205
end if206
end if207

208
for i=iPageNoStart to iPageNoEnd209
%>210
<td bgcolor="<% if i=iPageNo then %>#0099CC<% else %>#ececec<% end if %>" width=16 align=center>211
<a href='#z' onClick='javascript:{<% if (i<>iPageNo) then %>openPage("<%= i %>");<% end if %>return false;}' title="第<%= i %>页"><% if i=iPageNo then %><FONT COLOR="#FFFFFF"><%= i %></FONT> <%else Response.Write(i) end if%></a>212
</td>213
<%214
next215
%>216
<td bgcolor="#ececec" width=16 align=center>217
<a href='#z' onClick='javascript:{<% if (iPageNo<iPageSum) then %>openPage("<%= iPageSum %>");<% end if %>return false;}' title="末页"><img src="/images/img_jiantou_end.gif" border=0><!-- >> --></a>218
</td>219
</tr>220

221
</table>222
</td>223
</tr>224
</table>225
</form>226
</TD>227
</TR>228
</TABLE>229

230

231

232

233

234
</td>235
<td align="right"><a href="#top"><img src="/images/return_top.gif" border="0"></a></td>236
</tr>237
<tr>238
<td bgcolor="#3B3B3B" colspan=2><img src="/images/1ptrans.gif" border="0" width="1" height="3"></td>239
</tr>240
</table>241
</td>242
</tr>243

244
<tr>245
<td colspan="2"><img src="/images/1ptrans.gif" border="0" width="1" height="10"></td>246
</tr>247
</table>248

249
<!-- include: Company copyright -->250
<!-- #include virtual="/inc/foot.inc" -->251

252
</center>253
</body>254
</html>
浙公网安备 33010602011771号