?? down_report_client.asp
字號:
<!--#include file="../conn.asp"-->
<!--#include file="../isuser.asp"-->
<!--#include file="../pub_fun.asp"-->
<html>
<HEAD>
<META NAME="Keywords" CONTENT="FastReport"/>
<META NAME="Description" CONTENT="The FastReport report"/>
<LINK href="../css.css" rel="stylesheet" type="text/css" media="all">
<title>客戶信息查詢結果下載</title>
</head>
<body >
<%
''獲取查詢語句
textSql=decrypt(trim(request("sql")))
sql="select distinct client.*,touchman.touchmanname,touchman.touchmansection,touchman.touchmanduty,touchman.touchmanophone,touchman.touchmanmphone,touchman.touchmanemail"
sql=sql&" from client,touchman where (client.clientCreatorID="&session("Session_User")&" or client.clientOpenFlag=1) and touchman.touchmanmain=1 and client.clientid=touchman.touchmanclientid "&textsql
sql=sql&" order by client.clientid "
'創建文件名
strFileName = "r_client_" & GetAutoID() & ".csv"
strFullFileName = server.mappath("../data/" & strFileName) '帶路徑
''創建文件對象
SET objMyFile = Server.Createobject("scripting.filesystemobject")
SET objNewsFile = objMyFile.createtextfile(strFullFileName)
SET objRs = Server.CreateObject("Adodb.RecordSet")
objRs.Open Sql,conn,3
''獲取總的記錄數
intRC = objRs.RecordCount
'寫入標題
strTitle = "客戶資料信息"
objNewsFile.writeline(strTitle)
'利用for循環按照格式寫入每一條紀錄
FOR i=1 TO intRC
strLineString = trim(objRs("clientname"))
objNewsFile.writeline(strLineString)
strLineString = "客戶編碼,"
strLineString = strLineString &trim(objRs("clientid")) & ","
strLineString = strLineString &"省份,"
strLineString = strLineString &trim(objRs("clientprovince"))
objNewsFile.writeline(strLineString)
strLineString = "郵編,"
strLineString = strLineString &trim(objRs("clientmailcode")) & ","
strLineString = strLineString &"城市,"
strLineString = strLineString &trim(objRs("clientcity"))
objNewsFile.writeline(strLineString)
strLineString = "詳細地址,"
strLineString = strLineString &trim(objRs("clientaddress")) & ","
strLineString = strLineString &"主頁,"
strLineString = strLineString &trim(objRs("clienthomepage"))
objNewsFile.writeline(strLineString)
strLineString = "電話,"
strLineString = strLineString &replace(objRs("clientphonenum"),",",";") & ","
strLineString = strLineString &"傳真,"
strLineString = strLineString &replace(objRs("clientfaxnum"),",",";") & ","
objNewsFile.writeline(strLineString)
strLineString = "主要聯系人,"
strLineString = strLineString &objRs("touchmanname") & ","
strLineString = strLineString &"部門,"
strLineString = strLineString &objRs("touchmansection") & ","
objNewsFile.writeline(strLineString)
strLineString = "職務,"
strLineString = strLineString &objRs("touchmanduty") & ","
strLineString = strLineString &"辦公電話,"
strLineString = strLineString & replace(objRs("touchmanophone"),",",";") & ","
objNewsFile.writeline(strLineString)
strLineString = "移動電話,"
strLineString = strLineString &replace(objRs("touchmanmphone"),",",";") & ","
strLineString = strLineString &"電子郵箱,"
strLineString = strLineString & objRs("touchmanemail")
objNewsFile.writeline(strLineString)
objRs.movenext
NEXT
objRs.Close
SET objRs = NOTHING
objNewsFile.close
SET objNewsFile = NOTHING
SET objMyFile = NOTHING
%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" width="380" height="207">
<tr class="CListTTL" >
<td height="29" ><font color = yellow ><b>下載客戶查詢結果數據</b></FONT></td>
</tr>
<tr CLASS=cROW>
<td width="100%" height="177">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="72%" id="AutoNumber2">
<tr align="center" CLASS=cROW>
<td nowrap><a href="../data/<%=strFileName%>" onMouseDown="javascript:if (event.button==1) alert('請用鼠標右鍵點擊鏈接\n選擇目標另存為!')"><font color=blue><strong>下 載</strong></font></a></td>
</tr>
<tr align="center" CLASS=cROW>
<td nowrap><br><br><br><font color = red>說明:用鼠標右鍵點擊“下載”,選擇“目標另存為...”功能</font></td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</center>
</div>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -