
<html>
<head>
<link rel="stylesheet" type="text/css" href="../CSS/main.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>权限设置</title>
</head>
<body topmargin="10" leftmargin="10" >

<form NAME="Rightfrm" method="post">
  <div align="center"><center>
      <table border="0" cellspacing="1" cellpadding=3 width="100%" bgcolor=#0047b0>
        <tr bgcolor=#ffffff> 
          <td height="30" width="33%" valign="middle" align=right><b>用户登录名</b><font COLOR="RED">*</td>
          <td height="30" colspan="2" valign="middle"><input TYPE="text" class="input" SIZE="17" Name="LoginName" maxlength="25" ></td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td valign="middle" align=right><b>登录口令</b><font COLOR="RED">*</td>
          <td colspan="2" valign="middle"><input TYPE="password" class="input" SIZE="17" NAME="Pwd" maxlength="40"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td valign="middle" align=right><b>再输一次口令</b><font COLOR="RED">*</td>
          <td colspan="2" valign="middle"><input TYPE="password" class="input" SIZE="17" NAME="ConfirmPwd" maxlength="40" > 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td valign="middle" align=right><b>姓名</b><font COLOR="RED">*</td>
          <td colspan="2" valign="middle"><input TYPE="text" class="input" SIZE="17" NAME="Name" maxlength="30" > 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td align=right><b>性别</b><font COLOR="RED">*</td>
          <td colspan="2"> <select name="sex">
              <option value=0 <%if Sex="0" then response.write " selected"%>>男 
              <option value=1 <%if Sex="1" then response.write " selected"%>>女 
            </select> </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP" align=right><b>部门</b> <font COLOR="RED">*</td>
          <td colspan="2"> 
            <%options "department","tblDepartment","Name",Department%>
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP" align=right><b>直接上级</b> <font COLOR="RED">*</td>
          <td colspan="2"> 
            <%options "PreviousID","tblUser","Name",PreviousID%>
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP"  align=right><b>职位</b> </td>
          <td colspan="2"> <input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="30" NAME="Position"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP"  align=right><b>E-mail</b> </td>
          <td colspan="2"> <input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="30" NAME="Email"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP"  align=right><b>电话(O)</b> </td>
          <td colspan="2"><input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="40" NAME="OfficeTel"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP" ALIGN="right"><b>电话(H)</b> </td>
          <td colspan="2"><input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="40" NAME="HomeTel"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP" ALIGN="right"><b>传真</b> </td>
          <td colspan="2"><input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="40" NAME="Fax"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP" ALIGN="right"><b>传呼</b> </td>
          <td colspan="2"><input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="40" NAME="Pager"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP" ALIGN="right"><b>手机</b> </td>
          <td colspan="2"><input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="40" NAME="Mobiletel"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP" ALIGN="right"><b>邮政编码</b> </td>
          <td colspan=2><input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="40" NAME="Postcode"> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td VALIGN="TOP" ALIGN="right"><b>详细地址</b> </td>
          <td colspan=2><input class="input"  TYPE="TEXT" SIZE="30" MAXLENGTH="40" NAME="Address"> 
          </td>
        </tr>
        <tr bgcolor=#FFFFFF> 
          <td VALIGN="TOP" ALIGN="right"><b>自我评价</b> </td>
          <td VALIGN="TOP" ALIGN="LEFT" colspan=2> <textarea COLS="35" ROWS="5" NAME="SelfBody" WRAP="PHYSICAL"></textarea> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td valign=top align=right><b>其他</b> </td>
          <td colspan=2> <textarea COLS="35" ROWS="5" NAME="Info">
	</textarea> 
          </td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td colspan=3>维护权限</td>
        </tr>
        <%set oRsRight=server.createobject("ADODB.RecordSet")
	sql="select Title,Rkey from tblRights order by rkey"
	oRsRight.open sql,oConn,1,1
	while not oRsRight.eof
	%>
        <tr bgcolor=#ffffff> 
          <td height="30" width="146" valign="middle"> 
            <%if not oRsRight.eof then%>
            <INPUT TYPE="checkbox" NAME="Rights" value="<%=trim(oRsRight("Rkey"))%>" <%if instr(strRights,trim(oRsRight("Rkey")))>0 then response.write " checked"%> >	
            <font color="#FF0080">&nbsp;<%=trim(oRsRight("Title"))%></font> 
            <%oRsRight.movenext
			end if%>
          </td>
          <td height="30" width="146" valign="middle"> 
            <%if not oRsRight.eof then%>
            <INPUT TYPE="checkbox" NAME="Rights" value="<%=trim(oRsRight("Rkey"))%>" <%if instr(strRights,trim(oRsRight("Rkey")))>0 then response.write " checked"%> >	
            <font color="#FF0080">&nbsp;<%=trim(oRsRight("Title"))%></font> 
            <%oRsRight.movenext
			end if%>
          </td>
          <td height="30" width="146" valign="middle"> 
            <%if not oRsRight.eof then%>
            <INPUT TYPE="checkbox" NAME="Rights" value="<%=trim(oRsRight("Rkey"))%>" <%if instr(strRights,trim(oRsRight("Rkey")))>0 then response.write " checked"%> >	
            <font color="#FF0080">&nbsp;<%=trim(oRsRight("Title"))%></font> 
            <%oRsRight.movenext
			end if%>
          </td>
        </tr>
        <%wend
	oRsRight.close
	set oRsRight = nothing%>
        <tr bgcolor=#ffffff> 
          <%if ID<>"0" then%>
          <td></td>
          <td height="40" valign="middle" align="center"> <input type="Submit" value="修改信息" name="cmdUpdate" onclick="return CheckData();" disabled> 
          </td>
          <td height="40" valign="middle" align="center"> <input type="Submit" value="删除用户" name="cmdDelete" onclick="return CheckDelete();" disabled> 
          </td>
          <%else%>
          <td></td>
          <td></td>
          <td height="40" valign="middle" align="center">&nbsp;</td>
          <%end if%>
        </tr>
        <%if ID<>"0" and ID<>"" then%>
        <tr bgcolor=#FFFFFF> 
          <td VALIGN="TOP" ALIGN="LEFT"><b>照片</b> </td>
          <td VALIGN="TOP" ALIGN="LEFT" colspan=2> 
            <%if sPhoto<>"" then%>
            <img src="../File_up/Photo/<%=ID%>/<%=sPhoto%>" border=0> 
            <%end if%>
            <!--input type="file" name="Photo" size=20 class="input"-->
            <input type="button" value="更改照片" onclick="OpenWindow('PhotoUpfrm.htm?ID=<%=ID%>','PhotoWindow')"> 
          </td>
        </tr>
        <tr bgcolor=#FFFFFF> 
          <td VALIGN="TOP" ALIGN="LEFT"><b>签名</b> </td>
          <td VALIGN="TOP" ALIGN="LEFT" colspan=2> 
            <%if sPhoto<>"" then%>
            <img src="../File_up/Photo/<%=ID%>/<%=sSignature%>" border=0> 
            <%end if%>
            <!--input type="file" name="Signature" size=20 class="input"-->
            <input type="button" value="更改签名" onclick="OpenWindow('SignatureUpfrm.htm?ID=<%=ID%>','PhotoWindow')"> 
          </td>
        </tr>
        <%end if%>
      </table>
  </center></div>
</form>
</body>
</html>
<script language="JavaScript">
function OpenWindow(url,windowname)
{
window.open(url,windowname,'left=100,top=50,height=100,width=350,toolbar=no,menubar=no,scrollbars=yes')
}
</script>
<script language=javascript>
function CheckData()
{
	if(jtrim(document.Rightfrm.LoginName.value)=="")
	{
		alert("请输入登录用户名。")
		document.Rightfrm.LoginName.focus();
		return false;
	}
	if(jtrim(document.Rightfrm.LoginName.value).length>50)
	{
		alert("登录用户名不能超过50个字。")
		document.Reportform.LoginName.focus();
		return false;
	}
	if(jtrim(document.Rightfrm.Name.value)=="")
	{
		alert("请输入用户姓名。")
		document.Rightfrm.Name.focus();
		return false;
	}
	
	return true;
}
</script>
<script language=javascript src="../inc/jtrim.js"></script>
<script language=javascript>
function CheckDelete()
{
	document.Rightfrm.cmdDelete.value !=""
	return confirm("确实删除吗？");
}
</script>