📄 user_center.asp
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=true
Response.Expires=0
%>
<!-- #include file="../dsn.asp" -->
<!-- #include file="init.inc" -->
<%
userno=Request.QueryString("userno")
if userno="" then
userno=Session("userno")
else
if Session("userqx")>="1" and Session("userqx")<="9" then
else
userno=Session("userno")
end if
end if
if userno="" then Response.Redirect "user_login.asp"
myurl="user_center.asp?userno="&userno
tablename="userinfo"
face=Request.QueryString("face")
set cn = Server.CreateObject("ADODB.Connection")
cn.Open(mycnstr)
set rs = Server.CreateObject("ADODB.Recordset")
set rs2 = Server.CreateObject("ADODB.Recordset")
bz=1
if userno<>"" then
sqltext="select * from userinfo where userno="&userno
rs.Open sqltext,cn,1,3
if not rs.EOF then
realname=trim(rs("realname"))
state=rs("state")
picflag=trim(rs("picflag"))
picfile=trim(rs("picfile"))
creadate=rs("creadate")
grade=rs("grade")
amount=rs("amount")
creadate=rs("creadate")
updatetime=rs("updatetime")
logintime=rs("logintime")
querycount=rs("querycount")
if face<>"" then
if picflag="1" then
set fs=CreateObject("Scripting.FileSystemObject")
if picfile<>"" then
if fs.FileExists(server.MapPath("userfiles/"&picfile)) then
fs.DeleteFile(server.MapPath("userfiles/"&picfile))
end if
end if
end if
picflag="2"
picfile=face
rs("picflag")="2"
rs("picfile")=face
rs.Update
Response.Redirect(myurl)
end if
end if
rs.Close
end if
%>
<!-- #include file="begin.asp" -->
<%if bz=1 then%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="30">
<tr>
<td width="20"> </td>
<td>欢迎光临<%=forumtitle%></td>
<td width="10"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="30" bgcolor="<%=barcolor%>">
<tr>
<td width="10"> </td>
<td width=30 align=center><img src="images/homeflag.gif"></td>
<%if classflag="1" then%>
<td><a href="forum.asp"><%=forumtitle%></a> > 用户登录 </td>
<%else%>
<td><a href="forum_list.asp"><%=forumtitle%></a> > 用户登录 </td>
<%end if%>
<td width="100" align="right"></td>
<td width="10"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="6"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor="<%=titlebgcolor%>">
<td height="26" width=30></td>
<td width=80 align="center"><b><a href="user_center.asp?userno=<%=userno%>" class=a01><font color=<%=titlecolor%>>我的主页</font></a></b></td>
<td width=80 align="center"><b><a href="user_myedit.asp?userno=<%=userno%>" class=a01><font color=<%=titlecolor%>>资料修改</font></a></b></td>
<td width=80 align="center"><b><a href="user_chpass.asp?userno=<%=userno%>" class=a01><font color=<%=titlecolor%>>密码修改</font></a></b></td>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="6"></td>
</tr>
</table>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor="<%=titlebgcolor%>">
<td height="26" width=30></td>
<td align="center"><b><font color=<%=titlecolor%>>用户基本情况</font></b></td>
<td> </td>
</tr>
</table>
<table width="90%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=tablecolor%>">
<form action="<%=htmlname%>" method=post name=editform onsubmit="return checkform(editform)" autocomplete = "off">
<tr bgcolor="#ffffff">
<td width=120 height=30 align=center>用户头像:</td>
<td height=150>
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr><td height=24 align=center width=160>
<%if picflag="1" then%>
<img src="userfiles/<%=picfile%>" width=120>
<%end if%>
<%if picflag="2" then%>
<img src="face/face<%=picfile%>.gif">
<%end if%>
</td>
<td width=20></td>
<td style="line-height:180%">
请选择您的头像:
<select onChange="if(this.options[this.selectedIndex].value!='$') {window.open(this.options[this.selectedIndex].value,'_self')}">
<option value="$">请选择...</option>
<%
i=1
do while i<=20
if i<=9 then j="0"&i else j=cstr(i)
%>
<option value="<%=myurl%>&face=<%=j%>" <%if picfile=j then Response.Write("Selected") end if%>>--头像<%=j%></option>
<%
i=i+1
loop
%>
</select>
<br><br>
您还可以自行上传头像图片:(支持Gif和Jpg图片格式)<br>
点击:<a href="Javascript:editfile('<%=userno%>')">上传图片(100x100,90K以内)</a>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#ffffff">
<td width=120 height=30 align=center>用户状态:</td>
<td>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center" class=t1>
<tr><td width=10 align=right height=22></td>
<td width=120>(1) 真实姓名:</td><td><%=realname%></td></tr>
<tr><td width=10 align=right height=22></td>
<td width=120>(2) 最后登录时间:</td><td><%=logintime%></td></tr>
<tr><td width=10 align=right height=22></td>
<td width=120>(3) 最后更新时间:</td><td><%=updatetime%></td></tr>
<tr><td width=10 align=right height=22></td>
<td width=120>(4) 注册时间:</td><td><%=creadate%></td></tr>
<tr><td width=10 align=right height=22></td>
<td width=120>(5) 积分:</td><td><%=amount%></td></tr>
<tr><td width=10 align=right height=22></td>
<td width=120>(6) 简历阅读次数:</td><td><%=querycount%> 次</td></tr>
<tr><td width=10 align=right height=22></td>
<td width=120>(7) 当前IP地址:</td><td><%=Request.ServerVariables("Remote_HOST")%></td></tr>
<tr><td width=10 align=right height=22></td>
<td width=120>(8) 浏览器版本:</td><td><%=Request.ServerVariables("Http_User_Agent")%></td></tr>
</table>
</td>
</tr>
<tr bgcolor="#efefef">
<td height="40" align="center"><br>
</td>
<td align="left">
</td>
</tr>
</form>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="15"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- #include file="end.asp" -->
<!-- #include file="func.inc" -->
<script language=Javascript>
function editfile(keyno)
{
var str
str="file_upload.asp?" ;
str=str+"keyno="+keyno+"&tablename=userinfo&keyword=userno&picsize=90000&ref=1"
window.open(str,"mywin","toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no,scrollbars=yes,width=550,height=400,left=120,top=70")
}
</script>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -