<!-- #include file="include/con_jy.asp" -->

<%

dim username,tmp1,tmp2
username=trim(request.querystring("username"))
if not symbol_name(username) then
  call format_redirect("user_main.asp")
end if
tit="浏览用户信息"

call web_head(2,0,0,0,0)
'----------------------------左边 开始----------------------------
call jy_left()
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------

call user_view()

response.write ukong
'----------------------------中间 结束----------------------------
call web_end(0,0)

sub user_view()
  dim login1,login2,user_popedom,user_power,user_p,user_id,p45
  sql="select top 1 l_where,l_tim_login from user_login where l_username='"&username&"'"
  set rs=joekoe_cms.exec(sql,1)
  if rs.eof then
    login1="<font class=gray>离线状态</font>"
    login2="<font class=gray>该用户现在没有登陆，处于离线状态</font>"
  else
    login1="在线 <font class=red>"&datediff("n",rs(1),now())&"</font> 分钟"
    login2="当前位置：<font class=blue>"&rs(0)&"</font>"
  end if
  rs.close
  sql="select top 1 * from user_data where username='"&username&"'"
  set rs=joekoe_cms.exec(sql,1)
  if rs.eof then
    rs.close
    call format_redirect("user_main.asp")
  end if
  user_id=rs("id")
  user_power=rs("power")
  user_p=rs("popedom")
  p45=joekoe_cms.popedom_p(user_p,45)
%>

<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0 colspan=3>&nbsp;<%response.write img_skin("m_user")%><font class=end><b>用户个人信息</b></font></td></tr>
<tr class=bg_td height=30>
<td width='20%'>用户名称：</td>
<td width='40%'>
  <table border=0 cellspacing=0 cellpadding=0 width='100%'>
  <tr>
  <td><font class=blue><b><%response.write username%></b></font></td>
  <td align=right><a href='user_friend.asp?action=add&add_username=<%response.write username%>' target=_blank><img border=0 alt='将 <%response.write username%> 加为我的好友' src='<%response.write joekoe_cms.web_dir_skin%>forum/forum_friend.gif' align=absmiddle></a>&nbsp;
  <a href='user_mail.asp?action=msg_write&accept=<%response.write username%>' target=_blank><img border=0 alt='给 <%response.write username%> 发送短信' src='<%response.write joekoe_cms.web_dir_skin%>mail/msg.gif' align=absmiddle></a></td>
  </tr>
  </table>
</td>
<td width='40%' rowspan=9 align=center><%response.write format_user_face(rs("face"),rs("face_w"),rs("face_h"))%></td>
</tr>
<tr class=bg_td height=25>
<td>用户类型：</td>
<td><img border=0 src='<%response.write joekoe_cms.web_dir_skin%>small/icon_<%response.write user_power%>.gif' align=absmiddle>&nbsp;<font class=red_3><%response.write format_power(user_power,1)%></font></td>
</tr>
<tr class=bg_td>
<td>用户性别：</td>
<td><%
  tit=rs("sex")
  if tit=false then
    response.write img_skin("girl")&"&nbsp;"&web_n_girl
  else
    response.write img_skin("boy")&"&nbsp;"&web_n_boy
  end if
%></td>
</tr>
<tr class=bg_td height=25>
<td>用户头衔：</td>
<td><%
  tmp1=rs("nname")
  if var_null(tmp1)="" then
    response.write "<font class=gray>没有</font>"
  else
    response.write ""&joekoe_cms.code_html(tmp1,1,0)
  end if
%></td>
</tr>
<tr class=bg_td>
<td>注册时间：</td>
<td><%response.write joekoe_cms.time_type(rs("tim"),5)%></td>
</tr>
<tr class=bg_td>
<td>论坛发贴：</td>
<td><%response.write rs("bbs_counter")%>&nbsp;贴</td>
</tr>
<tr class=bg_td>
<td>社区积分：</td>
<td><font class=red><%response.write rs("integral")%></font>&nbsp;分</td>
</tr>
<tr class=bg_td>
<td>个人魅力：</td>
<td><font class=red><%response.write rs("ml")%></font>&nbsp;分</td>
</tr>

<tr class=bg_td>
<td>虚拟货币：</td>
<td><%response.write img_emoney%>&nbsp;<font class=red2><%response.write rs("emoney")%></font>&nbsp;<%response.write joekoe_cms.web_unit%></td>
</tr>
<tr class=bg_td>
<td>来自哪里：</td>
<td><%response.write joekoe_cms.code_html(rs("whe"),1,0)%></td>
</tr>
<tr class=bg_td>
<td>最后登陆时间：</td>
<td><%response.write rs("last_tim")&"&nbsp;&nbsp;"&login1%></td>
<td align=center><%response.write login2%></td>
</tr>
<tr class=bg_td>
<td>个性签名：</td>
<td colspan=2 align=center><table border=0 width='100%' class=tf><tr><td class=bw><%response.write code_jk2(rs("remark"))%></td></tr></table></td>
</tr>
<%call joekoe_cms.exec("update user_data set ml=ml+1 where username='"&username&"'",0)%>
<tr><td class=td colspan=3>&nbsp;<%response.write img_skin("m_user")%>查看 <%response.write username%> 的联系信息</td></tr>
<%
  if int(p45)=1 then tmp2="no"
  if int(login_modep)=1 then tmp2="yes"
  if tmp2="no" then
%>
<tr><td class=bg_tds colspan=3 height=50 class=red>&nbsp;&nbsp;用户（<%response.write username%>）已关闭查看详细的联系信息</td></tr>
<% else %>
<tr class=bg_tds>
<td>出生年月：</td>
<td colspan=2><%response.write rs("birthday")%></td>
</tr>
<tr class=bg_tds>
<td>用户QQ：</td>
<td colspan=2><%
  tmp1=rs("qq")
  if not isnumeric(tmp1) then
    response.write "<font class=gray>没有</font>"
  else
    response.write img_skin("qq")&"<a href='http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&tmp1&"' target=_blank>"&tmp1&"</a>"
  end if
%></td>
</tr>
<tr class=bg_tds>
<td>E-mail：</td>
<td colspan=2><%
  tmp1=joekoe_cms.code_html(rs("email"),1,0)
  response.write img_skin("email")&"<a href='mailto:"&tmp1&"'>"&tmp1&"</a>"
%></td>
</tr>
<tr class=bg_tds>
<td>M S N：</td>
<td colspan=2><%
  tmp1=joekoe_cms.code_html(rs("msn"),1,0)
  if var_null(tmp1)="" then
    response.write "<font class=gray>没有</font>"
  else
    response.write img_skin("msn")&"<a href='mailto:"&tmp1&"' target=_blank>"&tmp1&"</a>"
  end if
%></td>
</tr>
<tr class=bg_tds>
<td>个人主页：</td>
<td colspan=2><%
  tmp1=joekoe_cms.code_html(rs("url"),1,0)
  if var_null(tmp1)="" then
    response.write "<font class=gray>没有</font>"
  else
    response.write img_skin("url")&"<a href='"&tmp1&"' target=_blank>"&tmp1&"</a>"
  end if
%></td>
</tr>
<tr class=bg_tds>
<td>联系电话：</td>
<td colspan=2><%
  tmp1=joekoe_cms.code_html(rs("phone"),1,0)
  if var_null(tmp1)="" then
    response.write "<font class=gray>没有</font>"
  else
    response.write img_skin("phone")&tmp1
  end if
%></td>
</tr>
<tr class=bg_tds>
<td>联系地址：</td>
<td colspan=2><%
  tmp1=joekoe_cms.code_html(rs("address"),1,0)
  if var_null(tmp1)="" then
    response.write "<font class=gray>没有</font>"
  else
    response.write tmp1
  end if
%></td>
</tr>
<% end if %>
<tr><td class=td colspan=3>&nbsp;<%response.write img_skin("m_user")%>论坛最新发贴（<%response.write username%>）</td></tr>
<tr class=bg_td><td colspan=3 align=center>
  <table border=0 width='100%'>
<%
  rs.close
  sql="select top 10 id,forum_id,topic,tim from bbs_topic where userid="&user_id&" order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    tmp1=rs("topic")
    response.write "  <tr><td>"&img_skin("h_forum")&"<a href='forum_view.asp?forum_id="&rs("forum_id")&"&view_id="&rs("id")&"' target=_blank alt='"&joekoe_cms.code_html(tmp1,1,0)&"'>"&joekoe_cms.code_html(tmp1,1,30)&"</a>&nbsp;<font class=tims>"&joekoe_cms.time_type(rs("tim"),3)&"</font></td></tr>"
    rs.movenext
  loop
  rs.close
%>
  </table>
</td></tr>
<tr class=bg_tds><td colspan=3>
  <table border=0>
  <tr>
  <td><%response.write img_skin("h_")%><a href='forum_action.asp?action=user&username=<%response.write server.urlencode(username)%>' target=_blank>查看 <%response.write username%> 曾经发布的主题</a></td>
  <td><%response.write img_skin("h_")%><a href='forum_action.asp?action=user_join&username=<%response.write server.urlencode(username)%>' target=_blank>查看 <%response.write username%> 曾经参与的主题</a></td>
  </tr>
  </table>
</td></tr>
</table>
<%call joekoe_cms.exec("update user_data set ml=ml+1 where username='"&username&"'",0)%>
<%
end sub

%>