📄 search.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
r2_numRows = r2_numRows + Repeat1__numRows
%>
<%
if session("password")<>"" then
session("return")=request.ServerVariables("SCRIPT_NAME")
%>
<!-- #include file="inc/top.asp"-->
<!-- #include file="images/jav.inc" -->
<!-- #include file="inc/adminmenu.asp" -->
<!--#include file="Connections/conn2.asp" -->
<%
Dim r1__MMColParam2
r1__MMColParam2 = "1"
If (Request.Form("xq") <> "") Then
r1__MMColParam2 = Request.Form("xq")
End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.Form("xh") <> "") Then
Recordset1__MMColParam = Request.Form("xh")
End If
%>
<%
Dim Recordset1__MMColParam2
Recordset1__MMColParam2 = "1"
If (Request.Form("xq") <> "") Then
Recordset1__MMColParam2 = Request.Form("xq")
End If
%>
<%
Dim r2__MMColParam2
r2__MMColParam2 = "1"
If (Request.Form("xq") <> "") Then
r2__MMColParam2 = Request.Form("xq")
End If
%>
<%
Dim rz
Dim rz_numRows
Set rz = Server.CreateObject("ADODB.Recordset")
rz.ActiveConnection = MM_conn2_STRING
rz.Source = "SELECT * FROM bbs2"
rz.CursorType = 0
rz.CursorLocation = 2
rz.LockType = 1
rz.Open()
rz_numRows = 0
%>
<%
Dim r1__MMColParam
r1__MMColParam = "1"
If (Request.Form("xh") <> "") Then
r1__MMColParam = Request.Form("xh")
End If
%>
<%
Dim r1
Dim r1_numRows
Set r1 = Server.CreateObject("ADODB.Recordset")
r1.ActiveConnection = MM_conn2_STRING
r1.Source = "SELECT SUM(cj) as 'cj2' FROM bbs1 WHERE xh = '" + Replace(r1__MMColParam, "'", "''") + "'and xq='" + Replace(r1__MMColParam2, "'", "''") + "'"
r1.CursorType = 0
r1.CursorLocation = 2
r1.LockType = 1
r1.Open()
r1_numRows = 0
%>
<%
Dim r2__MMColParam
r2__MMColParam = "1"
If (Request.Form("xh") <> "") Then
r2__MMColParam = Request.Form("xh")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn2_STRING
Recordset1.Source = "SELECT distinct " + Replace(Recordset1__MMColParam, "'", "''") + "," + Replace(Recordset1__MMColParam2, "'", "''") + " FROM bbs1"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim r2
Dim r2_numRows
Set r2 = Server.CreateObject("ADODB.Recordset")
r2.ActiveConnection = MM_conn2_STRING
r2.Source = "SELECT * FROM bbs1 WHERE xh = '" + Replace(r2__MMColParam, "'", "''") + "'and xq ='" + Replace(r2__MMColParam2, "'", "''") + "' ORDER BY date DESC"
r2.CursorType = 0
r2.CursorLocation = 2
r2.LockType = 1
r2.Open()
r2_numRows = 0
%>
<span class="unnamed2_14"> </span>
<table width="752" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td align="center"><table width="600" border="0" cellspacing="0" cellpadding="0" bordercolor="#eeeeee">
<tr>
<td bgcolor="#CCCCCC">
<div align="center"><span style="font-weight: bold">员工
工分 分类查询</span></div></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="25%" height="19">
<form name="form1" method="post" action="search.asp">
<table width="87%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="19%" height="16"><div align="right"></div></td>
<td width="10%"> </td>
<td width="22%"> 输入工号</td>
<td width="12%"><select name="xh" id="xh">
<!-- #include file="inc/gh.asp" --></select>
</td>
<td width="13%"><div align="center">月份</div></td>
<td width="24%"><select name="xq" id="select3">
<option value="1">1</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 colspan="2"> </td>
<td> </td>
<td colspan="3"> <input type="submit" name="Submit" value="提交">
</td>
</tr>
</table>
</form> </td>
</tr>
<tr>
<td width="25%"><table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#eeeeee">
<form name="form6" method="post" action="search2.asp">
<tr align="center" bgcolor="#eeeeee">
<td width="100%"> </td>
</tr>
</form>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="60%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td><table width="768" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#EEEEEE"> <span class="unnamed2_14">年份:
</tr>
</table>
<table width="787" height="51" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="14%" align="center" height="12">工号</td>
<td width="14%" height="12" align="center">姓名</td>
<td width="14%" height="12" align="center">日期</td>
<td width="14%" height="12" align="center">工分</td>
<td width="14%" height="12" align="center">月份</td>
<td width="12%" height="12" align="center">类型</td>
<td width="18%" height="12" align="center">。。</td>
</tr>
<%
if flag = false then
%>
<% If Not r2.EOF Or Not r2.BOF Then %>
<%
While ((Repeat1__numRows <> 0) AND (NOT r2.EOF))
%>
<tr>
<td align="center" height="30"><%=(r2.Fields.Item("xh").Value)%> </td>
<td width="14%" height="30" align="center"><%=(r2.Fields.Item("user").Value)%></td>
<td width="14%" height="30" align="center"><%=(r2.Fields.Item("date").Value)%></td>
<td width="14%" height="30" align="center"><%=(r2.Fields.Item("cj").Value)%></td>
<td width="14%" height="30" align="center"><%=(r2.Fields.Item("xq").Value)%>-<%=(r2.Fields.Item("rz").Value)%></td>
<td width="12%" height="30" align="center"><%=(r2.Fields.Item("lx").Value)%></td>
<td width="18%" height="30" align="center" bgcolor="#E1E1E1"><font color="#000000"><strong><a href="updata.asp?kind=date&id=<%=r2("id")%>">修改</a>
</strong></font> </td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
r2.MoveNext()
Wend
%>
<% End If ' end Not r2.EOF Or NOT r2.BOF %>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>该员工总分</td>
<td><%=(r1.Fields.Item("'cj2'").Value)%></td>
<td><font color="#000000">平均值:</font></td>
<td><font color="#FF0000"><strong>
<% cj1=r1.fields.item("'cj2'")/30%>
<% =cj1%>
</strong></font></td>
<td><font color="#FF0000"><strong> </strong></font></td>
</tr>
<tr>
<td width="12%"><div align="left">本月员工总成绩</div></td>
<td width="12%"> <div align="left"><%=(rz.Fields.Item("Expr1000").Value)%><br>
</div></td>
<td width="10%">该月平均值:</td>
<td width="17%"><font color="#FF0000"><strong>
<% cj3=rz.fields.item("Expr1000")/30%>
<% =cj3%>
</strong></font></td>
<td width="49%"> <div align="left"><font color="#FF0000"><strong> </strong></font></div></td>
</tr>
</table>
<br>
<% If r2.EOF And r2.BOF Then %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="48"> <div align="center">
<p>没有您需要的信息</p>
</div></td>
</tr>
</table>
<% End If ' end r2.EOF And r2.BOF %> <%end if%>
<p> </p></td></tr>
</table>
<!--#include file="inc/copyright.asp"-->
<%
r2.Close()
Set r2 = Nothing
%>
<%
rz.Close()
Set rz = Nothing
%>
<%
r1.Close()
Set r1 = Nothing
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -