<!--#include file="Config.asp"-->
<!--#include file="Include/UBB.asp"-->
<%
Select Case Action
Case "ListJs"
Call ListJs()
Case "ListNews"
Call List()
End Select
Sub ListJs()
Dim i
i=1
Call OpenDatabase()
Set Rs=Conn.Execute("EXECUTE NetCom_Index_News")
If Rs.Eof Then
Response.Write ("document.write(""<B><center>公告数据初始化...</b></center>"")")
Else
While Not Rs.EOF
Response.Write ("document.write(""<b>"&i&"</b>.<a href='News.asp?Action=ListNews&Nid="&Rs(0)&"' target='_blank' Class='SoftMeun'>"&Rs(1)&"</a> ("&Month(Rs(2))&"/"&Day(Rs(2))&")<br>"")"&Chr(10))
Rs.MoveNext
i=i+1
Wend
End If
Rs.Close
Set Rs=Nothing
Call CloseDatabase()
End Sub
Sub List()
Dim Nid
Nid=Request.QueryString("Nid")
If Not(IsNumeric(Nid)) Or Nid="" Then
ErrInfo = ErrInfo&"<li>非法ID。</li>"
FoundErr=True
Call ErrorMsg()
Response.End
End If
Call OpenDatabase()
Set Rs=Conn.Execute("SELECT Title,Content,AddTime,Author FROM [News] WHERE Nid="&Nid&"")
If Rs.Eof Then
ErrInfo = ErrInfo&"<li>非法ID。</li>"
FoundErr=True
End If
If FoundErr Then
Call ErrorMsg()
Else
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Rs(0)%></title>
</head>

<body>
<table width="50%" border="1" align="center" cellpadding="2" cellspacing="0">
  <tr>
    <td><%=Rs(0)%></td>
  </tr>
  <tr>
    <td><%=UBBCode(Rs(1))%><br><%=Rs(3)%></td>
  </tr>
  <tr>
    <td>&nbsp;<%=Rs(2)%></td>
  </tr>
</table>
</body>
</html>
<%
Rs.Close
Set Rs=Nothing
Call CloseDatabase()
End If
End Sub%>