• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

Ecart with dynamic quantity drop down menu.

I'm using ECart and I'm trying to make the quantity into a dynamic drop down menu which only displays the available quantities for that product.  What I currently have displays every quantity in every menu in my looper.

I have two tables in my DB (Access), Proofs and Prices which are related by their Proof ID. I also have two recordsets, Recordset1 (runs Proof table in my looper) and Recordset2 (displays prices).  I don't understand how to set up the Recordset2 so that it only displays the quantities available for that product.  There are multiple quantities and prices for each product.  I hope this makes sense.

Here's my mess:

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../WA_eCart/WA_eCart_Definition_VB.asp" -->
<!--#include file="../WA_eCart/eCart1_VB.asp" -->
<!--#include file="../Connections/DSNLESS.asp" -->
<!--#include file="../includes/tNG/tNG.inc.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("kt_Associate") <> "") Then
  Recordset1__MMColParam = Session("kt_Associate")
End If
%>
<%
Dim Recordset1__sort1
Recordset1__sort1 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort1 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1__sort2
Recordset1__sort2 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort2 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1__sort3
Recordset1__sort3 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort3 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1__sort4
Recordset1__sort4 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort4 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1__sort5
Recordset1__sort5 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort5 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_DSNLESS_STRING
Recordset1_cmd.CommandText = "SELECT * FROM proofs WHERE proof_client = ? AND (proof_formNumber LIKE ? OR proof_date LIKE ? OR proof_desc LIKE ? OR proof_keywords LIKE ? OR proof_tab LIKE ?)  ORDER BY proof_date DESC"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 255, Recordset1__MMColParam) ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param2", 200, 1, 255, "%" + Recordset1__sort1 + "%") ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param3", 200, 1, 255, "%" + Recordset1__sort2 + "%") ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param4", 200, 1, 255, "%" + Recordset1__sort3 + "%") ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param5", 200, 1, 255, "%" + Recordset1__sort4 + "%") ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param6", 200, 1, 255, "%" + Recordset1__sort5 + "%") ' adVarChar

Recordset1_cmd.ActiveConnection.CursorLocation = 3
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim RecordsetUsr__MMColParam
RecordsetUsr__MMColParam = "1"
If (Session("kt_login_id") <> "") Then
  RecordsetUsr__MMColParam = Session("kt_login_id")
End If
%>
<%
Dim RecordsetUsr
Dim RecordsetUsr_cmd
Dim RecordsetUsr_numRows

Set RecordsetUsr_cmd = Server.CreateObject ("ADODB.Command")
RecordsetUsr_cmd.ActiveConnection = MM_DSNLESS_STRING
RecordsetUsr_cmd.CommandText = "SELECT Usr_Shopping_Cart, Usr_Invoiced FROM Usr_Usr WHERE ID = ?"
RecordsetUsr_cmd.Prepared = true
RecordsetUsr_cmd.Parameters.Append RecordsetUsr_cmd.CreateParameter("param1", 5, 1, -1, RecordsetUsr__MMColParam) ' adDouble

Set RecordsetUsr = RecordsetUsr_cmd.Execute
RecordsetUsr_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_cmd
Dim Recordset2_numRows

Set Recordset2_cmd = Server.CreateObject ("ADODB.Command")
Recordset2_cmd.ActiveConnection = MM_DSNLESS_STRING
Recordset2_cmd.CommandText = "SELECT * FROM price"
Recordset2_cmd.Prepared = true

Set Recordset2 = Recordset2_cmd.Execute
Recordset2_numRows = 0
%>
<%
Dim Repeat_Recordset1__numRowsHL
Dim Repeat_Recordset1__indexHL

Repeat_Recordset1__numRowsHL = -1
Repeat_Recordset1__indexHL = 0
Recordset1_numRows = Recordset1_numRows + Repeat_Recordset1__numRowsHL
%>
<%
' WA eCart AddToCart
if (cStr(Request.Form("eCart1_1_ATC")) <> "" OR cStr(Request.Form("eCart1_1_ATC.x")) <> "")     then
  ATC_itemID = cStr(Request.Form("eCart1_1_ID_Add"))
  ATC_AddIfIn = 0
  ATC_RedirectAfter = "cart.asp"
  ATC_RedirectIfIn  = ""
  ATC_RSPos = Recordset1.AbsolutePosition
  Recordset1.MoveFirst()
  DO while (NOT Recordset1.EOF)
    if (cStr(Recordset1.Fields("proof_ID").value) = cStr(ATC_itemID))  then
      ATC_itemName = "" & cStr((Recordset1.Fields.Item("proof_client").Value)) & ""' column binding
      ATC_itemDescription = "" & cStr((Recordset1.Fields.Item("proof_desc").Value)) & ""' column binding
      ATC_itemWeight = cDbl("0")' column binding
      ATC_itemQuantity = "" & cStr(Request.Form("eCart1_1_Quantity_Add")) & ""' column binding
      ATC_itemPrice = cDbl("" & cStr((Recordset1.Fields.Item("proof_price").Value)) & "")' column binding
      ATC_itembreak1 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break1").Value)) & "")' column binding
      ATC_itembreak2 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break2").Value)) & "")' column binding
      ATC_itembreak3 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break3").Value)) & "")' column binding
      ATC_itembreak4 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break4").Value)) & "")' column binding
      ATC_itembreak5 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break5").Value)) & "")' column binding
      ATC_itemsavings1 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings1").Value)) & "")' column binding
      ATC_itemsavings2 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings2").Value)) & "")' column binding
      ATC_itemsavings3 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings3").Value)) & "")' column binding
      ATC_itemsavings4 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings4").Value)) & "")' column binding
      ATC_itemsavings5 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings5").Value)) & "")' column binding
      Exit DO
    end if
    Recordset1.MoveNext()
  Loop
  Recordset1.AbsolutePosition = ATC_RSPos
  if (IsNumeric(ATC_itemQuantity) AND ATC_itemQuantity <> 0)     then
    set eCart1 = eCart1_AddToCart(ATC_AddIfIn, ATC_RedirectIfIn, ATC_itemID, ATC_itemName, ATC_itemDescription, ATC_itemWeight, ATC_itemQuantity, ATC_itemPrice, ATC_itembreak1, ATC_itembreak2, ATC_itembreak3, ATC_itembreak4, ATC_itembreak5, ATC_itemsavings1, ATC_itemsavings2, ATC_itemsavings3, ATC_itemsavings4, ATC_itemsavings5)
    if (ATC_RedirectAfter <> "" AND eCart1_redirStr = "")     then
      eCart1_redirStr = ATC_RedirectAfter
    end if
    Session("WAEC_ContinueRedirect") = cStr(Request.ServerVariables("Script_Name"))  & "?" & cStr(Request.QueryString())
  end if
end if
%>
<%
' WA eCart Redirect
if (eCart1_redirStr <> "")     then
  Response.Redirect(eCart1_redirStr)
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>Databar Inc. - Client Library</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script id="PLHFOScript" language="JavaScript" src="../Pluginlab/Scripts/PLHFO.js">/* PLHFOMenu script */</script>

<style type="text/css">
<!--
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style>
<script src="../includes/cssmenus2/js/cssmenus.js" type="text/javascript"></script>
<script src="../includes/cssmenus2/js/cssmenus.js" type="text/javascript"></script>
<meta name="keywords" content="design databar logo brochures corporate identity forms powerpoint presentations fonts designers designer custom newsletters flash animations animation edgewood washington">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script src="../includes/cssmenus2/js/cssmenus.js" type="text/javascript"></script>
<script src="../includes/cssmenus2/js/animation.js" type="text/javascript"></script>
<link href="../includes/cssmenus2/skins/aqua_blue/horizontal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}
-->
</style>
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body onLoad="PLHFO_onload();MM_preloadImages('../images/emailartdeptdown.jpg','../images/emailassociatedown.jpg')">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top"><table width="100%" border="0" cellspacing="10" cellpadding="10">
      <tr>
        <td valign="top"><h3><span class="style1">Welcome <%= Session("kt_login_user") %> </span> <a href="loginupdate.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image85','','../images/changeaccountdown.jpg',1)"><br>
            <br>
          </a><a href="loginupdate5.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','../images/changeaccountdown.jpg',1)"><img src="../images/changeaccountup.jpg" alt="change login info" name="Image7" width="130" height="26" border="0"></a><a href="loginupdate.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image85','','../images/changeaccountdown.jpg',1)"></a></h3>
          <form name="form1" method="post" action="">
            <label>Keywords
              <input name="keywords" type="text" id="keywords">
  </label>
            <label>
              <input type="submit" name="Submit" value="Search">
              </label>
            <br>
            </form>
          <table width="300" border="1">
            <tr>
              <%
  ' Horizontal Looper version 3
  While ((Repeat_Recordset1__numRowsHL <> 0) AND (NOT Recordset1.EOF))
%>
                <td valign="baseline"><p><a href="<%=tNG_downloadDynamicFile("../", "../proofs/", "{Recordset1.proof_fileName}")%>"><img src="<%=tNG_showDynamicImage("../", "../thumbnails/", "{Recordset1.proof_thumb}")%>" /></a><br>
                  Date: <%=(Recordset1.Fields.Item("proof_date").Value)%><br>
                  Desc.: <%=(Recordset1.Fields.Item("proof_desc").Value)%><br>
                  Form #: <%=(Recordset1.Fields.Item("proof_formNumber").Value)%><br>
                  Keywords: <%=(Recordset1.Fields.Item("proof_keywords").Value)%><br>
                  <a href="emailassociate3.asp?IDNumber=<%=(Recordset1.Fields.Item("proof_ID").Value)%>&assoc=<%=(Recordset1.Fields.Item("proof_associate").Value)%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image75','','../images/emailassociatedown.jpg',1)"><img src="../images/emailassociateaboutjobup.jpg" alt="email associate about this job" width="190" height="26" border="0" align="absbottom"></a><a href="emailassociate2.asp?IDNumber=<%=(Recordset1.Fields.Item("proof_ID").Value)%>&assoc=<%=(Recordset1.Fields.Item("proof_associate").Value)%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','../images/emailassociatedown.jpg',1)"></a><br>
                  <a href="emailartdept2.asp?IDNumber=<%=(Recordset1.Fields.Item("proof_ID").Value)%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','../images/emailartdeptdown.jpg',1)"><img src="../images/emailartdeptup.jpg" alt="email art dept " name="Image8" width="190" height="26" border="0"></a> <a href="reorder.asp?IDNumber=<%=(Recordset1.Fields.Item("proof_ID").Value)%>&assoc=<%=(Recordset1.Fields.Item("proof_associate").Value)%>">
<%
' Show IF Conditional region1
  If (RecordsetUsr.Fields.Item("Usr_Invoiced").Value) = 1 Then
%>
  <img src="../images/ReorderButton.jpg" width="190" height="26" border="0">
  <%
  End If
' End Conditional region1
%>
                  </a><br>
                  <%
' Show IF Conditional region2
  If (Recordset1.Fields.Item("proof_shopping_cart").Value) = 1 Then
%>
                  <form name="eCart1_1_ATC_<%=Recordset1.Fields("proof_ID").value%>" method="POST" action="<%=cStr(Request.ServerVariables("SCRIPT_NAME"))%><%=WA_eCart_IIf((Request.ServerVariables("QUERY_STRING") <> ""), "?" & Request.ServerVariables("QUERY_STRING"), "")%>">
                    <input type="hidden" name="eCart1_1_ID_Add" value="<%=Recordset1.Fields("proof_ID").value%>" >
                    <select name="eCart1_1_Quantity_Add">
                      <option value="1" selected>1</option>
                      <%
While (NOT Recordset2.EOF)
%>
                      <option value="<%=(Recordset2.Fields.Item("price_quantity").Value)%>"><%=(Recordset2.Fields.Item("price_quantity").Value)%></option>
                      <%
  Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
  Recordset2.MoveFirst
Else
  Recordset2.Requery
End If
%>
                    </select>
<input type="submit" value="Add to Cart" name="eCart1_1_ATC">
                  </form>
                  <%
  End If
' End Conditional region2
%></td>
                <%
    'Horizontal Looper version 3
    Repeat_Recordset1__indexHL=Repeat_Recordset1__indexHL+1
    Repeat_Recordset1__numRowsHL=Repeat_Recordset1__numRowsHL-1
    Recordset1.MoveNext()
    if len(nested_Recordset1)<=0 then
      nested_Recordset1 = 1
    end if
    if ((Repeat_Recordset1__numRowsHL <> 0) AND (NOT Recordset1.EOF) AND (nested_Recordset1 mod 4 = 0)) then
      Response.Write "</tr><tr>"
    end if
    nested_Recordset1 = nested_Recordset1 + 1
    'end horizontal looper version 3
  Wend
%>
              </tr>
          </table>          
          <br>        </td>
        </tr>
    </table></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
RecordsetUsr.Close()
Set RecordsetUsr = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>

Thank you,
Chris
0
imjusthere
Asked:
imjusthere
1 Solution
 
Campbell_David_JCommented:
In the code for the product selection, you need to...
   1) Set a session variable to hold the selected product id.
   2) Put the commandtext for the quantity in an if-then statement like so
   If isNull(Session("selProdID"))  then
      Recordset2_cmd.CommandText = "SELECT * FROM price"
   else
      Recordset2_cmd.CommandText = "SELECT * FROM price where ProdID='" & _
         Session("selProdID") & "'"
   end if
   3) Make sure that recordset2 gets recomputed every time you select a new product id


HTH
0
 
imjusthereAuthor Commented:
OK, I made the session variable (ProofID) and set up Recordset2 to only show records equal to the session variable. I also set the session variable equal to Recordset1.proof_ ID in my looper.  However, my drop down menu is only displaying the quantities available to the first ProofID in every menu.  My session variable seems to be incrementing fine for each record in my looper but the recordset isn't being updated.  How much of the code assiciated with Recordset2 needs to be moved into the looper?  Please keep in mind I'm not a programmer and this is all new to me.

Also, if I pasted your If statement into my (Recordset2_cmd.CommandText = "SELECT * FROM price WHERE price_proofID = ?" ) I got an error (Too few parameters. Expected 1.) so I didn't use it.  Will this cause problems?

My code:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../WA_eCart/WA_eCart_Definition_VB.asp" -->
<!--#include file="../WA_eCart/eCart1_VB.asp" -->
<!--#include file="../includes/cssmenus2/MX_Menu2.inc.asp" -->
<!--#include file="../Connections/DSNLESS.asp" -->
<!--#include file="../includes/tNG/tNG.inc.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("kt_Associate") <> "") Then
  Recordset1__MMColParam = Session("kt_Associate")
End If
%>
<%
Dim Recordset1__sort1
Recordset1__sort1 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort1 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1__sort2
Recordset1__sort2 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort2 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1__sort3
Recordset1__sort3 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort3 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1__sort4
Recordset1__sort4 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort4 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1__sort5
Recordset1__sort5 = "%"
If (Request.Form("keywords")  <> "") Then
  Recordset1__sort5 = Request.Form("keywords")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_DSNLESS_STRING
Recordset1_cmd.CommandText = "SELECT * FROM proofs WHERE proof_client = ? AND (proof_formNumber LIKE ? OR proof_date LIKE ? OR proof_desc LIKE ? OR proof_keywords LIKE ? OR proof_tab LIKE ?)  ORDER BY proof_date DESC"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 255, Recordset1__MMColParam) ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param2", 200, 1, 255, "%" + Recordset1__sort1 + "%") ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param3", 200, 1, 255, "%" + Recordset1__sort2 + "%") ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param4", 200, 1, 255, "%" + Recordset1__sort3 + "%") ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param5", 200, 1, 255, "%" + Recordset1__sort4 + "%") ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param6", 200, 1, 255, "%" + Recordset1__sort5 + "%") ' adVarChar

Recordset1_cmd.ActiveConnection.CursorLocation = 3
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim rsCSSMenu1
Dim rsCSSMenu1_numRows

Set rsCSSMenu1 = Server.CreateObject("ADODB.Recordset")
rsCSSMenu1.ActiveConnection = MM_DSNLESS_STRING
rsCSSMenu1.Source = "SELECT * FROM menu WHERE visible_mnu = 1 ORDER BY order_mnu ASC"
rsCSSMenu1.CursorType = 3
rsCSSMenu1.CursorLocation = 2
rsCSSMenu1.LockType = 1
rsCSSMenu1.Open()

