📄 show.asp
字号:
<%
response.buffer=true
response.expires=0
%><!--#include file="includes/dataconn.inc"-->
<!--#include file="includes/setup.asp"-->
<%
num=request("num")
username=request("username")
if session("xichen_num")<>num or session("xichen_username")<>username or session("xichen_num")="" or session("xichen_username")="" then
%>
<%
end if
'处理修改数据
edited=false
sql="SELECT * from user where username='" & username & "'"
set rs = conntemp.execute(sql)
if rs("sex")<>request("sex") and request("sex")<>"" then
sql="update user set sex='"&request("sex")&"' where username='" & username & "'"
conntemp.execute(sql)
edited=true
end if
if rs("add")<>request("add") and request("add")<>"" then
sql="update user set add='"&request("add")&"' where username='" & username & "'"
conntemp.execute(sql)
edited=true
end if
if rs("zip")<>request("zip") and request("zip")<>"" then
sql="update user set zip='"&request("zip")&"' where username='" & username & "'"
conntemp.execute(sql)
edited=true
end if
if rs("tel")<>request("tel") and request("tel")<>"" then
sql="update user set tel='"&request("tel")&"' where username='" & username & "'"
conntemp.execute(sql)
edited=true
end if
if rs("email")<>request("email") and request("email")<>"" then
sql="update user set email='"&request("email")&"' where username='" & username & "'"
conntemp.execute(sql)
edited=true
end if
if rs("sitename")<>request("sitename") and request("sitename")<>"" then
sql="update user set sitename='"&request("sitename")&"' where username='" & username & "'"
conntemp.execute(sql)
edited=true
end if
if rs("sitetype")="" then rs("sitetype")="其他类型"
if rs("sitetype")<>request("sitetype") and request("sitetype")<>"" then
sql="update user set sitetype='"&request("sitetype")&"' where username='" & username & "'"
conntemp.execute(sql)
edited=true
end if
if rs("intro")<>request("intro") and request("intro")<>"" then
sql="update user set intro='"&request("intro")&"' where username='" & username & "'"
conntemp.execute(sql)
edited=true
end if
sql="SELECT * from user where username='" & username & "'"
set rs = conntemp.execute(sql)
%>
<HTML><HEAD><TITLE>查看用户资料</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link href="images/css2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></HEAD>
<BODY bgColor=#ffffff background="images/06.jpg">
<table width="445" border="0" cellspacing="0" cellpadding="5" align="center">
<form method="post" action="show.asp">
<tr>
<td colspan="2"><strong>更改注册资料
<%if edited=true then%>
<script language="VBScript">
msgbox "资料已经成功更改",vbinformation,"更改成功"
</script>
<%end if%>
</strong></td>
</tr>
<tr>
<td colspan="2">用 户 名:<%=rs("username")%> </td>
</tr>
<tr>
<td colspan="2">真实姓名:<%=rs("name")%> </td>
</tr>
<tr>
<td colspan="2">性 别: 男
<%if rs("sex")="男" then%>
<input name="sex" type="radio" value="男" checked>
女
<input type="radio" name="sex" value="女">
<%else%>
<input name="sex" type="radio" value="男">
女
<input type="radio" name="sex" value="女" checked>
<%end if%></td>
</tr>
<tr>
<td colspan="2">生 日: <%=rs("birthday")%> </td>
</tr>
<tr>
<td colspan="2">地 址:
<input name="add" type="text" id="add" value="<%=rs("add")%>">
</td>
</tr>
<tr>
<td colspan="2">邮 编:
<input name="zip" type="text" id="zip" value="<%=rs("zip")%>" maxlength="6">
</td>
</tr>
<tr>
<td colspan="2">电 话:
<input name="tel" type="text" id="tel" value="<%=rs("tel")%>">
</td>
</tr>
<tr>
<td colspan="2">EMAIL :
<input name="email" type="text" id="email" value="<%=rs("email")%>">
</td>
</tr>
<tr>
<td colspan="2">网站名称:
<input name="sitename" type="text" id="sitename" value="<%=rs("sitename")%>"></td>
</tr>
<tr>
<td colspan="2">网站类型:
<select name="sitetype" id="sitetype">
<option value="<%=rs("sitetype")%>" selected><%=rs("sitetype")%></option>
<option value="综合站点">综合站点</option>
<option value="电脑网络">电脑网络</option>
<option value="休闲娱乐">休闲娱乐</option>
<option value="游戏世界">游戏世界</option>
<option value="文学情感">文学情感</option>
<option value="音乐艺术">音乐艺术</option>
<option value="政法军事">政法军事</option>
<option value="班级驻地">班级驻地</option>
<option value="旅游时尚">旅游时尚</option>
<option value="其他类别">其他类别</option>
</select>
</td>
</tr>
<tr>
<td height="84" colspan="2"> 网站介绍:<font color="#FF0000">
<textarea name="intro" cols="45" rows="4" id="intro"><%=rs("intro")%></textarea>
</font></td>
</tr>
<tr>
<td>
<div align="right">
<input name="username" value="<%=rs("username")%>" type="hidden">
<input name="num" value="<%=request("num")%>" type="hidden">
<input type="submit" name="Submit" value="确定">
</div></td>
<td>
<input type="reset" name="Submit2" value="取消"></td>
</tr>
</form>
</table>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -