📄 folder_a.asp
字号:
<%
'************************************************************************************************
' 文件名: folder_d.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
' 创建人 : 周秋舫
' 日 期 : 2002-08-29
' 修改历史 :
' ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : 新增文件夹
' 版 本 :
'************************************************************************************************
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/emp.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->
<%
call CheckSecurity()
dim iEmpSerial : iEmpSerial = GetEmpSerial
dim pFolderName, iCount, sSQL, sError
'' 如果是提交,则新增文件夹
if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
pFolderName = GetParam("folder_name")
'' 首先检查文件名是否为空
if Trim(pFolderName) = "" then
sError = "对不起,文件夹名称不能为空!"
else
'' 其次检查是否有同名文件夹存在
iCount = DLookUp(dbLocal, "t_filefolder", "count(*)", "emp_serial=" & iEmpSerial & " and folder_name = " & ToSQL(pFolderName,"Text"))
if iCount > 0 then sError = "对不起,新建的文件夹与已有文件夹重名!"
end if
if sError <> "" then
'' 如果有错误,则提示错误信息
Response.Write "<script language=""javascript"">" & vbLF & _
" window.alert(" & ToSQL(sError,"Text") & ");" & vbLF & _
"</script>" & vbLF
else
'' 如果没错误,则更新数据库
sSQL = "insert into t_filefolder(folder_name, emp_serial) values(" & ToSQL(pFolderName,"Text") & "," & iEmpSerial & ")"
call ExecuteSQL(dbLocal, sSQL)
Response.Write "<script language=""javascript"">" & vbLF & _
" if (typeof(window.opener) != 'undefined')" & vbLF & _
" window.opener.location.reload();" & vbLF & _
" window.close();" & vbLF & _
"</script>" & vbLF
Response.end
end if
end if
%>
<html>
<head>
<title>新建文件夹</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<link rel="stylesheet" href="../common/common.css" type="text/css">
<script language="javascript">
function CheckInput()
{
if (FormAddFolder.folder_name.value == "")
{
FormAddFolder.folder_name.focus();
alert("对不起,文件夹名称不能为空!");
return false;
}
}
</script>
</head>
<body background="../images/bg/bg0.jpg" scroll="no" LeftMargin=0 TopMargin=0>
<form name="FormAddFolder" action="folder_a.asp" method="post" onsubmit="return(CheckInput());">
<table cellspacing=0 cellpadding=0 border=0 width="350" align=center background="../images/bg/btmtx.gif">
<tr height="10px"><td> </td></tr>
<tr height="25px">
<td colspan=3 align=center>
文件夹名称:
<input type="text" name="folder_name" value="<%=pFolderName%>" style="border:solid 1px gray;font-size:9pt" size=40 maxlength=64></td></tr>
<tr height="45px">
<td colspan=3 align=center>
<input type=image border=0 style="cursor:hand;border-width:0" src="../images/button/ok.gif">
<img width=20 height=0>
<img border=0 style="cursor:hand" src="../images/button/cancel.gif" onclick="window.close();">
</td>
<tr height="40px">
<td colspan=3 style="font-family:Arial, Helvetica, sans-serif;color:white" align=center>上海市电信公司信息世界分公司<br> ©All rights reserved by Shanghai Telecommunication company information world Branch</td></tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -