<% function GetIp() dim realip,proxy realip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") proxy = Request.ServerVariables("REMOTE_ADDR") if realip = "" then GetIp = proxy else GetIp = realip end if end function realip=GetIp() 'dim sql_PostDatas,sql_GetDatas,sql_Strs,sql_FilerStr,i 'sql_GetDatas = "exec|insert|select|delete|update|count|%|chr|mid|master|truncate|char|declare" 'sql_PostDatas = "'|{|}|[|]|\<|>|?|'|`|~|!|$|%|^|+" sql_GetDatas = "'|""|{|}|[|]|\|:|;|<|>|?|,|.|`|~|!|@|$|%|^|(|)|-|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|or" sql_PostDatas = "'|""|{|}|[|]|\|<|>|`|~|$|%|^|(|)" '??Get???? 'Response.write Request.QueryString If Request.QueryString<>"" Then sql_Strs = Split(sql_GetDatas,"|") For Each sql_FilerStr In Request.QueryString For i=0 To Ubound(sql_Strs) if instr(Request.QueryString(sql_FilerStr),sql_Strs(i))>0 Then Response.Write "" Response.End end if next Next End If '??Post???? If Request.Form<>"" Then sql_Strs = Split(sql_PostDatas,"|") For Each sql_FilerStr In Request.Form For i=0 To Ubound(sql_Strs) if instr(Request.Form(sql_FilerStr),sql_Strs(i))>0 Then Response.Write "" Response.End end if Next Next end if %> <% Dim DBC,Conn Set DBC = New DataBaseClass Set Conn = DBC.OpenConnection() Set DBC = Nothing %> <% Dim ClassID if Request("ClassID")<>"" or Request("user_news")<>"" then if Session("Name")="" then response.redirect"/index.html" end if ClassID = Request("ClassID") user_news= Request("user_news") num=Request("num") end if %> 新闻中心-中国资格考试网
<% Dim NewsSql,RsNewsObj,PicStr,News_For_Var 'NewsSql = "Select FS_News.*,FS_NewsClass.SaveFilePath,FS_NewsClass.ClassEName from FS_News LEFT OUTER JOIN FS_NewsClass ON FS_News.ClassID = FS_NewsClass.ClassID where FS_News.ClassID='" & ClassID & "' and FS_News.DelTF=0 order by FS_News.ID desc" if num<>"" then num=int(num) if num>2000 then num=2000 end if else num=2000 end if sh=1 if trim(request("sh"))<>"" then if int(trim(request("sh")))=0 then sh=0 end if end if if user_news<>"" then NewsSql = "Select top " & num & " FS_News.*,FS_NewsClass.SaveFilePath,FS_NewsClass.ClassEName,FS_News.DelTF from FS_News LEFT OUTER JOIN FS_NewsClass ON FS_News.ClassID = FS_NewsClass.ClassID where FS_News.DelTF=0 and user_news='" & user_news & "' and AuditTf=" & sh & " order by FS_News.ID desc" else NewsSql = "Select top " & num & " FS_News.*,FS_NewsClass.SaveFilePath,FS_NewsClass.ClassEName,FS_News.DelTF from FS_News LEFT OUTER JOIN FS_NewsClass ON FS_News.ClassID = FS_NewsClass.ClassID where FS_News.DelTF=0 and HeadNewsTF=0 and AuditTf=" & sh & " order by FS_News.ID desc" end if 'Response.Write(NewsSql) 'Response.End Set RsNewsObj = Server.CreateObject(G_FS_RS) RsNewsObj.Open NewsSql,Conn,1,1 if Not RsNewsObj.Eof then Dim News_Page_Size,News_Page_No,News_Page_Total,News_Record_All,ContentTypeStr News_Page_Size = 30 News_Page_No = Request.Querystring("News_Page_No") if News_Page_No <= 0 or News_Page_No = "" then News_Page_No = 1 RsNewsObj.PageSize = News_Page_Size News_Page_Total = RsNewsObj.PageCount if (Cint(News_Page_No) > News_Page_Total) then News_Page_No = News_Page_Total RsNewsObj.AbsolutePage = News_Page_No News_Record_All = RsNewsObj.RecordCount for News_For_Var = 1 to RsNewsObj.PageSize if RsNewsObj.Eof then Exit For if RsNewsObj("HeadNewsTF")<>"1" and RsNewsObj("PicNewsTF")<>"1" then PicStr = "blue/images/Info/WordNews.gif" ContentTypeStr = "1" elseif RsNewsObj("HeadNewsTF")="1" then PicStr = "blue/images/Info/TitleNews.gif" ContentTypeStr = "2" else PicStr = "blue/images/Info/PicNews.gif" ContentTypeStr = "3" end if if RsNewsObj("FileExtName") = "asp" then PicStr = "blue/images/Info/asp.gif" end If %> <%if RsNewsObj("AuditTF") = 0 then%> <%Else%> <%End if%> <% RsNewsObj.MoveNext Next end if %>
标题
时间
  " align="center"> /<%=RsNewsObj("ClassEName")%>/<%=RsNewsObj("FileName")%>.<%=RsNewsObj("FileExtName")%> target="_blank"><% = Left(RsNewsObj("Title"),40) %>
<% = RsNewsObj("AddDate") %>
未审核
<% = NewsPageStr %>
<% 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 = "位置:"& News_Page_No &"/"& News_Page_Total &"   " if News_Page_Total = 1 then NewsPageStr = NewsPageStr & " 首页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 上一页上一页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 下一页下一页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 尾页 " & Chr(13) & Chr(10) else if cint(News_Page_No) <> 1 and cint(News_Page_No) <> News_Page_Total then NewsPageStr = NewsPageStr & " 首页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 上一页上一页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 下一页下一页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 尾页 " & Chr(13) & Chr(10) elseif cint(News_Page_No) = 1 then NewsPageStr = NewsPageStr & " 首页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 上一页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 下一页下一页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 尾页 " & Chr(13) & Chr(10) else NewsPageStr = NewsPageStr & " 首页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 上一页上一页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 下一页下一页 " & Chr(13) & Chr(10) NewsPageStr = NewsPageStr & " 尾页 " & Chr(13) & Chr(10) end if end if End Function %>