?? report_touchman.asp
字號:
<!--#INCLUDE FILE="../conn.asp"-->
<!--#INCLUDE FILE="../isuser.asp"-->
<!--#include file="../pub_fun.asp"-->
<META NAME="Keywords" CONTENT="FastReport"/>
<META NAME="Description" CONTENT="The FastReport report"/>
<LINK href="../css.css" rel="stylesheet" type="text/css" media="all">
<HEAD>
<TITLE>聯系人報表</TITLE></head>
<script language="VBScript">
sub print_onclick(id)
fm1.typeid.value=id
fm1.txturl.value="show"
fm1.submit
end sub
sub down_onclick(id)
fm1.typeid.value=id
fm1.txturl.value="down"
fm1.submit
end sub
</script>
<%
if request("typeid")<>"" and request("txturl")<>"" then
textsql="select * from touchman where TouchmanCreatorID="&session("Session_User")&" or TouchmanOpenFlag=1 "
''根據類型組合成相應的查詢語句
if request("typeid")=1 then
if request("s_section")<>"0" then
textsql=textsql & " and TouchmanSection='"&trim(request("s_section"))&"'"
end if
if request("s_duty")<>"0" then
textsql=textsql & " and touchmanduty='"&trim(request("s_duty"))&"'"
end if
if request("s_operator")<>"0" then
textsql=textsql & " and TouchmanCreatorID="&trim(request("s_operator"))
end if
end if
if request("typeid")=2 then
if trim(request("txtkeyword"))<>"" then
if request("key_kind")="touchmanclientid" then
textsql=textsql & " and "& request("key_kind")& " in (select clientid from client where clientname like '%"& CheckStrInput(trim(request("txtkeyword")))&"%' )"
else
textsql=textsql & " and "& request("key_kind") &" like '%"&CheckStrInput(trim(request("txtkeyword")))&"%'"
end if
end if
end if
textsql=textsql & "order by TouchmanID desc"
''查詢語句加密
textsql=encrypt(textsql)
''根據操作顯示相應的頁面
if trim(request("txturl"))="show" then
%>
<script language="javaScript">
window.open("show_report_touchman.asp?sql=<%=textsql%>","show","resizable,scrollbars=no,dependent,status=yes,width=725,height=680");
</script>
<%
else
%>
<script language="javaScript">
window.open("down_report_touchman.asp?sql=<%=textsql%>","down","resizable,scrollbars=no,dependent,status=yes,width=400,height=240");
</script>
<%
end if
end if
%>
<body >
<form method="post" name="fm1" >
<input type="hidden" name="typeid">
<input type="hidden" name="txturl">
<table width="751" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><div align="right">
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2">
<tr>
<td width="180" bgcolor="#566CDB"><font color="#FFFFFF"><img src="../images/DispStation.gif">報表-聯系人報表
</font></td>
<td width="300"></td>
<td align="right"><input onclick="javascript:location.href='../menu.asp';" name="BackButton" type="button" class="button_all" value="返回"></td>
</tr>
</table>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="middle" bgcolor="#FFFFFF"><table width="96%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><fieldset>
<legend>范圍選擇</legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20%"><div align="right">部門: </div>
<div align="right"></div></td>
<td width="80%">
<select name="s_section" class=text120 >
<option value="0" selected >全部</option>
<%
set rs_s = server.createobject("adodb.recordset")
sql_s= "select distinct TouchmanSection from touchman "
rs_s.open sql_s,conn,3
if not rs_s.eof then
for i=1 to rs_s.recordcount
%>
<option value=<%=rs_s("TouchmanSection")%>> <%=rs_s("TouchmanSection")%></option>
<%
rs_s.movenext
next
end if
set rs_s=nothing
%>
</select>
</td>
</tr>
<tr>
<td><div align="right">職務: </div>
<div align="right"></div></td>
<td>
<select name="s_duty" class=text120>
<option value="0" selected >全部</option>
<%
set rs_s = server.createobject("adodb.recordset")
sql_s= "select distinct touchmanduty from touchman "
rs_s.open sql_s,conn,3
if not rs_s.eof then
for i=1 to rs_s.recordcount
%>
<option value="<%=rs_s("touchmanduty")%>"> <%=rs_s("touchmanduty")%></option>
<%
rs_s.movenext
next
end if
set rs_s=nothing
%>
</select>
</td>
</tr>
<tr>
<td><div align="right">操作者: </div>
<div align="right"></div></td>
<td><select name="s_operator" class=text120 >
<option value="0" selected >全部</option>
<%
set rs_s = server.createobject("adodb.recordset")
sql_s= "select distinct username,userid from [user] order by userid "
rs_s.open sql_s,conn,3
if not rs_s.eof then
for i=1 to rs_s.recordcount
%>
<option value=<%=rs_s("userid")%>> <%=rs_s("username")%></option>
<%
rs_s.movenext
next
end if
set rs_s=nothing
%>
</select>
</td>
</tr>
</table>
<br>
<br>
</fieldset></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<table width="100%">
<tr>
<td width="80%"> <div align="right">
<input type="button" name="Button" value="下載結果" class="button_all" onClick="down_onclick(1)"
style="width:100px"></div></td>
<td ><div align="right">
<input type="button" name="Button" value="打印報表" class="button_all" onClick="print_onclick(1)"
style="width:100px">
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="middle" bgcolor="#FFFFFF"><table width="96%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><fieldset>
<legend>模糊查詢</legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20%"><div align="right">關鍵字: </div>
</td>
<td width="30%"><input type="text" name="txtkeyword"></td>
<td width="50%" >
<select name="key_kind" class=text120>
<option value="touchmanclientid" selected >所屬客戶</option>
<option value="touchmanophone"> 辦公電話</option>
<option value="touchmanaddress"> 詳細地址</option>
</select></td>
</tr>
</table>
<br>
<br>
</fieldset></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<table width="100%">
<tr>
<td width="80%"> <div align="right">
<input type="button" name="Button" value="下載結果" class="button_all" onClick="down_onclick(2)"
style="width:100px"></div></td>
<td ><div align="right">
<input type="button" name="Button" value="打印報表" class="button_all" onClick="print_onclick(2)"
style="width:100px">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</form>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -