<!--#include file=conn.asp-->
<!--#include file="function.asp"-->
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<html>
<head>
<title><%=webname%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.zhtable {table-layout:fixed; word-wrap:break-word;}
.formfont {FONT-SIZE: 16px;font-family:"arial"}
.input2 {font-size:14px;width:90px;height:24px}
td		{font-size: 9pt; line-height: 18px;font-family: "Arial";}
.bnsrh		{padding-top:2px;height:24px}
.bgbdy		{background-color: #FFFFFF;margin:0px}
.bgtle		{border-top: #58CB64 1px solid; background-color: #DDF1D8; padding-left: 10px; padding-right: 10px; height:24px; font-weight:bold; font-size: 14px;}
.bgtleBl	{border-top: #64B7D7 1px solid; background-color: #DEEEF4; padding-left: 10px; padding-right: 10px; height:24px; font-weight:bold; font-size: 14px;}
.bgtleYl	{border-top: #F4BF20 1px solid; background-color: #FBF5C6; padding-left: 10px; padding-right: 10px; height:24px; font-weight:bold; font-size: 14px;}
.bgcntBor3	{BORDER-left: #DDF1D8 2px solid; BORDER-right: #DDF1D8 2px solid; BORDER-bottom: #DDF1D8 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.bgcntBor3Bl	{BORDER-left: #DEEEF4 2px solid; BORDER-right: #DEEEF4 2px solid; BORDER-bottom: #DEEEF4 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.bgcntBor3Yl	{BORDER-left: #FBF5C6 2px solid; BORDER-right: #FBF5C6 2px solid; BORDER-bottom: #FBF5C6 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.bgcntBor4	{BORDER: #DDF1D8 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.yelB4	{BORDER: #FBF5C6 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.ln23		{height:23px;border-bottom:1px solid #E1E1E1;}
.f14		{font-size: 14px;line-height: 22px;}
.f14B		{font-size: 14px; font-weight:bold;line-height: 22px;}
.f12gn		{color:#008800;}
a.gn:link 		{color:#008800;}
a.gn:visited	{color:#008800;}
a.rib:link      {color:#FF0000;font-weight:bold}
a.rib:visited   {color:#FF0000;font-weight:bold}
.magBtm12{margin-bottom:12px;}
a:link			{text-decoration: underline;Color:#0000cc;}
a:visited		{text-decoration: underline;Color:;}
a.lbk:link		{color:#000000; text-decoration: underline}
a.lbk:visited		{color: #000000; text-decoration: underline}
a.lwe:link		{color:#FFFFFF; text-decoration: underline}
a.lwe:visited		{color: #FFFFFF; text-decoration: underline}
a.lmore:link		{font-weight:bold; text-decoration: underline}
a.lmore:visited		{font-weight:bold; text-decoration: underline}
a.cy:link		{color: #7777cc; text-decoration: underline}
a.cy:visited		{color: #7777cc; text-decoration: underline}
a.headTit:link{color:#0000cc;font-size:14px; line-height: 24px;}
a.headTit:visited{color:#0000cc;font-size:14px; line-height: 24px;}
.headTitB{font-weight:bold;font-size:14px; line-height: 24px;font-family: "Arial";}
.tab{font-size:14px; line-height: 24px;font-family: "Arial";}
.cBaidu{color:#777777}
.per80{line-height:80%}
a.lgy:link {color:#555555; text-decoration: underline}
a.lgy:visited {color: #555555; text-decoration: underline}
.topic{margin-bottom:12px;width:376px;height:38px;border:1px solid #00CC00;background-color:F1FFED;font-size:14px}
#footer{ CLEAR: both; MARGIN: 0px 0px 0px 0px; PADDING: 5px; WIDTH: 770px; font-size: 9pt; line-height: 18px;font-family: "Arial";}
-->
</style>
</head>
<body class="bgbdy" topmargin="0">
<!--#include file=top.asp-->
<center>
<div id="Content" style="width:770px; height:1000px" align="left">
<div id="lefContent" style="width:212px;height:100%; float:left;">
<table width="200" height="100%" border="0" cellpadding="0" cellspacing="0" class="zhtable">
<tr> <td class="bgtleBl" nowrap>问题分类</td></tr>
<tr><td class="bgcntBor3Bl" valign=top>
<%
if Indexwen=1 then
rs.open"select * from question",conn,1,1
totalquestion=rs.recordcount
rs.close
end if
if Indexda=1 then
rs.open"select * from reply",conn,1,1
totalreply=rs.recordcount
rs.close
end if
if Indexjie=1 then
rs.open"select * from question where jie=1",conn,1,1
yijie=rs.recordcount
rs.close
end if
if Indexweijie=1 then
rs.open"select * from question where jie<>1",conn,1,1
weijie=rs.recordcount
rs.close
end if
if Indextou=1 then
rs.open"select * from question where jie=4",conn,1,1
toup=rs.recordcount
rs.close
end if
if Indexuser=1 then
rs.open"select * from person",conn,1,1
totalperson=rs.recordcount
rs.close
end if
%>
<span class="f12gn"><%if Indexwen=1 then %>共有问题数：<%=totalquestion%><br><%end if%><%if Indexda=1 then %>共有回答数：<%=totalreply%><br><%end if%><%if Indexjie=1 then %>已解决问题数：<%=yijie%><br><%end if%><%if Indexweijie=1 then %>待解决问题数：<%=weijie%><br><%end if%><%if Indextou=1 then %>投票中问题数：<%=toup%><br><%end if%><%if Indexuser=1 then %>问吧总用户数：<%=totalperson%><%end if%>&nbsp;&nbsp;<hr size="1" color="#999999">
<%rs.open"select * from class order by paixu",conn,1,1
if rs.eof then%>暂无大类<%else
	  while not rs.eof
	  rs2.open"select top 3 * from assort where shuxing="&rs("id")&" order by paixu",conn,1,1
%>
<span class="f14B"><a href="assort.asp?id=<%=rs("id")%>"><%=rs("topic")%></a></span><br>            
<%if rs2.eof then%>暂无小类<%
rs2.close 
else
while not rs2.eof
%>   
<a href="assort1.asp?id=<%=rs2("id")%>"><%=rs2("topic")%></a>&nbsp;&nbsp;        
<%rs2.movenext
	  wend
rs2.close 
end if%><a href="assort.asp?id=<%=rs("id")%>">...</a> 
<br>
<br class=per80>
<%rs.movenext
	  wend
	  end if
	  rs.close%>
</span></td></tr></table>
</div>
<div id="rigContent" style="width:170px; float: right">
<!--出现登录框-->
<script language=javascript>
function check_lg(f){
if(f.name.value==""||f.name.value.length<=0){f.name.focus();alert("请输入用户名");return false;}
if(f.pwd.value==""||f.pwd.value.length<=0){f.pwd.focus();alert("请输入密码");return false;}
if(f.verifycode.value==""||f.verifycode.value.length<=0){f.verifycode.focus();alert("验证码不能为空，请输入验证码");return false;}
if(!limitWords(f.name,"用户名",7)) return false;
if(!limitWords(f.pwd,"密码",7))return false;
}
function getLeftChars(varField,limit_len) {
    var i = 0;
    var counter = 0;
    var cap = limit_len*2;    
    var j=0;
   var runtime = (varField.value.length>cap)?(cap+1):varField.value.length;
    for (i = 0; i< runtime; i++) {     
     if (varField.value.charCodeAt(i) > 127 || varField.value.charCodeAt(i) == 94) {
        j=j+2;  
        } 
     else {
        j=j+1
     }   
    }  //结束FOR循环
    //var leftchars = cap - varField.value.length;    
    var leftchars = cap - j;    
    return (leftchars);
}
function limitWords(varField,a_str,a_limit) {
    var leftChars = getLeftChars(varField,a_limit);
    if ( leftChars >= 0) {   
   return true;
    } else {
      ls_str = a_str + "的内容请限定在" + a_limit + "个汉字以内";
      window.alert(ls_str);
      varField.focus();
      return false;     
    } 
return true;
}
</script>
 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="magBtm12 zhtable">
<tr> 
<td class="bgtleYl" nowrap><%if session("person")<>"" then%>用户信息<%else%>用户登录<%end if%></td>
</tr>
<tr> 
 <td class="bgcntBor3Yl">
<%if request("login")="登录" then
jiance=request("name")
if InStr(jiance,"or")<>0 or InStr(jiance,"'")<>0 or InStr(jiance,"`")<>0 or InStr(jiance,"=")<>0 or InStr(jiance,"-")<>0 or InStr(jiance,",")<>0 or InStr(jiance,"and")<>0 then 
Response.Write "<script language=JavaScript>{alert('用户名非法！');history.back();}</script>"
Response.End 
end if
		if not IsNumeric(request("verifycode")) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码必须是数字!');history.back();</script>")
		Response.end
	end if
	if (int(session("SafeCode"))<>int(request("verifycode"))) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码输入错误!');history.back();</script>")
		Response.end
	end if
	  if request("name")="" then
	  response.write"<script>alert('用户名不能为空!');history.back();</script>"
	  elseif request("pwd")="" then
	  response.write"<script>alert('密码不能为空!');history.back();</script>"
	  else
	  name=request("name")
	  pwd=request("pwd")
	  rs.open"select * from person where name='"&name&"' and pwd='"&md5(pwd)&"'",conn,1,1
	  if rs.eof then
	  response.write"<script>alert('用户名或密码错误!');history.back();</script>"
	  else
	  rs3.open"select * from person where name='"&name&"'",conn,1,3
	  rs3("logintime")=now
	  rs3.update
	  rs3.close
	  session("person")=name
	  %>
	  <%end if
	  rs.close
	  end if
	  end if%>
	  
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="zhtable"><%if session("person")<>"" then%>
              <tr> 
                <td  class="f14">您好：<%=session("person")%> </td>
              </tr>
              <tr> 
                <td><%rs.open"select * from person where name='"&session("person")&"'",conn,1,1%> 
                  <a href="help.asp#n5" target=_blank><%=rs("touxian")%></a> ( <%=rs("jifen")%> )</td>                                
              </tr>
      </table>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
  <tr>
    <td height=22>&#8226; <a href="user.asp?lei=mywen" target="_blank">我的提问</a></td>                               
    <td>&#8226; <a href="user.asp" target="_blank">个人中心</a></TD>                               
  </tr>
  <tr>
    <td>&#8226; <a href="user.asp?lei=myda" target="_blank">我的回答</a></td>                               
    <td>&#8226; <a href="exit.asp">退出</a><%rs.close%></td>                          
  </tr>
  <%end if%><%if session("person")="" then%><tr><form name="lg" method=post action=index.asp onSubmit="return check_lg(this);"><td align="center" valign="top">
	<p>用&nbsp;&nbsp;&nbsp;&nbsp;户: <input name="name" type="text" id="name" size="12"><br>密&nbsp;&nbsp;&nbsp;&nbsp;码: <input name="pwd" type="password" id="pwd" size="12"><br>验证码:<input type="text" size=3 maxlength=4 name=verifycode> <%Call GetSafeCode%><br><FONT color=#666666>(请输入图中数字)</FONT><br><input name="login" type="submit" id="login" value="登录">&nbsp;&nbsp;                
    <a href="reg.asp">注册</a> <!--<hr size="1" color="#999999">               
          <span class="f12gn">贴吧用户请直接登录</span>--></td></form></tr>  <%end if%>
</table>

 </td>
      </tr></table>
<!--结束登录框-->
<div class="magBtm12"><a href="send.asp"><img src="img/btn_zdcq.gif" width="170" height="40" border="0"/></a></div>

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="magBtm12 zhtable">
<tr><td class="bgtleYl" nowrap>公告区</td></tr>
<tr> <td class="bgcntBor3Yl f14">
&#8226; <a href="help.asp" target=_blank class="gn">如何使用问吧</a><br>               
&#8226; <a href="userexpert.asp" target=_blank>网友专家团</a><br><%rs2.open"select top 8 * from gonggao where flid=0 order by time desc",conn,1,1     
	  if rs2.eof then%><%else
	  while not rs2.eof
	  %>&#8226; <a href="gonggao.asp?id=<%=rs2("id")%>" target=_blank><%=rs2("title")%></a><br>     
	  <%rs2.movenext
	  wend
	  end if
	  rs2.close%>
	  </td></tr>
</table>

    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="magBtm12 zhtable">
<tr><td class="bgtleYl" nowrap><%=webname%>之星</td></tr><%rs.open"select top 1 * from person order by jifen desc",conn,1,1
	  if rs.eof then%>未有问吧之星<%
	  rs.close
	  else
	  while not rs.eof%>
<tr><td class="bgcntBor3Yl"><a href="showperson.asp?id=<%=rs("id")%>" target=_blank><%=rs("name")%></a><br>
<%=rs("touxian")%><br>  
(<%=rs("jifen")%>) <br>
专精领域：<%rs2.open"select top 1 * from zhuanjia where user='"&rs("name")&"' order by fljifen desc",conn,1,1
if rs2.eof then%>未有专精领域<%
	  rs2.close
	  else
flid1=rs2("flid")
rs2.close
rs2.open"select * from assort where id="&flid1&"",conn,1,1
lingyu=rs2("topic")
rs2.close
end if
%><a href="assort1.asp?id=<%=flid1%>"><%=lingyu%></a><br>
精选回答：<br><%rs2.open"select top 3 * from reply where replyer='"&rs("name")&"' and isdeal=1 order by replytime desc",conn,1,1
while not rs2.eof
rs3.open"select * from question where id="&rs2("replyid")&"",conn,1,1
%>
<a href="showquestion.asp?id=<%=rs2("replyid")%>" target="_blank"><%=rs3("title")%></a><br>            
<%
rs3.close
rs2.movenext
	  wend
rs2.close
rs.movenext
	  wend
	  rs.close
	  end if
	  %></td>
</tr></table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="magBtm12 zhtable">
        <tr>
          <td class="bgtleYl" nowrap><a href="listuser.asp?lei=jifen" class="lbk">总积分排行榜</a></td>
        </tr>
        <tr>
          <td class="bgcntBor3Yl"><table width=153 border=0 cellspacing=0 cellpadding=0 >
          <%rs2.open"select top "&IndexUserpai&" * from person where jifen>0 order by jifen desc",conn,1,1
	  if rs2.eof then%>暂未有用户<%
	  rs2.close
	  else
	  while not rs2.eof
	  i=i+1
	  %>
              <tr>
                <td width="20" class="ln23" align=center><%=i%></td>
                <td class="ln23" width=102> <a href="showperson.asp?id=<%=rs2("id")%>" target="_blank"><%=rs2("name")%></a></td>
                <td width="48" class="ln23" align=center><%=rs2("jifen")%></td>
              </tr>
              <%rs2.movenext
	  wend
	  end if
	  rs2.close%>
              <tr> <td>&nbsp;</td>
                <td height="24" ><a href="listuser.asp?lei=jifen" class="lmore">更多&gt;&gt;</a></td>
	<td>&nbsp;</td>
              </tr>
          </table></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="magBtm12 zhtable">
        <tr>
          <td class="bgtleYl" nowrap><a href="listuser.asp?lei=new" class="lbk">最新注册用户</a></td>
        </tr>
        <tr>
          <td valign="top" class="bgcntBor3Yl"><table width=153 border=0 cellspacing=0 cellpadding=0 >
          <%rs2.open"select top "&IndexUserjin&" * from person order by time desc",conn,1,1
	  if rs2.eof then%>
          <td>暂时没有新进用户!<%
          else
	  while not rs2.eof
	  i1=i1+1
	  %>
              <tr>
              <td width="20" class="ln23" align=center><%=i1%></td>
                <td width=102 class="ln23"><a href="showperson.asp?id=<%=rs2("id")%>" target=_blank><%=rs2("name")%></a></td>
                <td width="48" align=center class="ln23"><%=rs2("jifen")%></td>
              </tr>
              <%rs2.movenext
	  wend
	  end if
	  rs2.close%>
              <tr> <td>&nbsp;</td>
                <td height="24" ><a href="listuser.asp?lei=new" class="lmore">更多&gt;&gt;</a></td>
              <td>&nbsp;</td>
              </tr>
          </table>
	</td>
        </tr>
      </table>
<table width="100%" border="0" cellpadding="0" cellspacing="0"  class="zhtable">
<tr><td valign="top" class="yelB4">
如要投诉或提出意见建议，请到<a href="/tb/t.asp?/=%BE%C5%D6%DE%CE%CA%B0%C9%CD%B6%CB%DF" target="_blank"><%=webname%>投诉吧</a>反馈。
</td></tr></table>
</div>
<div id="midContent" style="width:388px;float:right">
<table width="376" border="0" cellpadding="0" cellspacing="0" class="magBtm12 zhtable">
<tr><td colspan="4" nowrap class="bgtle">新手入门</td></tr>
<tr>
<td width="80" height="97"><a href="help.asp#zn1" target="_blank">
<img src="img/p_zn1.gif" width="80" height="80" border=0></a></td>
<td width="92"><a href="help.asp#zn2" target="_blank"><img src="img/p_zn2.gif" width="92" height="80"  border=0></a></td>
<td width="92"><a href="help.asp#zn3" target="_blank"><img src="img/p_zn3.gif" width="92" height="80"  border=0></a></td>
<td width="92"><a href="help.asp#zn4" target="_blank"><img src="img/p_zn4.gif" width="92" height="80"  border=0></a></td>
</tr></table> 
<table width="376" border="0" cellpadding="0" cellspacing="0"  class="magBtm12 zhtable">
<tr> <td class="bgtle" nowrap><a href="list.asp?lei=tui" class="lbk">精彩推荐</a></td>
</tr>
<tr><td class="bgcntBor3 f14">
<%
rs.open"select top "&Indextui&" * from question where tui=1 order by id desc",conn,1,1
if rs.eof then%>
暂时未有推荐问题<br>
<%
rs.close
else
	  while not rs.eof
%>
<A href="showquestion.asp?id=<%=rs("id")%>" target=_blank><%if len(rs("title"))>30 then%><%=left(rs("title"),20)&"..."%><%else%><%=rs("title")%><%end if%></A>&nbsp;[<A class=lgy href="assort1.asp?id=<%=rs("fenleiid")%>"><%=rs("topic")%></A>]<BR>           
<%
rs.movenext
	  wend
	  rs.close
	  end if
%>
<a href="list.asp?lei=tui" class="lmore" target="_blank">更多&gt;&gt;</a></td>           
</tr></table>
      <div style="margin-bottom:12px;width:376px;height:38px;border:1px solid #dc4848;background-color:#ffe9e9;font-size:14px">
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="377" height="52">
          <param name="movie" value="web_dt750x100.swf">
          <param name="quality" value="high">
          <embed src="web_dt750x100.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="377" height="52"></embed></object>
      </div>
<table width="376" border="0" cellpadding="0" cellspacing="0" class="zhtable">
<tr><td class="bgcntBor4 f14">
<div class=f14B><a href="list.asp?lei=weijie" class="lbk">待解决的问题</a>:</div>
<%
rs.open"select top "&Indexdaijie&" * from question where jie=0 order by id desc",conn,1,1
if rs.eof then%>
暂时未有待解决问题<br>
<%
rs.close
else
	  while not rs.eof
%>
<A href="showquestion.asp?id=<%=rs("id")%>" target=_blank><%if len(rs("title"))>30 then%><%=left(rs("title"),20)&"..."%><%else%><%=rs("title")%><%end if%></A>&nbsp;[<A class=lgy href="assort1.asp?id=<%=rs("fenleiid")%>"><%=rs("topic")%></A>]<BR>         
<%
rs.movenext
	  wend
	  rs.close
	  end if
%>
<a href="list.asp?lei=weijie" class="lmore" target="_blank">更多&gt;&gt;</a>         
<div style="padding-top:5px;padding-bottom:5px;"><hr size="1" color="#999999"></div>
<div class=f14B><a href="list.asp?lei=jie" class="lbk">新解决的问题</a>:</div>
<%
rs.open"select top "&Indexxinjie&" * from question where jie=1 order by id desc",conn,1,1
if rs.eof then%>
暂时未有新解决问题<br>
<%
rs.close
else
	  while not rs.eof
%>
<A href="showquestion.asp?id=<%=rs("id")%>" target=_blank><%if len(rs("title"))>30 then%><%=left(rs("title"),20)&"..."%><%else%><%=rs("title")%><%end if%></A>&nbsp;[<A class=lgy href="assort1.asp?id=<%=rs("fenleiid")%>"><%=rs("topic")%></A>]<BR>         
<%
rs.movenext
	  wend
	  rs.close
	  end if
%> 
<a href="list.asp?lei=jie" class="lmore" target="_blank">更多&gt;&gt;</a>         
<div style="padding-top:5px;padding-bottom:5px;"><hr size="1" color="#999999"></div>
<div class=f14B><a href="list.asp?lei=tou" class="lbk">投票中的问题</a>:</div>
<%
rs.open"select top "&Indexts&" * from question where jie=4 order by sendtime desc",conn,1,1
if rs.eof then%>
暂时未有投票中的问题<br>
<%
else
	  while not rs.eof
%>
<A href="showquestion.asp?id=<%=rs("id")%>" target=_blank><%if len(rs("title"))>30 then%><%=left(rs("title"),20)&"..."%><%else%><%=rs("title")%><%end if%></A>&nbsp;[<A class=lgy href="assort1.asp?id=<%=rs("fenleiid")%>"><%=rs("topic")%></A>]<BR>         
<%
rs.movenext
	  wend
	  rs.close
	  end if
%> 
<a href="list.asp?lei=tou" class="lmore" target="_blank">更多&gt;&gt;</a>         
<div style="padding-top:5px;padding-bottom:5px;"><hr size="1" color="#999999"></div>
<span class="f14B">其他热点:</span><br>
<a href="list.asp?lei=gaofen" target="_blank"> 高分问题</a>&nbsp;&#8226;&nbsp;<a href="list.asp?lei=re" target="_blank">热点问题</a>
</td></tr></table>
<!-- -->

</div></div>
<br>
<div id="footer"><!--#include file=end.asp--></div>
</center>
</body>
</html>
<%
Set rs=nothing
Set rs1=nothing
Set rs2=nothing
Set rs3=nothing
conn.Close
set conn=nothing
%>