📄 print_info.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="cs_conn.inc.asp"-->
<%
if not session("userClass")>=1 then
response.redirect "login.asp"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/allsty.css" rel="stylesheet" type="text/css">
<title>简单企业打印模式</title>
<style type="text/css">
<!--
.printfontsty {
font-size: 16px;
line-height: 20px;
font-weight: bold;
color: #000000;
text-decoration: none;
}
.printtdsty {
border: 1px solid #666666;
}
.codenumsty {
font-family: "Verdana", "Arial";
font-size: 16px;
font-weight: bold;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" style="border-collapse: collapse">
<tr>
<td width="100%" valign="top">
<%
dim rs,sql
dim corp_calling '保留所选的类的所有子类
dim page
dim maxPerPage '每页显示的 数
dim num_row '每行显示的 个数
dim rows '显示的产品行数
num_row=2 '列数
rows=6 '行数
maxperpage=num_row*rows
marketKeyword=Request("marketKeyword")
corp_calling=cint(Request("corp_calling"))
'function get_corp_calling(i) ' 搜索子类
' dim rs,sql
'set rs=server.createObject("adodb.recordset")
'sql="select * from calling_info where corp_calling="&i
'rs.open sql,conn,1,1
' do while not rs.eof
' corp_calling=corp_calling&","&rs("id") '&rs("name")
' call get_corp_calling(rs("id"))
' rs.movenext
'loop
'end function
'corp_calling=corp_calling
'CALL get_corp_calling(corp_calling) '得到所有属于该类的子类
'response.write corp_calling
'response.End
page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="print_info.asp?corp_calling="&corp_calling&"&marketKeyword="&marketKeyword
session("oldUrl")=thisUrl&"&page="&page
set rs=server.createobject("adodb.recordset")
sql="select * from corp_info where 1=1"
if not (marketKeyword="" or isempty(marketKeyword) ) then
sql=sql&" and name & CorpName & corp_province & corp_city & corp_calling & corp_address like '%"&marketKeyword&"%'"
'搜索类查询,查询所有的企业名称,地址,省份,行业等
end if
if corp_calling>0 then
sql=sql&" and calling_info in ("&corp_calling&")"
end if
sql=sql&" order by id desc"
'response.write sql
'response.End
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
%>
<script language=Javascript>
<!--
function onChange(i){
childSort=document.all("child" + i);
//theTd=document.all("td" + i);
if(childSort.style.display=="none"){
// theTd.bgcolor="#ffffff";
childSort.style.display="";}
else{
// theTd.bgcolor="#000000";
childSort.style.display="none";}
}
function jumpTo(i){
if(i==1){
this.document.location="<%=thisUrl%>";}
if(i==2){
this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}
//-->
</script>
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<%
j=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not (rs.eof or err)
if (j mod num_row)=1 then
%>
<tr>
<td colspan="<%=(num_row*2-1)%>"> <TABLE align=center background="images/global.gif" border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD><IMG height=1 src="images/spacer.gif" width=1 ></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<%
response.write "<tr>"
end if
%>
<td width="<%=(100/num_row)%>%" align=center class="printtdsty">
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="95"> <div align="center"><a href="productShow.asp?id=<%=rs("id")%>" title="点击查看具体信息">
</a></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="codenumsty"><%=rs("post_code")%></td>
</tr>
<tr>
<td class="printfontsty"> <%=rs("corp_address")%></td>
</tr>
<tr>
<td align="center" class="printfontsty"><%=rs("CorpName")%></td>
</tr>
<tr>
<td align="center"><span class="printfontsty">
<%
'=rs("corp_linkman")
if rs("corp_linkman")="" then
response.Write("<font color=#666666>负责人</font>")
else
response.Write(rs("corp_linkman"))
end if
%></span>
(收)</td>
</tr>
</table> </td>
</tr>
</table></td>
<%
if (j mod num_row)=0 then
response.write "</tr>"
else %>
<TD background="images/point.gif" width=1><IMG
height=1 src="images/spacer.gif" width=1></TD>
<%
end if
j=j+1
if j>maxperpage then exit do
rs.moveNext
loop
dim k
k=(j-1) mod num_row
' response.write j
' response.write "k="&k
if not (k=0) then
response.write "<td colspan="&(num_row-k)&" width="&(cint(100/num_row)*(num_row-k))&"> </td>"
response.write "</tr>"
end if
%>
<tr>
<td colspan="<%=(num_row*2-1)%>"> <TABLE align=center background="images/global.gif" border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD><IMG height=1 src="images/spacer.gif" width=1></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
</table>
<br> <div align="right">共<%=rs.recordCount%>项 第<%=page%>/<%=rs.pageCount%>页
<%if page>1 then%>
<input type="button" name="Submit3" value="|<<" title="首页" onClick="Javascript:jumpTo(1)">
<input type="button" name="Submit4" value=" < " title="上页" onClick="Javascript:jumpTo(2)">
<%else%>
<input type="button" name="Submit32" value="|<<" disabled>
<input type="button" name="Submit4" value=" < " disabled>
<%end if
if rs.recordCount>page*maxPerPage then%>
<input type="button" name="Submit52" value=" > " title="下页" onClick="Javascript:jumpTo(3)">
<input type="button" name="Submit6" value=">>|" title="尾页" onClick="Javascript:jumpTo(4)">
<%else%>
<input type="button" name="Submit52" value=" > " disabled>
<input type="button" name="Submit6" value=">>|" disabled>
<%end if%>
</div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><a href="http://www.crescent.net.cn/">新月网络工作室</a> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -