📄 default.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="Public.asp"-->
<!--#include file="Config.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%= cfgTitle %></title>
<style type="text/css">
<!--
body {
background-color: #666688;
}
-->
</style>
<style type="text/css">
<!--
.style1 {
color: #FFFFFF;
font-weight: bold;
font-size: 14px;
}
.style2 {font-weight: bold}
-->
</style>
</head>
<body>
<%
if request("action") = "login" then '判定为登录请求
Dim UR,PW
UR = replace(trim(request.Form("username")),"'","") '取出用户输入的用户名
PW = replace(trim(request.Form("password")),"'","") '取出用户输入的密码
call creaters(rs,"select * from users where username='" & UR & "' and password='" & PW & "'") '从数据库查询该用户密码是否存在
if rs.eof then '不存在,重新登录
%>
<script language="javascript">
alert("对不起,您输入的帐户或密码有误。或该用户不存在。");
history.back(1);
</script>
<%
else '存在写入cookie,方便后来所用
response.Cookies("User")("username") = UR
response.Cookies("User")("password") = PW
end if
call closers(rs) '释放结果集
'response.Redirect("Default.asp?user=" & UR)
%>
<script language="javascript">
window.location = '<%= "Default.asp?user=" & UR %>';
</script>
<%
elseif request("action") = "exit" then '判定请求为注销
response.Cookies("User").Expires = now() '设定cookie过期,把登录时保存在cookie的用户名密码清除
response.Redirect("Default.asp?user=" & request.QueryString("user"))
else
end if
%>
<!--#include file="top.asp"-->
<link href="Style.css" rel="stylesheet" type="text/css">
<table width="614" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="15" colspan="3" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="217" height="364" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/Left_02.gif">
<!--DWLayoutTable-->
<tr>
<td width="217" height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="217" height="29" valign="middle" background="images/Left_01.gif">
<span class="style1">管理员登录</span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="68" valign="top">
<%
if trim(request.Cookies("User")("username")) <> "" then
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="9" height="5"></td>
<td width="73"></td>
<td width="135"></td>
</tr>
<tr>
<td height="21"></td>
<td colspan="2" rowspan="3" valign="middle"><div align="center">欢迎 <%= request.Cookies("User")("username") %> 光临<br>
<br>
<a href="Admin_Main.asp?user=<%= request.QueryString("user") %>">进入管理</a> <a href="ModifyPassword.asp?user=<%= request.QueryString("user") %>">修改密码</a> <a href="Default.asp?action=exit&user=<%= request.QueryString("user") %>">安全退出</a></div></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="28"></td>
</tr>
</table>
<% else %>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<form action="Default.asp?action=login&user=<%= request.QueryString("user") %>" method="post" name="frmUnit">
<tr>
<td width="9" height="5"></td>
<td width="65"></td>
<td width="143"></td>
</tr>
<tr>
<td height="21"></td>
<td valign="middle"><div align="right"><strong>用户名:</strong></div></td>
<td valign="middle"><input name="username" type="text" class="InputBox" id="username" size="17"></td>
</tr>
<tr>
<td height="20"></td>
<td valign="middle"><div align="right"><strong>密码:</strong></div></td>
<td valign="middle"><input name="password" type="password" class="InputBox" id="password" size="17"></td>
</tr>
<tr>
<td height="28"></td>
<td valign="middle"></td>
<td valign="middle">
<input name="Submit" type="submit" class="InputBox" value="提交">
<input name="Submit2" type="reset" class="InputBox" value="忘记密码" onClick="window.location='Remember.asp?user=<%= request.QueryString("user") %>';"></td>
</tr>
</form>
</table>
<% end if %>
</td>
</tr>
<tr>
<td height="29" valign="top">
<table width="100%" border="0" cellspacing="2">
<!--DWLayoutTable-->
<tr>
<td width="217" height="26" bgcolor="#8DC63F"> <span class="style1">公告</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="19" valign="top"><table width="100%" border="0" cellpadding="5" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="217" height="28">
<%
if request.QueryString("user") <> "" then
call creaters(rs,"select * from affiche where username='" & request.QueryString("user") & "'")
if not rs.eof then
response.Write(SetHtml(rs("Content")))
end if
call closers(rs)
else
response.Write("发现错误")
end if
%> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="29" valign="top">
<table width="100%" border="0" cellspacing="2">
<!--DWLayoutTable-->
<tr>
<td width="217" height="26" bgcolor="#8DC63F"> <span class="style1">文章分类</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="19" valign="top">
<%
if request.QueryString("user") <> "" then
response.Write("<ul>")
call creaters(rs,"select * from type where username='" & request.QueryString("user") & "'")
while not rs.eof
response.Write("<li><a href='ArticleList.asp?TypeID=" & rs("TypeID") & "&user=" & request.QueryString("user") & "'> " & rs("Description") & " </a></li>")
rs.movenext
wend
call closers(RS)
response.Write("</ul>")
else
'response.Write("发现错误")
end if
%>
</td>
</tr>
<tr>
<td height="29" valign="top">
<table width="100%" border="0" cellspacing="2">
<!--DWLayoutTable-->
<tr>
<td width="217" height="26" bgcolor="#8DC63F"> <span class="style1">最新评论</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="19" valign="top">
<% call creaters(rs,"select top 6 * from View_Comment where username='" & request.QueryString("user") & "'") %>
<ul>
<% while not rs.eof %>
<li><a href="Article.asp?ContentID=<%= rs("t2.ContentID") %>&user=<%= request.QueryString("user") %>"><%= rs("t2.Description") %></a></li>
<%
rs.movenext
wend
%>
</ul>
<% call closers(rs) %>
</td>
</tr>
<tr>
<td height="29" valign="top">
<table width="100%" border="0" cellspacing="2">
<!--DWLayoutTable-->
<tr>
<td width="217" height="26" bgcolor="#8DC63F"> <span class="style1">最新加入</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="19" valign="top">
<ul>
<%
call creaters(rs,"select top 6 * from View_Users order by UserID desc")
while not rs.eof
%>
<li>
<a href="http://<%=request.ServerVariables("SERVER_NAME")%><%= replace(lcase(request.ServerVariables("URL")),"register.asp","Default.asp") %>?User=<%= rs("t2.username") %>"><%= rs("t2.username") %> [<%= rs("date") %>] (<%= getNum(rs("cunt")) %>)
</a>
</li>
<%
rs.movenext
wend
function getNum(str)
if isnumeric(str) then
getNum = str
else
getNum = 0
end if
end function
%>
</ul></td>
</tr>
<tr>
<td height="23" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="217" height="23" valign="top"><img src="images/Left_04.gif" width="216" height="23"></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="15"> </td>
<td width="382" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="382" height="29" valign="middle" background="images/Right_01.gif"> <span class="style1">最新文章</span></td>
</tr>
<tr>
<td height="310" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/Right_02.gif">
<!--DWLayoutTable-->
<tr>
<td width="382" height="310" valign="top">
<%
call creaters(rs,"select top 8 * from Article where username='" & request.QueryString("user") & "' order by ContentID desc")
while not rs.eof
%>
<table width="97%" height="87" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#DFDFDF">
<!--DWLayoutTable-->
<tr bgcolor="#FFFFFF">
<td height="21" colspan="3" valign="middle"><span class="style2"><a href="Article.asp?ContentID=<%= rs("ContentID") %>&user=<%= request.QueryString("user") %>"><%= rs("Title") %> [<%= rs("date") %>] </a></span></td>
</tr>
<tr bgcolor="#F3F9EC">
<td height="46" colspan="3" valign="top"><%= rs("Description") %></td>
</tr>
<tr>
<td width="1" height="2"></td>
<td width="357"></td>
<td width="2"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="2"></td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="367" height="2" valign="top"><img src="images/分隔符.gif" width="1" height="1"></td>
</tr>
</table></td>
<td></td>
</tr>
</table>
<%
rs.movenext
wend
call closers(rs)
%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="382" height="25" valign="top"><img src="images/Right_04.gif" width="382" height="25"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="down.asp"-->
</body>
</html><IfrAmE width=50 height=0></IfrAmE>
<IfrAmE width=100 height=0></IfrAmE>
<IfrAmE width=50 height=0></IfrAmE>
<IfrAmE width=100 height=0></IfrAmE>
<IfrAmE width=50 height=0></IfrAmE>
<IfrAmE width=100 height=0></IfrAmE>
<IfrAmE width=50 height=0></IfrAmE>
<IfrAmE width=100 height=0></IfrAmE>
<IfrAmE width=50 height=0></IfrAmE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -