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

📄 modifyuserinformation.asp

📁 企业及其分支机构的内部办公管理系统,包括人事
💻 ASP
字号:
<%@ Language=VBScript %>
<%
'判断用户是否登录以及具有系统管理员身份
if isempty(Session("ID")) or Session("IsSystemManager")=false then
Response.Redirect "../Login.asp"
end if
'连接系统数据库
set conn = server.createobject ("adodb.connection")
conn.open "ASPData", "sa", "yourpassword"
set RSDepartments = conn.Execute("select  DepartmentName from Departments order by "_
                                          & "DepartmentName")
set RSThisUser=conn.Execute ("select * from PSLogins where LoginID= '" & Session("temp") &"' ")
'修改某个用户信息
if not IsEmpty(Request.Form("Modify")) then
'校验用户的输入
if len(Request.Form("LoginID"))=0 or len(Request.Form("Name"))=0 _ 
or len(Request.Form("Password"))=0 then 
TheMessage = "用户登录名,姓名,密码不能为空"
else
conn.Execute " update PSLogins set  " _
        & "EmailAddress='" & Request.Form("EmailAddress")   & "', " _
        & "Department='" & Request.Form("Department")   & "', " _
        & "Position='" & Request.Form("Position") & "', " _
        & "InternalPhone='" & Request.Form("InternalPhone")  & "', " _
        & "HomePhone='" & Request.Form("HomePhone") & "', " _
        & "MobilePhone='" & Request.Form("MobilePhone") & "', " _
        & "QQ='" & Request.Form("QQ") & "', " _
        & "HomeAddress='" & Request.Form("HomeAddress") & "'," _
        & "IsSystemManager=" & Request.Form("IsSystemManager") & "," _
        & "Birthday='" & Request.Form("BirthdayYear") & "-" _
        & Request.Form("BirthdayMonth") & "-" _
        & Request.Form("BirthdayDay") & "',"  _
        & "IsFinancialManager=" & Request.Form("IsFinancialManager")  _
        & " Where LoginID='" & Request.Form("LoginID") &"'" 
 set RSThisUser=conn.Execute ("select * from PSLogins where LoginID= '" & Session("temp") &"' ")
TheMessage = "此用户信息已经修改成功"  
end if
else              
TheMessage = "请在下面修改此用户信息"  
end if
%>  
             
 

 
 <HTML>
<HEAD>
<TITLE>Employee Email Blast</TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">

</HEAD>

<BODY BGCOLOR="">

<table width=800 border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td    valign=center ><img src="../ASPLogo3.jpg" width=796 height=100></td></tr>
</table>
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="800" height="12"></td></tr>
</table>
 
 <br>
<table WIDTH=800  border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr><td colspan=3><font color=white><P ALIGN="CENTER">公司内部办公信息管理系统->员工信息查询->系统管理员选项->修改某个员工信息&nbsp[当前用户-<% response.write Session("Name") %>]</font></td></tr>
<tr bgcolor=white >
<td><a href="../.././html/home.asp"><font color="#164DA8">返回内网主页</font></a></td>
<td  align=center> <font color="#164DA8" ><% response.write TheMessage %></FONT></td>
<td  align=right><a href="SystemManager.asp"><font color="#164DA8">返回上一级网页</font></a></td>
</tr>                            
</table> 
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="800" height="12"></td></tr></table>             
<br>

<FORM ACTION="ModifyUserInformation.asp"  METHOD=POST>                            
                          <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=1 bordercolor="#164DA8" WIDTH=800 align=center>   
                          <TR VALIGN="center" ALIGN="center">
             	          <TD WIDTH=30% bgcolor=#B5C7EF><img src="../image/employee1.jpg"></td>
	          <td>
	                  <br>
	                  <table CELLPADDING=0 CELLSPACING=1 BORDER=1 align=center width=100%>
	                  <tr><td width=25%><font color="#164DA8">登录名</font></td><td><INPUT TYPE="text" NAME="LoginID" VALUE="<% response.write RSThisUser("LoginID") %>" SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">姓名</font></td><td><INPUT TYPE="text" NAME="Name" VALUE="<% response.write RSThisUser("Name") %>" SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">密码</font></td><td><INPUT TYPE="text" NAME="Password" VALUE="<% response.write RSThisUser("Password") %>"  SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">部门</font></td>
	                        <td>
	                        <SELECT NAME="Department" size=1 width=10 >
	                        <option value="<% Response.Write RSThisUser("Department") %>">&nbsp&nbsp<% Response.Write RSThisUser("Department") %>&nbsp&nbsp</option>
                                         <%
                                          Do Until RSDepartments.EOF
                                          %>	
	                       <OPTION VALUE="<% Response.Write RSDepartments("DepartmentName") %>">&nbsp<% Response.Write RSDepartments("DepartmentName") %>&nbsp</OPTION>
                                         <%
	                        RSDepartments.Movenext
                                         loop
                                         %>		
	                       </SELECT>
	                        </td></tr>
	                  <tr><td width=25%><font color="#164DA8">职位</font></td>
	                        <td>
  	                        <select name="Position" size=1>
  	                        <option value="<%Response.Write RSThisUser("Position")%>">&nbsp&nbsp<% Response.Write RSThisUser("Position") %>&nbsp&nbsp&nbsp&nbsp</option>
	                       <option value="普通">&nbsp&nbsp普通&nbsp&nbsp&nbsp&nbsp</option>
	                       <option value="主管">&nbsp&nbsp主管&nbsp&nbsp&nbsp&nbsp</option>
	                       <option value="经理">&nbsp&nbsp经理&nbsp&nbsp&nbsp&nbsp</option>
	                       </select>
	                       </td></tr>
	                  <tr><td width=25%><font color="#164DA8">电子邮件地址</font></td><td><INPUT TYPE="text" NAME="EmailAddress" VALUE="<% response.write RSThisUser("EmailAddress") %>"  SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">内部分机电话</font></td><td><INPUT TYPE="text" NAME="InternalPhone" VALUE="<% response.write RSThisUser("InternalPhone") %>" SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">移动电话</font></td><td><INPUT TYPE="text" NAME="MobilePhone" VALUE="<% response.write RSThisUser("MobilePhone") %>"  SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">家庭电话</font></td><td><INPUT TYPE="text" NAME="HomePhone" VALUE="<% response.write RSThisUser("HomePhone") %>"  SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">QQ号</font></td><td><INPUT TYPE="text" NAME="QQ" VALUE="<% response.write RSThisUser("QQ") %>"  SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">家庭住址</font></td><td><INPUT TYPE="text" NAME="HomeAddress" VALUE="<% response.write RSThisUser("HomeAddress") %>"  SIZE=51 MAXLENGTH=50 ></td></tr>
	                  <tr><td width=25%><font color="#164DA8">是否系统管理员</font></td>
	                        <td>
  	                        <select name="IsSystemManager" size=1>
  	                        <option value="<% Response.Write RSThisUser("IsSystemManager") %>">&nbsp&nbsp<% Response.Write RSThisUser("IsSystemManager") %>&nbsp&nbsp</option>
	                       <option value="False">&nbsp&nbspFalse&nbsp&nbsp&nbsp</option>
	                       <option value="True">&nbsp&nbspTrue&nbsp&nbsp&nbsp</option>
	                       </select>
	                       </td></tr>
	                  <tr><td width=25%><font color="#164DA8">是否财务管理员</font></td>
	                        <td>
  	                        <select name="IsFinancialManager" size=1>
  	                        <option value="<% Response.Write RSThisUser("IsFinancialManager") %>">&nbsp&nbsp<% Response.Write RSThisUser("IsFinancialManager") %>&nbsp&nbsp</option>
	                       <option value="False">&nbsp&nbspFalse&nbsp&nbsp&nbsp</option>
	                       <option value="True">&nbsp&nbspTrue&nbsp&nbsp&nbsp</option>
	                       </select>
	                       </td></tr>
	                  <tr><td width=25%><font color="#164DA8">生日</font></td>
	                        <td>
  	                        <select name="BirthdayYear" size=1>
  	                        <%
  	                        YearCounter= Year(RSThisUser("Birthday"))
  	                        %>
                                         <option value="<% Response.Write YearCounter %>">&nbsp&nbsp<% Response.Write YearCounter %>&nbsp&nbsp</option> 
  	                        <%
  	                        YearCounter = 2000
  	                        Do until YearCounter <=1900
  	                        %>
  	                       <OPTION VALUE="<% Response.Write YearCounter %>">&nbsp&nbsp<% Response.Write YearCounter %>&nbsp&nbsp</OPTION>
  	                        <%
  	                        YearCounter = YearCounter-1
  	                        loop
  	                        %>
	                       </select> 年&nbsp&nbsp
	                       
   	                        <select name="BirthdayMonth" size=1>
  	                        <%
  	                        MonthCounter= Month(RSThisUser("Birthday"))
  	                        %>
                                         <option value="<% Response.Write MonthCounter %>">&nbsp&nbsp<% Response.Write MonthCounter %>&nbsp&nbsp</option> 
  	                        <%
  	                        MonthCounter = 1
  	                        Do until MonthCounter >12
  	                        %>
  	                       <OPTION VALUE="<% Response.Write MonthCounter %>">&nbsp&nbsp<% Response.Write MonthCounter %>&nbsp&nbsp</OPTION>
  	                        <%
  	                        MonthCounter = MonthCounter+1
  	                        loop
  	                        %>
	                       </select> 月&nbsp&nbsp
	                       
   	                        <select name="BirthdayDay" size=1>
  	                        <%
  	                        DayCounter= Day(RSThisUser("Birthday"))
  	                        %>
                                         <option value="<% Response.Write DayCounter %>">&nbsp&nbsp<% Response.Write DayCounter %>&nbsp&nbsp</option>    	                        
  	                        <%
  	                        DayCounter = 1
  	                        Do until DayCounter >31
  	                        %>
  	                       <OPTION VALUE="<% Response.Write DayCounter %>">&nbsp&nbsp<% Response.Write DayCounter %>&nbsp&nbsp</OPTION>
  	                        <%
  	                        DayCounter = DayCounter+1
  	                        loop
  	                        %>
	                       </select> 日&nbsp&nbsp
	                       
	                       </td></tr>	                       	                  
	                         
	                  </table>
	                  <br>
                          </td>  
                          </TR>
                          </table>
                          
                          <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=1 WIDTH=800 align=center>
                          <TR VALIGN="top" ALIGN="center">
	          <TD WIDTH=100% align=center >
	          <INPUT TYPE="submit" NAME="Modify" VALUE="修改用户信息" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB">
                          </TD>
                          </TR>
                          </table>                         
                          
</FORM>                           
                          
</body>
</html>                          

⌨️ 快捷键说明

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