⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.asp

📁 本系统开发的核心内容就是实现招聘时企业和人才的交互选择
💻 ASP
字号:
<%
	'---------------------------------------------------------------'
	'						统计下属分类的个数						'
	'---------------------------------------------------------------'
	Function countClassNum(IdNum)
		Set rsNum=Server.CreateObject("ADODB.RecordSet")
		rsNum.Open "Select count(NewsClassName) as Num from NewsClass where ParentClass="&IdNum,conn,1,1
		If Not rsNum.Eof Then
			countClassNum=rsNum("Num")
		Else
			countClassNum=0
		End If
		rsNum.Close
		Set rsNum=Nothing
	End Function
	'---------------------------------------------------------------'
	'							置换中文意思						'
	'---------------------------------------------------------------'
	Function toChineseName(Id)
		Set rsCnName=Server.CreateObject("ADODB.RecordSet")
		rsCnName.Open "Select NewsClassName from NewsClass where Id="&Id,conn,1,1
		If Not rsCnName.Eof Then
			toChineseName=rsCnName("NewsClassName")
		End If
		rsCnName.Close
		Set rsCnName=Nothing
	End Function
	'---------------------------------------------------------------'
	'							格式化时间日期	yyyy-mm-dd			'
	'---------------------------------------------------------------'
	Function formatDate(da)
		daArr=split(da,"-")
		charSum=""
		For i=0 to ubound(daArr)
			If Len(daArr(i))=1 Then
				daArr(i)="-"&"0"&daArr(i)
			Else
				If i>0 Then
					daArr(i)="-"&daArr(i)
				End If
			End If
			charSum=charSum&daArr(i)
		Next
		formatDate=charSum
	End Function
	'---------------------------------------------------------------'
	'							统计信息查看点击率					'
	'---------------------------------------------------------------'
	Sub countClick(Id,DB)
		conn.Execute("Update "&DB&" set clickNum=clickNum+1 where Id="&Id)
	End Sub
	'---------------------------------------------------------------'
	'							置换招聘标题						'
	'---------------------------------------------------------------'
	Function chineseTitle(Id)
		If Id="" Then Id=0 End If
		Set rsCnTitle=Server.CreateObject("ADODB.RecordSet")
		rsCnTitle.Open "Select Title from Recruitment where Id="&Id,conn,1,1
		If Not rsCnTitle.Eof Then
			chineseTitle=rsCnTitle("Title")
		Else
			chineseTitle="No Data"
		End If
		rsCnTitle.Close
		Set rsCnTitle=Nothing
	End Function
	'---------------------------------------------------------------'
	'						置换中文性别名称						'
	'---------------------------------------------------------------'
	Function cnSex(sex)
		If sex=1 Then
			cnSex="男"
		Else
			cnSex="女"
		End If
	End Function
	'---------------------------------------------------------------'
	'						对空值的处理						'
	'---------------------------------------------------------------'
	Function ifNull(va)
		If va="" Then
			ifNull="空值"
		Else
			ifNull=va
		End If
	End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -