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

📄 function.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
Function IsShow(PItem)
'文本域是否可见
		If PItem<>"" then
			if pitem=0 then IsShow="style='display:none;'"
		Else
			IsShow="style='display:none;'"
		End if
End Function

Function IsModify(userid,LoginID,Nitem,zj_jld)
'文本域是否可编辑
	IsModify=0
		if Nitem="" then 
			if userid=LoginID and zj_jld<>1 then IsModify=1
		else
			if userid=LoginID then IsModify=1
		end if
End Function

Function GetIDandCont(items,n)
	str_temp=split(items,"|")
	ID=str_temp(0)
	Content=str_temp(1)
	if n=0 then GetIDandCont=ID
	if n=1 then GetIDandCont=Content
End Function

Function GetSteps(table,id)

	select case table
	case "EconomicLaw_reg" temp="zt_lxa,zt_ba,zt_sp"
						   tempname="立销案登记,承办机构意见,局领导意见"
	case "EconomicLaw_sp"  temp="zt_nr,zt_sp,zt_jld"
						   tempname="填写相关内容,承办机构意见,局领导意见"
	case "EconomicLaw_sp2" temp="zt_nr,zt_cbr,zt_bajg,zt_hsjg,zt_jld"
						   tempname="填写相关内容,承办人报处意见,办案机构处罚建议,核审机构意见,局领导意见"
	case "EconomicLaw_jys" temp="zt_wf,zt_bajg,zt_hsjg,zt_jld"
						   tempname="填写违法事实,办案机构意见,核审机构意见,局领导意见"
	end select
	
	
	set rs_step=Server.CreateObject("ADODB.RecordSet")
	sql="select "& temp &" from " & table & " where id="& id 
	'response.write sql
	'response.end()
	rs_step.open sql,oConn,1,1
	if not rs_step.eof then
		strtemp=split(temp,",")
		strtempname=split(tempname,",")
		for i=0 to ubound(strtemp)
			if rs_step(strtemp(i))=0 then 
				GetSteps=strtempname(i)
				exit for
			end if
		next
		if GetSteps<>"" then  GetSteps="<font color=red>"&GetSteps&"</font>"
		k=0
		for i=0 to ubound(strtemp)
			if rs_step(strtemp(i))=1 then 
				k=k+1
			else
				exit for
			end if
		next
		if k=4 then GetSteps="<font color=green>已处理完成</font>"
	end if
	rs_step.close
	set rs_step=nothing
End Function

Function GetIDGroup(TableName,Field,PField,FieldValue)
'取ID集合(表名,字段名,上级栏目字段名,字段ID)-----
	ids=""
	set rs_getid=Server.CreateObject("ADODB.RecordSet")
	if isnumeric(FieldValue) then
	sql="select "&Field&" from "& TableName &" where "&PField&" = "& FieldValue &" order by "&Field
	elseif isdate(FieldValue) then
	sql="select "&Field&" from "& TableName &" where "&PField&" = '"& FieldValue &"' order by "&Field
	else
	sql="select "&Field&" from "& TableName &" where "&PField&" like '%"& FieldValue &"%' order by "&Field
	end if
	rs_getid.open sql,oConn,1,1	
	while not rs_getid.EOF '循环
		ids=ids&","&rs_getid("id")
		rs_getid.MoveNext
	wend
	rs_getid.close
	set rs_getid=nothing
	if left(ids,1)="," then ids=right(ids,len(ids)-1)
	GetIDGroup=ids
end function

%> 

⌨️ 快捷键说明

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