rsCSSMenu1_numRows = 0
%>
<%
Dim RecordsetUsr__MMColParam
RecordsetUsr__MMColParam = "1"
If (Session("kt_login_id") <> "") Then
  RecordsetUsr__MMColParam = Session("kt_login_id")
End If
%>
<%
Dim RecordsetUsr
Dim RecordsetUsr_cmd
Dim RecordsetUsr_numRows

Set RecordsetUsr_cmd = Server.CreateObject ("ADODB.Command")
RecordsetUsr_cmd.ActiveConnection = MM_DSNLESS_STRING
RecordsetUsr_cmd.CommandText = "SELECT Usr_Shopping_Cart, Usr_Invoiced FROM Usr_Usr WHERE ID = ?"
RecordsetUsr_cmd.Prepared = true
RecordsetUsr_cmd.Parameters.Append RecordsetUsr_cmd.CreateParameter("param1", 5, 1, -1, RecordsetUsr__MMColParam) ' adDouble

Set RecordsetUsr = RecordsetUsr_cmd.Execute
RecordsetUsr_numRows = 0
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Session("ProofID") <> "") Then
  Recordset2__MMColParam = Session("ProofID")
End If
%>
<%
Dim Recordset2
Dim Recordset2_cmd
Dim Recordset2_numRows

Set Recordset2_cmd = Server.CreateObject ("ADODB.Command")
Recordset2_cmd.ActiveConnection = MM_DSNLESS_STRING
Recordset2_cmd.CommandText = "SELECT * FROM price WHERE price_proofID = ?"
Recordset2_cmd.Prepared = true
Recordset2_cmd.Parameters.Append Recordset2_cmd.CreateParameter("param1", 5, 1, -1, Recordset2__MMColParam) ' adDouble

Set Recordset2 = Recordset2_cmd.Execute
Recordset2_numRows = 0
%>
<%
'Begin DynCSSMenu1
  Set DynCSSMenu1 = new MX_Menu2
  DynCSSMenu1.Init "DynCSSMenu1"
  DynCSSMenu1.setQuery rsCSSMenu1
  DynCSSMenu1.setPK "ID_mnu"
  DynCSSMenu1.setFK "idmnu_mnu"
  DynCSSMenu1.setNameField "label_mnu"
  DynCSSMenu1.setTitleField "tooltip_mnu"
  'URL parameters
  DynCSSMenu1.setLinkField "urllink_mnu"
  DynCSSMenu1.setTargetField "target_mnu"
  'Layout
  DynCSSMenu1.highlightCurrent true
  DynCSSMenu1.setLevel -1
  DynCSSMenu1.setLayout "horizontal"
  DynCSSMenu1.setSkin "colortest2"
  DynCSSMenu1.setShowTimeout 50
  DynCSSMenu1.setHideTimeout 50
  DynCSSMenu1.setExitTimeout 200
  DynCSSMenu1.setSubMenuOffset 0, 0, 0, 0
  DynCSSMenu1.setAnimation "slide"
  DynCSSMenu1.setImgReplace false
'End DynCSSMenu1
%>
<%
Dim Repeat_Recordset1__numRowsHL
Dim Repeat_Recordset1__indexHL

Repeat_Recordset1__numRowsHL = -1
Repeat_Recordset1__indexHL = 0
Recordset1_numRows = Recordset1_numRows + Repeat_Recordset1__numRowsHL
%>
<%
' WA eCart AddToCart
if (cStr(Request.Form("eCart1_1_ATC")) <> "" OR cStr(Request.Form("eCart1_1_ATC.x")) <> "")     then
  ATC_itemID = cStr(Request.Form("eCart1_1_ID_Add"))
  ATC_AddIfIn = 0
  ATC_RedirectAfter = "cart.asp"
  ATC_RedirectIfIn  = ""
  ATC_RSPos = Recordset1.AbsolutePosition
  Recordset1.MoveFirst()
  DO while (NOT Recordset1.EOF)
    if (cStr(Recordset1.Fields("proof_ID").value) = cStr(ATC_itemID))  then
      ATC_itemName = "" & cStr((Recordset1.Fields.Item("proof_client").Value)) & ""' column binding
      ATC_itemDescription = "" & cStr((Recordset1.Fields.Item("proof_desc").Value)) & ""' column binding
      ATC_itemWeight = cDbl("0")' column binding
      ATC_itemQuantity = "" & cStr(Request.Form("eCart1_1_Quantity_Add")) & ""' column binding
      ATC_itemPrice = cDbl("" & cStr((Recordset1.Fields.Item("proof_price").Value)) & "")' column binding
      ATC_itembreak1 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break1").Value)) & "")' column binding
      ATC_itembreak2 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break2").Value)) & "")' column binding
      ATC_itembreak3 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break3").Value)) & "")' column binding
      ATC_itembreak4 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break4").Value)) & "")' column binding
      ATC_itembreak5 = cDbl("" & cStr((Recordset1.Fields.Item("proof_break5").Value)) & "")' column binding
      ATC_itemsavings1 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings1").Value)) & "")' column binding
      ATC_itemsavings2 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings2").Value)) & "")' column binding
      ATC_itemsavings3 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings3").Value)) & "")' column binding
      ATC_itemsavings4 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings4").Value)) & "")' column binding
      ATC_itemsavings5 = cDbl("" & cStr((Recordset1.Fields.Item("proof_Savings5").Value)) & "")' column binding
      Exit DO
    end if
    Recordset1.MoveNext()
  Loop
  Recordset1.AbsolutePosition = ATC_RSPos
  if (IsNumeric(ATC_itemQuantity) AND ATC_itemQuantity <> 0)     then
    set eCart1 = eCart1_AddToCart(ATC_AddIfIn, ATC_RedirectIfIn, ATC_itemID, ATC_itemName, ATC_itemDescription, ATC_itemWeight, ATC_itemQuantity, ATC_itemPrice, ATC_itembreak1, ATC_itembreak2, ATC_itembreak3, ATC_itembreak4, ATC_itembreak5, ATC_itemsavings1, ATC_itemsavings2, ATC_itemsavings3, ATC_itemsavings4, ATC_itemsavings5)
    if (ATC_RedirectAfter <> "" AND eCart1_redirStr = "")     then
      eCart1_redirStr = ATC_RedirectAfter
    end if
    Session("WAEC_ContinueRedirect") = cStr(Request.ServerVariables("Script_Name"))  & "?" & cStr(Request.QueryString())
  end if
end if
%>
<%
' WA eCart Redirect
if (eCart1_redirStr <> "")     then
  Response.Redirect(eCart1_redirStr)
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>Databar Inc. - Client Library</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script id="PLHFOScript" language="JavaScript" src="../Pluginlab/Scripts/PLHFO.js">/* PLHFOMenu script */</script>

<style type="text/css">
<!--
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style>
<script src="../includes/cssmenus2/js/cssmenus.js" type="text/javascript"></script>
<script src="../includes/cssmenus2/js/cssmenus.js" type="text/javascript"></script>
<link href="../includes/cssmenus2/skins/colortest2/horizontal.css" rel="stylesheet" type="text/css" />
<script src="../includes/cssmenus2/js/animation.js" type="text/javascript"></script>
<meta name="keywords" content="design databar logo brochures corporate identity forms powerpoint presentations fonts designers designer custom newsletters flash animations animation edgewood washington">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script src="../includes/cssmenus2/js/cssmenus.js" type="text/javascript"></script>
<script src="../includes/cssmenus2/js/animation.js" type="text/javascript"></script>
<link href="../includes/cssmenus2/skins/aqua_blue/horizontal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}
-->
</style>
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body onLoad="PLHFO_onload();MM_preloadImages('../images/librarydown.jpg','../images/emailartdeptdown.jpg','../images/emailassociatedown.jpg')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="100%" border="0" background="../images/spacermenu.jpg">
      <tr>
        <td width="1020" height="141" valign="top" background="../images/main.jpg"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','159','height','64','src','../headers/Header3','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','../headers/Header3' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="159" height="64">
            <param name="movie" value="../headers/Header3.swf">
            <param name="quality" value="high">
            <embed src="../headers/Header3.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="159" height="64"></embed>
        </object></noscript></td>
        <td align="right" valign="bottom" nowrap class="style2"><%= FormatDateTime(Date, 1)%></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td width="100%" height="19" align="left" background="../menubar.jpg"><table width="100%" height="32" border="0" cellpadding="0" cellspacing="0" background="../images/menuspacer3.gif">
      <tr>
        <td width="100%" align="right"><%
  'Dynamic CSS Menu
  Response.write (DynCSSMenu1.render)
%></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top"><table width="100%" border="0" cellspacing="10" cellpadding="10">
      <tr>
        <td valign="top"><div id="cssMenu2" class="horizontal">
          <ul class="aqua_blue">
            <li> <a href="client2.asp" title="All Records">All Records</a> </li>
            <li> <a href="clientbc2.asp" title="Business Cards">Business
                Cards</a> </li>
            <li> <a href="clientchecks2.asp" title="Checks">Checks</a> </li>
            <li> <a href="clientenvelopes2.asp" title="Envelopes">Envelopes</a> </li>
            <li> <a href="clientforms2.asp" title="Forms">Forms</a> </li>
            <li> <a href="clientlabels2.asp" title="Labels">Labels</a> </li>
            <li> <a href="clientlogos2.asp" title="Logos">Logos</a> </li>
            <li> <a href="clientpromo2.asp" title="Promo. Items">Promo.
                Items</a> </li>
            <li> <a href="clientnewsletters2.asp" title="Newsletters">Newsletters</a> </li>
            <li> <a href="clientstationary2.asp" title="Stationary">Stationary</a> </li>
            <li> <a href="clientwearables2.asp" title="Wearables">Wearables</a> </li>
          </ul>
          <br />
          <script type="text/javascript">
      <!--
    var obj_cssMenu2 = new CSSMenu("cssMenu2");
    obj_cssMenu2.setTimeouts(400, 200, 800);
    obj_cssMenu2.setSubMenuOffset(0, 0, 0, 0);
    obj_cssMenu2.setHighliteCurrent(true);
    obj_cssMenu2.setAnimation('slide');
    obj_cssMenu2.show();
   //-->
          </script>
        </div>
          <h3><span class="style1">Welcome <%= Session("kt_login_user") %> </span> <a href="loginupdate.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image85','','../images/changeaccountdown.jpg',1)"><br>
            <br>
          </a><a href="loginupdate5.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','../images/changeaccountdown.jpg',1)"><img src="../images/changeaccountup.jpg" alt="change login info" name="Image7" width="130" height="26" border="0"></a><a href="loginupdate.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image85','','../images/changeaccountdown.jpg',1)"></a></h3>
          <form name="form1" method="post" action="">
            <label>Keywords
              <input name="keywords" type="text" id="keywords">
  </label>
            <label>
              <input type="submit" name="Submit" value="Search">
              </label>
            <br>
            </form>
          <table width="300" border="1">
            <tr>
              <%
  ' Horizontal Looper version 3
  While ((Repeat_Recordset1__numRowsHL <> 0) AND (NOT Recordset1.EOF))
%>
 <%Session("ProofID") = (Recordset1.Fields.Item("proof_ID").Value)%>
                <td valign="baseline"><p><a href="<%=tNG_downloadDynamicFile("../", "../proofs/", "{Recordset1.proof_fileName}")%>"><img src="<%=tNG_showDynamicImage("../", "../thumbnails/", "{Recordset1.proof_thumb}")%>" /></a><br>
                  Date: <%=(Recordset1.Fields.Item("proof_date").Value)%><br>
                  Desc.: <%=(Recordset1.Fields.Item("proof_desc").Value)%><br>
                  Form #: <%=(Recordset1.Fields.Item("proof_formNumber").Value)%><br>
                  Keywords: <%=(Recordset1.Fields.Item("proof_keywords").Value)%><br>
                  <a href="emailassociate3.asp?IDNumber=<%=(Recordset1.Fields.Item("proof_ID").Value)%>&assoc=<%=(Recordset1.Fields.Item("proof_associate").Value)%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image75','','../images/emailassociatedown.jpg',1)"><img src="../images/emailassociateaboutjobup.jpg" alt="email associate about this job" width="190" height="26" border="0" align="absbottom"></a><a href="emailassociate2.asp?IDNumber=<%=(Recordset1.Fields.Item("proof_ID").Value)%>&assoc=<%=(Recordset1.Fields.Item("proof_associate").Value)%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','../images/emailassociatedown.jpg',1)"></a><br>
                  <a href="emailartdept2.asp?IDNumber=<%=(Recordset1.Fields.Item("proof_ID").Value)%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','../images/emailartdeptdown.jpg',1)"><img src="../images/emailartdeptup.jpg" alt="email art dept " name="Image8" width="190" height="26" border="0"></a> <a href="reorder.asp?IDNumber=<%=(Recordset1.Fields.Item("proof_ID").Value)%>&assoc=<%=(Recordset1.Fields.Item("proof_associate").Value)%>">
<%
' Show IF Conditional region1
  If (RecordsetUsr.Fields.Item("Usr_Invoiced").Value) = 1 Then
%>
  <img src="../images/ReorderButton.jpg" width="190" height="26" border="0">
  <%
  End If
' End Conditional region1
%>
                  </a><%=(Recordset1.Fields.Item("proof_ID").Value)%><%= Session("ProofID") %><br>
                  <%
' Show IF Conditional region2
  If (Recordset1.Fields.Item("proof_shopping_cart").Value) = 1 Then
%>
                  <form name="eCart1_1_ATC_<%=Recordset1.Fields("proof_ID").value%>" method="POST" action="<%=cStr(Request.ServerVariables("SCRIPT_NAME"))%><%=WA_eCart_IIf((Request.ServerVariables("QUERY_STRING") <> ""), "?" & Request.ServerVariables("QUERY_STRING"), "")%>">
                    <input type="hidden" name="eCart1_1_ID_Add" value="<%=Recordset1.Fields("proof_ID").value%>" >
                    <select name="eCart1_1_Quantity_Add">
                      <%
While (NOT Recordset2.EOF)
%><option value="<%=(Recordset2.Fields.Item("price_quantity").Value)%>"><%=(Recordset2.Fields.Item("price_quantity").Value)%></option>
                      <%
  Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
  Recordset2.MoveFirst
Else
  Recordset2.Requery
End If
%>
                    </select>
<input type="submit" value="Add to Cart" name="eCart1_1_ATC">
                  </form>
                  <%
  End If
' End Conditional region2
%></td>
                <%
    'Horizontal Looper version 3
    Repeat_Recordset1__indexHL=Repeat_Recordset1__indexHL+1
    Repeat_Recordset1__numRowsHL=Repeat_Recordset1__numRowsHL-1
    Recordset1.MoveNext()
    if len(nested_Recordset1)<=0 then
      nested_Recordset1 = 1
    end if
    if ((Repeat_Recordset1__numRowsHL <> 0) AND (NOT Recordset1.EOF) AND (nested_Recordset1 mod 4 = 0)) then
      Response.Write "</tr><tr>"
    end if
    nested_Recordset1 = nested_Recordset1 + 1
    'end horizontal looper version 3
  Wend
%>
              </tr>
          </table>          
          <br>        </td>
        </tr>
    </table></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top"><font size="2" face="Arial, Helvetica, sans-serif"><br>
      </font><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"><img src="../images/flashlogo.jpg" width="20" height="20"> Click
      here to download Flash</a><br>
            <br>
            <a href="http://adobeacrobat-8.com/index.asp?PID=02ea59e6-b795-4459-9c62-e26a4f2db084"><img src="../images/acrobatlogo.jpg" width="20" height="20"> Click
    here to download Acrobat Reader 8</a></font></td>
    <td align="right" valign="bottom"><font size="2" face="Arial, Helvetica, sans-serif"><a href="../loginsecure.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image69','','../images/librarydown.jpg',1)"><br>
          <img src="../images/libraryup.jpg" name="Image69" width="200" height="36" border="0"><br>
           <br>
    </a><a href="filetransferclient.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','../images/Transfer-Logo.gif',0)"><img src="../images/Transfer-LogoUP.gif" name="Image6" width="200" height="80" border="0"></a><a href="../loginsecure.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image58','','../images/librarydown.jpg',1)"><br>
    </a><br>
    <a href="login.asp"><img src="../images/copyright.gif" width="276" height="19" border="0"></a> </font></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
rsCSSMenu1.Close()
Set rsCSSMenu1 = Nothing
%>
<%
RecordsetUsr.Close()
Set RecordsetUsr = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now