📄 homeout.asp
字号:
<% Set hdobj = Server.CreateObject("HD.comOpen")'请保证此行在最前面
Conn = hdobj.WeekaaConn()
La=Request.form("La")
Set rs = Server.CreateObject("ADODB.RecordSet")
if La="" then
sqls = "Select * From [HomeOut] order by c asc"
else
sqls = "Select * From [HomeOut] where b like '%"&La&"%' order by c asc"
end if
rs.Open Sqls,Conn,1,3
'=========================================================
Dim i, text, checkpage, page, MaxPerPage, CurrentPage
MaxPerPage = Request.Form("pages")
If MaxPerPage = "" Then
MaxPerPage = 12
End If
If MaxPerPage < 1 Or MaxPerPage > 1000 Then
MaxPerPage = 12
End If
MaxPerPage = MaxPerPage * 1
text = "0123456789"
rs.PageSize = MaxPerPage
GoPage = Request.Form("pagee")
For i = 1 To Len(GoPage)
checkpage = InStr(1, text, Mid(GoPage, i, 1))
If checkpage = 0 Then
Exit For
End If
Next
If checkpage <> 0 Then
If Not IsEmpty(GoPage) Then
CurrentPage = CInt(GoPage)
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > rs.PageCount Then CurrentPage = rs.PageCount
Else
CurrentPage = 1
End If
If Not rs.EOF Then
rs.AbsolutePage = CurrentPage
End If
Else
CurrentPage = 1
End If
RsSum = CStr(rs.RecordCount) '记录总条数
pageOn = CStr(CurrentPage) '当前第几页
pageSum = CStr(rs.PageCount) '总共几页
NextPage = pageOn + 1
pageSum=pageSum + 0
If NextPage > pageSum Then
NextPage = 1
End If
'==============================================================
i=0
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>红笛软件</title>
<style type="text/css">
<!--
body {
background-color: #DEE7FF;
margin-left: 10px;
margin-top: 10px;
margin-right: 10px;
margin-bottom: 0px;
}
body,td,th {
font-size: 12px;
}
.STYLE2 {
font-size: 16px;
font-family: "黑体";
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
function delpay()
{
if(confirm("确定要删除此吗?"))
return true;
else
return false;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#DEE7FF">
<tr>
<td height="5" colspan="8" background="../../HR/Image/bg02.jpg"> </td>
</tr>
<tr><form name="form1" method="post" action="">
<td height="28" colspan="8"><span class="STYLE2">学生外宿登记</span>
姓名
<input name="La" type="text" id="La" size="10">
<input type="submit" name="Submit" value="查">
[<a href='#' onClick="MM_openBrWindow('HomeOutadd.asp','红笛软件','status=no,scrollbars=no,top=150,left=20,width=800,height=150')">添加</a>] </td>
</form>
</tr>
<tr>
<td height="28" colspan="8" background="../Image/bg01.jpg"> </td>
</tr>
<tr>
<td width="15%" height="28" align="center" valign="middle" bgcolor="#F4F8FA">编号</td>
<td width="10%" align="center" valign="middle" bgcolor="#F4F8FA">学生姓名</td>
<td width="10%" align="center" valign="middle" bgcolor="#F4F8FA">批准人</td>
<td width="10%" align="center" valign="middle" bgcolor="#F4F8FA">起始时间</td>
<td width="10%" align="center" valign="middle" bgcolor="#F4F8FA">返校时间</td>
<td width="35%" align="center" valign="middle" bgcolor="#F4F8FA">外宿事由</td>
<td width="5%" align="center" valign="middle" bgcolor="#F4F8FA">返校</td>
<td width="5%" align="center" valign="middle" bgcolor="#F4F8FA">删除</td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td height="28" align="center" valign="middle" bgcolor="#FFFFFF"><%=rs("a")%></td>
<td align="center" valign="middle" bgcolor="#FFFFFF"><%=rs("b")%></td>
<td align="center" valign="middle" bgcolor="#FFFFFF"><%=rs("c")%></td>
<td align="center" valign="middle" bgcolor="#FFFFFF"><%=rs("d")%></td>
<td align="center" valign="middle" bgcolor="#FFFFFF"><%=rs("e")%></td>
<td align="center" valign="middle" bgcolor="#FFFFFF"><%=rs("f")%></td>
<td align="center" valign="middle" bgcolor="#FFFFFF"><a href='#' onClick="MM_openBrWindow('HomeOutadd.asp?ID=<%=rs("ID")%>','红笛软件','status=no,scrollbars=no,top=150,left=80,width=800,height=150')">返校</a></td>
<td align="center" valign="middle" bgcolor="#FFFFFF"><a href="?deln=del&ID=<%=rs("ID")%>" onClick="return delpay();">删除</a></td>
</tr>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
NextP=NextPage
if NextPage>pageSum then
NextP=1
end if
if i<MaxPerPage then
for j=1 to MaxPerPage - i
%>
<tr>
<td height="28" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td align="center" valign="middle" bgcolor="#FFFFFF"> </td>
</tr>
<%
next
end if
If Request.QueryString("deln") = "del" Then
call hdobj.Deler("HomeOut","k")
end if
%>
<form name='form2' method='post' action=''>
<tr>
<td height="28" colspan="8" align="center" background="../Image/bg01.jpg" bgcolor="#FFFFFF"><%
Response.Write "<input type='hidden' name='La' value='" & La & "'><input type='hidden' name='Lb' value='" & Lb & "'>"
Response.Write "第" & pageOn & "/" & pageSum & "页 共" & RsSum & "条记录 每页"
Response.Write "<input name='pages' type='text' id='pages' value='" & MaxPerPage & "'"
Response.Write " size='2' style='background-color: #DEE7FF; border-color: #FFFFFF; border-style: solid; border-width: 0px 0px 1px 0px, font-family:Verdana,Arial; font-size: 10pt; color: #003399'>"
Response.Write "条记录 转到</span>"
Response.Write "<input name='pagee' type='text' id='pagee' value='" & NextP & "' size='2' style='background-color: #DEE7FF; border-color: #FFFFFF;"
Response.Write " border-style: solid; border-width: 0px 0px 1px 0px, font-family:Verdana,Arial; font-size: 10pt; color: #003399'>"
Response.Write "<input name='Submit' type='submit' class='STYLE10' value='Go'>"
%></td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -