📄 filesusermodify.ascx
字号:
<%@ Control Inherits="SpbDev.FilesWebPages.UCFilesUserModify" Language="C#"%>
<%@ Register TagPrefix="spbdev" Namespace="SpbDev.FilesWebControls" Assembly="SpbDev.Files"%>
<html>
<head>
<title><%=FilesSysName%> - 用户编辑</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<style type="text/css">
<!--
body,table,td{font-size:12px;color:#000000;word-break:break-all;}
body{margin:1px;padding:0;background:#ffffff url(<%=TemplateSourceDirectory%>/image/FilesPageBg.gif);}
img{vertical-align:bottom}
form{margin:0;padding:0}
a{color:#000080;text-decoration:none;}
a:hover{color:#ff3333;text-decoration:underline}
.txtWhite{color:#EEEEEE}
.txtWhite a{color:#EEEEEE}
.InputTxt{border:solid 1px #6666AA;width:220px}
.button{width:63px;height:20px;cursor:hand;border:none;}
.TrHead td{background:#EEEEEE url(<%=TemplateSourceDirectory%>/image/FilesUserTopBg.gif);font-weight:600;color:#333333;}
.TrFoot td{background:#EEEEEE url(<%=TemplateSourceDirectory%>/image/FilesUserTopBg.gif);color:#333333;}
.NewUserAdd td{height:30px;padding-left:8px;}
//-->
</style>
<script language="javascript">
<!--
var startTime,endTime;
var d=new Date();
startTime=d.getTime();
String.prototype.trim=function(){
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.getLength=function()
{
var ts=0;
var iStrLen=this.length;
for(i=0;i<iStrLen;i++)
{
iUnc = this.charCodeAt(i);
if(iUnc < 1000)
{
ts += 1;
}
else
{
ts += 2;
}
}
return ts;
}
function formDataCheck(oF)
{
if(oF.UserID.value.trim()==""){
alert("请将用户名填写完整!");
oF.UserID.focus();
return false;
}
else if(oF.UserID.value.getLength()>12 || oF.UserID.value.getLength()<3){
alert("用户名须为3到12个英文字符或者2到6个中文字符!");
oF.UserID.focus();
return false;
}
else if(oF.UserPwd.value!="" && (oF.UserPwd.value.length<6 || oF.UserPwd.value>12)){
alert("用户密码须在6到32个字符之间。不更改密码请留空!");
oF.UserPwd.focus();
return false;
}
else if(oF.UserFileType.value.trim()==""){
alert("请正确填写用户能上传的文件类型!");
oF.UserFileType.focus();
return false;
}
else if(oF.UserRootDir.value.trim()=="" || oF.UserRootDir.value.substr(0,1)!="/" || oF.UserRootDir.value.lastIndexOf("/")!=oF.UserRootDir.value.length-1){
alert("请正确填写用户目录路径,路径必须以/开头和结尾!");
oF.UserRootDir.focus();
return false;
}
else if(oF.UserRootDir.value.indexOf("//")>-1 || oF.UserRootDir.value.indexOf("\\")>-1 || oF.UserRootDir.value.indexOf("*")>-1 || oF.UserRootDir.value.indexOf("?")>-1 || oF.UserRootDir.value.indexOf("|")>-1 || oF.UserRootDir.value.indexOf("<")>-1 || oF.UserRootDir.value.indexOf(">")>-1 || oF.UserRootDir.value.indexOf("\"")>-1 || oF.UserRootDir.value.indexOf(":")>-1){
alert("目录路径中不得包含特殊字符,请检查!");
oF.UserRootDir.focus();
return false;
}
else if(oF.UserDefaultDir.value.trim()=="" || oF.UserDefaultDir.value.substr(0,1)!="/" || oF.UserDefaultDir.value.lastIndexOf("/")!=oF.UserDefaultDir.value.length-1){
alert("请正确填写用户默认目录,目录必须以/开头和结尾!");
oF.UserDefaultDir.focus();
return false;
}
else if(oF.UserDefaultDir.value.indexOf("//")>-1 || oF.UserDefaultDir.value.indexOf("\\")>-1 || oF.UserDefaultDir.value.indexOf("*")>-1 || oF.UserDefaultDir.value.indexOf("?")>-1 || oF.UserDefaultDir.value.indexOf("|")>-1 || oF.UserDefaultDir.value.indexOf("<")>-1 || oF.UserDefaultDir.value.indexOf(">")>-1 || oF.UserDefaultDir.value.indexOf("\"")>-1 || oF.UserDefaultDir.value.indexOf(":")>-1){
alert("目录路径中不得包含特殊字符,请检查!");
oF.UserDefaultDir.focus();
return false;
}
else if(isNaN(oF.MaxFileSize.value) || parseFloat(oF.MaxFileSize.value) * 1000 > <%=Int32.MaxValue%> || parseFloat(oF.MaxFileSize.value)<0){
alert("请正确填写用户单个文件上传的大小限制!");
oF.MaxFileSize.focus();
return false;
}
else if(isNaN(oF.DirPageSize.value) || parseFloat(oF.DirPageSize.value) * 1000 > <%=Int32.MaxValue%> || parseFloat(oF.DirPageSize.value)<0){
alert("请正确填写用户文件管理页面每页显示的目录数!");
oF.DirPageSize.focus();
return false;
}
else if(isNaN(oF.FilePageSize.value) || parseFloat(oF.FilePageSize.value) * 1000 > <%=Int32.MaxValue%> || parseFloat(oF.FilePageSize.value)<0){
alert("请正确填写用户文件管理页面每页显示的文件数!");
oF.FilePageSize.focus();
return false;
}
else{
return true;
}
}
//-->
</script>
</head>
<body>
<center>
<div style="position:relative;text-align:left;width:772px;background:#ffffff;border:solid;border-color:#333333;border-width:0 1px;">
<table align="center" width="100%" border="0" style="background:#4279BD">
<tr>
<td height="18"><img src="<%=TemplateSourceDirectory%>/image/FilesLogo.gif" style="position:absolute;left:10px;top:-1px;"></td>
</tr>
</table>
<table align="center" width="100%" cellspacing="0" class="txtWhite" style="background:#268CBE url(<%=TemplateSourceDirectory%>/image/FilesBanner.gif) right;border-top:solid 1px #ffffff;border-bottom:solid 1px #ffffff;">
<tr>
<td width="30%"> <%=FilesSysName%> <%=FilesVersion%></td>
<td width="40%" height="55" align="center"> </td>
<td align="right"><a href="FilesExplorer.aspx">文件</a> <a href="FilesUser.aspx?p=<%=CurPage%>">用户</a> <a href="FilesLoginOut.aspx?nTime=<%=nTime%>">退出</a> </td>
</tr>
</table>
<table align="center" width="100%" border="0" style="background:#4279BD">
<tr>
<td colspan="2" height="18"> </td>
</tr>
</table>
<spbdev:SpbPanel id="FormItemErr" runat="server">
<br>
<table width="96%" border="1" bordercolor="#DDDDDD" cellspacing="0" align="center" style="border-collapse:collapse;">
<tr class="TrHead">
<td height="28" align="center" valign="middle"><font color="#FF3333"><%=Str.HtmlEnc(FormItemErrInfo)%></font></td>
</tr>
</table>
</spbdev:SpbPanel>
<br>
<form name="userCont" method="post" action="<%=SelfName%>?p=<%=CurPage%>">
<table width="96%" border="1" bordercolor="#DDDDDD" cellspacing="0" align="center" style="border-collapse:collapse;">
<tr class="TrHead">
<td align="center" height="26" align="center"><%=FilesSysName%> - 用户编辑</td>
</tr>
<tr>
<td align="center" bgcolor="#F6F6F6" style="padding:12px">
<table width="90%" align="center" border="1" bordercolor="#DDDDDD" style="border-collapse:collapse" class="NewUserAdd">
<tr>
<td width="18%">用户名称</td>
<td width="42%"><input name="UserID" type="text" value="<%=Str.InputEnc(UserID)%>" maxlength="12" readonly class="InputTxt" style="background:#F6F6F6"></td>
<td>不能更改用户名,但可以删除后重新添加!</td>
</tr>
<tr>
<td>用户密码</td>
<td><input name="UserPwd" type="password" value="<%=Str.InputEnc(UserPwd)%>" maxlength="32" class="InputTxt"></td>
<td>长度6-32位,<font color="#FF3333">不更改密码请留空!</font></td>
</tr>
<tr>
<td>用户类型</td>
<td><input type="radio" name="UserType" id="UserTypeAdmin" <%=GetCheckAttr(1)%> value="Admin"> <label for="UserTypeAdmin">管理员</label> <input name="UserType" id="UserTypeNormal" type="radio" <%=GetCheckAttr(0)%> value="Normal"> <label for="UserTypeNormal">普通用户</label></td>
<td>设置用户级别。<br><font color="#FF3333">注意:管理员用户不受以下三项设置限制</font></td>
</tr>
<tr>
<td>文件类型</td>
<td><input name="UserFileType" type="text" value="<%=Str.InputEnc(UserFileType)%>" class="InputTxt"></td>
<td>用户能上传的类型,用|号分隔。<br><font color="#FF3333">不限制类型请填*号(慎用)</font></td>
</tr>
<tr>
<td>上传限制</td>
<td><input name="MaxFileSize" type="text" value="<%=MaxFileSize%>" class="InputTxt"></td>
<td>用户能上传的单个文件大小限制,单位:KB。<font color="#FF3333">最大值:<%=(Int32.MaxValue / 1000)%></font></td>
</tr>
<tr>
<td>用户目录</td>
<td><input name="UserRootDir" type="text" value="<%=Str.InputEnc(UserRootDir)%>" maxlength="255" class="InputTxt" onblur="if(this.form.UserDefaultDir && this.form.UserDefaultDir.value.indexOf(this.value)!=0){this.form.UserDefaultDir.value=this.value}"></td>
<td>用户能管理的目录(含子目录)</td>
</tr>
<tr>
<td>默认目录</td>
<td><input name="UserDefaultDir" type="text" value="<%=Str.InputEnc(UserDefaultDir)%>" maxlength="255" class="InputTxt"></td>
<td>用户进入系统的默认目录,须为用户目录或子目录</td>
</tr>
<tr>
<td>每页目录数</td>
<td><input name="DirPageSize" type="text" value="<%=DirPageSize%>" class="InputTxt"></td>
<td>分页时每页显示的目录数。<font color="#FF3333">最大值:200</font></td>
</tr>
<tr>
<td>每页文件数</td>
<td><input name="FilePageSize" type="text" value="<%=FilePageSize%>" class="InputTxt"></td>
<td>分页是每页显示的文件数。<font color="#FF3333">最大值:200</font></td>
</tr>
</table>
</td>
<tr class="TrFoot">
<td align="center" height="26" colspan="6" align="center"><img src="<%=TemplateSourceDirectory%>/image/FilesSaveEdit.gif" class="Button" onclick="if(formDataCheck(document.forms[0]))document.forms[0].submit()"> <img src="<%=TemplateSourceDirectory%>/image/FilesFormReset.gif" class="Button" onclick="document.forms[0].reset()"> <img src="<%=TemplateSourceDirectory%>/image/FilesUserMng.gif" class="Button" onclick="window.location.href='FilesUser.aspx?p=<%=CurPage%>'"></td>
</tr>
</table>
</form>
<br>
<table align="center" width="100%" cellspacing=0 border="0" class="txtWhite">
<tr bgcolor="#4279BD">
<td height="28" align="right"> </td>
</tr>
</table>
<table align="center" width="100%" border=0 cellpadding='0' cellspacing='0'>
<tr>
<td height='22'></td>
</tr>
<tr>
<td height='85' align='center' valign='top' style='line-height:22px;padding-top:6px'> <font face='Arial'>程序名称:<a href="http://www.spbdev.com/Licence/FilesNet.aspx?id=">FilesNet <%=Version.Major.ToString()%>.<%=Version.Minor.ToString()%></a> 发布站点:<a href='http://www.SpbDev.com' target='_blank'>SpbDev</a> 当前风格:蓝色天空<br>执行时间:<%=precessTime%> 毫秒 页面装载:<script language='javascript'>d=new Date();endTime=d.getTime();document.write((endTime-startTime)/1000);</script> 秒</font><!--数据库查询:<%=QueryTimes%>次--></td>
</tr>
</table>
</div>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -