JFIFC  JFIFC  JFIFC  JFIFC  JFIFC  Public Sub FreeResult(rs) On Error Resume Next rs.Close:Set rs = Nothing End Sub Function NewsList(num,classname,classtype,words,showdate) Dim strTemp,rsNews,sqlNews,strDate sqlNews = "select top "&num&" * from news where " If classType=1 Then sqlNews = sqlNews & " BigClassName='"&classname&"'" If classType=2 Then sqlNews = sqlNews & " SmallClassName='"&classname&"'" sqlNews = sqlNews & " order by AddDate desc,id desc" 'Response.Write sqlNews Set rsNews = Server.CreateObject("ADODB.RecordSet") rsNews.Open sqlNews,conn,1,1 If rsNews.BOF And rsNews.EOF Then strTemp = "..." Else Do While Not rsNews.EOF strDate = rsNews("AddDate") ' Response.Write CDate(strDate)+2 & "====
" ' Response.Write Datediff("d",Now(),CDate(strDate)+2) & "===="&Datediff("d",Now(),CDate(strDate)+2) >= 0&"
" ' Response.Write "---"&CDate(FormatDateTime(Now,2)) <= CDate(FormatDateTime(strDate,2)) + 2&"---" 'Response.End() ' If Datediff("d",Now(),CDate(strDate)+2) >= 0 Then '' strTemp = strTemp & "
  • " ' Else strTemp = strTemp & "
  • " ' End If If showdate=1 Then strTemp = strTemp & ""&Month(strDate)&"-"&Day(strDate)&"" End If ' If Datediff("d",Now(),CDate(strDate)+2) < 0 Then words = words + 8 strTemp = strTemp & "

    " strTemp = strTemp & gotTopic(rsNews("Title"),words)&"

    " 'If Datediff("d",Now(),CDate(strDate)+2) >= 0 Then strTemp = strTemp & " " ' If CInt(rsNews("Hits")) >= 200 Then strTemp = strTemp & " " strTemp = strTemp & "
  • "& vbCrlf strTemp = strTemp & "
  • "& vbCrlf If rsNews.EOF Then Exit Do rsNews.MoveNext Loop End If NewsList = strTemp End Function 'ַ Function getEncode(str) str = Trim(str) If str <> "" Then getEncode = Server.URLEncode(str) Else getEncode = str End If End Function Function NewsListt(num,classname,classtype,words,showdate) Dim strTemp,rsNews,sqlNews,strDate sqlNews = "select top "&num&" * from news where " If classType=1 Then sqlNews = sqlNews & " BigClassName='"&classname&"'" If classType=2 Then sqlNews = sqlNews & " SmallClassName='"&classname&"'" sqlNews = sqlNews & " order by AddDate desc,id desc" 'Response.Write sqlNews Set rsNews = Server.CreateObject("ADODB.RecordSet") rsNews.Open sqlNews,conn,1,1 If rsNews.BOF And rsNews.EOF Then strTemp = "..." Else Do While Not rsNews.EOF strDate = rsNews("AddDate") ' Response.Write CDate(strDate)+2 & "====
    " ' Response.Write Datediff("d",Now(),CDate(strDate)+2) & "===="&Datediff("d",Now(),CDate(strDate)+2) >= 0&"
    " ' Response.Write "---"&CDate(FormatDateTime(Now,2)) <= CDate(FormatDateTime(strDate,2)) + 2&"---" 'Response.End() ' If Datediff("d",Now(),CDate(strDate)+2) >= 0 Then '' strTemp = strTemp & "
  • " ' Else strTemp = strTemp & "
  • " ' End If If showdate=1 Then strTemp = strTemp & ""&Month(strDate)&"-"&Day(strDate)&"" End If ' If Datediff("d",Now(),CDate(strDate)+2) < 0 Then words = words + 8 strTemp = strTemp & "" strTemp = strTemp & gotTopic(rsNews("Title"),words)&"" strTemp = strTemp & "
  • "& vbCrlf If rsNews.EOF Then Exit Do rsNews.MoveNext Loop End If NewsListt = strTemp End Function 'html Function stripHTML(strHTML) Dim objRegExp, strOutput Set objRegExp = New Regexp objRegExp.IgnoreCase = True objRegExp.Global = True objRegExp.Pattern = "<.+?>|" 'Replace all HTML tag matches with the empty string strOutput = objRegExp.Replace(strHTML, "") 'Replace all < and > with < and > strOutput = Replace(strOutput, "<", "<") strOutput = Replace(strOutput, ">", ">") strOutput = Replace(strOutput, " ", "") stripHTML = strOutput 'Return the value of strOutput Set objRegExp = Nothing End Function 'ȡС Function getClass(ClassName) Dim strTemp If ClassName = "" Then Exit Function sql = "Select * from SmallClass Where BigClassName='"&ClassName&"' order by Smallclassid asc" 'Response.Write sql Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql,Conn,1,1 Do While Not rs.EOF SmallClassid = rs("SmallClassid") SmallClassName = rs("SmallClassName") BigClassId=conn.execute("select bigclassid from bigclass where BigClassName='"&ClassName&"'")(0) strTemp = strTemp & ""&SmallClassName&"< ʢ˻

     
    ˾

       >>

    ˾
    Ƶչʾ
    ʢ˻Ƶ
    Ʒչʾ
    ʢ˷