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

📄 xiugai.asp

📁 办公自动化系统
💻 ASP
字号:
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%
'判断用户是否登录以及具有系统管理员身份
if isempty(Session("ID")) or Session("IsSystemManager")=false then
Response.Redirect "../Login.asp"
end if
set RSDepartments = conn.Execute("select  DepartmentName from Departments order by "_
                                          & "DepartmentName")
set RSThisUser=conn.Execute ("select * from UserInfo 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 UserInfo set  " _
        & "EmailAddress='" & Request.Form("EmailAddress")   & "', " _
        & "Department='" & Request.Form("Department")   & "', " _
        & "Position='" & Request.Form("Position") & "', " _
		& "Name='" & Request.Form("Name") & "', " _
		& "Password='" & Request.Form("Password") & "', " _
        & "InternalPhone='" & Request.Form("InternalPhone")  & "', " _
        & "HomePhone='" & Request.Form("HomePhone") & "', " _
        & "MobilePhone='" & Request.Form("MobilePhone") & "', " _
		& "IsSystemManager=" & Request.Form("IsSystemManager") & "," _
        & "IsFinancialManager=" & Request.Form("IsFinancialManager") & "," _
        & "HomeAddress='" & Request.Form("HomeAddress") & "'," _
        & "Birthday='" & Request.Form("BirthdayYear") & "-" _
        & Request.Form("BirthdayMonth") & "-" _
        & Request.Form("BirthdayDay") & "',"  _
        & "QQ='" & Request.Form("QQ") & "'" _
        & " Where LoginID='" & Request.Form("LoginID") &"'" 


set RSThisUser=conn.Execute ("select * from UserInfo where LoginID= '" & Session("temp") &"' ")
TheMessage = "此用户信息已经修改成功"  
end if
else              
TheMessage = "请在下面修改此用户信息"  
end if
%>  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>

<BODY BGCOLOR="">

<table width=800 border=0 bgcolor=#9999FF cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td height="60"    valign=center bgcolor="#9933FF" ><div align="center"><font color="#FFFFFF" size="4"><strong>企业办公自动化系统</strong></font></div></td>
</tr>
</table>

<table WIDTH=800  border=0 bgcolor=#9966FF cellspacing=1 cellpadding=2 align=center>
<tr bgcolor="#99CCFF"><td colspan=3><P ALIGN="CENTER"><font color="#9966FF">公司信息管理系统->员工信息查询->管理员选项->修改员工信息当前用户:
      <% response.write Session("Name") %>
  </font></td></tr>
<tr bgcolor=white >
<td width="244"><a href="../html/home.asp"><font color="#9966FF">返回主页</font></a></td>
<td width="264"  align=center> <font color="#9966FF" ><% response.write TheMessage %></FONT></td>
<td width="276"  align=right><a href="SystemManager.asp"><font color="#9933FF">返回上页</font></a></td>
</tr>                            
</table> 


<FORM ACTION="xiugai.asp"  METHOD=POST>                            
                          <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=1 bordercolor="#9966FF" WIDTH=800 align=center>   
                          <TR VALIGN="center" ALIGN="center">
             	          <TD WIDTH=30% bgcolor=#99CCFF><img src="../image/HomepagePicture1.jpg" width="250" height="173"></td>
	          <td>
	                  <br>
	                  <table width=100% BORDER=1 align=center CELLPADDING=0 CELLSPACING=1 bordercolor="#99CCFF">
	                  <tr><td width=30%><font color="#9966FF">登录名</font></td>
	                    <td width="70%"><font color="#9966FF">
                        <INPUT TYPE="text" NAME="LoginID" VALUE="<% response.write RSThisUser("LoginID") %>" SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">姓名</font></td>
	                    <td><font color="#9966FF">
                        <INPUT TYPE="text" NAME="Name" VALUE="<% response.write RSThisUser("Name") %>" SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">密码</font></td>
	                    <td><font color="#9966FF">
                        <INPUT TYPE="text" NAME="Password" VALUE="<% response.write RSThisUser("Password") %>"  SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">部门</font></td>
	                        <td>
	                          <div align="left"><font color="#9966FF">
                              <SELECT NAME="Department" size=1 width=10 >
                                <option value="<% Response.Write RSThisUser("Department") %>">
                                <% Response.Write RSThisUser("Department") %>
</option>
                                           <%
                                          Do Until RSDepartments.EOF
                                          %>	
                                <OPTION VALUE="<% Response.Write RSDepartments("DepartmentName") %>">
                                <% Response.Write RSDepartments("DepartmentName") %>
</OPTION>
                                           <%
	                        RSDepartments.Movenext
                                         loop
                                         %>		
                              </SELECT>
                            </font></div></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">职位</font></td>
	                        <td>
  	                          <div align="left"><font color="#9966FF">
                              <select name="Position" size=1>
                                <option value="<%Response.Write RSThisUser("Position")%>">
                                <% Response.Write RSThisUser("Position") %>
</option>
                                <option value="普通">普通</option>
                                <option value="主管">主管</option>
                                <option value="经理">经理</option>
                              </select>
                           </font></div></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">电子邮件地址</font></td>
	                    <td><font color="#9966FF">
                        <INPUT TYPE="text" NAME="EmailAddress" VALUE="<% response.write RSThisUser("EmailAddress") %>"  SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">内部分机电话</font></td>
	                    <td><font color="#9966FF">
                        <INPUT TYPE="text" NAME="InternalPhone" VALUE="<% response.write RSThisUser("InternalPhone") %>" SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">移动电话</font></td>
	                    <td><font color="#9966FF">
                        <INPUT TYPE="text" NAME="MobilePhone" VALUE="<% response.write RSThisUser("MobilePhone") %>"  SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">家庭电话</font></td>
	                    <td><font color="#9966FF">
                        <INPUT TYPE="text" NAME="HomePhone" VALUE="<% response.write RSThisUser("HomePhone") %>"  SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">QQ号</font></td>
	                    <td><font color="#9966FF">
                        <INPUT TYPE="text" NAME="QQ" VALUE="<% response.write RSThisUser("QQ") %>"  SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">家庭住址</font></td>
	                    <td><font color="#9966FF">
                        <INPUT TYPE="text" NAME="HomeAddress" VALUE="<% response.write RSThisUser("HomeAddress") %>"  SIZE=51 MAXLENGTH=50 >
	                      </font></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">是否系统管理员</font></td>
	                        <td>
  	                          <div align="left"><font color="#9966FF">
                              <select name="IsSystemManager" size=1>
                                <option value="1">是</option>
                                <option value="0">否</option>
                              </select>
                           </font></div></td>
	                  </tr>
	                  <tr>
	                    <td width=30%><font color="#9966FF">是否财务主管</font></td>
	                        <td>
  	                          <div align="left"><font color="#9966FF">
                              <select name="IsFinancialManager" size=1>
                                <option value="1">是</option>
                                <option value="0">否</option>
                              </select>
                           </font></div></td>
	                  </tr>
	                  <tr><td width=30%><font color="#9966FF">生日</font></td>
	                        <td>
  	                          <div align="left"><font color="#9966FF">
  <select name="BirthdayYear" size=1>
                  <%
  	                        YearCounter= Year(RSThisUser("Birthday"))
  	                        %>
                             <option value="<% Response.Write YearCounter %>">
                             <% Response.Write YearCounter %>
</option> 
                  <%
  	                        YearCounter = 2000
  	                        Do until YearCounter <=1900
  	                        %>
                  <OPTION VALUE="<% Response.Write YearCounter %>">
                  <% Response.Write YearCounter %>
</OPTION>
                  <%
  	                        YearCounter = YearCounter-1
  	                        loop
  	                        %>
                  </select>
  <select name="BirthdayMonth" size=1>
                  <%
  	                        MonthCounter= Month(RSThisUser("Birthday"))
  	                        %>
                             <option value="<% Response.Write MonthCounter %>">
                             <% Response.Write MonthCounter %>
</option> 
                  <%
  	                        MonthCounter = 1
  	                        Do until MonthCounter >12
  	                        %>
                  <OPTION VALUE="<% Response.Write MonthCounter %>">
                  <% Response.Write MonthCounter %>
</OPTION>
                  <%
  	                        MonthCounter = MonthCounter+1
  	                        loop
  	                        %>
                  </select>
  <select name="BirthdayDay" size=1>
                  <%
  	                        DayCounter= Day(RSThisUser("Birthday"))
  	                        %>
                             <option value="<% Response.Write DayCounter %>">
                             <% Response.Write DayCounter %>
</option>    	                        
                  <%
  	                        DayCounter = 1
  	                        Do until DayCounter >31
  	                        %>
                  <OPTION VALUE="<% Response.Write DayCounter %>">
                  <% Response.Write DayCounter %>
</OPTION>
                  <%
  	                        DayCounter = DayCounter+1
  	                        loop
  	                        %>
                  </select>
  日 </font></div></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% height="38" align=center valign="middle" >
	          <INPUT TYPE="submit" NAME="Modify" VALUE="修改用户信息"></TD>
                          </TR>
                          </table>                         
                          
</FORM>                           
                          
</body>
</html>                          

⌨️ 快捷键说明

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