📄 index.asp
字号:
<!--#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%> <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>
<%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>• <a href="user.asp?lei=mywen" target="_blank">我的提问</a></td>
<td>• <a href="user.asp" target="_blank">个人中心</a></TD>
</tr>
<tr>
<td>• <a href="user.asp?lei=myda" target="_blank">我的回答</a></td>
<td>• <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>用 户: <input name="name" type="text" id="name" size="12"><br>密 码: <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="登录">
<a href="reg.asp">注册</a> <!--<hr size="1" color="#999999">
<span class="f12gn">贴吧用户请直接登录</span>--></td></form></tr> <%end if%>
</table>
</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -