#!/usr/bin/perl -Tw ####################################################################################### # # # HTML-CART # # http://www.html-cart.com # # # # Copyright 2001 Internet Express Products # # # # Version: 1.0 Last Modified 09/07/2002 # # # ####################################################################################### # License # ####################################################################################### # # # # This software is offered as freeware. # # Permission to use, copy and distribute this software and its documentation is # # hereby granted, with the following restrictions: # # # # You may only distribute this software FREE OF CHARGE, and all copies of the # # distributed package should contain all the UNMODIFIED files that are in the # # original distribution # # # # You are allowed to modify this software in any way you would like, but you may NOT # # distribute the modified code. Modifications are to be distributed as patches to # # the released version. # # # # You are not allowed to use this software or any part of it for creating another # # program. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND # # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # # IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # # ####################################################################################### use CGI qw(:standard); use CGI::Carp qw/fatalsToBrowser/; ####################################################################################### require "./config.pl" || die "Can't require ./config.pl"; require "./encode.pl" || die "Can't require ./encode.pl"; $query = new CGI; foreach $sparam ($query->param()) { $form_data{$sparam} = $query->param($sparam); } print "Content-type: text/html\n\n"; if ($form_data{'get_code'}) { $encrypt_text = "$form_data{'name'}, $form_data{'price'}, $form_data{'shipping'}$form_data{'file'}"; $control = &hmac_hex($encrypt_text, $encrypt_key); $code = qq~
<form method="POST" action="$secure_url"> <input type="hidden" name="name" value="$form_data{'name'}"> <input type="hidden" name="price" value="$form_data{'price'}"> <input type="hidden" name="shipping" value="$form_data{'shipping'}"> <input type="hidden" name="page" value="$form_data{'page'}"> ~; if (-f "../download.cgi") { $code .= qq~ <input type="hidden" name="file" value="$form_data{'file'}"> ~; } $code .= qq~ <input type="hidden" name="control" value="$control"> <input type="text" name="qty" size="4" value="1"> <input type="submit" value="Add to Cart" name="order"> </form> |
|
View Cart Link: html-cart.cgi?display_cart=yes&page=index.htm Just replace 'index.htm' with the name of the page that you are placing this link on. |