📄 profile.asp
字号:
<!--#INCLUDE FILE="common.inc" -->
<%
if Session("user_id") = "" then
Response.Redirect "timeout.asp"
end if
%>
<%
Function Chked(id,value)
' To Check Check Boxes
if id=value then
Chked = "Selected"
else
Chked = ""
end if
End Function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet type=text/css href='style.css'>
<script language="JavaScript">
<!--
function chkpwd() {
pwd1=document.forms[0].passwd1.value;
pwd2=document.forms[0].passwd2.value;
if (pwd1!=pwd2) {
alert("两次输入的密码不一致!");
return;
}
if (pwd1=="") {
alert("密码不能为空!");
return;
}
document.forms[0].submit();
}
// -->
</script>
</head>
<body>
<%
profileid=request.QueryString("id")
If profileid="" then
if session("profile_id") <> "" then
profileid = session("profile_id")
else
profileid=session("user_id")
end if
end if
if cint(profileid) <> cint(session("user_id")) and getUserLevel(session("user_id"))<3 then
Response.redirect("address.asp")
end if
session("profile_id")=profileid
mode=request.QueryString("mode")
If mode="" then
if session("profile_mode") <> "" then
mode = session("profile_mode")
else
mode=1
end if
end if
session("profile_mode")=mode
If Request.ServerVariables("Request_Method")<>"GET" then
mode=0
End if
set conn=server.createobject("adodb.connection")
conn.open ConnString
%>
<table width="760" align="center" border="0" height="300" cellspacing="2" cellpadding="0">
<tr>
<td width="118" valign="top" height="353">
<table width="100%" border="0" height="353" cellspacing="0" cellpadding="0">
<tr>
<td height="118">
<table width="100%" border="0">
<tr bgcolor="#CCCCFF">
<td height="25"><div align="center">
<% if mode=1 then%>
修改基本资料
<%else%>
<a href="profile.asp?mode=1">修改基本资料</a>
<%end if%>
</div></td>
</tr>
<tr bgcolor="#CCCCFF">
<td height="25"><div align="center">
<% if mode=2 then%>
修改个人简介
<%else%>
<a href="profile.asp?mode=2">修改个人简介</a>
<%end if%>
</div></td>
</tr>
<tr bgcolor="#CCCCFF">
<td height="25"><div align="center">
<% if mode=3 then%>
设置用户签名
<%else%>
<a href="profile.asp?mode=3">设置用户签名</a>
<%end if%>
</div></td>
</tr>
<tr bgcolor="#CCCCFF">
<td height="25"><div align="center">
<% if mode=4 then%>
更改用户密码
<%else%>
<a href="profile.asp?mode=4">更改用户密码</a>
<%end if%>
</div></td>
</tr>
<tr bgcolor="#CCCCFF">
<td height="25"><div align="center"><a href="address.asp">返 回</a></div></td>
</tr>
</table>
</td>
</tr>
<tr valign="bottom">
<td height="198">
<table width="100%" border="0">
<tr>
<td height="25" bgcolor="#FFCCCC"><font size="3">用户名:</font></td>
</tr>
<tr bgcolor="#CCFFCC">
<td height="25">
<div align="center"><font color="#FF00FF" face="<%=SpecificFontFace%>"><% = getUserName(profileid) %></font></div>
</td>
</tr>
<tr>
<td height="25" bgcolor="#FFCCCC">
<div align="left">用户级别:</div>
</td>
</tr>
<tr bgcolor="#CCFFCC">
<td height="25">
<div align="center"><font color="#FF00FF" face="<%=SpecificFontFace%>"><% = getLevelName(getUserLevel(profileid)) %></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="640" align="center" height="353" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3" style="border: 1px solid rgb(0,0,0)" height="360" bgcolor="<% =TableBgColor %>">
<tr valign="top" align="center">
<td><br>
<%
if mode<>0 then
strSQL = " SELECT * FROM Members INNER JOIN UserInfo ON Members.Member_id = UserInfo.User_ID where Members.Member_id = " & profileid
set rs = conn.Execute (strSQL)
If rs.Eof or rs.Bof then
' No items found in DB
Response.Write "没有符合条件的用户!"
Else
txtsig=rs("U_sig")
txtcomment=rs("U_Comment")
%>
<form method="post" action="profile.asp">
<%
Select Case mode
case 1 %>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="3%" height="35"> </td>
<td width="14%" height="35">电话:</td>
<td width="40%">
<input type="text" name="phone" size="40" maxLength="100" value='<%=rs("U_Phone")%>'>*<a tabindex="-1" href="javascript:alert('说明:\r\r多个电话号码之间请用逗号隔开。\r\r')"><font color='red' size="1">注</font></a>*
</td>
<td width="20%" align="center">
<% if getUserLevel(session("user_id"))=3 then %>
<table>
<tr>
<td>级别:</td>
<td><% =DoDropDown("UserLevel", "L_Name", "Level_ID", rs("M_Level"), "level", 0, 1) %></td>
</tr>
</table>
<% end if%>
</td>
</tr>
<tr>
<td width="3%" height="35"> </td>
<td width="14%" height="35">E-mail: </td>
<td colspan="2">
<input type="text" name="email" size="40" maxLength="100" value='<% =rs("U_Email") %>'>*<a tabindex="-1" href="javascript:alert('说明:\r\r多个Email之间请用分号隔开。\r\r')"><font color='red' size="1">注</font></a>*
</td>
</tr>
<tr>
<td width="3%" height="35"> </td>
<td width="14%" height="35">OICQ/ICQ:</td>
<td colspan="2">
<input type="text" name="oicq" size="30" maxLength="30" value='<% =rs("U_Oicq") %>'>
</td>
</tr>
<tr>
<td width="3%" height="35"> </td>
<td width="14%" height="35">个人主页:</td>
<td colspan="2">
<input type="text" name="homepage" size="40" maxLength="40" value='<% =rs("U_Homepage") %>'>
</td>
</tr>
<tr>
<td width="3%" height="35"> </td>
<td width="14%" height="35">通讯地址:</td>
<td colspan="2">
<input type="text" name="address" size="65" maxLength="100" value='<% =rs("U_Address") %>'>
</td>
</tr>
<tr>
<td width="3%" height="35"> </td>
<td width="14%" height="35">邮政编码:</td>
<td colspan="2">
<input type="text" name="zipcode" size="8" maxLength="8" value='<% =rs("U_Zipcode") %>'>
</td>
</tr>
<tr>
<td width="3%" height="35"> </td>
<td width="14%" height="35">所在城市:</td>
<td colspan="2">
<% =DoDropDown("City", "C_Name", "City_ID", rs("U_city"), "city", 1, 1) %>
</td>
</tr>
<tr>
<td width="3%" height="24"> </td>
<td colspan="3" height="24"><font size="2">如果所在城市选“其它”,请输入你当前所在城市:</font>
<% if rs("U_city")=0 then %>
<input type="text" name="city2" maxLength="20" value='<% =rs("U_city2") %>'>
<%Else%>
<input type="text" name="city2" maxLength="20">
<%end if%>
</td>
</tr>
<tr>
<td width="3%" height="60"> </td>
<td colspan="3" height="60">
<table width="100%" border="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -