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

📄 hotspotedit.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
'#############################################################################################
'#
'#	文件名	 : hotspotedit.inc
'#	Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'#	创建人	 : BinZha
'#  日 期	 : 2002-07-19
'#
'#	修改历史  : ****年**月**日 ****** 修改内容:**********************************************
'#
'#	功能描述	 : 新增修改大事函数文件
'#  版   本	 :
'#
'#############################################################################################

Function HotspotDetail(sSQL)
	dim crs, rs
	dim sSubject, sDept, sContent, sHappenDate, sName, sRecordDate
	dim sLink
	dim ActionStatus

	if not IsHotspotAdmin() then
		Server.Transfer("../common/error.asp")
		Response.end
	end if 

	if not IsEmpty(iHotspotID) then
	
		set crs = New CRecordset
		set rs = crs.Open(dbLocal, sSQL)

		if rs.EOF then
			Server.Transfer("../common/error.asp")
			Response.end
		end if

		'' 获取任务信息的各种数据
		sSubject			= crs.GetValue("Subject")
		sDept				= crs.GetValue("Dept")
		sContent			= crs.GetValue("Content")
		sHappenDate			= crs.GetValue("HappenDate")
		sName				= crs.GetValue("Name")
		sRecordDate			= crs.GetValue("RecordDate")

		crs.Close()
	end if
	
	if IsEmpty(iHotspotID) then
		sLink = _
			"<tr bgcolor=white height=20>" & _
			"	<td colspan=2 align=center>" & _
			"		<img border=0 src=""../images/button/add.gif"" onclick=""btnAdd_OnClick()"" style=""cursor:hand"">&nbsp;&nbsp;&nbsp;&nbsp;" & _
			"		<img border=0 src=""../images/button/cancel.gif"" onclick=""btnCancelAdd_OnClick()"" style=""cursor:hand""></td>" & _
			"</tr>"
	else
		sLink = _
			"<tr bgcolor=white height=20>" & _
			"	<input type=""hidden"" name=""id"" value=""" & iHotspotID & """>" & _
			"	<td colspan=2 align=center>" & _
			"		<img border=0 src=""../images/button/update.gif"" onclick=""btnUpdate_OnClick()"" style=""cursor:hand"">&nbsp;&nbsp;&nbsp;&nbsp;" & _
			"		<img border=0 src=""../images/button/cancel.gif"" onclick=""btnCancel_OnClick()"" style=""cursor:hand""></td>" & _
			"</tr>"
	end if

	HotspotDetail = _
		"<table cellspacing=1 cellpadding=0 width=600 border=0 align=center bgcolor=silver>" & _
		"<form method=""post"" name=""frmAdd"" action=""Hotspotedit.asp"">" & _
		"<input type=""hidden"" name=""FormAction"">" & _
		"<tr height=20 style=""color:white;font-weight:600"">" & _
		"		<td background=""../images/bg/bnbg.gif"" align=center colspan=2>大 事 详 细 信 息</td>" & _
		"</tr>" & _
		"<tr bgcolor=white height=30>" & _
		"		<td width=75 align=center>部  门:</td><td class=tdvalue width=500><input type=""text"" name=""dept"" value=""" & sDept & """ size=50 maxlength=50></td>" & _
		"<tr bgcolor=white height=30>" & _
		"		<td width=75 align=center>标  题:</td><td class=tdvalue width=500><input type=""text"" name=""subject"" value=""" & sSubject & """ size=78 maxlength=50></td>" & _
		"</tr>" & _
		"<tr bgcolor=white height=30>" & _
		"		<td width=75 align=center>发生日期:</td><td class=tdvalue width=500>" & DrawCal2(sHappenDate, "happendate", "dateimg11") & "</td>" & _
		"</tr>" & _
		"<tr bgcolor=white height=60>" & _
		"		<td align=center>内  容:</td><td class=tdvalue width=500><textarea name=""content"" rows=5 cols=85>" & sContent & "</textarea></td>" & _
		"</tr>" & _
				sLink  & _
		"</td></tr></table>" & _
		"<br>"
	
End Function

Function AddHotspot()
	dim strSQL

	dim sSubject			: sSubject			= GetParam("subject")
	dim sDept				: sDept				= GetParam("dept")
	dim sHappenDate			: sHappenDate		= GetParam("happendate")
	dim sContent			: sContent			= GetParam("content")
	dim sName				: sName				= sEmpName
	dim sRecordDate			: sRecordDate		= date

	strSQL = "insert into T_Hotspot(subject, dept, happendate, content, name, recorddate)" & _
			" values(" & ToSQL(sSubject, "Text") & ", " & ToSQL(sDept, "Text") & ", " & ToSQL(sHappenDate,"Text") & ", " & _
			ToSQL(sContent, "Text") & ", " & ToSQL(sName, "Text") & ", " & ToSQL(sRecordDate, "Text") & ")" 

	call ExecuteSQL(dbLocal, strSQL)
	
	iHotspotID = DLookUp(dbLocal, "T_Hotspot", "max(ID)", "subject=" & ToSQL(sSubject, "Text"))

	Response.Redirect "Hotspotinfo.asp?id=" & iHotspotID & "&"
	Response.end
End Function

Function UpdateHotspot()
	dim strSQL', iTypeID, iDisc
	dim sSubject			: sSubject			= GetParam("subject")
	dim sDept				: sDept				= GetParam("dept")
	dim sHappenDate			: sHappenDate		= GetParam("happendate")
	dim sContent			: sContent			= GetParam("content")

	strSQL = "update T_Hotspot" & _
				" set subject = " & ToSQL(sSubject, "Text") & _
				", dept = " & ToSQL(sDept, "Text") & _
				", HappenDate = " & ToSQL(sHappenDate, "Text") & _
				", Content = " & ToSQL(sContent,"Text") & _
				" where ID = " & iHotspotID
	call ExecuteSQL(dbLocal, strSQL)
	
	Response.Redirect "Hotspotinfo.asp?id=" & iHotspotID & "&"
	Response.end
End Function




'************************************************************************************************
' 函数名 : DrawCal2
' 输 入 : sInputDesp	: 日期输入框左边的描述
'		d			: 日期输入框显示的日期
'		sInputId		: 日期输入框的名称,即 input 的 name
'		sImgId		: 日历图标的名称
' 输 出 : 字符串
' 功能描述: 画日期输入框,单击日历图标或双击输入框可以弹出日历以便选择日期
' 调用模块: 
' 作 者 : 周秋舫
' 日 期 : 2002-05-29
' 版 本 : 
'************************************************************************************************
Function DrawCal2(d, sInputId, sImgId)
	DrawCal2 = "<A id=href" & sImgId & _
			" href=""javascript:ShowCalendar(document.all." & sImgId & ",document.all." & sInputId & ",null)""" & _
			" onclick=""javascript:event.cancelBubble=true;""" & _
			" title=""点击图标可以选择购买时间"">" & _
			"<IMG border=0 id=" & sImgId & _
			" src=""../common/cal/calendar.gif""" & _
			" style=""position:relative;vertical-align:middle""></A>" & _
			"<input maxlength=12 name=" & sInputId & " size=20 readonly value=""" & d & """" & _ 				
			" ondblclick=""javascript:document.all.href" &sImgId&".click();""" & _
			" title=""双击输入框或点击旁边的日历图标可以弹出日历"">"
End Function
%>

⌨️ 快捷键说明

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