?? down_report_touchman.asp
字號(hào):
<!--#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>聯(lián)系人信息查詢結(jié)果下載</title>
</head>
<body >
<%
''獲取查詢語句
textSql=decrypt(trim(request("sql")))
'創(chuàng)建文件名
strFileName = "r_touchman_" & GetAutoID() & ".csv"
strFullFileName = server.mappath("../data/" & strFileName)
''建立文件對(duì)象
SET objMyFile = Server.Createobject("scripting.filesystemobject")
SET objNewsFile = objMyFile.createtextfile(strFullFileName)
''從數(shù)據(jù)庫中讀出相應(yīng)的數(shù)據(jù)
SET objRs = Server.CreateObject("Adodb.RecordSet")
objRs.Open textSql,conn,1,3
intRC = objRs.RecordCount
''定義報(bào)表的標(biāo)題
strTitle = "姓名,"
strTitle = strTitle & "所屬客戶,"
strTitle = strTitle & "部門,"
strTitle = strTitle & "職務(wù),"
strTitle = strTitle & "辦公電話,"
strTitle = strTitle & "移動(dòng)電話,"
strTitle = strTitle & "電子郵箱"
'寫入標(biāo)題
objNewsFile.writeline(strTitle)
'利用for循環(huán)寫入每一條記錄到文件中
FOR i=1 TO intRC
strLineString = trim(objRs("touchmanname")) & ","
strLineString = strLineString & showclientname(objRs("touchmanclientid")) & ","
strLineString = strLineString & showsection(objRs("touchmansection")) & ","
strLineString = strLineString & objRs("touchmanduty") & ","
strLineString = strLineString & replace(objRs("touchmanophone"),",",";") & ","
strLineString = strLineString & replace(objRs("touchmanmphone"),",",";") & ","
strLineString = strLineString & objRs("touchmanemail")
objNewsFile.writeline(strLineString)
objRs.movenext
NEXT
''所有對(duì)象的關(guān)閉
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>下載聯(lián)系人查詢結(jié)果數(shù)據(jù)</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('請(qǐng)用鼠標(biāo)右鍵點(diǎn)擊鏈接\n選擇目標(biāo)另存為!')"><font color=blue><strong>下 載</strong></font></a></td>
</tr>
<tr align="center" CLASS=cROW>
<td nowrap><br><br><br><font color = red>說明:用鼠標(biāo)右鍵點(diǎn)擊“下載”,選擇“目標(biāo)另存為...”功能</font></td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</center>
</div>
</BODY>
</HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -