?? function.asp
字號:
Case 7 '推薦
InfoSql="select top "&nums&" ID,title,Sort2,Sort1,AddDate,hits,Pw_Good from Info Where Pw_Good=True ORDER BY id DESC"
Case else '其它
InfoSql="select top "&nums&" ID,title,Sort2,Sort1,AddDate,hits from Info order by hits desc"
End Select
Set InfoRs=Conn.Execute(InfoSql)
if InfoRs.eof or InfoRs.bof then
response.write"<tr><td align='center'>沒有信息...</td></tr>"
end if
while not Infors.eof
set title=Infors("title")
set id=Infors("id")
response.write "<tr><td width="""&width1&""" align=""right"" height=""25"" background=""images/table_bg2.gif""><img src=""Images/a125_ico.gif"" width=""10"" height=""10"" align=""absmiddle""></td><td width="""&width2&""" height=""25"" background=""images/table_bg2.gif"" ><p style='line-height: 150%'>"& vbCrLf
response.write "<a href='typenews.asp?id="&id&"'title='"&title&"'>"
if GetLen(title)>Linenum then
response.write ""&LeftStr(title,Linenum-2)&""
response.write "..."
else
response.write ""&title&""
end if
response.write "</a></td>"
response.write "<td width="""&width3&""" align=""left"" height=""25"" background=""images/table_bg2.gif"">"
if Show_date=1 then
response.write " "
response.write "<font color='#808080'>"
response.write DateTimeFormat(Infors("AddDate"),3)
response.write "</font>"
End if
response.write "</a></td></tr>"
Infors.movenext
wend
Infors.close
set Infors=nothing
response.write "</table>"
End Function
Function NoPic(a125_DisInfo)
response.write "<table width=""100"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""3""><tr> "& vbCrLf
response.write "<td><img src=""Images/a125_nopic.gif"" border=""0""></td>"& vbCrLf
response.write "</tr><tr><td height=""18"">"& vbCrLf
response.write "<div align=""center"">"&a125_DisInfo&"</div></td>"& vbCrLf
response.write "</tr></table>"& vbCrLf
End Function
'//文章分類調用
Function a125_acticletype(Linenum,B_id,B_names)
response.write "<TABLE cellSpacing=0 cellPadding=0 width=212 border=0><TBODY><TR><TD width=206 height=30 background=""images/2/index_81.gif"" style=""text-align:left;letter-spacing: 4px; text-indent: 60px;vertical-align: middle; color: #FFFFFF;"">"&B_names&"</TD></TR><TR><TD align=middle height=150>"
response.write "<div align=center>"
response.write "<table border=0 cellpadding=0 cellspacing=0 width=180 height=100>"
response.write "<tr>"
response.write "<td>"
'------------主要內容開始
response.write "<table width=""100%"" border=""0"" align=""center"" cellpadding=""1"" cellspacing=""1"">"& vbCrLf
if B_id=-4 or B_id=-5 then
if B_id=-4 then
response.write "<tr><td width=""25%"" align=""right""><img src=""Images/a125_Guide.gif"" width=""12"" height=""14"" align=""absmiddle""></td><td width=""75%""><p style='line-height: 150%'>"& vbCrLf
response.write "<a href='feedback.asp'>投訴反饋</a></td></tr>"
response.write "<tr><td width=""25%"" align=""right""><img src=""Images/a125_Guide.gif"" width=""12"" height=""14"" align=""absmiddle""></td><td width=""75%""><p style='line-height: 150%'>"& vbCrLf
response.write "<a href='leadingbox.asp'>"&leader&"信箱</a></td></tr>"
end if
if B_id=-5 then
response.write "<tr><td width=""25%"" align=""right""><img src=""Images/a125_Guide.gif"" width=""12"" height=""14"" align=""absmiddle""></td><td width=""75%""><p style='line-height: 150%'>"& vbCrLf
response.write "<a href='news.asp'>新聞動態</a></td></tr>"
response.write "<tr><td width=""25%"" align=""right""><img src=""Images/a125_Guide.gif"" width=""12"" height=""14"" align=""absmiddle""></td><td width=""75%""><p style='line-height: 150%'>"& vbCrLf
response.write "<a href='gonggao.asp'>政府公告</a></td></tr>"
end if
else
Select case B_id
case -1
InfoSql="select * from a125_down order by cat_id"
listtype="cat_name"
listid="cat_id"
listlink="down.asp?cat_id="
case -2
InfoSql="select * from a125_movie order by piccat_id "
listtype="piccat_name"
listid="piccat_id"
listlink="movie.asp?cat_id="
case -3
InfoSql="select * from a125_pic order by piccat_id "
listtype="piccat_name"
listid="piccat_id"
listlink="pic.asp?cat_id="
case 0
InfoSql="select * from a125_type where a125_big_id="&B_id&" and a125_setting<>5 order by a125_order "
listtype="a125_names"
listid="ID"
listlink="type.asp?a125id="
Case else
InfoSql="select * from a125_type where a125_big_id="&B_id&" and a125_setting<>5 order by a125_order "
listtype="a125_names"
listid="ID"
listlink="class_type.asp?a125id="
End Select
Set InfoRs=Conn.Execute(InfoSql)
if InfoRs.eof or InfoRs.bof then
response.write"<tr><td align='center'>沒有該項分類...</td></tr>"
end if
if B_id=56 then
response.write "<tr><td width=""25%"" align=""right""><img src=""Images/a125_Guide.gif"" width=""12"" height=""14"" align=""absmiddle""></td><td width=""75%""><p style='line-height: 150%'>"& vbCrLf
response.write "<a href='pic.asp'>旅游圖片</a></td></tr>"
end if
while not Infors.eof
set title=Infors(listtype)
set id=Infors(listid)
response.write "<tr><td width=""25%"" align=""right""><img src=""Images/a125_Guide.gif"" width=""12"" height=""14"" align=""absmiddle""> </td><td width=""75%""><p style='line-height: 150%'>"& vbCrLf
response.write "<a href='"&listlink&id&"'>"
if GetLen(title)>Linenum then
response.write ""&LeftStr(title,Linenum-2)&""
response.write "..."
else
response.write ""&title&""
end if
response.write "</a></p></td></tr>"
if B_id=-1 then
InfoSql2="select * from a125_d_class where cat_id="&id&" order by class_id"
Set InfoRs2=Conn.Execute(InfoSql2)
while not InfoRs2.eof
set title2=Infors2("class_name")
set id2=Infors2("class_id")
response.write "<tr><td width=""25%"" align=""right""><img src=""Images/daodu_bg.gif"" width=""12"" height=""14"" align=""absmiddle""></td><td width=""75%""><p style='line-height: 150%'>"& vbCrLf
response.write " <a href='down.asp?class_id="&id2&"'>"
if GetLen(title2)>Linenum then
response.write ""&LeftStr(title2,Linenum-2)&""
response.write "..."
else
response.write ""&title2&""
end if
response.write "</a></p></td></tr>"
InfoRs2.movenext
wend
InfoRs2.close
set InfoRs2=nothing
end if
Infors.movenext
wend
Infors.close
set Infors=nothing
end if
response.write "</table>"
'-----------主要內容結束
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "</div></TD></TR></TBODY></TABLE>"
End Function
'//熱門或推薦下載、圖片、視頻調用
Function a125_otherInfo(s_num,nums,Linenum,S_info,Show_date)
Select case S_info
case "down"
listname="soft_name"
if s_num=1 then
tname="熱門下載"
InfoSql="select top "&nums&" * from a125_d_news order by soft_rcount desc,ID desc"
end if
if s_num=7 then
tname="熱門下載"
InfoSql="select top "&nums&" * from a125_d_news Where isbest=1 ORDER BY id DESC"
end if
case "pic"
listname="pic_name"
if s_num=1 then
tname="熱門圖片"
InfoSql="select top "&nums&" * from a125_p_news order by pic_count desc,ID desc"
end if
if s_num=7 then
tname="推薦圖片"
InfoSql="select top "&nums&" * from a125_p_news Where isbest=1 ORDER BY id DESC"
end if
case "movie"
listname="pic_name"
if s_num=1 then
tname="熱門視頻"
InfoSql="select top "&nums&" * from a125_m_news order by pic_count desc,ID desc"
end if
if s_num=7 then
tname="推薦視頻"
InfoSql="select top "&nums&" * from a125_m_news Where isbest=1 ORDER BY id DESC"
end if
case "a125_"
listname="Title"
if s_num=1 then
tname="熱門新聞"
InfoSql="select top "&nums&" * from a125_news order by Hits desc,ID desc"
end if
if s_num=7 then
tname="推薦新聞"
InfoSql="select top "&nums&" * from a125_news Where New_tuijian=true ORDER BY id DESC"
end if
Case else '其它
response.write "index.asp"
End Select
response.write "<TABLE cellSpacing=0 cellPadding=0 width=212 border=0><TBODY><TR><TD width=206 height=30 background=""images/2/index_86.gif"" style=""text-align:left;letter-spacing: 4px; text-indent: 60px;vertical-align: middle; color: #FFFFFF;"">"&tname&"</TD></TR><TR><TD align=middle height=150>"
response.write "<div align=center>"
response.write "<table border=0 cellpadding=0 cellspacing=0 width=180 height=100 >"
response.write "<tr>"
response.write "<td>"
'------------主要內容開始
response.write "<table width=""100%"" border=""0"" align=""center"" cellpadding=""1"" cellspacing=""1"">"& vbCrLf
Set InfoRs=Conn.Execute(InfoSql)
if InfoRs.eof or InfoRs.bof then
response.write"<tr><td align='center'>沒有信息...</td></tr>"
end if
while not Infors.eof
set title=Infors(listname)
set id=Infors("id")
response.write "<tr><td width=""12%""align=""right""><img src=""Images/daodu_bg.gif"" width=""9"" height=""11"" align=""absmiddle""></td><td width=""88%""><p style='line-height: 150%'>"& vbCrLf
response.write "<a href='"&S_info&"news.asp?id="&id&"'>"
if GetLen(title)>Linenum then
response.write ""&LeftStr(title,Linenum-2)&""
response.write "..."
else
response.write ""&title&""
end if
if Show_date=1 then
response.write " "
response.write DateTimeFormat(Infors("AddDate"),3)
End if
response.write "</a></td></tr>"
Infors.movenext
wend
Infors.close
set Infors=nothing
response.write "</table>"
'-----------主要內容結束
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "</div></TD></TR></TBODY></TABLE>"
End Function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -