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

📄 ensysproduct.asp

📁 冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
         	   	rsProduct.move  (currentPage-1)*MaxPerPage
         		dim bookmark
           		bookmark=rsProduct.bookmark
            	call ProductContent(TitleLen)
        	else
	        	currentPage=1
           		call ProductContent(TitleLen)
	    	end if
		end if
	end if
	rsProduct.close
	set rsProduct=nothing
end sub

sub ProductContent(intTitleLen)
   	dim i,strTemp
    i=0
	a=4 '每行个数
	b=a+1
	strTemp="<table width='100%'  border='0' cellpadding='3' cellspacing='1'><tr>"		
	do while not rsProduct.eof		
		        strTemp= strTemp & "<td align=center valign=bottom width='25%'>"
				strTemp= strTemp & "<table>"
                strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td width=100% border=0 cellspacing=1 cellpadding=0 bgcolor='#E9E9E9'>"
                strTemp= strTemp & "<div align=center ><a href=EnProductShow.asp?ID=" & rsProduct("Id") & ">" 
				
				fileExt=lcase(getFileExtName(rsProduct("DefaultPicUrl")))
				if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
                strTemp= strTemp & "<img border=0 src=" & rsProduct("DefaultPicUrl") & " width=150 height=120 >" 
				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='110' height='80'>"
					strTemp= strTemp &"<param name=movie value='UploadFiles/"&rsProduct("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='"&rsProduct("DefaultPicUrl")&"' width='110' height='80' 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=12% height=12>"
                'strTemp= strTemp & "产品名称:</td>"
                'strTemp= strTemp & "<td>"
                'strTemp= strTemp & "<a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & ">" & rsArticle("Title") & ""
                'strTemp= strTemp & "</a></td>"
				
				'strTemp= strTemp & "</tr><tr>" 
                'strTemp= strTemp & "<td width=12% height=12>"
                'strTemp= strTemp & "产品售价:</td>"
                'strTemp= strTemp & "<td>" & rsArticle("Price") & "元</td>"				
				
				'strTemp= strTemp & "</tr><tr>"
				'strTemp= strTemp & "<td width=12% height=12>"
                'strTemp= strTemp & "产品规格:</td>"
                'strTemp= strTemp & "<td>"
                'strTemp= strTemp & rsArticle("Spec") & ""
                'strTemp= strTemp & "</a></td>"
				
				'strTemp= strTemp & "</tr><tr>"
				'strTemp= strTemp & "<td width=12% height=12>"
                'strTemp= strTemp & "产品备注:</td>"
                'strTemp= strTemp & "<td>"
                'strTemp= strTemp & rsArticle("Memo") & ""
                'strTemp= strTemp & "</a></td>"				
				
                'strTemp= strTemp & "</tr><tr>"
                'strTemp= strTemp & "<td height=12>"
                'strTemp= strTemp & "产品类别:</td>"
                'strTemp= strTemp & "<td><a href=Product.asp?BigClassName=" & rsArticle("BigClassName") & ">" & rsArticle("BigClassName") & "</a> → "
                'strTemp= strTemp & "<a href=Product.asp?BigClassName=" & rsArticle("BigClassName") & "&SmallClassName=" & rsArticle("SmallClassName") & ">" & rsArticle("SmallClassName") & ""
                'strTemp= strTemp & "</a></td>"
                'strTemp= strTemp & "</tr><tr>" 
				
               ' strTemp= strTemp & "<td height=12>"
               ' strTemp= strTemp & "产品编号:</td>"
              '  strTemp= strTemp & "<td>" & rsArticle("Product_Id") & "</td>"
              '  strTemp= strTemp & "</tr><tr>"
			   
                'strTemp= strTemp & "<td height=12>产品信息:</td>"
                'strTemp= strTemp & "<td>"
                'strTemp= strTemp & "<a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & "><img src=Img/arrow_7.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><a href=# onClick=""window.open('add.asp?Product_Id="&rsArticle("Product_Id")&"','blank_','scrollbars=yes,resizable=no,width=650,height=450')""><img border=0 src=img/addtocart.gif width=100 height=26>"
                'strTemp= strTemp & "</a></div></td>"
				
                strTemp= strTemp & "</td></tr>"
                strTemp= strTemp & "</table>"
				strTemp= strTemp & "<a href=EnProductShow.asp?ID=" & rsProduct("Id") & ">" & rsProduct("EnTitle") & ""
                strTemp= strTemp & "</a>"
                strTemp= strTemp & "</td>"
				c=b mod a
		        if c=0 then
                strTemp= strTemp & "</tr><tr>" 
				end if
				rsProduct.movenext
				i=i+1
				if i>=MaxPerPage then
				exit do
                 'strTemp= strTemp & "<tr>"
                 strTemp= strTemp & "</tr>"
				end if
				b=b+1
				loop
                strTemp= strTemp & "</table>"
		response.write strTemp			
	
end sub 


'=================================================
'过程名:ShowSearch
'作  用:显示文章搜索表单
'参  数:ShowType ----显示方式。1为纵向,2为横向
'=================================================
sub ShowSearch(ShowType)
	dim count
	if ShowType<>1 and ShowType<>2 then
		ShowType=1
	end if
	set rs=server.createobject("adodb.recordset")
	sql = "select * from SmallClass order by SmallClassID asc"
	rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("EnSmallClassName"))%>","<%= trim(rs("EnBigClassName"))%>","<%= trim(rs("EnSmallClassName"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.EnSmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.EnSmallClassName.options[document.myform.EnSmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    
</script>
<table border="0" cellpadding="2" cellspacing="0" align="center">
  <form method="Get" name="myform" action="Ensearch.asp">
    <tr>
      <td height="28"> <select name="Field" size="1">
          <option value="Title" selected>Product Name</option>
          <option value="Content">Product Readme</option>
        </select> 
        <%if ShowType=1 then%>
      </td>
    </tr>
    <tr>
      <td height="28"> 
        <%end if%>
        <select name="EnBigClassName" onChange="changelocation(document.myform.EnBigClassName.options[document.myform.EnBigClassName.selectedIndex].value)" size="1">
          <option selected value="">All BigClass</option>
          <%
if not (rsBigClass.bof and rsBigClass.eof) then
	rsBigClass.movefirst
	do while not rsBigClass.eof
        response.Write "<option value='" & trim(rsBigClass("EnBigClassName")) & "'>" & trim(rsBigClass("EnBigClassName")) & "</option>"
	   	rsBigClass.movenext
	loop
end if
%>
        </select> 
        <%if ShowType=1 then%>
      </td>
    </tr>
    <tr>
      <td height="28"> 
        <%end if%>
        <select name="EnSmallClassName">
          <option selected value="">All smallClass</option>
        </select> 
        <%if ShowType=1 then%>
      </td>
    </tr>
    <tr>
      <td height="28"> 
        <%end if%>
        <input type="text" name="keyword"  size=12 value="keyword" maxlength="50" onFocus="this.select();"> 
        <input type="submit" name="Submit"  value="Search" Class='BUTTON'> </td>
    </tr>
  </form>
</table>
<%
end sub

'=================================================
'过程名:ShowAllClass
'作  用:显示所有栏目(栏目导航)
'参  数:无
'=================================================
sub ShowAllClass()
	if rsBigClass.bof and rsBigClass.eof then 
		response.Write "&nbsp;No column"
	else
		dim sqlClass,rsClass,strClassName
		rsBigClass.movefirst
		do while not rsBigClass.eof
			strClassName= "【<a href='EnProduct.asp?EnBigClassName=" & rsBigClass("EnBigClassName") & "'><b>" & rsBigClass("EnBigClassName") & "</b></a>】<br><br>"
			sqlClass="select * from SmallClass where EnBigClassName='" & rsBigClass("EnBigClassName") & "' Order by SmallClassID"
			Set rsClass= Server.CreateObject("ADODB.Recordset")
			rsClass.open sqlClass,conn,1,1
			do while not rsClass.eof
				strClassName=strClassName & "&nbsp;<a href='EnProduct.asp?EnBigClassName=" & rsClass("EnBigClassName") & "&EnSmallClassName=" & rsClass("EnSmallClassName") & "'>" & rsClass("EnSmallClassName") & "</a>&nbsp;"
				rsClass.movenext
			loop
			response.write strClassName & "<br><br>"
			rsBigClass.movenext
		loop
		rsClass.close
		set rsClass=nothing
	end if
end sub


'=================================================
'过程名:ShowProductContent
'作  用:显示文章具体的内容,可以分页显示
'参  数:无
'=================================================
sub ShowProductContent()
	dim ID,strContent,CurrentPage
	dim ContentLen,MaxPerPage,pages,i,lngBound
	dim BeginPoint,EndPoint
	ID=rs("ID")
	strContent=rs("EnContent")
	response.write strContent
end sub
'=================================================
'过程名:ShowUserLogin
'作  用:显示用户登录表单
'参  数:无
'=================================================
sub ShowUserLogin()
	dim strLogin
	If Session("UserName")="" Then
    	strLogin= "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
		strLogin=strLogin & "<form action='EnUserLogin.asp' method='post' name='UserLogin' onSubmit='return CheckForm();'>"
        strLogin=strLogin & "<tr><td height='25' align='right'>User name:</td><td height='25'><input name='UserName' type='text' id='UserName' size='10' maxlength='20'></td></tr>"
        strLogin=strLogin & "<tr><td height='25' align='right'>Password:</td><td height='25'><input name='Password' type='password' id='Password' size='10' maxlength='20'></td></tr>"
        strLogin=strLogin & "<tr align='center'><td height='25' colspan='2'><input name='Login' type='submit' id='Login' value=' Login ' Class='BUTTON'> <input name='Reset' type='reset' id='Reset' value=' Reset ' Class='BUTTON'>"
        strLogin=strLogin & "</td></tr>"
        strLogin=strLogin & "<tr><td height='20' align='center' colspan='2'><a href='EnUserReg.asp' target='_blank'>Register</a>&nbsp;&nbsp;<a href='EnGetPassword.asp' target='_blank'>Forget password?</a></td></tr>"      
        strLogin=strLogin & "</form></table>"
		response.write strLogin
%>
<script language=javascript>
	function CheckForm()
	{
		if(document.UserLogin.UserName.value=="")
		{
			alert("Please input user name!");
			document.UserLogin.UserName.focus();
			return false;
		}
		if(document.UserLogin.Password.value == "")
		{
			alert("Please input password!");
			document.UserLogin.Password.focus();
			return false;
		}
	}
</script>
<%
	Else 
		response.write "Welcome!" & Session("UserName") & "<br><br>"
		response.write "<b>User control panel:</b><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='EnUserServer.asp'><b>User center</b></a><br><br>"
	end if
end sub
%>

⌨️ 快捷键说明

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