📄 newfilename.jsp
字号:
<%@page language="java" import="java.sql.*,java.text.*, java.util.*,java.lang.*,java.io.*,java.sql.*, oa.main.*" contentType="text/html; charset=GBK"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>重命名</title>
<script language="javascript" src="../scripts/department.js"></script>
<link href="../css/person.css" type=text/css rel=stylesheet>
</head>
<body bgcolor= "#F6FEE8">
<%
oa.bean.PersonFileBean myFileBean = null;
try{
myFileBean = new oa.bean.PersonFileBean();
if(myFileBean.getConn()==null)
{
%>
数据库无法响应,请<a href="javascript:window.history.back(-1);">返回</a>重试
<%out.close();
}
DealString ds = new DealString();
String uid = ds.toString(request.getParameter("zgbh"));
String fileID = ds.toString(request.getParameter("fileID"));
String parentid= ds.toString(request.getParameter("parentID"));
String oldname = "";
String flag = ds.toString(request.getParameter("flag"));
if(flag.equals("2"))
{
%><script>
window.close();
window.opener.form1.submit();
</script><%
}
else
{
oldname = myFileBean.getFileName(uid,fileID);
}
%>
<form name="form2" method=post>
<table cellSpacing="0" cellPadding="0" width="98%" align="center" bgColor="#ddffff" border="0">
<tr><td>
<input type="submit" name="subbtn" value="确定" class=fashion onmouseover="msover();" onmouseout="msout();" onclick="returnPF();">
<input type="button" name="btcancel" value="取消" class=fashion onmouseover="msover();" onmouseout="msout();" onclick="self.close()">
<input type="hidden" name="txt_cmd" value="RENAME"><input type="hidden" name="txt_parentID" value="<%=parentid%>">
</td></tr>
<tr><td align="left">请输入一个新的名字: </td></tr>
<tr><td align="left"><input type="text" name="txt_newfilename" value="<%=oldname%>" size="50" class=txtframe></td></tr>
</table>
</form>
</body>
<script>
function returnPF()
{
var newname = document.all.txt_newfilename.value;
if ((newname!=null) && (newname!=""))
{
if (!checkFilename(newname))
{
alert("您所取的名称不合法,请确实其小于50个字,并且不包含\/等非法字符!");
return false;
}
}
document.all.form2.action ="../../PersonFileServlet?flag=1&txt_fileID=<%=fileID%>";
//document.all.form2.submit();
//window.close();
}
//检查文件名是否合法,1.长度<50,2,不含下列字符/\
function checkFilename(strfilename)
{
if (strfilename.length>50) return false;
if (strfilename.match(/[\/\\]/)==null)
{
return true;
}
return false;
}
</script>
</html>
<%}catch(Exception e){oa.main.Logger.log("ERROR:oa.person.newFileName.jsp=>");e.printStackTrace(oa.main.Logger.log);}
finally{
if(myFileBean!=null)myFileBean.closeConn();
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -