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

📄 index.asp

📁 类似于baidu的百度知道
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file=conn.asp-->
<!--#include file="Function_QT.asp"-->
<!--#include file="Config.asp"-->
<!--#include file="md5.asp"-->
<!--#include file=top.asp-->
<title><%=webname%></title>
<link rel="stylesheet" type="text/css" href="qt1.css" />


<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td width="200" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
<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>
<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><div align="left"><strong>
  <%if session("person")<>"" then%>
  用户信息
  <%else%>
      <%end if%>
      <img src="img/login.gif" alt="用户登陆" width="100" height="36" /></strong></div></td>
	</tr>
	<tr>
		<td align=center><br>
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="magBtm12 zhtable">
<tr> 
 <td>
<%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"><%if session("person")<>"" then%>
              <tr> 
                <td>您好:<%=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;户:<input name="name" type="text" id="name" size="12" class="ip22"><br>
	密&nbsp;&nbsp;码:<input name="pwd" type="password" id="pwd" size="12" class="ip22"><br>
	验证码:<input class="ip22" type="text" size=3 maxlength=4 name=verifycode> <%Call GetSafeCode%><br><input class="ip2" name="login" type="submit" id="login" value="登录">&nbsp;&nbsp;                
    <a href="Reg.asp">注册</a></td></form></tr>  <%end if%>
</table>
<br>
 </td>
      </tr></table>	
</td>
	</tr>
</table>
		</td>
	</tr>
</table>
<br><table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><div align="left"><strong><img src="img/13.gif" width="36" height="36" /><%=webname%>之星</strong></div></td>
	</tr>
	<tr>
		<td align=center><br>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<%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><a href="Show_User.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="List_Little.asp?id=<%=flid1%>"><%=lingyu%></a><br>
精选回答:<br><%rs2.open"select top 2 * 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="Show_Question.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><br>
</td>
	</tr>
</table>
		</td>
	</tr>
</table>
<br><table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><img src="img/tjxx.gif" alt="问吧统计" width="197" height="36" /></td>
	</tr>
	<tr>
		<td align=center><br>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<%
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>
<%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%><br>
</td></tr></table>
<br>
</td>
	</tr>
</table>
		</td>
	</tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong><img src="img/wtfl.gif" alt="问题分类" width="197" height="36" /></strong></td>
	</tr>
	<tr>
		<td align=center><br>
<table border="0" width="90%" cellspacing="0" cellpadding="0">
	<tr>
<td>
<%rs.open"select * from class order by paixu",conn,1,1
if rs.eof then%>暂无大类<%else
	  while not rs.eof
	  rs2.open"select top 2 * from assort where shuxing="&rs("id")&" order by paixu",conn,1,1
%>
<b><span><a href="List_Big.asp?id=<%=rs("id")%>"><%=rs("topic")%></a></span></b><br>            
<%if rs2.eof then%>暂无小类<%
rs2.close 
else
while not rs2.eof
%>   
<a href="List_Little.asp?id=<%=rs2("id")%>"><%=rs2("topic")%></a>&nbsp;&nbsp;        
<%rs2.movenext
	  wend
rs2.close 
end if%><a href="List_Big.asp?id=<%=rs("id")%>">...</a> 
<hr size="1" class="hr1">
<%rs.movenext
	  wend
	  end if
	  rs.close%>
</span>
</td>
	</tr>
</table>
<br></td>
	</tr>
</table>
		</td>
	</tr>
</table>
<br>


</td>
		<td width="8" valign="top"></td>
		<td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong>新手入门教程</strong></td>
	</tr>
	<tr>
		<td align=center><br>
<table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td>
		  <p align="center"><a href="Help.asp#zn1" target="_blank"><img border="0" src="img/p_zn1.gif" alt="提问框中提问" width="75" height="75" /></a></td>
	    <td><div align="center"><a href="http://127.0.0.1/Help.asp#zn2" target="_blank"><img border="0"  src="img/p_zn2.gif" alt="填写细节" width="85" height="73" /></a></div></td>
	    <td><div align="center"><a href="http://127.0.0.1/Help.asp#zn3" target="_blank"><img border="0"  src="img/p_zn3.gif" alt="等待回复" width="85" height="73" /></a></div></td>
	    <td><div align="center"><a href="http://127.0.0.1/Help.asp#zn4" target="_blank"><img border="0"  src="img/p_zn4.gif" alt="选择最佳答案" width="85" height="73" /></a></div></td>
	</tr>
</table></td>           
</tr></table>
<br></td>
	</tr>
</table>
		<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
          <tr>
            <td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong>精彩推荐</strong></td>
          </tr>
          <tr>
            <td align="center"><br />
                <table width="98%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><%
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="Show_Question.asp?id=<%=rs("id")%>" target="_blank">
                        <%if len(rs("title"))>30 then%>
                        <%=left(rs("title"),20)&"..."%>
                        <%else%>
                        <%=rs("title")%>
                        <%end if%>
                        </a>&nbsp;[<a href="List_Little.asp?id=<%=rs("fenleiid")%>"><%=rs("topic")%></a>]<br />
                      <%
rs.movenext
	  wend
	  rs.close
	  end if
%>
                      <table border="0" width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                          <td><p align="right"><a href="List_Special.asp?lei=tui" target="_blank">更多&gt;&gt;</a></p></td>
                        </tr>
                      </table></td>
                  </tr>
                </table>
              <br /></td>
          </tr>
        </table></td>
	</tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>

⌨️ 快捷键说明

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