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

📄 userindex.asp

📁 一个不错的论坛原代码
💻 ASP
字号:
<!--#include file="Connections.asp" -->
<!--#include file="top.asp" -->

<% cpbtitle="控制面板"
call toptitle(l_title,cpbtitle)
call head(0,cpbusername&"的控制面板首页","userindex.asp",cpbtitle)

 if isuser=false then
errormsg="<li>您还没有登陆,不能进入用户控制面板,请先<a href=login.asp>登陆</a></li>"
call error(errormsg)
call login()
else
dim u_friend,u_deltopic,u_toptopic,u_logintimes,lastsendtime,u_todaysend,fen,u_lastlogin,time,username,send,home,imgwidth,u_name,imgheight,imghead,address,u_weiwang,u_beauty,u_money,grade,face
sql_user= "select u_friend,u_deltopic,u_toptopic,u_logintimes,lastsendtime,u_todaysend,fen,u_lastlogin,time,username,send,home,imgwidth,u_name,imgheight,imghead,address,u_weiwang,u_beauty,u_money,grade,face from user where username='"&cpbusername&"'"
set rs_user=conn.Execute (sql_user)
if  rs_user.eof and rs_user.bof then
errormsg="<li>不存在此用户,或者用户可能已经被管理员删除</li>"
call error(errormsg)
else
fyusername=rs_user("username")
fyimghead=rs_user("imghead")
fyimgwidth=rs_user("imgwidth")
fyimgheight=rs_user("imgheight")
fyaddress=rs_user("address")
fygrade=rs_user("grade")
fyweiwang=rs_user("u_weiwang")
fyfen=rs_user("fen")
fybeauty=rs_user("u_beauty")
fymoney=rs_user("u_money")
fyhome=rs_user("home")
fyname=rs_user("u_name")
fyface=rs_user("face")
fysend=rs_user("send")
fytime=year(rs_user("time"))&"-"&month(rs_user("time"))&"-"&day(rs_user("time"))
fydeltopic=rs_user("u_deltopic")
fytoptopic=rs_user("u_toptopic")
fylastlogin=rs_user("u_lastlogin")
fylogintimes=rs_user("u_logintimes")
fylastsend=rs_user("lastsendtime")
fytodaysend=rs_user("u_todaysend")
fyfriend=rs_user("u_friend")

 '读取新短信息
 sqlpm = "select count(q_receive) as tpm from pm where q_receive='"&cpbusername&"'and q_read=0"
set rspm=conn.execute(sqlpm)
countpm=rspm("tpm")
 '读取收件箱
 sqlpm = "select count(q_receive) as tpm from pm where q_receive='"&cpbusername&"'"
set rspm=conn.execute(sqlpm)
countpm1=rspm("tpm")
 '读取发件箱
 sqlpm = "select count(q_receive) as tpm from pm where q_send='"&cpbusername&"'"
set rspm=conn.execute(sqlpm)
countpm2=rspm("tpm")
set rspm=nothing
%>

  
    <center>
<table border=1 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse">

   <tr>
<td class=tdc1  align="center" height="23" <%=tcolor%> width="12%">
    <a href="userindex.asp" class=nav1>用户控制面板</a></td> 
    <td class=tdc1  align="center" height="23" <%=tcolor%> width="12%">
    <a href="edituser.asp?action=editbasic" class=nav1>基本资料修改</a></td> 
    <td class=tdc1  align="center" height="23" <%=tcolor%> width="12%">
    <a href="edituser.asp?action=editlink" class=nav1>联系资料修改</a></td> 
    <td class=tdc1  align="center" height="23" <%=tcolor%> width="12%">
    <a href="edituser.asp?action=editpw" class=nav1>用户密码修改</a></td> 
    <td class=tdc1  align="center" height="23" <%=tcolor%> width="12%">
    <a href="friend.asp" class=nav1>编辑好友列表</a></td> 
    <td class=tdc1  align="center" height="23" <%=tcolor%> width="12%">
    <a href="friend.asp?action=badfriend" class=nav1>编辑忽略列表</a></td> 
    <td class=tdc1  align="center" height="23" <%=tcolor%> width="12%">
    <a href="fav.asp" class=nav1>用户收藏管理</a></td> 
    <td class=tdc1  align="center" height="23" <%=tcolor%> width="12%">
    <a href="pm.asp" class=nav1>用户短信服务</a></td> 
   
  </tr>
</table>
<font size="1">&nbsp;</font><br>    </center>
  </div>


          <center> 
        <table table  border=0 cellspacing=0 cellPadding=1 class=tb2>        
           <tr> 
 <td  align="left" valign=top width="30%"> 
   <table border=1 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width="95%" style="border-collapse: collapse">
    <tr  align="center"> 
 <td nowrap <%=tColor%> class=tdc1 height="23" align="center">
头像</td>
          </tr>
     <tr align="center"> 
 <td  bgcolor=<%=tColor1%> class=tdc align="center"><BR>
 <% if fyimghead<>"" then
 response.write("<img src="&fyimghead&" width="&fyimgwidth&" height="&fyimgheight&">")
else
response.write("<img src="&fyface&">")
end if%>  
</td>
 </tr>
 <tr  align="center"> 
 <td <%=tColor%> class=tdc1 height="23" align="center">
 基本资料 
 </td>
  </tr>
  <tr  align="center"> 
 <td  bgcolor=<%=tColor1%> class=tdc align="left"><BR>
  <%if fyname<>"" then response.write(" &nbsp;用户头衔:"&fyname&"<br>")
     response.write(" &nbsp;用户等级:")
sql_fen = "select * from grade where g_num="&fygrade&""
set rs_fen =conn.Execute (sql_fen)
if not rs_fen.eof then%>
<%=rs_fen("g_title")%>
 <% end if
 rs_fen.close
 set rs_fen=nothing
 %>
<br>&nbsp;用户威望:<%=fyweiwang%><br>
      &nbsp;总共发贴:<%=fysend%><br>
      &nbsp;用户经验:<%=fyfen%><br>
      &nbsp;用户财产:<%=fymoney%><br>
       &nbsp;用户魅力:<%=fybeauty%><br>
       &nbsp;精华帖数:<%=fytoptopic%><br>
       &nbsp;被删帖数:<%=fydeltopic%><br>
            <% if fyaddress<>"" then response.write("&nbsp;用户来自:"&fyaddress&" <br>")%>
            &nbsp;注册时间:<%=fytime%><br>
            &nbsp;登陆次数:<%=fylogintimes%><br>
            &nbsp;最后登陆:<%=fylastlogin%><br>
            &nbsp;最后发帖:<%=fylastsend%><br>
             &nbsp;今日发帖:<%=fytodaysend%><br>
<BR>
 </td>
          </tr>
          </table>
          
          <BR>
           <table border=1 borderColor=<%=tdc2%> cellPadding=0 cellSpacing=0 width="95%" style="border-collapse: collapse">
    <tr  align="center"> 
 <td nowrap <%=tColor%> class=tdc1 height="23" align="center">
好友在线</td>
          </tr>
     <tr align="center"> 
 <td  bgcolor=<%=tColor1%> class=tdc align="left"><BR>
 <% 
if not isnull(fyfriend) and fyfriend<>"" then
 u_friendname=split(fyfriend,",")
for i=0 to (ubound(u_friendname)-1)
response.write("&nbsp;<a href='pm.asp?mode=add&action=add&username="&u_friendname(i)&"' title='点击发消息给"&u_friendname(i)&"'>"&u_friendname(i)&"</a>")
   sqlo="select o_username from online where o_username='"&u_friendname(i)&"'"
            set rso=conn.execute(sqlo)
            if rso.bof or rso.eof then
           response.write" <a href='viewuser.asp?username="&u_friendname(i)&"' title=点击查看用户资料 target=_blank>[不在线]</a><BR>"
           else
           response.write" <a href='viewuser.asp?username="&u_friendname(i)&"' title=点击查看用户资料 target=_blank>[在线]</a><BR>"
           end if
next
set rso=nothing
end if

%>  
</td>
 </tr>
      <tr align="center"> 
 <td  bgcolor=<%=tColor2%> class=tdc align="left" Height=23>&nbsp;点击好友名发论坛短信给好友
  
</td>
 </tr>
 
          </table>
            </td>
 <td  align="right" valign=top width="70%"> 
   <table border=1 borderColor=<%=tdc2%> cellPadding=1 cellSpacing=1 width="100%" style="border-collapse: collapse">
    <tr> 
 <td  <%=tColor%> class=tdc1 height=23> ==>论坛短消息</td>
          </tr>
     <tr align="center"> 
 <td  bgcolor=<%=tColor1%> class=tdc align="center"><BR>
<%response.write("<a href=""pm.asp"">收件箱</a>共有 "&countpm1&" 封短信 其中有 "&countpm&" 封新短信 <a href=""pm.asp?action=send"">发件箱</a>共有 "&countpm2&" 封短信")%> 
<BR>
<BR>
</td>
 </tr>      </table><br>
  <table border=1 borderColor=<%=tdc2%> cellPadding=1 cellSpacing=1 width="100%" style="border-collapse: collapse">
    <tr> 
 <td  <%=tColor%> class=tdc1 height=23 colspan="4"> ==>最新收到的短信息</td>
          </tr>
<tr> 
          <td height="21" width="15%" align="center" <%=tColor%> class=tdc1>发送人</td>
          <td height="21" width="52%" align="center" <%=tColor%> class=tdc1>
          标题</td>
          <td height="21" width="22%" align="center" <%=tColor%> class=tdc1>时间</td>
          <td height="21" width="11%" align="center" <%=tColor%> class=tdc1>
          大小</td>
        </tr>
        <% sql = "select top 8 q_send,q_time,q_content,q_id,q_title,q_read from pm where q_receive='"&cpbusername&"' order by q_time desc"
          set rs_topic=conn.execute(sql)
  do while not rs_topic.eof %> 
          <tr> 
            <td height="21" width="15%" align="center"  bgcolor=<%=tColor2%> class=tdc><a href="pm.asp?mode=add&action=add&username=<%=rs_topic("q_send")%>" title="点击发消息给<%=rs_topic("q_send")%>"><%=rs_topic("q_send")%></a></td>
            <td height="21" width="52%"  bgcolor=<%=tColor2%> class=tdc></a> 
            <a href="pm.asp?mode=kai&q_id=<%=rs_topic("q_id")%>" title=<%=htmlencode(rs_topic("q_title"))%>><%=left(htmlencode(rs_topic("q_title")),30)%></a><% if rs_topic("q_read")=1 then%><%else%><img src="image/new.gif"> <% end if %>
               </td>
            <td height="21" width="25%" align="center"  bgcolor=<%=tColor2%> class=tdc><%=rs_topic("q_time")%></td> 
            <td height="21" width="11%" align="center"  bgcolor=<%=tColor2%> class=tdc> <%=len(rs_topic("q_content"))%>Byte</td>
          </tr>
     <% 
rs_topic.MoveNext 
loop 
set rs_topic=nothing
%>
  
      </table>
      
      
      <br>
  <table border=1 borderColor=<%=tdc2%> cellPadding=1 cellSpacing=1 width="100%" style="border-collapse: collapse">
    <tr> 
 <td  <%=tColor%> class=tdc1 height=23 > ==>最近发表的主题</td>
          </tr>

        <% sql = "select top 8 t_id,l_id,t_title,t_time from topic where t_username='"&cpbusername&"' and t_lock<>2 order by t_lasttime desc"
          set rs=conn.execute(sql)
  do while not rs.eof %> 
       <tr> 
 <td  bgcolor=<%=tColor1%> class=tdc height=23 >□ <a href=topic.asp?l_id=<%=rs("l_id")%>&t_id=<%=rs("t_id")%> title=<%=HTMLEncode(rs("t_title"))%>><%=left(HTMLEncode(rs("t_title")),30)%>...</a>--<%=rs("t_time")%></td>
          </tr>
     <% 
rs.MoveNext 
loop 
set rs=nothing
%>
  
      </table>
            

            
             </td>
          </tr>
      
     
        

        </table>

<% set rs_user=nothing
end if
end if%><!--#include file="bq.asp" -->

⌨️ 快捷键说明

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