📄 ss.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<table width="60%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td> </td>
</tr>
</table>
<!--#include file="Connections/conn2.asp" -->
<%
USER = Trim(Request.Form("USER"))
xq = Trim(Request.Form("xq"))
kc = Trim(Request.Form("kc"))
xh = Trim(Request.Form("xh"))
bj = Trim(Request.Form("bj"))
if (xh = "")then
Flag = True
Else
Flag = False
end if
StrSql = ""
If user <> "" then
StrSql = "user like '%" &user&"%'"
end if
If BookType <> "全部" Then
If Trim(StrSql & " ") = "" Then
StrSql = " user ='" & xh& "'"
Else
StrSql = StrSql & " and user ='" & xh& "'"
End If
End If
If Author <> "" Then
If Trim(StrSql & " ") = "" Then
StrSql = " xh like '%" &xh& "%'"
Else
StrSql = StrSql & " and xh like '%" &xh& "%'"
End If
End If
If xq <> "" Then
If Trim(StrSql & " ") = "" Then
StrSql = " xq like '%" &xq& "%'"
Else
StrSql = StrSql & " and xq like '%" &xq& "%'"
End If
End If
If Price<> "" Then
If Trim(StrSql & "") = "" Then
StrSql = "bj "& bj &" "&CCur(bj)&""
Else
StrSql = StrSql & " and bj "& bj &" "&CCur(bj)&""
End If
End If
%>
<%
Dim rs1
Dim rs1_numRows
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.ActiveConnection = MM_conn2_STRING
rs1.Source = "SELECT Distinct user, xh FROM bbs1"
rs1.CursorType = 0
rs1.CursorLocation = 2
rs1.LockType = 1
rs1.Open()
rs1_numRows = 0
%>
<%
Dim rs2__MMColParam
rs2__MMColParam = "1"
If (Request.QueryString("xq") <> "") Then
rs2__MMColParam = Request.QueryString("xq")
End If
%>
<%
Dim rs2
Dim rs2_numRows
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.ActiveConnection = MM_conn2_STRING
If Flag = False then
If Trim(StrSql) <> "" then
rs2.Source = "SELECT * FROM bbs1 where "&StrSql
else
rs2.Source = "SELECT * FROM bbs1 WHERE xq = '" + Replace(rs2__MMColParam, "'", "''") + "'"
end if
rs2.CursorType = 0
rs2.CursorLocation = 2
rs2.LockType = 1
rs2.Open()
rs2_numRows = 0
end if
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
rs1_numRows = rs1_numRows + Repeat1__numRows
%>
<!-- #include file="inc/top.asp"--><html>
<body> <head> <form name="form1" method="post" action="ss.asp">
<form name="form1" method="post" action="">
<table width="73%" height="132" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td height="22"><div align="center">积分查询</div></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF"><br> <table width="60%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="15%"><div align="center">姓名</div></td>
<td width="85%"><select name="user" size="1" id="user">
<option value="全部" selected>全部</option>
<%
While (NOT rs1.EOF)
%>
<option value="<%=(rs1.Fields.Item("user").Value)%>"><%=(rs1.Fields.Item("user").Value)%></option>
<%
rs1.MoveNext()
Wend
If (rs1.CursorType > 0) Then
rs1.MoveFirst
Else
rs1.Requery
End If
%>
</select></td>
</tr>
<tr>
<td><div align="center">月份</div></td>
<td><select name="xq" size="1" id="select3">
<option value="1" selected>一月份</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select></td>
</tr>
<tr>
<td><div align="center">项目</div></td>
<td> <input name="kc" type="text" id="kc2" size="15"></td>
</tr>
<tr>
<td><div align="center">工号</div></td>
<td><select name="xh" size="1" id="select4">
<option value="无" selected>无</option>
rs1.MoveNext()
Wend
If (rs1.CursorType > 0) Then
rs1.MoveFirst
Else
rs1.Requery
End If
%>
<%
While (NOT rs1.EOF)
%>
<option value="<%=(rs1.Fields.Item("xh").Value)%>"><%=(rs1.Fields.Item("xh").Value)%></option>
<%
rs1.MoveNext()
Wend
If (rs1.CursorType > 0) Then
rs1.MoveFirst
Else
rs1.Requery
End If
%>
</select> </td>
</tr>
<tr>
<td><div align="center">年份</div></td>
<td> <input name="bj" type="text" id="bj2"></td>
</tr>
</table>
<div align="center"><font color="#FF0000">任选一项既可</font><br>
</div></td>
</tr>
<tr>
<td valign="top"> <div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
</table>
</form>
<div align="center"
<% If Not rs2.EOF Or Not rs2.BOF Then %>
>
<div align="center"> <br>
<table width="60%" border="0" cellspacing="1" cellpadding="1">
<tr bgcolor="#CCCCCC">
<td width="21%">姓名</td>
<td width="29%">月份</td>
<td width="20%">项目</td>
<td>工号</td>
<td>年代</td>
<td width="10%"> </td>
</tr>
<tr>
<td><%=(rs2.Fields.Item("user").Value)%></td>
<td><%=(rs2.Fields.Item("xq").Value)%></td>
<td><%=(rs2.Fields.Item("kc").Value)%></td>
<td width="13%"><%=(rs2.Fields.Item("xh").Value)%></td
>
<td width="7%"><%=(rs2.Fields.Item("bj").Value)%></td
>
<% End If ' end Not rs2% If rs2.EOF And rs2.BOF Th If ' end rs2.EOF And rs2.BOF %>
<% If rs2.EOF And rs2.BOF Then %>
>
</table>
<br>
<table width="60%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td><div align="center">没有找到想关内容</div></td>
<% End If ' end rs2.EOF And rs2.BOF %>
</tr>
</table>
<p> </p>
</div>
</div>
</body>
</head>
</html>
<%
rs1.Close()
Set rs1 = Nothing
%>
<%
rs2.Close()
Set rs2 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -