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

📄 product_view.asp

📁 用ASP写的电子购物系统
💻 ASP
字号:
<%@ Language=VBScript %>
<!--#INCLUDE FILE="include/shop.asp" -->
<!--#INCLUDE FILE="include/util.asp" -->
<% REM ######################################################################### %>
<% REM                                                                           %>
<% REM   PRODUCT_VIEW.ASP                                                        %>
<% REM   商品详细浏览                                                            %>
<% REM   EPRO E-Commerce Solution 1.0                                            %>
<% REM   Copyright (c) 1999-2000 EPRO(GUANGZHOU) Co,Ltd.  All rights reserved.   %>
<% REM                                                                           %>
<% REM ######################################################################### %>

<html>
<head>
<title>商品详细信息</title>
<meta content="text/html; charset=gb2312" http-equiv="Content-Type">
<link href="shop.css" rel="stylesheet">
</head>

<body topMargin="0" >
<!--#INCLUDE FILE = "include/toolbar.asp" -->
<br>
<%
cmdTemp.CommandText = "SELECT * FROM product where product_id = " & Request("pfid")
Set rsProduct = Server.CreateObject("ADODB.Recordset")
rsProduct.Open cmdTemp, ,adOpenStatic,adLockReadOnly 
%>

<div align="center"><center>

<table border="0" cellPadding="0" cellSpacing="0" width="720" >
<tbody>
 
  <tr>
    <td bgColor=<%=thcolor3%> height="1"><img height="1" src="images/c.gif" width="1"></td>
  </tr>
  <tr>
  <!-- Query Form -->
  <form method="post" action="product_list_query.asp?market_id=<%=rsProduct("market_id")%>">
    <td align="left" bgColor=<%=tdcolor3%> height="30" vAlign="center" width="720" >&nbsp;
    <select class="select" name="level_id" size="1">
		<% LevelOne %>
    </select> 
    <input class="select" name="searchtext" size="20"> 
    <input type="hidden" name="DoQuery" value="yes"> 
    <input align="absMiddle" border="0" height="16" name="Go" src="images/search.gif" type="image" value="Go" width="43"></td>
    </form>
  </tr>
  <tr>
    <td bgColor=<%=thcolor3%> height="1"><img height="1" src="images/c.gif" width="1"></td>
  </tr>
  <tr>
    <td height="6" width="700"><img height="1" src="images/c.gif" width="1"></td>
  </tr>
  <tr>
    <td height="6" width="700"><img height="1" src="images/c.gif" width="1"></td>
  </tr>
</tbody>
</table>
</center></div>
<div align="center"><center>

<table border="0" cellPadding="0" cellSpacing="0" width="720">
<tbody>
  <tr>
    <td align="center" vAlign="top" width="250"><img src="prodimg/<% =rsProduct("image_filename").Value %>" width="200" > </td>
    <td align="left" vAlign="top" width="280">
	<table border="0" cellPadding="0" cellSpacing="0" width="280" >
	<tbody>
	      <tr>
	        <td class="proname" width="280"><img src="images/go.gif" width="16" height="11"><strong><b> 
	        <% =rsProduct("name").Value %></b></strong></td>
	      </tr>
	      <tr>
	        <td width="280"><br>
	        产品简介:</td>
	      </tr>
	      <tr>
	        <td width="280"><% =ConvertText(rsProduct("short_description").Value) %><br>
	        </td>
	      </tr>
	      <tr>
	        <td width="280"><br>
	        供货商:</td>
	      </tr>
	      <tr>
	        <td width="280"><% =rsProduct("provider").Value %><br>
	        </td>
	      </tr>
	      <tr>
	        <td><br>
	        <% if IsNull(rsProduct("list_price")) then %>
		        <span >现价</span>:<span class="price"><% =rsProduct("rmb_price").Value %></span>元人民币</td> 
	        <% else %>
		        <span >现价</span>:<span class="price"><% =rsProduct("rmb_price").Value %></span>元人民币<br><span class="myfont"> 外币价</span>:<span class="price"><% =rsProduct("list_price").Value %></span>美元</td>        
	        <% end if %>
	      </tr>
	      
	      <form method="post" action="xt_orderform_additem.asp?pfid=<%=request("pfid")%>" id=form1 name=form1> 
	      
	      <tr>
	        <td><br></td>
	      </tr>
	        <% if not isnull(rsProduct("Product_type")) then
	              if trim(cstr(rsProduct("Product_type")))<>"" then 
	            p_type=trim(cstr(rsProduct("Product_type")))
	            p_type=split(p_type,",")
	            if ubound(p_type)>0 then
	               if trim(cstr(p_type(0)))<>"" then
	               p_type_name=trim(cstr(p_type(0)))
                   dim p_type_value(10)
	               j=0
	               for i=1 to ubound(p_type)
	                   if trim(cstr(p_type(i)))<>"" then
	                      p_type_value(j)=trim(cstr(p_type(i)))
	                      j=j+1
	                   end if
	               next       
	      %>
	      <tr>
	        <td>
	         <input type="hidden" name="Product_type_name" value="<%=p_type_name%>">
	         <span ><%=p_type_name%></span>:
	         <select name="Product_type" size="1">
	         <option value="0" selected>--请选择商品类型--</option>
	         <% if j=0 then %>
	          <option>&nbsp;无详细规格供选择&nbsp;</option>
	         <% else
	               for i=0 to j-1%>
	           <option><%=p_type_value(i)%></option>
	         <%    next
	            end if %>
	         </select>
	        </td>
	      </tr>
	      <%       end if
	            end if
	            end if
	         end if %>
	      <tr>
	        <td>&nbsp;</td>
	      </tr>
	        <%
		market_sql="select * from market where id=" & rsProduct("market_id")
		set market_rs=server.CreateObject ("adodb.recordset")
		market_rs.Open market_sql, conn, adOpenKeyset,adLockReadOnly
	        %>
	      <tr>  
	        <td>
              所属商家:<br>
              &nbsp;
           <%
	          if market_rs.RecordCount=1 then
	             Response.Write market_rs("name")
	          else
	             Response.Write "---NULL---"
	          end if
	          market_rs.Close
	          set market_rs=nothing
		    %>
	        </td>
	      </tr>
	</tbody>
	</table>
   </td>
   <td width="190" align="center" vAlign="top">
      <% quantity = Request("qty") %>

<% if quantity = "" then    
      quantity = 1
   end if %> 

	<table border="0" width="152" cellspacing="0" cellpadding="0" ALIGN="center">
	    <tr>
	      <td ALIGN="center" bgcolor=<%=thcolor3%> colSpan="3" height="20" width="150"><b>请填写购买数量:</b></td>
	    </tr>
	    <tr>
	        <td bgcolor=<%=thcolor3%>  width="1"><img height="1"  src="images/c.gif" width="1"></td>
	        <td  ALIGN="center" bgcolor=<%=tdcolor3%>  width="165">

                 数量:
		       <INPUT TYPE=text NAME="quantity" VALUE="<% = quantity %>" SIZE="5" ALIGN=left>
	       </td>
	      <td bgcolor=<%=thcolor3%>  width="1"><img height="1" src="images/c.gif"   width="1"></td>
	     </tr>
	    <tr>
	        <td bgcolor=<%=thcolor3%>  width="1"><img height="1"  src="images/c.gif" width="1"></td>
	        <td bgcolor=<%=tdcolor3%>  width="165" ALIGN="center">
	        <br>
	           <input type="hidden" name="goto" value="basket.asp">
               <input align="absMiddle" alt="立即订购" border="0" name="submit" src="images/mybuy.gif" type="image" WIDTH="64" HEIGHT="16" onclick="return Pro_type()">
               </form> 
	       </td>
	      <td bgcolor=<%=thcolor3%>  width="1"><img height="1" src="images/c.gif"   width="1"></td>
	     </tr>	      
	      <tr>
	      <td colSpan="3" bgcolor=<%=thcolor3%>>
         
            </td>
	      </tr>
	</table>

    </td>
</tr>
</tbody>
</table>

</center></div>
<div align="center"><center>

<table border="0" cellPadding="0" cellSpacing="0" width="680">
<tbody>
  <tr>
    <td colSpan="2" height="10"><img height="1" src="images/c.gif" width="1"></td>
  </tr>
  <tr>
    <td bgColor=<%=tdcolor3%> class="font9" height="20" width="180"><b>产品详细信息</b></td>
    <td width="520"></td>
  </tr>
  <tr>
    <td bgColor=<%=thcolor3%> colSpan="2" height="1"><img height="1" src="images/c.gif" width="1"></td>
  </tr>
  <tr>
    <td colSpan="2" height="5"><img height="1" src="images/c.gif" width="1"></td>
  </tr>
  <tr>
    <td colSpan="2" >
      <% if isnull(rsProduct("long_description").Value)=false then
		 Response.Write ConvertText(rsProduct("long_description").Value)
		 end if%>    
    </td>
  </tr>
</tbody>
</table>
</center></div>
<!--#INCLUDE FILE="include/footer.asp" -->
</body>
</html>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function Pro_type(){
<% if not isnull(rsProduct("Product_type")) then
     if trim(cstr(rsProduct("Product_type")))<>"" then %>
     //alert(document.form1.Product_type.value);
     if (document.form1.Product_type.options[0].selected) {
        alert('请您选择商品的详细规格!');
        return false;
     }     
<%   end if
   end if
   rsProduct.close
   set rsProduct=nothing %>
}
//-->
</SCRIPT>

⌨️ 快捷键说明

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