📄 commonfunction.asp
字号:
Case 1
sql=sql&" and (ModuleType=1 or ModuleType=2 or ModuleType=4 or ModuleType=6 or ModuleType=10 or ModuleType=14 or ModuleType is null)"
Case 2
sql=sql&" and (ModuleType=1 or ModuleType=2 or ModuleType=3 or ModuleType=4 or ModuleType=5 or ModuleType=6 or ModuleType=10 or ModuleType=14 or ModuleType is null)"
Case 3
sql=sql&" and (ModuleType=1 or ModuleType=2 or ModuleType=3 or ModuleType=4 or ModuleType=5 or ModuleType=6 or ModuleType=10 or ModuleType=11 or ModuleType=12 or ModuleType=14 or ModuleType is null)"
Case 4
sql=sql&" and (ModuleType=1 or ModuleType=2 or ModuleType=3 or ModuleType=4 or ModuleType=5 or ModuleType=6 or ModuleType=7 or ModuleType=8 or ModuleType=9 or ModuleType=10 or ModuleType=11 or ModuleType=12 or ModuleType=14 or ModuleType is null)"
Case 5
sql=sql&" and (ModuleType=1 or ModuleType=2 or ModuleType=3 or ModuleType=4 or ModuleType=5 or ModuleType=6 or ModuleType=7 or ModuleType=8 or ModuleType=9 or ModuleType=10 or ModuleType=11 or ModuleType=12 or ModuleType=13 or ModuleType=14 or ModuleType is null)"
Case Else
GetSitenav="参数设置错误!"
Exit Function
End Select
sql=sql&" order by OrderID asc"
Sitenav=Sitenav&"<li><a href="&SiteUrl&InstallDir&" title='"&sitename&"首页'>首 页</a></li>"
Set Rs_nav=conn.Execute(sql)
If Not Rs_nav.eof then
Do While Not Rs_nav.eof
If Rs_nav("ChannelType")<>2 then
If CreateHTML=1 then
if Rs_nav("UseCreateHTML")<>0 then
Select Case Rs_nav("FileExt_Index")
Case 0:htmls=".html"
Case 1:htmls=".htm"
Case 2:htmls=".shtml"
Case 3:htmls=".shtm"
Case 4:htmls=".asp"
End Select
Sitenav=Sitenav&"<li><a href="&SiteUrl&InstallDir&HTMLPath&"/"&Rs_nav("ChannelDir")&"/index"&htmls&""
else
Sitenav=Sitenav&"<li><a href="&SiteUrl&InstallDir&Rs_nav("ChannelDir")&""
end if
else
Sitenav=Sitenav&"<li><a href="&SiteUrl&InstallDir&Rs_nav("ChannelDir")&""
end if
else
Sitenav=Sitenav&"<li><a href="&Rs_nav("LinkUrl")&""
end if
if Rs_nav("OpenType")=1 then
Sitenav=Sitenav&" target='_blank'"
end if
Sitenav=Sitenav&" title="&Rs_nav("ReadMe")&">"&Rs_nav("ChannelName")&"</a></li>"
Rs_nav.MoveNext
Loop
Else
Sitenav=Sitenav&"频道设置错误!"
End if
Rs_nav.Close:Set Rs_nav=Nothing
GetSitenav=Sitenav
End Function
'***************************************************
'函数名:GetSitebottomnav
'返回值:
'***************************************************
Function GetSitebottomnav()
Dim Sitebottomnav
Sitebottomnav="| "
Set Rs_nav=conn.Execute("select * from JOB_common where IsShow = "&FR_HR_True&" order by isorder asc")
If Not Rs_nav.eof then
Do While Not Rs_nav.eof
If CreateHTML=1 then
Sitebottomnav=Sitebottomnav&"<a href="&SiteUrl&InstallDir&HTMLPath&"/"&Rs_nav("htmlname")&">"&Rs_nav("title")&"</a> | "
else
Sitebottomnav=Sitebottomnav&"<a href="&SiteUrl&InstallDir&"common.asp?commonid="&Rs_nav("id")&">"&Rs_nav("title")&"</a> | "
end if
Rs_nav.MoveNext
Loop
Else
Sitebottomnav=Sitebottomnav&"通用页面设置错误!"
End if
Rs_nav.Close:Set Rs_nav=Nothing
GetSitebottomnav=Sitebottomnav
End Function
'***************************************************
'函数名:GetSlide
'返回值:
'***************************************************
Function GetSlide(cid,tid,flashid,imgnum,imgw,imgh,tjnews,tjhome,homepic,homehot,order,font_left)
Dim NewsRS, NewsSql, NewsSqls, picss, linkss, textss
Set NewsRS = Server.CreateObject(FR_HR_RS)
'-1 为读取当前频道
if cid="-1" then
cid = session(FRHRCMS&"ChannelID")
end if
NewsSqls=""
If tid<>0 then
NewsSqls=" and Typeid="&tid&""
end if
If tjnews=1 then
NewsSqls=NewsSqls&" and tjnews="&tjnews&""
End If
If tjhome=1 then
NewsSqls=NewsSqls&" and tjhome="&tjhome&""
End If
If homepic=1 then
NewsSqls=NewsSqls&" and homepic="&homepic&""
End If
If homehot=1 then
NewsSqls=NewsSqls&" and homehot="&homehot&""
End If
NewsSqls=NewsSqls&" order by "&order&""
html=""
If imgnum<>0 Then
NewsSql = "Select top "&imgnum&" * from JOB_hrnews where type_fid="&cid&" and Picture<>'nopicture.gif'"&NewsSqls&""
Else
NewsSql = "Select * from JOB_hrnews where type_fid="&cid&" and Picture<>'nopicture.gif'"&NewsSqls&""
End If
NewsRS.open NewsSql,conn,1,1
If Not NewsRS.EOF Then
Do While Not NewsRS.EOF
picss=picss&NewsRS("Picture")&"|"
linkss=linkss&FormatLink(NewsRS("Dateandtime"),NewsRS("type_fid"),NewsRS("Typeid"),NewsRS("newsid"),0)&"|"
textss=textss&left(ClearColor(NewsRS("title")),font_left)&"|"
NewsRS.MoveNext
Loop
Else
GetSlide="暂无图片信息"
Exit Function
End If
NewsRS.Close
picss=left(picss,len(picss)-1)
linkss=left(linkss,len(linkss)-1)
textss=left(textss,len(textss)-1)
html=html&"<SCRIPT type=text/javascript>"& vbCrLf
html=html&"<!--"& vbCrLf
html=html&"var focus_width="&imgw&""& vbCrLf
html=html&"var focus_height="&imgh&""& vbCrLf
html=html&"var text_height=22"& vbCrLf
html=html&"var swf_height = focus_height+text_height"& vbCrLf
html=html&"var pics='"&picss&"'"& vbCrLf
html=html&"var links='"&linkss&"'"& vbCrLf
html=html&"var texts='"&textss&"'"& vbCrLf
select case flashid
case 1
html=html&"document.write('<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 width='+ focus_width +' height='+ swf_height +'>');"& vbCrLf
html=html&"document.write('<param name=allowScriptAccess value=sameDomain><param name=movie value="&SiteUrl&InstallDir&"skin/skin1/focus1.swf> <param name=quality value=high><param name=bgcolor value=#FFFFFF>');"& vbCrLf
html=html&"document.write('<param name=menu value=false><param name=wmode value=opaque>');"& vbCrLf
html=html&"document.write('<param name=FlashVars value=pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'>');"& vbCrLf
html=html&"document.write('<embed src="&SiteUrl&InstallDir&"skin/skin1/focus1.swf wmode=opaque FlashVars=pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+' menu=false bgcolor=#ffffff quality=high width='+ focus_width +' height='+ swf_height +' allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer />');"& vbCrLf
case 2
case 3
case else
html=html&"document.write('<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0 width='+ focus_width +' height='+ swf_height +'>');"& vbCrLf
html=html&"document.write('<param name=allowScriptAccess value=sameDomain><param name=movie value="&SiteUrl&InstallDir&"skin/skin1/focus.swf><param name=wmode value=transparent><param name=quality value=high>');"& vbCrLf
html=html&"document.write('<param name=menu value=false><param name=wmode value=opaque>');"& vbCrLf
html=html&"document.write('<param name=FlashVars value=pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'>');"& vbCrLf
html=html&"document.write('<embed src="&SiteUrl&InstallDir&"skin/skin/focus1.swf wmode=opaque FlashVars=pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+' menu=false bgcolor=#DADADA quality=high width='+ focus_width +' height='+ swf_height +' allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer />');"& vbCrLf
end select
html=html&"document.write('</object>');"& vbCrLf
html=html&"//-->"& vbCrLf
html=html&"</script>"& vbCrLf
GetSlide=html
End Function
'***************************************************
'函数名:GetScrollArticleList
'返回值:
'***************************************************
Function GetScrollArticleList(cid,tid,num,titfont,tjnews,tjhome,homepic,homehot,order,font_left,target,dates,suffix)
Dim NewsRS, NewsSql, NewsSqls
Set NewsRS = Server.CreateObject(FR_HR_RS)
'-1 为读取当前频道
if cid="-1" then
cid = session(FRHRCMS&"ChannelID")
end if
NewsSqls=""
If tid<>0 then
NewsSqls=" and Typeid="&tid&""
end if
If tjnews=1 then
NewsSqls=NewsSqls&" and tjnews="&tjnews&""
End If
If tjhome=1 then
NewsSqls=NewsSqls&" and tjhome="&tjhome&""
End If
If homepic=1 then
NewsSqls=NewsSqls&" and homepic="&homepic&""
End If
If homehot=1 then
NewsSqls=NewsSqls&" and homehot="&homehot&""
End If
NewsSqls=NewsSqls&" order by "&order&""
html=""
If num<>0 Then
NewsSql = "Select top "&num&" * from JOB_hrnews where type_fid="&cid&" and Picture<>'nopicture.gif'"&NewsSqls&""
Else
NewsSql = "Select * from JOB_hrnews where type_fid="&cid&" and Picture<>'nopicture.gif'"&NewsSqls&""
End If
NewsRS.open NewsSql,conn,1,1
If NewsRS.eof then
html=html&"暂无文章"& vbCrLf
Else
Do While Not NewsRS.EOF
html=html&"<span><a href="&FormatLink(NewsRS("Dateandtime"),NewsRS("type_fid"),NewsRS("Typeid"),NewsRS("newsid"),0)&"><font color='#FF0000'>"&AppendColor(NewsRS("title"),titfont)&"</font></a></span>"& vbCrLf
html=html&"<ul>"&left(RemoveHTML(NewsRS("Content")),font_left)&"...</ul>"& vbCrLf
NewsRS.MoveNext
Loop
end if
GetScrollArticleList=html
End Function
'***************************************************
'函数名:GetArticletype
'返回值:
'***************************************************
Function GetArticletype(cid,nums)
Dim NewsRS, NewsSql
Set NewsRS = Server.CreateObject(FR_HR_RS)
if nums<>0 then
NewsSql="select top "&nums&" * from JOB_hrnewstype where type_fid="&cid&" order by date desc"
else
NewsSql="select * from JOB_hrnewstype where type_fid="&cid&" order by date asc"
end if
NewsRS.open NewsSql,conn,1,1
typehtml=""
If Not NewsRS.EOF Then
Do While Not NewsRS.EOF
typehtml=typehtml&"<li><a href='"&FormatLink(0,cid,NewsRS("typeid"),0,0)&"'>"&NewsRS("type")&"</a></li>"
NewsRS.MoveNext
Loop
Else
GetArticletype="暂无分类"
Exit Function
End If
NewsRS.Close:Set NewsRS=Nothing
GetArticletype=typehtml
End Function
'***************************************************
'函数名:GetArticleList
'返回值:
'***************************************************
Function GetArticleList(cid,tid,imgs,num,tjnews,tjhome,homepic,homehot,order,font_left,target,dates,suffix,rows)
Dim NewsRS, NewsSql, NewsSqls
Set NewsRS = Server.CreateObject(FR_HR_RS)
'-1 为读取当前频道
if cid="-1" then
'cid = Request.Cookies(FRHRCMS)("ChannelID")
cid = session(FRHRCMS&"ChannelID")
end if
NewsSqls=""
If tid="-1" then
'if Request.Cookies(FRHRCMS)("TypeID")="" then
if session(FRHRCMS&"TypeID")="" then
tid=0
else
'tid=Request.Cookies(FRHRCMS)("TypeID")
tid=session(FRHRCMS&"TypeID")
end if
end if
cid=clng(cid)
tid=clng(tid)
If cid<>0 then
NewsSqls=" where type_fid="&cid&""
else
NewsSqls=" where type_fid<>0"
end if
If tid<>0 then
NewsSqls=NewsSqls&" and Typeid="&tid&""
end if
If tjnews=1 then
NewsSqls=NewsSqls&" and tjnews="&tjnews&""
End If
If tjhome=1 then
NewsSqls=NewsSqls&" and tjhome="&tjhome&""
End If
If homepic=1 then
NewsSqls=NewsSqls&" and homepic="&homepic&""
End If
If homehot=1 then
NewsSqls=NewsSqls&" and homehot="&homehot&""
End If
NewsSqls=NewsSqls&" order by "&order&""
html=""
If num<>0 Then
NewsSql = "Select top "&num&" * from JOB_hrnews"&NewsSqls&""
Else
NewsSql = "Select * from JOB_hrnews"&NewsSqls&""
End If
NewsRS.open NewsSql,conn,1,1
If Not NewsRS.EOF Then
html=html&"<table width=100% border=0 align=center cellpadding=0 cellspacing=0 >"
html=html&"<tr>"
b=0
Do While Not NewsRS.EOF
b=b+1
if imgs<>0 then
html=html&"<td width=8 height=20><img src='"&InstallDir&"skin/default/arrow.gif' width=3 height=5></td>"
end if
html=html&"<td><a href="&FormatLink(NewsRS("Dateandtime"),NewsRS("type_fid"),NewsRS("Typeid"),NewsRS("newsid"),0)&" target="&target&">"&AppendColor(NewsRS("title"),font_left)&""
if suffix<>0 then
html=html&"..."
end if
html=html&"</a></td>"
if dates<>0 then
html=html&"<td align=right>"&FormatDate(NewsRS("Dateandtime"),dates)&"</td>"
end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -