<!--#Include File="Inc/Const.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD><TITLE><%=fl.Setup(0)%> >> 公司新闻</TITLE>
<meta name="keywords" content="<%=fl.Setup(2)%>" />
<meta name="description" content="<%=fl.Setup(3)%>" />
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="img/Css.css" type=text/css rel=stylesheet>
<Script language='javascript' src='Inc/huajs.js'></Script>
</HEAD>
<BODY>
<!--#INCLUDE FILE="Top.asp" -->
<table width="910" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="3"></td>
  </tr>
</table>
<table width="970" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="240" valign="top"><!--#INCLUDE FILE="left1.asp" --></td>
    <td width="5"></td>
    <td width="2" bgcolor="#DAE0C9"></td>
    <td width="5"></td>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"></td>
      </tr>
    </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="255" height="52" background="newimgs/pro3.jpg" class=title2>新闻动态</td>
            <td width="600" background="newimgs/pro3bg.jpg">&nbsp;</td>
          </tr>
        </table>
        <table width="98%" align="center">
          <tr>
            <td valign="top"><%Call shownewslist(30,60)
Sub shownewslist(n, l)
Dim show_newslist, rs, sql
dim isgood,strC
Dim totalPut
Dim Num, classid, flname, keyword, sqlstr
Dim strFileName, currentPage, MaxPerPage, rst, goToUrl
MaxPerPage = CInt(n)
keyword = fl.ReplaceBadChar(Trim(Request("keyword")))
classid = Trim(Request("classid"))
If Request("page") <> "" Then
    currentPage = CLng(Request("page"))
Else
    currentPage = 1
End If
isgood=Request("isgood")
if isgood="1" Then
   isgood=1
else
  isgood=0
end if
   If keyword <> "" Then
sqlstr = " and ( title like '%" & keyword & "%')"
Else
sqlstr = ""
End If

If classid = "" Or Not IsNumeric(classid) Then
classid = 0
Else
classid = CLng(classid)
End If

strFileName = "" & fl_WebDir & "News.asp?classid=" & classid & "&keyword=" & keyword & "&isgood="&isgood&""

'=============================================================================================================================
show_newslist = "<script language=""javascript"">"
show_newslist = show_newslist & "function checkadd()"
show_newslist = show_newslist & "{"
show_newslist = show_newslist & "if (document.forms.keyword.value=='')"
show_newslist = show_newslist & "{alert('请输入搜索关键字');"
show_newslist = show_newslist & "document.forms.keyword.focus();"
show_newslist = show_newslist & "return false"
show_newslist = show_newslist & "}"
show_newslist = show_newslist & "}"
show_newslist = show_newslist & "</script>"
show_newslist = show_newslist & "<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0' height=30>"
show_newslist = show_newslist & "<form id='forms' name='forms' method='post' action='" & fl_WebDir & "News.asp?classid=" & classid & "' onSubmit='return checkadd()'>"
show_newslist = show_newslist & "<tr><td align=right width=100>标题关键字：&nbsp;</td><td align=left width=300>"
show_newslist = show_newslist & "<input name='keyword' type='text' id='keyword' size='18' maxlength='20' value='" & keyword & "' class=wenbenkuang />"
show_newslist = show_newslist & "&nbsp;<input type='submit' name='Submit' value='搜索' class=wenbenkuang />"
show_newslist = show_newslist & "</td><td>"
if isgood=0 Then
show_newslist = show_newslist & "<a href=News.asp?classid=" & classid & "&keyword=" & keyword & "&isgood=1>推荐文章</a>"
else
show_newslist = show_newslist & "<a href=News.asp?classid=" & classid & "&keyword=" & keyword & "&isgood=0>所有文章</a>"
end if
show_newslist = show_newslist & "</td></tr></form><tr><td colspan=6><hr color=#e4e4e4 size=0></td></tr></table>"
Response.Write(show_newslist)

show_newslist="<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>"&vbcrlf
show_newslist=show_newslist+"<TBODY>"&vbcrlf

if classid>0 then
set rs=fl.execute("select * from Fl_Class where instr(','+ParentPath+',',',"&classid&",')>0")
	strC="0"
	do until rs.eof
	strC=strC&","&rs("ClassID")
	rs.movenext
	loop
set rs=nothing
    if strC="0" Then
	   sqlstr= sqlstr &" and Classid="&classid&" "
	else
	sqlstr=sqlstr &" and Classid in ("&classid&","&strC&") "
	end if
else
sqlstr=sqlstr
end if

if isgood=1 Then sqlstr= sqlstr & "And IsGood=1 "

If Not IsObject(Conn) Then ConnectionDatabase
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select id,title,author,ispic,hits,adddate,IsGood from Fl_News where Passed=1 " & sqlstr & " order by id desc"
rs.open sql, Conn, 1, 1
fl.SqlQueryNum = fl.SqlQueryNum + 1
If rs.EOF Then
totalPut = 0
show_newslist = show_newslist & "     <tr><td>还没有资讯消息……</td></tr>"
Else
    totalPut = rs.recordcount
    
    If currentPage < 1 Then
        currentPage = 1
    End If
    If (currentPage - 1) * MaxPerPage > totalPut Then
        If (totalPut Mod MaxPerPage) = 0 Then
            currentPage = totalPut \ MaxPerPage
        Else
            currentPage = totalPut \ MaxPerPage + 1
        End If
    End If
    If currentPage = 1 Then
        Num = 0
        Do While Not rs.EOF
        show_newslist=show_newslist+"<TR>"&vbcrlf
       show_newslist=show_newslist+"<TD width=""4%"" height=28>&nbsp;&nbsp;<IMG height=12 src=""Images/dian.gif"" width=12>&nbsp;</TD>"&vbcrlf
       show_newslist=show_newslist+"<TD width=""75%"">"&vbcrlf
        If rs(6) = 1 Then show_newslist = show_newslist & "[<font color=red>荐</font>]"
        If rs(3) = 1 Then
        show_newslist = show_newslist & "<font color=blue>[图文]</font>&nbsp;"
        End If
  
        goToUrl = "" & fl_WebDir & "ShowNews.asp?id=" & rs(0) & ""

        
        show_newslist = show_newslist & "<a href='" & goToUrl & "' title='" & fl.Replacehtml(rs(1)) & "' target=_blank>" & fl.gotTopic(rs(1), CInt(l)) & "</a>"
		 show_newslist=show_newslist+"</td><TD width=""21%"">"&vbcrlf
		 
        show_newslist = show_newslist & "&nbsp;&nbsp;[" & FormatDateTime(rs(5), 2) & "]"
		
		show_newslist=show_newslist+"</TD>"
        show_newslist=show_newslist+"</TR>"
        Num = Num + 1
        If Num >= MaxPerPage Then Exit Do
        rs.movenext
        Loop
        
    Else
        If (currentPage - 1) * MaxPerPage < totalPut Then
            rs.Move (currentPage - 1) * MaxPerPage
            Dim bookmark
            bookmark = rs.bookmark
        Num = 0
        Do While Not rs.EOF
               show_newslist=show_newslist+"<TR>"&vbcrlf
       show_newslist=show_newslist+"<TD width=""3%"" height=22>&nbsp;&nbsp;<IMG height=5 src=""Images/blackspot.gif"" width=5>&nbsp;</TD>"&vbcrlf
       show_newslist=show_newslist+"<TD width=""97%"">"&vbcrlf
        If rs(6) = 1 Then show_newslist = show_newslist & "[<font color=red>荐</font>]"
        If rs(3) = 1 Then
        show_newslist = show_newslist & "<font color=blue>[图文]</font>&nbsp;"
        End If
  
        goToUrl = "" & fl_WebDir & "ShowNews.asp?id=" & rs(0) & ""

        
        show_newslist = show_newslist & "<a href='" & goToUrl & "' title='" & fl.Replacehtml(rs(1)) & "' target=_blank>" & fl.gotTopic(rs(1), CInt(l)) & "</a>"
        show_newslist = show_newslist & "&nbsp;&nbsp;[" & FormatDateTime(rs(5), 2) & "]"
		if datediff("d",rs(5),Now())=<3 Then
           show_newslist = show_newslist+"<img src=""Images/new.gif"" border=0 alt='最新资讯'>"
        End if
		show_newslist=show_newslist+"<BR></TD>"
        show_newslist=show_newslist+"</TR>"
        Num = Num + 1
        If Num >= MaxPerPage Then Exit Do
        rs.movenext
        Loop
          
        Else
            currentPage = 1
        Num = 0
        Do While Not rs.EOF
        show_newslist=show_newslist+"<TR>"&vbcrlf
       show_newslist=show_newslist+"<TD width=""4%"" height=28>&nbsp;&nbsp;<IMG height=12 src=""Images/dian.gif"" width=12>&nbsp;</TD>"&vbcrlf
       show_newslist=show_newslist+"<TD width=""75%"">"&vbcrlf
        If rs(6) = 1 Then show_newslist = show_newslist & "[<font color=red>荐</font>]"
        If rs(3) = 1 Then
        show_newslist = show_newslist & "<font color=blue>[图文]</font>&nbsp;"
        End If
  
        goToUrl = "" & fl_WebDir & "ShowNews.asp?id=" & rs(0) & ""

        
        show_newslist = show_newslist & "<a href='" & goToUrl & "' title='" & fl.Replacehtml(rs(1)) & "' target=_blank>" & fl.gotTopic(rs(1), CInt(l)) & "</a>"
		 show_newslist=show_newslist+"</td><TD width=""21%"">"&vbcrlf
		 
        show_newslist = show_newslist & "&nbsp;&nbsp;[" & FormatDateTime(rs(5), 2) & "]"
		
		show_newslist=show_newslist+"</TD>"
        show_newslist=show_newslist+"</TR>"
        Num = Num + 1
        If Num >= MaxPerPage Then Exit Do
        rs.movenext
        Loop
            
        End If
    End If
End If
rs.Close
Set rs = Nothing
show_newslist = show_newslist & "</TBODY></TABLE>"
show_newslist = show_newslist & fl.showpage(strFileName, totalPut, MaxPerPage, currentPage, True, True, "条资讯")

Response.Write(show_newslist)
End Sub
		  %>
            </td>
          </tr>
        </table></td>
  </tr>
</table>
<!--#include file="Bottom.asp"-->
</BODY></HTML>
<%
Set fl=nothing
Call CloseDatabase()
%>