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

📄 ensysproduct.asp

📁 冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
                strTemp= strTemp & "<td>"
                strTemp= strTemp & rsProduct("EnMemo") & ""
                strTemp= strTemp & "</a></td>"			
				
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td height=12>"
                strTemp= strTemp & "Product Class:</td>"
                strTemp= strTemp & "<td><a href=EnProduct.asp?EnBigClassName="& rsProduct("EnBigClassName")&">"&rsProduct("EnBigClassName")&"</a> → "
                strTemp= strTemp & "<a href=EnProduct.asp?EnBigClassName=" & rsProduct("EnBigClassName") & "&EnSmallClassName=" & rsProduct("EnSmallClassName") & ">" & rsProduct("EnSmallClassName") & ""
                strTemp= strTemp & "</a></td>"
                strTemp= strTemp & "</tr><tr>" 				

			   
                strTemp= strTemp & "<td height=12>Product Info:</td>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & "<a href=EnProductShow.asp?ID=" & rsProduct("ID") & " target=_blank><img src=Images/arrow_7En.gif border=0></a></td>"
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td colspan=2>"
                strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
                strTemp= strTemp & "<tr>" 
                strTemp= strTemp & "<td width=50% height=12>"
                strTemp= strTemp & "<div align=center></div></td>"
                
				strTemp= strTemp & "<td width=50% height=12>"
                strTemp= strTemp & "<div align=center><input name='Product_Id' type='checkbox'    id='Product_Id' value="&cstr(rsProduct("Product_Id"))&"> Select"
                strTemp= strTemp & "</div></td>"
				
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"
                strTemp= strTemp & "</td>"
                strTemp= strTemp & "</tr><tr>" 
                strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#f0f0f0></td>"
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"
		response.write strTemp
		rsProduct.movenext
		i=i+1
		if i>=MaxPerPage then exit do	
	loop
end sub 


'=================================================
'过程名:ShowSearchTerm
'作  用:显示搜索条件信息
'参  数:无
'=================================================
sub ShowSearchTerm()
	response.write "&nbsp;Product Search&nbsp;&gt;&gt; "
	if EnBigClassName<>"" then
		response.write "<a href='EnProduct.asp?EnBigClassName=" & EnBigClassName & "'>" & EnBigClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
		if EnSmallClassName<>"" then
			response.write "<a href='EnProduct.asp?EnBigClassName=" & EnBigClassName & "&EnSmallClassName=" & EnSmallClassName & "'>" & EnSmallClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
		else
			response.write "All Smallclass&nbsp;&gt;&gt;&nbsp;"
		end if
	end if
	if keyword<>"" then
	  select case strField
		case "Title"
			response.Write "Name include <font color=red>"&keyword&"</font> Products"
		case "Content"
			response.Write "Readme include <font color=red>"&keyword&"</font> Products"
		case else
			response.Write "Name include <font color=red>"&keyword&"</font> Products"
	  end select
	else
	  response.write "&nbsp;All Products"
	end if
end sub

'=================================================
'过程名:SearchResultTotal
'作  用:显示搜索结果总数
'参  数:无
'=================================================
sub SearchResultTotal()
	dim rsTotal,sqlTotal
	sqlTotal="select count(*) from Product where Passed=True "
	if EnBigClassName<>"" then
		sqlTotal=sqlTotal & " and EnBigClassName='" & EnBigClassName & "' "
		if EnSmallClassName<>"" then
			sqlTotal=sqlTotal & " and EnSmallClassName='" & EnSmallClassName & "' "
		end if	
	end if
	if keyword<>"" then
		select case strField
			case "Title"
				sqlTotal=sqlTotal & " and EnTitle like '%" & keyword & "%' "
			case "Content"
				sqlTotal=sqlTotal & " and EnContent like '%" & keyword & "%' "
			case else
				sqlTotal=sqlTotal & " and EnTitle like '%" & keyword & "%' "
		end select
	end if
	Set rsTotal= Server.CreateObject("ADODB.Recordset")
	rsTotal.open sqlTotal,conn,1,1
	if rsTotal.eof and rsTotal.bof then
		totalPut=0
		response.write "Total 0 Product"
	else
		totalPut=rsTotal(0)
		response.Write "Total search " & totalPut & " Products"
	end if
end sub

'=================================================
'过程名:ShowSearchResult
'作  用:分页显示搜索结果
'参  数:无
'=================================================
sub ShowSearchResult()
    if currentpage<1 then
	   	currentpage=1
    end if
	if (currentpage-1)*MaxPerPage>totalput then
		if (totalPut mod MaxPerPage)=0 then
	   		currentpage= totalPut \ MaxPerPage
		else
		   	currentpage= totalPut \ MaxPerPage + 1
		end if
   	end if
	if currentPage=1 then
        sqlSearch="select top " & MaxPerPage	
	else
		sqlSearch="select "
	end if

	sqlSearch=sqlSearch & " * from Product where Passed=True "
	if EnBigClassName<>"" then
		sqlSearch=sqlSearch & " and EnBigClassName='" & EnBigClassName & "' "
		if EnSmallClassName<>"" then
			sqlSearch=sqlSearch & " and EnSmallClassName='" & EnSmallClassName & "' "
		end if	
	end if
	if keyword<>"" then
		select case strField
			case "Title"
				sqlSearch=sqlSearch & " and EnTitle like '%" & keyword & "%' "
			case "Content"
				sqlSearch=sqlSearch & " and EnContent like '%" & keyword & "%' "
			case else
				sqlSearch=sqlSearch & " and EnTitle like '%" & keyword & "%' "
		end select
	end if
	sqlSearch=sqlSearch & " order by ID desc"
	Set rsSearch= Server.CreateObject("ADODB.Recordset")
	rsSearch.open sqlSearch,conn,1,1
 	if rsSearch.eof and rsSearch.bof then 
       		response.write "<p align='center'><br><br>No Search Product</p>" 
   	else 
   		if currentPage=1 then 
       		call SearchResultContent()
   		else 
       		if (currentPage-1)*MaxPerPage<totalPut then 
       			rsSearch.move  (currentPage-1)*MaxPerPage 
       			dim bookmark 
       			bookmark=rsSearch.bookmark 
       			call SearchResultContent()
      		else 
        		currentPage=1 
       			call SearchResultContent()
      		end if 
	   	end if 
   	end if 
   	rsSearch.close 
   	set rsSearch=nothing   
end sub

sub SearchResultContent()
	dim i,strTemp
    i=0
	do while not rsSearch.eof
		strTemp=""		
		strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
                strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td width=25% rowspan=6>"
                strTemp= strTemp & "<div align=center><a href=EnProductShow.asp?ID=" & rsSearch("ID") & ">" 
				
				fileExt=lcase(getFileExtName(rsSearch("DefaultPicUrl")))
				if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
                strTemp= strTemp & "<img border=0 src=" & rsSearch("DefaultPicUrl") & " width=105 height=80>" 
				else
				 if fileext="swf" then
				    strTemp= strTemp & "<object  classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'  codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105' height='84'>"
					strTemp= strTemp &"<param name=movie value='"&rsSearch("DefaultPicUrl")&"'>"
					strTemp= strTemp &"<param name=quality value=high>"
					strTemp= strTemp &"<param name='Play' value='-1'>"
					strTemp= strTemp &"<param name='Loop' value='0'>"
					strTemp= strTemp &"<param name='Menu' value='-1'>"
					strTemp= strTemp &"<param name='wmode' value='transparent'>"
					strTemp= strTemp &"<embed src='"&rsSearch("DefaultPicUrl")&"' width='105' height='84' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed> </object>"												
			   end if
		      end if			 
				 
                strTemp= strTemp & "</a></div></td>"
                strTemp= strTemp & "<td width=18% height=12>"
                strTemp= strTemp & "Product name:</td>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & "<a href=EnProductShow.asp?ID=" & rsSearch("ID") & ">" & rsSearch("EnTitle") & ""
                strTemp= strTemp & "</a></td>"
				
				'strTemp= strTemp & "</tr><tr>" 
                'strTemp= strTemp & "<td width=12% height=12>"
                'strTemp= strTemp & "产品售价:</td>"
                'strTemp= strTemp & "<td>" & rsSearch("Price") & "元</td>"				
				
				strTemp= strTemp & "</tr><tr>"
				strTemp= strTemp & "<td width=18% height=12>"
                strTemp= strTemp & "Product Spec:</td>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & rsSearch("EnSpec") & ""
                strTemp= strTemp & "</a></td>"
				
				strTemp= strTemp & "</tr><tr>"
				strTemp= strTemp & "<td width=18% height=12>"
                strTemp= strTemp & "Product Memo:</td>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & rsSearch("EnMemo") & ""
                strTemp= strTemp & "</a></td>"				
				
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td height=12>"
                strTemp= strTemp & "Product Class:</td>"
                strTemp= strTemp & "<td><a href=EnProduct.asp?EnBigClassName=" & rsSearch("EnBigClassName") & ">" & rsSearch("EnBigClassName") & "</a> → "
                strTemp= strTemp & "<a href=EnProduct.asp?EnBigClassName=" & rsSearch("EnBigClassName") & "&EnSmallClassName=" & rsSearch("EnSmallClassName") & ">" & rsSearch("EnSmallClassName") & ""
                strTemp= strTemp & "</a></td>"
                strTemp= strTemp & "</tr><tr>" 

			   
                strTemp= strTemp & "<td height=12>Product Info:</td>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & "<a href=EnProductShow.asp?ID=" & rsSearch("ID") & "><img src=Images/arrow_7En.gif border=0></a></td>"
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td colspan=2>"
                strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
                strTemp= strTemp & "<tr>" 
                strTemp= strTemp & "<td width=50% height=12>"
                strTemp= strTemp & "<div align=center></div></td>"
                
				strTemp= strTemp & "<td width=50% height=12>"
                strTemp= strTemp & "<div align=center><input name='Product_Id' type='checkbox'    id='Product_Id' value="&cstr(rsSearch("Product_Id"))&"> Select"
                strTemp= strTemp & "</div></td>"
				
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"
                strTemp= strTemp & "</td>"
                strTemp= strTemp & "</tr><tr>" 
                strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#f0f0f0></td>"
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"
		response.write strTemp
		rsSearch.movenext
		i=i+1
		if i>=MaxPerPage then exit do	
	loop
end sub 
'=================================================
'过程名:ShowProduct 以纯图片排列方式显示,如删除则只显示竖列图片+文字
'=================================================
sub ShowProduct(TitleLen)
	if TitleLen<0 or TitleLen>200 then
		TitleLen=50
	end if
    if currentpage<1 then
	   	currentpage=1
    end if
	if (currentpage-1)*MaxPerPage>totalput then
		if (totalPut mod MaxPerPage)=0 then
	   		currentpage= totalPut \ MaxPerPage
		else
		   	currentpage= totalPut \ MaxPerPage + 1
		end if
   	end if
	if currentPage=1 then
        sqlProduct="select top " & MaxPerPage	
	else
		sqlProduct="select "
	end if

	sqlProduct=sqlProduct & " ID,Product_Id,EnBigClassName,EnSmallClassName,IncludePic,EnTitle,Price,Spec,Unit,Memo,DefaultPicUrl,UpdateTime,Hits from Product where Passed=True "
	
	if EnBigClassName<>"" then
		sqlProduct=sqlProduct & " and EnBigClassName='" & EnBigClassName & "' "
		if EnSmallClassName<>"" then
			sqlProduct=sqlProduct & " and EnSmallClassName='" & EnSmallClassName & "' "
		end if
	end if
	sqlProduct=sqlProduct & " order by UpdateTime desc"
	Set rsProduct= Server.CreateObject("ADODB.Recordset")
	rsProduct.open sqlProduct,conn,1,1
	if rsProduct.bof and  rsProduct.eof then
		response.Write("<br><li>没有任何产品</li>")
	else
		if currentPage=1 then
			call ProductContent(TitleLen)
		else
			if (currentPage-1)*MaxPerPage<totalPut then

⌨️ 快捷键说明

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