📄 down_report_touchman.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")))
'创建文件名
strFileName = "r_touchman_" & 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 textSql,conn,1,3
intRC = objRs.RecordCount
''定义报表的标题
strTitle = "姓名,"
strTitle = strTitle & "所属客户,"
strTitle = strTitle & "部门,"
strTitle = strTitle & "职务,"
strTitle = strTitle & "办公电话,"
strTitle = strTitle & "移动电话,"
strTitle = strTitle & "电子邮箱"
'写入标题
objNewsFile.writeline(strTitle)
'利用for循环写入每一条记录到文件中
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
''所有对象的关闭
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 + -