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

📄 function.asp

📁 一个最新最时尚的采用ASP开发的基于数据库的网络办公系统
💻 ASP
字号:
<%
'******************
'取得刚刚添加公告的编号
'******************	
Function GetBulletinId()

	set rsBulletin=server.CreateObject("ADODB.recordset")
	strSQL="select Id from Bulletin order by Id Desc"
	rsBulletin.Open strSQL,conn,1,1
	
	If Not rsBulletin.eof Then
		GetBulletinId=rsBulletin("Id")
	ELse
		GetBulletinId=0
	End If
	rsBulletin.close
	
End Function

'******************
'更新上传文件路径列表
'******************	
Sub UpdateUpload(AreaType,ItemId)

	UploadFileCount=Session("UploadFileCount")
	UploadFileDir=Session("UploadFileDir")

	
	If UploadFileCount>0 Then
		
	  FileDir=split(UploadFileDir,"*") '获得上传文件路径

	  for i=1 to ubound(FileDir)
		InputFileDir=FileDir(i)
		strSQL="insert into Upload (UpPath,Type,ItemId) values('"&InputFileDir&"',"&AreaType&","&ItemId&")"
		conn.execute strsql   
	  Next   
		
	End If
	
End Sub

'******************
'将公告栏条目浏览权限保存进权限列表
'******************	
Sub UpdateReadRight(AreaType,ItemCount,ItemId)

	If ItemCount>0 Then

	  for i=1 to ItemCount
		ZZID=Request("ZZ"&i&"")
		ZWID=Request("ZW"&i&"")
		strSQL="insert into ReadRight (ZZID,ZWID,Type,ItemId) values("&ZZID&","&ZWID&","&AreaType&","&ItemId&")"
		conn.execute strsql   
	  Next   
		
	End If
	
End Sub

'******************
'删除公告时判断此公告是否有附件
'******************	
Function GetDeleteUpload(ItemId)

	set rsBulletin=server.CreateObject("ADODB.recordset")
	strSQL="select FuJian from Bulletin where Id="&ItemId&""
	rsBulletin.Open strSQL,conn,1,1 
	
	GetDeleteUpload=rsBulletin("FuJian")
	rsBulletin.close

End Function

'******************
'删除公告时判断此公告是否设置浏览权限
'******************	
Function GetDeleteReadRight(ItemId)

	set rsBulletin=server.CreateObject("ADODB.recordset")
	strSQL="select ReadRight from Bulletin where Id="&ItemId&""
	rsBulletin.Open strSQL,conn,1,1 
	
	GetDeleteReadRight=rsBulletin("ReadRight")	
	rsBulletin.close
	
End Function

%>

⌨️ 快捷键说明

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