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

📄 memo.asp

📁 物业管理和办公自动化系统
💻 ASP
字号:
<%
'************************************************************************************************
' 文件名: memo.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
'  创建人 : 周秋舫
'  日 期 : 2002-05-13
' 修改历史 :
'   ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : 补充说明
'  版 本 :
'*******************************************************************************
'option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>

<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->

<!-- #include file="../common/commonpage.inc" -->

<%
'*******************************************************************************
' 服务器端代码
dim pEmpSerial : pEmpSerial = GetParam("emp_serial")
dim sMemo	: sMemo = GetMemo()

if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
	UpdateMemo()
end if

'--------------------------------------------------------------------------------------------------
' 更新数据memo
'--------------------------------------------------------------------------------------------------
sub UpdateMemo()
	dim sSQL
	sMemo = GetParam("remark")
	if Len(sMemo) > 256 then
		Response.Write "<script language=""javascript"">alert(""对不起,备注信息的长度不能超过256个字!"")</script>"
		exit sub
	end if
	sSQL = "update t_employee set remark = " & ToSQL(sMemo, "Text") & " where serial = " & ToSQL(pEmpSerial, "Number")
	'response.write sSQL & "<br>"
	call ExecuteSQL(dbLocal, sSQL)
end sub

'--------------------------------------------------------------------------------------------------
' 获取数据memo
'--------------------------------------------------------------------------------------------------
function GetMemo()
	dim sSQL, sMemo
	sSQL = "select remark from t_employee where serial = " & ToSQL(pEmpSerial, "Number")
	set crs = New CRecordset
	set rs = crs.Open(dbLocal, sSQL)
	sMemo = crs.GetValue("remark")
	crs.Close()
'	response.write sMemo & "<br>"
	GetMemo = sMemo
end function
%>

<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../common/common.css" type="text/css">
<style type="text/css">
textarea {color:blue}
</style>

<script language="javascript">
function CheckMemoLength()
{
	var sMemo = frmMemo.remark.value;
	if ( sMemo.length > 256 )
	{
		alert('对不起,备注信息的长度不能超过256个字!');
		return false;
	}
	else
	{
		frmMemo.submit();
		//alert('可以了');
	}
}
</script>
</head>

<body>

<form name="frmMemo" Method="post" Action="memo.asp" onsubmit="return(CheckMemoLength());">
<input type="hidden" name="emp_serial" value="<%=pEmpSerial%>">
<table border=0 height=230 valign=middle align=center>
		<tr><td>补充说明:</td></tr>
		<tr><td><textarea name="remark" cols=88 rows=14 onkeypress="this.style.color='red'" onchange="this.style.color='red'"><%=sMemo%></textarea></td></tr>
</table>

<br>
<center><input type="image" border=0 style="border-width:0" src="../images/button/ok.gif"></center>

</form>

</body>
</html>

⌨️ 快捷键说明

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