📄 build_sys_mod.asp
字号:
<html>
<head>
<!-- BASE TARGET="catdisplay" -->
<!-- #INCLUDE FILE="shared_checkBrowser.inc" -->
<style TYPE="text/css">
<!--
TD {font-size: 9pt; font-family: Arial; font-weight: bold}
TD.small {font-size: 8pt; font-family: Arial}
TD.large {font-size: 10pt; font-family: Arial}
-->
</style>
<script language="JavaScript">
<!--
function SubmitMe(theForm)
{
theForm.submit();
}
// -->
</script>
<!--<SCRIPT LANGUAGE="VBSCRIPT" RUNAT="SERVER">
Function Fiks(FixWhat)
if (isnull(FixWhat) or FixWhat="") then
Fiks="<CENTER> - </CENTER>"
else
Fiks=trim(FixWhat)
end if
End Function
Function Anchor_It (intKey,s_Description,s_Category)
if (isnull(intKey)) then
Anchor_It=" - "
else
s_Category=replace(s_Category," ","")
Anchor_It="<A HREF='build_sys_mod_change_pick.asp?repeat=0&intKey=" & intKey & "&cat=" & s_Category & "'>" & s_Description & "</A>"
end if
End Function
</SCRIPT>
-->
<!-- #INCLUDE FILE="odbc_connection.inc" -->
<%
if session("repeat")=0 then
session("s_System_Item_No")=request.querystring("Item_ID")
session("s_System_Description")=request.querystring("desc")
%><!-- #INCLUDE FILE="build_sys_ready_components.inc" --><%
end if
'================================================
'GET COMPONENTS IN THIS SYSTEM LIST FROM DATABASE
'================================================
'join tbl_Inventory_System_Components_Session with tbl_Inventory
RS_SQL="SELECT"
RS_SQL=RS_SQL & " tbl_Inventory_System_Components_Session.intKey"
RS_SQL=RS_SQL & ",tbl_Inventory_System_Components_Session.s_Component_Item_No"
RS_SQL=RS_SQL & " ,tbl_Inventory.s_Description"
RS_SQL=RS_SQL & " ,tbl_Inventory.s_Category"
RS_SQL=RS_SQL & " ,tbl_Inventory.price"
RS_SQL=RS_SQL & " ,tbl_Inventory.cost"
RS_SQL=RS_SQL & " FROM tbl_Inventory_System_Components_Session"
RS_SQL=RS_SQL & " INNER JOIN tbl_Inventory ON tbl_Inventory_System_Components_Session.s_Component_Item_No = tbl_Inventory.s_Item_No"
RS_SQL=RS_SQL & " WHERE (tbl_Inventory_System_Components_Session.s_System_Item_No='" & session("s_System_Item_No") & "'"
RS_SQL=RS_SQL & " AND tbl_Inventory_System_Components_Session.intSessionID=" & session.sessionID & ")"
RS_SQL=RS_SQL & " ORDER BY tbl_Inventory_System_Components_Session.intKey"
%>
</head>
<body text="#000000" BGCOLOR="white">
<center>
<table align="center" width="95%">
<tr>
<td align="center"><form ACTION="build_sys_mod_refresh.asp" METHOD="POST"><input TYPE="submit" value="Refresh"></form></td>
</tr>
<tr>
<td align="center">RCR Build Your Own System Area</td>
</tr>
<tr>
<td class="large" align="center"><font color="red"><a><%=session("s_System_Description")%></a></font></td>
</tr>
</table>
</center>
<center>
<table align="center" width="95%" valign="top" border="0" cellspacing="1" cellpadding="1">
<tr valign="center">
<td class="large" align="center" bgcolor="gold" colspan="3"><font color="black"><b>Components In This System</b></font></td>
</tr>
<tr valign="center">
<td align="center" bgcolor="black" colspan="3"><font color="white">Click on item to change it</font></td>
</tr>
<!-- #INCLUDE FILE="odbc_connection.inc" -->
<%
'response.write "<BR>" & sSQL & "<BR>"
'on error resume next
Set RS = server.createObject("ADODB.recordset")
RS.open RS_SQL, conn, 3, 3 'read
'response.write "<font color=black>error: " & err.s_Description & "<BR></font>"
'response.write RS_SQL
If Err.Number <> 0 Then
Response.Write "<B>Database Error: " + Err.Description + "</B><BR>"
Else
' Check for the no-record case
If (RS.EOF And RS.BOF) Then
Response.Write "<TR><TD align='center'><B>No Components Assigned to this System Yet</B></TD></TR>"
components_total=0
Else
RS.movefirst
components_total=0
Do Until RS.EOF
Response.Write "<TR valign=center>"
intKey=RS("intKey")
s_Component_Item_No=RS("s_Component_Item_No")
s_Description=RS("s_Description")
s_Category=RS("s_Category")
price=RS("price")
if session("Wholesaler")="True" then price=RS("cost")+(RS("cost")*0.1)
if isnumeric(price) then components_total=components_total + price
Response.write "<TD> " & Anchor_It(intKey,s_Description,s_Category)
Response.write "</TD>"
Response.write "<TD align='right'><font color='green'>" & formatcurrency(price) & "</font>"
Response.write "</TD>"
%>
<td align="right">
<a href="build_sys_mod_del.asp?intKey=<%=intKey%>"><img src="images/Btn_del.gif" border="0" WIDTH="65" HEIGHT="16"></a>
</td>
<%
Response.Write "</TR>"
RS.MoveNext
Loop
%>
<%
'================================================
'SYSTEM PRICE
'================================================
%>
<%
response.write "<TR>"
response.write "<TD align='right'>System Total</TD>"
response.write "<TD align='right'>" & formatcurrency(components_total) & "</TD><TD> </TD></TR>"
End If
RS.Close
' Close the If condition checking for a connection error
End If
set RS = Nothing
intKey=0
%>
</table>
</center>
<%
'================================================
'ADD COMPONENT TO SYSTEM
'================================================
%>
<br>
<center>
<table width="95%">
<tr>
<td BGCOLOR="gold" align="center" colspan="3">
<font color="black"><b>Add A Component To Your System</b></font>
</td>
</tr>
<tr valign="top">
<form name="AddToSysForm" METHOD="POST" action="build_sys_mod_add.asp">
<td align="right">
<!-- #INCLUDE FILE="odbc_connection.inc" -->
<%
Set rsCH2 = server.createObject("ADODB.recordset")
sSQL="SELECT"
sSQL=sSQL & " s_Category"
sSQL=sSQL & " FROM tbl_Categories"
sSQL=sSQL & " WHERE s_Category not like 'Computer System'"
sSQL=sSQL & " ORDER BY s_Category"
rsCH2.open sSQL, conn, 3, 3 'read
if err.number <>0 then
session("sSQL")=sSQL
session("errnum")=err.number
session("error")=err.description
Response.Redirect "error.asp"
end if
if HandlesJScript=true then
response.write "<Select Size='1' NAME='cboAddToSys' onChange='SubmitMe(this.form);'>"
else
response.write "<Select Size='1' NAME='cboAddToSys'>"
end if
do while not (rsCH2.EOF)
s_Category=rsCH2("s_Category")
s_Description=rsCH2("s_Category")
s_Category=replace(s_Category,"'","")
s_Description=replace(s_Description,"'","")
response.write "<option value='" & s_Category & "'> " & s_Description & " </option>"
rsCH2.movenext
loop
rsCH2.close
set rsCH2=nothing
%>
</select>
</td>
<td width="10"> </td>
<td align="right">
<input type="submit" value="Go">
</form>
</td>
</tr>
</table>
</center>
<%
'================================================
'ADD TO CART
'================================================
%>
<center>
<table width="95%">
<form name="scottForm" method="post" action="AddToCart.asp">
<tr>
<td BGCOLOR="gold" colspan="3" align="center">
<font color="black"><b>Add This System To Shopping Cart</b></font>
</td>
</tr>
<tr>
<td align="right">Quantity <input type="text" size="5" value="1" name="<%=session("s_System_Item_No")%>"></font></td>
<td width="10"> </td>
<td align="right"><input type="submit" value="Add"></td>
</tr>
</table>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -