他没发全 给你看着个
<!--#include file = "../Include/DBClass.inc.asp"-->
<%
Dim T_CataID, T_Attr, T_ChildCata, T_Style, T_RowNum, T_ColNum, T_TitleNum, T_TitleCSS, T_ContentNum, T_ContentCSS, T_LineSpace, T_More, T_MoreCSS, T_DateType, T_Postfix, T_Align, T_New, T_NaviPic, T_OpenMode, T_ShowClick
T_CataID = GetSafeStr(Trim(Request("Cataid")))
If T_CataID = "" Then T_CataID = "A"
T_Attr = GetSafeInt(Trim(Request("Attr")),0)
T_ChildCata = GetSafeInt(Trim(Request("ChildCata")),0)
T_Style = GetSafeInt(Trim(Request("Style")),1)
T_RowNum = GetSafeInt(Trim(Request("RowNum")),6)
T_ColNum = GetSafeInt(Trim(Request("ColNum")),1)
T_TitleNum = GetSafeInt(Trim(Request("TitleNum")),15)
T_TitleCSS = GetSafeStr(Trim(Request("TitleCSS")))
If T_TitleCSS = "" Then T_TitleCSS = "tt1"
T_ContentNum = GetSafeInt(Trim(Request("ContentNum")),30)
T_ContentCSS = GetSafeStr(Trim(Request("ContentCSS")))
If T_ContentCSS = "" Then T_ContentCSS = "font_h_14"
T_LineSpace = GetSafeInt(Trim(Request("Line_H")),24)
T_More = GetSafeInt(Trim(Request("More")),0)
T_MoreCSS = GetSafeStr(Trim(Request("MoreCSS")))
If T_MoreCSS = "" Then T_MoreCSS = "tt2"
T_DateType = GetSafeInt(Trim(Request("Date")),0)
T_Postfix = GetSafeStr(Trim(Request("Postfix")))
If T_Postfix = "" Then T_Postfix = "gray"
T_Align = GetSafeInt(Trim(Request("Align")),0)
T_New = GetSafeInt(Trim(Request("New")),0)
T_NaviPic = GetSafeInt(Trim(Request("NaviPic")),0)
T_OpenMode = GetSafeInt(Trim(Request("OpenMode")),1)
T_ShowClick = GetSafeInt(Trim(Request("Click")),0)
Dim dRs, dSql, Flag
Set dRs = Server.CreateObject( "ADODB.Recordset" )
dSql = "SELECT * FROM DdsCata WHERE C_RootID LIKE '"&T_CataID&"%'"
dRs.Open dSql, oConn, 0, 1
If dRs.EOF Then
Flag = 1
End If
dRs.Close
Set dRs = Nothing
Dim TempContent
TempContent="<table cellspacing='0' cellpadding='0' width='96%' align='center' border='0'>"
TempContent=TempContent&" <tr>"
TempContent=TempContent&" <td height='4'></td>"
TempContent=TempContent&" </tr>"
If Flag = 1 Then
TempContent=TempContent&" <tr><td>对不起,此信息类别不存在!</td></tr>"
Else
Dim fRs, fSql, SqlString, NewsNum, o_Char, o_Num, Target, i
If News_Check = 1 Then
Select Case T_Attr
Case 0
SqlString = "And D_Num =1 ORDER BY D_SortID DESC"
Case 1
SqlString = "And (D_Num =1 And D_Special = 1) ORDER BY D_SortID DESC"
Case 2
SqlString = "And D_Num =1 ORDER BY D_Hits DESC"
End Select
Else
Select Case T_Attr
Case 0
SqlString = "ORDER BY D_SortID DESC"
Case 1
SqlString = "And D_Special = 1 ORDER BY D_SortID DESC"
Case 2
SqlString = "ORDER BY D_Hits DESC"
End Select
End If
NewsNum = T_RowNum * T_ColNum
Set fRs = Server.CreateObject( "ADODB.Recordset" )
fSql = "SELECT TOP "& NewsNum &" * FROM DdsData WHERE D_CataID LIKE '"&T_CataID&"%' "& SqlString
fRs.Open fSql,oConn,0,1
If fRs.EOF or fRs.BOF Then
TempContent=TempContent&" <tr><td>暂时没有任何信息!</td></tr>"
End If
If T_OpenMode = 1 Then
Target ="target='_blank'"
Else
Target ="target='_parent'"
End If
TempContent=TempContent&" <tr>"
i = 0
Do While Not fRs.EOF And NewsNum > 0
If T_Style = 2 Then
TempContent = TempContent &"<td valign='top'>"
TempContent = TempContent &"<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
TempContent = TempContent &" <tr>"
TempContent = TempContent &" <td height='"& T_LineSpace &"' class='"& T_TitleCSS &"'>"
If T_NaviPic <> 0 Then TempContent = TempContent &"<img src='"& RootUrl &"/News/images/Dot_"& T_NaviPic &".gif' align='absmiddle'>"
If Get_TrueLen(GetSafeStr(fRs("D_Title"))) > 2*Cint(T_TitleNum) Then
TempContent = TempContent &" "& Get_String(GetSafeStr(fRs("D_Title")),2*T_TitleNum-3) &"...</td>"
Else
TempContent = TempContent &" "& GetSafeStr(fRs("D_Title")) & "</td>"
End If
TempContent = TempContent &" </tr>"
TempContent = TempContent &" <tr>"
TempContent = TempContent &" <td class='"& T_ContentCSS &"'>" & Get_String(GetTxtStr(GetLineStr(fRs("D_Content"))),2*T_ContentNum) &"...</td>"
TempContent = TempContent &" </tr>"
If T_More = 1 Then
TempContent = TempContent &" <tr>"
TempContent = TempContent &" <td align='right'><a href='"& RootUrl &"/News/DdsShow.asp?id="& fRs("D_ID") &"' class='"& T_MoreCSS &"'>>> 更多内容</a> </td>"
TempContent = TempContent &" </tr>"
End If
TempContent = TempContent &"</table>"
TempContent = TempContent &"</td>"
Else
o_Char = ""
o_Num = 1
Dim CataName, gRs, gSql
Set gRs = Server.CreateObject( "ADODB.Recordset" )
gSql = "SELECT C_Title FROM DdsCata WHERE C_RootID = '"& fRs("D_CataID") &"' ORDER BY C_ID DESC"
gRs.Open gSql,oConn,0,1
If Not gRs.EOF Then
CataName = gRs("C_Title")
End If
gRs.Close
Set gRs = Nothing
If T_DateType > 0 Then
Select Case T_DateType
Case 1
o_Char = o_Char & Year(fRs("D_AddTime"))&"-"&Month(fRs("D_AddTime"))&"-"&Day(fRs("D_AddTime"))
Case 2
o_Char = o_Char & Format_Time(fRs("D_AddTime"),2)
Case 3
o_Char = o_Char & Year(fRs("D_AddTime"))&"/"&Month(fRs("D_AddTime"))&"/"&Day(fRs("D_AddTime"))
Case 4
o_Char = o_Char & Month(fRs("D_AddTime"))&"/"&Day(fRs("D_AddTime"))&"/"&Year(fRs("D_AddTime"))
Case 5
o_Char = o_Char & Month(fRs("D_AddTime"))&"-"&Day(fRs("D_AddTime"))&"-"&Year(fRs("D_AddTime"))
Case 6
o_Char = o_Char & Month(fRs("D_AddTime"))&"-"&Day(fRs("D_AddTime"))
Case 7
o_Char = o_Char & Month(fRs("D_AddTime"))&"/"&Day(fRs("D_AddTime"))
Case 8
o_Char = o_Char & Month(fRs("D_AddTime"))&"月"&Day(fRs("D_AddTime"))&"日"
Case Else
o_Char = o_Char & Year(fRs("D_AddTime"))&"年"&Month(fRs("D_AddTime"))&"月"&Day(fRs("D_AddTime"))&"日"
End Select
End If
If T_ShowClick = 1 Then o_Char = o_Char &" 浏览:"& fRs("D_Hits")
If o_Char <> "" Then o_Char = "<span class='"& T_Postfix &"'>["& o_Char & "]</span>"
TempContent = TempContent &" <td height="& T_LineSpace &">"
If T_ChildCata = 1 Then TempContent = TempContent &"<font color=#FF6600>["& CataName &"]</font>"
If T_NaviPic <> 0 Then TempContent = TempContent &" <img src='"&RootUrl&"/News/images/Dot_"& T_NaviPic &".gif' align='absmiddle'> "
If Trim(fRs("D_Url")) <> "" Then
TempContent = TempContent &"<a href='"&fRs("D_Url")&"' class='"& T_TitleCSS &"' "& Target &">"
Else
TempContent = TempContent &"<a href='"&RootUrl&"/News/DdsShow.asp?id="&fRs("D_ID")&"' class='"& T_TitleCSS &"' "& Target &">"
End If
If Trim(fRs("D_Color")) <> "" Then
TempContent = TempContent &"<font color='"& fRs("D_Color") &"'>"
End If
If Get_TrueLen(GetSafeStr(fRs("D_Title"))) > 2*Cint(T_TitleNum) Then
TempContent = TempContent & Get_String(GetSafeStr(fRs("D_Title")),2*T_TitleNum-3)
Else
TempContent = TempContent & GetSafeStr(fRs("D_Title"))
End If
If Trim(fRs("D_Color")) <> "" Then
TempContent = TempContent &"</font>"
End If
TempContent = TempContent &"</a>"
If T_New = 1 and Format_Time(Now(),5) - Format_Time(fRs("D_AddTime"),5) < 2 Then
TempContent = TempContent &"<img src='"& RootUrl &"/News/Images/New.gif' align='absmiddle'>"
End If
If T_Align = 1 Then
TempContent = TempContent &"</td><td align='right'>"
o_Num = 2
End If
TempContent = TempContent & o_char &"</td>"
End If
NewsNum = NewsNum - 1
i = i + 1
if i mod T_ColNum = 0 Then TempContent = TempContent& "</tr><tr>"
fRs.MoveNext
Loop
fRs.Close
Set fRs = Nothing
TempContent=TempContent&" </tr>"
If T_More = 1 and T_Style <> 2 Then
TempContent=TempContent&" <tr><td colspan='"& o_Num*T_ColNum &"' align='right'><a href='"&RootUrl&"/News/Default.asp?cataid="& T_CataID &"' class='"& T_MoreCSS &"'>>> 更多内容</a> </td></tr>"
End If
End If
TempContent=TempContent&"</table>"
Call DBConnEnd()
%>
document.write("<%=TempContent%>");
也是他的