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

📄 empmain_list_search.asp

📁 好用的管理,代码程序 好用的管理,代码程序
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/EmpMain.asp" -->
<!--#include file="EmpMain_CheckRight.asp"-->

<%
 From_url = Cstr(Request.ServerVariables("HTTP_REFERER"))
 frmstring="EmpMain_basesearch.asp"
 frmstring_1="EmpMain_list_search.asp"

call fnCheckRight()
Dim EmpList__MMColParam
EmpList__MMColParam = "1"
If (Request("SearchWord") <> "") Then 
  EmpList__MMColParam = Request("SearchWord")
End If
%>
<%
idstring=request("idstring")
if IDstring ="" then
  IDstring = "0"
 else
IDstring=IDstring
end if
%>
<%
Dim EmpList
Dim EmpList_numRows
dim kfdj
kfdj="前期客户"
Set EmpList = Server.CreateObject("ADODB.Recordset")
EmpList.ActiveConnection = MM_EmpMain_STRING
EmpList.Source = "SELECT F_Id,F_City,F_Redate,F_Contect,F_CompanyName,F_Levels FROM T_Client  where  F_Id in ("&IDstring&") order by F_Id desc" 
EmpList.CursorType = 0
EmpList.CursorLocation = 2
EmpList.LockType = 1
EmpList.Open()
EmpList_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 10
Repeat1__index = 0
EmpList_numRows = EmpList_numRows + Repeat1__numRows
%>
<%
Dim EmpList_total
Dim EmpList_first
Dim EmpList_last

EmpList_total = EmpList.RecordCount

If (EmpList_numRows < 0) Then
  EmpList_numRows = EmpList_total
Elseif (EmpList_numRows = 0) Then
  EmpList_numRows = 1
End If

EmpList_first = 1
EmpList_last  = EmpList_first + EmpList_numRows - 1

If (EmpList_total <> -1) Then
  If (EmpList_first > EmpList_total) Then
    EmpList_first = EmpList_total
  End If
  If (EmpList_last > EmpList_total) Then
    EmpList_last = EmpList_total
  End If
  If (EmpList_numRows > EmpList_total) Then
    EmpList_numRows = EmpList_total
  End If
End If
%>
<%

If (EmpList_total = -1) Then

  EmpList_total=0
  While (Not EmpList.EOF)
    EmpList_total = EmpList_total + 1
    EmpList.MoveNext
  Wend

  If (EmpList.CursorType > 0) Then
    EmpList.MoveFirst
  Else
    EmpList.Requery
  End If

  If (EmpList_numRows < 0 Or EmpList_numRows > EmpList_total) Then
    EmpList_numRows = EmpList_total
  End If

  EmpList_first = 1
  EmpList_last = EmpList_first + EmpList_numRows - 1
  
  If (EmpList_first > EmpList_total) Then
    EmpList_first = EmpList_total
  End If
  If (EmpList_last > EmpList_total) Then
    EmpList_last = EmpList_total
  End If

End If
%>
<%
Dim MM_paramName 
%>
<%

Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined

Dim MM_param
Dim MM_index

Set MM_rs    = EmpList
MM_rsCount   = EmpList_total
MM_size      = EmpList_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
  MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%

if (Not MM_paramIsDefined And MM_rsCount <> 0) then

  MM_param = Request.QueryString("index")
  If (MM_param = "") Then
    MM_param = Request.QueryString("offset")
  End If
  If (MM_param <> "") Then
    MM_offset = Int(MM_param)
  End If

  If (MM_rsCount <> -1) Then
    If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  
      If ((MM_rsCount Mod MM_size) > 0) Then         
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If

  MM_index = 0
  While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
  If (MM_rs.EOF) Then 
    MM_offset = MM_index  
  End If

End If
%>
<%

If (MM_rsCount = -1) Then

  MM_index = MM_offset
  While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend

  If (MM_rs.EOF) Then
    MM_rsCount = MM_index
    If (MM_size < 0 Or MM_size > MM_rsCount) Then
      MM_size = MM_rsCount
    End If
  End If

  If (MM_rs.EOF And Not MM_paramIsDefined) Then
    If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
      If ((MM_rsCount Mod MM_size) > 0) Then
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If

  If (MM_rs.CursorType > 0) Then
    MM_rs.MoveFirst
  Else
    MM_rs.Requery
  End If

  MM_index = 0
  While (Not MM_rs.EOF And MM_index < MM_offset)
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
End If
%>
<%

EmpList_first = MM_offset + 1
EmpList_last  = MM_offset + MM_size

If (MM_rsCount <> -1) Then
  If (EmpList_first > MM_rsCount) Then
    EmpList_first = MM_rsCount
  End If
  If (EmpList_last > MM_rsCount) Then
    EmpList_last = MM_rsCount
  End If
End If

MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next

For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next

MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%

Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev

Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam

MM_keepMove = MM_keepBoth
MM_moveParam = "index"

If (MM_size > 1) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
    MM_paramList = Split(MM_keepMove, "&")
    MM_keepMove = ""
    For MM_paramIndex = 0 To UBound(MM_paramList)
      MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
      If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
        MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
      End If
    Next
    If (MM_keepMove <> "") Then
      MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
    End If
  End If
End If

If (MM_keepMove <> "") Then 
  MM_keepMove = MM_keepMove & "&"
End If

MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="

MM_moveFirst = MM_urlStr & "0"
MM_moveLast  = MM_urlStr & "-1"
MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
  MM_movePrev = MM_urlStr & "0"
Else
  MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>列表</title>
<link rel="stylesheet" href="CSS/SellWellWeb.css" type="text/css">
<script>
var objClassName
var objorgImg=null
function showDetail(obj){
    URL = window.parent.frames("frmbottom").window.location.href
    if(URL.indexOf("EmpMain_Main.asp")==-1){
    window.parent.frames("frmbottom").window.location = "EmpMain_Main.asp?ID=" + obj.EmpID + "&PageType=Base"
	return
	}
    window.parent.frames("frmbottom").window.document.form1.ID.value = obj.EmpID
	strUrl=window.parent.frames("frmbottom").window.frames("main").location.href
	NewUrl = strUrl.substr(0,strUrl.indexOf("?")) + "?ID="+obj.EmpID + "&PageType=Base"
	window.parent.frames("frmbottom").window.frames("main").location.href = NewUrl
}

function showCursorLocation(objimg){
     if(objorgImg==null){
	  objorgImg = eval("document.all."+objimg)
	}
	else{
	  objorgImg.style.display = "none"
	}
	objorgImg = eval("document.all."+objimg)
	eval("document.all."+objimg+".style.display=''")
}

function HLItem(obj){
	obj.oldClassName=obj.className;
	obj.className="ListValuehighlight";
}

function fnDoDelete(id){
if(confirm("您确认要删除该用户?")){
		window.location = "EmpMain_delete.asp?id="+id;	
		}
	}
function Re(obj){
 obj.className=obj.oldClassName
}

function dosearch(){
searchField = document.form1.searchField.options[document.form1.searchField.selectedIndex].value
searchWord = document.form1.SearchWord.value
  window.location = "EmpMain_List.asp?searchField="+searchField+"&searchWord="+searchWord
}


function fnRedirect(obj){
  window.location= obj.value
}
function onsearch(obj){
 window.location = "EmpMain_list.asp?searchField=客户性质&SearchWord="+obj.options[obj.selectedIndex].value

}
</script>
</head>

<body bgcolor="#EAF4FF" class="body">
<fieldset class="fiedset">
<legend>
<input name="nolist" onClick="fnRedirect(this)" type="radio" value="EmpMain_no_list.asp" >
前期客户
<input name="paylist" onClick="fnRedirect(this)" type="radio" value="EmpMain_Pay_list.asp">
中期客户
<input name="yesllist" type="radio" value="EmpMain_yes_list.asp" onClick="fnRedirect(this)">
后期客户 

<input name="Emplist" type="radio" onClick="fnRedirect(this)" value="EmpMain_list.asp" >
客户列表</legend>
<table border="0" width="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
  <form name="form1" action="EmpMain_List.asp" method="post">
  <input type="hidden" value="hahahha" name="test">
  <tr>
    <td width="16%" class="Caption"><p align="left"><font size="2">『<a href="javascript:void window.open('EmpMain_AddNew.asp','AddNew','width=650,height=380')">新增</a>』</font></p></td> 
    </td>
  </tr>
  </form>
</table>

</div>
<div align="right">

  <table width="100%" border="0" align="center" class="table" cellspacing="0" bordercolor="#ffffff" cellpadding="0">
    <tr> 
      <td width="5%" align="center" class="listTitle" nowrap>&nbsp;</td>
      <td width="5%" align="center" class="listTitle" nowrap>公司编号</td>
      <td width="11%" align="center" class="listTitle" nowrap>公司名称</td>
      <td width="10%" align="center" class="listTitle" nowrap>最近联系</td>
      <td width="8%" align="center" class="listTitle" nowrap>省市</td>
      <td width="20%" align="center" class="listTitle" nowrap>联系人</td>
      <td width="19%" align="center" class="listTitle" nowrap>客户等级</font></td>
      <td width="16%" align="center" class="listTitle" nowrap>操作</font></td>
    </tr>
    <%
i = 0 
%>
    <% 
While ((Repeat1__numRows <> 0) AND (NOT EmpList.EOF)) 
%>
    <%
i = i + 1 
if i mod 2 <> 0 then
classname="ListValueWhite"
else
classname="ListValuegray"
end if
%>
    <tr class="<%=classname%>" EmpID="<%=trim(EmpList.Fields.Item("F_Id").Value)%>" onClick="showDetail(this);showCursorLocation('cursorimg<%=i%>')" style="cursor:hand" onMouseOver="HLItem(this)" onMouseOut="Re(this)"> 
      <td width="5%"  nowrap><div align="center"><img src="images/location.gif" width="16" height="12" style="display:none" id="cursorimg<%=i%>"></div></td>
      <td width="5%"  nowrap><%=trim(EmpList.Fields.Item("F_Id").Value)%></td>
      <td width="11%"  nowrap><%=trim(EmpList.Fields.Item("F_CompanyName").Value)%></td>
      <td width="10%"  nowrap><%=trim(EmpList.Fields.Item("F_Redate").Value)%></td>
      <td width="8%"  nowrap><%=trim(EmpList.Fields.Item("F_City").Value)%></td>
      <td width="20%"  nowrap><%=trim(EmpList.Fields.Item("F_Contect").Value)%></td>
      <td width="19%"  nowrap><%=trim(EmpList.Fields.Item("F_Levels").Value)%></td>
      <td width="16%"  nowrap><button class="button" name=mody onClick="javascript:void window.open('EmpMain_modyNew.asp?id=<%=trim(EmpList.Fields.Item("F_Id").Value)%>','AddNew','width=650,height=380')">修改</button>&nbsp;&nbsp;<%if fncheckupart(1)=true or fncheckupart(2)=true or fncheckupart(3)=true then%><button class="button" name=dell  onclick="javascript:void window.open('EmpMain_delete.asp?id=<%=trim(EmpList.Fields.Item("F_Id").Value)%>','AddNew','width=650,height=380')" >删除</button><%end if%></td>
    </tr>
    <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  EmpList.MoveNext()
Wend
%>
  </table>
</div>
<div align="right">
<table border="0" width="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="50%" class="CaptionS">从第<%=(EmpList_first)%>条到第<%=(EmpList_last)%>条记录,总共<%=(EmpList_total)%>条记录</td>
      <td width="50%" class="CaptionS">
        <table border="0" width="50%" align="right">
          <tr> 
            <td width="23%" align="center"> <a href="<%=MM_moveFirst%>"><img src="First.gif" border=0></a> 
            </td>
            <td width="31%" align="center"> <a href="<%=MM_movePrev%>"><img src="Previous.gif" border=0></a> 
            </td>
            <td width="23%" align="center"> <a href="<%=MM_moveNext%>"><img src="Next.gif" border=0></a> 
            </td>
            <td width="23%" align="center"> <a href="<%=MM_moveLast%>"><img src="Last.gif" border=0></a> 
            </td>
          </tr>
        </table>
        <div align="right"></div></td>  
  </tr>
</table>
</div>
</fieldset>
</body>

</html>
<%
	EmpList.Close()
	Set EmpList = Nothing
%>


⌨️ 快捷键说明

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