📄 modifypersonalinformation.asp
字号:
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%
'判断用户是否登录
if isempty(Session("ID")) then
Response.Redirect "../Login.asp"
end if
%>
<%
'如果用户提交了表单
if not IsEmpty(Request.Form("Send")) then
'进行用户身份校验
if Request.Form("Password") = Session("Password") then
if len(Request.Form("NewPassword"))=0 then
Session("EmailAddress")=Request.Form("EmailAddress")
Session("InternalPhone")=Request.Form("InternalPhone")
Session("HomePhone")=Request.Form("HomePhone")
Session("MobilePhone")=Request.Form("MobilePhone")
Session("QQ")=Request.Form("QQ")
Session("HomeAddress")=Request.Form("HomeAddress")
Session("Birthday")=Request.Form("BirthdayYear") & "-" & Request.Form("BirthdayMonth") & "-" & Request.Form("BirthdayDay")
'更新用户个人信息
conn.Execute " update UserInfo set " _
& "EmailAddress='" & Request.Form("EmailAddress") & "', " _
& "InternalPhone='" & Request.Form("InternalPhone") & "', " _
& "HomePhone='" & Request.Form("HomePhone") & "', " _
& "MobilePhone='" & Request.Form("MobilePhone") & "', " _
& "QQ='" & Request.Form("QQ") & "', " _
& "HomeAddress='" & Request.Form("HomeAddress") & "', " _
& "Birthday='" & Request.Form("BirthdayYear") & "-" _
& Request.Form("BirthdayMonth") & "-" _
& Request.Form("BirthdayDay") & "' " _
& " Where Name='" & Request.Form("Name") &"'"
TheMessage = "您的个人信息已经修改成功"
else
'如果用户输入了新密码
if Request.Form("NewPassword") = Request.Form("ConfirmNewPassword") then
Session("Name") = Request.Form("Name")
Session("Password") = Request.Form("NewPassword")
Session("EmailAddress")=Request.Form("EmailAddress")
Session("InternalPhone")=Request.Form("InternalPhone")
Session("HomePhone")=Request.Form("HomePhone")
Session("MobilePhone")=Request.Form("MobilePhone")
Session("HomeAddress")=Request.Form("HomeAddress")
Session("Birthday")=Request.Form("BirthdayYear") & "-" & Request.Form("BirthdayMonth") & "-" & Request.Form("BirthdayDay")
Session("QQ")=Request.Form("QQ")
conn.Execute " update UserInfo set " _
& "Password='" & Request.Form("NewPassword") & "', " _
& "EmailAddress='" & Request.Form("EmailAddress") & "', " _
& "InternalPhone='" & Request.Form("InternalPhone") & "', " _
& "HomePhone='" & Request.Form("HomePhone") & "', " _
& "MobilePhone='" & Request.Form("MobilePhone") & "', " _
& "QQ='" & Request.Form("QQ") & "', " _
& "HomeAddress='" & Request.Form("HomeAddress") & "', " _
& "Birthday='" & Request.Form("BirthdayYear") & "-" _
& Request.Form("BirthdayMonth") & "-" _
& Request.Form("BirthdayDay") & "' " _
& " Where Name='" & Request.Form("Name") &"'"
TheMessage = "您的个人信息已经修改成功"
else
TheMessage = "新密码输入不一致,请重试"
end if
end if
else
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">
<TITLE>修改个人信息</TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">
</HEAD>
<BODY BGCOLOR="">
<table width=800 border=0 bgcolor=#16A84D cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td height="37" valign=center bgcolor="#9966FF" ><div align="center"><font color="#FFFFFF"><strong><font size="3">企业办公自动化系统</font></strong></font></div></td>
</tr>
</table>
<table width=800 border=0 bgcolor=#9999FF cellspacing=1 cellpadding=2 align=center>
<tr bgcolor="#99CCFF"><td colspan=3>
<P ALIGN="CENTER"><font color="#9933FF">企业</font><font color="#9933FF">办公信息管理系统->员工信息管理->修改我的信息当前用户-
<% response.write Session("Name") %>
</font></td></tr>
<tr bgcolor=white >
<td width="118"><a href="../html/home.asp"><font color="#9966FF">返回主页</font></a></td>
<td width="671" align=center> <div align="left"><font color="#9966FF" >
<% response.write TheMessage %>
</FONT></div></td>
</tr>
</table>
<table width="800" border="0" bordercolor="#16A84D" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="10" colspan="4" valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" height="13" cellspacing="0" cellpadding="0" mm_noconvert="TRUE">
</table></td>
</tr>
</table>
<FORM ACTION="ModifyPersonalInformation.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><P><img src="../image/HomepagePicture1.jpg" width="250" height="173"></td>
<td>
<br>
<table CELLPADDING=0 CELLSPACING=1 BORDER=0 align=center width=100%>
<tr><td width=24%><div align="left"><font color="#9966FF">姓名</font></div></td>
<td width="76%"><div align="left"><font color="#9966FF">
<INPUT TYPE="text" NAME="Name" VALUE="<% response.write Session("Name") %>" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">信箱</font></div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="text" NAME="EmailAddress" VALUE="<% response.write Session("EmailAddress") %>" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">分机</font></div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="text" NAME="InternalPhone" VALUE="<% response.write Session("InternalPhone") %>" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">手机</font></div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="text" NAME="MobilePhone" VALUE="<% response.write Session("MobilePhone") %>" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">家庭电话</font></div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="text" NAME="HomePhone" VALUE="<% response.write Session("HomePhone") %>" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">QQ号</font></div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="text" NAME="QQ" VALUE="<% response.write Session("QQ") %>" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">生日</font></div></td>
<td>
<div align="left"><font color="#9966FF">
<select name="BirthdayYear" size=1>
<%
YearCounter= Year(Session("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(Session("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(Session("Birthday"))
%>
<option value="<% Response.Write DayCounter %>">
<% Response.Write DayCounter %></option>
<%
DayCounter = 1
Do until DayCounter >31
%>
<OPTION VALUE="<% Response.Write DayCounter %>"></OPTION>
<%
DayCounter = DayCounter+1
loop
%>
</select>
日 </font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">住址</font></div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="text" NAME="HomeAddress" VALUE="<% response.write Session("HomeAddress") %>" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">密码</font> </div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="Password" NAME="Password" VALUE="" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">新密码</font></div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="Password" NAME="NewPassword" VALUE="" SIZE=51 MAXLENGTH=50 >
</font></div></td>
</tr>
<tr><td width=24%><div align="left"><font color="#9966FF">确认新密码</font></div></td>
<td><div align="left"><font color="#9966FF">
<INPUT TYPE="Password" NAME="ConfirmNewPassword" VALUE="" SIZE=51 MAXLENGTH=50 >
</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="36" align=center valign="middle" >
<INPUT TYPE="submit" NAME="Send" VALUE="修改个人信息"></TD>
</TR>
</table>
</FORM>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -