📄 index.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/gym.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>体育馆管理系统</title>
<style type="text/css">
<!--
@import url("style.css");
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>
<%
dim rs_user,grounf
dim rs_user_total,ground_total
'打开用户资料数据库---------------
Set rs_user = Server.CreateObject("ADODB.Recordset")
sql = "SELECT user_name FROM user_reg"
rs_user.Open sql,gym_conn,3,2
'打开场地料数据库---------------
Set ground = Server.CreateObject("ADODB.Recordset")
sql = "SELECT ground_id FROM dbo.ground"
ground.Open sql,gym_conn,3,2
'生成注册用户总数和场地记录总数------------------
If (rs_user.RecordCount = -1) Then
rs_user_total=0
rs_user.movefirst
While (Not rs_user.EOF)
rs_user_total = rs_user_total + 1
rs_user.MoveNext
Wend
else
rs_user_total = rs_user.RecordCount
End If
If (ground.RecordCount = -1) Then
ground_total=0
ground.movefirst
While (Not ground.EOF)
ground_total = ground_total + 1
ground.MoveNext
Wend
else
ground_total = ground.RecordCount
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (ground_total = -1) Then
' count the total records by iterating through the recordset
ground_total=0
While (Not ground.EOF)
ground_total = ground_total + 1
ground.MoveNext
Wend
' reset the cursor to the beginning
If (ground.CursorType > 0) Then
ground.MoveFirst
Else
ground.Requery
End If
' set the number of rows displayed on this page
If (ground_numRows < 0 Or ground_numRows > ground_total) Then
ground_numRows = ground_total
End If
' set the first and last displayed record
ground_first = 1
ground_last = ground_first + ground_numRows - 1
If (ground_first > ground_total) Then
ground_first = ground_total
End If
If (ground_last > ground_total) Then
ground_last = ground_total
End If
End If
%>
<body>
<div align="center">
<table width="760" border="0" class="table_big">
<tr>
<td height="345" valign="top"><div align="center">
<!--#include file="inc/head.asp" -->
<br>
<table border="0" cellspacing="0">
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td width="44"> </td>
<td width="194" class="table_small"><form name="form1" method="post" action="login.asp">
<table border="0" cellspacing="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="right" class="text"> </td>
<td align="right" class="text">用户名:</td>
<td align="left"><input name="user_name" type="text" class="textfield" id="user_name" size="15"></td>
<td> </td>
</tr>
<tr>
<td align="right" class="text"> </td>
<td align="right" class="text">密 码:</td>
<td align="left"><input name="psw" type="password" class="textfield" id="psw" size="15"></td>
<td> </td>
</tr>
<tr>
<td align="right"> </td>
<td align="right"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<% if isempty(session("user_name")) then login="登陆" else login="重新登陆" end if %>
<td align="center"><input name="login" type="submit" class="button_" id="login" value="<%= login %>">
<input name="reg" type="button" class="button_" id="reg" onClick="MM_goToURL('parent','reg.asp');return document.MM_returnValue" value="注册"></td>
<td> </td>
</tr>
</table>
</form></td>
<td width="66" align="right" class="text"> </td>
<td width="252" align="right" valign="top" class="text">
<table width="225" height="131" border="0" align="left" class="table_small">
<tr>
<td height="14"><div align="left">
</div></td>
</tr>
<tr>
<td height="21" class="text"><div align="left">
<%
'用户登陆后显示欢迎用户--------------------------
if not isempty(session("user_name")) then
set rs_user_name=server.CreateObject("adodb.recordset")
sql="select * from user_reg where user_name ='" & session("user_name") &"'"
rs_user_name.open sql,gym_conn,3,2
'下面的response.Write中可以输出Html代码-------------
response.Write("欢迎您," & rs_user_name("user_name") & " !<br><br>")
end if
%>
</div></td>
</tr>
<tr>
<td height="27" valign="top" class="text"><div align="left">本系统共收录体育场馆场地<span class="text_blue"><a href="ground.asp"><%=(ground_total)%></a></span>个</div></td>
</tr>
<tr>
<td height="39" valign="top" class="text"><div align="left">当前有<span class="text_blue"><%=(rs_user_total)%></span>位注册用户</div></td>
</tr>
</table> <p align="center"><br>
</p>
</td>
</tr>
<tr>
<td height="90"> </td>
<td height="90" colspan="3" class="text"><div align="left"><br>
●您注册后才能使用本系统的全部功能<br>
●在您预约场地后请及时交费<br>
●预约必须提前24小时提出<br>
●取消预约必要提前24小时提出<br>
●一旦预约过期或已经交费就不能取消<br>
●有任何疑问请给管理员留言</div></td>
</tr>
</table>
<br>
<!--#include file="inc/foot.asp" -->
<br>
</div></td>
</tr>
</table>
</div>
</body>
</html>
<%
set rs_user_name = Nothing
rs_user.Close()
Set rs_user = Nothing
ground.Close()
Set ground = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -