?? empmain_list.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/EmpMain.asp" -->
<!--#include file="EmpMain_CheckRight.asp"-->
<%
call fnCheckRight()
Dim EmpList__MMColParam
EmpList__MMColParam = "1"
If (Request("SearchWord") <> "") Then
EmpList__MMColParam = Request("SearchWord")
End If
%>
<%
set uP=server.createobject("adodb.recordset")
uP.Activeconnection=MM_EmpMain_string
uP.source="select * from T_User where F_Id="&request.cookies("ID")&" and F_IsPass=true"
uP.cursortype=0
uP.cursorlocation=2
uP.locktype=1
uP.open()
dim upstr
if uP.eof then
upstr=""
else
upstr1=uP("F_UserName")
end if
up.close
set up=nothing
if fncheckupart(1)=true or fncheckupart(2)=true or fncheckupart(3)=true then
else
if IDstring = "" then
upstr=split(upstr1,",")
for i=0 to ubound(upstr)
Set search = Server.CreateObject("ADODB.Recordset")
search.ActiveConnection = MM_EmpMain_STRING
search.Source = "SELECT F_Id FROM T_Client where F_EClerk='"&upstr(i)&"'"
search.CursorType = 0
search.CursorLocation = 2
search.LockType = 1
search.Open()
search_numRows = 0
if search.eof then
else
while not search.eof
IDstring = IDstring & search("F_Id") & ","
search.movenext
wend
end if
next
end if
end if
if IDstring ="" then
IDstring = "0"
else
IDstring=IDstring
end if
%>
<%
Dim EmpList
Dim EmpList_numRows
Set EmpList = Server.CreateObject("ADODB.Recordset")
EmpList.ActiveConnection = MM_EmpMain_STRING
if fncheckupart(1)=true or fncheckupart(2)=true or fncheckupart(3)=true then
if trim(request("searchWord")) <> "" then
EmpList.Source = "SELECT F_Id, F_Redate,F_City,F_Contect, F_CompanyName, F_Levels,F_Tel FROM T_Client WHERE F_IsVerify='1' and "+request("searchField")+" like '%" + Replace(EmpList__MMColParam, "'", "''") + "%'"
else
EmpList.Source = "SELECT F_Id, F_Redate,F_City,F_Contect, F_CompanyName, F_Levels,F_Tel FROM T_Client where F_IsVerify='1' order by F_Id desc"
end if
elseif IDstring <> "" then
EmpList.Source = "SELECT F_Id, F_Redate,F_City,F_Contect, F_CompanyName, F_Levels,F_Tel FROM T_Client where F_Id in ("&IDstring&") and F_IsVerify='1' order by F_Id desc"
end if
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 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" type="radio" onClick="fnRedirect(this)" value="EmpMain_no_list.asp" >
前期客戶
<input name="paylist" type="radio" onClick="fnRedirect(this)" value="EmpMain_Pay_list.asp">
中期客戶
<input name="yesllist" type="radio" onClick="fnRedirect(this)" value="EmpMain_yes_list.asp" >
后期客戶
<input name="Emplist" type="radio" onClick="fnRedirect(this)" value="EmpMain_list.asp" checked="checked">
客戶列表</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> </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>最近聯(lián)系</td>
<td width="8%" align="center" class="listTitle" nowrap>省市</td>
<td width="20%" align="center" class="listTitle" nowrap>聯(lián)系人</td>
<td width="19%" align="center" class="listTitle" nowrap>客戶等級</td>
<td width="16%" align="center" class="listTitle" nowrap>操作</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=600')">修改</button> <%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=600')" >刪除</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 + -