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

📄 empmain_yes_list.asp

📁 ASP经典模块开发大全带源码客户信息管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
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

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links

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 the page has a repeated region, remove 'offset' from the maintained parameters
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

' set the strings for the move to links
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">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<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 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 fnDoDelete(id){
if(confirm("您确认要删除该用户?")){
		window.location = "EmpMain_delete.asp?id="+id;
	}
	}
function fnRedirect(obj){
  window.location= obj.value
}
</script>
</head>

<body bgcolor="#EAF4FF" class="body">
<fieldset class="fiedset">
<legend><font size="2">
<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)"  checked>
已购买客户 

<input name="Emplist" type="radio" onclick="fnRedirect(this)" value="EmpMain_list.asp">
客户列表</font>




</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%"><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 width="16%"> </td>
    <td width="17%">
      <p align="right"><font size="2"></font></td>
    <td width="21%"><font size="2">&nbsp;
         </font></td>
    <td width="23%" align="center"><font size="2">&nbsp;
       
        </font></td>
        <td width="7%"> 
    </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><font size="2">客户编号</font></td>
      <td width="11%" align="center" class="listTitle" nowrap><font size="2">联系人</font></td>
      <td width="10%" align="center" class="listTitle" nowrap><font size="2">最近跟踪</font></td>
      <td width="8%" align="center" class="listTitle" nowrap><font size="2">地区</font></td>
      <td width="20%" align="center" class="listTitle" nowrap><font size="2">公司名称</font></td>
      <td width="19%" align="center" class="listTitle" nowrap><font size="2">客户等级</font></td>
      <td width="16%" align="center" class="listTitle" nowrap><font size="2">操作</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("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("id").Value)%></td>
      <td width="11%"  nowrap><%=trim(EmpList.Fields.Item("联系人").Value)%></td>
      <td width="10%"  nowrap><%=trim(EmpList.Fields.Item("redate").Value)%></td>
      <td width="8%"  nowrap><%=trim(EmpList.Fields.Item("城市").Value)%></td>
      <td width="20%"  nowrap><%=trim(EmpList.Fields.Item("公司名称").Value)%></td>
      <td width="19%"  nowrap><%=trim(EmpList.Fields.Item("客户等级").Value)%></td>
      <td width="16%"  nowrap><button class="button" name=mody onclick="javascript:void window.open('EmpMain_modyNew.asp?id=<%=trim(EmpList.Fields.Item("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("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%"> <font size="2">从第<%=(EmpList_first)%>条到第<%=(EmpList_last)%>条记录,总共<%=(EmpList_total)%>条记录</font></td>
      <td width="50%"><span style="mso-char-type: symbol; mso-symbol-font-family: Webdings; mso-bidi-font-size: 12.0pt; font-family: Webdings; mso-ascii-font-family: Times New Roman; mso-fareast-font-family: 宋体; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; color: blue; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US"></span> 
        <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>
<%


'excel

Class ExcelGen 
Private objSpreadsheet 
Private iColOffset 

Private iRowOffset 
Sub Class_Initialize() 
Set objSpreadsheet = Server.CreateObject("OWC.Spreadsheet") 
iRowOffset = 2 
iColOffset = 2 
End Sub 

Sub Class_Terminate() 
Set objSpreadsheet = Nothing 'Clean up 
End Sub 

Public Property Let ColumnOffset(iColOff) 
If iColOff > 0 then 
iColOffset = iColOff 
Else 
iColOffset = 2 
End If 
End Property 

Public Property Let RowOffset(iRowOff) 
If iRowOff > 0 then 
iRowOffset = iRowOff 
Else 
iRowOffset = 2 
End If 
End Property
 Sub GenerateWorksheet(EmpList) 
'Populates the Excel worksheet based on a Recordset's contents 
'Start by displaying the titles 
If EmpList.EOF then Exit Sub 
Dim objField, iCol, iRow 
iCol = iColOffset 
iRow = iRowOffset 
For Each objField in EmpList.Fields 
objSpreadsheet.Cells(iRow, iCol).Value =objField.Name 
objSpreadsheet.Columns(iCol).AutoFitColumns 
'设置Excel表里的字体 
objSpreadsheet.Cells(iRow, iCol).Font.Bold = True 
objSpreadsheet.Cells(iRow, iCol).Font.Italic = False 
objSpreadsheet.Cells(iRow, iCol).Font.Size = 10 
objSpreadsheet.Cells(iRow, iCol).Halignment = 2 '居中 
iCol = iCol + 1 
Next 'objField 
'Display all of the data 
Do While Not EmpList.EOF 
iRow = iRow + 1 
iCol = iColOffset 

'For Each objField in EmpList.Fields
'If IsNull(objField.Value) then 
'objSpreadsheet.Cells(iRow, iCol).Value = "" 
'Else 
objSpreadsheet.Cells(iRow, 1).Value =EmpList.Fields.Item("id").Value'objField.value 
objSpreadsheet.Cells(iRow, 2).Value =EmpList.Fields.Item("省份").Value'objField.value 
objSpreadsheet.Cells(iRow, 3).Value =EmpList.Fields.Item("联系人").Value'objField.value 
objSpreadsheet.Cells(iRow, 4).Value =EmpList.Fields.Item("公司名称").Value'objField.value 
objSpreadsheet.Cells(iRow, 5).Value =EmpList.Fields.Item("职务").Value'objField.value 
objSpreadsheet.Cells(iRow, 6).Value =EmpList.Fields.Item("联系电话").Value'objField.value 
objSpreadsheet.Cells(iRow, 7).Value =EmpList.Fields.Item("客户等级").Value'objField.value 

objSpreadsheet.Columns(iCol).AutoFitColumns 
objSpreadsheet.Cells(iRow, iCol).Font.Bold = False 
objSpreadsheet.Cells(iRow, iCol).Font.Italic = False 
objSpreadsheet.Cells(iRow, iCol).Font.Size = 10 
'End If 
iCol = iCol + 1 
'Next 'objField 
EmpList.MoveNext 
Loop 
End Sub 
Function SaveWorksheet(strFileName) 

'Save the worksheet to a specified filename 
On Error Resume Next 
Call objSpreadsheet.ActiveSheet.Export(strFileName, 0) 
SaveWorksheet = (Err.Number = 0) 
End Function 
End Class

%>

⌨️ 快捷键说明

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