📄 newslist.asp
字号:
if SearchBeginTime <> "" and SearchEndTime <> "" then
If IsSqlDataBase=0 then
News_Search_Sql = News_Search_Sql & " and (AddDate between #" & SearchBeginTime & "# and #" & SearchEndTime & "#)"
DownLoad_Search_Sql = " and (AddTime between #" & SearchBeginTime & "# and #" & SearchEndTime & "#)"
Else
News_Search_Sql = News_Search_Sql & " and (AddDate between '" & SearchBeginTime & "' and '" & SearchEndTime & "')"
DownLoad_Search_Sql = " and (AddTime between '" & SearchBeginTime & "' and '" & SearchEndTime & "')"
End If
end if
end if
Case "News"
if SearchType <> "" then
if SearchType <> "" and SearchContent <> "" then
News_Search_Sql = " and " & SearchType & " like '%" & SearchContent & "%'"
DownLoad_Search_Sql = ""
end if
if SearchBeginTime <> "" and SearchEndTime <> "" then
If IsSqlDataBase=0 then
News_Search_Sql = News_Search_Sql & " and (AddDate between #" & SearchBeginTime & "# and #" & SearchEndTime & "#)"
Else
News_Search_Sql = News_Search_Sql & " and (AddDate between '" & SearchBeginTime & "' and '" & SearchEndTime & "')"
End If
DownLoad_Search_Sql = ""
end if
end if
Case "DownLoad"
if SearchType <> "" then
if SearchType <> "" and SearchContent <> "" then
News_Search_Sql = ""
DownLoad_Search_Sql = ""
end if
if SearchBeginTime <> "" and SearchEndTime <> "" then
News_Search_Sql = ""
If IsSqlDataBase=0 then
DownLoad_Search_Sql = " and (AddTime between #" & SearchBeginTime & "# and #" & SearchEndTime & "#)"
Else
DownLoad_Search_Sql = " and (AddTime between '" & SearchBeginTime & "' and '" & SearchEndTime & "')"
End If
end if
end if
Case Else
News_Search_Sql = ""
DownLoad_Search_Sql = ""
end Select
If Request.QueryString("Audit")="IsAuditTF" then
News_Search_Sql =News_Search_Sql & " and auditTF=1"
DownLoad_Search_Sql =News_Search_Sql & " and auditTF=1"
ElseIf Request.QueryString("Audit")="NoAuditTF" then
News_Search_Sql =News_Search_Sql & " and auditTF=0"
DownLoad_Search_Sql =News_Search_Sql & " and auditTF=0"
Else
End If
%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#999999">
<tr bgcolor="#EEEEEE">
<td height="26" colspan="5" valign="middle">
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width=55 align="center" alt="添加栏目" onClick="top.GetEkMainObject().location='ClassAdd.asp?ParentID=<% = ClassID %>';" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">添加栏目</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="添加内容" onClick="ShowAddMenu();" onMouseMove="BtnMouseOver(this);//ShowAddMenu();" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">添加内容</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="下载列表" onClick="top.GetEkMainObject().location='DownloadList.asp?ClassID=<% = ClassID %>';" onMouseMove="BtnMouseOver(this);//ShowAddMenu();" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">下载列表</td>
<td width=2 class="Gray">|</td>
<%If sHaveValueTF = True then%>
<td width=55 align="center" alt="商品列表" onClick="top.GetEkMainObject().location='ProductList.asp?ClassID=<% = ClassID %>';" onMouseMove="BtnMouseOver(this);//ShowAddMenu();" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">商品列表</td>
<td width=2 class="Gray">|</td>
<%End If%>
<td width=45 align="center" alt="显示已审核内容" onClick="auditcontent();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">已审核</td>
<td width=2 class="Gray">|</td>
<td width=45 align="center" alt="显示未审核内容" onClick="noauditcontent();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">未审核</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="审核" onClick="Audit(true);" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">审核</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="取消审核" onClick="Audit(false);" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">取消审核</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="加入专题" onClick="AddToSpecial();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">加入专题</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="加入JS" onClick="AddToJS();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">加入JS</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="评论管理" onClick="ReviewManage();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">评论管理</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="预览" onClick="PreviewNews();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">预览</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="搜索" onClick="ShowSearchArea();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">搜索</td>
<td width=2 class="Gray" style="display:none">|</td>
<td width=55 align="center" style="display:none" alt="取消搜索"onClick="CancelSearch();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">取消搜索</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="后退" onClick="top.GetEkMainObject().history.back();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">后退</td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" height="95%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="5" height="2"></td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="40%" height="26" class="ButtonListLeft"> <div align="center">名称</div></td>
<td nowrap class="ButtonList"> <div align="center">属性</div></td>
<td width="4%" nowrap class="ButtonList"> <div align="center">点击次数</div></td>
<td width="10%" height="26" class="ButtonList"> <div align="center">状态</div></td>
<td width="20%" height="26" class="ButtonList"> <div align="center">时间</div></td>
<td width="15%" class="ButtonList"> <div align="center">操作</div></td>
</tr>
<%
'========================================
'2005-11-15 17:30修改
Dim News_Page_Size,News_Page_No,News_Page_Total,News_Record_All,ContentTypeStr
News_Page_Size = 20
News_Page_No = Request.Querystring("News_Page_No")
if News_Page_No <= 0 or News_Page_No = "" then News_Page_No = 1
Dim CountLastNum,CountSql,CountID
News_Record_All=Conn.execute("Select Count(ID) from FS_News where ClassID='" & ClassID & "' and DelTF=0 " & News_Search_Sql)(0)
News_Page_Total=int(News_Record_All/News_Page_Size)
If News_Page_Total-News_Record_All/News_Page_Size<>0 then News_Page_Total=News_Page_Total+1
If News_Page_No=1 then
CountSql=""
ElseIf Clng(News_Page_No)<=CLng(News_Page_Total/2) Then
CountSql=" and id<(Select min(id) from (select top "&(News_Page_No-1)*News_Page_Size&" id from FS_News where ClassID='" & ClassID & "' and DelTF=0 " & News_Search_Sql &" order by id desc) as T)"
Else
CountLastNum=News_Page_Size-(News_Page_Size*News_Page_Total-News_Record_All)
CountSql=" and id<=(Select max(id) from (select top "&(News_Page_Total-News_Page_No)*News_Page_Size+CountLastNum&" id from FS_News where ClassID='" & ClassID & "' and DelTF=0 " & News_Search_Sql &" order by id ) as T)"
End If
Dim NewsSql,RsNewsObj,PicStr,StrType
NewsSql = "Select top "& News_Page_Size &" * from FS_News where ClassID='" & ClassID & "' and DelTF=0 " & News_Search_Sql &CountSql&" order by ID desc"
'===========================================
Set RsNewsObj = Server.CreateObject(G_FS_RS)
RsNewsObj.Open NewsSql,Conn,1,1
do While Not RsNewsObj.Eof
if RsNewsObj("HeadNewsTF")<>"1" and RsNewsObj("PicNewsTF")<>"1" then
PicStr = "../../Images/Info/WordNews.gif"
ContentTypeStr = "1"
elseif RsNewsObj("HeadNewsTF")="1" then
PicStr = "../../Images/Info/TitleNews.gif"
ContentTypeStr = "2"
else
PicStr = "../../Images/Info/PicNews.gif"
ContentTypeStr = "3"
end if
if RsNewsObj("FileExtName") = "asp" then
PicStr = "../../Images/Info/asp.gif"
end If
StrType=""
If ContentTypeStr="3" then
If RsNewsObj("FilterNews")="1" then StrType=StrType+"|幻"
If RsNewsObj("ClassicalNewsTF")="1" then StrType=StrType+"|精"
If RsNewsObj("FocusNewsTF")="1" then StrType=StrType+"|焦"
End If
If StrType<>"" then StrType="<Font color=red>"&StrType&"</font>"
If RsNewsObj("HeadNewsTF")="1" then StrType=StrType+"<font color=green>|标</font>"
If RsNewsObj("MarqueeNews")="1" then StrType=StrType+"<font color=green>|滚</font>"
If RsNewsObj("SBSNews")="1" then StrType=StrType+"<font color=green>|并</font>"
If RsNewsObj("ProclaimNews")="1" then StrType=StrType+"<font color=green>|公</font>"
If RsNewsObj("TodayNewsTF")="1" then StrType=StrType+"<font color=green>|头</font>"
If RsNewsObj("RecTF")="1" then StrType=StrType+"<font color=green>|荐</font>"
If StrType="" and RsNewsObj("PicNewsTF")="1" then StrType="图片新闻"
If StrType="" and RsNewsObj("PicNewsTF")="0" then StrType="文字新闻"
%>
<tr onMouseOver="//this.style.backgroundColor='#F3F3F3';this.style.color='red'" onMouseOut="//this.style.backgroundColor='';this.style.color=''">
<td nowrap> <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="<% = PicStr %>"></td>
<td nowrap><span ContentTypeStr="<% = ContentTypeStr %>" AuditTF="" class="TempletItem" ContentID="<% = RsNewsObj("NewsID") %>" align="center">
<% = Left(RsNewsObj("Title"),26) %>
</span> </td>
</tr>
</table></td>
<td nowrap> <div align="center"><%=StrType%></div></td>
<td nowrap> <div align="center"><font color=#ff0000><%=RsNewsObj("ClickNum")%></font></div></td>
<td nowrap> <div align="center">
<% if RsNewsObj("AuditTF") = "1" then
response.Write("<font color=blue>已审批</font>")
else
response.Write("<font color=red>未审批</font>")
end if
%>
</div></td>
<td nowrap> <div align="center">
<% = RsNewsObj("AddDate") %>
</div></td>
<%if RsNewsObj("AuditTF") = 0 then%>
<td align="center" nowrap onClick="AuditOneContent('<%=RsNewsObj("NewsID")%>','')" style="cursor:hand;">审核</td>
<%Else%><td align="center" nowrap onClick="UnAuditOneContent('<%=RsNewsObj("NewsID")%>','')" style="cursor:hand;">取消审核</td>
<%End if%>
</tr>
<%
RsNewsObj.MoveNext
Loop
%>
</table>
</td>
</tr>
<tr>
<td height="20" class="ButtonListLeft">
<table width="100%" height="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td height="26" align="right"><% = NewsPageStr %> </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<div id="AddContentMenu" class="menu" onMouseOver="MouseOverRightMenu();" onMouseOut="MouseOverRightMenu();" onClick="ClickMenu(this);" style="display:none;">
<table width="100%;" height="80" border="0" cellspacing="0" cellpadding="0" bgcolor="#eeeeee">
<tr align="center">
<td height="20" style="cursor:hand;" ExeFunction="top.GetEkMainObject().location='NewsWords.asp?ClassID='+ClassID;">文字新闻</td>
</tr>
<tr align="center">
<td height="20" ExeFunction="top.GetEkMainObject().location='NewsPic.asp?ClassID='+ClassID;">图片新闻</td>
</tr>
<tr align="center">
<td height="20" ExeFunction="top.GetEkMainObject().location='NewsTitle.asp?ClassID='+ClassID;">标题新闻</td>
</tr>
<tr align="center">
<td height="20" ExeFunction="top.GetEkMainObject().location='DownLoad.asp?ClassID='+ClassID;">下 载</td>
</tr>
<%if sHaveValueTF = True then%>
<tr align="center">
<td height="20" ExeFunction="top.GetEkMainObject().location='../mall/mall_addProducts.asp?ClassID='+ClassID;">商 品</td>
</tr>
<%End if%>
</table>
</div>
<%
Set RsNewsObj = Nothing
Set Conn = Nothing
Function GetNewsOptionValue(Flag,FieldName)
Dim GetLocation,CheckLength
Dim CheckArray ,i
GetLocation = 0
CheckArray = Array("type","contribution","audit","deleted","link","rec","sbs","marquee","bulletin","filter","focus","classical","today","showreview","reviewtf")
for i = LBound(CheckArray) to UBound(CheckArray)
if CheckArray(i) = FieldName then
GetLocation = i
end if
Next
CheckLength = UBound(CheckArray) + 1 - GetLocation
if Not IsNull(Flag) then
if GetLocation > 0 then
if Len(Flag) < CheckLength then
GetNewsOptionValue = ""
else
GetNewsOptionValue = Mid(Flag,1,GetLocation)
end if
else
GetNewsOptionValue=""
end if
else
GetNewsOptionValue=""
end if
End Function
Function NewsPageStr()
NewsPageStr = "共有记录数:<b>"&News_Record_All&"</b> 当前位置:<b>"& News_Page_No &"</b>/<b>"& News_Page_Total &"</b> "
if News_Page_Total = 1 then
NewsPageStr = NewsPageStr & " <img src=""../../images/FirstPage.gif"" border=0 alt=首页> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <img src=""../../images/prePage.gif"" border=0 alt=上一页> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <img src=""../../images/nextPage.gif"" border=0 alt=下一页> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <img src=""../../images/endPage.gif"" border=0 alt=尾页> " & Chr(13) & Chr(10)
else
if CLng(News_Page_No) <> 1 and CLng(News_Page_No) <> News_Page_Total then
NewsPageStr = NewsPageStr & " <span onclick=""ChangePageNO('1','News_Page_No');"" style=""cursor:hand;""><img src=""../../images/FirstPage.gif"" border=0 alt=首页></span> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <span onclick=""ChangePageNO('" & News_Page_No - 1 & "','News_Page_No');"" style=""cursor:hand;""><img src=../../images/prePage.gif border=0 alt=上一页></span> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <span onclick=""ChangePageNO('" & News_Page_No + 1 & "','News_Page_No');"" style=""cursor:hand;""><img src=../../images/nextPage.gif border=0 alt=下一页></span> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <span onclick=""ChangePageNO('" & News_Page_Total & "','News_Page_No');"" style=""cursor:hand;""><img src=../../images/endPage.gif border=0 alt=尾页></span> " & Chr(13) & Chr(10)
elseif CLng(News_Page_No) = 1 then
NewsPageStr = NewsPageStr & " <img src=../../images/FirstPage.gif border=0 alt=首页> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <img src=../../images/prePage.gif border=0 alt=上一页> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <span onclick=""ChangePageNO('" & News_Page_No + 1 & "','News_Page_No');"" style=""cursor:hand;""><img src=../../images/nextPage.gif border=0 alt=下一页></span> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <span onclick=""ChangePageNO('" & News_Page_Total & "','News_Page_No');"" style=""cursor:hand;""><img src=../../images/endpage.gif border=0 alt=尾页></span> " & Chr(13) & Chr(10)
else
NewsPageStr = NewsPageStr & " <span onclick=""ChangePageNO('1','News_Page_No');"" style=""cursor:hand;""><img src=../../images/FirstPage.gif border=0 alt=首页></span> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <span onclick=""ChangePageNO('" & News_Page_No - 1 & "','News_Page_No');"" style=""cursor:hand;""><img src=../../images/prePage.gif border=0 alt=上一页></span> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <img src=../../images/nextPage.gif border=0 alt=下一页></span> " & Chr(13) & Chr(10)
NewsPageStr = NewsPageStr & " <img src=../../images/endpage.gif border=0 alt=尾页> " & Chr(13) & Chr(10)
end if
NewsPageStr = NewsPageStr & " <select name=page onChange=""MM_jumpMenu('parent.frames[\'fs_main\']',this,0)"">" & Chr(13) & Chr(10)
Dim i
For i = 1 to News_Page_Total
NewsPageStr = NewsPageStr & "<option value='NewsList.asp?ClassID="&ClassID&"&News_Page_No="&i&"'"
if News_Page_No = i then
NewsPageStr = NewsPageStr & " selected"
end if
NewsPageStr = NewsPageStr & ">"&i&"</option>" & Chr(13) & Chr(10)
Next
NewsPageStr = NewsPageStr & "</select>" & Chr(13) & Chr(10)
end if
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -