📄 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 + -