<%if Application("FormatAppLink")="" then
Call FormatAppLink()
end if
Sub ShowCloseandOpen(str)
response.Write  "<table width=100% height=100% border=0 cellspacing=0 cellpadding=0>"
response.Write  "<tr>"
response.Write  "  <td>"
response.Write	"	<TABLE WIDTH=356 BORDER=0 CELLPADDING=0 CELLSPACING=0 align=center>"
response.Write	"		<TR><TD ROWSPAN=3><IMG SRC='images/err-1_1.gif' WIDTH=36 HEIGHT=160></TD>"
response.Write	"			<TD background='images/err-1_2.gif' WIDTH=280 HEIGHT=10></TD>"
response.Write	"			<TD ROWSPAN=3><IMG SRC='images/err-1_3.gif' WIDTH=40 HEIGHT=160></TD></TR>"
response.Write	"		<TR><TD background='images/err-1_4.gif' HEIGHT=139 align=center><strong>暂时禁止访问，原因：<br><br><font color=red>"&str&"</font><br><br>请稍后再来访问！</strong></TD></TR>"
response.Write	"		<TR><TD WIDTH=280 HEIGHT=11 background='images/err-1_5.gif'></TD></TR>"
response.Write	"	</TABLE>"
response.Write	"	</td>"
response.Write  "</tr>"
response.Write  "</table>"
response.end
End Sub
Sub CloseAndOpen(num) '关闭网站,及各栏目注册开关
set rs=server.CreateObject("adodb.recordset")
sql="select openandclose from JOB_siteconfig"
rs.open sql,conn,1,1
openandclose=rs("openandclose")
fl=split(rs("openandclose"),",")
citymailkey0=fl(0)
citymailkey1=fl(1)
citymailkey2=fl(2)  
citymailkey3=fl(3)
citymailkey4=fl(4)
citymailkey5=fl(5)
citymailkey6=fl(6)
citymailkey7=fl(7)
citymailkey8=fl(8)
citymailkey9=fl(9)
citymailkey10=fl(10)
citymailkey11=fl(11)
rs.close
set rs=nothing
select case num
case 1
	if citymailkey0=1 then Call ShowCloseandOpen(citymailkey1)
case 2
	if citymailkey2=1 then Call ShowCloseandOpen(citymailkey3)
case 3
	if citymailkey4=1 then Call ShowCloseandOpen(citymailkey5)
case 4
	if citymailkey6=1 then Call ShowCloseandOpen(citymailkey7)
case 5
	if citymailkey8=1 then Call ShowCloseandOpen(citymailkey9)
case 6
	if citymailkey10=1 then Call ShowCloseandOpen(citymailkey11)
end select
end sub
Sub head()
headhtml="{$FR_网站标准头}"
headhtml=ReplaceLableFlag(ReplaceAllLabel(headhtml))
Response.Write(CreateHTMLReplace(headhtml))
End Sub
Sub bottom()
headhtml="{$FR_版权信息}"
headhtml=ReplaceLableFlag(ReplaceAllLabel(headhtml))
headhtml=Replace(headhtml,"{$FR_页尾导航}",GetSitebottomnav())
Response.Write(CreateHTMLReplace(headhtml))
end sub 
Function UpFilesPath(FilesPath)
Set fso = Server.CreateObject(FR_HR_FSO)
if not fso.FolderExists(server.MapPath(InstallDir&FR_UPFILES_DIR&"/"&FilesPath)) Then   
fso.CreateFolder (server.MapPath(InstallDir&FR_UPFILES_DIR&"/"&FilesPath))
end if
Session("sUploadDir")= InstallDir&FR_UPFILES_DIR&"/"&FilesPath&"/"
UpFilesPath=Session("sUploadDir")
End Function
'*******************************************************
'读取文件创建时间
'*******************************************************
Function ShowFileInfo(filespec)   
   Dim fso,f   
   Set fso=CreateObject(FR_HR_Fso)   
   Set f= fso.GetFile(Server.MapPath(filespec))   
   ShowFileInfo=f.DateLastModified
End Function
'*******************************************************
'标签转换函数
'*******************************************************
function CreateHTMLReplace(html)
 if html<>"" and not isnull(html) then
	HTMLCode=Replace(html,"{$FR_网站名称}",SiteName)
	HTMLCode=Replace(HTMLCode,"{$FR_网站标题}",SiteTitle)
	HTMLCode=Replace(HTMLCode,"{$FR_网站网址}",SiteUrl)
	HTMLCode=Replace(HTMLCode,"{$FR_LOGO地址}",LogoUrl)
	HTMLCode=Replace(HTMLCode,"{$FR_网站版权}",Copyright)
	HTMLCode=Replace(HTMLCode,"{$FR_网站关键字}",Meta_Keywords)
	HTMLCode=Replace(HTMLCode,"{$FR_网站描述}",Meta_Description)
	HTMLCode=Replace(HTMLCode,"{$FR_联系人}",ContactMan)
	HTMLCode=Replace(HTMLCode,"{$FR_联系地址}",ContactAddress)
	HTMLCode=Replace(HTMLCode,"{$FR_联系电话}",ContactPhone)
	HTMLCode=Replace(HTMLCode,"{$FR_联系传真}",ContactFax)
	HTMLCode=Replace(HTMLCode,"{$FR_管理员名称}",WebmasterName)
	HTMLCode=Replace(HTMLCode,"{$FR_管理员邮箱}",WebmasterEmail)
	HTMLCode=Replace(HTMLCode,"{$FR_系统目录}",InstallDir)
	HTMLCode=Replace(HTMLCode,"{$FR_管理员目录}",AdminDir)
	HTMLCode=Replace(HTMLCode,"{$FR_HTML目录}",HTMLPath)
	HTMLCode=Replace(HTMLCode,"{$FR_网站样式}",MainWebCss)
	HTMLCode=Replace(HTMLCode,"{$FR_网站导航}",GetSitenav(str))
	HTMLCode=Replace(HTMLCode,"{$FR_页尾导航}",GetSitebottomnav())	
 CreateHTMLReplace=HTMLCode
 end if
end function

'******************************************
myarray = array ("网站首页模板","频道首页模板","列表页模板","内容页模板","搜索页模板","公告页模板","公告列表页模板","友情连接页模板","网站调查页模板","通用页面模板","会员注册页模板","职位信息模板","企业简介模板","个人简历模板","职位列表模板","密码找回模板","猎头项目介绍","猎头职位列表","猎头职位内容","在线支付模板","评论页模板")
Groupid = array ("1","2")
Grouptype = array ("个人会员","企业会员")
'******************************************
'函数名: Show_Err()
'作用:显示错误信息
'参数:无
'返回值：无
'******************************************
Sub Show_Err()
	Err.Clear
	Dim HtmlStr
		HtmlStr="<table width='100%' border='0' align='center' cellpadding='3' cellspacing='1' class='tableBorder mt6'>" & vbcrlf
		HtmlStr=HtmlStr&"	<tr class='topbg'><th class='tableHeaderText' height=22>操作失败！</th></tr>" & vbcrlf
		HtmlStr=HtmlStr&"	<tr><td height='100' valign='top' style='padding-left:10px;'><br><b>错误提示:</b>" & ErrMsg &"</td></tr>" & vbcrlf
		HtmlStr=HtmlStr&"	<tr align='center'><td><input name='goBack' type='button' value=' 返 回 ' class='inputs' onClick='javascript:history.back()'></td></tr>" & vbcrlf
		HtmlStr=HtmlStr&"</table>" & vbcrlf
		Response.Write HtmlStr
End Sub
'******************************************
'函数名: Show_Suc()
'作用:显示成功信息
'参数:InFo，Url
'返回值：无
'******************************************
Sub Show_Suc(InFo,Url)
   Dim HtmlStr
	  HtmlStr="<table width='100%' border='0' align='center' cellpadding='3' cellspacing='1' class='tableBorder mt6'>" & vbcrlf
	  HtmlStr=HtmlStr&"	<tr class='topbg'><th class='tableHeaderText' height=22>操作成功！</th></tr>" & vbcrlf
	  HtmlStr=HtmlStr&"	<tr><td height='100' valign='top' style='padding-left:10px;'><br><b>成功提示:</b>" & InFo &"</td></tr>" & vbcrlf
		HtmlStr=HtmlStr&"	<tr align='center'><td><a href='"&Url&"'>返回</a></td></tr>" & vbcrlf
	  HtmlStr=HtmlStr&"</table>" & vbcrlf
	  Response.Write HtmlStr 
End Sub

Function ChannelNametitle(wid)
	if wid<>"" then
		sql="select ChannelName from JOB_Channel where ChannelID = "&wid
		set rsc=conn.execute(sql)
		if not rsc.eof then
			ChannelNametitle=rsc("ChannelName")
		end if
		rsc.close
		set rsc=nothing
	end if
End Function
'**************************************************
'函数名:JoinChar
'作用：向地址中加入 ? 或 &
'参数：strurl --网址
'返回值： 加了 ? 或 & 的网址
'**************************************************
Function JoinChar(strUrl)
	if strUrl="" then
		JoinChar=""
		exit function
	end if
	if InStr(strUrl,"?")<len(strUrl) then 
		if InStr(strUrl,"?")>1 then
			if InStr(strUrl,"&")<len(strUrl) then 
				JoinChar=strUrl & "&"
			else
				JoinChar=strUrl
			end if
		else
			JoinChar=strUrl & "?"
		end if
	else
		JoinChar=strUrl
	end if
End Function
'******************************************
'新闻标题颜色处理(去色)
'******************************************
Function ClearColor(msg)
	if msg="" then
		exit function
	end if
	if left(msg,5)="<font" then
		msg=right(msg,len(msg)-20)
		msg=left(msg,len(msg)-7)
	end if
	ClearColor=msg
End Function
'******************************************
'新闻标题颜色处理(加色截取长度)
'******************************************
Function AppendColor(msg,num)
	if msg="" then
		exit function
	end if
	if not isNumeric(num) then
		num=20
	end if
	if left(msg,5)="<font" then
		msgcolorl=left(msg,20)
		msgcolorr=right(msg,7)
		msg=right(msg,len(msg)-20)
		msg=left(msg,len(msg)-7)
	end if
	msg=left(msg,num)
	msg=msgcolorl&msg&msgcolorr
	AppendColor=msg
End Function
'******************************************
'函数名: Showpage(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
'作用:返回分页连接
'参数:sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnitU
'返回值：
'******************************************
Function showpage(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
	dim n, i,strTemp,strUrl
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
	strTemp=strTemp & "共 <font color=""#0000FF""><b>" & totalnumber & "</b></font> " & strUnit & "&nbsp;&nbsp;&nbsp;"
	strUrl=JoinChar(sfilename)
  	if Page<2 then
    	strTemp=strTemp & "首页 上一页&nbsp;"
  	else
		strTemp=strTemp & "<a href=""" & strUrl & "page=1"">首页</a>&nbsp;"
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & (Page-1) & """>上一页</a>&nbsp;"
	end if

  	if n-Page<1 then
    	strTemp=strTemp & "下一页 尾页"
  	else
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & (Page+1) & """>下一页</a>&nbsp;"
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & n & """>尾页</a>"
  	end if
   	strTemp=strTemp & "&nbsp;页次：<strong><font color=""#FF0000"">" & Page & "</font>/" & n & "</strong>页 "
    strTemp=strTemp & "&nbsp;<b>" & maxperpage & "</b>" & strUnit & "/页"& vbCrLf
	if ShowAllPages=True then
		strTemp=strTemp & "&nbsp;转到：<select name=""page"" size=""1"" onchange=""javascript:window.location='" & strUrl & "page=" & "'+this.options[this.selectedIndex].value;"">"& vbCrLf
		for i = 1 to n   
			strTemp=strTemp & "<option value=""" & i & """"
			if cint(Page)=cint(i) then strTemp=strTemp & " selected "
			strTemp=strTemp & ">第" & i & "页</option>"   
		next
		strTemp=strTemp & "</select>"& vbCrLf
	end if
	strTemp=strTemp
	response.write strTemp
End Function
'******************************************
'函数名: Showpages(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
'作用:返回分页连接
'参数:sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnitU
'返回值：
'******************************************
Function showpages(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
	dim n, i,strTemp,strUrl
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
  	strTemp= "<table align=""center""><tr><td>"& vbCrLf
	strTemp=strTemp & "共<font color=""#0000FF""><b>" & totalnumber & "</b></font>" & strUnit & "&nbsp;"
	strUrl=JoinChar(sfilename)
  	if Page<2 then
    	strTemp=strTemp & "首页 上一页&nbsp;"
  	else
		strTemp=strTemp & "<a href=""" & strUrl & "page=1"">首页</a>&nbsp;"
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & (Page-1) & """>上一页</a>&nbsp;"
	end if

  	if n-Page<1 then
    	strTemp=strTemp & "下一页 尾页"
  	else
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & (Page+1) & """>下一页</a>&nbsp;"
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & n & """>尾页</a>"
  	end if
   	strTemp=strTemp & "&nbsp;页次：<strong><font color=""#FF0000"">" & Page & "</font>/" & n & "</strong>页 "
    strTemp=strTemp & "&nbsp;<b>"&maxperpage&"</b>" & strUnit & "/页"& vbCrLf
	if ShowAllPages=True then
		strTemp=strTemp & "<select name=""page"" size=""1"" onchange=""javascript:window.location='" & strUrl & "page=" & "'+this.options[this.selectedIndex].value;"">"& vbCrLf
		for i = 1 to n   
			strTemp=strTemp & "<option value=""" & i & """"
			if cint(Page)=cint(i) then strTemp=strTemp & " selected "
			strTemp=strTemp & ">第" & i & "页</option>"   
		next
		strTemp=strTemp & "</select>"& vbCrLf
	end if
	strTemp=strTemp & "</td></tr></table>"& vbCrLf
	showpages=strTemp
End Function
'********************************************************
'连接地址创建缓存
'********************************************************
Function FormatAppLink()
if CreateHTML=1 or CreateHTML=2 then
	AppLink="L_0:"&InstallDir&"index."&DefaulText    ' 首页链接地址
else
	AppLink="L_0:"&InstallDir&"index.asp"
end if
Set rsc=conn.execute("select * from JOB_Channel where ChannelType<>2")
If rsc.eof Then
	rsc.close:Set rsc=Nothing
Else
	Do While not rsc.eof
	UseCreateHTML=rsc("UseCreateHTML"):ChannelDir=rsc("ChannelDir"):FileExt_Index=rsc("FileExt_Index"):FileExt_List=rsc("FileExt_List"):FileNameType=rsc("FileNameType"):ListFileType=rsc("ListFileType"):StructureType=rsc("StructureType"):ModuleType=rsc("ModuleType"):ChannelID=rsc("ChannelID")
	If UseCreateHTML<>0 and CreateHTML=1 then
		LinkAppUrl=InstallDir&HTMLPath&ChannelDir   '频道文件生成目录
		Select Case FileExt_Index  '频道首页
			Case 0:lists=".html":Case 1:lists=".htm":Case 2:lists=".shtml":Case 3:lists=".shtm":Case 4:lists=".asp"
		End Select
		AppLink=AppLink&(",L_"&ChannelID&":"&LinkAppUrl&"/index"&lists&"")
		Select Case FileExt_List  '频道列表页
			Case 0:lists=".html":Case 1:lists=".htm":Case 2:lists=".shtml":Case 3:lists=".shtm":Case 4:lists=".asp"
		End Select
		Select Case ListFileType
			Case 0:AppLink=AppLink&(",L_"&ChannelID&"_0:"&LinkAppUrl&"/list/list_{Tid}{_Pnum}")
			Case 1:AppLink=AppLink&(",L_"&ChannelID&"_0:"&LinkAppUrl&"/list_{Tid}{_Pnum}")
			Case 2:AppLink=AppLink&(",L_"&ChannelID&"_0:"&LinkAppUrl&"/list-typeid-{Tid}{-Pnum}")
		End Select
		AppLink=AppLink&lists&""
		Select Case FileExt_Item   '频道内容页
			Case 0:htmls=".html":Case 1:htmls=".htm":Case 2:htmls=".shtml":Case 3:htmls=".shtm":Case 4:htmls=".asp"
		End Select
		Select Case ModuleType
			Case 1:AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/person_{Nid}"&lists&"")
			Case 2
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/company_{Nid}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/hires_{Nid}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/hire_{Nid}"&lists&"")
			Case 3
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/school_more_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/school_view_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/professor_more_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/professor_info_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_4_0:"&LinkAppUrl&"/student_more_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_5_0:"&LinkAppUrl&"/student_info_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_6_0:"&LinkAppUrl&"/department_more_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_7_0:"&LinkAppUrl&"/department_info_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_8_0:"&LinkAppUrl&"/require_more_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_9_0:"&LinkAppUrl&"/require_info_{Nid}{_Pnum}"&lists&"")
			Case 4
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/index{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/hr_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/hr_zp{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/hr_hire_{Nid}{_Pnum}"&lists&"")
			Case 5
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/train_more_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/train_view_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/course_more_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/course_info_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_4_0:"&LinkAppUrl&"/trainer_more_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_5_0:"&LinkAppUrl&"/trainer_info_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_6_0:"&LinkAppUrl&"/teachers_info_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_7_0:"&LinkAppUrl&"/achievement_info_{Nid}{_Pnum}"&lists&"")
				AppLink=AppLink&(",L_"&ChannelID&"_8_0:"&LinkAppUrl&"/contact_{Nid}{_Pnum}"&lists&"")
			Case 6 '留言
			Case 7 '测评
			Case 8 '派遣
			Case 9 '下载
			Case 10 '文章
				Select Case FileNameType
					Case 0:htmlFileName="{Nid}"
					Case 1:htmlFileName="{Dates7}"
					Case 2:htmlFileName=ChannelDir&"_{Nid}"
					Case 3:htmlFileName=ChannelDir&"_{Dates7}"
					Case 4:htmlFileName="article-newsid-{Nid}"
				End Select
				If FileNameType=4 then:htmlFileName=htmlFileName&"{-Pnum}":else:htmlFileName=htmlFileName&"{_Pnum}":end If
				Select Case StructureType
					Case 0:AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/html/"&htmlFileName&htmls&"")
					Case 1:AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/{Dates5}/"&htmlFileName&htmls&"")
					Case 2:AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/"&htmlFileName&htmls&"")
				End Select
			Case 11 '论坛频道
			Case 12 '视频招聘
			Case 13 '视频求职
			Case 14 '帮助
			Case 15 '分站
		End Select
	ElseIf UseCreateHTML<>0 and CreateHTML=2 then
		LinkAppUrl=InstallDir&ChannelDir   '频道文件目录
		AppLink=AppLink&(",L_"&ChannelID&":"&LinkAppUrl&"/index.html")
		select Case ModuleType
			Case 1:AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/cnresume_view-rid-{Nid}.html")
			Case 2
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/company-comid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/hires-comid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/hire-hireid-{Nid}.html")
			Case 3
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/school_more-sid-{Nid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/school_view-sid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/professor_more-sid-{Nid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/professor_info-pid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_4_0:"&LinkAppUrl&"/student_more-sid-{Nid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_5_0:"&LinkAppUrl&"/student_info-sid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_6_0:"&LinkAppUrl&"/department_more-sid-{Nid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_7_0:"&LinkAppUrl&"/department_info-did-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_8_0:"&LinkAppUrl&"/require_more-sid-{Nid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_9_0:"&LinkAppUrl&"/require_info-rid-{Nid}.html")
			Case 4
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/index.html")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/hr-hrid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/hr_zp.html")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/hr_hire-id-{Nid}.html")
			Case 5
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/train_more-tid-{Nid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/train_view-tid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/course_more-tid-{Nid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/course_info-cid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_4_0:"&LinkAppUrl&"/trainer_more-tid-{Nid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_5_0:"&LinkAppUrl&"/trainer_info-tid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_6_0:"&LinkAppUrl&"/teachers_info-tid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_7_0:"&LinkAppUrl&"/achievement_info-tid-{Nid}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_8_0:"&LinkAppUrl&"/contact-tid-{Nid}.html")
			Case 6
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/index.html")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/index-page{-Pnum}.html")
			Case 7
			Case 8
			Case 9
			Case 10
				AppLink=AppLink&(",L_"&ChannelID&"_0:"&LinkAppUrl&"/list-typeid-{Tid}{-Pnum}.html")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/article-newsid-{Nid}{-Pnum}.html")
			Case 11 '论坛频道
			Case 12 '视频招聘
			Case 13 '视频求职
			Case 14 '帮助
			Case 15 '分站
		End Select
	Else
		LinkAppUrl=InstallDir&ChannelDir
		AppLink=AppLink&(",L_"&ChannelID&":"&LinkAppUrl&"/index.asp")
		select Case ModuleType
			Case 1:AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/cnresume_view.asp?rid={Nid}{&page=Pnum}")
			Case 2
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/company.asp?comid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/hires.asp?comid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/hire.asp?hireid={Nid}{&page=Pnum}")
			Case 3
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/School_More.asp?sid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/School_View.asp?sid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/Professor_More.asp?sid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/Professor_Info.asp?pid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_4_0:"&LinkAppUrl&"/Student_More.asp?sid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_5_0:"&LinkAppUrl&"/Student_Info.asp?sid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_6_0:"&LinkAppUrl&"/Department_More.asp?sid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_7_0:"&LinkAppUrl&"/Department_Info.asp?did={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_8_0:"&LinkAppUrl&"/Require_More.asp?sid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_9_0:"&LinkAppUrl&"/Require_info.asp?rid={Nid}{&page=Pnum}")
			Case 4
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/index.asp{?page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/hr.asp?hrid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/hr_zp.asp{?page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/hr_hire.asp?id={Nid}{&page=Pnum}")
			Case 5
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/Train_More.asp?tid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/Train_View.asp?tid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_2_0:"&LinkAppUrl&"/Course_More.asp?tid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_3_0:"&LinkAppUrl&"/Course_Info.asp?cid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_4_0:"&LinkAppUrl&"/Trainer_More.asp?tid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_5_0:"&LinkAppUrl&"/Trainer_Info.asp?tid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_6_0:"&LinkAppUrl&"/Teachers_Info.asp?tid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_7_0:"&LinkAppUrl&"/Achievement_Info.asp?tid={Nid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_8_0:"&LinkAppUrl&"/Contact.asp?tid={Nid}{&page=Pnum}")
			Case 6
				AppLink=AppLink&(",L_"&ChannelID&"_0_0:"&LinkAppUrl&"/index.asp{?page=Pnum}")
			Case 7
			Case 8
			Case 9
			Case 10
				AppLink=AppLink&(",L_"&ChannelID&"_0:"&LinkAppUrl&"/List.asp?typeid={Tid}{&page=Pnum}")
				AppLink=AppLink&(",L_"&ChannelID&"_1_0:"&LinkAppUrl&"/Article.asp?newsid={Nid}{&page=Pnum}")
			Case 11 '论坛频道
			Case 12 '视频招聘
			Case 13 '视频求职
			Case 14 '帮助
			Case 15 '分站
		End Select
	end if
	rsc.movenext
	loop
End If
rsc.close:Set rsc=Nothing
Application.Lock
Application("FormatAppLink")=AppLink
Application.UnLock
FormatAppLink=Application("FormatAppLink")
End Function
'********************************************************
'连接地址缓存格式化
'********************************************************
Function LinkArray(Arr)
if Application("FormatAppLink")="" then
Call FormatAppLink()
end if
AppLinkArray=Application("FormatAppLink")
AppLinkArrays=split(AppLinkArray,",")
For l=0 to Ubound(AppLinkArrays)
if InStr(AppLinkArrays(l),Arr)>0 then
LinkArray=Replace(AppLinkArrays(l),Arr,"")
end if
Next
End Function
'********************************************************
'连接地址格式化(非生成)
'********************************************************
Function FormatLink(Dates,Cid,Tid,Nid,Pnum)
	If Not (isNumeric(Cid) And isNumeric(Nid) And isNumeric(Tid) And isNumeric(Pnum)) Then Exit Function
	if Nid=0 and Tid=0 then LinkUrl=LinkArray("L_"&Cid&":")
	if Tid<>0 and Nid=0 then LinkUrl=LinkArray("L_"&Cid&"_0:")
	if Tid=0 and Nid<>0 then LinkUrl=LinkArray("L_"&Cid&"_0_0:")
	if Tid<>0 and Nid<>0 then LinkUrl=LinkArray("L_"&Cid&"_"&Tid&"_0:")
	LinkUrl=Replace(LinkUrl,"{Tid}",Tid):LinkUrl=Replace(LinkUrl,"{Nid}",Nid)
	If Pnum<>0 and Pnum<>1 then
		LinkUrl=Replace(LinkUrl,"{_Pnum}","_"&Pnum):LinkUrl=Replace(LinkUrl,"{-Pnum}","-"&Pnum):LinkUrl=Replace(LinkUrl,"{?page=Pnum}","?page="&Pnum):LinkUrl=Replace(LinkUrl,"{&page=Pnum}","&page="&Pnum)
	else
		LinkUrl=Replace(LinkUrl,"{_Pnum}",""):LinkUrl=Replace(LinkUrl,"{-Pnum}",""):LinkUrl=Replace(LinkUrl,"{?page=Pnum}",""):LinkUrl=Replace(LinkUrl,"{&page=Pnum}","")
	end if
	if Dates<>"" then LinkUrl=Replace(LinkUrl,"{Dates7}",FormatDate(Dates,7)):LinkUrl=Replace(LinkUrl,"{Dates5}",FormatDate(Dates,5))
FormatLink=LinkUrl
End Function

Function Create_Directory(strlocalpath)
Create_Directory = false
dim strlocalfolder
dim strpath, tmppath, tmptpath
dim arrpathlist, intlevel
strlocalfolder = server.mappath(InstallDir)
if left(strlocalpath, len(strlocalfolder)) <> strlocalfolder then
exit function
end if
'获得目录
strpath= replace(strlocalpath, strlocalfolder, "")
if left(strpath, 1) = "\" then
strpath = right(strpath, len(strpath) - 1)
end if
dim objfolder
set objfolder = server.createobject("Scripting.FileSystemObject")
' 如果该目录已存在, 则返回 true
if objfolder.folderexists(strlocalpath) then
Create_Directory = true
exit function
end if
arrpathlist= split(strpath, "\")
intlevel= ubound(arrpathlist)
dim i
tmptpath = ""
for i = 0 to intlevel
tmptpath = tmptpath & arrpathlist(i) & "\"
tmppath = strlocalfolder & "\" & tmptpath
if not objfolder.folderexists(tmppath) then objfolder.createfolder tmppath
next
set objfolder = nothing
Create_Directory = true
End Function
'********************************************************
'连接地址格式化
'********************************************************
Function FormatLinks(Dates,Cid,Tid,Nid,Pnum)
	If Not (isNumeric(Cid) And isNumeric(Nid) And isNumeric(Tid) And isNumeric(Pnum)) Then Exit Function
	if Nid=0 and Tid=0 then LinkUrl=LinkArray("L_"&Cid&":")
	if Tid<>0 and Nid=0 then LinkUrl=LinkArray("L_"&Cid&"_0:")
	if Tid=0 and Nid<>0 then LinkUrl=LinkArray("L_"&Cid&"_0_0:")
	if Tid<>0 and Nid<>0 then LinkUrl=LinkArray("L_"&Cid&"_"&Tid&"_0:")
	LinkUrl=Replace(LinkUrl,"{Tid}",Tid):LinkUrl=Replace(LinkUrl,"{Nid}",Nid)
	If Pnum<>0 and Pnum<>1 then
		LinkUrl=Replace(LinkUrl,"{_Pnum}","_"&Pnum):LinkUrl=Replace(LinkUrl,"{-Pnum}","-"&Pnum):LinkUrl=Replace(LinkUrl,"{?page=Pnum}","?page="&Pnum):LinkUrl=Replace(LinkUrl,"{&page=Pnum}","&page="&Pnum)
	else
		LinkUrl=Replace(LinkUrl,"{_Pnum}",""):LinkUrl=Replace(LinkUrl,"{-Pnum}",""):LinkUrl=Replace(LinkUrl,"{?page=Pnum}",""):LinkUrl=Replace(LinkUrl,"{&page=Pnum}","")
	end if
	if Dates<>"" then LinkUrl=Replace(LinkUrl,"{Dates7}",FormatDate(Dates,7)):LinkUrl=Replace(LinkUrl,"{Dates5}",FormatDate(Dates,5))
	if LinkUrl<>"" then
		LinkUrls=split(LinkUrl, "/")
		StrTpath=Replace(LinkUrl,LinkUrls(ubound(LinkUrls)),"")
		if right(StrTpath,1)="/" and len(StrTpath)<>1 then StrTpath=left(StrTpath,len(StrTpath)-1)
		strpath=server.MapPath(StrTpath)
	end if	
	If Not(Create_Directory(strpath)) then exit function
FormatLinks=LinkUrl
End Function
'***************************************************
''函数名：AdminCounts
''作  用：通用后台统计函数
''参  数：tabname,zdname,zdvalue,zdnames,zdvalues
''返回值：
'***************************************************
Function AdminCounts(tabname,zdname,zdvalue,zdnames,zdvalues)
Set ACRs=Server.Createobject(FR_HR_Rs)
ACSql="Select count(*) as s From "&tabname&""
if zdname<>"" then
	IF IsNumeric(zdvalue)=False then
	ACSql=ACSql&" where "&zdname&"='"&zdvalue&"'"
	else
	ACSql=ACSql&" where "&zdname&"="&zdvalue&""
	end if
end if
if zdnames<>"" then
	IF IsNumeric(zdvalues)=False then
	ACSql=ACSql&" and "&zdnames&"='"&zdvalues&"'"
	else
	ACSql=ACSql&" and "&zdnames&"="&zdvalues&""
	end if
end if
ACRs.Open ACSql,conn,1,1
AdminCounts=ACRs("s")
ACRs.Close
Set ACRs=Nothing
End Function

Function MemberCount(tabname,zdname,zdvalue)
Set ACRs=Server.Createobject(FR_HR_Rs)
ACSql="Select count(*) as s From "&tabname&""
if zdname<>"" then
ACSql=ACSql&" where "&zdname&"='"&zdvalue&"'"
end if
ACRs.Open ACSql,conn,1,1
MemberCount=ACRs("s")
ACRs.Close
Set ACRs=Nothing
End Function

Function MemberCounts(tabname,zdname,zdvalue,zdnames,zdvalues)
Set ACRs=Server.Createobject(FR_HR_Rs)
ACSql="Select count(*) as s From "&tabname&""
if zdname<>"" then
ACSql=ACSql&" where "&zdname&"='"&zdvalue&"'"
end if
if zdnames<>"" then
ACSql=ACSql&" and "&zdnames&"="&zdvalues&""
end if
ACRs.Open ACSql,conn,1,1
MemberCounts=ACRs("s")
ACRs.Close
Set ACRs=Nothing
End Function

Function AdminCount(tid,Aud)
Set Rs=Server.Createobject(FR_HR_Rs)
Sql="Select count(*) as s From JOB_Member"
if tid<>0 then
Sql=Sql&" Where Member_typeid="&tid&""
end if
If Aud=0 then
	if tid<>0 then
	Sql=Sql&" and Member_flag="&Aud&""
	else
	Sql=Sql&" where Member_Auditing="&Aud&""
	end if
end if
Rs.Open Sql,conn,1,1
AdminCount=Rs("s")
Rs.Close
Set Rs=Nothing
End Function
'********************************************************
'日期格式化
'********************************************************
Function FormatDate(DT,tp)
	dim Y,M,D
	Y=Year(DT)
	M=month(DT)
	D=Day(DT)
	H=Hour(DT)
	MI=Minute(DT)
	S=Second(DT)
	if M<10 then M="0"&M
	if D<10 then D="0"&D
	if H<10 then H="0"&H
	if MI<10 then MI="0"&MI
	if S<10 then S="0"&S
	select case tp
	case 1 FormatDate=Y&"年"&M&"月"&D&"日"
	case 2 FormatDate=Y&"/"&M&"/"&D
	case 3 FormatDate=M&"/"&D
    case 4 FormatDate=Y&"\"&M&"\"&D
	case 5 FormatDate=Y&M
	case 6 FormatDate=Y&M&D
	case 7 FormatDate=Y&M&D&H&MI&S
	case 8 FormatDate=Y&"-"&M&"-"&D
	case 9 FormatDate=M&"-"&D
	end select
End Function
'**************************************************
'函数名：IsObjInstalled
'作  用：检测组件
'参  数：strClassString   ----组件名
'返回值：True 或 False
'**************************************************
Function IsObjInstalled(strClassString)
	On Error Resume Next
	IsObjInstalled = False
	Err = 0
	Dim xTestObj
	Set xTestObj = Server.CreateObject(strClassString)
	If Err = 0 Then IsObjInstalled = True
	If Err = -2147352567 Then IsObjInstalled = True
	Set xTestObj = Nothing
	Err = 0
End Function
'**************************************************
'函数名：CheckStr
'作  用：检测ID值
'参  数：Str   ----字符
'返回值：True 或 False
'**************************************************
function CheckStr(str)
	if str<>"" and not isnull(str) then 
		str = replace(str,Chr(0),"")
		CheckStr=replace(str,"'","&#39;")
		CheckStr=replace(CheckStr, ">", "&gt;")
		CheckStr=replace(CheckStr, "<", "&lt;")
		CheckStr=replace(CheckStr, " ", "&nbsp;")
	end if
end function
function CheckStrbox(str)
 if str<>"" and not isnull(str) then 
   CheckStrbox=replace(str,"'","&#39;")
   CheckStrbox=replace(CheckStrbox, ">", "&gt;")
   CheckStrbox=replace(CheckStrbox, "<", "&lt;")
   CheckStrbox=replace(CheckStrbox, " ", "&nbsp;")
   CheckStrbox=replace(CheckStrbox, chr(13), "<br>")
 end if
end function
function ChangeStrbox(str)
 if str<>"" and not isnull(str) then 
   ChangeStrbox=replace(str,"<br>" ,chr(13))
 end if
end function
function lenmix(checkstr)
   lenTotal = 0
   for i=1 to Len(checkstr)
   strWord = mid(checkstr,i,1)
   if asc(strWord) < 0 or asc(strWord) > 127 then
    lenTotal = lenTotal + 2
   else
    lenTotal = lenTotal + 1
   end if
   next
   lenmix = lentotal
end function
function CheckStrHTML(str)
 if str<>"" and not isnull(str) then 
	CheckStrHTML=trim(str)
	CheckStrHTML=replace(CheckStrHTML, "&nbsp;", " ")
	CheckStrHTML=RemoveHTML(CheckStrHTML)
 end if
end function
'**************************************************
'函数名：RemoveHTML
'作  用：过滤HTML
'参  数：strHTML
'返回值：
'**************************************************
Function RemoveHTML(strHTML) 
Dim objRegExp, Match, Matches 
Set objRegExp = New Regexp 
objRegExp.IgnoreCase = True 
objRegExp.Global = True 
'取闭合的<> 
objRegExp.Pattern = "<.+?>" 
'进行匹配 
Set Matches = objRegExp.Execute(strHTML) 
' 遍历匹配集合，并替换掉匹配的项目 
For Each Match in Matches 
strHtml=Replace(strHTML,Match.Value,"") 
Next 
RemoveHTML=strHTML 
Set objRegExp = Nothing 
End Function
'**************************************************
'函数名：Encode,HTMLDecode
'作  用：转换字符
'参  数：fString
'返回值：
'**************************************************
function Encode(fString)
if not isnull(fString) then
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")
    fString = Replace(fString, " ", "&nbsp;")
    fString = Replace(fString, CHR(32), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#39;")
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
    fString = Replace(fString, CHR(10), "<BR>")
    Encode = fString
end if
end function

function HTMLDecode(fString)
if not isnull(fString) then
    fString = replace(fString, "&gt;", ">")
    fString = replace(fString, "&lt;", "<")
    fString = replace(fString, "&nbsp;", " ")
    fString = Replace(fString, "", CHR(13))
    fString = Replace(fString, "</P><P>", CHR(10) & CHR(10))
    fString = Replace(fString, "<BR>", CHR(10))
    HTMLDecode = fString
end if
end function
'**************************************************
'函数名：Buffer()
'作  用：是否缓存输出
'参  数：NumStr
'返回值：1
'**************************************************
Function Buffer(NumStr)
    If NumStr=True then
	Response.Buffer = True 
	Response.Expires = -1
	Response.ExpiresAbsolute = Now() - 1 
	Response.Expires = 0 
	Response.CacheControl = "no-cache" 
    End if
End Function
'**************************************************
'函数名：encrypt()
'作  用：加密字符串
'参  数：ecode
'返回值：
'**************************************************
function encrypt(ecode)
	Dim texts
	dim i
	for i=1 to len(ecode)
	texts=texts & chr(asc(mid(ecode,i,1))+i)
	next
	encrypt = texts
	end function 
'**************************************************
'函数名：decrypt()
'作  用：解密字符串
'参  数：dcode
'返回值：
'**************************************************
function decrypt(dcode)	
  	dim texts
	dim i
	for i=1 to len(dcode)
		texts=texts & chr(asc(mid(dcode,i,1))-i)
	next
	decrypt=texts
end function 
'********************************************************
'检查是否外部提交数据
'********************************************************
Function ChkPost()
dim Server_v1,Server_v2
	ChkPost=False
	Server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
	Server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
	IF mid(Server_v1,8,len(Server_v2))<>Server_v2 then
		 ChkPost=False
	Else
		 ChkPost=True
	End IF	
End Function

'********************************************************
'过滤SQL非法字符并格式化html代码
'********************************************************
function Replace_Text(fString)
if isnull(fString) then
Replace_Text=""
exit function
else
fString=trim(fString)
fString=replace(fString,"'","''")
fString=replace(fString,";","；")
fString=replace(fString,"--","—")
fString=server.htmlencode(fString)
Replace_Text=fString
end if	
end function

'********************************************************
'判断是否为数字
'********************************************************
Function my_request(ParaName,ParaType)
  Dim ParaValue
  ParaValue=Request(ParaName)
  If ParaType=1 Then
    If Not isNumeric(ParaValue) Then
       response.write "非法操作"
	   response.End()
    end if
  Else
    ParaValue=replace(ParaValue,"'","''")
  End if
  my_request=ParaValue
End function
'********************************************************
'监测输入是否正确
'********************************************************
Function YesorNo(fString)
if fstring=1 or fstring=0 then
yesorno=true
else
yesorno=false
end if
End function

'********************************************************
'检测传递的参数是否为数字型 主要用于检测id
'********************************************************
Function Chkrequest(Para)
Chkrequest=False
If Not (IsNull(Para) Or Trim(Para)="" Or Not IsNumeric(Para)) Then
   Chkrequest=True
End If
End Function

'********************************************************
'检测传递的参数是否为合法 主要用于检测id
'********************************************************
Function Chkint(ParaValue)
If Chkrequest(ParaValue)=False Then
   response.write "非法操作"
   response.End()
else
Chkint=ParaValue
end if
End Function

'********************************************************
'检测传递的参数是否为日期型
'********************************************************
Function Chkrequestdate(Para)
Chkrequestdate=False
If Not (IsNull(Para) Or Trim(Para)="" Or Not IsDate(Para)) Then
   Chkrequestdate=True
End If
End Function
'********************************************************
'转换IP   IP--LNG
'********************************************************
Function CLngIP(ByVal asNewIP)
Dim lnResults
Dim lnIndex
Dim lnIpAry
lnIpAry = Split(asNewIP, ".", 4)
For lnIndex = 0 To 3
If Not lnIndex = 3 Then
lnIpAry(lnIndex) = lnIpAry(lnIndex) * (256 ^ (3 - lnIndex))
End If
lnResults = lnResults + lnIpAry(lnIndex)
Next
CLngIP = lnResults
End Function 

'********************************************************
'转换IP   STR--IP
'********************************************************
Function CStrIP(ByVal anNewIP)
Dim lsResults
Dim lnTemp
Dim lnIndex

For lnIndex = 3 To 0 Step -1
lnTemp = Int(anNewIP / (256 ^ lnIndex))
lsResults = lsResults & lnTemp & "."
anNewIP = anNewIP - (lnTemp * (256 ^ lnIndex))
Next
lsResults = Left(lsResults, Len(lsResults) - 1)
CStrIP = lsResults
End Function
'********************************************************
'检测广告信息   网站机器人
'********************************************************
Function IsAdsContent(Str)
IsAdsContent=False
If Not IsNull(Str) Then
	If InStr(Str,"http://")>0 then IsAdsContent=True
	If InStr(Str,"QQ")>0 then IsAdsContent=True
	If InStr(Str,"qq")>0 then IsAdsContent=True
	If InStr(Str,"电话")>0 then IsAdsContent=True
	If InStr(Str,"@")>0 then IsAdsContent=True
	If InStr(Str,"www.")>0 then IsAdsContent=True
	If InStr(Str,".com")>0 then IsAdsContent=True
	If InStr(Str,".net")>0 then IsAdsContent=True
	If InStr(Str,".cn")>0 then IsAdsContent=True
End If
End Function
'********************************************************
'Email检测
'********************************************************
function IsValidEmail(email)
dim names, name, i, c
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
   IsValidEmail = false
   exit function
end if
for each name in names
   if Len(name) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then
      IsValidEmail = false
      exit function
   end if
next
if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
end if
if InStr(email, "..") > 0 then
   IsValidEmail = false
end if
end function

Function capitalization(tempstr) 
if left(tempstr,2)="一十" then
tempstr= "十" & right(tempstr,len(tempstr)-2)
end if
capitalization=tempstr
end Function

Function small(x)
Dim xlenght, xunit,xstr, x1, x2
xlenght=len(x)
if xlenght>8 then
x1=left(x,xlenght-8)
x2=right(x,8)
xunit="亿"
if small(x1)="" then
small=small(x2)
else
small=small(x1) & xunit & small(x2)
end if
elseif xlenght>4 then
x1=left(x,xlenght-4)
x2=right(x,4)
xunit="万"
if small(x1)="" then
small=small(x2)
else
small=small(x1) & xunit & small(x2)
end if
elseif xlenght=4 then
xstr=""
if int(left(x,1))=0 then
xstr=xstr & "零"
else 
xstr= xstr & CovNumber(left(x,1)) & "千"
end if
if int(mid(x,2,1))=0 then
xstr= xstr & "零"
else 
xstr= xstr & CovNumber(mid(x,2,1)) & "百"
end if
if int(mid(x,3,1))=0 then
xstr=xstr & "零"
else 
xstr=xstr & CovNumber(mid(x,3,1)) & "十"
end if
xstr=xstr & CovNumber(right(x,1))
while instr(xstr,"零零")>0 
xstr=replace(xstr,"零零","零")
wend
if xstr="零" then
xstr=""
elseif right(xstr,1)="零" then
xstr=left(xstr,len(xstr)-1)
end if
small=xstr
elseif xlenght=3 then
xstr=""
if int(left(x,1))=0 then
xstr=xstr & "零"
else 
xstr= xstr & CovNumber(left(x,1)) & "百"
end if
if int(mid(x,2,1))=0 then
xstr= xstr & "零"
else 
xstr=xstr & CovNumber(mid(x,2,1)) & "十"
end if 
xstr=xstr & CovNumber(right(x,1))
while instr(xstr,"零零")>0 
xstr=replace(xstr,"零零","零")
wend
if xstr="零" then
xstr=""
elseif right(xstr,1)="零" then
xstr=left(xstr,len(xstr)-1)
end if 
small=xstr

elseif xlenght=2 then
xstr=""
if int(left(x,1))=0 then
xstr=xstr & "零"
else 
xstr=xstr & CovNumber(left(x,1)) & "十"
end if 
xstr=xstr & CovNumber(right(x,1))
while instr(xstr,"零零")>0 
xstr=replace(xstr,"零零","零")
wend
if xstr="零" then
xstr=""
elseif right(xstr,1)="零" then
xstr=left(xstr,len(xstr)-1)
end if
small=xstr
elseif xlenght=1 then
if int(x)=0 then
xstr="零"
else
xstr=CovNumber(x)
end if
small=xstr 
end if 
End Function
Function CovNumber(x)
select case x
case "1":CovNumber="一"
case "2":CovNumber="二"
case "3":CovNumber="三" 
case "4":CovNumber="四"
case "5":CovNumber="五"
case "6":CovNumber="六" 
case "7":CovNumber="七"
case "8":CovNumber="八"
case "9":CovNumber="九" 
case else:CovNumber="" 
end select
End Function
'**********************************************************************
'会员期限函数
'**********************************************************************
Function UserTypeDate(UserType)
	If IsNull(UserType) Or UserType="" Then Exit Function
	Dim rsl,sqll
	Set rsl=Server.CreateObject("ADODB.RecordSet")
	sqll="Select Group_unit,Group_term From JOB_Group Where Group_id="&UserType&""
	rsl.Open sqll,Conn,1,1
	If Not(rsl.Eof) Then
	Group_unit=rsl("Group_unit")
	Group_term=rsl("Group_term")
	Select Case Group_unit
		Case "日":UserTypeDate=DateAdd("d",Group_term, Date())
		Case "月":UserTypeDate=DateAdd("m",Group_term, Date())
		Case "季":UserTypeDate=DateAdd("m",Group_term*3, Date())
		Case "年":UserTypeDate=DateAdd("yyyy",Group_term, Date())
	End Select
	End If
	rsl.Close:Set rsl=Nothing
End Function
'**********************************************************************
'会员费用函数
'**********************************************************************
Function UserTypeoutlay(UserType)
	If IsNull(UserType) Or UserType="" Then Exit Function
	Dim rsl,sqll
	Set rsl=Server.CreateObject("ADODB.RecordSet")
	sqll="Select Group_outlay From JOB_Group Where Group_id="&UserType&""
	rsl.Open sqll,Conn,1,1
	If Not(rsl.Eof) Then
	UserTypeoutlay=rsl("Group_outlay")
	End If
	rsl.Close:Set rsl=Nothing
End Function
'*************************************************************
'函数名称：OutInfo
'函数功能：根据ID调出相应表的对应的ID名称
'传递参数：TableName,IDName,InfoName,ID
'          TableName数据表名称
'          IDName要对比的字段ID名称
'          InfoName要示的字段内容名称
'          ID当前的ID值
'**************************************************************
Function OutInfo(TableName,IDName,InfoName,ID,Types)
	Dim rsOut,sqlOut
	If ID="" Or IsNull(ID) Then Exit Function
	If IsNumeric(ID)=False Then
		sqlOut="Select "& InfoName &" From "& TableName &" Where "& IDName &"='"&ID&"'"
	Else
		If Types="num" then
		sqlOut="Select "& InfoName &" From "& TableName &" Where "& IDName &"="&ID
		Else
		sqlOut="Select "& InfoName &" From "& TableName &" Where "& IDName &"='"&ID&"'"
		End If
	End If
	Set rsOut=Server.CreateObject("ADODB.RecordSet")
	rsOut.Open sqlOut,Conn,1,1
	If Not(rsOut.Eof) Then
		OutInfo=rsOut(""& InfoName &"")
	Else
		OutInfo="未知"
	End If
	rsOut.Close
	Set rsOut=Nothing
End Function

'**********************************************************************
'函数名称：PayMoney
'函数功能：会员扣费
'传递参数：UserName,UserType,nValue
'          UserName会员帐号
'          UserType会员类型（1个人、2企业、3培训、4院校）
'          nValue扣除的费用
'**********************************************************************
Function PayMoney(UserName,UserType,nValue)
	If IsNull(UserName) Or UserName="" Or IsNull(UserType) Or UserType="" Or IsNumeric(nValue)=False Then
		Exit Function
	Else
		Dim rsp,sqlp,HavePoint
		sqlp="Select Member_balance From JOB_member Where Member_login='"&UserName&"'"
		PointName="Member_balance"
		Set rsp=Server.CreateObject("ADODB.RecordSet")
		rsp.Open sqlp,Conn,1,3
		If Not(rsp.Eof) Then
			If IsNumeric(rsp(""&PointName&""))=False Then
				HavePoint=0
			Else
				HavePoint=rsp(""&PointName&"")
			End If
			HavePoint=CLng(HavePoint)
			nValue=CLng(nValue)
			If nValue>HavePoint Then
				PayMoney=False
			Else
				HavePoint=HavePoint-nValue
				rsp(""&PointName&"")=HavePoint
				rsp.Update
				PayMoney=True
			End If
		End If
		rsp.Close
		Set rsp=Nothing
	End If
	If PayMoney=True Then
		Response.Write("<script>alert(""操作成功!\n当前消费金额"& nValue &"\n您的剩余金额"& HavePoint &""");</script>")
	Else
		Response.Write("<script>alert(""余额不足!\n当前消费金额"& nValue &"\n您的剩余金额"& HavePoint &""");history.back();</script>")
		Response.End
	End If
End Function
'**********************************************************************
'函数名称：PayPoint
'函数功能：会员扣点
'传递参数：UserName,UserType,nValue,ShowResult
'          UserName会员帐号
'          UserType会员类型（1个人、2企业、3培训、4院校）
'          nValue扣除的点数
'**********************************************************************
Function PayPoint(UserName,UserType,nValue,ShowResult)
	If IsNull(UserName) Or UserName="" Or IsNull(UserType) Or UserType="" Or IsNumeric(nValue)=False Or IsNumeric(ShowResult)=False Then
		Exit Function
	Else
		Dim rsp,sqlp,HavePoint
		sqlp="Select Member_Consumenums From JOB_member Where Member_login='"&UserName&"' and Member_typeid="&UserType&""
		PointName="Member_Consumenums"
		Set rsp=Server.CreateObject("ADODB.RecordSet")
		rsp.Open sqlp,Conn,1,3
		If Not(rsp.Eof) Then
			If IsNumeric(rsp(""&PointName&""))=False Then
				HavePoint=0
			Else
				HavePoint=rsp(""&PointName&"")
			End If
			HavePoint=CLng(HavePoint)
			nValue=CLng(nValue)
			If nValue>HavePoint Then
				PayPoint=False
			Else
				HavePoint=HavePoint-nValue
				rsp(""&PointName&"")=HavePoint
				rsp.Update
				PayPoint=True
			End If
		End If
		rsp.Close
		Set rsp=Nothing
	End If
	If ShowResult=1 then
		If PayPoint=True Then
			Response.Write("<script>alert(""操作成功!\n当前消费金额"& nValue &"\n您的剩余金额"& HavePoint &""");window.opener.location.reload();window.close();;</script>")
		Else
			Response.Write("<script>alert(""余额不足!\n当前消费金额"& nValue &"\n您的剩余金额"& HavePoint &""");history.back();</script>")
		End If
		Response.End
	End If
End Function
'**********************************************************************
'函数名称：IncomeIntegral
'函数功能：增长积分
'传递参数：UserName,UserType,nValue
'          UserName会员帐号
'          UserType会员类型（1个人、2企业、3培训、4院校）
'          nValue扣除的点数
'**********************************************************************
Function IncomeIntegral(UserName,UserType,nValue)
	If IsNull(UserName) Or UserName="" Or IsNull(UserType) Or UserType="" Or IsNumeric(nValue)=False Then
		Exit Function
	Else
		Dim rsp,sqlp,HavePoint
		sqlp="Select Member_integral From JOB_member Where Member_login='"&UserName&"'"
		PointName="Member_integral"
		Set rsp=Server.CreateObject("ADODB.RecordSet")
		rsp.Open sqlp,Conn,1,3
		If Not(rsp.Eof) Then
			If IsNumeric(rsp(""&PointName&""))=False Then
				HavePoint=0
			Else
				HavePoint=rsp(""&PointName&"")
			End If
			HavePoint=CLng(HavePoint)
			nValue=CLng(nValue)
			If nValue>HavePoint Then
				IncomeIntegral=False
			Else
				HavePoint=HavePoint-nValue
				rsp(""&PointName&"")=HavePoint
				rsp.Update
				IncomeIntegral=True
			End If
		End If
		rsp.Close
		Set rsp=Nothing
	End If
End Function
'**********************************************************************
'函数名称：PayLog
'函数功能：会员消费日志
'传递参数：UserName,UserType,sValue,nValue,DoType
'          UserName会员帐号
'          UserType会员类型（1个人、2企业、3培训、4院校）
'          sValue消费项目
'          nValue扣除的点数
'          0前台操作 1后台操作
'**********************************************************************
Function PayLog(UserName,UserType,sValue,nValue,DoType)
	Dim rsl,sqll,trueIP,DoWhere
	trueIP=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
	If trueIP="" Then trueIP=Request.ServerVariables("REMOTE_ADDR")
	Select Case DoType
		Case 0:DoWhere="前台"
		Case 1:DoWhere="后台"
	End Select
	Set rsl=Server.CreateObject(FR_HR_Rs)
	sqll="Select * From JOB_consume"
	rsl.Open sqll,Conn,1,3
	rsl.AddNew
	rsl("consume_content")=sValue
	rsl("consume_num")=nValue
	rsl("consume_date")=Now()
	rsl("consume_ip")=trueIP
	rsl("consume_member")=UserName
	rsl("consume_userclass")=UserType
	rsl("consume_type")=DoWhere
	rsl.Update
	rsl.Close
	Set rsl=Nothing
End Function
'函数名称：PayItem
'函数功能：会员消费项目
'传递参数：PayItemID,GetDataType
'          PayItemID=消费项目ID
'          GetDataType=消费项目返回值（rPoint返回扣除的点数，rDate返回消费项目天数）
Function PayItem(PayItemID,ShowItemValue)
	If IsNull(PayItemID) Or IsNumeric(PayItemID)=False Then Exit Function
	Dim rsl,sqll
	Set rsl=Server.CreateObject(FR_HR_Rs)
	sqll="Select * From job_prices Where id="&PayItemID
	rsl.Open sqll,Conn,1,1
	If Not(rsl.Eof) Then
		If ShowItemValue=0 Then
			PayItem=rsl("price_value")
		Else
			PayItem=rsl("price_useday")
		End If	
	End If
	rsl.Close
	Set rsl=Nothing
End Function

Function Pay_ItemPoint(UserName,UserType,nValue)
	If IsNull(UserName) Or UserName="" Or IsNumeric(nValue)=False Then
		Exit Function
	Else
		Dim rsp,sqlp,HavePoint
		sqlp="Select * From JOB_member Where member_login='"&UserName&"'":PointName="member_consumenums"
		Set rsp=Server.CreateObject("ADODB.RecordSet")
		rsp.Open sqlp,Conn,1,3
		If Not(rsp.Eof) Then
			If IsNumeric(rsp(""&PointName&""))=False Then
				HavePoint=0
			Else
				HavePoint=rsp(""&PointName&"")
			End If
			HavePoint=CLng(HavePoint)
			nValue=CLng(nValue)
			If HavePoint<nValue Then
				Pay_ItemPoint=False
			Else
				HavePoint=HavePoint-nValue
				rsp(""&PointName&"")=HavePoint
				rsp.Update
				Pay_ItemPoint=True
			End If
		End If
		rsp.Close
		Set rsp=Nothing
	End If
End Function

Function ReCount(CTable,cField,CUser,UserID)
	Dim rsc,sqlc
	Set rsc=Server.CreateObject(FR_HR_Rs)
	sqlc="Select Count("&cField&") From "&CTable&" Where "&CUser&"='"&UserID&"'"
	rsc.Open sqlc,Conn,1,1
	If Not(rsc.Eof) Then
		ReCount=rsc(0)
	End If
	rsc.Close:Set rsc=Nothing
End Function
function GetExpFilename(str)     '得到文件的扩展名
	for i = len(str) to 1 step -1
		if mid(str, i, 1) = chr(asc(".")) then
			str = right(str, len(str)-i)
			exit for
		end if
	next
	GetExpFilename = str
end function
function bin2str(binstr)                 '将bin2str二进数转化为字符串
	dim varlen, clow, ccc, skipflag
	skipflag = 0
	ccc = ""
	varlen = lenb(binstr)
	for i = 1 to varlen
		if skipflag = 0 then
			clow = midb(binstr, i, 1)
			if ascb(clow) > 127 then
				ccc = ccc & chr(ascw(midb(binstr, i + 1, 1) & clow))
				skipflag = 1
			else
				ccc = ccc & chr(ascb(clow))
			end if
		else
			skipflag = 0
		end if
	next
	bin2str = ccc
end function

function str2bin(str)             '将字符串转化为二进制数
	for i = 1 to len(str)
		str2bin = str2bin & chrb(asc(mid(str, i, 1)))
	next
end function
'***********招聘类别***************
Function Hiretype(str)
	Select Case str
		Case 1:Hiretype="全职"
		Case 2:Hiretype="兼职"
		Case 3:Hiretype="全职、兼职均可"
		Case Else:Hiretype=""
	End Select
End Function
'***********工作经验***************
Function Hireexperience(str)
	Select Case str
		Case "-100":Hireexperience="无"
		Case -1:Hireexperience="在读学生"
		Case 0:Hireexperience="毕业生"
		Case Else:Hireexperience=str&"年以上"
	End Select
End Function
'***********性别***************
Function Hiresex(str)
	Select Case str
		Case 1:Hiresex="男"
		Case 2:Hiresex="女"
		Case Else:Hiresex="不限"
	End Select
End Function
'***********招聘人数**************
Function Hirenumber(str)
	Select Case str
		Case 0:Hirenumber="若干"
		Case Else:Hirenumber=str
	End Select
End Function

'***********工作地*************
Function Hireworkadds(str)
if str<>"" and not isnull(str) then
	Select Case str
		Case "0000":Hireworkadds="不限"
		Case Else
		str=split(str,",")
			for i=0 to ubound(str)
			province_name=""
			capital_name=""
			city_name=""
			workadd=trim(str(i))
			if workadd<>"" then
			  mystring=split(workadd,"*")
			  length=ubound(mystring)
			  Set Hwasrs=Server.CreateObject(FR_HR_Rs)
			  select case length
			   case "0"
				if trim(mystring(0))<>"" then
				province=trim(mystring(0))
				Hwassql="select province_city from job_provinceandcity where id="&province&""
				Hwasrs.open Hwassql,conn,1,1
					if not Hwasrs.eof then
					 province_name=Hwasrs("province_city")
					end if
				Hwasrs.close
					if province_name<>"" then
					 Hireworkadds=Hireworkadds&province_name&" "
					end if
				end if
			   case "1"
				if trim(mystring(0))<>"" and trim(mystring(1))<>"" then
				province=trim(mystring(0))
				capital=trim(mystring(1))
				Hwassql="select province_city from job_provinceandcity where id="&province&""
				Hwasrs.open Hwassql,conn,1,1
					if not Hwasrs.eof then
					 province_name=Hwasrs("province_city")
					end if
				Hwasrs.close
				Hwassql="select province_city from job_provinceandcity where id="&capital&""
				Hwasrs.open Hwassql,conn,1,1
					if not Hwasrs.eof then
					 capital_name=Hwasrs("province_city")
					end if
				Hwasrs.close
					if province_name<>"" and capital_name<>"" then
					 Hireworkadds=Hireworkadds&province_name&capital_name&" "
					end if
				end if
			   case "2"
				if trim(mystring(0))<>"" and trim(mystring(1))<>"" and trim(mystring(2))<>"" then
				province=trim(mystring(0))
				capital=trim(mystring(1))
				city=trim(mystring(2))
				Hwassql="select province_city from job_provinceandcity where id="&province&""
				Hwasrs.open Hwassql,conn,1,1
					if not Hwasrs.eof then
					 province_name=Hwasrs("province_city")
					end if
				Hwasrs.close
				Hwassql="select province_city from job_provinceandcity where id="&capital&""
				Hwasrs.open Hwassql,conn,1,1
					if not Hwasrs.eof then
					 capital_name=Hwasrs("province_city")
					end if
				Hwasrs.close
				Hwassql="select province_city from job_provinceandcity where id="&city&""
				Hwasrs.open Hwassql,conn,1,1
					if not Hwasrs.eof then
					 city_name=Hwasrs("province_city")
					end if
				Hwasrs.close
					if province_name<>"" and capital_name<>"" and city_name<>"" then
					 Hireworkadds=Hireworkadds&province_name&capital_name&city_name&" "
					end if
				end if
			   end select
			  end if
			 next
	End Select
	else:Hireworkadds="不限"
end if
End Function
'***********工作地-省*************
Function Hireworkadd(str,num,nums)
if str<>"" and not isnull(str) then
	Select Case str
		Case "0000":Hireworkadd="不限"
		Case Else
		str=split(str,",")
		strnum=ubound(str)
		if strnum+1>=nums then
		strnum=nums-1
		end if
			for i=0 to strnum
			province_name=""
			capital_name=""
			city_name=""
			workadd=trim(str(i))
			if workadd<>"" then
			  mystring=split(workadd,"*")
			  length=ubound(mystring)
			  if length+1>=num then
			  length=num-1
			  end if
			  Set rs=Server.CreateObject(FR_HR_Rs)
			  select case length
			   case "0"
				province=trim(mystring(0))
				sql="select province_city from job_provinceandcity where id="&province&""
				rs.open sql,conn,1,1
					if not rs.eof then
					 province_name=rs("province_city")
					end if
				rs.close
					if province_name<>"" then
					 Hireworkadd=Hireworkadd&province_name&"<br>"
					end if
			   case "1"
				province=trim(mystring(0))
				capital=trim(mystring(1))
				sql="select province_city from job_provinceandcity where id="&province&""
				rs.open sql,conn,1,1
					if not rs.eof then
					 province_name=rs("province_city")
					end if
				rs.close
				sql="select province_city from job_provinceandcity where id="&capital&""
				rs.open sql,conn,1,1
					if not rs.eof then
					 capital_name=rs("province_city")
					end if
				rs.close
					if province_name<>"" and capital_name<>"" then
					 Hireworkadd=Hireworkadd&province_name&capital_name&"<br>"
					end if
			   case "2"
				province=trim(mystring(0))
				capital=trim(mystring(1))
				city=trim(mystring(2))
				sql="select province_city from job_provinceandcity where id="&province&""
				rs.open sql,conn,1,1
					if not rs.eof then
					 province_name=rs("province_city")
					end if
				rs.close
				sql="select province_city from job_provinceandcity where id="&capital&""
				rs.open sql,conn,1,1
					if not rs.eof then
					 capital_name=rs("province_city")
					end if
				rs.close
				sql="select province_city from job_provinceandcity where id="&city&""
				rs.open sql,conn,1,1
					if not rs.eof then
					 city_name=rs("province_city")
					end if
				rs.close
					if province_name<>"" and capital_name<>"" and city_name<>"" then
					 Hireworkadd=Hireworkadd&province_name&capital_name&city_name&"<br>"
					end if
			   end select
			  end if
			 next
	End Select
	else:Hireworkadd="不限"
end if
End Function
'***********专业***************
Function Hireprofession(str)
if str<>"" and not isnull(str) then
	Select Case str
		Case "0000":Hireprofession="不限"
		Case Else
		str=split(str,",")
			for hpf=0 to ubound(str)
			mainprofession_name=""
			subprofession_name=""
			profession=trim(str(hpf))
			if profession<>"" then
			mystring=split(profession,"*")
			length=ubound(mystring)
			Set rs=Server.CreateObject(FR_HR_Rs)
			select case length
			 case 0
			  mainprofession=trim(mystring(0))
			  sql="select profession_name from job_profession where profession_id="&mainprofession&""
			  rs.open sql,conn,1,1
			  if not rs.eof then
			   mainprofession_name=rs("profession_name")
			  end if
			  rs.close
			  if mainprofession_name<>"" then
			   Hireprofession=Hireprofession&mainprofession_name&"　"
			  end if
			 case 1
			  subprofession=trim(mystring(1))
			  sql="select profession_name from job_profession where profession_id="&subprofession&""
			  rs.open sql,conn,1,1
			  if not rs.eof then
			   subprofession_name=rs("profession_name")
			  end if
			  rs.close
			  if subprofession_name<>"" then
			   Hireprofession=Hireprofession&subprofession_name&"　"
			  end if
			 end select
			end if
		   next
	End Select
	else:Hireprofession="不限"
end if
End Function
'***********岗位***************
Function Hireposition(str,lens)
if str<>"" and not isnull(str) then
	Select Case str
		Case "0000":Hireposition="不限"
		Case Else
		str=split(str,",")
			for hp=0 to ubound(str)
			mainposition_name=""
			subposition_name=""
			position=trim(str(hp))
			if position<>"" then
			mystring=split(position,"*")
			length=ubound(mystring)
			Set hprs=Server.CreateObject("ADODB.RecordSet")
			select case length
			 case 0
			  mainposition=trim(mystring(0))
			  hpsql="select position_name from job_position where position_id="&mainposition&""
			  hprs.open hpsql,conn,1,1
			  if not hprs.eof then
			   mainposition_name=hprs("position_name")
			  end if
			  hprs.close
			  if mainposition_name<>"" then
				  if lens=0 then
					Hireposition=mainposition_name
				  else
					Hireposition=Hireposition&mainposition_name&"　"
				  end if
			  end if
			 case 1
			  subposition=trim(mystring(1))
			  hpsql="select position_name from job_position where position_id="&subposition&""
			  hprs.open hpsql,conn,1,1
			  if not hprs.eof then
			   subposition_name=hprs("position_name")
			  end if
			  hprs.close
			  if subposition_name<>"" then
				  if lens=0 then
					Hireposition=subposition_name
				  else
					Hireposition=Hireposition&subposition_name&"　"
				  end if
			  end if
			 end select
			end if
		   next
	End Select
else
Hireposition="　"
end if
End Function
'***********行业***************
Function Membertrade(str)
if str<>"" and not isnull(str) then
Set rs= Server.CreateObject(FR_HR_Rs)
sql="select trade_name from job_trade where trade_id="&str
rs.open sql,conn,1,1
if not rs.eof then
Membertrade=rs("trade_name")
end if
rs.close
end if
End Function
'***********行业多***************
Function Membertrades(str)
if str<>"" and not isnull(str) then
str=split(str,",")
trade_name=""
for i=0 to ubound(str)
trades=str(i)
Set rs= Server.CreateObject(FR_HR_Rs)
sql="select trade_name from job_trade where trade_id="&trades
rs.open sql,conn,1,1
if not rs.eof then
trade_name=trade_name&rs("trade_name")&" "
else
trade_name="不限"
end if
rs.close
next
Membertrades=trade_name
end if
End Function
'***********学历要求***************
Function Hireedu(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
set rs=server.CreateObject(FR_HR_Rs)
sql="select edu_name from job_edu where edu_id="&str
rs.open sql,conn,1,1
if not(rs.eof) then
   Hireedu=rs("edu_name")
else
   Hireedu="不限"
end if
rs.close
else
Hireedu="不限"
end if
End Function
'***********语言***************
Function Hirelang(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
set rs=server.CreateObject(FR_HR_Rs)
sql="select foreign_name from job_foreignlanguage where foreign_id="&str
rs.open sql,conn,1,1
if not(rs.eof) then
   Hirelang=rs("foreign_name")
end if
rs.close
end if
End Function
'***********语言掌握程度***************
Function Hiredegree(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
set rs=server.CreateObject(FR_HR_Rs)
sql="select degree_name from job_foreigndegree where degree_id="&str
rs.open sql,conn,1,1
if not(rs.eof) then
   Hiredegree=rs("degree_name")
end if
rs.close
end if
End Function
'***********政治面貌***************
Function Hirepolity(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
set rs=server.CreateObject(FR_HR_Rs)
sql="select polity_name from JOB_polity where polity_id="&str
rs.open sql,conn,1,1
if not(rs.eof) then
   Hirepolity=rs("polity_name")
end if
rs.close
end if
End Function
'***********薪资待遇***************
Function Hirepay(str)
if str<>"" and not isnull(str) then
	select case str
		case 0:Hirepay="面议"
		case 1:Hirepay="800元以下"
		case 2:Hirepay="800～1000元"
		case 3:Hirepay="1000～1200元"
		case 4:Hirepay="1200～1500元"
		case 5:Hirepay="1500～2000元"
		case 6:Hirepay="2000～2500元"
		case 7:Hirepay="2500～3000元"
		case 8:Hirepay="3000～4000元"
		case 9:Hirepay="4000～6000元"
		case 10:Hirepay="6000～9000元"
		case 11:Hirepay="9000～12000元"
		case 12:Hirepay="12000～15000元"
		case 13:Hirepay="15000～20000元"
		case 14:Hirepay="20000元以上"
		case else:Hirepay=str&"元"
	end select
end if
End Function
'***********添加薪资**************
Function AddHirepay(str)
if str<>"" and not isnull(str) then
	select case str
		case 1:AddHirepay="800以下"
		case 2:AddHirepay="800～1000"
		case 3:AddHirepay="1000～1200"
		case 4:AddHirepay="1200～1500"
		case 5:AddHirepay="1500～2000"
		case 6:AddHirepay="2000～2500"
		case 7:AddHirepay="2500～3000"
		case 8:AddHirepay="3000～4000"
		case 9:AddHirepay="4000～6000"
		case 10:AddHirepay="6000～9000"
		case 11:AddHirepay="9000～12000"
		case 12:AddHirepay="12000～15000"
		case 13:AddHirepay="15000～20000"
		case 14:AddHirepay="20000以上"
		case else:AddHirepay=str
	end select
end if
End Function
'***********婚姻状况***************
Function Membermarriage(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
	set rs=server.CreateObject(FR_HR_Rs)
	sql="select marriage_name from JOB_marriage where marriage_id="&str
	rs.open sql,conn,1,1
	if not(rs.eof) then
	   Membermarriage=rs("marriage_name")
	end if
	rs.close
end if
End Function
'***********公司性质***************
Function Memberecoclass(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
	set rs=server.CreateObject(FR_HR_Rs)
	sql="select ecoclass_name from JOB_ecoclass where ecoclass_id="&str
	rs.open sql,conn,1,1
	if not(rs.eof) then
	   Memberecoclass=rs("ecoclass_name")
	end if
	rs.close
end if
End Function
'***********会员等级组***************
Function Membergroup(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
	set rs=server.CreateObject(FR_HR_Rs)
	sql="select Group_name,Group_images from JOB_Group where Group_id="&str
	rs.open sql,conn,1,1
	if not(rs.eof) then
	   Membergroup="<img src='{$FR_网站网址}{$FR_系统目录}"&rs("Group_images")&"' alt='"&rs("Group_name")&"' />"
	end if
	rs.close
end if
End Function
'***********会员民族***************
Function Membernation(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
	set rs=server.CreateObject(FR_HR_Rs)
	sql="select  nation_name from job_nation where nation_id="&str
	rs.open sql,conn,1,1
	if not(rs.eof) then
	   Membernation=rs("nation_name")
	end if
	rs.close
end if
End Function
'**********************************
Function Memberworkdate(str)
	if str<>"" and not isnull(str) and IsNumeric(str) then
		select case str
			case 0:Memberworkdate="随时"
			case 7:Memberworkdate="1周以内"
			case 14:Memberworkdate="2周以内"
			case 30:Memberworkdate="1个月内"
			case 60:Memberworkdate="1～3个月"
			case 90:Memberworkdate="3个月以后"
		end select
	end if
End Function
'***********课程分类***************
Function Coursetype(str)
if str<>"" and not isnull(str) and IsNumeric(str) then
set ctrs=server.CreateObject(FR_HR_Rs)
ctsql="select type_name from JOB_course_type where type_id="&str
ctrs.open ctsql,conn,1,1
if not(ctrs.eof) then
   Coursetype=ctrs("type_name")
end if
ctrs.close
end if
End Function
'********************************************************
'公告
'********************************************************
Function Announcehtml(Cid,ShowType)
if not isNumeric(Cid) or not isNumeric(ShowType) then
	exit function
end if
'读取滚动公告
if Cid=0 then
Annsql="select JOB_id,JOB_Title from JOB_announce where (JOB_ChannelID="&Cid&" or JOB_IsSelected="&FR_HR_True&")"
else
Annsql="select JOB_id,JOB_Title from JOB_announce where (JOB_ChannelID="&Cid&" or JOB_ChannelID=0)"
end if
Annsql=Annsql&" and (JOB_ShowType=0 or JOB_ShowType=1)"
Annsql=Annsql&" and datediff("&FR_HR_d&",JOB_DateAndTime,"&FR_HR_Now&")<=JOB_OutTime"
Annsql=Annsql&" order by JOB_DateAndTime desc"
set Annrs=conn.execute(Annsql)
if not Annrs.eof then
Announcecon=""
Do While Not Annrs.EOF
Announcecon=Announcecon&"　<a href='"&InstallDir&"Announce.asp?Announceid="&Annrs("JOB_id")&"' target='_blank' title='"&Annrs("JOB_Title")&"'>"&Annrs("JOB_Title")&"</a>"
Annrs.MoveNext
Loop
else
Announcecon="暂无公告!"
end if
Annrs.Close:Set Annrs=Nothing
'读取弹出公告
if Cid=0 then
Annsql="select JOB_id from JOB_announce where (JOB_ChannelID="&Cid&" or JOB_IsSelected="&FR_HR_True&")"
else
Annsql="select JOB_id from JOB_announce where (JOB_ChannelID="&Cid&" or JOB_ChannelID=0)"
end if
Annsql=Annsql&" and (JOB_ShowType=0 or JOB_ShowType=2)"
Annsql=Annsql&" and datediff("&FR_HR_d&",JOB_DateAndTime,"&FR_HR_Now&")<=JOB_OutTime"
Annsql=Annsql&" order by JOB_DateAndTime desc"
set Annrs=conn.execute(Annsql)
if not Annrs.eof then
Announcecontc="<script language=""javascript"">"& vbCrLf
Announcecontc=Announcecontc&"<!--"& vbCrLf
Announcecontc=Announcecontc&"{"& vbCrLf
i=0
Do While Not Annrs.EOF
i=i+1
Announcecontc=Announcecontc&"window.open ('"&InstallDir&"Annpop.asp?Announceid="&Annrs("JOB_id")&"', 'newwindow"&i&"', 'height=600, width=500, top="&i*10&",left="&i*10&",toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no')"& vbCrLf
Annrs.MoveNext
Loop
Announcecontc=Announcecontc&"}"& vbCrLf
Announcecontc=Announcecontc&"//-->"& vbCrLf
Announcecontc=Announcecontc&"</script>"& vbCrLf
end if
Annrs.Close:Set Annrs=Nothing
Select Case ShowType
	Case 1
	Announcehtml=Announcecon
	Case 2
	Announcehtml=Announcecontc
	Case Else
	Announcehtml=Announcecon&Announcecontc
End Select
End Function
'********************************************************
'生成文章列表页
'********************************************************
Sub NewsListHtml(Cid,Tid,Page)
	if not isNumeric(Tid) then
		exit Sub
	end if
	set rs=conn.execute("select S_id,S_name from JOB_NewsSort where S_id="&Tid&"")
	if not rs.eof then
	news_typename=rs("S_name")
	typeid=rs("S_id")
	end if
	rs.close
	set rs=nothing
	'读取频道名称
	set rs=conn.execute("select ChannelName,UseCreateHTML from JOB_Channel where ChannelID="&Cid&"")
	ChannelName=rs("ChannelName")
	UseCreateHTML=rs("UseCreateHTML")
	set rs=nothing
	session(FRHRCMS&"ChannelID") = Cid
	session(FRHRCMS&"TypeID") = Tid
	session(FRHRCMS&"Page")=Page
	'判断是否生成文件
	if CreateHTML=1 and UseCreateHTML<>0 then
		html=LoadTemplate(Cid,2,0)
		html=ReplaceLableFlag(ReplaceAllLabel(html))
		html=Replace(html,"{$FR_频道地址}",FormatLink(0,Cid,0,0,0))
		html=Replace(html,"{$FR_频道名称}",ChannelName)
		html=Replace(html,"{$FR_频道栏目}",GetArticletype(Cid,0))
		html=Replace(html,"{$FR_栏目地址}",FormatLink(0,Cid,Tid,0,0))
		html=Replace(html,"{$FR_栏目名称}",news_typename)
		html=Replace(html,"{$FR_频道编号}",Cid)
		'生成文件
		Set fso = Server.CreateObject(FR_HR_FSO)
		HtmlFileName=Server.MapPath(""&FormatLinks(0,Cid,Tid,0,Page)&"")
		Set fout = fso.CreateTextFile(HtmlFileName)
		fout.WriteLine CreateHTMLReplace(html)
		fout.close
		set fout = nothing
		Response.Write("列表分页"&Page&"生成,<a href="&FormatLink(0,Cid,Tid,0,Page)&" target='_blank'>点击查看</a>!<br>")
		response.flush
	else
	Response.Write("生成HTML未启动!")
	end if
End Sub
'********************************************************
'HTML列表分页
'totalPut总记录数 MaxPerpage每页记录数 strUnit Pnum页数 Cid频道ID Tid分类ID ShowAllPages所有页面
'********************************************************
Function Htmlpages(Cid,Tid,Nid,totalPut,MaxPerpage,ShowAllPages,strUnit,Page)
if totalPut mod MaxPerpage=0 then
    	n= totalput \ MaxPerpage
  	else
    	n= totalput \ MaxPerpage+1
  	end if
  	strTemp= "<table align=""center""><tr><td>"& vbCrLf
	strTemp=strTemp &"共<font color=""#0000FF""><b>"&totalPut&"</b></font>"&strUnit&"&nbsp;"
  	if Page<2 then
    	strTemp=strTemp & "首页 上一页&nbsp;"
  	else
		strTemp=strTemp & "<a href="""&FormatLink(0,Cid,Tid,Nid,0)&""">首页</a>&nbsp;"
		strTemp=strTemp & "<a href="""&FormatLink(0,Cid,Tid,Nid,Page-1)&""">上一页</a>&nbsp;"
	end if
  	if n-Page<1 then
    	strTemp=strTemp & "下一页 尾页"
  	else
		strTemp=strTemp & "<a href="""&FormatLink(0,Cid,Tid,Nid,Page+1)&""">下一页</a>&nbsp;"
		strTemp=strTemp & "<a href="""&FormatLink(0,Cid,Tid,Nid,n)&""">尾页</a>"
  	end if
   	strTemp=strTemp & "页次：<strong><font color=""#FF0000"">"&Page&"</font>/"&n& "</strong>页 "
    strTemp=strTemp & "<b>"&MaxPerpage&"</b>"&strUnit&"/页"& vbCrLf
	if ShowAllPages=True then
		strTemp=strTemp & "<select name=""page"" size=""1"" onchange=""javascript:window.location=this.options[this.selectedIndex].value;"">"& vbCrLf
		for i = 1 to n   
			strTemp=strTemp & "<option value="""&FormatLink(0,Cid,Tid,Nid,i)&""""
			if cint(Page)=cint(i) then strTemp=strTemp & " selected "
			strTemp=strTemp & ">第"&i&"页</option>"   
		next
		strTemp=strTemp & "</select>"& vbCrLf
	end if
	strTemp=strTemp & "</td></tr></table>"& vbCrLf
	Htmlpages=strTemp
End Function
'********************************************************
'生成文章内容HTML页
'********************************************************
Sub NewsContentHtml(NewsStr)
	if not isNumeric(NewsStr) then
		exit Sub
	end if
	'读取文章信息
	set rs=conn.execute("select * from JOB_news where N_id="&NewsStr&"")
	if not rs.eof then
	newsid=rs("N_id")
	typeid=rs("N_sid")
	ChannelID=rs("N_cid")
	news_Title=rs("N_title")
	news_Content=rs("N_content")
	dateandtime=rs("N_addtime")
	if rs("N_overview")<>"" then
	news_info="<div class='newsoverview'><strong>文章概况：</strong>"&rs("N_overview")&"</div>"
	end if
	news_from=rs("N_from")
	if rs("N_author")<>"" and not isNull(rs("N_author")) then
		news_author=rs("N_author")
	else
		news_author="未知"
	end if
	if rs("N_editor")<>"" and not isNull(rs("N_editor")) then
	news_editor=rs("N_editor")
	else
	news_editor="未知"
	end if
	news_hits=rs("N_hits")
	rs.close
	set rs=nothing
	session(FRHRCMS&"ChannelID") = ChannelID
	session(FRHRCMS&"TypeID") = typeid
	'Response.Cookies(FRHRCMS)("ChannelID") = ChannelID
	'Response.Cookies(FRHRCMS)("TypeID") = typeid
	'读取栏目名称
	set rs=conn.execute("select S_name from JOB_NewsSort where S_id="&typeid&"")
	if not rs.eof then
	news_typename=rs("S_name")
	else
	news_typename="未分类"
	end if
	rs.close
	set rs=nothing
	'读取频道名称
	set rs=conn.execute("select ChannelName,UseCreateHTML from JOB_Channel where ChannelID="&ChannelID&"")
	ChannelName=rs("ChannelName")
	UseCreateHTML=rs("UseCreateHTML")
	set rs=nothing
	'判断是否生成文件
	if CreateHTML=1 and UseCreateHTML<>0 then
		html=LoadTemplate(ChannelID,3,0)
		html=Replace(html,"{$FR_频道名称}",ChannelName)
		html=Replace(html,"{$FR_栏目名称}",news_typename)
		html=Replace(html,"{$FR_频道栏目}",GetArticletype(ChannelID,0))
		html=Replace(html,"{$FR_频道地址}",FormatLink(0,ChannelID,0,0,0))
		html=Replace(html,"{$FR_栏目地址}",FormatLink(0,ChannelID,typeid,0,0))
		html=Replace(html,"{$FR_栏目名称}",news_typename)
		html=Replace(html,"{$FR_文章编号}",newsid)
		html=Replace(html,"{$FR_文章关键词}",ClearColor(news_Title))
		html=Replace(html,"{$FR_文章描述}",ClearColor(news_Title))
		html=Replace(html,"{$FR_文章标题}",ClearColor(news_Title))
		html=Replace(html,"{$FR_文章作者}",news_author)
		html=Replace(html,"{$FR_更新时间}",dateandtime)
		html=Replace(html,"{$FR_文章来源}",news_from)
		html=Replace(html,"{$FR_文章概况}",news_info)
		html=Replace(html,"{$FR_查看次数}","<span id='hits'></span>")
		html=Replace(html,"{$FR_文章内容}",news_Content)
		html=Replace(html,"{$FR_文章编辑}",news_editor)
		html=Replace(html,"{$FR_文章上一篇}",ShowHead(typeid,newsid))
		html=Replace(html,"{$FR_文章下一篇}",ShowNext(typeid,newsid))
		html=Replace(html,"{$FR_评论文本框}","<textarea name='pj_content' style='width:400px; height:60px; border:1px #CCCCCC solid; '></textarea>")
		html=ReplaceLableFlag(ReplaceAllLabel(html))
		'生成文件
		Set fso = Server.CreateObject(FR_HR_FSO)
		HtmlFileName=Server.MapPath(""&FormatLinks(dateandtime,ChannelId,1,newsid,0)&"")
		Set fout = fso.CreateTextFile(HtmlFileName)
		fout.WriteLine CreateHTMLReplace(html)&"<script src="&InstallDir&"autohtml/article.asp?id="&newsid&"></script>"
		fout.close
		set fout = nothing
	end if
	end if
End Sub

'********************************************************
'修改文章时删除内容HTML页
'********************************************************
Sub NewsContentDelHtml(NewsStr)
	if not isNumeric(NewsStr) then
		exit Sub
	end if
	'读取文章信息
	set rs=conn.execute("select newsid,typeid,type_fid,Dateandtime from JOB_hrnews where newsid="&NewsStr&"")
	newsid=rs("newsid")
	typeid=rs("typeid")
	ChannelID=rs("type_fid")
	dateandtime=rs("Dateandtime")
	rs.close
	set rs=nothing
	set rs=conn.execute("select UseCreateHTML from JOB_Channel where ChannelID="&ChannelID&"")
	UseCreateHTML=rs("UseCreateHTML")
	set rs=nothing
	'判断是否生成文件
	if CreateHTML=1 and UseCreateHTML=1 then
	'判断文件是否存在
		Set fso = Server.CreateObject(FR_HR_FSO)
		HtmlFileName=Server.MapPath(""&FormatLinks(dateandtime,ChannelId,1,newsid,0)&"")
		if fso.fileexists(HtmlFileName) then
		fso.deleteFile(HtmlFileName)
		end if
		Set fso = Nothing
	end if
End Sub
'********************************************************
'生成职位信息HTML页
'********************************************************
Function HireContentHtml(HireStr)
	if not isNumeric(HireStr) then
		exit Function
	end if
	'读取职位信息
	set Hchrs=conn.execute("select * from job_c_hire where hire_id="&HireStr&"")
	hire_id=Hchrs("hire_id")
	hire_place=Hchrs("hire_place")
	hire_type=Hchrs("hire_type")
	if Hchrs("hire_dept")<>"" then
	hire_dept=Hchrs("hire_dept")
	else
	hire_dept="总部"
	end if
	hire_announcedate=Hchrs("hire_announcedate")
	hire_enddate=Hchrs("hire_enddate")
	hire_experience=Hchrs("hire_experience")
	hire_edu=Hchrs("hire_edu")
	hire_number=Hchrs("hire_number")
	if hire_number=0 then hire_number="若干"
	hire_profession=Hchrs("hire_profession")
	hire_pay=Hchrs("hire_pay")
	hire_sex=Hchrs("hire_sex")
	hire_age1=Hchrs("hire_age1")
	hire_age2=Hchrs("hire_age2")
	if (hire_age1=0 and hire_age2=0) Or IsNull(hire_age1) then
	hire_age="无"
	else
	hire_age=hire_age1&"～"&hire_age2
	end if
	hire_workadd=Hchrs("hire_workadd")
	hire_introduce=Hchrs("hire_introduce")
	company_id=Hchrs("company_id")
	Hchrs.close
	set Hchrs=nothing
	'读取公司资料
	set Hchrs=Server.CreateObject("ADODB.RecordSet")
	Hchsql="select Member_id,Member_name,Member_groupid,Member_logo,Member_provinceid,Member_capitalid,Member_cityid,Member_trade,Member_ecoclass,Member_fund,Member_workers,Member_founddate,Member_introduce from JOB_Member where Member_id="&company_id&""
	Hchrs.open Hchsql,conn,1,1
	if Not Hchrs.eof then
		Member_id=Hchrs("Member_id")
		Member_name=Hchrs("Member_name")
		Member_groupid=Hchrs("Member_groupid")
		Member_logo=Hchrs("Member_logo")
		if Member_logo<>"" and not isnull(Member_logo) then
		Member_logo=InstallDir&FR_UPFILES_DIR&"/Company/"&Member_logo&""
		else
		Member_logo=InstallDir&FR_UPFILES_DIR&"/Company/nologo.gif"
		end if
		Member_logo="<img src="&Member_logo&" width=190 height=60 />"
		Member_provinceid=Hchrs("Member_provinceid")
		Member_capitalid=Hchrs("Member_capitalid")
		Member_cityid=Hchrs("Member_cityid")
		Member_trade=Hchrs("Member_trade")
		Member_ecoclass=Memberecoclass(Hchrs("Member_ecoclass"))
		Member_fund=Hchrs("Member_fund")
		Member_workers=Hchrs("Member_workers")
		if Hchrs("Member_founddate")<>"" then
		Member_founddate=Hchrs("Member_founddate")
		else
		Member_founddate="　"
		end if
		Member_introduce=Hchrs("Member_introduce")
		if Member_introduce<>"" then
		Member_introduce=Member_introduce
		else
		Member_introduce="暂无公司简介！"
		end if
	end if
	Hchrs.close
	set Hchrs=nothing
	set Hchrs=conn.execute("select ChannelName,UseCreateHTML from JOB_Channel where ChannelID=2")
	ChannelName=Hchrs("ChannelName")
	UseCreateHTML=Hchrs("UseCreateHTML")
	set Hchrs=nothing
		html=LoadTemplate(2,11,0)
		html=Replace(html,"{$FR_公司编号}",Member_id)
		html=Replace(html,"{$FR_公司标志}",Member_logo)
		html=Replace(html,"{$FR_公司名称}",Member_name)
		html=Replace(html,"{$FR_会员级别}",Membergroup(Member_groupid))
		html=Replace(html,"{$FR_所属行业}",Membertrade(Member_trade))
		html=Replace(html,"{$FR_所在地区}",Hireworkadds(Member_provinceid&"*"&Member_capitalid&"*"&Member_cityid))
		html=Replace(html,"{$FR_公司性质}",Member_ecoclass)
		html=Replace(html,"{$FR_成立日期}",Member_founddate)
		html=Replace(html,"{$FR_注册资金}",Member_fund&"万元人民币")
		html=Replace(html,"{$FR_公司规模}",Member_workers)
		html=Replace(html,"{$FR_公司简介}",Member_introduce)
		html=Replace(html,"{$FR_公司联系方式}","<span id='contact'></span>")
		html=Replace(html,"{$FR_企业职位列表}",""&GetCompanyHireList(Member_id)&"")
		html=Replace(html,"{$FR_职位编号}",hire_id)
		html=Replace(html,"{$FR_职位名称}",hire_place)
		html=Replace(html,"{$FR_招聘类别}",Hiretype(hire_type))
		html=Replace(html,"{$FR_招聘部门}",hire_dept)
		html=Replace(html,"{$FR_发布日期}",FormatDate(hire_announcedate,2))
		html=Replace(html,"{$FR_截止日期}",FormatDate(hire_enddate,2))
		html=Replace(html,"{$FR_工作经验}",Hireexperience(hire_experience))
		html=Replace(html,"{$FR_学历要求}",Hireedu(hire_edu))
		html=Replace(html,"{$FR_招聘人数}",hire_number&"人")
		html=Replace(html,"{$FR_专业要求}",Hireprofession(hire_profession))
		html=Replace(html,"{$FR_薪资待遇}",Hirepay(hire_pay))
		html=Replace(html,"{$FR_性别要求}",Hiresex(hire_sex))
		html=Replace(html,"{$FR_年龄要求}",hire_age)
		html=Replace(html,"{$FR_工作地点}",Hireworkadds(hire_workadd))
		html=Replace(html,"{$FR_职位描述}",hire_introduce)
		html=Replace(html,"{$FR_职位联系方式}","<span id='hirecontact'></span>")
		html=ReplaceLableFlag(ReplaceAllLabel(html))
	'判断是否生成文件
	if CreateHTML=1 and UseCreateHTML<>0 then
		'生成文件
		Set fso = Server.CreateObject(FR_HR_FSO)
		HtmlFileName=Server.MapPath(""&FormatLinks(hire_announcedate,2,3,hire_id,0)&"")
		Set fout = fso.CreateTextFile(HtmlFileName)
		fout.WriteLine CreateHTMLReplace(html)&"<script src="&InstallDir&"autohtml/hire.asp?id="&hire_id&"></script>"
		fout.close
		set fout = nothing
	else
	HireContentHtml=html
	end if	
End Function
'********************************************************
'修改职位时删除职位HTML页
'********************************************************
Sub HireContentDelHtml(HireStr)
	if not isNumeric(HireStr) then
		exit Sub
	end if
	'读取文章信息
	set Hcdhrs=conn.execute("select hire_id,hire_announcedate from job_c_hire where hire_id="&HireStr&"")
	hire_id=Hcdhrs("hire_id")
	hire_announcedate=Hcdhrs("hire_announcedate")
	Hcdhrs.close
	set Hcdhrs=nothing
	'判断是否生成文件
	if CreateHTML=1 then
	'判断文件是否存在
		Set fso = Server.CreateObject(FR_HR_FSO)
		HtmlFileName=Server.MapPath(""&FormatLinks(hire_announcedate,2,3,hire_id,0)&"")
		if fso.fileexists(HtmlFileName) then
		fso.deleteFile(HtmlFileName)
		end if
		Set fso = Nothing
	end if
End Sub
'********************************************************
'函数名：CompanyContentHtml
'参  数：ComStr公司编号
'********************************************************
Function CompanyContentHtml(ComStr)
	if not isNumeric(ComStr) then
		exit Function
	end if
	'读取公司资料	
	set rs=conn.execute("select Member_id,Member_name,Member_login,Member_regdate,Member_groupid,Member_logo,Member_provinceid,Member_capitalid,Member_cityid,Member_trade,Member_ecoclass,Member_fund,Member_workers,Member_founddate,Member_introduce,Member_template from JOB_Member where Member_id="&ComStr&" and Member_name is not null")
	if not (rs.eof and rs.bof) then
	Member_id=rs("Member_id")
	Member_name=rs("Member_name")
	Member_login=rs("Member_login")
	Member_regdate=rs("Member_regdate")
	Member_groupid=rs("Member_groupid")
	Member_logo=rs("Member_logo")
	if Member_logo<>"" and not isnull(Member_logo) then
	Member_logo=InstallDir&FR_UPFILES_DIR&"/Company/"&Member_logo&""
	else
	Member_logo=InstallDir&FR_UPFILES_DIR&"/Company/nologo.gif"
	end if
	Member_logo="<img src="&Member_logo&" width=190 height=60 />"
	Member_provinceid=rs("Member_provinceid")
	Member_capitalid=rs("Member_capitalid")
	Member_cityid=rs("Member_cityid")
	Member_trade=rs("Member_trade")
	Member_ecoclass=rs("Member_ecoclass")
	Member_fund=rs("Member_fund")
	if rs("Member_workers")<>"" then
	Member_workers=rs("Member_workers")
	else
	Member_workers="　"
	end if
	if rs("Member_founddate")<>"" then
	Member_founddate=rs("Member_founddate")
	else
	Member_founddate="　"
	end if
	Member_introduce=rs("Member_introduce")
	if Member_introduce<>"" then
	Member_introduce=Member_introduce
	else
	Member_introduce="暂无公司简介！"
	end if
	TemplateID=Rs("Member_template")
	set rs=nothing
	set rs=conn.execute("select ChannelName,UseCreateHTML from JOB_Channel where ChannelID=2")
	ChannelName=rs("ChannelName")
	UseCreateHTML=rs("UseCreateHTML")
	set rs=nothing
	'读取模版内容
	if TemplateID<>"" then
	html=LoadTemplate(2,12,TemplateID)
	else
	html=LoadTemplate(2,12,0)
	end if
	html=Replace(html,"{$FR_公司编号}",Member_id)
	html=Replace(html,"{$FR_公司标志}",Member_logo)
	html=Replace(html,"{$FR_公司名称}",Member_name)
	html=Replace(html,"{$FR_会员级别}",Membergroup(Member_groupid))
	html=Replace(html,"{$FR_所属行业}",Membertrade(Member_trade))
	html=Replace(html,"{$FR_所在地区}",Hireworkadds(Member_provinceid&"*"&Member_capitalid&"*"&Member_cityid))
	html=Replace(html,"{$FR_公司性质}",Memberecoclass(Member_ecoclass))
	html=Replace(html,"{$FR_成立日期}",Member_founddate)
	html=Replace(html,"{$FR_注册资金}",Member_fund&"万元人民币")
	html=Replace(html,"{$FR_公司规模}",Member_workers)
	html=Replace(html,"{$FR_公司简介}",Member_introduce)
	html=Replace(html,"{$FR_公司联系方式}","<span id='contact'></span>")
	html=Replace(html,"{$FR_企业职位列表}",""&GetCompanyHireList(Member_id)&"")
	html=Replace(html,"{$FR_企业形象}",""&GetCompanyPic(Member_login)&"")
	html=ReplaceLableFlag(ReplaceAllLabel(html))
	'判断是否生成文件
	if CreateHTML=1 and UseCreateHTML<>0 then
		'生成文件
		Set fso = Server.CreateObject(FR_HR_FSO)
		HtmlFileName=Server.MapPath(""&FormatLinks(Member_regdate,2,1,Member_id,0)&"")
		Set fout = fso.CreateTextFile(HtmlFileName)
		fout.WriteLine CreateHTMLReplace(html)&"<script src="&InstallDir&"autohtml/company.asp?id="&Member_id&"></script>"
		fout.close
		set fout = nothing
	else
	CompanyContentHtml=html
	end if
	end if
End Function

'********************************************************
'函数名：HireListContentHtml
'参  数：Str公司编号
'********************************************************
Function HireListContentHtml(str)
if not isNumeric(Str) then
	exit Function
end if
html=LoadTemplate(2,14,0)
if InStr(html,"<!--职位列表开始-->")>0 and InStr(html,"<!--职位列表结束-->")>0 then
Hirelist=split(split(html,"<!--职位列表开始-->")(1),"<!--职位列表结束-->")(0)
end if
'读取公司资料
set Hlchrs=conn.execute("select Member_id,Member_name,Member_regdate,Member_groupid,Member_logo,Member_provinceid,Member_capitalid,Member_cityid,Member_trade,Member_ecoclass,Member_fund,Member_workers,Member_founddate,Member_introduce,Member_template from JOB_Member where Member_id="&str&" and Member_name is not null")
if not Hlchrs.eof then
Member_id=Hlchrs("Member_id")
Member_name=Hlchrs("Member_name")
Member_regdate=Hlchrs("Member_regdate")
Member_groupid=Hlchrs("Member_groupid")
Member_logo=Hlchrs("Member_logo")
if Member_logo<>"" and not isnull(Member_logo) then
Member_logo=InstallDir&FR_UPFILES_DIR&"/Company/"&Member_logo&""
else
Member_logo=InstallDir&FR_UPFILES_DIR&"/Company/nologo.gif"
end if
Member_logo="<img src="&Member_logo&" width=190 height=60 />"
Member_provinceid=Hlchrs("Member_provinceid")
Member_capitalid=Hlchrs("Member_capitalid")
Member_cityid=Hlchrs("Member_cityid")
Member_trade=Hlchrs("Member_trade")
Member_ecoclass=Hlchrs("Member_ecoclass")
Member_fund=Hlchrs("Member_fund")
if Hlchrs("Member_workers")<>"" then
Member_workers=Hlchrs("Member_workers")
else
Member_workers="未填写"
end if
if Hlchrs("Member_founddate")<>"" then
Member_founddate=Hlchrs("Member_founddate")
else
Member_founddate="　"
end if
Member_introduce=Hlchrs("Member_introduce")
if Member_introduce<>"" then
Member_introduce=Member_introduce
else
Member_introduce="暂无公司简介！"
end if
TemplateID=Hlchrs("Member_template")
set Hlchrs=nothing
set Hlchrs=conn.execute("select ChannelName,UseCreateHTML from JOB_Channel where ChannelID=2")
ChannelName=Hlchrs("ChannelName")
UseCreateHTML=Hlchrs("UseCreateHTML")
set Hlchrs=nothing
html=Replace(html,"{$FR_公司编号}",Member_id)
html=Replace(html,"{$FR_公司标志}",Member_logo)
html=Replace(html,"{$FR_公司名称}",Member_name)
html=Replace(html,"{$FR_会员级别}",Membergroup(Member_groupid))
html=Replace(html,"{$FR_所属行业}",Membertrade(Member_trade))
html=Replace(html,"{$FR_所在地区}",Hireworkadds(Member_provinceid&"*"&Member_capitalid&"*"&Member_cityid))
html=Replace(html,"{$FR_公司性质}",Memberecoclass(Member_ecoclass))
html=Replace(html,"{$FR_成立日期}",Member_founddate)
html=Replace(html,"{$FR_注册资金}",Member_fund&"万元人民币")
html=Replace(html,"{$FR_公司规模}",Member_workers)
html=Replace(html,"{$FR_公司简介}",Member_introduce)
html=Replace(html,"{$FR_公司联系方式}","<span id='contact'></span>")
html=Replace(html,"{$FR_企业职位列表}",""&GetCompanyHireList(Member_id)&"")
html=Replace(html,Hirelist,HirelistHtml(Hirelist,Member_id))
html=ReplaceLableFlag(ReplaceAllLabel(html))
'判断是否生成文件
if CreateHTML=1 and UseCreateHTML<>0 then
	'生成文件
	Set fso = Server.CreateObject(FR_HR_FSO)
	HtmlFileName=Server.MapPath(""&FormatLinks(Member_regdate,2,2,Member_id,0)&"")
	Set fout = fso.CreateTextFile(HtmlFileName)
	fout.WriteLine CreateHTMLReplace(html)&"<script src="&InstallDir&"autohtml/hires.asp?id="&Member_id&"></script>"
	fout.close
	set fout = nothing
else
HireListContentHtml=html
end if
end if
End Function

Function HirelistHtml(code,str)
if code<>"" and not isnull(code) then
htm=""
	if str<>"" and not isnull(str) and IsNumeric(str) then
		set Hlhrs=server.CreateObject(FR_HR_Rs)
		sqls=""
		sqls=" and datediff("&FR_HR_d&",hire_enddate,"&FR_HR_Now&")<=0"
		sql="select hire_id,hire_place,hire_type,hire_dept,hire_announcedate,hire_enddate,hire_experience,hire_edu,hire_number,hire_profession,hire_pay,hire_sex,hire_age1,hire_age2,hire_workadd,hire_introduce from job_c_hire where company_id="&str&" and hire_status=1"&sqls&" order by hire_announcedate desc"
		Hlhrs.open sql,conn,1,1
		if not Hlhrs.eof then
		do while not Hlhrs.eof
			htm=htm&code
				hire_id=Hlhrs("hire_id")
				hire_place=Hlhrs("hire_place")
				hire_type=Hlhrs("hire_type")
				if Hlhrs("hire_dept")<>"" then hire_dept=Hlhrs("hire_dept")
				hire_announcedate=Hlhrs("hire_announcedate")
				hire_enddate=Hlhrs("hire_enddate")
				hire_experience=Hlhrs("hire_experience")
				hire_edu=Hlhrs("hire_edu")
				hire_number=Hlhrs("hire_number")
				if hire_number=0 then hire_number="若干"
				hire_profession=Hlhrs("hire_profession")
				hire_pay=Hlhrs("hire_pay")
				hire_sex=Hlhrs("hire_sex")
				hire_age1=Hlhrs("hire_age1")
				hire_age2=Hlhrs("hire_age2")
				if (hire_age1=0 and hire_age2=0) Or IsNull(hire_age1) then
				hire_age="无"
				else
				hire_age=hire_age1&"～"&hire_age2
				end if
				hire_workadd=Hlhrs("hire_workadd")
				hire_introduce=Hlhrs("hire_introduce")
				hire_contact="<SCRIPT language=JavaScript>"
				hire_contact=hire_contact&"{"
				hire_contact=hire_contact&"Contact("&str&","&hire_id&",0);"
				hire_contact=hire_contact&"}"
				hire_contact=hire_contact&"</SCRIPT>"
				hire_contact=hire_contact&"<span id='hirecontact"&hire_id&"'><img src='"&InstallDir&"skin/System/loing.gif'>数据读取中，请稍后...</span>"
				htm=Replace(htm,"{$FR_职位编号}",hire_id)
				htm=Replace(htm,"{$FR_职位名称}",hire_place)
				htm=Replace(htm,"{$FR_招聘类别}",Hiretype(hire_type))
				htm=Replace(htm,"{$FR_招聘部门}",hire_dept)
				htm=Replace(htm,"{$FR_发布日期}",FormatDate(hire_announcedate,2))
				htm=Replace(htm,"{$FR_截止日期}",FormatDate(hire_enddate,2))
				htm=Replace(htm,"{$FR_工作经验}",Hireexperience(hire_experience))
				htm=Replace(htm,"{$FR_学历要求}",Hireedu(hire_edu))
				htm=Replace(htm,"{$FR_招聘人数}",hire_number&"人")
				htm=Replace(htm,"{$FR_专业要求}",Hireprofession(hire_profession))
				htm=Replace(htm,"{$FR_薪资待遇}",Hirepay(hire_pay))
				htm=Replace(htm,"{$FR_性别要求}",Hiresex(hire_sex))
				htm=Replace(htm,"{$FR_年龄要求}",hire_age)
				htm=Replace(htm,"{$FR_工作地点}",Hireworkadds(hire_workadd))
				htm=Replace(htm,"{$FR_职位描述}",hire_introduce)
				htm=Replace(htm,"{$FR_职位联系方式}",""&hire_contact&"")
			Hlhrs.movenext
			loop
		end if
		Hlhrs.close
	end if
	HirelistHtml=htm
end if
End Function
'********************************************************
'函数名：PersonResumeContentHtml
'参  数：str 简历ID
'********************************************************
Function PersonResumeContentHtml(str)
if not isNumeric(Str) then
	exit Function
end if
set Prchrs=conn.execute("select resume_id,resume_announcedate,resume_template from job_p_resume where resume_id="&str&"")
if not Prchrs.eof then
TemplateID=Prchrs("resume_template")
resume_id=Prchrs("resume_id")
resume_announcedate=Prchrs("resume_announcedate")
end if
set Prchrs=nothing
'读取模版内容
if TemplateID<>"" then
html=LoadTemplate(1,13,TemplateID)
else
html=LoadTemplate(1,13,0)
end if
html=ResumeContentHtml(html,resume_id)
html=ReplaceLableFlag(ReplaceAllLabel(html))
set Prchrs=conn.execute("select ChannelName,UseCreateHTML from JOB_Channel where ChannelID=1")
ChannelName=Prchrs("ChannelName")
UseCreateHTML=Prchrs("UseCreateHTML")
set Prchrs=nothing
'判断是否生成文件
if CreateHTML=1 and UseCreateHTML<>0 then
	'生成文件
	Set fso = Server.CreateObject(FR_HR_FSO)
	HtmlFileName=Server.MapPath(""&FormatLinks(resume_announcedate,1,1,resume_id,0)&"")
	Set fout = fso.CreateTextFile(HtmlFileName)
	fout.WriteLine CreateHTMLReplace(html)&"<script src="&InstallDir&"autohtml/resume.asp?id="&resume_id&"></script>"
	fout.close
	set fout = nothing
else
PersonResumeContentHtml=html
end if
End Function
'********************************************************
'修改简历时删除简历HTML页
'********************************************************
Sub PersonResumeContentDelHtml(ResumeStr)
	if not isNumeric(ResumeStr) then
		exit Sub
	end if
	'读取文章信息
	set Prcdhrs=conn.execute("select resume_id,resume_announcedate from job_p_resume where resume_id="&ResumeStr&"")
	resume_id=Prcdhrs("resume_id")
	resume_announcedate=Prcdhrs("resume_announcedate")
	Prcdhrs.close
	set Prcdhrs=nothing
	'判断是否生成文件
	if CreateHTML=1 then
	'判断文件是否存在
		Set fso = Server.CreateObject(FR_HR_FSO)
		HtmlFileName=Server.MapPath(""&FormatLinks(resume_announcedate,1,1,resume_id,0)&"")
		if fso.fileexists(HtmlFileName) then
		fso.deleteFile(HtmlFileName)
		end if
		Set fso = Nothing
	end if
End Sub
'********************************************************
'函数名：ResumeContentHtml
'参  数：str 简历ID　code 模板代码
'********************************************************
Function ResumeContentHtml(code,str)
if code<>"" and not isnull(code) then
'获取教育模板
if InStr(code,"<!--教育开始-->")>0 and InStr(code,"<!--教育结束-->")>0 then
Resumeedu=split(split(code,"<!--教育开始-->")(1),"<!--教育结束-->")(0)
end if
if InStr(code,"<!--培训开始-->")>0 and InStr(code,"<!--培训结束-->")>0 then
Resumetrain=split(split(code,"<!--培训开始-->")(1),"<!--培训结束-->")(0)
end if
if InStr(code,"<!--工作经验开始-->")>0 and InStr(code,"<!--教育结束-->")>0 then
Resumework=split(split(code,"<!--工作经验开始-->")(1),"<!--工作经验结束-->")(0)
end if
if InStr(code,"<!--语言开始-->")>0 and InStr(code,"<!--语言结束-->")>0 then
Resumelang=split(split(code,"<!--语言开始-->")(1),"<!--语言结束-->")(0)
end if
if str<>"" and not isnull(str) and IsNumeric(str) then
	set rs=server.CreateObject(FR_HR_Rs)
	sql="select * from JOB_P_resume where resume_id="&str
	rs.open sql,conn,1,1
	if not rs.eof then
	   resume_pmember=rs("resume_pmember")
	   resume_id=rs("resume_id")
	   resume_announcedate=rs("resume_announcedate")
	   resume_name=rs("resume_name")
	   resume_sex=rs("resume_sex")
	   resume_birth=rs("resume_birth")
	   resume_cardtype=rs("resume_cardtype")
	   resume_idcard=rs("resume_idcard")
	   resume_nation=rs("resume_nation")
	   resume_marriage=rs("resume_marriage")
	   resume_height=rs("resume_height")
	   resume_polity=rs("resume_polity")
	   resume_weight=rs("resume_weight")
	   resume_hukouprovinceid=rs("resume_hukouprovinceid")
	   resume_hukoucapitalid=rs("resume_hukoucapitalid")
	   resume_hukoucityid=rs("resume_hukoucityid")
	   resume_provinceid=rs("resume_provinceid")
	   resume_capitalid=rs("resume_capitalid")
	   resume_cityid=rs("resume_cityid")
	   resume_school=rs("resume_school")
	   resume_graduate=rs("resume_graduate")
	   resume_edu=rs("resume_edu")
	   resume_zhicheng=rs("resume_zhicheng")
	   resume_sumup=rs("resume_sumup")
	   resume_appraise=rs("resume_appraise")
	   resume_jobtype=rs("resume_jobtype")
	   resume_trade=rs("resume_trade")
	   resume_position=rs("resume_position")
	   resume_workadd=rs("resume_workadd")
	   resume_pay=rs("resume_pay")
	   resume_stay=rs("resume_stay")
	   resume_workdate=rs("resume_workdate")
	   resume_request=rs("resume_request")
	   resume_tel=rs("resume_tel")
	   resume_chat=rs("resume_chat")
	   resume_email=rs("resume_email")
	   resume_url=rs("resume_url")
	   resume_address=rs("resume_address")
	   resume_post=rs("resume_post")
	   resume_visitnum=rs("resume_visitnum")
	   resume_usergroup=rs("resume_usergroup")
	   resume_openness=rs("resume_openness")
	   resume_title=rs("resume_title")
	   resume_template=rs("resume_template")
	end if
	rs.close
end if
'读取个人照片
Set rsp= Server.CreateObject("ADODB.RecordSet")
sqlp="select member_logo from job_member where member_login='"&resume_pmember&"' and member_typeid=1 and Member_logostatus=1 and Member_logoflag=1 and member_logo is not null"
rsp.open sqlp,conn,1,1
if not rsp.eof then
resume_photo="<img src='"&Siteurl&InstallDir&FR_UPFILES_DIR&"/Person/"&rsp("member_logo")&"' border=0 width=110 height=140>"
else
resume_photo="<img src='"&Siteurl&InstallDir&FR_UPFILES_DIR&"/Person/nophoto.gif' border=0 width=110 height=140>"
end if
rsp.close
set rsp=nothing
html=code
resume_i=""
for rsi=1 to 10-len(resume_id)
resume_i="0"&resume_i
next
resume_fr="FR"
resume_frid=resume_fr&resume_i&resume_id
html=Replace(html,"{$FR_简历编号}",resume_id)
html=Replace(html,"{$FR_更新日期}",resume_announcedate)
html=Replace(html,"{$FR_简历名称}",resume_title)
html=Replace(html,"{$FR_照片}",resume_photo)
if resume_name<>"" then
html=Replace(html,"{$FR_真实姓名}",resume_name)
else
html=Replace(html,"{$FR_真实姓名}","　")
end if
if resume_sex<>"" then
html=Replace(html,"{$FR_性别}",Hiresex(resume_sex))
else
html=Replace(html,"{$FR_性别}","　")
end if
if resume_birth<>"" then
html=Replace(html,"{$FR_出生年月}",resume_birth)
else
html=Replace(html,"{$FR_出生年月}","　")
end if
if resume_cardtype<>"" then
html=Replace(html,"{$FR_证件类型}",resume_cardtype)
else
html=Replace(html,"{$FR_证件类型}","　")
end if
if resume_idcard<>"" then
html=Replace(html,"{$FR_证件编号}",resume_idcard)
else
html=Replace(html,"{$FR_证件编号}","　")
end if
if resume_nation<>"" then
html=Replace(html,"{$FR_民族}",Membernation(resume_nation))
else
html=Replace(html,"{$FR_民族}","　")
end if
if resume_marriage<>"" then
html=Replace(html,"{$FR_婚姻状况}",Membermarriage(resume_marriage))
else
html=Replace(html,"{$FR_婚姻状况}","　")
end if
if resume_height<>"" then
html=Replace(html,"{$FR_身高}",resume_height&"cm")
else
html=Replace(html,"{$FR_身高}","cm")
end if
if resume_polity<>"" then
html=Replace(html,"{$FR_政治面貌}",Hirepolity(resume_polity))
else
html=Replace(html,"{$FR_政治面貌}","　")
end if
if resume_weight<>"" then
html=Replace(html,"{$FR_体重}",resume_weight&"kg")
else
html=Replace(html,"{$FR_体重}","kg")
end if
if resume_hukouprovinceid<>"" and resume_hukoucapitalid<>"" and resume_hukoucityid<>"" then
html=Replace(html,"{$FR_户口所在地}",Hireworkadds(resume_hukouprovinceid&"*"&resume_hukoucapitalid&"*"&resume_hukoucityid))
else
html=Replace(html,"{$FR_户口所在地}","　")
end if
if resume_provinceid<>"" and resume_capitalid<>"" and resume_cityid<>"" then
html=Replace(html,"{$FR_目前所在地}",Hireworkadds(resume_provinceid&"*"&resume_capitalid&"*"&resume_cityid))
else
html=Replace(html,"{$FR_目前所在地}","　")
end if
if resume_edu<>"" then
html=Replace(html,"{$FR_学历}",Hireedu(resume_edu))
else
html=Replace(html,"{$FR_学历}","　")
end if
if resume_sumup<>"" then
html=Replace(html,"{$FR_特长概括}",resume_sumup)
else
html=Replace(html,"{$FR_特长概括}","　")
end if
if resume_appraise<>"" then
html=Replace(html,"{$FR_自我评价}",resume_appraise)
else
html=Replace(html,"{$FR_自我评价}","　")
end if
if resume_school<>"" then
html=Replace(html,"{$FR_毕业学校}",resume_school)
else
html=Replace(html,"{$FR_毕业学校}","　")
end if
if resume_graduate<>"" then
html=Replace(html,"{$FR_毕业时间}",resume_graduate)
else
html=Replace(html,"{$FR_毕业时间}","　")
end if
if resume_zhicheng<>"" then
html=Replace(html,"{$FR_职称}",resume_zhicheng)
else
html=Replace(html,"{$FR_职称}","　")
end if
if resume_jobtype<>"" then
html=Replace(html,"{$FR_职位性质}",Hiretype(resume_jobtype))
else
html=Replace(html,"{$FR_职位性质}","　")
end if
if resume_trade<>"" then
html=Replace(html,"{$FR_行业类别}",Membertrades(resume_trade))
else
html=Replace(html,"{$FR_行业类别}","　")
end if
if resume_position<>"" then
html=Replace(html,"{$FR_工作岗位}",Hireposition(resume_position,1))
else
html=Replace(html,"{$FR_工作岗位}","　")
end if
if resume_pay<>"" then
html=Replace(html,"{$FR_月薪要求}",Hirepay(resume_pay))
else
html=Replace(html,"{$FR_月薪要求}","　")
end if
if resume_stay<>"" then
if resume_stay=1 then
html=Replace(html,"{$FR_住宿要求}","要求提供住宿")
else
html=Replace(html,"{$FR_住宿要求}","　")
end if
else
html=Replace(html,"{$FR_住宿要求}","　")
end if
if resume_workadd<>"" then
html=Replace(html,"{$FR_工作地区}",Hireworkadds(resume_workadd))
else
html=Replace(html,"{$FR_工作地区}","　")
end if
if resume_workdate<>"" then
html=Replace(html,"{$FR_到岗时间}",Memberworkdate(resume_workdate))
else
html=Replace(html,"{$FR_到岗时间}","　")
end if
if resume_request<>"" then
html=Replace(html,"{$FR_其他要求}",resume_request)
else
html=Replace(html,"{$FR_其他要求}","　")
end if
if resume_visitnum<>"" then
html=Replace(html,"{$FR_查看次数}",resume_visitnum)
else
html=Replace(html,"{$FR_查看次数}","　")
end if
if resume_tel<>"" then
html=Replace(html,"{$FR_联系电话}",resume_tel)
else
html=Replace(html,"{$FR_联系电话}","　")
end if
if resume_chat<>"" then
html=Replace(html,"{$FR_聊天号码}",resume_chat)
else
html=Replace(html,"{$FR_聊天号码}","　")
end if
if resume_email<>"" then
html=Replace(html,"{$FR_电子邮件}",resume_email)
else
html=Replace(html,"{$FR_电子邮件}","　")
end if
if resume_url<>"" then
html=Replace(html,"{$FR_个人主页}",resume_url)
else
html=Replace(html,"{$FR_个人主页}","　")
end if
if resume_address<>"" then
html=Replace(html,"{$FR_联系地址}",resume_address)
else
html=Replace(html,"{$FR_联系地址}","　")
end if
if resume_post<>"" then
html=Replace(html,"{$FR_邮政编码}",resume_post)
else
html=Replace(html,"{$FR_邮政编码}","　")
end if
html=Replace(html,"{$FR_联系方式}","<span id='contact'></span>")
html=Replace(html,Resumework,ResumeWorkContentHtml(Resumework,str))
html=Replace(html,Resumetrain,ResumeTrainContentHtml(Resumetrain,str))
html=Replace(html,Resumeedu,ResumeEduContentHtml(Resumeedu,str))
html=Replace(html,Resumelang,ResumeLangContentHtml(Resumelang,str))
html=Replace(html,"{$FR_相关证书}",ResumePictureContentHtml(resume_pmember,1))
html=Replace(html,"{$FR_职场风采}",ResumePictureContentHtml(resume_pmember,2))
ResumeContentHtml=html
end if
End Function

Function ResumeWorkContentHtml(code,str)
if code<>"" and not isnull(code) then
htm=""
	if str<>"" and not isnull(str) and IsNumeric(str) then
		set Rwchrs=server.CreateObject(FR_HR_Rs)
		sql="select * from job_p_work where work_resumeid="&str&" order by work_id asc"
		Rwchrs.open sql,conn,1,1
		if not Rwchrs.eof then
			do while not Rwchrs.eof
			htm=htm&code
			   work_startyear=Rwchrs("work_startyear")
			   work_startmonth=Rwchrs("work_startmonth")
			   work_endyear=Rwchrs("work_endyear")
			   work_endmonth=Rwchrs("work_endmonth")
			   work_comname=Rwchrs("work_comname")
			   work_ecoclass=Rwchrs("work_ecoclass")
			   work_trade=Rwchrs("work_trade")
			   if Rwchrs("work_dept")<>"" then work_dept=Rwchrs("work_dept")
			   work_mainposition=Rwchrs("work_mainposition")
			   work_subposition=Rwchrs("work_subposition")
			   if Rwchrs("work_place")<>"" then work_place=Rwchrs("work_place")
			   work_introduce=Rwchrs("work_introduce")
			   work_leftreason=Rwchrs("work_leftreason")
			   work_yearandmonth=work_startyear&"年"&work_startmonth&"月-"
			   if work_endyear=0 and work_endmonth=0 then
			   work_yearandmonth=work_yearandmonth&"现在"
			   else
			   work_yearandmonth=work_yearandmonth&work_endyear&"年"&work_endmonth&"月"
			   end if
			   htm=Replace(htm,"{$FR_担任职务}",work_place)
			   htm=Replace(htm,"{$FR_工作时间}",work_yearandmonth)
			   htm=Replace(htm,"{$FR_所在公司}",work_comname)
			   htm=Replace(htm,"{$FR_公司性质}",Memberecoclass(work_ecoclass))
			   htm=Replace(htm,"{$FR_岗位类别}",Hireposition(work_mainposition,0))
			   htm=Replace(htm,"{$FR_所属行业}",Membertrade(work_trade))
			   htm=Replace(htm,"{$FR_所在部门}",work_dept)
			   if work_introduce<>"" then
			   htm=Replace(htm,"{$FR_工作描述}",work_introduce)
			   else
			   htm=Replace(htm,"{$FR_工作描述}","　")
			   end if
			   if work_leftreason<>"" then
			   htm=Replace(htm,"{$FR_离职原因}",work_leftreason)
			   else
			   htm=Replace(htm,"{$FR_离职原因}","　")
			   end if
			Rwchrs.movenext
			loop
		end if
		Rwchrs.close
	end if
	ResumeWorkContentHtml=htm
end if
End Function

Function ResumeTrainContentHtml(code,str)
if code<>"" and not isnull(code) then
htm=""
	if str<>"" and not isnull(str) and IsNumeric(str) then
		set Rtchrs=server.CreateObject(FR_HR_Rs)
		sql="select * from JOB_P_training where train_resumeid="&str&" order by train_id asc"
		Rtchrs.open sql,conn,1,1
		if not Rtchrs.eof then
			do while not Rtchrs.eof
			htm=htm&code
			   train_startyear=Rtchrs("train_startyear")
			   train_startmonth=Rtchrs("train_startmonth")
			   train_endyear=Rtchrs("train_endyear")
			   train_endmonth=Rtchrs("train_endmonth")
			   train_train=Rtchrs("train_train")
			   train_address=Rtchrs("train_address")
			   train_course=Rtchrs("train_course")
			   train_certificate=Rtchrs("train_certificate")
			   train_detail=Rtchrs("train_detail")
			   train_yearandmonth=train_startyear&"年"&train_startmonth&"月-"
			   if train_endyear=0 and train_endmonth=0 then
			   train_yearandmonth=train_yearandmonth&"现在"
			   else
			   train_yearandmonth=train_yearandmonth&train_endyear&"年"&train_endmonth&"月"
			   end if
			   if train_course<>"" then
			   htm=Replace(htm,"{$FR_培训课程}",train_course)
			   else
			   htm=Replace(htm,"{$FR_培训课程}","　")
			   end if
			   if train_yearandmonth<>"" then
			   htm=Replace(htm,"{$FR_培训时间}",train_yearandmonth)
			   else
			   htm=Replace(htm,"{$FR_培训时间}","　")
			   end if
			   if train_certificate<>"" then
			   htm=Replace(htm,"{$FR_获得证书}",train_certificate)
			   else
			   htm=Replace(htm,"{$FR_获得证书}","　")
			   end if
			   if train_detail<>"" then
			   htm=Replace(htm,"{$FR_培训描述}",train_detail)
			   else
			   htm=Replace(htm,"{$FR_培训描述}","　")
			   end if
			   if train_train<>"" then
			   htm=Replace(htm,"{$FR_培训机构}",train_train)
			   else
			   htm=Replace(htm,"{$FR_培训机构}","　")
			   end if
			   if train_address<>"" then
			   htm=Replace(htm,"{$FR_培训地点}",train_address)
			   else
			   htm=Replace(htm,"{$FR_培训地点}","　")
			   end if
			Rtchrs.movenext
			loop
		end if
		Rtchrs.close
	end if
	ResumeTrainContentHtml=htm
end if
End Function

Function ResumeEduContentHtml(code,str)
if code<>"" and not isnull(code) then
htm=""
	if str<>"" and not isnull(str) and IsNumeric(str) then
		set Rechrs=server.CreateObject(FR_HR_Rs)
		sql="select * from JOB_P_education where education_resumeid="&str&" order by education_id asc"
		Rechrs.open sql,conn,1,1
		if not Rechrs.eof then
			do while not Rechrs.eof
			htm=htm&code
			   education_startyear=Rechrs("education_startyear")
			   education_startmonth=Rechrs("education_startmonth")
			   education_endyear=Rechrs("education_endyear")
			   education_endmonth=Rechrs("education_endmonth")
			   education_school=Rechrs("education_school")
			   education_mainprofession=Rechrs("education_mainprofession")
			   education_subprofession=Rechrs("education_subprofession")
			   education_edu=Rechrs("education_edu")
			   education_detail=Rechrs("education_detail")
			   education_yearandmonth=education_startyear&"年"&education_startmonth&"月-"
			   if education_endyear=0 and education_endmonth=0 then
			   education_yearandmonth=education_yearandmonth&"现在"
			   else
			   education_yearandmonth=education_yearandmonth&education_endyear&"年"&education_endmonth&"月"
			   end if
			   htm=Replace(htm,"{$FR_教育专业}",Hireprofession(education_mainprofession&"*"&education_subprofession))
			   htm=Replace(htm,"{$FR_教育学历}",Hireedu(education_edu))
			   htm=Replace(htm,"{$FR_教育时间}",education_yearandmonth)
			   htm=Replace(htm,"{$FR_教育学校}",education_school)
			   if education_detail<>"" then
			   htm=Replace(htm,"{$FR_专业描述}",education_detail)
			   else
			   htm=Replace(htm,"{$FR_专业描述}","　")
			   end if
			Rechrs.movenext
			loop
		end if
		Rechrs.close
	end if
	ResumeEduContentHtml=htm
end if
End Function

Function ResumeLangContentHtml(code,str)
if code<>"" and not isnull(code) then
htm=""
	if str<>"" and not isnull(str) and IsNumeric(str) then
		set Rlchrs=server.CreateObject(FR_HR_Rs)
		sql="select * from job_p_lang where lang_resumeid="&str&" order by lang_id asc"
		Rlchrs.open sql,conn,1,1
		if not Rlchrs.eof then
			do while not Rlchrs.eof
			htm=htm&code
			   lang_master=Rlchrs("lang_master")
			   lang_name=Rlchrs("lang_name")
			   htm=Replace(htm,"{$FR_外语语种}",Hirelang(lang_name))
			   htm=Replace(htm,"{$FR_掌握程度}",Hiredegree(lang_master))
			Rlchrs.movenext
			loop
		end if
		Rlchrs.close
	end if
	ResumeLangContentHtml=htm
end if
End Function

Function ResumePictureContentHtml(str,s)
htm=""
	if str<>"" and not isnull(str) then
		set Rpchrs=server.CreateObject(FR_HR_Rs)
		if s=1 then
		sql="select * from JOB_picture where picture_member='"&str&"' and picture_type=21 and picture_status=1"
		else
		sql="select * from JOB_picture where picture_member='"&str&"' and picture_type=22 and picture_flag=1"
		end if
		Rpchrs.open sql,conn,1,1
		if not Rpchrs.eof then
			do while not Rpchrs.eof
			htm=htm&"<li><img src='"&Siteurl&InstallDir&FR_UPFILES_DIR&"/Person/"&Rpchrs("picture_filename")&"' width=160 height=120 onMouseOver=""toolTip('<img src="&Siteurl&InstallDir&FR_UPFILES_DIR&"/Person/"&Rpchrs("picture_filename")&">','#ABCEE2','#F1F8FC')"" onMouseOut=""toolTip()""></li>"
			Rpchrs.movenext
			loop
		end if
		Rpchrs.close
	end if
	ResumePictureContentHtml=htm
End Function

'***************************************************
'函数名：ReplaceMemberInfo
'作  用：转换会员信息函数
'参  数：Cid,Tid,TempId
'返回值：
'***************************************************
Function ReplaceMemberInfo(Temphtml,Str,MTid)
Select Case MTid
	Case 1:MTname="Person"
	Case 2:MTname="Company"
	Case 3:MTname="School"
	Case 4:MTname="Train"
End Select
Set RMIrs=conn.execute("select * from JOB_Member where Member_id="&Str&" and Member_name is not null and member_typeid="&MTid&"")
If RMIrs.eof Then Exit Function
Member_id=RMIrs("Member_id")
Member_name=RMIrs("Member_name")
Member_regdate=RMIrs("Member_regdate")
Member_groupid=RMIrs("Member_groupid")
Member_logo=RMIrs("Member_logo")
if Member_logo<>"" and not isnull(Member_logo) then
Member_logo=InstallDir&FR_UPFILES_DIR&"/"&MTname&"/"&Member_logo&""
else
Member_logo=InstallDir&FR_UPFILES_DIR&"/"&MTname&"/nologo.gif"
end if
if RMIrs("Member_introduce")<>"" then
Member_introduce=RMIrs("Member_introduce")
else
Member_introduce="暂无介绍！"
end if
if RMIrs("Member_teachers")<>"" then
Member_teachers=RMIrs("Member_teachers")
else
Member_teachers="暂无介绍！"
end if
if RMIrs("Member_achievement")<>"" then
Member_achievement=RMIrs("Member_achievement")
else
Member_achievement="暂无介绍！"
end if
Member_email=RMIrs("Member_email")
Member_address=RMIrs("Member_address")
if RMIrs("Member_post")<>"" then Member_post=RMIrs("Member_post")
Member_contact=RMIrs("Member_contact")
Member_tel=RMIrs("Member_tel")
if RMIrs("Member_fax")<>"" then Member_fax=RMIrs("Member_fax")
if RMIrs("Member_url")<>"" and RMIrs("Member_url")<>"http://" then Member_url=RMIrs("Member_url")
TemplateID=RMIrs("Member_template")
set RMIrs=nothing
Temphtml=Replace(Temphtml,"{$FR_编号}",Member_id)
Temphtml=Replace(Temphtml,"{$FR_标志}",Member_logo)
Temphtml=Replace(Temphtml,"{$FR_名称}",Member_name)
Temphtml=Replace(Temphtml,"{$FR_级别}",Membergroup(Member_groupid))
Temphtml=Replace(Temphtml,"{$FR_简介}",Member_introduce)
Temphtml=Replace(Temphtml,"{$FR_师资力量}",Member_teachers)
Temphtml=Replace(Temphtml,"{$FR_主要业绩}",Member_achievement)
Temphtml=Replace(Temphtml,"{$FR_地址}",Member_address)
Temphtml=Replace(Temphtml,"{$FR_邮编}",Member_post)
Temphtml=Replace(Temphtml,"{$FR_联系人}",Member_contact)
Temphtml=Replace(Temphtml,"{$FR_电话}",Member_tel)
Temphtml=Replace(Temphtml,"{$FR_传真}",Member_fax)
Temphtml=Replace(Temphtml,"{$FR_邮箱}",Member_email)
Temphtml=Replace(Temphtml,"{$FR_网址}","<a href='"&Member_url&"' target='_blank'>"&Member_url&"</a>")
Temphtml=Replace(Temphtml,"{$FR_院校介绍连接}",FormatLink(Member_regdate,3,1,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_招生简章连接}",FormatLink(Member_regdate,3,8,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_优秀毕业生连接}",FormatLink(Member_regdate,3,4,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_专业设置连接}",FormatLink(Member_regdate,3,6,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_专家教授连接}",FormatLink(Member_regdate,3,2,Member_id,0))

Temphtml=Replace(Temphtml,"{$FR_介绍连接}",FormatLink(Member_regdate,5,1,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_师资力量连接}",FormatLink(Member_regdate,5,6,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_主要业绩连接}",FormatLink(Member_regdate,5,7,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_课程连接}",FormatLink(Member_regdate,5,2,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_培训师连接}",FormatLink(Member_regdate,5,4,Member_id,0))
Temphtml=Replace(Temphtml,"{$FR_联系方式连接}",FormatLink(Member_regdate,5,8,Member_id,0))
ReplaceMemberInfo=Temphtml
End Function
'***************************************************
'函数名：LoadTemplate
'作  用：读取模版内容函数
'参  数：Cid,Tid,TempId
'返回值：
'***************************************************
Function LoadTemplate(Cid,Tid,TempId)
Dim fso,hndFile
If Not IsNumeric(Cid) Or Not IsNumeric(Tid) Or Not IsNumeric(TempId) Then Exit Function
If ChkCache("LoadTemplate_T_"&Cid&"_"&Tid&"_"&TempId) Then
	LoadTemplate = GetCache("LoadTemplate_T_"&Cid&"_"&Tid&"_"&TempId)
Else
	Set fso = CreateObject(FR_HR_FSO)
	If Not fso.FileExists(Server.MapPath(""&InstallDir&"Templates/"&TemplateDir&"/T_"&Cid&"_"&Tid&"_"&TempId&".html")) Then
	Response.Write("模板文件不存在!")
	Response.End()
	End If
	set hndFile = fso.OpenTextFile(Server.MapPath(""&InstallDir&"Templates/"&TemplateDir&"/T_"&Cid&"_"&Tid&"_"&TempId&".html"))
	TemplateContent = hndFile.ReadAll
	Set hndFile = Nothing
	Set fso = Nothing
	Call SetCache("LoadTemplate_T_"&Cid&"_"&Tid&"_"&TempId, TemplateContent)
	LoadTemplate = TemplateContent
End If
If LoadTemplate = "" Then
Response.Write("不能读取模板文件或文件为空!")
Response.End()
End If
End Function
'猎头导航
Function HrNavHtml()
Dim HrNav
HrNav=""
Set Rs_HrNav=conn.Execute("select * from JOB_hr order by hr_order asc")
If Not Rs_HrNav.eof then
Do While Not Rs_HrNav.eof
	If CreateHTML=1 then
		HrNav=HrNav&"<li><a href="&SiteUrl&InstallDir&HTMLPath&"hr/hr_"&Rs_HrNav("hr_id")&".html>"&Rs_HrNav("hr_title")&"</a></li>"
	else
		HrNav=HrNav&"<li><a href="&SiteUrl&InstallDir&"hr/hr.asp?hrid="&Rs_HrNav("hr_id")&">"&Rs_HrNav("hr_title")&"</a></li>" 
	end if
Rs_HrNav.MoveNext
Loop
End if
Rs_HrNav.Close:Set Rs_HrNav=Nothing
If CreateHTML=1 then
	HrNav=HrNav&"<li><a href="&SiteUrl&InstallDir&HTMLPath&"hr/hr_zp.html>近期猎头职位</a></li>"
else
	HrNav=HrNav&"<li><a href="&SiteUrl&InstallDir&"hr/hr_zp.asp>近期猎头职位</a></li>" 
end if
HrNavHtml=HrNav
End Function
'猎头服务介绍
Function HrCHtml(str)
Dim HrC
HrC=""
if str=0 then
Set Rs_HrC=conn.Execute("select * from JOB_hr where hr_id=11 order by hr_order asc")
	If Not Rs_HrC.eof then
	HrC=left(Rs_HrC("hr_all"),200)
		If CreateHTML=1 then
			HrC=HrC&"&nbsp;<a href='"&InstallDir&HTMLPath&"hr/hr_"&Rs_HrC("hr_id")&".html'><font color='red'>查看详细内容</font></a>"
		else
			HrC=HrC&"&nbsp;<a href='"&InstallDir&"hr/hr.asp?hrid="&Rs_HrC("hr_id")&"'><font color='red'>查看详细内容</font></a>" 
		end if
	End if
Rs_HrC.Close:Set Rs_HrC=Nothing
else
Set Rs_HrC=conn.Execute("select * from JOB_hr where hr_id="&str&" order by hr_order asc")
	If Not Rs_HrC.eof then
	HrC=Rs_HrC("hr_all")
	End if
Rs_HrC.Close:Set Rs_HrC=Nothing
end if
HrCHtml=HrC
End Function
'**************************************************
'函数名：MemberKeyInfo
'作  用：检索相关的会员信息
'参  数：keyword typeid
'返回值：
'**************************************************
Function MemberKeyInfo(keyword,typeid)
If keyword<>"" And Not isnull(keyword) and IsNumeric(typeid) Then
Set MkiRs= Server.CreateObject(FR_HR_Rs)
If typeid=0 Then
MkiSql="Select member_id,member_typeid,member_regdate From job_member where member_name like '%"&keyword&"%'"
else
MkiSql="Select member_id,member_typeid,member_regdate From job_member where member_name like '%"&keyword&"%' and member_typeid="&typeid 
End If
MkiRs.open MkiSql,conn,1,1
If Not MkiRs.eof then
If typeid=0 Then typeid=MkiRs("member_typeid")
If typeid=1 Then Exit Function
MemberKeyInfo="<a href="&FormatLink(MkiRs("member_regdate"),typeid,1,MkiRs("member_id"),0)&" target=""_blank"">查看</a>"
End If
MkiRs.close:Set MkiRs=Nothing
End If
End Function
'*************************************************
'函数名：ShowPage
'作用：显示“上一页 下一页”等信息
'参数：LinkURL  ----链接地址
'      RecordTotal ----查询的数据总数量
'	  MaxPerPage -----每页显示的数据数量
'      ShowTotal  -----是否显示总数量
'      ShowAllPages ---是否用下拉列表显示所有页面以供跳转。有某些页面不能使用，否则会出现JS错误。
'      strUnit     ----计数单位   '
'返回值：“上一页 下一页”等信息的HTML代码
'编辑时间:由Mr.Yang编辑与2008年1月10号09点
'*************************************************

Function ShowPage1(LinkURL,RecordTotal,MaxPerPage,ShowTotal,ShowAllPages,strUnit)
	
	dim pagetotal   '定义显示的总页数
	dim strtemp     '定义存储输出变量
	dim strurl      '定义下一页链接到的地址
	dim i           '定义下拉列表转向页变量
	
	if RecordTotal mod MaxPerPage=0 then   '判断数据的总页数
		pagetotal=RecordTotal \ MaxPerPage
	else
		pagetotal=RecordTotal \ MaxPerPage+1
	end if
	
	if pageshow>pagetotal then   '当前显示的页数
		pageshow=pagetotal
	end if
	
	strtemp="<table align='center'><tr><td>"  '输出表格用于显示分页链接
	'strtemp=strtemp & "fdsfdsfdsf"
		if ShowTotal=true then
			strtemp=strtemp & "共<b>" & RecordTotal & "</b>" & strUnit & "&nbsp;&nbsp;"
		end if	
	strurl=JoinChar(linkURL)	'向地址中加如 '&' 或 '?' 
	
		if pageshow<2 then
			strtemp=strtemp & "首页 上一页&nbsp;"
		else
			strtemp=strtemp & "<a href='" & strurl & "pageshow=1'>首页</a>&nbsp;"
			strtemp=strtemp & "<a href='" & strurl & "pageshow=" & (pageshow-1) &"'>上一页</a>&nbsp;"								
		end if
		
		if pageshow>=pagetotal then
			strtemp=strtemp & "下一页 尾页"
		else
			strtemp=strtemp & "<a href='" & strurl & "pageshow=" & (pageshow+1) &"'>下一页</a>&nbsp;"
			strtemp=strtemp & "<a href='" & strurl & "pageshow=" & pagetotal &"'>尾页</a>"
		end if
		
	strtemp=strtemp & "&nbsp;页次：<strong><font color=red>" & pageshow & "</font>/" & pagetotal & "</strong>页"
	strtemp=strtemp & "&nbsp;<b>" & MaxPerPage & "</b>" & strUnit & "/页"
	
		'if ShowAllPages=True then  '判断是否使用直接输入数字转向需要的页
'				strtemp=strtemp & "&nbsp;&nbsp;转到第<input type='text' name='pageshow' size='2' maxlength='5' value='" & pageshow & "' onKeyPress="" if (event.keyCode==13) window.location='" & strurl & "pageshow=" & "'+this.value;""'>页"
'			end if
		
		'下拉列表转向第n页	
		if ShowAllPages=True then
				strtemp=strtemp & "&nbsp;转到第：<select name=""pageshow"" size=""1"" onchange=""javascript:window.location='" & strurl & "pageshow=" & "'+this.options[this.selectedIndex].value;"">"& vbCrLf
				for i = 1 to pagetotal   
					strtemp=strtemp & "<option value=""" & i & """"
					if cint(pageshow)=cint(i) then strtemp=strtemp & " selected "
					strtemp=strtemp & ">" & i & "</option>"   
				next
				strtemp=strtemp & "</select>页"& vbCrLf
		end if

	strtemp=strtemp & "</td></tr></table>"
	response.write strTemp 
End Function  

Function PosionName(str)
	html=""
	if str<>"" then
		strs=split(str,",")
		for i=0 to ubound(strs)
			sqlPosion="select position_name from JOB_position where position_id="&right(strs(i),4)&""
			set rsPosion=Server.CreateObject("ADODB.RecordSet")
			rsPosion.open sqlPosion,conn,1,1
			if not rsPosion.eof then
				if i=ubound(strs) then
					html=html&rsPosion("position_name")
				else
					html=html&rsPosion("position_name")&"+"
				end if
			end if
			rsPosion.close
			set rsPosion=nothing
		next
		PosionName=html
	else
		PosionName=""
	end if	
End Function

Function TradeName(str)
	html=""
	if str<>"" then
		strs=split(str,",")
		for i=0 to ubound(strs)
			sqlTrade="select trade_name from JOB_trade where trade_id="&right(strs(i),4)&""
			set rsTrade=Server.CreateObject("ADODB.RecordSet")
			rsTrade.open sqlTrade,conn,1,1
			if not rsTrade.eof then
				if i=ubound(strs) then
					html=html&rsTrade("trade_name")
				else
					html=html&rsTrade("trade_name")&"+"
				end if
			end if
			rsTrade.close
			set rsTrade=nothing
		next
		TradeName=html
	else
		TradeName=""
	end if	
End Function

Function ProfessionName(str)
	html=""
	if str<>"" then
		strs=split(str,",")
		for i=0 to ubound(strs)
			sqlProfession="select Profession_name from JOB_Profession where Profession_id="&right(strs(i),4)&""
			set rsProfession=Server.CreateObject("ADODB.RecordSet")
			rsProfession.open sqlProfession,conn,1,1
			if not rsProfession.eof then
				if i=ubound(strs) then
					html=html&rsProfession("Profession_name")
				else
					html=html&rsProfession("Profession_name")&"+"
				end if
			end if
			rsProfession.close
			set rsProfession=nothing
		next
		ProfessionName=html
	else
		ProfessionName=""
	end if	
End Function

Function ProvinceName(strs)
	htmls=""
	if strs<>"" then
		strss=split(strs,",")
		for j=0 to ubound(strss)
			sqlProvince="select province_city from JOB_provinceandcity where id="&right(strss(j),4)&""
			set rsProvince=Server.CreateObject("ADODB.RecordSet")
			rsProvince.open sqlProvince,conn,1,1
			if not rsProvince.eof then
				if j=ubound(strss) then
					htmls=htmls&rsProvince("province_city")
				else
					htmls=htmls&rsProvince("province_city")&"+"
				end if
			end if
			rsProvince.close
			set rsProvince=nothing
		next
		ProvinceName=htmls
	else
		ProvinceName=""
	end if	
End Function 

Function PosionEnName(str)
	html=""
	if str<>"" then
		strs=split(str,",")
		for i=0 to ubound(strs)
			sqlPosion="select position_enname from JOB_position where position_id="&right(strs(i),4)&""
			set rsPosion=Server.CreateObject("ADODB.RecordSet")
			rsPosion.open sqlPosion,conn,1,1
			if not rsPosion.eof then
				if i=ubound(strs) then
					html=html&rsPosion("position_enname")
				else
					html=html&rsPosion("position_enname")&"+"
				end if
			end if
			rsPosion.close
			set rsPosion=nothing
		next
		PosionEnName=html
	else
		PosionEnName=""
	end if	
End Function

Function TradeEnName(str)
	html=""
	if str<>"" then
		strs=split(str,",")
		for i=0 to ubound(strs)
			sqlTrade="select trade_enname from JOB_trade where trade_id="&right(strs(i),4)&""
			set rsTrade=Server.CreateObject("ADODB.RecordSet")
			rsTrade.open sqlTrade,conn,1,1
			if not rsTrade.eof then
				if i=ubound(strs) then
					html=html&rsTrade("trade_enname")
				else
					html=html&rsTrade("trade_enname")&"+"
				end if
			end if
			rsTrade.close
			set rsTrade=nothing
		next
		TradeEnName=html
	else
		TradeEnName=""
	end if	
End Function

Function ProfessionEnName(str)
	html=""
	if str<>"" then
		strs=split(str,",")
		for i=0 to ubound(strs)
			sqlProfession="select Profession_enname from JOB_Profession where Profession_id="&right(strs(i),4)&""
			set rsProfession=Server.CreateObject("ADODB.RecordSet")
			rsProfession.open sqlProfession,conn,1,1
			if not rsProfession.eof then
				if i=ubound(strs) then
					html=html&rsProfession("Profession_enname")
				else
					html=html&rsProfession("Profession_enname")&"+"
				end if
			end if
			rsProfession.close
			set rsProfession=nothing
		next
		ProfessionEnName=html
	else
		ProfessionEnName=""
	end if	
End Function

Function ProvinceEnName(strs)
	htmls=""
	if strs<>"" then
		strss=split(strs,",")
		for j=0 to ubound(strss)
			sqlProvince="select enprovince_city from JOB_provinceandcity where id="&right(strss(j),4)&""
			set rsProvince=Server.CreateObject("ADODB.RecordSet")
			rsProvince.open sqlProvince,conn,1,1
			if not rsProvince.eof then
				if j=ubound(strss) then
					htmls=htmls&rsProvince("enprovince_city")
				else
					htmls=htmls&rsProvince("enprovince_city")&"+"
				end if
			end if
			rsProvince.close
			set rsProvince=nothing
		next
		ProvinceEnName=htmls
	else
		ProvinceEnName=""
	end if	
End Function   

Function AdplaceNames(adplaceid)
	if adplaceid<>"" and Isnumeric(adplaceid) then
		set rs11=Server.CreateObject(FR_HR_RS)		
		sql11="select adplace_name from JOB_Adplace where adplace_id="&adplaceid&""
		rs11.open sql11,conn,1,1
		if not rs11.eof then
			AdplaceNames=rs11("adplace_name")
		else
			AdplaceNames="未知"
		end if
		rs11.close
		set rs11=nothing
	else
		AdplaceNames="未知"
	end if
End Function

Function AdpriceNames(adpriceid)
	if adpriceid<>"" and Isnumeric(adpriceid) then
		set rs22=Server.CreateObject(FR_HR_RS)
		sql22="select Adsplace_name from JOB_Adsplace where Adsplace_id="&adpriceid&""
		rs22.open sql22,conn,1,1
		if not rs22.eof then
			AdpriceNames=rs22("Adsplace_name")
		else
			AdpriceNames="未知"
		end if
		rs22.close
		set rs22=nothing
	else
		AdpriceNames="未知"
	end if
End Function

'*************************************
'函数功能：删除指定的文件
Sub DoDelFile(spicpath)
	On Error Resume Next
	Dim FSO
	Set FSO = Server.CreateObject("Scripting.FileSystemObject")
	FSO.DeleteFile(Server.MapPath(spicpath))
	Set FSO = Nothing
End Sub
'************************************

'**************************************
'函数：InfoType()
'参数：infotypeid,资讯类别保存的id
'功能：根据资讯类别的编号找出对应的资讯类别名称
'**************************************
Function InfoType(infotypeid)
	if infotypeid<>"" and Isnumeric(infotypeid) then
		sqltype="select S_name from JOB_NewsSort where S_id="&infotypeid
		set rstype=Server.CreateObject("ADODB.RecordSet")
		rstype.open sqltype,conn,1,1
		if not rstype.eof then
			InfoType=rstype("S_name")
		else
			InfoType="未归类"
		end if
		rstype.close
		set rstype=nothing
	else
		InfoType="未归类"
	end if
End Function
' 设置缓存
function setcache(byval cachename,byval cachevalue)
	dim cachedata
	cachename = lcase(filterstr(cachename))
	cachedata = application(cachename)
	if isarray(cachedata) then
		cachedata(0) = Cachevalue
		cachedata(1) = now()
	else
		Redim cachedata(2)
		cachedata(0) = Cachevalue
		cachedata(1) = now()
	end if
	application.lock
	application(cachename) = cachedata
	application.unlock
end function
' 获取缓存
function getcache(byval cachename)
	dim cachedata
	cachename = lcase(filterstr(cachename))
	cachedata = application(cachename)
	if isarray(cachedata) then getcache = cachedata(0) else getcache = ""
end function
' 检测缓存
function chkcache(byval cachename)
	dim cachedata
	chkcache = false
	cachename = lcase(filterstr(cachename))
	cachedata = application(cachename)
	if not isarray(cachedata) then exit function
	if not IsDate(cachedata(1)) then exit function
	if DateDiff("s", CDate(cachedata(1)), now()) < 60 * 60 then chkcache = true
end function
' 过滤字符
function filterstr(byval str)
	filterstr = lcase(str) : filterstr = replace(filterstr, " ", "") : filterstr = replace(filterstr, "'", "") : filterstr = replace(filterstr, """", "") : filterstr = replace(filterstr, "=", "") : filterstr = replace(filterstr, "*", "")
end function

Function LoadMailTemp(strsign,str)
if strsign<>"" and not isnull(strsign) and isNumeric(str) then
	if str=0 then
		Set Lmt=conn.execute("select M_tit from JOB_MailTemp where M_sign='"&strsign&"'")
		if not Lmt.eof then
		LoadMailTemp=Lmt(0)
		end if
		Set Lmt=nothing
	else
		Set Lmt=conn.execute("select M_con from JOB_MailTemp where M_sign='"&strsign&"'")
		if not Lmt.eof then
		LoadMailTemp=Lmt(0)
		end if
		Set Lmt=nothing
	end if
end if
End Function
%>