admin_mfkiqpl.asp

来自「旅游管理系统 用ASP+SQL 2」· ASP 代码 · 共 163 行

ASP
163
字号
<html>
<head>
<meta name=vs_targetSchema content="HTML 4.0">
<title>修改资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css1.css" type="text/css">
<%
if session("administrator")<>"administrator" then
Response.Redirect "admin_login.asp"
end if
%>
<script id=clientEventHandlersVBS language=vbscript>
<!--
Sub button1_onclick
	if form1.t1.value="" then
	window.alert ("所有项目必须填写!")
	form1.t1.focus
	else
	if form1.t2.value="" then
	window.alert ("所有项目必须填写!")
	form1.t2.focus
	else
	if form1.t3.value="" then
	window.alert ("所有项目必须填写!")
	form1.t3.focus
	else
	if form1.t4.value="" then
	window.alert ("所有项目必须填写!")
	form1.t4.focus
	else
	if form1.t5.value="" then
	window.alert ("所有项目必须填写!")
	form1.t5.focus
	else
	if form1.t6.value="" then
	window.alert ("所有项目必须填写!")
	form1.t6.focus
	else
	if form1.t2.value<>form1.t3.value then
	window.alert ("两次输入的密码不相等!")
	form1.t3.focus
	else
	form1.submit 
	end if
	end if
	end if
	end if
	end if
	end if
	end if
End Sub
-->
</script>
</head>
<body bgcolor="#FFFFFF" style="background-color: #999999" text="#000000" topmargin="5">
<!--#include file="includefile/shoubu.asp" -->
<!--#include file="includefile/conn.asp" -->
<%
dim action,username,userpassword,dianhua,shouji,jianjie,email,lg
action=request("action")
email=request("email")
username=request("t1")
userpassword=request("t2")
dianhua=request("t4")
shouji=request("t5")
jianjie=request("t6")
if action<>"ok" then
lg=session("longname")
sql="select * from master where longname='"&lg&"'"
rs.open sql,,1,2
%>
<br>
<form name="form1" method="post" action="admin_mfkiqpl.asp?action=ok">
  <table width="350" border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#E7E7E7">
    <tr> 
      <td height="22" align="center" class="title">资料修改</td>
    </tr>
  </table>
  <table width="350" border="0" align="center" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 姓名:</td>
      <td height="25" width="265">  
        <input type="text" name="t1" class="input" value=<%=rs("username")%> size="20"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 密码:</td>
      <td height="25" width="265">  
        <input type="password" name="t2" class="input" value=<%=rs("userpassword")%> size="20"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 确认密码:</td>
      <td height="25" width="265">  
        <input type="password" name="t3" class="input" value=<%=rs("userpassword")%> size="20">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> E_mail:</td>
      <td width="265" height="25">  
        <input type="text" name="email" class="input" value=<%=rs("email")%> size="20">
        <font color="#FF0000">*请确保正确</font></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" bgcolor="#EFEFEF"> 电话:</td>
      <td width="265" height="25"> 
<input type="text" name="t4" class="input" value=<%=rs("dianhua")%> size="20"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 手机:</td>
      <td height="25" width="265">  
        <input type="text" name="t5" class="input" value=<%=rs("shouji")%> size="20"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 简介:</td>
      <td height="25" width="265">  
        <input type="text" name="t6" class="input" value=<%=rs("jianjie")%> size="20"> 
      </td>
    </tr>
    <tr bgcolor="#EFEFEF" align="center"> 
      <td height="30" colspan="2"> 
        <input type="button" name="button1" value="修改" class="button">
           
        <input type="reset" name="Submit2" value="复位" class="button">
      </td>
    </tr>
  </table>
  <div align="center"><font color="#FF0000"><br>
    </font>
    <table width="400" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><font color="#FF0000">注:客户的一些反馈信息会发送到您的Email请确保你填写的Email能用。</font></td>
      </tr>
    </table>
    
  </div>
</form>
<%
rs.close
conn.close
%>
<%
else
sql="select * from master"
rs.open sql,,1,2
rs("username")=username
rs("userpassword")=userpassword
rs("email")=email
rs("dianhua")=dianhua
rs("shouji")=shouji
rs("jianjie")=jianjie
rs.update
rs.close
conn.close
session("1")="管理员资料修改成功!"
Response.Redirect "ok.asp"
end if
%>
<br>
<!--#include file="includefile/weibu.asp" -->
</body>
</html>

⌨️ 快捷键说明

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