📄 index.asp
字号:
<!-- #include file="conn.asp" -->
<!-- #include file= "function.asp" -->
<!-- #include file= "MD5.asp" -->
<%
username=ReplaceBadChar(trim(Request.Form("username")))
userpass=MD5(ReplaceBadChar(trim(Request.Form("userpass"))))
if username<>"" and userpass<>"" then
exec_index="select * from [user] where user_name='"&username&"' and user_pass='"&userpass&"'"
set rs=server.createobject("adodb.recordset")
rs.open exec_index,conn,1,3
if not rs.eof then
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
sql="update [user] set user_ip='"&userip&"',user_lastlogintime='"&now()&"',user_logincount=user_logincount+1 where user_name='"&username&"'"
conn.execute(sql)
session("user")=username
else
%>
<SCRIPT Language=javascript>
<!--
window.alert("用户名或密码错误!!");
-->
</SCRIPT>
<%
end if
rs.close
end if
%>
<html>
<head>
<TITLE>欢迎光临中国人民大学二手交易网</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<link rel="stylesheet" href="css.css">
<body leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="100" colspan="3"><!-- #include file="head.asp" --></td>
</tr>
<tr>
<td height="25" colspan="3"><!-- #include file="menu.asp" --></td>
</tr>
<tr valign="top">
<%
if session("user")="" then
%>
<td width="192" height="150">
<!-- #include file="left.asp" --></td>
<%
else
%>
<td width="192" height="150">
<!-- #include file="left_user.asp" --></td>
<%
end if
%>
<td height="570" width="378" rowspan="2"><!-- #include file="middle.asp" --></td>
<td width="192" height="570" rowspan="2"> <!-- #include file="right.asp" --></td>
</tr>
<tr>
<td valign="top">
<!-- #include file="left_bottom.asp" -->
</td>
</tr>
<tr>
<td height="55" colspan="3"><!-- #include file="foot.asp" --></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -