⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 u_index.asp

📁 此文件为一个电子同学录
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<%
'=========================================================
' File: p_my.asp
 ' Date: 2006-04-06
' Script Written by Leibo
'=========================================================
' Copyright (C) 2002,2008 Mathren.com. All rights reserved.
' Web: http://www.hrbyydz.com
' Email: qa_90@hotmail.com
'=========================================================

if not founduser then
  	errmsg=errmsg+"<br>"+"<li>您没有<a href=login.asp target=_blank>登录</a>。"
	founderr=true
end if

stats="个人菜单首页"
dim currentPage,totalrec,Pcount,page_count,endpage



if founderr then
	call head()
	call head_var("","")
	call txl_error()
else
	call head()
	call head_var("个人菜单","u_index.asp")
	if founderr then
		call txl_error()
	else
		call main()
		if founderr then call txl_error()
	end if
end if
call foot()

sub main()
	
	set rs=server.createobject("adodb.recordset")
	sql="select * from [User] where userid="&userid
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		errmsg=errmsg+"<br>"+"<li>该用户名不存在。"
		founderr=true
		exit sub
	end if
%>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">  
<tr> 
<td bgcolor=<%=txl_body(10)%> align="center" valign="top"><br>
<table cellpaddin=3 cellspacing=1 class=tableborder1 width=<%=txl_body(19)%> align=center>
<tr>
<th width=14% height=25 id=tabletitlelink><a href=u_index.asp>个人菜单首页</a></th>
<th width=14% id=tabletitlelink><a href=u_modifymy.asp>基本资料修改</a></th>
<th width=14% id=tabletitlelink><a href=u_modifypsw.asp>用户密码修改</a></th>
<th width=14% id=tabletitlelink><a href=u_modifyadd.asp>联系资料修改</a></th>
<th width=14% id=tabletitlelink><a href=u_myskin.asp>选择界面风格</a></th>
<th width=14% id=tabletitlelink><a href=usersms.asp>我的短信管理</a></th>
<th width=14% id=tabletitlelink><a href=d_index.asp>我的日记管理</a></th>
</tr>
</table>
<br>
<table cellpaddin=3 cellspacing=0 border=0 width=<%=txl_body(19)%> align=center>
<tr>
<td width=200 valign=top>
<table cellpaddin=6 cellspacing=1 class=tableborder1 width=100% align=center>
<tr>
<th height=25>我的头像</th>
</tr>
<tr>
<td class=tablebody1 align=center><img src=<%=rs("userface")%> border=0></td>
</tr>
<tr>
<th height=25>基本信息</th>
</tr>
<tr>
<td class=tablebody1 style="line-height:150%">
&nbsp;我的类别:<%=rs("usergroup")%><br>
&nbsp;发表留言:<%=rs("bookcount")%><br>
&nbsp;发表帖子:<%=rs("bbscount")%><br>
&nbsp;上传照片:<%=rs("photocount")%><br>
&nbsp;当前财产:<%=rs("usermoney")%><br>
&nbsp;注册时间:<%=rs("regtime")%><br>
&nbsp;登陆次数:<%=rs("logins")%><br>
</td>
</tr>
</table>
</td>
<td width=* valign=top>
<table cellpaddin=3 cellspacing=1 class=tableborder1 width=100% align=center>
<tr>
<th height=25 align=left>-=> 我的短信息</th>
</tr>
<tr>
<td height=25 class=tablebody1>
<%
if newincept() >0 then
        response.write"目前您有<font color="""&txl_body(20)&"""> ["&newincept()&"] </font>条的短消息。"
        else
        response.write"目前您没有新的短消息。"
        end if
response.write"<a href=usersms.asp?action=inbox><font color="""&txl_body(20)&""">收件箱</font></a>中共有 ["&cint(incept())&"] 条信息,<a href='usersms.asp?action=issend'><font color="""&txl_body(20)&""">发件箱</font></a>中共有 ["&allsend()&"] 条信息对方未查阅。<br>"

%>
</td>
</tr>
</table>
<br>
<table cellpaddin=6 cellspacing=1 class=tableborder1 width=100% align=center>
<tr>
<th height=25 align=left colspan=5>-=> 最新收到的短讯</th>
</tr>
<tr>
<td width=30 height=25 class=tablebody2 align=center>状态</td>
<td width=100 class=tablebody2 align=center>发件人</td>
<td width=*  class=tablebody2 align=center>主题</td>
<td width=120 class=tablebody2 align=center>日期</td>
<td width=60 class=tablebody2 align=center>大小</td>
</tr>
<%
	set rs=server.createobject("adodb.recordset")
	sql="select top 5 * from message where incept='"&trim(membername)&"' and issend=1 and delR=0 order by flag,sendtime desc"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then

response.write"<tr><td class=tablebody1 align=center height=25 colspan=6>您的收件箱中没有任何内容。</td></tr>"
        else
		dim tablebody
do while not rs.eof
response.write "<tr>"
if rs("flag")=0 then
tablebody="tablebody2"
else
tablebody="tablebody1"
end if
response.write"<td align=center valign=middle height=25 class="&tablebody&">"

if rs("flag")=0 then
response.write"<img src="&txl_info(7)&"m_news.gif>"
else
response.write"<img src="&txl_info(7)&"m_olds.gif>"
end if
response.write"</td>"&_
              "<td align=center valign=middle class="&tablebody&" height=25>"
if rs("flag")=0 then
response.write"<b>"
end if
response.write"<a href=userinfo.asp?name="&htmlencode(rs("sender"))&" target=_blank>"&htmlencode(rs("sender"))&"</a></td>"&_
              "<td align=left height=25 class="&tablebody&"><a href=usersms.asp?action=read&id="&rs("id")&"&sender="&rs("sender")&" >"
if rs("flag")=0 then
response.write"<b>"
end if
response.write""&htmlencode(rs("title"))&"</a></td>"&_
               "<td class="&tablebody&" height=25>"
if rs("flag")=0 then
response.write"<b>"
end if
response.write""&rs("sendtime")&"</font></td>"&_
               "<td class="&tablebody&" height=25>"
if rs("flag")=0 then
response.write"<b>"
end if
response.write""&len(rs("content"))&"Byte</td></tr>"

	rs.movenext
	loop
	end if
	rs.close
	set rs=nothing
    response.write"</td></tr></table><br>"
%>
<table cellpaddin=3 cellspacing=1 class=tableborder1 width=100% align=center>
<tr>
<th height=25 align=left>-=> 最近撰写的日记</th>
</tr>
<tr>
<td height=25 class=tablebody1>&nbsp;</td>
</tr>
<tr>
<td height=25 class=tablebody1>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
<%
end sub

REM 统计已发出新短信
function allsend()
        rs=conn.execute("Select Count(id) From Message Where flag=0 and issend=1 And sender='"& membername &"'")
        allsend=rs(0)
	set rs=nothing
	if isnull(allsend) then allsend=0
end function

REM 统计收件箱中的短信
function incept()
        incept=0
        rs=conn.execute("Select Count(id) From Message Where  issend=1 and delR=0 And incept='"& membername &"'")
        incept=rs(0)
	set rs=nothing
	if isnull(incept) then incept=0
end function
%>

⌨️ 快捷键说明

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