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

📄 product.asp

📁 这个也是一个功能强大的企业整站的ASP源代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
                    <td align="right"><font color="#000000" class="lineheight">Product Classification</font>:
                      <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
					      <option value="product.asp?CateID=0&CateName=全部产品" selected <%if CateID="0" then response.write "selected"%>>All products</option>
                          <option value="product.asp?CateID=-1&CateName=推荐产品" <%if CateID="-1" then response.write "selected"%>>Recommended products</option>
                          <%set rs_Topic=conn.execute("select * from tenProductCate order by addtime desc")
				          do while not rs_Topic.eof
						    if request("CateID")=cstr(rs_Topic("ID")) then  
						       response.write "<option value='Product.asp?CateID="&rs_Topic("id")&"&CateName="&rs_Topic("Title")&"' selected>"&rs_Topic("Title")&"</option>"
							else
							   response.write "<option value='Product.asp?CateID="&rs_Topic("id")&"&CateName="&rs_Topic("Title")&"'>"&rs_Topic("Title")&"</option>"
							end if
                            rs_Topic.movenext 
			              loop
			              %>
                      </select>                    </tr>
              </table></td>
              </tr>
              <tr>
                <td class="zhengwen"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                <%'----------------------------				     
		PERPAGE =6
		set rs=server.CreateObject("adodb.recordset")		
        if Key<>"" and CateID<>"" then '如果关键和产品类别都有的同时,筛选产品集
          sql="select * from tenProduct where StateFlag=0 and (CateID="&CateID&" or Title like '%"&Key&"%' or Content like '"&Content&"') order by AddTime desc"
		else if Key<>"" then '如果只是关键的时
               sql="select * from tenProduct where StateFlag=0 and (Title like '%"&Key&"%' or Content like '"&Content&"') order by AddTime desc"				              
		     else if CateID="-1" then '推荐产品
                    sql="select * from tenProduct where IsHot=1 and StateFlag=0 order by AddTime desc"
				  else if CateID="-2" then '库存产品
                         sql="select * from tenProduct where IsHot=2 and StateFlag=0 order by AddTime desc"
				       else if CateID="0" then
						      sql="select * from tenProduct where StateFlag=0 order by AddTime desc"				     
			   		        else 
                              sql="select * from tenProduct where CateID="&CateID&" and StateFlag=0 order by AddTime desc"			
						    end if
					    end if
			  	  end if
		  	 end if
		end if
		rs.open sql,conn,1,1
				   
		if not(rs.eof and rs.bof) then
          rs.pagesize = PERPAGE
          if isempty(PageNo) or cstr(PageNo)<"1" then PageNo = 1
		  CurPage=PageNo					  
		  if int(PageNo)>=int(rs.pagecount) then CurPage=cint(rs.pagecount)                      
          rs.absolutepage = CurPage
		  for i = 1 to rs.pagesize
		%>
                <tr>
                  <td><table width="100%" border="0" cellspacing="3" cellpadding="0">
                      <tr>
                        <td width="36%" rowspan="5" align="center"><a href="javascript:newWindow('/English/ShowProduct.asp?ID=<%=rs("ID")%>','product','713','583','')"> </a>
                          <table width="90%"  border="0" cellspacing="0" cellpadding="0">
                            <tr align="left">
                              <td colspan="3"><img src="../product/Images/1.jpg" width="183" height="18"></td>
                            </tr>
                            <tr>
                              <td width="13%" align="left"><img src="../product/images/2.jpg" width="24" height="97"></td>
                              <td width="65%"><table width="80%"  border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td><a href="javascript:newWindow('/English/ShowProduct.asp?ID=<%=rs("ID")%>','product','713','583','')"><img <%if trim(rs("ProductPic"))="" or isnull(rs("ProductPic")) then response.write "src=/UploadFile/default1.gif" else response.write "src=/UploadFile/ProductFile/"&rs("ProductPic")&" width='100'"%> border="0"></a></td>
                                  </tr>
                              </table>                                </td>
                              <td width="22%" align="left"><img src="../product/Images/4.jpg" width="40" height="97"></td>
                            </tr>
                            <tr align="left">
                              <td colspan="3"><img src="../product/Images/5.jpg" width="183" height="28"></td>
                            </tr>
                          </table></td>
                        <td width="27%" height="20" align="right"><font color="#000000"> Product name: </font></td>
                        <td width="37%" class="Guestbook"><%=rs("Title")%></td>
                      </tr>
                      <tr>
                        <td height="20" align="right"><font color="#000000">Product Classification:</font></td>
                        <td class="Guestbook">
                          <% set rs1=conn.execute("select * from tenProductCate where ID="&rs("CateID"))
				   response.write rs1("Title")
				%></td>
                      </tr>
                      <tr>
                        <td height="20" align="right"><font color="#000000">Release time:</font></td>
                        <td class="Guestbook"><%=formatdatetime(rs("AddTime"),2)%></td>
                      </tr>
                      <tr>
                        <td height="20" align="right"><font color="#000000">Download the materials:</font></td>
                        <td class="Guestbook">
                          <% if rs("OtherFile")<>"" then 
				     if session("LoginID")="" then
					   response.write "[<a href='/Member/MemberLogin.asp'>Please log in to download</a>]"
					 else
					   response.write "<a href='/UploadFile/ProductFile/"&rs("OtherFile")&"' target='_blank'>Click download</a>" 
					 end if				     
				   else 
				     response.write "There are no materials temporarily"
				   end if
			    %>                        </td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td align="right"><a href="javascript:newWindow('ShowProduct.asp?ID=<%=rs("ID")%>','culture','713','583','')"><img src="images/arrow_7.gif" width="75" height="18" border="0"></a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                      </tr>
                      <tr>
                        <td height="1" colspan="3" align="center" bgcolor="#cccccc"></td>
                      </tr>
                  </table></td>
                </tr>
                <% rs.movenext
           if rs.eof then
        	 i = i + 1
          	 exit for
           end if
         next %>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td colspan="2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td nowrap><font color="#000000">Page:<b><%=CurPage%></b>/<b><%=rs.pagecount %></b>&nbsp;&nbsp; Amount to<b><%=rs.recordcount %></b> records</font></td>
                        <td align="right" nowrap>
                          <% 
		                 if CurPage = 1 then 
			                response.write " Homepage | Upward | "
		                 else
		                    response.write "<a href='?PageNo=1&Key="&Key&"&CateID="&CateID&"&CateName="&CateName&"'><b> Homepage </b></a> | <a href='?PageNo="&CurPage-1&"&Key="&Key&"&CateID="&CateID&"&CateName="&CateName&"'><b>Upward</b></a>| "
		                 end if 
		  
		                 if  CurPage = rs.pagecount then
			                response.write "Backward | End page  "
		                 else
		 	                response.write "<a href='?PageNo="&CurPage+1&"&Key="&Key&"&CateID="&CateID&"&CateName="&CateName&"'><b>Backward</b> </a>| <a href='?PageNo="&rs.pagecount&"&Key="&Key&"&CateID="&CateID&"&CateName="&CateName&"'><b>End page</b> </a>"
		                 end if
                        %>&nbsp;Jump and turn into:
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
                          <% for i=1 to rs.pagecount 
			                   if cstr(CurPage)=cstr(i) then 
					              response.write "<option value='?PageNo="&i&"&Key="&Key&"&CateID="&CateID&"&CateName="&CateName&"' selected>Page"&i&"</option>"
					           else
					              response.write "<option value='?PageNo="&i&"&Key="&Key&"&CateID="&CateID&"&CateName="&CateName&"'>Page"&i&"</option>"
					           end if
			                 next
			              %>
                       </select></td>
                      </tr>
                  </table></td>
                </tr>
                <%else%>
                <tr>
                  <td  align="center" colspan=5 height="296"><font color="ff0000"><b>There are not this series of products temporarily!</b></font></td>
                </tr>
                <% end if %>
              </table></td>
              </tr>
            </table>          </td>
        </tr></table></td></tr></tbody></table>
<table cellspacing=0 cellpadding=0 width=804 align=center border=0>

    <tr>
      <td width=178><img height=30 src="images/english-bottom.jpg" 
      width=180></td>
      <td align=middle bgcolor=#3196D6><span class=style2>copyright @2005 ChengYi valve all rights reserved.</span></td>
    </tr>
  </tbody>
</table>
</body>
</html>

⌨️ 快捷键说明

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