#!/usr/bin/perl
# ^^ This line needs to point to the Perl intrepreter on your system.
# Ask your sysadmin the correct path, or type 'which perl' at the unix prompt.
# You need Perl 5 or higher. type 'perl -v' to get your version.
###########################################################################
# S-Mart Shopping Cart Script v1.8
# Shop smart. Shop S-Mart.
# Written by Barry Robison. (brobison@rcinet.com)
# This script uses code written by Matt Wright.
# Please visit his site at http://worldwidemart.com
# This script is mailware. Please e-mail me if you use it.
#
# Selling the code for this program without prior written consent is
# expressly forbidden. In other words, please ask first before you try and
# make money off of my program.
#
# Obtain permission before redistributing this software over the Internet or
# in any other medium. In all cases copyright and header must remain intact.
###########################################################################
# Custimization portion
###########################################################################
# The path to sendmail (or whatever mail system you use) on your system.
# If you have no clue, ask your sysadmin.
$mailprog = '/usr/bin/sendmail -i -t';
# System: are you using Un*x , Win32, or MacOS ??
# 1 = unix
# 2 = Win32 (WinNT / Win95)
# 3 = MacOS
$system = 1;
if ($system == 1) { $delim = "/" }
elsif ($system == 2) { $delim = "\\" }
elsif ($system == 3) { $delim = ":" }
# Do you want to use cookies or not? 1 to use cookies, 0 to use domain/IP
$usecookie = 0; # For now cookies aren't functional
# URL to this script:
$cgiurl = "http://www.lambco.com/cgi-bin/shop/shop.cgi";
$adminurl = "http://www.lambco.com/cgi-bin/shop/shop_admin.cgi";
#$secureurl = "http://www.lambco.com/cgi-bin/shop/shop.cgi";
# what is the base path to the directory where the files are (header,footer, order form)?
$basepath= "D:\\VHosts\\lambco\\public_html\\shop";
# what are your header and footer HTML docs?
$header = "header4shop.html";
$header2 = "header_shop.html";
$header3 = "header_2shop.html";
$footer = "footer_shop2.html";
$footer2 = "footer_shop.html";
$footer3 = "footer_shop3.html";
$footer4 = "footer_shop4.html";
$shop1 = "shop1.htm";
$shop2 = "shop2.htm";
# where are the button images located?
$imgdir = "http://www.lambco.com/shop";
# where is the order form HTML doc?
$order = "orderform3.html";
# where are the order choice HTML docs?
$order0 = "order0_shop.html";
$order00 = "order00_shop.html";
$ordere = "order_shop.html";
# where is your temporary directory for Shopping Carts?
# Make sure this directory is read/write
$tmpdir = "D:\\VHosts\\lambco\\public_html\\cgi-bin\\shop/tmp";
# Storename. Keep it simple, it's only used for file naming. (i.e. "store1")
# If you are running multiple stores on one server, using the same temp space,
# make sure they all have different names.
$storename = "shop1";
#if ($usecookie eq '1') {
#require 'cookie.lib';
#}
########################
# Death and taxes.
########################
# 0 = No taxes calculated.
# 1 = Calculate Tax by State
# 2 = Always calculate tax
$tax = "1";
# Default tax amount, if state is not specified, or if tax is
# always calculated.
# Example: You live in Ohio, so you have to charge sales tax to Ohio
# residents; set $taxamt = "0" (as a default) and then set OH to '.065'
# as shown below.
$taxamt = "0";
if ($tax eq '1') {
%taxes = (TX,'.0825')
}
#######################
# Shipping
#######################
# 0 = No shipping
# 1 = Shipping by number of items
# 2 = Non-variable shipping
# 3 = Shipping by weight
# 4 = Shipping by price
$shipping = "4";
# For non-variable shipping
if ($shipping eq '2') {
$shipamt = '5.00';
}
# For shipping by number of items
# It works like this (20,'20.00',11,'10.00',6,'5.00') For less than 20 items, charge $20.00.
# For 6 - 10 items charge $10.00, and so on
if ($shipping eq '1') {
%shipping = ('2','20.00','6','10.00','21','5.00');
}
# For shipping by weight:
# For <100 pounds charge $40, for <50 pounds charge $15, etc..
if ($shipping eq '3') {
%shipping = ('100','40.00','50','15.00','20','0.00');
}
# For shipping by price:
# (price,shipping,price,shipping,etc)
if ($shipping eq '4') {
%shipping = ('0.00','0.00','0.01','7.00','70.01','7.50','75.01','8.00','80.01','8.50','85.01','9.00','90.01','9.50','95.01','10.00','100.01','10.50','105.01','11.00','110.01','11.50','115.01','12.00','120.01','12.50','125.01','13.00','130.01','13.50','135.01','14.00','140.01','14.50','145.01','15.00','150.01','15.50','155.01','16.00','160.01','16.50','165.01','17.00','170.01','17.50','175.01','18.00','180.01','18.50','185.01','19.00','190.01','19.50','195.01','20.00','200.01','20.50','205.01','21.00','210.01','21.50','215.01','22.00','220.01','22.50','225.01','23.00','230.01','23.50','235.01','24.00','240.01','24.50','245.01','25.00','250.01','25.50','255.01','26.00','260.01','26.50','265.01','27.00','270.01','27.50','275.01','28.00','280.01','28.50','285.01','29.00','290.01','29.50','295.01','30.00','300.01','30.50','305.01','31.00','310.01','31.50','315.01','32.00','320.01','32.50','325.01','33.00','330.01','33.50','335.01','34.00','340.01','34.50','345.01','35.00','350.01','35.50','355.01','36.00','360.01','36.50','365.01','37.00','370.01','37.50','375.01','38.00','380.01','38.50','385.01','39.00','390.01','39.50','395.01','40.00','400.01','40.50','405.01','41.00','410.01','41.50','415.01','42.00','420.01','42.50','425.01','43.00','430.01','43.50','435.01','44.00','440.01','44.50','445.01','45.00','450.01','45.50','455.01','46.00','460.01','46.50','465.01','47.00','470.01','47.50','475.01','48.00','480.01','48.50','485.01','49.00','490.01','49.50','495.01','50.00','500.01','50.50','505.01','51.00','510.01','51.50','515.01','52.00','520.01','52.50','525.01','53.00','530.01','53.50','535.01','54.00','540.01','54.50','545.01','55.00','550.01','55.50','555.01','56.00','560.01','56.50','565.01','57.00','570.01','57.50','575.01','58.00','580.01','58.50','585.01','59.00','590.01','59.50','595.01','60.00');
}
## Multi Shipping
$multiship = 0;
if ($multiship eq 1) {
$shipdb = "shipping_shop.db";
}
#####################################################
# Misc
#####################################################
# Do you want to verify Credit Card Numbers?
# Keep in mind that all this does, is ensure that the number is in the proper format.
# It is in NO WAY an authorization, just a qualifier.
# $useverify = 0; who would give inaccurate information?
# $useverify = 1; Trust customers?! Ha!
$useverify = 1;
# Make sure you have ccverify.lib
if ($useverify eq '0') {
require 'ccverify.lib';
}
# If you don't want to go to the review page after adding an item, set this to # '1'
$useredirect = 1;
# Multiple Currencies: Let the shopper decide what currency to pay in!
# Patriotism - No other countries! $usecurrency=0
# Global Peace - Can't we all just get along? $usecurrency=1
# The vlaue for each currency should bet he exchange rate, based on the prices in your
# DB. So if you use U.S. dollars, set U.S. to '1'.
$multicurr = 0;
if ($multicurr eq '1') {
$currdb="currency.db";
}
###########################################################################
#
# Ok, so that's done. But now how do you put that whole catalogue on-line?
# Easy use the Inventory manager. It so easy that any idiot (even your
# customers!) can edit and update their on-line store! No need for training
# those schmucks HTML!
#
###########################################################################
# Do you want do do your own catalogue pages or have the computer generate
# then on the fly, from a inventory database?
# $useadmin = 0 (don't use it)
# $useadmin = 1 (use it!)
###########################################################################
$useadmin = 1;
if ($useadmin eq '1') {
# Where is the database file you want to use?
$resourcedb = "shop_database.db";
# Where is the ID file?
# All the ID file does is store an integer, that the admin script
# uses to base it's ItemID numbering from.
# It should be a blank, writable text file, create it yourself.
$idfile = "shop_item.id";
# Where are the product images?
$imageurl = "http://www.lambco.com/shop/images";
# Do you want to review command to show the product images?
# $useimage = 0; images scare me
# $useimage = 1; bring em on
$useimage = 0;
#Do you want to display the product ID number?
#useid = 0; no way!
#useid = 1; way
$useid = 0;
# Groups. Aisles. Rows. Whatever the hell you want to call them, they are
# A convenient way to divide a store into sections.
# List all your groups here:
# (name of group in database, 'how you want it to appear')
%groups = (aagradesets,'Basic Curriculum Grade Sets - Pre-K to 12',aaresources,'Resources for the Teacher',art,'Art',artappreciation,'Art Appreciation',bible,'Bible',booksaudio,'Books on Audio',character,'Character Classics',civics,'Civics',constitution,'Constitution',drivered,'Driver Education',economics,'Economics',foreign,'Foreign Language',geography,'Geography',government,'Government',grammar,'Grammar',health,'Health',history,'History',italic,'Italic Handwriting',mathematics,'Mathematics',music,'Music',penmanship,'Penmanship',philosophy,'Philosophy',phonics,'Phonics',physicaled,'Physical Education',reading,'Reading, Literature & Comprehension',readinga,' - Heroes of the Faith',readingb,' - Elsie Dinsmore Series',science,'Science',spelling,'Spelling',studyskills,'Study Skills',transcript,'LAMBCo High School Transcript Program©',typewriter,'Typewriter / Keyboarding',writing,'Writing');
###########################################################################
# Now how do you get the server to generate the pages?
# Easy simply make this call from your HTML:
# http://www.foo.com/smart/S-Mart.cgi?command=listitems&pos=0
# Now decide how many items to list at a time:
###########################################################################
$numtolist = "10";
###########################################################################
# That's it. No more mess. Let your customer worry about updating the
# database.
###########################################################################
}
###########################################################################
# S-Mart Tracking
#
# Allows your customers to check on the present status of their order
# and for you to receive and track all your orders, in a nice, easy way.
# Rather than receiving 50 e-mails a day waith orders, you can just
# logon and get a nice report of all unprocessed orders.
#
# $usetrack = 0; I like things the old fashioned way
# $usetrack = 1; I'm a hipster, keep me in the 90's !!
#
###########################################################################
$usetrack = 0;
if ($usetrack eq 1) {
# URL to the tracking script
$trackurl = "http://www.lambco.com/cgi-bin/shop/shop_track.cgi";
# Directory to store orders
# Not the same as the temp, becuase you CARE if orders get deleted
# when they shouldn't !!
$orderdir = "shop_orders";
# Database file
$trackdb = "shop_track.db";
# Shipping Type
# 0 = None (other)
# 1 = FedEx
# 2 = UPS
# 3 = Airborne Express
$shiptype = 1;
# What all possibilities are there for status?
%trackoption = ("pending", "Not Processed", "processed", "Processing", "shipped", "Shipped", "error", "Problem with order");
# If you want additional text sent to the user (when sent update e-mails)
%tracktext = ("shipped", "Your order has been sent out, please contact me with any additional info!\n");
# Do you want to let people know (by e-mail) when their order
# as been processed, shipped, etc .. ?
# $passivetrack = 0; Pull
# $passivetrack = 1; Push
$passivetrack = 0;
}
###########################################################################
1;
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
by: Adam314Posted on 2009-10-08 at 13:32:00ID: 25529756
You have this:
c_html\\cg i-bin\\sho p/tmp";
$system = 1;
which indicates a unix system.
And you have this:
$tmpdir = "D:\\VHosts\\lambco\\publi
This is not valid. Also, it looks like a windows style directory. Are you on windows, or unix? Either way, you need to fix this - give it a directory name that the webserver has access to write.