通盈企业全站系统 v2.12

源代码在线查看: cpzs.asp

软件大小: 755 K
上传用户: xukejia
关键词: 2.12
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
					
					  
						
				          
				            
				          
				          
						  				dim founderr
				founderr=false
				if request.querystring("cat_id")"" then
				  if not isInteger(request.querystring("cat_id")) then
				    founderr=true
				    Response.Write "alert('参数非法');javascript:history.back();"
				  end if
				end if
				if request("page")"" then
				  if not isInteger(request("page")) then
				    founderr=true
				    Response.Write "alert('参数非法');javascript:history.back();"
				  end if
				end if
				if request("keyword")"" then
				  if instr(request("keyword"),"'")>0 then
				    founderr=true
				    Response.Write "alert('搜索参数非法');javascript:history.back();"
				  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
				%>
				            
							
							
				              
							  				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 currentpage1 then
				       if (currentpage-1)*softperpage					       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				%>
				                
				                    
				                      
				                    
				                    
				                      
				                    
				                
				              				i=i+1
				if i mod 4 = 0 then%>
				
								%>				rssoft.movenext
				loop
				else
				if rssoft.eof and rssoft.bof then
				%>				end if
				%>    		
				            
								
				              
				                
				                   共[]个产品 分[]页
				                   				if CurrentPage				response.write "首页 上一页 "
				else
				response.write "首页 "
				response.write "上一页 "
				end if
				if totalpages-currentpage				response.write "下一页 尾页"
				else
				response.write "				response.write ">下一页 尾页"
				end if
				%>
				                
				              
							  
							  				rs1.close
				set rs1=nothing
				rs2.close
				set rs2=nothing
				%>
				             
				          
				        				rssoft.close
				set rssoft=nothing
				%>
					
				
				
				
							

相关资源