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

📄 productdescriptionsys.asp

📁 能实现用户注册
💻 ASP
字号:
<html>
<head><title>System Description</title>
</head>
<body>
<!-- #INCLUDE FILE="odbc_connection.inc" -->

<%
on error resume next

'============================================
'Get parameters that were passed to this page
'============================================
CategoryID=request.querystring("CategoryID")
strProductID=request.querystring("strProductID")
intSessionID=session.sessionID

'check rows of tbl_Inventory_System_Components_Session

sSQL="SELECT "
sSQL=sSQL & "intSessionID "
sSQL=sSQL & "FROM tbl_Inventory_System_Components_Session "
sSQL=sSQL & "WHERE (intSessionID=" & intSessionID & " AND strProductIDSystem='" & strProductID & "')"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sSQL, conn, 3, 3 'read
RS.movelast
Rows=RS.recordcount

if rows=0 then
	'fill this table with copy of rows in tbl_Inventory_System_Components for this strProductID
	sSQL = "INSERT INTO tbl_Inventory_System_Components_Session "
	sSQL = sSQL & "(intSessionID, strProductIDSystem, strProductIDComponent) "
	sSQL = sSQL & "SELECT "
	sSQL = sSQL & intSessionID & " AS expr1, tbl_Inventory_System_Components.strProductIDSystem, tbl_Inventory_System_Components.strProductIDComponent "
	sSQL = sSQL & "FROM tbl_Inventory_System_Components "
	sSQL = sSQL & "WHERE tbl_Inventory_System_Components.strProductIDSystem='" & strProductID & "'"
	'response.write "<BR>" & sSQL & "<BR>"
	Set RSappend = Server.CreateObject("ADODB.Recordset")
	RSappend.Open sSQL, conn, 3, 2 'write
	SET RSappend=nothing
else
	'do nothing
end if
RS.close
set RS=nothing

'=======================================================
'Pull up details on this exact product from tbl_Inventory
'=======================================================
sSQL="SELECT "
sSQL=sSQL & "tbl_Inventory.strManufacture, " 'brand
sSQL=sSQL & "tbl_Inventory.strProductID, "
sSQL=sSQL & "tbl_Inventory.txtDescription, "
sSQL=sSQL & "tbl_Inventory.price "
sSQL=sSQL & "FROM tbl_Inventory  "
sSQL=sSQL & "WHERE strProductID='" & strProductID & "'"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sSQL, conn, 3, 3 'read
RS.movelast
Rows=RS.recordcount

if Rows>0 then
	RS.movefirst
	strSystemDescription=RS("txtDescription")
%>

<!-- #INCLUDE FILE="shared_vbFunctions.inc" -->
<center><a href="home.asp" target>Home</a></center>

<table border="0" width="100%">
	<tr bgcolor="#E3E3FF">
	<td valign="center" align="center">
	<b>Product Details:</b>
	</td>
	</tr>
</table>

<form name="SysForm" method="post" action="AddToCart.asp">

<table align="center" width="90%" border="4" cellspacing="1" cellpadding="1">
	<tr>
	<td align="right"><font face="arial" size="1"><input type="submit" value="Add to Cart"></font></td>
	<td align="left"><font face="arial" size="1">Quantity:&nbsp;<input type="text" size="5" value="0" name="<%=strProductID%>"></font></td>
	</tr>

	<tr bgcolor="#F2F2FF">
	<td align="right"><font face="arial" size="1"><b>Brand</b></font></td>
	<td align="left" bgcolor="azure"><font face="arial" size="1"><%=Fiks(RS("strManufacture"))%></font></td>
	</tr>

	<tr bgcolor="#F2F2FF">
	<td align="right"><font face="arial" size="1"><b>Description</b></font></td>
	<td align="left" bgcolor="azure"><font face="arial" size="1"><%=Fiks(RS("txtDescription"))%></font></td>
	</tr>

</table>
</form>

<%
RS.Close
SET RS = Nothing

'check tbl_Inventory_System_Components_Session to see if components exist for this system
sSQL="SELECT "
sSQL=sSQL & "intKey, strProductIDComponent "
sSQL=sSQL & "FROM tbl_Inventory_System_Components_Session "
sSQL=sSQL & "WHERE (intSessionID=" & intSessionID & " AND strProductIDSystem='" & strProductID & "')"

Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sSQL, conn, 3, 3 'read
RS.movelast
Rows=RS.recordcount
RS.movefirst

if Rows>0 then
	%><center><h3>This System Includes:</h3></center><%
	%><table width="90%" align="center" border="4"><%

	dim intKey(29)
	dim ComponentID(29)

	For X=1 to Rows
		intKey(X)=RS("intKey")
		ComponentID(X)=RS("strProductIDComponent")
		if X<Rows then RS.movenext
	Next
	RS.close
	set RS=nothing

	'now open tblInventory up

	Price=0
	For X=1 to Rows
	'=======================================================
	'Pull up details on this exact product from tblInventory
	'=======================================================
		'response.write X & ":" & ComponentID(X) & " / "
		sSQL="SELECT "
		'sSQL=sSQL & "strManufacture, " 'brand
		sSQL=sSQL & "txtDescription, "
		sSQL=sSQL & "curSalesPrice "
		sSQL=sSQL & "FROM tblInventory  "
		sSQL=sSQL & "WHERE strProductID='" & ComponentID(X) & "'"

		Set RS = Server.CreateObject("ADODB.Recordset")
		RS.Open sSQL, conn, 3, 3 'read
		RS.movelast
		ProdRows=RS.recordcount
		if ProdRows>0 then
			RS.movefirst
			Response.Write "<tr valign=center>"
			Response.Write "<td align=center><font face=arial size=1><a href='modifyComponent.asp?PID=" & strProductID & "&CID=" & ComponentID(X) & "&KEY=" & intKey(X) & "&DES=" & strSystemDescription & "'>Change</a>" & "</font></TD>"
			Response.Write "<td align=center><font face=arial size=1><a href='modifyComponentDo.asp?PID=" & strProductID & "&CID=" & ComponentID(X) & "&KEY=" & intKey(X) & "&DES=" & strSystemDescription & "&DEL=y'>Delete</a>" & "</font></TD>"
			Response.Write "<td><font face=arial size=1>" & AnchorDescription(ComponentID(X),RS("txtDescription"),CategoryID) & "</font></TD>"
			Response.Write "<td><font face=arial size=1>" & FormatCurrency(RS("curSalesPrice")) & "</font></TD>"
			Price=Price+RS("curSalesPrice")
			Response.Write "</tr>"

		end if
		RS.close
		set RS=nothing
	Next
	Response.write "<TR><TD align='center' colspan=4><font face=arial size=1><a href='modifyComponentAdd.asp?PID=" & strProductID & "&DES=" & strSystemDescription & "'><b>Add Component To This System</b></a></font></TD></TR>"

	%></table><%
	%><br><%
	Response.write "<center><B>Total System Price: " & FormatCurrency(Price) & "</B></center><BR>"
else
	%><center>No Detailed Specs Available</center><%
end if
%>

<table border="0" width="100%">
	<tr bgcolor="#E3E3FF">
	<td valign="center" align="center">
	<a href="inventory_systems.asp">
	<img src="graphics/Back.gif" alt="Back To Inventory Screen" border="0"></a>
	</td>
	</tr>
</table>
<center><!-- #INCLUDE FILE="nav_bottom.inc" --></center>
</body>
</html>

<%
else
	RS.Close
	SET RS = Nothing

	'RS IS EMPTY! GO BACK TO INVENTORY PAGE
	response.redirect "inventory_systems.asp"

end if
%>

⌨️ 快捷键说明

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