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

📄 en_sysproduct.asp

📁 详细说明在文件 程序说明:  ☆ 中英文双语版  ☆ 后台在同一页内同时管理添加修改资料内的中英文内容  ☆ 网站的左边栏使用了模块,可以自由的增加&删除  ☆ 可以不用修改代码,
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%
'=========================================================
'
' 产品名称:良精软件 公司(企业)网站管理系统(简称:liangjing.net)
' 版权所有:liangjing.net
' 程序制作:liangjing开发团队
' Copyright 2004-2005 liangjing.net - All Rights Reserved.
'
'========================================================
%>
<%
dim strFileName,MaxPerPage,ShowSmallClassType
dim totalPut,CurrentPage,TotalPages
dim BeginTime,EndTime
dim founderr, errmsg
dim EnBigClassName,EnSmallClassName,SpecialName,keyword,strField
dim rs,sql,sqlArticle,rsArticle,sqlSearch,rsSearch,sqlBigClass,rsBigClass,sqlSpecial,rsSpecial
dim SpecialTotal
BeginTime=Timer
EnBigClassName=Trim(request("EnBigClassName"))
EnSmallClassName=Trim(request("EnSmallClassName"))
SpecialName=trim(request("SpecialName"))
keyword=trim(request("keyword"))
if keyword<>"" then 
	keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","&lt;"),">","&gt;")," ","&nbsp;")
end if
strField=trim(request("Field"))

if request("page")<>"" then
    currentPage=cint(request("page"))
else
	currentPage=1
end if

sqlBigClass="select * from Bs_PrBigClass order by BigClassID"
Set rsBigClass= Server.CreateObject("ADODB.Recordset")
rsBigClass.open sqlBigClass,conn,1,1


'=================================================
'过程名:ShowSmallClass_Tree
'作  用:树形目录方式显示栏目
'参  数:无
'=================================================
Sub ShowSmallClass_Tree()
%>
<SCRIPT language=javascript>
function opencat(cat,img){
	if(cat.style.display=="none"){
	cat.style.display="";
	img.src="../img/class2.gif";
	}	else {
	cat.style.display="none"; 
	img.src="../img/class1.gif";
	}
}
</Script>
<TABLE cellSpacing=0 cellPadding=0 width="99%" border=0>
<%
dim i
if rsBigClass.eof and rsBigClass.bof then
	Response.Write "The column is under construction……"
else
	i=1
	do while not rsBigClass.eof
%>
	<TR>
		<TD language=javascript onmouseup="opencat(cat10<%=i%>000,&#13;&#10; img10<%=i%>000);" id=item$pval[catID]) style="CURSOR: hand" width=26 height=24 align=center><IMG id=img10<%=i%>000 src="../img/class1.gif" width=20 height=20></TD>
		<TD class='ML_Tdbg'><a href='En_Product.asp?EnBigClassName=<%=rsBigClass("EnBigClassName")%>'><%=rsBigClass("EnBigClassName")%></a></TD>
	</TR>
	<TR>
		<TD id=cat10<%=i%>000 style="DISPLAY: none" bgColor=#fefdf5 colspan="2">
<%
dim rss,sqls,j
set rss = server.CreateObject ("adodb.recordset")
sqls="select * from Bs_PrSmallClass where EnBigClassName='" & rsBigClass("EnBigClassName") & "' order by SmallClassID"
rss.open sqls,conn,1,1
if rss.eof and rss.bof then
	Response.Write "No small class"
else
	j=1
	do while not rss.eof
%>
<IMG height=20 src="../img/class3.gif" width=26 align=absMiddle border=0><a href="En_Product.asp?EnBigClassName=<%=rss("EnBigClassName")%>&EnSmallclassname=<%=rss("EnSmallClassName")%>"><%=rss("EnSmallClassName")%></a><BR>
<%
	rss.movenext
	j=j+1
	loop
end if
rss.close
set rss=nothing
%>
		</TD>
	</TR>
<%
	rsBigClass.movenext
	i=i+1
	loop
end if
%>
</TABLE>
<%
end Sub 

'=================================================
'过程名:ShowVote
'作  用:显示网站调查
'参  数:无
'=================================================
sub ShowVote()
	dim sqlVote,rsVote,i
	sqlVote="select top 1 * from Vote where IsSelected=True"
	Set rsVote= Server.CreateObject("ADODB.Recordset")
	rsVote.open sqlVote,conn,1,1
	if rsVote.bof and rsVote.eof then 
		response.Write "&nbsp;There is not any investigation" 'There is not any investigation没有任何调查
	else
		response.write "<form name='VoteForm' method='post' action='En_vote.asp' target='_blank'><td>"
		response.write "&nbsp;&nbsp;&nbsp;&nbsp;" & rsVote("EnTitle") & "<br>"
		if rsVote("VoteType")="Single" then
			for i=1 to 8
				if trim(rsVote("Select" & i) & "")="" then exit for
				response.Write "<input type='radio' name='VoteOption' value='" & i & "'>" & rsVote("Select" & i) & "<br>"
			next
		else
			for i=1 to 8
				if trim(rsVote("Select" & i) & "")="" then exit for
				response.Write "<input type='checkbox' name='VoteOption' value='" & i & "'>" & rsVote("Select" & i) & "<br>"
			next
		end if
		response.write "<br><input name='VoteType' type='hidden'value='" & rsVote("VoteType") & "'>"
		response.write "<input name='Action' type='hidden' value='Vote'>"
		response.write "<input name='ID' type='hidden' value='" & rsVote("ID") & "'>"
		response.write "<div align='center'>"
		response.write "<a href='javascript:VoteForm.submit();'><img src='images/voteSubmit.gif' width='52' height='18' border='0'></a>&nbsp;&nbsp;"
        response.write "<a href='En_Vote.asp?Action=Show' target='_blank'><img src='images/voteView.gif' width='52' height='18' border='0'></a>"
		response.write "</div></td></form>"
	end if
	rsVote.close
	set rsVote=nothing
end sub

'=================================================
'过程名:ShowClassGuide
'作  用:显示栏目导航位置
'参  数:无
'=================================================
sub ShowClassGuide()
	response.write  "<a href='En_Product.asp'>ProductShow</a>&nbsp;&gt;&gt;" 'ProductShow 产品展示
	if EnBigClassName="" and EnSmallClassName="" then
		response.write "&nbsp;All products"
	else
		if EnBigClassName<>"" then
			response.write "&nbsp;<a href='En_Product.asp?EnBigClassName=" & EnBigClassName & "'>" & EnBigClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
			if EnSmallClassName<>"" then
				response.write "<a href='En_Product.asp?EnBigClassName=" & EnBigClassName & "&EnSmallClassName=" & EnSmallClassName & "'>" & EnSmallClassName & "</a>"
			else
				response.write "All small class"
			end if
		end if
	end if
end sub

'=================================================
'过程名:ShowArticleTotal
'作  用:显示文章总数
'参  数:无
'=================================================
sub ShowArticleTotal()
	dim sqlTotal
	dim rsTotal
	sqlTotal="select Count(*) from Bs_Product where Passed=True "
	if EnBigClassName<>"" then
		sqlTotal=sqlTotal & " and EnBigClassName='" & EnBigClassName & "' "
		if EnSmallClassName<>"" then
			sqlTotal=sqlTotal & " and EnSmallClassName='" & EnSmallClassName & "' "
		end if
	else
		if SpecialName<>"" then
			sqlTotal=sqlTotal & " and SpecialName='" & SpecialName & "' "
		end if
	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 "Altogether 0 a product" '共有  个产品
	else
		totalPut=rsTotal(0)
		response.Write "Altogether " & totalPut - 1 & " a product" '共有  个产品
	end if
	rsTotal.close
	set rsTotal=nothing
end sub

'=================================================
'过程名:ShowArticle
'=================================================
sub ShowArticle(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
        sqlArticle="select top " & MaxPerPage	
	else
		sqlArticle="select "
	end if

	sqlArticle=sqlArticle & " ArticleID,Product_Id,EnBigClassName,EnSmallClassName,IncludePic,EnTitle,EnSpec,Size,EnMemo,DefaultPicUrl,UpdateTime,Hits from Bs_Product where Passed=True "
	
	if EnBigClassName<>"" then
		sqlArticle=sqlArticle & " and EnBigClassName='" & EnBigClassName & "' "
		if EnSmallClassName<>"" then
			sqlArticle=sqlArticle & " and EnSmallClassName='" & EnSmallClassName & "' "
		end if
	else
		if SpecialName<>"" then
			sqlArticle=sqlArticle & " and SpecialName='" & SpecialName & "' "
		end if
	end if
	sqlArticle=sqlArticle & " order by articleid desc"
	Set rsArticle= Server.CreateObject("ADODB.Recordset")
	rsArticle.open sqlArticle,conn,1,1
	if rsArticle.bof and  rsArticle.eof then
		response.Write("<br><li>There are not any products</li>")
	else
		if currentPage=1 then
			call ArticleContent(TitleLen)
		else
			if (currentPage-1)*MaxPerPage<totalPut then
         	   	rsArticle.move  (currentPage-1)*MaxPerPage
         		dim bookmark
           		bookmark=rsArticle.bookmark
            	call ArticleContent(TitleLen)
        	else
	        	currentPage=1
           		call ArticleContent(TitleLen)
	    	end if
		end if
	end if
	rsArticle.close
	set rsArticle=nothing
end sub

sub ArticleContent(intTitleLen)
   	dim i,lb,strli
		Response.Write "<table width=100% border=0 cellspacing=2 cellpadding=0><TR><TD></TD></TR>"
    i=1
		Response.Write "<TR align=""center"">"
	do while not rsArticle.eof
		strli=""
		strli=strli & " ● &nbsp;&nbsp;Name:"& rsArticle("EnTitle") &" "&chr(13)
		strli=strli & " ● &nbsp;&nbsp;Spec:"& rsArticle("EnSpec") &" "&chr(13)
		strli=strli & " ● &nbsp;&nbsp;Size:"& rsArticle("Size") &" "
		lb=""
			lb=lb & "<TD>"
			lb=lb & "<table width=130 border=0 cellspacing=0 cellpadding=0>"
			lb=lb & "<TR><TD height=5></TD></TR>"

			lb=lb & "<tr>"
			lb=lb & "<td width='98%'><div align=center>"
			lb=lb & "<a href='En_ProductShow.asp?ArticleID=" & rsArticle("articleid") & "' title='" & strli &"'>" 
			lb=lb & "<img border=0 src='"& rsArticle("DefaultPicUrl") &"' width=100 height=100></a>" 
			lb=lb & "</div></td>"
			lb=lb & "</tr>"

			lb=lb & "<TR><TD height=3></TD></TR>"

			lb=lb & "<tr>"
			lb=lb & "<td height=23 background=../img/tablebg1.gif><div align=center>"
			lb=lb & "<a href='En_ProductShow.asp?ArticleID="& rsArticle("articleid") &"' title='" & strli &"'>"& gotTopic(rsArticle("EnTitle"),16) &"</a>"
			lb=lb & "</div></td>"
			lb=lb & "</tr>"

			lb=lb & "<tr>"
			lb=lb & "<td height=20 background=../img/tablebg2.gif><div align=center>"
			lb=lb & "<a href='En_ProductShow.asp?ArticleID="& rsArticle("articleid") &"'>See</a>&nbsp;&nbsp;&nbsp;&nbsp;"
			lb=lb & "<a href='javascript:eshop("& rsArticle("Product_Id") &")'>Order</a>"
			lb=lb & "</div></td>"
			lb=lb & "</tr>"

			lb=lb & "<tr>" 
			lb=lb & "<td height=7 background='../img/tablebg3.gif'><IMG height=1 src='../img/1x1_pix.gif' width=1></td>"
			lb=lb & "</tr>"
			lb=lb & "</table>"
			lb=lb & "</TD>"
		response.write lb

		if i mod 4 <>0 then
		end if
		if i mod 4 =0 then
		Response.Write "</TR><TR>"
		end if

		rsArticle.movenext
		i=i+1
		if i>=MaxPerPage then exit do	
	loop
 Response.Write "</TR><TR><TD></TD></TR></Table>"
end sub 

'=================================================
'过程名:ShowSearchTerm
'作  用:显示搜索条件信息
'参  数:无
'=================================================
sub ShowSearchTerm()
	response.write "|&nbsp;ProductSearch&nbsp;&gt;&gt; " 'Product search产品搜索
	if EnBigClassName<>"" then
		response.write "<a href='En_Default.asp?EnBigClassName=" & EnBigClassName & "'>" & EnBigClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
		if EnSmallClassName<>"" then
			response.write "<a href='En_Default.asp?EnBigClassName=" & EnBigClassName & "&EnSmallClassName=" & EnSmallClassName & "'>" & EnSmallClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
		else
			response.write "All Small Class &nbsp;&gt;&gt;&nbsp;" 'All Small Class所有小类
		end if
	end if
	if keyword<>"" then
	  select case strField
		case "EnTitle"
			response.Write "Contain in the name <font color=red>"&keyword&"</font> Products" '名称中含有  的产品
		case "EnContent"
			response.Write "Contain description <font color=red>"&keyword&"</font> Products" '说明含有  的产品 
		case else
			response.Write "Contain name <font color=red>"&keyword&"</font> Products" '名称中含有  的产品 
	  end select
	else

⌨️ 快捷键说明

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