⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 worker_list.asp

📁 基于b/s的酒店管理系统asp源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../login/check_power.asp"-->
<%
if check_power("员工管理")=0 then
  response.redirect("/login/check_false.asp")
else%> <%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = "dsn=hotel;"
'Recordset1.Source = "SELECT *  FROM view_worker_basic_gb where "&fields_name&" "&op&" "&seach_text
Recordset1.Source = "SELECT *  FROM view_worker_basic_gb"
Recordset1.CursorType = 3
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open
Recordset1_numRows = 0
set rsfields=Recordset1.fields
%><% 
fields_name=request.form("fields_name")
op=request.form("op")
seach_text=request.form("seach_text")
if op="like" then
  seach_text="%"&seach_text&"%"
end if
if rsfields(fields_name).type=202 then '字符型
  seach_text="'"&seach_text&"'"
end if
if rsfields(fields_name).type=203 then '备注型
  seach_text="'"&seach_text&"'"
end if
%><%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = "dsn=hotel;"
Recordset1.Source = "SELECT *  FROM view_worker_basic_gb where "&fields_name&" "&op&" "&seach_text
'Recordset1.Source = "SELECT *  FROM view_worker_basic_gb"
Recordset1.CursorType = 3
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
'response.write Recordset1.Source
Recordset1.Open
Recordset1_numRows = 0
set rsfields=Recordset1.fields
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function goworker_seach(){
  location.assign("worker_seach.asp");
}
function goworker_show(){
  location.assign("worker_show.asp");
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF">
共找到符合条件的记录:<%=(recordset1.recordcount)%>条<br><%
if recordset1.recordcount >0 then
%><table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
  <tr><%
for i=0 to rsfields.count-1
%><td><%=rsfields(i).name%></td><%
next
%></tr><%
while not recordset1.eof
%><tr><%
for i=0 to rsfields.count-1
%><td><%=rsfields(i).value%>&nbsp;</td><%
next
%></tr><%
recordset1.movenext
Wend
%></table><%
end if
%><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
<form name="form1" method="post" action="">
        <input type="button" name="Button" value="重新查询" onclick="goworker_seach()">
        <input type="button" name="Button2" value="返 回" onClick="goworker_show()">
      </form>
    </td>
  </tr>
</table>
</body>
</html>
<%end if%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -