www.gusucode.com > 深度梦想整站系统(asp) 1.14.02源码程序 > include/Tag.Product.asp

    <%
'┌──────────────────── 深度空间 深度学习 ──┐
'│过程名:getHTML_IndexProductCommend
'│作  用:显示对应分类的文章列表 {$article(2,8)}公告                
'│参  数:
'│说  明:需在文章头部包含 此过程自动添加 	
'│日  期:2010-3-2
'└──────────────────── www.deepstudy.cn ──┘
function getHTML_IndexProductCommend()
	dim sql,rsProduct,strHTML : strHTML=""
	
	'strHTML = strHTML & "<div  class=""content"">"
    sql="select * from deep_Product where fisView=1 and fisCommend=1 and   fisDeleted=0 order by fOrderID"
	
	set rsProduct=conn.execute(sql)
	if (rsProduct.eof and rsProduct.bof) then
	  strHTML = strHTML & "没有推荐产品"
	else
	  while (not rsProduct.eof)
		strHTML = strHTML &	"<dl>"
		strHTML = strHTML &"<dt><a href='product/product.asp?id="&rsProduct("fid")&"' target='_blank' title='"&rsProduct("fproductIntro")&"' "
		if (trim(rsProduct("fproductPic")<>"")) then
			strHTML = strHTML & "style='background-image:url(product/upLoadFile/product/"&rsProduct("fproductPic")&");'"
        end if
        strHTML = strHTML & "></a></dt>"
			  strHTML = strHTML & "<dd><a href='product/product.asp?id="&rsProduct("fid")&"' target='_blank' title='"&rsProduct("fproductIntro")&"'>" & rsProduct("fproductName")&"</a></dd>"
			  strHTML = strHTML &"</dl> "
			  
				  rsProduct.moveNext
			  wend
		   end if
		   rsProduct.close
		   set rsProduct=nothing
		  
		  
	 'strHTML = strHTML & "</div>"

	getHTML_IndexProductCommend=strHTML
end function


'┌──────────────────── 深度空间 深度学习 ──┐
'│过程名:网站产品分类树
'│作  用:定义 信息常量,方便调用                    
'│参  数:无
'│说  明:需在文章头部包含 此过程自动添加 	
'│日  期:2008/12/4
'└──────────────────── www.DeepTeach.com ──┘
function getHTML_productClassTree()
	dim sql,rsProduct,strHTML : strHTML=""

     strHTML = strHTML & "<ul id=""productClass"">"

	sql_productClass="select fclass_id,ftip,fclassName from deep_ProductClass where fisView=1 order by fOrderID,fclass_id"
	set rsProductClass=conn.execute(sql_productClass)
	if (rsProductClass.eof and rsProductClass.bof) then
		strHTML = strHTML & ("没有分类!!")
	else
		while (not rsProductClass.eof)
			strHTML = strHTML & "<li><a href='"&projectRootPath&"product/productClass.asp?id="&rsProductClass("fclass_id")&"' target=""_blank"" title='"&rsProductClass("ftip")&"'>"&rsProductClass("fclassName")&"</a></li>"
			rsProductClass.moveNext
		wend
	end if
	rsProductClass.close
	set rsProductClass=nothing

    strHTML = strHTML & "</ul>"

            
	getHTML_productClassTree=strHTML
end function


'┌──────────────────── 深度空间 深度学习 ──┐
'│过程名:getHTML_productClass
'│作  用:对应分类 子类的文章列表                  
'│参  数:iPlace 显示位置 ,topCount 显示条数 css1 css2  kuai 块名 列 每列 个数
'│说  明:需在文章头部包含 此过程自动添加 	
'│日  期:2009-6-27
'└──────────────────── www.deepstudy.cn ──┘
function getHTML_productClass(class_ID,topCount,css1,css2,kuai,lie)
	dim sql,sql2,rs,rs2,strHTML : strHTML=""
	dim ge
	sql="select fclass_ID,ftip,fclassName from deep_ProductClass where fisView=1 and fparentID=0 and fclass_ID="&class_ID&" order by forderId,fclass_ID"	
	set rs=conn.execute(sql)
	if(rs.eof and rs.bof)then
		'
	else
		'kuai=0
		ge=0
	   while(not rs.eof)
		   kuai=kuai+1
		   if (kuai>3)then
		   	kuai=0
		   end if
		   
		   strHTML=strHTML&"<div class='"&css1&" bg-t-"&kuai&"'>"
			strHTML=strHTML&"<div class='"&css1&" bg-t-"&kuai&"-1'>"&rs("fclassName")&"</div>"
			strHTML=strHTML&"<div class='"&css1&" dl-d'>"
			
			  sql2="select fclass_ID,ftip,fclassName from deep_ProductClass where fisView=1 and fparentID="&rs("fclass_ID")&" order by forderId,fclass_ID"
			  set rs2=conn.execute(sql2)
			  if(rs2.eof and rs2.bof)then
			  else
				  while(not rs2.eof)
					  ge=ge+1
					  if ((ge mod lie)=0) then
						  strHTML=strHTML&"<div class='"&css2&" last'>"					  
					  else
						  strHTML=strHTML&"<div class='"&css2&"'>"
					  end if
						'strHTML=strHTML&"<dl>"
						  'strHTML=strHTML&"<dt>"&rs2("fclassName")&"</dt>"
						  'strHTML=strHTML&"<dd>JSP编程JSP编程</dd>"
						'strHTML=strHTML&"</dl>"

						strHTML = strHTML & "<dl>"
						strHTML = strHTML & "<dt><a href='productClass.asp?id="& rs2("fclass_ID") &"' target=""_blank"" title='"& rs2("ftip")&"'>"& rs2("fclassName") &"</a></dt>"
						strHTML = strHTML & "<dd><ul>"
		
							'文章列表 top 8 
							sql_article="select top "&topCount&" fid,fclass_ID,fproductName,fproductPic,fproductExplain from deep_Product where fisDeleted=0 and fisView=1 and fclass_ID="&rs2("fclass_ID")&" order by fisOnTop desc,fUpdateTime desc,fid desc"
							
							set rsProduct=conn.execute(sql_article)
							if (rsProduct.eof and rsProduct.bof) then
								'response.Write("没有对应内容")
								strHTML = strHTML & "没有对应内容"
							else
								while (not rsProduct.eof)
									strHTML = strHTML & "<li class='ellipsis'>"
									'if(rsProduct("fproductPic")<>"")then
										'strHTML=strHTML& "<span class='cRed'>(图文)</span>"
									'end if
									strHTML = strHTML & "<a href='product.asp?id="& rsProduct("fid") &"' target='_blank' title='"& rsProduct("fproductName") &vbcrlf& "'>"& rsProduct("fproductName")&"</a></li>"

		
									rsProduct.MoveNext
								wend
							end if
							rsProduct.close
							set rsProduct=nothing
		
							strHTML = strHTML & "<li class=""more""><a href='productClass.asp?id="& rs2("fclass_ID")&"' target='_blank' title='点击查看更多["&rs2("fclassName") &"]'>更多..</a></li>"
							strHTML = strHTML & "</ul></dd></dl>"

					  strHTML=strHTML&"</div>"
				  rs2.moveNext
				  wend
			  end if
			  rs2.close
			  set rs2=nothing
			  
			strHTML=strHTML&"</div>"
		  strHTML=strHTML&"</div>"
	  rs.moveNext
	  wend
	end if
	rs.close
	set rs=nothing
	getHTML_productClass=strHTML
end function
'┌──────────────────── 深度空间 深度学习 ──┐
'│过程名:getHTML_productClass
'│作  用:对应分类 子类的文章列表                  
'│参  数:class_ID 对应分类id iPageSize 每页文章列表数
'│说  明:需在文章头部包含 此过程自动添加 	
'│日  期:2009-6-27
'└──────────────────── www.deepstudy.cn ──┘
function getHTML_productClassList(class_ID,iPageSize)
	dim sql,sql2,rs,rs2,pSize,strHTML : strHTML=""
	dim ge
	sql="select fclass_ID,ftip,fclassName from deep_ProductClass where fisView=1 and fclass_ID="&class_ID&" order by forderId,fclass_ID"	
	set rs=conn.execute(sql)
	if(rs.eof and rs.bof)then
		'
	else
		
						strHTML = strHTML & "<dl class='dl-countent'>"
						strHTML = strHTML & "<dt>"& rs("fclassName") &"</dt>"
						strHTML = strHTML & "<dd>"
		
							'文章列表 top 8
							'--- 1 分页初始化 -----
							Dim oPageMsSQL
							Set oPageMsSQL=new Deep_Page
								oPageMsSQL.pageSize=iPageSize	 '定义每页显示记录数 默认10条
								oPageMsSQL.getConnection(conn)
									'当前页
								if (Request.QueryString("page") <>"") then
									oPageMsSQL.currentPage=CInt(Request.QueryString("page"))
								End if
							
								'sql="select * from tArticle"
								'PageSQL(  tableName,  dataKeyField,  wordField,  whereCondition,  orderByField)
							sql_article=oPageMsSQL.PageSQL(   "deep_Product", "fid", "fid,fclass_ID,fproductName,fproductPic,fproductExplain","fisDeleted=0 and fisView=1 and fclass_ID="&rs("fclass_ID") ,"fisOnTop desc,fUpdateTime desc,fid desc")
							'-----1 end------

							Set rsProduct=conn.execute(sql_article)

							'set rsProduct=server.CreateObject("adoDb.recordSet")
							'sql_article="select fid,fTitle,fAuthor,fHits,fdayHits,fweekHits,fmonthHits,fUpdateTime,fisIncludePic from deep_Article where fisDeleted=0 and fisView=1 and fclass_ID="&rs("fclass_ID")&" order by fisOnTop desc,fUpdateTime desc,fid desc"
							'rsProduct.open sql_article,conn,1,1
							
							
							if (rsProduct.eof and rsProduct.bof) then
								'response.Write("没有对应内容")
								strHTML = strHTML & "没有对应内容"
							else
								strHTML = strHTML & "<ul class='classList'>"
								'pSize=iPageSize	'每页显示记录数
								'--- 1 分页初始化 -----
								'call pageInit(rsProduct,pSize  ,currentPage,pageSize)
								do while (not rsProduct.eof)
									'--- 2 循环处设界 -----
									'if (pageSize<=0)then exit do end if
									'pageSize=PageSize-1								
									'strHTML = strHTML & "<li><a href='article.asp?id="& rsProduct("fid") &"' target='_blank' title='"& rsProduct("fTitle") &"时间:"& rsProduct("fUpdateTime")&"'>"& rsProduct("fTitle")&"</a></li>"

									strHTML=strHTML& "<li>"
									'if(rsProduct("fproductPic")<>"")then
										'strHTML=strHTML& "<span class='cRed'>(图文)</span>"
									'end if
									strHTML=strHTML& "<a href='product.asp?id="& rsProduct("fid") &"' target='_blank' title='"& rsProduct("fproductName") &vbcrlf&"'>"
									strHTML=strHTML& rsProduct("fproductName")& "</a></li>"
		
									rsProduct.MoveNext
								loop
								strHTML = strHTML & "</ul>"
								'--- 3 分页显示 -----
								
								'strHTML = strHTML & pagination(rsProduct	,currentPage)
							end if
							rsProduct.close
							set rsProduct=nothing
							
							'--- 2 分页导航 显示 -----
							strHTML = strHTML & oPageMsSQL.PageNavigateUrl() 
							Set oPageMsSQL=Nothing
							'-----2 end------

		
							'strHTML = strHTML & "<li class=""more""><a href='articleClass.asp?id="& rs("fclass_ID")&"' target='_blank' title='点击查看更多["&rs("fclassName") &"]'>更多..</a></li>"
							strHTML = strHTML & "</dd></dl>"
		
	end if
	rs.close
	set rs=nothing
	getHTML_productClassList=strHTML
end function
	
%>