?? functionitem.asp
字號(hào):
<!--#include file="Channel_Config.asp"-->
<%
if Isdisabled=false then
response.redirect ""&cityurl&"/Include/error.asp?err=本頻道已被管理員禁用!"
end if
%>
<%
if Isdisabled=false then
response.write "<font color=red>對(duì)不起,本頻道已被管理員禁用!</span>"
else
'*************************
'功能:分頁(yè)
'修正了在搜索中不能正確分頁(yè)的BUG...
'*************************
function funpage(Intpagecount,Intmypage,Intrecordcount,Intpagesize)
on error resume next
dim Intfor,Intlist,intlist_b
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
if intmypage>1 then
funpage=funpage & "<a href='"&action&"?"&temp&"page=1' title='最前頁(yè)' class='no'><font face='Webdings'>9</font></a>"
funpage=funpage&"<a href='"&action&"?"&temp&"page="&Intmypage-1 & "' title='上一頁(yè)' class='no'><font face='Webdings'>7</font></a>"
else
funpage=funpage &"<font face='Webdings'>9</font>"
funpage=funpage&"<font face='Webdings'>7</font>"
end if
if Intlist<>0 then
if cintmypage= Intlist then
Intlist=Intlist+5
end if
else
Intlist=Intmypage+5
end if
if intlist-9<1 then
intlist_b=1
else
intlist_b=intlist-9
end if
for Intfor=intlist_b to Intlist
if intfor<=Intpagecount then
if intfor=Intmypage then '-------使當(dāng)前頁(yè)文字為紅色,并不可點(diǎn)擊
funpage =funpage & strMode&" <font color='#FF0000'><b>"& Intfor & "</b></font>"
else
funpage=funpage & strMode &" <a href='"&action&"?"&temp&"page=" & Intfor &"' class='no'>" & Intfor & "</a>"
end if
end if
strMode=" <font color='#BBBBBB'>|</font> "
next
if intmypage<intpagecount then
funpage=funpage&" <a href='"&action&"?"&temp&"page="& Intmypage+1 &"' title='后一頁(yè)' class='no'><font face='Webdings'>8</font></a>"
funpage=funpage &"<a href='"&action&"?"&temp&"page="& Intpagecount & "' title='最后頁(yè)' class='no'><font face='Webdings'>:</font></a>"
else
funpage=funpage&" <font face='Webdings'>8</font>"
funpage=funpage &"<font face='Webdings'>:</font></a>"
end if
funpage="<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>"&_
vbcrlf&"<td width='40%'> 當(dāng)前第"&Intmypage&"頁(yè) "&Intpagesize&"條/頁(yè) 共"&Intpagecount&"頁(yè)/"&Intrecordcount&"條</td>"&_
vbcrlf&"<td width='60%' align='right'>"&_
vbcrlf&"<table width='360' border='0' cellspacing='0' cellpadding='0'><tr>"&_
vbcrlf&"<td align='right'>"&funpage&" </td>"&_
vbcrlf&"</tr></table></td></tr>"&_
vbcrlf&"</table>"
if err.number<>0 then
err.clear
response.redirect(""&cityurl&"/include/error.asp?err=分頁(yè)函數(shù)出錯(cuò),請(qǐng)與管理員聯(lián)系!|")
end if
end function
'*************************
'功能:分頁(yè)
'修正了在搜索中不能正確分頁(yè)的BUG...
'*************************
function funpage_search(Intpagecount,Intmypage,Intrecordcount,Intpagesize)
on error resume next
dim Intfor,Intlist,intlist_b
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & replace(Request.ServerVariables("SCRIPT_NAME"),".asp",".html")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
if intmypage>1 then
funpage_search=funpage_search & "<a href='"&action&"?"&temp&"page=1' title='最前頁(yè)' class='no'><font face='Webdings'>9</font></a>"
funpage_search=funpage_search&"<a href='"&action&"?"&temp&"page="&Intmypage-1 & "' title='上一頁(yè)' class='no'><font face='Webdings'>7</font></a>"
else
funpage_search=funpage_search &"<font face='Webdings'>9</font>"
funpage_search=funpage_search&"<font face='Webdings'>7</font>"
end if
if Intlist<>0 then
if cintmypage= Intlist then
Intlist=Intlist+5
end if
else
Intlist=Intmypage+5
end if
if intlist-9<1 then
intlist_b=1
else
intlist_b=intlist-9
end if
for Intfor=intlist_b to Intlist
if intfor<=Intpagecount then
if intfor=Intmypage then '-------使當(dāng)前頁(yè)文字為紅色,并不可點(diǎn)擊
funpage_search =funpage_search & strMode&" <font color='#FF0000'><b>"& Intfor & "</b></font>"
else
funpage_search=funpage_search & strMode &" <a href='"&action&"?"&temp&"page=" & Intfor &"' class='no'>" & Intfor & "</a>"
end if
end if
strMode=" <font color='#BBBBBB'>|</font> "
next
if intmypage<intpagecount then
funpage_search=funpage_search&" <a href='"&action&"?"&temp&"page="& Intmypage+1 &"' title='后一頁(yè)' class='no'><font face='Webdings'>8</font></a>"
funpage_search=funpage_search &"<a href='"&action&"?"&temp&"page="& Intpagecount & "' title='最后頁(yè)' class='no'><font face='Webdings'>:</font></a>"
else
funpage_search=funpage_search&" <font face='Webdings'>8</font>"
funpage_search=funpage_search &"<font face='Webdings'>:</font></a>"
end if
funpage_search="<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>"&_
vbcrlf&"<td width='40%'> 當(dāng)前第"&Intmypage&"頁(yè) "&Intpagesize&"條/頁(yè) 共"&Intpagecount&"頁(yè)/"&Intrecordcount&"條</td>"&_
vbcrlf&"<td width='60%' align='right'>"&_
vbcrlf&"<table width='360' border='0' cellspacing='0' cellpadding='0'><tr>"&_
vbcrlf&"<td align='right'>"&funpage_search&" </td>"&_
vbcrlf&"</tr></table></td></tr>"&_
vbcrlf&"</table>"
if err.number<>0 then
err.clear
response.redirect(""&cityurl&"/include/error.asp?err=分頁(yè)函數(shù)出錯(cuò),請(qǐng)與管理員聯(lián)系!|")
end if
end function
'----------------------------------------------------------------------
' 函數(shù)功能: 屏蔽HTML代碼
' 參 數(shù): StrInput 用戶輸入信息
'----------------------------------------------------------------------
Function FunHtml(strHtml)
Dim strPatrn
strPatrn="<.*?>"
Dim regEx
Set regEx = New RegExp
regEx.Pattern = strPatrn
regEx.IgnoreCase = True
regEx.Global = True
FunHtml = regEx.Replace(strHtml,"")
End Function
'//熱門搜索關(guān)鍵詞
Function Hotkeyword()
Dim StrSql,Rs,ArrayKeyword,Inti,LngCharLen
Hotkeyword=""
LngCharLen=0
StrSql="select C_Keyword from Asean_config"
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open StrSql,Conn,1,1
If Not Rs.Eof Then
ArrayKeyword=Split(Rs("C_Keyword"),",")
For Inti=0 To Ubound(ArrayKeyword)
If LngCharLen>44 Then
Exit For
End If
LngCharLen=LngCharLen+Len(ArrayKeyword(Inti))+1
Hotkeyword=Hotkeyword&"<a href=""../info/search.asp?Keyword="&ArrayKeyword(Inti)&""" target=""_blank"">"&ArrayKeyword(IntI)&"</a>"&" "
Next
End If
Rs.CLose:Set Rs=Nothing
End Function
'///熱門資訊排行---搜索
function HotArticle()
dim rshot
HotArticle=""
StrSql="select top 10 Title,N_url,inputtime from Siruo_Article where N_CreateFile=1 and N_channelid="&ChannelID&" order by hits desc"
Set rshot=Server.CreateObject("Adodb.RecordSet")
rshot.Open StrSql,Conn,1,1
Do While Not rshot.Eof
HotArticle=HotArticle&"·<a href="""&NewsPath&"/"&rshot("N_url")&""" target=""_Blank"" title="&Rs("Title")&">"&Left(rshot("Title"),12)&"</a><br> "
rshot.MoveNext
Loop
rshot.Close:Set rshot=Nothing
end function
%>
<%
'///資訊分類
function navigation()
dim rsnav
navigation=navigation&"| <a href=""index.asp"">"&C_name&"</a> | "
Set rsnav=server.createobject("adodb.recordset")
sql="SELECT TOP 10 ID,ClassName,Nav,ordernum FROM Siruo_Articlebigclass WHERE Nav=1 and channelid="&channelid&" ORDER BY ordernum,id desc"
rsnav.open sql,conn,1,1
Do while not rsnav.eof
if jthtml=1 then
bigclassurl="list_"&rsnav("id")&".html"
else
bigclassurl="list.asp?bigclassid="&rsnav("id")&""
end if
navigation=navigation&"<a href="""&bigclassurl&""">"&rsnav("ClassName")&"</a> | "
rsnav.movenext
loop
rsnav.close:set rsnav=Nothing
end function
end if
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -