⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpzs.asp

📁 为中小型企业与欲创业的个人提供一个合适的企业型网站
💻 ASP
字号:
<!--#include file="top.asp"-->
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="Table_01">
	<tr>
	  <td colspan="2" valign="top" background="images/right_06.gif"><!--#include file="Tyi86_Left_Cp.asp" --></td>
		<td width="800" align="right" valign="top" background="images/t_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center"><img src="images/cpzs.gif" width="580" height="33" alt=""></td>
          </tr>
          <tr>
		  <%
dim founderr
founderr=false
if request.querystring("cat_id")<>"" then
  if not isInteger(request.querystring("cat_id")) then
    founderr=true
    Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
  end if
end if
if request("page")<>"" then
  if not isInteger(request("page")) then
    founderr=true
    Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
  end if
end if
if request("keyword")<>"" then
  if instr(request("keyword"),"'")>0 then
    founderr=true
    Response.Write "<script language=javascript>alert('搜索参数非法');javascript:history.back();</script>"
  end if
end if

dim keyword,class_id,colname,totalsoft,Currentpage,totalpages,i
keyword=request("keyword")
cat_id=request("cat_id")
class_id=request("class_id")
colname=request("colname")
sql="SELECT * FROM Product order by soft_id desc"
if cat_id<>"" and class_id="" then
sql="SELECT * FROM Product where soft_catid="&cat_id&" order by soft_id desc"
elseif class_id<>"" and keyword="" then
sql="SELECT * FROM Product where soft_classid="&class_id&" order by soft_id desc"
elseif keyword<>"" and colname<>"0" then
sql="select * from Product where "&colname&" like '%"&keyword&"%' order by soft_id desc"
elseif keyword<>"" and colname="0" then
sql="select * from Product where soft_name like '%"&keyword&"%' or soft_desc like '%"&keyword&"%' order by soft_id desc"
else
sql="SELECT * FROM Product order by soft_id desc"
end if
set rssoft=server.createobject("adodb.recordset")
rssoft.open sql,conn,1,1
%>
            <td align="center" valign="top" background="images/t_05.gif">
			
			<table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
			  <%
dim softperpage
softperpage=12
if not rssoft.eof then
rssoft.movefirst
rssoft.pagesize=softperpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   if currentpage>rssoft.pagecount then
      currentpage=rssoft.pagecount
   end if
else
   currentpage=1
end if
   totalsoft=rssoft.recordcount
   if currentpage<>1 then
       if (currentpage-1)*softperpage<totalsoft then
	       rssoft.move(currentpage-1)*softperpage
		   dim bookmark
		   bookmark=rssoft.bookmark
	   end if
   end if
   if (totalsoft mod softperpage)=0 then
      totalpages=totalsoft\softperpage
   else
      totalpages=totalsoft\softperpage+1
   end if
%>
<%
i=0
do while not rssoft.eof and i<softperpage
%>
                <td><table width="140" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><a href='cp.asp?soft_id=<%=rssoft("soft_id")%>' target='_blank' Title='<%=rssoft("soft_name")%>'><%If rssoft("soft_showpic")<>"" Then%><img src="<%=rssoft("soft_showpic")%>" width="135" height="100" border="0"><%else%><img src="Images/t_p.gif" width="135" height="100" border="0"><%End If%></a></td>
                    </tr>
                    <tr>
                      <td height="19" align="center"><%=left(rssoft("soft_name"),10)%></td>
                    </tr>
                </table></td>
              <%
i=i+1
if i mod 4 = 0 then%>
</tr>
<%end if
%><%
rssoft.movenext
loop
else
if rssoft.eof and rssoft.bof then
%><%end if
end if
%>    		
            </table>
				
              <table width="97%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="68%" height="17" bgcolor="#E8E8E8">&nbsp;共[<font color="#FF6666"><%=totalsoft%></font>]个产品 分[<font color="#FF6666"><%=totalpages%></font>]页</td>
                  <td width="32%" align="right" bgcolor="#E8E8E8">&nbsp;<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=Cpzs.asp?colname="&request("colname")&"&keyword="&request("keyword")&"&page=1&cat_id="&request.querystring("djcat_id")&"&class_id="&request("class_id")&">首页</a> "
response.write "<a href=Cpzs.asp?colname="&request("colname")&"&keyword="&request("keyword")&"&page="&CurrentPage-1&"&cat_id="&request.querystring("djcat_id")&"&class_id="&request("class_id")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=Cpzs.asp?colname="&request("colname")&"&keyword="&request("keyword")&"&page="&CurrentPage+1&"&cat_id="&request.querystring("cat_id")&"&class_id="&request("class_id")
response.write ">下一页</a> <a href=Cpzs.asp?colname="&request("colname")&"&keyword="&request("keyword")&"&page="&totalpages&"&cat_id="&request.querystring("cat_id")&"&class_id="&request("class_id")&">尾页</a>"
end if
%></td>
                </tr>
              </table>
			  
			  <%
rs1.close
set rs1=nothing
rs2.close
set rs2=nothing
%>
            <p>&nbsp;</p></td>
          </tr>
        </table><%
rssoft.close
set rssoft=nothing
%></td>
	</tr>
</table>
<!--#include file="end.asp"-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -