MiniVend 3.11 minivend-3.11
Mike Heins [Tue, 1 Sep 1998 05:00:00 +0000 (00:00 -0500)]
158 files changed:
INSTALL
MANIFEST
Makefile.PL
README [new file with mode: 0644]
README-win.txt [new file with mode: 0644]
README.OS [new file with mode: 0644]
WHATSNEW [new file with mode: 0644]
configure.bat
configure.htm [new file with mode: 0644]
dist/README
dist/README-win.txt
dist/README.OS
dist/WHATSNEW
dist/admin/catalog.cfg [new file with mode: 0644]
dist/admin/etc/profiles [new file with mode: 0644]
dist/admin/mv_admin.cfg [new file with mode: 0644]
dist/admin/pages/cancel.html [new file with mode: 0644]
dist/admin/pages/failed.html [new file with mode: 0644]
dist/admin/pages/flypage.html [new file with mode: 0644]
dist/admin/pages/hintfile.html [new file with mode: 0644]
dist/admin/pages/include/address_form [new file with mode: 0644]
dist/admin/pages/include/base_dir_form [new file with mode: 0644]
dist/admin/pages/include/cat_dir_form [new file with mode: 0644]
dist/admin/pages/include/catname_form [new file with mode: 0644]
dist/admin/pages/include/summary [new file with mode: 0644]
dist/admin/pages/menu.html [new file with mode: 0644]
dist/admin/pages/reconfig_results.html [new file with mode: 0644]
dist/admin/pages/seefile.html [new file with mode: 0644]
dist/admin/pages/special/noproduct.html [new file with mode: 0644]
dist/admin/pages/special/notfound.html [new file with mode: 0644]
dist/admin/pages/special/violation.html [new file with mode: 0644]
dist/admin/products/database.asc [new file with mode: 0644]
dist/admin/products/directive.asc [new file with mode: 0644]
dist/admin/products/locale.asc [new file with mode: 0644]
dist/admin/products/products.asc [new file with mode: 0644]
dist/admin/products/wizard.asc [new file with mode: 0644]
dist/admin/session/.empty [new file with mode: 0644]
dist/admin/subs.cfg [new file with mode: 0644]
dist/bin/autosplit [deleted file]
dist/bin/dump
dist/bin/expire
dist/bin/expireall [new file with mode: 0644]
dist/bin/localize
dist/bin/makecat
dist/bin/minivend
dist/bin/offline
dist/bin/start
dist/bin/start_inet
dist/bin/start_unix
dist/configure.pl
dist/error.log
dist/manifest
dist/minivend.cfg.dist
dist/simple/catalog.cfg
dist/simple/config/.empty
dist/simple/etc/order.number [deleted file]
dist/simple/html/index.html
dist/simple/html/nav.html [deleted file]
dist/simple/html/ord/basket.html [deleted file]
dist/simple/html/toc.html [deleted file]
dist/simple/images/browse.gif
dist/simple/images/browse_up.gif [new file with mode: 0644]
dist/simple/images/checkout.gif [new file with mode: 0644]
dist/simple/images/checkout_up.gif [new file with mode: 0644]
dist/simple/images/contents.gif
dist/simple/images/contents_up.gif [new file with mode: 0644]
dist/simple/images/details.gif
dist/simple/images/details_up.gif [new file with mode: 0644]
dist/simple/images/home.gif
dist/simple/images/home_up.gif [new file with mode: 0644]
dist/simple/images/ordernow.gif
dist/simple/images/ordernow_up.gif [new file with mode: 0644]
dist/simple/images/search.gif
dist/simple/images/search_up.gif [new file with mode: 0644]
dist/simple/locale.fr_FR [deleted file]
dist/simple/pages/browse.html
dist/simple/pages/browse1.html
dist/simple/pages/buttonbar.html
dist/simple/pages/canceled.html
dist/simple/pages/catalog.html
dist/simple/pages/flypage.html
dist/simple/pages/help/sec_faq.html
dist/simple/pages/help/security.html
dist/simple/pages/new_account.html
dist/simple/pages/ord/basket.html
dist/simple/pages/ord/checkout.html
dist/simple/pages/ord/receipt.html
dist/simple/pages/quantity.html
dist/simple/pages/rand1.html
dist/simple/pages/rand2.html
dist/simple/pages/rand3.html
dist/simple/pages/rand4.html
dist/simple/pages/rand5.html
dist/simple/pages/results.html
dist/simple/pages/special/badsearch.html
dist/simple/pages/special/canceled.html
dist/simple/pages/special/cc_not_valid.html
dist/simple/pages/special/confirmation.html [new file with mode: 0644]
dist/simple/pages/special/control.html [new file with mode: 0644]
dist/simple/pages/special/failed.html
dist/simple/pages/special/interact.html
dist/simple/pages/special/missing.html
dist/simple/pages/special/needfield.html
dist/simple/pages/special/nomatch.html
dist/simple/pages/special/noproduct.html
dist/simple/pages/special/notfound.html
dist/simple/pages/special/order_security.html
dist/simple/pages/special/reconfig.html
dist/simple/pages/special/sec_faq.html
dist/simple/pages/special/security.html
dist/simple/pages/special/violation.html
dist/simple/pages/srchform.html
dist/simple/products/locale.asc [new file with mode: 0644]
dist/simple/products/pricing.asc
dist/simple/products/ups_zone.asc [new file with mode: 0644]
dist/simple/reconfig
dist/simple/session/.empty
dist/simple/tmp/PageCache/.empty
dist/simple/tmp/SearchCache/.empty
dist/src/mvctl.c
dist/src/tlink.c
dist/src/tlink.pl
dist/src/vlink.c
dist/src/vlink.pl
doc/bullet.gif [moved from dist/simple/html/bullet.gif with 100% similarity]
doc/frtoc.html [moved from dist/simple/html/frtoc.html with 100% similarity]
doc/intro.html
doc/maxivend.html [new file with mode: 0644]
doc/minivend.html [moved from dist/simple/html/minivend.html with 89% similarity]
doc/nav.html [new file with mode: 0644]
doc/toc.html [new file with mode: 0644]
extra/File/CounterFile.pm
extra/File/Spec/Unix.pm
extra/HTML/Entities.pm
extra/URI/URL.pm [new file with mode: 0644]
lib/Vend/Config.pm
lib/Vend/Data.pm
lib/Vend/Glimpse.pm
lib/Vend/Http.pm
lib/Vend/Interpolate.pm
lib/Vend/MakeCat.pm
lib/Vend/Order.pm
lib/Vend/PageBuild.pm
lib/Vend/Parse.pm
lib/Vend/Parser.pm
lib/Vend/Scan.pm
lib/Vend/Search.pm
lib/Vend/Server.pm
lib/Vend/Session.pm
lib/Vend/Table/DBI.pm
lib/Vend/Table/DB_File.pm
lib/Vend/Table/GDBM.pm
lib/Vend/Table/Import.pm
lib/Vend/Table/InMemory.pm
lib/Vend/Table/Msql.pm
lib/Vend/TextSearch.pm
lib/Vend/UserDB.pm
lib/Vend/Util.pm

diff --git a/INSTALL b/INSTALL
index 765ecf2..a335a4e 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -2,6 +2,10 @@
 
                       I N S T A L L A T I O N
 
+IMPORTANT NOTE: The installation procedure has changed, we hope for the
+                better. Please read this even if you have installed
+                MiniVend before.
+
 We IMPLORE you to read all of the verbiage below.  We know how most
 of us are, so we put the install procedure up here, but if you have
 problems please read all of this file, PLUS the MiniVend documentation
@@ -9,7 +13,8 @@ in doc/minivend.html.  Also, please check out the official MiniVend
 FAQ at http://www.minivend.com/minivend/faq/ before you call for help.
 And send your system, Perl, and Minivend information, VERSIONS AND ALL!
 
-IMPORTANT NOTE: If you don't give evidence of having read and
+IMPORTANT NOTE: The installation procedure has changed, we hope for the
+                better. If you don't give evidence of having read and
                 heeded the above heartfelt plea, your email
                 may well be ignored.  Caveat Emptor.
 
@@ -17,7 +22,7 @@ IMPORTANT NOTE: If you don't give evidence of having read and
 WINDOWS INSTALLATION
 --------------------
 
-    Obtain the self-extracting executable minivend-3.10.exe
+    Obtain the self-extracting executable minivend-3.11.exe
     and double-click on it.
 
     IMPORTANT NOTE: If you get the message "Bad command or file name"
@@ -25,10 +30,10 @@ WINDOWS INSTALLATION
     on your machine or is not in your path.  Go to http://www.perl.com
     and install the *standard* 5.004 version (AKA the Gurusamy Sarathy
     port). MiniVend will not work with the ActiveState 5.003 port; it
-       appears to work well with the "Merge" port.
+    appears to work well with the ActiveState 5.005 "Merge" port.
     
     If you already have the CYGWIN.DLL executable or plan on using the
-    Perl link CGI, you can download the file minivend-3.10-nodll.exe
+    Perl link CGI, you can download the file minivend-3.11-nodll.exe
     and do the same.
 
     The defaults are set for Microsoft Personal Web Server on Win95 --
@@ -46,23 +51,28 @@ WINDOWS INSTALLATION
     Some features are untested in the Windows version, and it 
     can be considered a beta.
 
+    If you have installed the MIME::Base64 and URI::URL (from libwww)
+    modules, then there is a new interface that is available for
+    a GUI-like catalog configuration. It should run automatically
+       upon a new installation.
+
 UNIX INSTALLATION
 ------------------
 Here is the short version:
 
-    gzip -dc minivend-3.10.tar.gz | tar xvf -
-    cd minivend-3.10
+    gzip -dc minivend-3.11.tar.gz | tar xvf -
+    cd minivend-3.11
     ./configure
 
 Long version with comments:
 
     # Unzip and untar the file -- if you have GNU tar, you can substitute
-    # 'tar xzf minivend-3.10.tar.gz'
-    gzip -dc minivend-3.10.tar.gz | tar xvf -
+    # 'tar xzf minivend-3.11.tar.gz'
+    gzip -dc minivend-3.11.tar.gz | tar xvf -
 
     # Change directory to the one that was created 
     #
-    cd minivend-3.10
+    cd minivend-3.11
 
     # If you have trouble with picking up the wrong Perl version,
     # try  '/dir/where/perl/is/perl Makefile.PL
@@ -115,6 +125,13 @@ Long version with comments:
     #
     bin/start
 
+The new catalog installer is at:
+
+    http://the.configured.host:7786/mv_admin
+
+NOTE:   The MiniVend server must be running to use the installer.
+        We attempt to make this automatic on Windows. 8-)
+
 That should be it.  If you have problems, please do what is asked above,
 and pretty please reference the web site. And
 
@@ -141,15 +158,13 @@ Key things that people sometimes don't understand:
        space.  They are in the catalog directory of the catalog
        that is in question.
 
-    -- The highly interpolative nature of MiniVend and HTML tags
-       means that interpolation order, not page position order,
-       is often important when using the OLD tag syntax.
-
-       When using the NEW page syntax, tags are interpreted in
-       the order they appear on the page.
+    -- When using the NEW page syntax, the default in this version,
+       tags are interpreted in the order they appear on the page.
 
-       It is strongly recommended that you move to the new syntax,
-       as MiniVend 4.0 will be removing many of the old tags.
+    -- It is strongly recommended that you move to the new syntax,
+       as MiniVend 4.0 will be removing many of the old tags. If you
+       have pages that will be too much trouble to move, use
+       [compat][/compat] for now, but even that will go away.
 
     -- The first thing to do in setting up a custom MiniVend catalog
        is to define the database.  Everything with MiniVend stems
index 69631b3..1f9a976 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -9,17 +9,43 @@ UPGRADE
 WHATSNEW
 configure
 configure.bat
+configure.htm
 dist/README
 dist/README-win.txt
 dist/README.OS
 dist/WHATSNEW
-dist/bin/autosplit
+dist/admin/catalog.cfg
+dist/admin/etc/profiles
+dist/admin/mv_admin.cfg
+dist/admin/pages/cancel.html
+dist/admin/pages/failed.html
+dist/admin/pages/flypage.html
+dist/admin/pages/hintfile.html
+dist/admin/pages/include/address_form
+dist/admin/pages/include/base_dir_form
+dist/admin/pages/include/cat_dir_form
+dist/admin/pages/include/catname_form
+dist/admin/pages/include/summary
+dist/admin/pages/menu.html
+dist/admin/pages/reconfig_results.html
+dist/admin/pages/seefile.html
+dist/admin/pages/special/noproduct.html
+dist/admin/pages/special/notfound.html
+dist/admin/pages/special/violation.html
+dist/admin/products/database.asc
+dist/admin/products/directive.asc
+dist/admin/products/locale.asc
+dist/admin/products/products.asc
+dist/admin/products/wizard.asc
+dist/admin/session/.empty
+dist/admin/subs.cfg
 dist/bin/buildtree
 dist/bin/check
 dist/bin/checkstat.sh
 dist/bin/compact
 dist/bin/dump
 dist/bin/expire
+dist/bin/expireall
 dist/bin/htpasswd.pl
 dist/bin/ifdef
 dist/bin/localize
@@ -45,17 +71,10 @@ dist/manifest
 dist/minivend.cfg.dist
 dist/simple/catalog.cfg
 dist/simple/config/.empty
-dist/simple/etc/order.number
 dist/simple/etc/order.profiles
 dist/simple/etc/report
 dist/simple/etc/search.profiles
-dist/simple/html/bullet.gif
-dist/simple/html/frtoc.html
 dist/simple/html/index.html
-dist/simple/html/minivend.html
-dist/simple/html/nav.html
-dist/simple/html/ord/basket.html
-dist/simple/html/toc.html
 dist/simple/images/00-0011.jpg
 dist/simple/images/00-341.jpg
 dist/simple/images/00-342.jpg
@@ -68,19 +87,26 @@ dist/simple/images/artstore.gif
 dist/simple/images/bg.gif
 dist/simple/images/blue_pap.gif
 dist/simple/images/browse.gif
+dist/simple/images/browse_up.gif
 dist/simple/images/button_y.gif
+dist/simple/images/checkout.gif
+dist/simple/images/checkout_up.gif
 dist/simple/images/contents.gif
+dist/simple/images/contents_up.gif
 dist/simple/images/details.gif
+dist/simple/images/details_up.gif
 dist/simple/images/home.gif
+dist/simple/images/home_up.gif
 dist/simple/images/new.gif
 dist/simple/images/ordernow.gif
+dist/simple/images/ordernow_up.gif
 dist/simple/images/staircase.jpg
 dist/simple/images/redball.gif
 dist/simple/images/search.gif
+dist/simple/images/search_up.gif
 dist/simple/images/tshirt.gif
 dist/simple/images/undercon.gif
 dist/simple/images/web_srch.gif
-dist/simple/locale.fr_FR
 dist/simple/pages/browse.html
 dist/simple/pages/browse1.html
 dist/simple/pages/buttonbar.html
@@ -106,6 +132,8 @@ dist/simple/pages/results.html
 dist/simple/pages/special/badsearch.html
 dist/simple/pages/special/canceled.html
 dist/simple/pages/special/cc_not_valid.html
+dist/simple/pages/special/confirmation.html
+dist/simple/pages/special/control.html
 dist/simple/pages/special/failed.html
 dist/simple/pages/special/interact.html
 dist/simple/pages/special/missing.html
@@ -136,6 +164,7 @@ dist/simple/products/NextDayAirSaver.csv
 dist/simple/products/accessories.asc
 dist/simple/products/country.asc
 dist/simple/products/inventory.asc
+dist/simple/products/locale.asc
 dist/simple/products/pricing.asc
 dist/simple/products/products.asc
 dist/simple/products/salestax.asc
@@ -158,8 +187,10 @@ dist/src/tlink.pl
 dist/src/vlink.c
 dist/src/vlink.pl
 dist/userdb.cfg
+doc/bullet.gif
 doc/frtoc.html
 doc/intro.html
+doc/maxivend.html
 doc/minivend.html
 doc/nav.html
 doc/toc.html
@@ -171,6 +202,7 @@ extra/File/Spec/VMS.pm
 extra/File/Spec/Win32.pm
 extra/HTML/Entities.pm
 extra/IniConf.pm
+extra/URI/URL.pm
 lib/Vend/Cart.pm
 lib/Vend/Config.pm
 lib/Vend/Data.pm
index 041ddd7..61b7511 100644 (file)
@@ -26,7 +26,7 @@ my @mods_to_get;
 my $Lock_troubles;
 my $Windows;
 
-$VERSION = '3.10';
+$VERSION = '3.11';
 
 # See if we have the CPAN module
 my $Cpan = 0;
@@ -80,6 +80,8 @@ if($TermRead) {
        };
 }
 
+my $ActiveState;
+
 if($Config{osname} eq 'solaris') {
        eval { require 5.004 or require File::Lock };
        if($@) {
@@ -94,13 +96,33 @@ elsif($Config{osname} =~ /win32/i) {
        if($@) {
                                print <<EOF;
 Sorry -- this version of MiniVend for Windows requires
-Perl 5.004 -- the standard port of Perl.  The ActiveState
-5.003 version will not run MiniVend.
+Perl 5.004 or higher -- the standard port of Perl.  The
+ActiveState 5.003 version will not run MiniVend, but
+ActiveState 5.005 should work fine.
 
 See http://www.perl.com/ for information on how to get
 the standard Perl distribution.
 EOF
        }
+       $ActiveState = 1;
+       eval { require 5.005 };
+       if (! $@ and $Config{archname} =~ /object/) {
+               $ActiveState = 1;
+       }
+       if($ActiveState) {
+               eval {
+                       require DB_File;
+               };
+               push(@mods_to_get, 'DB_File') if $@;
+               eval {
+                       require MIME::Base64;
+               };
+               push(@mods_to_get, 'MIME-Base64') if $@;
+               eval {
+                       require URI::URL;
+               };
+               push(@mods_to_get, 'libwww') if $@;
+       }
 
 }
 elsif( $Config{osname} =~ /linux/i             and
@@ -233,9 +255,17 @@ sub my_prompt {
     $ans ? $ans : $def;
 }
 
+sub active_get {
+       my (@mods) = @_;
+       for(@mods) {
+               system "start ppm.pl install $_";
+       }
+}
+
 sub cpan_get {
        my($module, $libdir, $prompt) = @_;
        
+       return active_get($module) if $ActiveState;
        print <<EOF unless defined $CpanInit;
 
 Since you have the CPAN module installed and initialized,
@@ -270,7 +300,13 @@ EOF
        
        return undef unless defined $CPAN::Config;
        $CPAN::Config->{makepl_arg} = "INSTALLPRIVLIB=$libdir/lib INSTALLARCHLIB=$libdir/lib INSTALLSITELIB=$libdir/lib INSTALLMAN1DIR=none INSTALLMAN3DIR=none INSTALLSITEARCH=$libdir/lib INSTALLDIRS=perl";
-       return install($module);
+       $CPAN::Config->{keep_source_where} = "$libdir/src"
+               unless -w $CPAN::Config->{keep_source_where};
+       $CPAN::Config->{cpan_home} = "$libdir/src"
+               unless -w $CPAN::Config->{cpan_home};
+       $CPAN::Config->{build_dir} = "$libdir/src"
+               unless -w $CPAN::Config->{build_dir};
+       return CPAN::install($module);
 }
 
 sub initialize {
@@ -319,7 +355,7 @@ EOF
                }
                $realdir ||= $mvdir[0];
                $realdir=my_prompt("Where is your MiniVend to be installed? ",$realdir);
-
+               print "\n";
                $realdir =~ s:[\\/]\s*$::;
                $X{INSTALLARCHLIB}      = "$realdir/lib";
                $X{INSTALLPRIVLIB}      = "$realdir/lib";
@@ -328,11 +364,46 @@ EOF
                $X{INSTALLDIRS}     = "perl";
 
                if($Windows) {
+                       ACTIVEGET: {
+                               last ACTIVEGET unless @mods_to_get;
+                               unless( -f "_active_tried" or ! $ActiveState) {
+                                       print <<EOF;
+You appear to be running the ActiveState Perl port and are missing the
+following modules:
+
+  @mods_to_get
+
+These modules are very nice to have and we would like to try and get
+them. (You can still get MiniVend going without them, but it isn't 
+quite as slick.)
+
+We can try and get them with the Perl Package Manager (ppm.pl). If
+you are connected to the Internet then this might well work. (Proxy servers
+probably will not unless you have used them before with the PPM.)
+
+You will see some DOS boxes flash up on the screen. This is normal
+and will not hurt anything. If one fails, and you wait awhile, then
+close the window manually.
+
+If we can't get the modules on the first try we will not try again
+as long as the file "_active_tried" exists.
+
+EOF
+                                       my $ans = my_prompt("Try and get modules? ", 'yes');
+                                       last ACTIVEGET unless $ans =~ /^\s*y/i;
+                                       open TMP, ">_active_tried" and close TMP;
+                                       active_get(@mods_to_get);
+                               }
+                       }
+                       my $dosdir = $realdir;
+                       $dosdir =~ s:/:\\:g;
                        open(WINBAT, ">configure2.bat")
                                or die "create configure2.bat: $!\n";
                        print WINBAT <<EOF;
-CALL $Config{perlpath} Makefile.PL install $realdir\r
-pause\r
+$Config{perlpath} Makefile.PL install $realdir\r
+start configure.htm
+cd $dosdir
+$Config{perlpath} bin/minivend -serve
 EOF
                        close WINBAT;
                        exit;
@@ -387,6 +458,14 @@ MODCHECK: {
                        require SQL::Statement;
                };
        push(@mods_to_get, 'SQL::Statement') if $@ and $Cpan;
+       eval {
+                       require MIME::Base64;
+               };
+       push(@mods_to_get, 'MIME::Base64') if $@ and $Cpan;
+       eval {
+                       require URI::URL;
+               };
+       push(@mods_to_get, 'URI::URL') if $@ and $Cpan;
 
 }
 
@@ -400,15 +479,18 @@ UPGRADE: {
                print <<EOF unless defined $Upgrade;
 This looks like an upgrade.
 
-If you are upgrading from MiniVend 2.03 (or MiniVend 3.0 
-beta 6 or less) than the directory structure is changed
-quite a bit.
-
 Your minivend.cfg file will be saved, but other files will
 be overwritten and MAY BE REMOVED WITHOUT WARNING.
 Any custom templates that are not in the 'simple'
 or 'sample' directories will be saved.
 
+These lines will be written to your minivend.cfg if 
+they are not already present:
+
+       #include admin/mv_admin.cfg
+       Variable   MV_NO_CRYPT   1
+       AdminUser  minivend:nevairbe
+
 If you wish to escape to the shell and save some files
 first, enter ! or 'sh' at the prompt. (Of course when
 you 'exit' from the shell, you will return to this
@@ -438,10 +520,6 @@ EOF
 
 You may wish to inspect minivend.cfg.dist for new values.
 
-If you have used static page building, you must now 
-define "Static Yes" in all of your catalog.cfg files
-or the catalog will not run with static pages.
-
 Check the README file for changes you might have to make if
 updating from an earlier version of MiniVend.
 EOF
@@ -466,9 +544,19 @@ EOF
 
        my @files;
        my @winfiles;
-       my $tar;
+       my @extra_doc_files;
+       
+       # Save on space
+       opendir(DOCDIR, 'doc') or die "opendir doc: $!\n";
+       @files = grep /\.(html?|gif|jpe?g)$/i, readdir DOCDIR;
+       closedir DOCDIR;
+       for(@files) {
+               File::Copy::copy("doc/$_", 'dist/simple/html');
+               push @extra_doc_files, "dist/simple/html/$_";
+       }
 
        my $origdir = cwd();
+       
        open(MANIFILE, 'MANIFEST')
                or die "Couldn't open MANIFEST: $!\n";
        @files = <MANIFILE>;
@@ -477,6 +565,9 @@ EOF
        for(@extra_lib_files) {
                push @files, "lib/$_";
        }
+       for(@extra_doc_files) {
+               push @files, $_;
+       }
        $\17 = 0;
        if($Windows) {
                my $dll_source   = "win/cygwin.dll";
@@ -570,15 +661,32 @@ EOF
 
                File::Copy::copy('win/POSIX.pm', 'lib/POSIX.pm')
                        or die "File::Copy::copy error 'win/POSIX.pm': $!\n";
-               File::Copy::copy('Start MiniVend Server.pif', 'dist')
-                       or die "File::Copy::copy error 'Start MiniVend Server.pif': $!\n";
-               File::Copy::copy('Make MiniVend Catalog.pif', 'dist')
-                       or die "File::Copy::copy error 'Make MiniVend Catalog.pif': $!\n";
+
                @winfiles = grep m:^lib/:, @files;
+               eval {
+                       File::Copy::copy('Start MiniVend Server.pif', 'dist')
+                               or die "File::Copy::copy error 'Start MiniVend Server.pif': $!\n";
+                       File::Copy::copy('Make MiniVend Catalog.pif', 'dist')
+                               or die "File::Copy::copy error 'Make MiniVend Catalog.pif': $!\n";
+                       push @winfiles, 'Start MiniVend Server.pif';
+                       push @winfiles, 'Make MiniVend Catalog.pif';
+               };
+               if ($@) {
+                       my $windir = $realdir;
+                       $windir =~ s:/:\\:g;
+                       print <<EOF;
+The Shortcut files could not be made. Start the server with
+       
+       perl $realdir/bin/minivend -serve
+
+or
+
+       $windir\\minivend
+
+EOF
+               }
                push @winfiles, 'makecat.bat', 'minivend.bat';
                push @winfiles, 'lib/POSIX.pm';
-               push @winfiles, 'Start MiniVend Server.pif';
-               push @winfiles, 'Make MiniVend Catalog.pif';
                for (@winfiles) {
                        install_file('.', $realdir, $_);
                }
@@ -646,10 +754,16 @@ EOF
 
 WriteMakefile(
        NAME       => "MiniVend",
+       
        "DISTNAME" => "minivend",
        "MAN1PODS" => {},
-       "dist"     => { SUFFIX   => ".gz", DIST_DEFAULT => 'all tardist',
-                           COMPRESS => "gzip -9f", ZIP_FLAGS => '-pr9' },
+       "dist"     => {
+                                       CI => "ci -l -t-Initial",
+                                       SUFFIX   => ".gz",
+                                       DIST_DEFAULT => 'all tardist',
+                                       COMPRESS => "gzip -9f",
+                                       ZIP_FLAGS => '-pr9',
+                               },
        VERSION_FROM => "dist/bin/minivend",
        EXE_FILES => [],
        CONFIGURE  => \&initialize,
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..816ce8c
--- /dev/null
+++ b/README
@@ -0,0 +1,339 @@
+# MiniVend V3.11
+# 
+# Copyright 1996-1998 by Michael J. Heins <mikeh@minivend.com>
+#
+# Based on Vend 0.2
+# Copyright 1995 by Andrew M. Wilcox
+#
+# Portions from Vend 0.3
+# Copyright 1995,1996 by Andrew M. Wilcox
+#
+# This program is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later
+# version. 
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
+# USA.
+
+Welcome to MiniVend, originally based on Vend.  This program is
+completely unsupported, without warranty of any kind. The author is
+interested in problems, suggestions, or comments, but does not have time
+to offer free individual support in most cases. See the MiniVend website at
+http://www.minivend.com/minivend/ for more information.
+
+   IMPORTANT NOTE:  MiniVend 3.11 requires Perl 5.004 or higher.
+   (It will probably work with 5.003 on some UNIX systems and *may*
+   work with Perl 5.002 -- IF you comment out any lines which 
+   contain "use locale;". Neither are supported.)
+
+The information you need is in the following files:
+
+    README     Copyright info, roadmap to installation
+               and pointers to support system
+    
+    Copying    Your MiniVend license -- please read.
+
+    INSTALL    Installation instructions
+
+    README.OS  OS-specific information, if any
+
+    doc/       The MiniVend documentation.
+
+    WHATSNEW   Change information for all versions in this
+               version family.
+
+    MANIFEST   List of all core distribution files.
+    
+Major files/directories in the distribution:
+
+    configure
+    configure.bat
+    Makefile.PL The installation scripts. Try typing "./configure"
+                or "configure" to install.
+
+    dist/       The distribution files, exclusive of library
+                modules. Includes:
+
+                minivend.cfg.dist   Distribution minivend.cfg
+                simple/             The simple demo application.
+                bin/                Executables including scripts
+                src/                C and Perl code for CGI links
+
+    doc/        The documentation.
+
+    lib/        The library modules needed to run MiniVend.
+                 
+    win/        Windows-specific files
+            
+--------------------------------------------------------------
+
+                        M I N I V E N D
+                                       
+   MiniVend is a full-featured electronic catalog system (commonly known
+   as a shopping cart) with online ordering capability. It is designed to
+   provide an interface complete with SSL security and full database
+   support.
+   
+   MiniVend is freely-redistributable under the GNU General Public
+   License -- you can download it via FTP.
+
+    MiniVend 3.0 Features
+
+       * Users maintain a "shopping cart" for ordered items
+       * Multiple independent or shared catalogs allow one server
+         to run many storefronts or a "mall"
+       * SSL support means secure and practical credit card ordering
+       * PGP support for secure off-site mailing of orders
+       * Catalogs can be of almost unlimited size with excellent
+         performance
+       * Multi-server mode for very high capacity on systems with
+         sufficient memory
+       * Cookie support allows browsers to leave catalog and come
+         back without losing session state
+       * Complete addressable database support with virtually
+         unlimited rows and columns
+       * Complete SQL support including ODBC
+       * Many, many, other features
+
+    Powerful search capability
+
+       * One-click scan and search -- build a whole search in a single HREF
+       * Versatile built-in text search
+       * Complete Glimpse interface
+       * Fast binary search
+       * Range searching, numeric and alphanumeric
+       * Search sorting with reverse, numeric and case-insensitive options
+       * Independent field search selection and return
+       * Search any file, build results from any database
+
+    Complete control of appearance
+
+       * Full frames support
+       * Catalog pages automatically selected -- either built
+         "on the fly" from the database or pre-made for popular items
+       * The on-the-fly page is selectable from the database
+       * Embedded Perl and conditional HTML allow complex and
+         flexible catalog pages to be completely built from
+         the database
+
+    Flexible Ordering Process
+
+        * Multi-level order screens with configurable field
+          verification
+        * Multiple shopping carts per catalog, allows both buy
+          and sell operations
+        * Shipping calculation, mixed modes, with UPS table lookup
+        * Sales tax calculation, with fully independent non-taxable
+          item and taxed shipping
+        * PGP encryption of credit card information or
+          the entire emailed order
+        * Fully-configurable discounts with coupons or
+          across-the-board discounts
+        * Fully-configurable quantity pricing
+        * Fully-configurable item price adjustments
+        * Sophisticated back end order entry capability including CyberCash(R)
+        * Full client-side imagemap support, including frame targets and form
+          submits
+        * Fully configurable order reports and receipts
+
+    Easy Administration
+
+        * Automated installation and configuration
+        * Runs under Perl 5.004, Windows, and almost any UNIX
+        * Designed to be secure
+        * Offline database builds
+        * Static page build option for high performance
+        * Works well with all browsers
+
+
+-------------------------------------------------------------------
+
+                         D E M O
+
+There is a simple demo application included. 
+
+To install the demo, go to the MiniVend installation directory
+and run:
+
+    bin/makecat simple
+
+Follow the prompts and after restarting the MiniVend server you
+should be able to access the demo catalogs.
+
+-------------------------------------------------------------------
+
+                      A V A I L A B I L I T Y
+                              A N D
+                     C O M P A T I B I L I T Y
+
+MiniVend has been well-tested on Solaris 2, SunOS, Linux, HP-UX,
+BSDI, FreeBSD, and OSF/Alpha. It also reportedly runs on SCO,
+AIX, and other Unix ports.  It should work on any UNIX or Win32
+OS with Perl 5.004 or higher. It may run with Perl 5.003 or
+Perl 5.002, but the author disavows all responsibility for
+the results.
+
+IMPORTANT NOTE FOR WINDOWS: MiniVend will NOT run with the
+ActiveState port, otherwise known as 5.003 build 1XX. It
+REQUIRES, repeat REQUIRES, the standard version Perl 5.004. See
+http://www.perl.com/ for information on how to obtain it.
+
+Windows does not support fork(), so the server runs in the
+foreground. You need the DB_File module for best results,
+and that is not included in the standard distribution. You can
+get it at http://www.perl.com/CPAN-local (or any CPAN archive)
+in the ports/win32/Standard/x86/ directory.
+
+BSDI and FreeBSD are known to have problems with Perl socket
+code, which MiniVend relies heavily upon. You will probably
+need to run in INET/TLINK mode instead of UNIX/VLINK mode.
+
+-------------------------------------------------------------
+
+                      I N S T A L L A T I O N
+
+WINDOWS INSTALLATION
+--------------------
+
+    Obtain the self-extracting executable minivend-3.11.exe
+    and double-click on it. You MUST already have Perl 5.004
+    INSTALLED and in your PATH.
+
+    Alternatively, you can unzip the file yourself and run
+    "setup".
+
+UNIX INSTALLATION
+------------------
+Here is the short version:
+
+    gzip -dc minivend-3.11.tar.gz | tar xvf -
+    cd minivend-3.11
+    ./configure
+
+More information is in the file INSTALL.
+
+-- WHEN IN DOUBT, RE-START THE SERVER.  It won't take but a few
+   seconds, and changes in configurable options don't take effect
+   until it is done. You may even change a page and not see the
+   effect until the server is restarted.
+
+-------------------------------------------------------------
+
+                     D O C U M E N T A T I O N
+
+The documentation is in 2 files in the doc/ subdirectory of
+the main MiniVend directory:
+
+       toc.html       Table of contents
+       minivend.html  Main documentation file
+
+These files will be copied to the same HTML directory as
+the simple demo gateway files -- they would normally
+be referenced as:
+
+           http:/www.yourserver.com/simple/toc.html
+
+-------------------------------------------------------------
+
+                    K N O W N   P R O B L E M S
+
+RedHat Linux 5.0:
+        RedHat Linux 5.0 has a bad Perl distribution that causes
+        problems with POSIX. The real solution is to obtain the
+        latest.tar.gz file from CPAN and build a new Perl. Here
+        is the script to do that once you have obtained the 
+        latest.tar.gz file:
+
+            tar xzf latest.tar.gz
+            cd perl5.004*
+            perl -pi.dist -e \
+                "s:/ bsd / /:/ net / /' | sed -e 's/ bsd / c g /:; \
+                s/^#(POSIX_cflags)/POSIX_cflags/" \
+                hints/linux.sh
+            ./Configure -des && make test
+
+        That should get you a Perl which passes make test
+        one hundred percent and that works with MiniVend and
+        other programs which use the POSIX library. After
+        you have verified the "make test" passes fully
+        you should of course su to root and "make install".
+
+        This may soon be corrected by the Perl porters or by
+        RedHat, so bear in mind this is time-sensitive. The above
+        works well as of Jun. 3, 1998.
+
+IRIX, Solaris, Digital UNIX:
+       The server may not terminate immediately,
+       as the select() call blocks signals. It
+       will stop at the next request, or at the
+       end of the occasional houskeeping
+       cycle, set by the directive HouseKeeping in
+       minivend.cfg. Set to less than 10 to achieve
+       decent response.
+
+BSDI, FreeBSD:
+       The BSDI library code is not safely re-entrant
+       when used in combination with signals, so no
+       signals are sent during server usage.  This is
+       transparent to the user.
+
+       MiniVend may not as of this writing work with
+       BSDI 3.0 in UNIX mode, so you should use the INET
+       mode and the tlink program. This is the catalog
+       configurator default.
+
+       If the kernel parameter CHILD_MAX is not configured
+       above the default of 40, expect problems. Same with
+       SO_MAXCONN and some other kernel parameters. 
+
+Solaris:
+       If you are trying to run with Perl 5.003, which is
+       NOT recommended, you must use the File::Lock
+       module -- flock() emulation in Perl 5.003 does not
+       work properly, and fcntl() locking must be used.
+       This version of MiniVend includes File::Lock,
+       and attempts to install it.
+
+       Solaris 2.4 has problems with UNIX-domain sockets
+       and you can expect problems.  Bottom line is that
+       I will not support Solaris releases before 2.5, nor
+       Perl before 5.004.
+
+       You may not use OrderCounter when running Perl
+       5.003 and Solaris.
+
+       If you have Perl 5.004 you can disregard File::Lock.
+
+       It is STRONGLY RECOMMENDED that you update to Perl 5.004
+       when running on Solaris.
+
+Windows:
+       This is a new port, and just a few things don't work the
+       same as UNIX. See the README-win.txt file for more information.
+
+---------------------------------------------------------------------
+
+I, the author, am very interested in learning your problems with
+MiniVend, and am interested in clarifying the documentation for
+future improvements.  I am not much interested in BEING your
+documentation, though, unless you pay well and promptly. Please
+send kudos, comments, questions, and complaints to:
+
+       mikeh@minivend.com
+
+Note that I receive thousands of emailed questions per year and cannot
+answer them all. The more research you do on your own the more likely
+I am to respond. Helpful suggestions and real bug reports are almost
+always acknowledged.
+
+Good luck with MiniVend!
+
diff --git a/README-win.txt b/README-win.txt
new file mode 100644 (file)
index 0000000..a9dc5a0
--- /dev/null
@@ -0,0 +1,187 @@
+# MiniVend V3.11
+# 
+# Copyright 1996-1998 by Michael J. Heins <mikeh@iac.net>
+#
+# Largely based on Vend 0.2
+# Copyright 1995 by Andrew M. Wilcox
+#
+# Portions from Vend 0.3
+# Copyright 1995,1996 by Andrew M. Wilcox
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+-------------------------------------------------------------
+          M I N I V E N D   O N   W I N D O W S
+
+    System Requirements:
+
+        * Windows 95, 98 or Windows NT. Tested on Windows 95 OSR2
+          and NT 4.0 workstation.
+
+        * Perl 5.004 for Win32 or higher -- accept no substitutes. THIS
+          PROGRAM WILL RUN ON NO EARLIER VERSION OF PERL. PERIOD.  It
+          will not run on the ActiveState port build 3xx series; it
+          does appear to run very well with the "Merge" of the build
+          500 series. The version you probably want is also variously
+          known as the "CORE", "Standard", or "Gurusamy Sarathy" version.
+
+        * Web server. Almost any that has CGI capability
+          should work. Tested on Microsoft Personal Web Server,
+          NT IIS, and OmniHTTPD.
+
+        * Memory, memory, memory -- best guess is that things
+          will not run well on less than 32 MB of RAM, but your
+          mileage may vary. I don't trust the Windows system
+          performance indicator, as it indicates 86% free RAM on
+          my machine with 32M while MiniVend is running. I find
+          it hard to believe. That is the smallest RAM machine
+          I have, and MV ran fine on it -- it is a 486DX/100.
+
+    IMPORTANT NOTE:
+
+        If you use the Windows notepad or other editor which
+        willy-nilly adds carriage returns, and you edit
+        configuration files that may contain Perl code, or
+        that use EOF markers, or have data, you may have to
+        remove carriage returns before running MiniVend. If
+        you have problems, perform the following commands from the
+        DOS prompt:
+
+            perl -npi.bak -e "s:\r::g" <file-you-edited>
+
+        The error "illegal character \015" would be an indication
+        of this problem.
+
+        There are also reports that using DOS edit causes problems
+        with profiles.
+
+    Prior to Installation:
+
+       1. Make sure Perl 5.004 is fully installed. Perl 5.004
+          is mandatory -- you can get it at:
+
+             http://www.perl.com/CPAN/ports/win32/Standard/x86/
+
+          A list of CPAN sites is always available at:
+
+             http://www.perl.com/CPAN
+
+       2. From the same place you obtained Perl 5.004, get the
+          DB_File module, latest version of which is 1.54
+          at this writing. Install it according to the 
+          instructions in the README.NOW file.
+
+          If you have the ActiveState Perl 5.005, it should
+          work OK once you use the PPM (find it in your 
+          /perl/5.005XX/bin/ppm.pl) and get the following
+          modules:
+            
+                DB_File
+                MIME-Base64
+                libwww
+
+          The last two are to allow the new internal HTTP
+          server to work and provide a semi-GUI installation.
+
+          MiniVend might run without OK without DB_File, but
+          the user database will not be persistent and there
+          will be other anomalies.
+
+       3. Obtain and install BLAT if you wish to 
+          send emailed orders.
+
+            http://gepasi.dbs.aber.ac.uk/softw/Blat.html
+
+          Adjust the catalog.cfg parameter SendMailProgram
+          according to the path that you install it at -- MiniVend
+          should find it if it is in your path, and append the
+          right options. An example of a SendMailProgram:
+
+          SendMailProgram  blat - -t
+
+          (You must run 'blat -install' before it will work. Try
+          testing blat from the command line if your order is
+          not sent.)
+  
+    Installation:
+
+    1. Download the minivend-3.11.exe distribution file
+    and run it in the normal Windows fashion.
+    
+    ( If you don't want to execute the self-extracting ZIP file,
+      then you can obtain the standard minivend-3.11.tar.gz file and
+      install that instead. )
+      
+      You will have to obtain the CYGWIN.DLL file if you want to
+      use TLINK.EXE as your link CGI. The standard distribution .EXE
+      file has it included -- the minivend-3.11-nodll.exe file
+      eliminates it.
+
+    2. Select a directory to install MiniVend in -- it defaults
+    to /mvend on the default hard drive but you may put it anywhere.
+
+    3. You will need to know where your Web document root and
+    CGI directories are located.  The defaults are set for
+    Microsoft personal web server.
+
+    4. If your catalog is for testing purposes, you can
+    use the server name "127.0.0.1". If you want the catalog
+    to be accessible from the outside world, you will have
+    to enter a valid IP address or server name.
+
+    5. MiniVend will run as a service if you set it up with
+    srvany.exe or a similar program. Because the server
+    is single-tasked, it is recommended that you set up
+    a system agent to shut down the MV server, expire the
+    session database, and restart at least once per day.
+    (Expiration will always be needed to prevent the DBM files
+    or session directories from getting too big, and possible
+    memory leaks in Safe.pm make this a good idea anyway.)
+
+    6. Be careful of long-running searches -- because the server
+    will not handle multiple simultaneous requests as it does
+    on UNIX, searches will hold off user access. It is recommended
+    that you break your results pages into small (less than the
+    default 50-result) chunks by setting mv_matchlimit.
+
+-------------------------------------------------------------
+
+            W I N D O W S   D I F F E R E N C E S
+
+      * ODBC works fine, but you will need to have the
+        DBI::ODBC module properly installed. DBI also works
+        with MS SQL Server according to user reports.
+
+      * No fork() on Windows means that only one server
+        can run at a time. This means multiple requests
+        will be queued. In any case, lack of file locking
+        would mean big problems for multiple servers. Perl's
+               threading is too experimental to do the work required
+               to make MV thread-safe.
+
+      * Some of the support scripts will not work, and some
+        might not behave as in the documentation. In particular,
+        the expire script must not be run while the server
+        is running, as no file locking is available.
+
+      * You will need to hit Ctrl-C twice to stop the server
+        with some ports of Perl. If you can't stop the server,
+        close the DOS box.
+
+      * Memory leaks in the Safe.pm module may mean that
+        you will need to restart the server due to running
+        out of memory. It is recommended that you shutdown
+        and restart at least once a day.
+
diff --git a/README.OS b/README.OS
new file mode 100644 (file)
index 0000000..3598279
--- /dev/null
+++ b/README.OS
@@ -0,0 +1,88 @@
+# MiniVend V3.11
+# 
+# Copyright 1996-1998 by Michael J. Heins <mikeh@minivend.com>
+#
+
+                   M I S C E L L A N E O U S
+                         O S   N O T E S
+
+OS          Recommended DBM    Tested on     Notes
+--------   -----------------  ------------  -----------------------
+Linux         GDBM             2.0.x & up    This is what MiniVend is
+                                             developed on -- all features
+                                             should work normally.
+
+    IMPORTANT NOTE FOR REDHAT 5.0:
+    If MiniVend fails "make test" this usually means that the POSIX
+    library is broken on the distributed Perl. You can update
+    Perl or define the environment variable MINIVEND_BADPOSIX to 1.
+    See the README file under "K N O W N   P R O B L E M S"
+
+
+Windows 95    DB_File          ?????         MiniVend may not stand up
+                                             well for high-use
+                                             catalogs. Server will not stop
+                                             from the keyboard, you must close
+                                             the DOS window to stop (unless
+                                             you get the GNU toolset or
+                                             use the ActiveState "Merge").
+
+
+Windows NT    DB_File          ?????         Some features of MiniVend
+                                             will not work, mostly in
+                                             support scripts. MiniVend
+                                             will run as a service.
+
+
+FreeBSD       DB_File          2.1.0, 2.1.5  Many users run MiniVend on
+                                             this OS. You need Perl 5.004,
+                                             not the broken developement
+                                             version that comes with many
+                                             distributions.
+
+
+BSDI          DB_File          2.1, 3.0      Many users run MiniVend on
+                                             this OS. The vlink UNIX mode
+                                             will not work with V3.x but
+                                             tlink/INET works fine. You
+                                             need Perl 5.004 -- the
+                                             5.003_02 that comes with 3.x
+                                             probably will not work. 
+
+
+Solaris 2     GDBM             2.4,2.5       Many users run MiniVend on
+                                             this OS, no known problems
+                                             once you get it going.
+                                             Problems with installation
+                                             are usually due to poor or
+                                             missing development tools.
+
+SunOS 4.1.x   DB_File          4.1.x         Some users run MiniVend on
+                                             this OS, no known problems.
+
+
+DEC/OSF, aka  GDBM             3.0           Some users run MiniVend on
+Digital UNIX                                 this OS, no known problems.
+                                             
+
+IRIX          GDBM             5.3,6.2       Server may be difficult to
+                                             stop for re-configuration,
+                                             setting HouseKeeping value to
+                                             10 or less is recommended. No
+                                             other known problems provided
+                                             you have good development
+                                             tools.
+
+
+HP/UX          -               10.1          A few users, may be some
+                                             trouble with vlink/tlink
+                                             compilation.
+
+
+SCO            -               3.2           Should work fine as of 3.05
+
+AIX            -               4.1           Reported to work with little
+                                             difficulty
+
+UNIXware       -               2.1           Should work fine as of 3.05
+
diff --git a/WHATSNEW b/WHATSNEW
new file mode 100644 (file)
index 0000000..3bff4f5
--- /dev/null
+++ b/WHATSNEW
@@ -0,0 +1,940 @@
+
+                  W H A T ' S   N E W 
+
+MiniVend 3.11 is a major release enhancing many aspects of installation,
+product pricing, secure authorization, searching, and database updates.
+
+    * New experimental internal HTTP server means very fast
+      request handling direct from the browser, and built-in
+      internal security for admin tasks and protected catalog
+      pages. Will authorize users from the add-in userdb database
+      or any other MiniVend database. Supports crypt, minimal
+      access logging.
+
+      This internal HTTP server is not meant for production use.
+      It may have difficulty with MS Internet Explod^Her.
+
+    * New catalog configuration "wizard" and admin interface
+      built in. The installation should be a one-step
+      operation, completely automatic providing you have
+      the MIME::Base64 and URI::URL modules.
+
+       * New mv_admin catalog implements HTTP-based reconfiguration
+         from a central place. Tags provided for you to gate it
+         for individual users.
+
+    * CPAN module installation improved.
+
+    * The makecat script now can be completely run from the command
+      line, no interactive steps necessary. Values can be partially
+      filled in from the command line and you will be prompted
+      for the rest. A "guess" mode returns a reference as a
+      string guessing certain parameters from the ones you
+      supply. And you can do a --nocopy test run to check the
+      results before you actually copy the files.
+
+      Unfortunately the only documentation is the usage message.
+
+    * Makecat program adds catalogs to a running server.
+    
+    * German error messages added to error locale file (thanks to
+      Karsten Mueller).
+
+    * New CommonAdjust price setting scheme allows chained
+      conditional lookups in pricing, shipping, and taxing. Added
+      mv_price attribute for easy setting of prices in embedded
+      Perl. Added [discount-subtotal] tag which will reliably give
+      an item subtotal with discounts applied. New mv_discount
+      attribute allows individual line item discounts.
+
+    * TemplateDir (both local and global) allows missing
+      pages to "fall back" to other places. This allows
+      a catalog distribution that might only contain one
+      or two pages.
+
+    * Added LocaleDatabase, VariableDatabase, and DbDatabase;
+      these allow setting of the Locale, Variable, and Database
+      directives from a database table. This will allow maintenance
+      improvements (they still only change value on startup or
+      reconfigure.)
+
+      LocaleDatabase is implemented in the demo.
+
+    * Added support for CyberCash 3 (thanks to Gunnar Hellekson),
+      AUTHORIZE.NET, and PAYMENTNOW.COM.
+
+    * New [goto LABEL] and [label LABEL] allow chunks of a 
+      page to be skipped.
+
+    * DB_File databases can be automatically compacted with
+      the expire program; a standalone "compact" script is
+      also provided.
+
+    * Added PIDcheck global directive to allow monitoring of
+      "hung" processes. This should make MiniVend more reliable
+      especially in combination with Glimpse searching.
+
+    * Text search engine now will combine binary searching with
+      database-based searches. New mv_search_map allows reliable
+      coordinated searchspecs even with empty search specifications.
+
+    * Fixed multi-page sorting problems that were in MiniVend
+      since 3.00.
+
+    * Added new WideOpen directive so that catalogs can individually
+      be set to tolerate no IP address qualification. It is named
+      that because that is what you will be; you should not use this
+      if you ever store unencrypted credit cards (or other sensitive
+      info). It is also recommend that you shorten your expire time
+      to a small number of hours, maybe even 1 or 2.
+
+    * Added new FallbackIP directive to allow quasi-cookie capability
+      by IP address and browser id string. Use if you have lots of
+      users who don't take/give cookies. Suggest also that expire
+      times be made short, though two users would have to have the
+      same exact browser string and IP address. It will work with
+      cookies if they have them.
+
+    * Added va=var=value parameter to one-click search so you
+      can set a value with a link.
+
+    * Allow deletes with form database maintenance (mv_data_*).
+      Added mv_data_decode to gate HTML::Entities decoding of data;
+      this will allow easy and reliable display of multi-line fields
+      in a <TEXTAREA>.
+
+    * Added "expireall" script that expires all catalogs
+      in minivend.cfg by calling expire -c <name> [-r].
+
+       * Fixed longstanding "untie attempted" bug.
+
+    * Fixed mv_save_session so it actually will send the
+      user back to their saved session.
+
+MiniVend 3.10 is a bug-fix release with a few minor updates.
+
+    * New IpQuad global directive allows removal of any IP address
+      qualification from the session name, allowing transferred
+      sessions from server to server. Just set
+      
+        DomainTail No
+        IpHead     Yes
+        IpQuad     0
+
+      in minivend.cfg and transfer of sessions from AOL or WebTV
+      should now be possible. This makes it possible to use different
+      domains for the secure server and the non-secure server, even
+      when the browser will not set cookies outside the current
+      domain.
+
+      IMPORTANT NOTE: Remember that security is compromised
+      greatly by this; it should be used in combination with
+      PGP-encrypted credit card information with CreditCardAuto,
+      or with MiniVend's internal CyberCash routines. YOU SHOULD
+      NEVER STORE ANY UNENCRYPTED CREDIT CARD INFORMATION ANYWHERE
+      WHEN USING THIS WORKAROUND.
+
+    * New URLDECODE tag, specific to the new/HTML tag style, provides
+      unescape and URL translation services for <A HREF...> and
+      <IMG ....> tags. If you use FrontPage or other
+      HTML editors they will translate spaces to %20 within
+      an image SRC or anchor HREF. Now you can do:
+
+        <IMG MV=urldecode SRC="[value%20saved_image]"> 
+
+      Flypages and search lists are done automatically.
+
+    * HTML-style CHECKED and SELECTED now works properly.
+
+    * Fixed EXCEL import mode so it also strips paired double quotes.
+
+    * Lotus NOTES format can now be exported.
+
+    * Now can have separate language and currency locales,
+      using the mv_currency scratch variable just as with mv_locale;
+      and with [setlocale locale=fr_FR currency=en_US].
+
+    * New Global Locale tag gives global default for error
+      messages. Error messages are numbered by module, and can
+      be changed. A default file locale.error will define the
+      usable keys; it is not configured in by default.
+
+    * Error messages are numbered and the current locale can
+      be used to generate many of them. This is not yet complete,
+      but should be much improved. See the locale.error file for
+      a list of keys to define for translation.
+
+    * MiniVend should work with the Storable module version
+      0.6@3 or higher, greatly increasing speed of session
+      storage and recall. To use, install at least that version
+      and set the environment variable MINIVEND_STORABLE to 1.
+
+MiniVend 3.09 is a release that optimizes speed and adds features
+that allow operation with some HTML editors.
+
+    * SQL optimizations make dramatic differences in table
+      construction speed. MiniVend now uses internal structures to
+      maintain SQL column headings. This means that if you change
+      your SQL table structure, you must restart Minivend, but you
+      gain quite a bit of speed.
+
+      [if-data]/[item-data], [(if-)?loop-data], and [(if-)?sql-data]
+      tags are optimized across rows in the corresponding iterative
+      list. This means that two selects are done where dozens might
+      have been done before. Speed really increases.
+
+      This optimization works for [if-field]/[item-field] and friends
+      as well if there is only one products table (i.e. you didn't
+      set ProductFiles). If you have more than one, you should use
+      [item-data products ...] instead of [item-field ...] for best
+      speed when appropriate.
+
+    * To improve page response time, you can specify a SEND=1
+      attribute to any new-syntax MiniVend tag -- it sends the
+      output that has accumulated to that point. If you have named
+      your link program to begin with nph- (i.e. nph-simple instead
+      of simple) the program will start sending output immediately.
+      This can greatly improve apparent response time on large search
+      or loop lists.
+
+      The nph-executable can also be optionally used with an
+      alias:
+
+      Catalog simple /catalogs/simple /cgi-bin/simple /cgi-bin/nph-simple
+
+      If you reduce your vlink buffer size to 512 bytes, this will
+      improve likelihood of immediate response at some cost in CPU
+      utilization. (This change requires editing vlink.c and compiling --
+      don't worry about it if you don't know how to do that.)
+
+    * Search cache is *much* improved.  Paging and caching should now
+      be completely reliable. If the user hits reload, it will refresh the
+      page, as Pragma: no-cache is honored. Search paging is cached as well.
+      You can invalidate the cache for the next page only with 
+      [set mv_no_cache]1[/set].
+
+    * You can encase a set of links in:
+
+        [set mv_no_count]1[/set]
+        [page whatever]A page[/page]
+        [page whereever]Also a page[/page]
+        [set mv_no_count]0[/set]
+
+      The link count will be updated but not appended, making links
+      repeatable. This allows the browser to highlight visited links,
+      especially nice for paged searches.
+
+    * The last search can be reproduced with the [data session last_search]
+      via [page href="[data session last_search]"]. This includes
+      links to different pages of a multi-page search return.
+
+    * If you don't have the MD5 module for some reason (get it!)
+      MV does some better cache key generation with checksums,
+      reducing the likelihood of a collision.
+
+    * Fixed spurious "ClearCache" error at startup.
+
+    * MiniVend tags can now be contained within HTML tags, allowing MV
+      to work somewhat with most any HTML editor. The problem before was
+      that tags could not be placed between table rows with certain HTML
+      editors (like FrontPage and Netscape Composer). It is triggered by
+      including MV="tag arg arg.." as the *first* attribute of the HTML tag.
+      (Actually it can be later in the tag if no ] or > characters intervene.)
+      For example:
+
+        <TABLE>
+        <TR MV="loop" MV.search="ml=2000/se=Impressionists/sf=category">
+        <TD> [loop-field title] </TD>
+        <TD> [loop-code] </TD>
+        </TR>
+        </TABLE>
+
+      will display:
+
+        Sunflowers       00-341 
+        The Starry Night 00-342 
+
+      Arguments can be combined with tags if there is whitespace
+      in the first mv="tag arg.." call:
+
+        <TABLE>
+        <TR MV="loop 1 2 3">
+        <TD> [loop-code] </TD>
+        <TD> row </TD>
+        </TR>
+        </TABLE>
+
+      will display:
+
+        1 row
+        2 row
+        3 row
+
+      There are some differences in operations depending on the tag --
+      for instance, <A MV="page somepage" HREF="some_other_page.html">
+      will replace the instance of HREF with its own HREF. This allows
+      hrefs to work both for static HTML and MiniVend pages.
+
+      Also, <TR MV="if value whatever"> will pair with the matching
+      </TR>, but also "look ahead" for an [elsif ...] and [else] in
+      the next table rows (or tag set -- could be <LI MV="if ...">
+      </LI>, etc).
+
+      The <PRE MV="perl"> </PRE> combination will work for
+      cognitively-challenged HTML editors like Netscape Composer -- it
+      will retranslate the entities that it auto-translates. And you can
+      use <PARAM MV="if whatever"> </PARAM> <PARAM MV="else"> </PARAM> --
+      Netscape and Microsoft editors won't auto-delete those when they
+      read the file.  ( I really have learned to hate Netscape Composer
+      during the testing of this -- when loading a page, it deletes many
+      things it doesn't understand, without asking or even *telling* you.
+      Sheesh. Microsoft FrontPage, much to my surprise, is much better --
+      it allows you to add extended attributes keeps them in the tag. There
+      might be hope for it yet. In fact, look for me to add a "MiniVend"
+      menu for the FrontPage editor in the release.)
+
+      A special case comes with <SELECT ...> since the <OPTION> tag doesn't
+      support extended attributes (at least in FrontPage) there is now an
+      attribute MV.OPTION=varname for the loop tag. It has the effect of
+      SELECTED to the <OPTION> which is has the same value as the loop-code.
+      It will work limited circumstances like:
+
+        <SELECT MV=loop MV.ARG="__SHIPMODES__" MV.OPTION="mv_shipmode">
+            <OPTION VALUE="[loop-code]">
+                [shipping-desc [loop-code]] [shipping [loop-code]
+        </SELECT>
+
+      or
+      
+        <SELECT MV=loop NAME=country
+            MV.SEARCH="se=./ra=yes/fi=country.txt">
+            MV.OPTION="country" >
+                                    <OPTION> [loop-code]
+        </SELECT>
+
+      Bear in mind this is very preliminary editor support, there will
+      be lots of anomalies and deficiencies. More shall be revealed....
+
+    * Now can test for more than one condition via [and ...] and
+      [or ...]. This works like:
+
+        [if value whatever]
+        [or value whomever]
+        [and value however]
+            Do it. 2 out of 3 is enough.
+        [/if]
+
+      The last condition pertains, and there is no parentheses,
+      so you can't do [if ...][and ....][or ...]. But you could
+      still do:
+
+        [if value whomever]
+        [and value whatever]
+            Do it. 2 out of 3 is enough.
+        [elsif value whomever]
+        [and value however]
+            Do it. 2 out of 3 is enough.
+        [/elsif]
+        [/if]
+
+    * If conditions not containing an operator now have the 
+      comparison optimized away, removing a call to Safe. This
+      means much faster compares for things like [if value whatever]
+      and [if data table::column::row], where there is no equality
+      or regex pattern check.
+
+    * UPS-style lookup now can have up to 27 zones, can handle
+      alphanumeric postal codes (i.e. Canada), can use more than
+      three significant digits, can multiply weights by a factor
+      for pound/kg conversion, and is much better documented.
+
+    * [body ...] tag now accepts additional arguments to modify
+      a preset scheme. [body 1 TEXT=GREEN] will send the preset
+      scheme "1" with an additional parameter. Also can put in
+      an HTML body tag with <BODY MV="body 1 TEXT=GREEN"> to make
+      HTML editor processing easier.
+
+    * SQL search type can now be specified in a profile, a demi-bug
+      fixed.
+
+    * Greatly improved independent field matching that supports
+      the standard Perl operators plus "em" for exact match. Full
+      case sensitivity is included.
+
+    * When doing independent field matching a suitable qualifying
+      search is made when available. This greatly speeds searches
+      that depend on several conditions.
+
+    * [subtotal], [total-cost], [salestax], [shipping], and [price]
+      tags now all have a "noformat" option which just returns a raw
+      number.
+
+    * [price ...] tag fixed to fit documented behavior.
+
+    * Precision error in [salestax] fixed. Salestax and shipping
+      now use Locale->frac_digits places of precision (normally 2). Be
+      careful if you use frac_digits less than 2 -- if you want
+      even-dollar pricing you could instead use price_picture for
+      currency formatting and keep frac_digits at 2.
+
+    * [random], [rotate], [calc] and [currency] tags now auto-interpolate in
+       new mode.
+
+    * UPS-style lookup now can be used in up to 27 originating zones
+      in one catalog, non-numeric lookups are allowed, and lookups can
+      be more than three characters in length.
+
+    * Shipping can now be set to use the PriceDivide setting for
+      currency rate conversion, either global or individual.
+
+    * A new import format, Lotus Notes/structured text, is added.
+      Very useful for editing databases by hand.
+
+    * UseModifier can be set in scratch variables with a simple
+      [set mv_UseModifier]size color[/set], so you can have any number
+      of options for an item without having to set them all.
+
+    * Added order profile checks for "state", "province",
+      "province_or_state", "postcode", "ca_postcode", and "zip". Sorry,
+      only US/Canada supported, but you can add a check yourself
+      in a GlobalSub:
+
+GlobalSub <<EOF
+sub set_up_extra_check {
+    BEGIN {
+        package Vend::Order;
+        sub _pt_postcode {
+            # $ref is to Vend::Session->{'values'} hash
+            # $var is the passed name of the variable
+            # $val is current value of checked variable
+            my($ref, $var, $val) = @_;
+            
+            if ($ref->{country} =~ /^(PT|portugal)$/i) {
+                return $val =~ /^\d\d\d\d$/ ?  1 : 0;
+            }
+            else {
+                return 1;
+            }
+        }
+    }
+}
+EOF
+
+      Now you can specify in an order profile:
+
+          postcode=pt_postcode
+      
+      There must be an underscore preceding the routine name in this
+      case. Very elaborate checks are possible, of course. If some user
+      takes on the polyglot it would be appreciated if they contribute
+      the routines.
+
+      To you MiniVend hackers out there, this is a general technicque you can
+      use to override MV subroutines. For the most part, I try to keep the
+      same call interface, and this should make updates *much* easier.
+
+    * You can set a form variable value with the new "set" attribute
+      for the [value ...] and [default ...] tags. 
+         
+      Set the variable name to "Mike Heins" and do not return a value:
+
+         [value name=name set="Mike Heins"]
+
+      Set the country to "US", but only if not already defined, and return
+      the value:
+
+         [default name=country default=US set=1]
+      
+      New syntax only, for safety reasons.
+
+    * Added a -r option to the "expire" script. When using GDBM
+      sessions (and only GDBM) this will recover disk space and
+      shrink a large session file.
+
+
+MiniVend 3.08 is a maintenance release, but as usual adds a few
+features:
+
+    * Syntax of [search] tag much improved. Added auto
+      search for loop tag, allowing specification with
+      [loop search="se=searchstring/sf=searchfield"].
+      Use of search profiles is improved.
+
+    * Microsoft did not fix Excel in Office '97 as earlier
+      reported -- its TAB-delimited exports still surround
+      any field containing a comma with quotes. A new import
+      parameter has been added to deal with this.
+
+    * ProductFiles added to the list of directives updated
+      with a locale change.
+
+    * "display" option added to [item-accessories ...] tag,
+      to display only the *label* for the selected option.
+
+    * Radio and check box options added to [item-accessories ...]
+      tag. These display checkbox or radio groups for options. Can
+      also group boxes in tables, including columns if passed a
+      numerical parameter.
+
+    * Can now select options based on database field keyed
+      on something besides item code.
+
+    Fixes for:
+
+    * MiniVend used MakeMaker to install some distributed copies
+      of non-core Perl modules (and a modified Carp.pm). If you
+      installed with the parameter UNINST=1 then it would remove
+      the module.  That is bad news, and it is fixed. The module
+      Carp.pm was removed from the distribution, and other modules
+      are installed only by copying if appropriate versions are
+      not available, and are only installed in a private library
+      directory.
+
+    * Continuing "tar" problems with makecat. The system tar
+      program is now used for UNIX machines.
+
+    * Bad domain passing in a cookie. This should remove the
+      last problems with proxy servers losing sessions, providing
+      the secure server and regular HTTP server are in the same
+      domain for cookie purposes.
+
+    * Update of shopping cart caused loss of session only when
+      in master item/sub-item mode. Fixed.
+
+MiniVend 3.07 is a major release adding complete POSIX-style
+I18N features and many other tag language enhancements.
+
+    * Complete multiple currency sets based on locale. Uses
+      standard POSIX definitions.
+
+    * POSIX gettext/LC_MESSAGES style message display
+      for multiple language capabilities. A script called
+      localize is included which helps build Locale definitions.
+
+    * Price number display greatly enhanced.
+
+    * Sort lists now can specify a beginning entry
+      and a length, allowing pageable browse lists. Previous
+      versions needed to be done entirely in Perl. Demo
+      includes example.
+
+    * Simple demo now uses NewTags by default. Several
+      deficiencies cleaned up.  Locale example (French front
+      page and currency) example given. Several additional
+      examples given. Examples using deprecated features
+      changed to use current features.
+
+    * Added simple user login facility as an add-on module.
+      documented in UserDB.pm and shown in the demo. This is
+      also a useful example of how you can add your own extensions
+      to MiniVend.
+
+    * All iterative lists now have an [item-next] and [item-last]
+      (or [loop-next] and [loop-last]) capability for exiting and
+      skipping entries in loops.
+
+    * PriceAdjustment now handles embedded MiniVend
+      tags, allowing completely flexible product pricing.
+
+    * OrderProfile and SearchProfile now can be specified
+      in the page.
+
+    * Cookies now set for every path and domain in Mall
+      mode.
+
+    It also fixes some bugs/deficiencies:
+
+    * Static builds handle #name anchors when you use
+      [pagetarget page#name].
+
+    * Fixed simple demo so scratch directory 'tmp' gets
+      created on new install.
+
+    * Documentation corrections.
+
+    * Search [more-list] did not work under Windows -- fixed.
+
+MiniVend 3.06 fixes some bugs with 3.05 and adds some features.
+
+    * Catalog permissions configuration for multi-user,
+      multi-catalog servers greatly improved.
+
+    * Added [if ordered ...] back in, inadvertantly deleted
+      in 3.05.
+
+    * Added ! comparisons for [if ....][/if], [if-data ...],
+      [if-field ...] and the like.
+
+    * Made UserTag available globally in minivend.cfg.
+
+    * Only call CPAN if it was previously used by somebody.
+
+    * PriceAdjustment can now be absolute, where an 
+      adjustment value of =10.99 will set the price
+      directly to 10.99. Previously the adjustment was
+      only relative to the single price for the item.
+
+    * Added new CONTINUE modifier to allow more flexible
+      specification of long database fields during ASCII
+      import. DITTO format allows you to add additional text
+      on the next line, while UNIX accepts \ as a line
+      continuation. This allows you to maintain very
+      large description fields while still remaining within
+      the 255 character limit of many databases and
+      spreadsheets.
+
+    * Added passed default to [default variable]
+      tag, now can be [default variable passed-default].
+
+    * We can't always use POSIX::strftime anymore because of
+      bad RedHat 5.0 Perl release. 8-( A substitute routine is
+      provided and should be selected if POSIX::strftime doesn't
+      work. Instructions provided for making a good Perl, should
+      build OK.
+
+    * Added grouped items with mv_order_group. Using this,
+      Sub-items can be tied to a master item placed on a
+      form-based order.  The first mv_order_item defined
+      becomes the master, additional are sub-items. All
+      sub-items are deleted when a master item is deleted
+      from the cart.
+
+    * Fixed path problems with database/search path
+      resolution.
+
+    * Fixed VendURL mangling when going to a SecureURL
+      with a different SCRIPT_NAME.
+
+    * [compat] [/compat] tag pairs are stripped from [old]
+      pages.
+
+    * Static pages were shown to all browsers -- now only
+      shown to those which have given us back our cookie.
+
+    * [loop ...] lists are now reliably nested with 
+      [loop with="-a" arg="A B C"] or [loop-a 1 2 3].
+
+    * Tag end parsing fixed for [loop ...] and others that
+      auto-interpolate.
+
+    * Finally added a real debug facility, with multi-level
+      control and in-page display. Messages are still crude,
+      though, and user input is encouraged.
+
+    * Errors during catalog configuration are now
+      displayed to the console on startup.
+
+    * Slightly refined [more-list] to accept a different
+      border for selected and non-selected pages when using
+      images.
+
+    * Added error message in Windows install to prevent the
+      large number of questions from users who try to install
+      MiniVend without Perl 5.004 on the machine.
+
+    * CYGWIN.DLL now installed in SYSTEMROOT/system, not just
+      C:/windows/system.
+
+    * Tested on Windows NT 4.0 x386.
+
+MiniVend 3.05 is a major update that adds the following:
+
+    * Windows95/NT and UNIX versions unified, many changes
+      to handle line-ending differences
+
+    * SendMailProgram and EncryptProgram now accept 'none'
+      as parameters, avoid the need for external programs.
+
+    * Removed all autoloading options
+
+    * Added rotate "floor"
+
+    * Makecat program just a bit smarter about some things
+
+    * No UNIX command dependencies
+
+    * Removed sample demo from distribution, too outdated
+
+    * Catalogs can be added online
+
+    * Mode indicator file mode.{inet,unix} in MVROOT/etc
+
+    * Removed final vestiges of DES encryption
+
+    * Workaround for DBI <= 0.90 AutoCommit problem
+
+    * Went to multi-README files
+
+    Bug fixes include:
+
+    * Numerous fixes to sql_search (mv_searchtype=sql)
+
+    * Fixed tag_sort bug for multiple sorting of search lists
+
+    * Fixed [tag sql] query [/tag] to match docs
+
+    * Fixed missing Global variables
+
+    * Fixed close_database, no more SQL disconnect warnings
+
+    * Fixed bug in Windows file-based sessions
+
+MiniVend 3.04 is a minor release to fix bugs in 3.03:
+
+    * If file test was failing on a Safe trap. Fixed.
+
+    * PIPE databases did not work in 3.03 (only) -- they now
+      work well even for searching.
+
+    * Major bug in new parser fixed, now virtually every
+      tag should be parsed by MiniVend in 'NewTags Yes'
+      mode.  Switching to the new parser is recommended,
+      as new features will not be added to the old parser.
+
+    * New [elsif ...] addition to [if ...] was not
+      documented or announced.
+
+    * Perl 5.003 should run MiniVend without changes.
+
+    * Escape mechanism for values works properly.
+
+    * [include file] tag added.
+
+    * UserTag now accepts Interpolate option.
+
+    * Other minor bug fixes.
+
+MiniVend 3.03 has many bug fixes and feature set improvements.
+
+There is one incompatible change:
+
+    * If you are using Static builds, you must now define
+      'Static Yes' in the catalog.cfg file to get static
+      pages to build or run.  This was done to provide a
+      single "on/off" switch for static builds.
+
+As well as adding the following features/fixes:
+
+    * The new tag syntax is more reliable and trouble-free, 
+      and a UserTag directive allows user-defined tags. For example,
+      you can do:
+
+        UserTag  caps  Routine  sub { return "\U@_" }
+        UserTag  caps  HasEndTag
+
+      and have "[caps]uppercase[/caps]" become "UPPERCASE".
+
+      In addition, almost all old-style tags will be parsed
+      properly by the new tag parser.
+
+    * Sorting has been improved and regularized. All iterative
+      lists may be sorted with the same syntax, and all may be sorted
+      on any database field entry.
+
+        [search-list]
+        [sort products:category products:name:f]
+        ...
+        [/search-list]
+
+      The above will sort a search return on two fields in
+      the database -- and will work the same for shopping carts,
+      loop lists, and [tag each products].
+      There are unlimited levels of sort, and all sorts may individually
+      have options for numeric, case-insensitive, and reverse. See the
+      section SORTING in minivend.html.
+
+    * Added [on-change name] tag to allow conditional nested search
+      display.
+
+    * Salestax bug fixed, 'default' now works.
+
+    * AllowGlobal lets certain "trusted" catalogs define global
+      subroutines. AdminSub restricts certain subroutine names.
+
+    * ImageAlias does the same thing for MiniVend images that
+      Apache/NCSA does with Alias.
+
+    * A robot defense now allows you to limit the number of line
+      items in the shopping cart or cut off access to a host that
+      accesses a certain number of pages without at least one 30 
+      second pause. Implemented with OrderLineLimit and RobotLimit
+      directives on a per-catalog basis, and the LockoutCommand
+      directive as a global parameter.
+
+    * SQL numerical types are now handled properly if you set the
+      NUMERIC option in catalog.cfg, i.e.:
+        
+        Database  products  NUMERIC price
+        Database  inventory NUMERIC on_hand
+
+    * The server will now fall back to UNIX mode only if the
+      TcpPort (7786 by default) is occupied and it cannot bind().
+      This does not apply if MiniVend was started in INET mode only,
+      but there will now be a better log message indicating the
+      server is stopped.
+
+    * Started allowing a lower case POST method -- many browsers
+      seem to violate the HTTP spec in that regard. This mitigates
+      the common "interaction error" problem.
+
+    * Fixed bug in CyberCash processing that allowed only the
+      'mauthcapture' mode.
+
+    * Deleted SearchOverMsg directive -- you must now set 
+      mv_search_over_msg directly if you want to use it.
+
+MiniVend 3.02 adds full SQL support. In addition, several minor
+demo flaws have been polished, and some bugs in the new geographic
+shipping changes have been fixed.
+
+Changes include:
+
+    * Full SQL support, including for ODBC, using the powerful
+      DBI/DBD interface. It should operate on all DBI-compliant drivers -- it
+      has been tested with MySQL, mSQL, Solid, ODBC, and PostgreSQL.
+
+    * All database documentation greatly improved.
+
+    * Geographic qualification for shipping works.
+
+    * mv_credit_card_valid now returned as blank false value
+      instead of 0 false value.
+
+    * =true added to order profile checks, will pass on Yes|True|1
+      and fail on anything else.
+
+MiniVend 3.00 is greatly changed from MiniVend 2.03, though catalogs
+should be almost completely compatible. The exceptions are one or two
+pricing and shipping database changes.  In both cases, there is available
+backward compatibility. 
+
+Changes include:
+
+    * Installation has been changed to fit the Perl model
+      of 'perl Makefile.PL; make; make test; make install'.
+      You can also just type './configure' to perform this
+      in one step.
+
+      Perl 5.004 allows retrieval and installation of MiniVend
+      with 'perl -MCPAN -e 'install Vend::Cart' at the 
+      command line.
+
+    * Catalog builder program improved to read Apache/NCSA-style
+      configuration files and supply some intelligent defaults.
+      Command-line editing and history are supported when teh
+      Term::Readline package is available.
+
+    * Optional modules automatically fetched with CPAN module
+      if available.
+
+    * A powerful static page building capability is in place.
+      This allows completely automated generation of static HTML
+      pages based on MiniVend databases.  Use it to build static
+      category lists and product pages that will load quickly without
+      the necessity of MiniVend parsing them.
+
+    * Dynamic page parsing speed is increased by about 30% when
+      using the standard syntax.
+
+    * Multiple product databases allow the breakout of product lines,
+      new-used product separation, multi-vendor order routing, and
+      more.  The database an item is ordered from is kept with the
+      item in the shopping cart, so items ordered with the same part
+      number from different databases will not overwrite each other.
+
+    * Database tables are now writeable.  Atomic incrementation is
+      supported, which means that reliable inventory counts can be
+      kept.  Form-based database updates are expanded to encompass
+      all databases, not just mSQL.
+
+    * Transactions can be logged to an arbitrary file in an arbitrary
+      format with [tag log file]data[/tag].
+
+    * Databases can be exported to an ASCII file with the [tag export ...]
+      [/tag] construct.
+
+    * Shipping is much improved, with built-in subroutine calls, 
+      error messages for out of bounds condtions, drop-in UPS zone
+      files, configurable handling charges, UPS cost rounding, geographic
+      qualification, and more regular syntax.
+
+    * Item attribute selection greatly improved, with automated building
+      of the item attribute selection.  Item attributes can easily be 
+      specified at the time of order.
+
+    * Item attributes can cause price adjustments on either an
+      item basis or attribute basis.
+
+    * Uses Data::Dumper's C-based uneval code when available,
+      improving session storage speed.
+
+    * Database tables are only actually opened when referenced,
+      improving speed greatly on systems that have a large number
+      of tables in the database.
+
+    * Experimental DBI/DBD example interface provided, which
+      will allow attachment of supported SQL databases like Solid,
+      Oracle, or Sybase. THIS IS EARLY ALPHA SOFTWARE. Use only on
+      an experimental basis, never with live data.
+
+    * Search engine has improved coordinated matching, with full
+      field-independent case-sensitivity, substring matching, and
+      negation.
+
+    * Search speed greatly improved when doing complex
+      field-coordinated searches.
+
+    * The FullUrl directive allows different virtual hosts to have
+      link programs with the same name, i.e. all named /cgi-bin/shop.
+
+    * A new (and still experimental) page syntax allows more regular
+      parsing of tags, removing some of the interpolation-order anomalies
+      inherent in the old-style tags. It can be invoked on individual
+      pages with the [new] tag.
+
+    * Search cacheing is much improved, and searches can be pre-built
+      when using the static page build capability.
+
+    * Pages can be cached, which especially improves performance of
+      large parsed pages. Static build is preferred to cache, but
+      with large databases it is not practical to build every item
+      in advance.
+
+    * Supports Perl 5.004 transparently, making runtime changes to
+      affected modules.
+
+    * Better security with the NoAbsolute, AdminPage, .access, and
+      AdminDatabase tags.
+
+    * Improved handling of cookies, with savable sessions and dynamic
+      expire times.
+
+    * Mailed orders may have MIME attachements. Though the author
+      loathes routinely-used MIME, it has value as a way to attach
+      an encrypted credit card number for easy processing by an
+      order entry workstation.
+
+    * Search sorting bugs fixed.
+
+    * New $Safe{'cgi'}->{form_value} access in embedded Perl allows
+      complex conditional search or order routines to be more
+      intelligent with regard to user input.
+
+    * New FormIgnore directive allows certain variables to be
+      expunged from the user session.
+
+    * Discounted prices can be displayed directly
+      with [discount-price].
+
+    * Cookies can be configured for expiration times and multiple
+      servers in a domain.
+
+    * Runs with taint checking enabled, even when using
+      most embedded Perl code.
+
+    * Many other minor bug fixes, improvements, and changes.
+
+-------------------------------------------------------------
+
+
index dcdd205..fe46c76 100644 (file)
@@ -8,5 +8,5 @@ echo ------------------------------------------------------------
 echo IF YOU DO HAVE PERL 5.004 installed,
 echo unzip the file to a directory and try:
 echo ------------------------------------------------------------
-echo    cd minivend-3.10
+echo    cd minivend-3.11
 echo    c:\perl\bin\perl Makefile.PL
diff --git a/configure.htm b/configure.htm
new file mode 100644 (file)
index 0000000..c83c712
--- /dev/null
@@ -0,0 +1,12 @@
+<HTML><HEAD>
+<TITLE>MiniVend Administration</TITLE>
+</HEAD>
+<BODY BGCOLOR="#C0C0C0">
+
+<H1>MiniVend Startup</H1>
+
+<I>(Wait until the MiniVend server starts...could take several seconds.)</I><BR><BR><BR>
+<A HREF="http://localhost:7786/mv_admin/makecat_step1">Make a new catalog</A></B><BR><BR>
+
+</BODY>
+</HTML>
index 200ff3b..816ce8c 100644 (file)
@@ -1,4 +1,4 @@
-# MiniVend V3.10
+# MiniVend V3.11
 # 
 # Copyright 1996-1998 by Michael J. Heins <mikeh@minivend.com>
 #
@@ -30,7 +30,7 @@ interested in problems, suggestions, or comments, but does not have time
 to offer free individual support in most cases. See the MiniVend website at
 http://www.minivend.com/minivend/ for more information.
 
-   IMPORTANT NOTE:  MiniVend 3.10 requires Perl 5.004 or higher.
+   IMPORTANT NOTE:  MiniVend 3.11 requires Perl 5.004 or higher.
    (It will probably work with 5.003 on some UNIX systems and *may*
    work with Perl 5.002 -- IF you comment out any lines which 
    contain "use locale;". Neither are supported.)
@@ -204,7 +204,7 @@ need to run in INET/TLINK mode instead of UNIX/VLINK mode.
 WINDOWS INSTALLATION
 --------------------
 
-    Obtain the self-extracting executable minivend-3.10.exe
+    Obtain the self-extracting executable minivend-3.11.exe
     and double-click on it. You MUST already have Perl 5.004
     INSTALLED and in your PATH.
 
@@ -215,8 +215,8 @@ UNIX INSTALLATION
 ------------------
 Here is the short version:
 
-    gzip -dc minivend-3.10.tar.gz | tar xvf -
-    cd minivend-3.10
+    gzip -dc minivend-3.11.tar.gz | tar xvf -
+    cd minivend-3.11
     ./configure
 
 More information is in the file INSTALL.
index 6fe6059..8103460 100644 (file)
@@ -1,4 +1,4 @@
-# MiniVend V3.10
+# MiniVend V3.11
 # 
 # Copyright 1996-1998 by Michael J. Heins <mikeh@iac.net>
 #
   
     Installation:
 
-    1. Download the minivend-3.10.exe distribution file
+    1. Download the minivend-3.11.exe distribution file
     and run it in the normal Windows fashion.
     
     ( If you don't want to execute the self-extracting ZIP file,
-      then you can obtain the standard minivend-3.10.tar.gz file and
+      then you can obtain the standard minivend-3.11.tar.gz file and
       install that instead. )
       
       You will have to obtain the CYGWIN.DLL file if you want to
       use TLINK.EXE as your link CGI. The standard distribution .EXE
-      file has it included -- the minivend-3.10-nodll.exe file
+      file has it included -- the minivend-3.11-nodll.exe file
       eliminates it.
 
     2. Select a directory to install MiniVend in -- it defaults
index 4f41af5..3598279 100644 (file)
@@ -1,4 +1,4 @@
-# MiniVend V3.10
+# MiniVend V3.11
 # 
 # Copyright 1996-1998 by Michael J. Heins <mikeh@minivend.com>
 #
index 4843c1d..2bbf86f 100644 (file)
@@ -1,6 +1,71 @@
 
                   W H A T ' S   N E W 
 
+MiniVend 3.11 is a major release enhancing many aspects of
+product pricing, secure authorization, and database updates.
+
+       * New experimental internal HTTP server means very fast
+         request handling direct from the browser, and built-in
+         internal security for admin tasks and protected catalog
+         pages. Will authorize users from the add-in userdb database
+         or any other MiniVend database. Supports crypt.
+
+       * Experimental catalog configuration "wizard" and admin
+         interface built in.
+
+    * New CommonAdjust price setting scheme allows chained
+      conditional lookups in pricing, shipping, and taxing. Added
+      mv_price attribute for easy setting of prices in embedded
+      Perl. Added [discount-subtotal] tag which will reliably give
+      an item subtotal with discounts applied. New mv_discount
+      attribute allows individual line item discounts.
+
+    * Added LocaleDatabase, VariableDatabase, and DbDatabase;
+      these allow setting of the Locale, Variable, and Database
+      directives from a database table. This will allow maintenance
+      improvements (they still only change value on startup or
+      reconfigure.)
+
+       * New [goto LABEL] and [label LABEL] allow chunks of a 
+         page to be skipped.
+
+    * Makecat program adds catalogs to a running server.
+    
+       * German error messages added to error locale file (thanks to
+         Karsten Mueller).
+
+    * DB_File databases can be automatically compacted with
+      the expire program; a standalone "compact" script is
+      also provided.
+
+    * Fixed multi-page sorting problems that were in MiniVend
+      since 3.00.
+
+       * Added new WideOpen directive so that catalogs can individually
+         be set to tolerate no IP address qualification. It is named
+         that because that is what you will be; you should not use this
+         if you ever store unencrypted credit cards (or other sensitive
+         info). It is also recommend that you shorten your expire time
+         to a small number of hours, maybe even 1 or 2.
+
+       * Added new FallbackIP directive to allow quasi-cookie capability
+         by IP address and browser id string. Use if you have lots of
+         users who don't take/give cookies. Suggest also that expire
+         times be made short, though two users would have to have the
+         same exact browser string and IP address. It will work with
+         cookies if they have them.
+
+    * Added va=var=value parameter to one-click search so you
+      can set a value with a link.
+
+    * Allow deletes with form database maintenance (mv_data_*).
+      Added mv_data_decode to gate HTML::Entities decoding of data;
+      this will allow easy and reliable display of multi-line fields
+      in a <TEXTAREA>.
+
+       * Added "expireall" script that expires all catalogs
+         in minivend.cfg by calling expire -c <name> [-r].
+
 MiniVend 3.10 is a bug-fix release with a few minor updates.
 
     * New IpQuad global directive allows removal of any IP address
diff --git a/dist/admin/catalog.cfg b/dist/admin/catalog.cfg
new file mode 100644 (file)
index 0000000..c3563c6
--- /dev/null
@@ -0,0 +1,37 @@
+MailOrderTo          webmaster
+VendURL              /mv_admin
+SecureURL            /mv_admin
+
+Database             database    database.asc   TAB
+DbDatabase           database
+DirectiveDatabase    directive
+LocaleDatabase       locale
+DisplayErrors        Yes
+Help                 hintfile
+
+RemoteUser           minivend
+
+Mv_BgColor           BEGIN #FFFFFF
+NewTags              Yes
+Password             bAWoVkuzphOX.
+OrderProfile         etc/profiles
+RequiredFields       name
+SeparateItems        Yes
+SpecialPage          badsearch      failed
+SpecialPage          canceled       menu
+SpecialPage          catalog        menu
+SpecialPage          checkout       mail
+SpecialPage          failed         failed
+SpecialPage          interact       failed
+SpecialPage          missing        failed
+SpecialPage          needfield      failed
+SpecialPage          nomatch        failed
+SpecialPage          noproduct      special/noproduct
+SpecialPage          notfound       special/notfound
+SpecialPage          search         results
+SpecialPage          order          todo
+SpecialPage          order_security special/order_security
+SpecialPage          violation      special/violation
+
+
+#include  subs.cfg
diff --git a/dist/admin/etc/profiles b/dist/admin/etc/profiles
new file mode 100644 (file)
index 0000000..656d72a
--- /dev/null
@@ -0,0 +1,97 @@
+__NAME__                            invalid
+&fatal     = yes
+mv_failpage= interact
+&set       = mv_junk 0
+__END__
+
+__NAME__    wizard
+[if type=data
+       term="wizard::fail_message::[value from_page]"
+]
+[set name=fail_message interpolate=1]
+[data
+       table=wizard
+       field=fail_message
+       key="[value from_page]"
+]
+[/set]
+[/if]
+
+[if
+       type=data
+       term="wizard::fail_page::[value from_page]"
+]
+&set=mv_failpage [data
+                                       table=wizard
+                                       field=fail_page
+                                       key="[value from_page]"
+                                 ]
+[else]
+&set=mv_failpage failed
+[/else]
+[/if]
+
+[if value mv_submit =~ /Next|Restart|Reconfig/]
+[then]
+[set name=next_branch interpolate=1][value from_page][/set]
+[set name=back_branch interpolate=1][/set]
+[set name=cancel_branch interpolate=1][/set]
+[set name=default_branch interpolate=1][/set]
+[loop
+       arg="[data
+                       table=wizard
+                       field=required
+                       key='[value from_page]'
+                 ]"
+]
+[loop-code]=required
+[/loop]
+
+[loop
+       arg="[data
+                       table=wizard
+                       field=mandatory
+                       key='[value from_page]'
+               ]"
+]
+[loop-code]=mandatory
+[/loop]
+
+&fatal=yes
+
+[if type=data term="wizard::subroutine::[value from_page]" op="=~" comp="/\S/"]
+&set = Mv_result [data
+                                       table=wizard
+                                       field=subroutine
+                                       key="[value from_page]"
+                                       interpolate=1
+                               ]
+[/if]
+&set=mv_successpage [data table=wizard field=next_page key="[value from_page]"]
+[/then]
+[elsif value mv_submit =~ /Cancel/]
+[set name=next_branch interpolate=1][/set]
+[set name=back_branch interpolate=1][/set]
+[set name=cancel_branch interpolate=1][value from_page][/set]
+[set name=default_branch interpolate=1][/set]
+&set=mv_successpage cancel
+[/elsif]
+[elsif value mv_submit =~ /Back/]
+[set name=next_branch interpolate=1][/set]
+[set name=back_branch interpolate=1][value from_page][/set]
+[set name=cancel_branch interpolate=1][/set]
+[set name=default_branch interpolate=1][/set]
+&set=mv_successpage [data table=wizard field=back_page key="[value from_page]"]
+[/elsif]
+[else]
+[set name=next_branch interpolate=1][/set]
+[set name=back_branch interpolate=1][/set]
+[set name=default_branch interpolate=1][value from_page][/set]
+[set name=cancel_branch interpolate=1][/set]
+&set=mv_successpage cancel
+[/else]
+[/if]
+[set name=save_submit interpolate=1][value mv_submit][/set]
+[value name=mv_submit set=""]
+
+__END__
diff --git a/dist/admin/mv_admin.cfg b/dist/admin/mv_admin.cfg
new file mode 100644 (file)
index 0000000..9acc7bb
--- /dev/null
@@ -0,0 +1,276 @@
+# Defines a couple of tags for the admin interface. Kept here because
+# they might be generally useful for individual catalogs.
+#
+
+UserTag reconfig Order name
+UserTag reconfig PosNumber  1
+UserTag reconfig Routine <<EOR
+use strict;
+sub {
+       my $name = shift || $Vend::Cfg->{CatalogName};
+
+       my $myname = $Vend::Cfg->{CatalogName};
+#::logGlobal("Trying to reconfig $name");
+       if (! Vend::Util::check_security('', 1)) {
+               $::Values{mv_error_tag_restart} = "Not authorized.";
+               return undef;
+       }
+#::logGlobal("Passed security check on reconfig $name");
+
+       if($myname ne '_mv_admin' and $myname ne $name) {
+                       $::Values{mv_error_tag_restart} =
+                               "Not authorized to reconfig that catalog.";
+                       return undef;
+       }
+#::logGlobal("Passed name check on reconfig $name");
+
+       logData("$Global::ConfDir/reconfig", $Global::Catalog{$name}->{'script'});
+       return 1;
+}
+EOR
+
+UserTag reconfig-wait Order name
+UserTag reconfig-wait Routine <<EOR
+sub {
+       my $name = shift || $Vend::Cfg->{CatalogName};
+       my $myname = $Vend::Cfg->{CatalogName};
+       return '' unless $myname eq '_mv_admin' or $myname eq $name;
+    my $now = time();
+    my $mod = ( stat("$Global::ConfDir/status." . $Vend::Cfg->{CatalogName}))[9];
+    if( ($now - $mod) < $Global::HouseKeeping ) {
+        $::Scratch->{possible_timeout} = 0;
+        $::Scratch->{reconfigured} = 1;
+        return '';
+    }
+    else {
+        sleep 1;
+        $::Scratch->{possible_timeout} = 1;
+        return 'please wait...<BR>';
+    }
+}
+EOR
+
+UserTag reconfig-time Order name
+UserTag reconfig-time Routine <<EOR
+sub {
+       my $name = shift || $Vend::Cfg->{CatalogName};
+       my $myname = $Vend::Cfg->{CatalogName};
+       return '' unless $myname eq '_mv_admin' or $myname eq $name;
+       return Vend::Util::readfile($Global::ConfDir . '/status.' . $name);
+}
+EOR
+
+
+
+UserTag restart Order name dir script aliases directive
+UserTag restart PosNumber  5
+UserTag restart Routine <<EOR
+use strict;
+sub {
+       my (%cat);
+       my ($changed, $directive, $name);
+       my (@params) = (qw/name dir script aliases/);
+       (@cat{@params}, $directive) = @_;
+       $name = $cat{'name'} || $Vend::Cfg->{CatalogName};
+       my $authorized;
+
+       if (! Vend::Util::check_security('change catalog configuration', 3)) {
+               $::Values{mv_error_tag_restart} = "Not authorized.";
+               return undef;
+       }
+
+       if($directive or ! $Global::Catalog{$name}) {
+               do {
+                       $::Values{mv_error_tag_restart} =
+                               "Not authorized to change Global directives from this catalog.";
+                       return undef;
+               } unless $Vend::Cfg->{CatalogName} eq '_mv_admin';
+       }
+       elsif($name ne '_mv_admin' and $name ne $Vend::Cfg->{CatalogName}) {
+                       $::Values{mv_error_tag_restart} =
+                               "Not authorized to change that catalog.";
+                       return undef;
+       }
+       else {
+               for (@params) {
+                       if($cat{$_}) {
+                               $changed = 1 if $cat{$_} ne $Global::Catalog{$name}->{$_};
+                       }
+                       else {
+                               $cat{$_} = $Global::Catalog{$name}->{$_};
+                       }
+               }
+       }
+
+::logGlobal("Trying to restart $directive");
+       if($directive) {
+               logData("$Global::ConfDir/restart", $directive);
+       }
+       elsif (!$changed) {
+               $::Values{mv_error_tag_restart} =
+                       "There was no change in parameters: " .
+                       join " ", map { "$_=$cat{$_} " } @params;
+               return undef;
+       }
+       else {
+               my $sub = $Global::Selector{$cat{'script'}}->{BaseCatalog}
+                                       ? 'Sub' : '';
+               logData("$Global::ConfDir/restart", 
+                        "$sub$name $cat{'dir'} $cat{'script'} $cat{'aliases'}");
+       }
+       my $pid = readfile("$Global::ConfDir/minivend.pid");
+       $pid =~ tr/0-9//cd;
+::logGlobal("Trying to restart PID=$pid");
+
+       return 1 if $Global::Windows;
+       kill '-HUP', $pid;
+}
+EOR
+
+# Not strictly an admin tag, but could be useful
+# 
+UserTag secure-images Routine <<EOR
+sub {
+    return unless $CGI::secure;
+    return if $Vend::Foreground;
+    $Vend::Cfg->{ImageAlias}{'http:'} = 'https:';
+       return '';
+}
+EOR
+
+UserTag active-buttons Order dir
+UserTag active-buttons PosNumber 1
+UserTag active-buttons Interpolate 1
+UserTag active-buttons HasEndTag 1
+UserTag active-buttons Routine   <<EOR
+sub {
+       use strict;
+       my ($dir, $html) = @_;
+       my $scr = ($::Scratch->{mvc_bbar_script_name} ||= 'aaaa');
+       $::Scratch->{mvc_bbar_script_name}++;
+       $::Scratch->{mvc_bbar_script_hash} = {}
+               unless defined $::Scratch->{mvc_bbar_script_hash};
+       my $hash = $::Scratch->{mvc_bbar_script_hash};
+       if(!$dir) {
+               return $html unless $dir = $Vend::Cfg->{Variable}{DOCROOT};
+               $dir .= $Vend::Cfg->{ImageDir}
+                       if $Vend::Cfg->{ImageDir} !~ /^http:/;
+       }
+       $dir =~ s:/+$::;
+       my @images;
+
+
+       $html =~ s#
+                                               (
+                                                       <\s*input
+                                               |
+                                                       <\s*a \s+ [^>]+
+                                               )
+                                               (>\s*<\s*img \s+|\s+)
+
+                                               ([^>]+\s+)? (src\s*=\s*"?)
+                                               ([^/][^"\s]*?) \. (gif|jpe?g) (?:[^>]+name="([^"]+)")?
+                                       #
+                                               my ($hjs, $ijs);
+                                               my $mage = "$dir/${5}_up.$6";
+                                               if (! defined $hash->{$mage}) {
+                                                       $hash->{$mage} = -f $mage;
+                                               }
+                                               if ($hash->{$mage}) {
+                                                       if("\L$1" eq '<input') {
+                                                               my $s = "$5 $6";
+                                                               if ($7) {
+                                                                       $s .= " $7";
+                                                               }
+                                                               else {
+                                                                       my $retry = $3;
+::logGlobal("retry '$retry'");
+                                                           $retry =~ /\bname="([^"]+)"/i;
+                                                                       $s .= " $1" if $1;
+                                                               }
+                                                               push @images, $s;
+                                                       }
+                                                       else {
+                                                               push @images, "$5 $6";
+                                                       }
+                                                       $hjs =  '_JSCRIPT_HREF_ ';
+                                                       $ijs =  '_JSCRIPT_HIMG_ ';
+                                               }
+                                               else { $hjs = $ijs = '' };
+                                               $1 . $hjs . $2 . $ijs . $3 . "$4$5.$6"
+                                       #egix;
+       return $html unless @images;
+       
+       my $template_begin = <<EOT;
+<SCRIPT LANGUAGE="javascript">
+<!-- hide
+
+   function ${scr}img_up (imgName) {
+     if (document.images) {
+        imgUp = eval(imgName + "up.src");
+        document [imgName].src = imgUp;
+     }
+   }
+
+   function ${scr}img_dn (imgName) {
+     if (document.images) {
+        imgDn = eval(imgName + "dn.src");
+        document [imgName].src = imgDn;
+     }
+   }
+
+EOT
+
+       my $template_end = <<EOT;
+
+// end hide -->
+</SCRIPT>
+EOT
+
+       my $all_up = <<EOT;
+function all_up   () {
+ if (document.images) {
+EOT
+
+       my $all_dn = <<EOT;
+function all_dn  () {
+ if (document.images) {
+EOT
+
+
+       my $middle = '';
+       my $img;
+       my $sub;
+       my $imgdir = $Vend::Cfg->{ImageDir};
+       my $i = 1;
+       foreach $img (@images) {
+               my ($base, $ext, $name) = split /\s+/, $img, 3;
+               my ($focus, $blur, $lab);
+               if ($name) {
+                       $lab = '';
+                       $focus = qq| onFocus="all_up()" |;
+                       $blur  = qq| onBlur="all_dn()" |;
+               }
+               else {
+                       $name = $scr . $i++;
+                       $middle .= <<EOM;
+${name}up = new Image();
+${name}dn = new Image();
+${name}up.src = "$imgdir${base}_up.$ext";
+${name}dn.src = "$imgdir${base}.$ext";
+EOM
+                       $all_up .= "\t${scr}img_up('$name')\n";
+                       $all_dn .= "\t${scr}img_dn('$name')\n";
+                       $focus = qq| onMouseOver="${scr}img_up('$name')" |;
+                       $blur  = qq| onMouseOut="${scr}img_dn('$name')" |;
+                       $lab = qq|NAME="$name"|;
+               }
+
+               $html =~ s/_JSCRIPT_HREF_/ $blur $focus /;
+               $html =~ s/_JSCRIPT_HIMG_/ $lab /;
+       }
+       $all_up .= "\t}\n}\n\n";
+       $all_dn .= "\t}\n}\n\n";
+       return $template_begin . $all_up . $all_dn . $middle . $template_end . $html;
+}
+EOR
diff --git a/dist/admin/pages/cancel.html b/dist/admin/pages/cancel.html
new file mode 100644 (file)
index 0000000..b79a9e0
--- /dev/null
@@ -0,0 +1,41 @@
+<HTML><HEAD>
+
+<TITLE>Cancel Operation?</TITLE>
+
+</HEAD>
+<BODY BGCOLOR="#C0C0C0">
+
+<FORM METHOD="POST" ACTION="[process-target]">
+<INPUT TYPE=hidden NAME="mv_doit" VALUE="return">
+<INPUT TYPE=hidden NAME="mv_nextpage" VALUE="menu">
+
+<TABLE WIDTH=580>
+       <TR VALIGN=TOP><TD>__WIZARD_BANNER__</TD>
+<TD><FONT SIZE="-1" FACE="arial, helvetica"><BR></FONT>
+                       <TABLE BORDER=2 CELLPADDING=10 CELLSPACING=0 WIDTH=390>
+                       <TR><TD>
+                               Wipe out administration session
+                       <P>
+                               
+</TD></TR></TABLE></TD></TR></TABLE>
+
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=550>
+<TR ALIGN="RIGHT"><TD>
+
+    <INPUT TYPE=submit NAME=mv_click VALUE="Yes, Cancel"> 
+    &nbsp; &nbsp; &nbsp; 
+    <INPUT TYPE=submit VALUE=" No, go back ">
+
+[set Yes, Cancel]
+mv_todo=cancel
+[/set]
+<P>
+<A HREF="[area menu]">Return to main menu</A>
+</TD>
+</TR>
+</TABLE>
+
+</table>
+</FORM>
+</BODY>
+</HTML>
diff --git a/dist/admin/pages/failed.html b/dist/admin/pages/failed.html
new file mode 100644 (file)
index 0000000..cdea987
--- /dev/null
@@ -0,0 +1,77 @@
+<HTML><HEAD>
+[value name=mv_submit set=""]
+[value name=agree set=""]
+<TITLE>Something is wrong</TITLE>
+
+</HEAD>
+<BODY BGCOLOR="#C0C0C0">
+[comment]<XMP>[scratch name=wizard interpolate=1]</XMP>[/comment]
+
+<FORM METHOD="POST" ACTION="[process-target]">
+<INPUT TYPE=hidden NAME="mv_doit" VALUE="return">
+<INPUT TYPE=hidden NAME="mv_nextpage" VALUE="[value from_page]">
+<INPUT TYPE=hidden NAME="mv_order_profile" VALUE="wizard">
+
+<TABLE WIDTH=580>
+       <TR VALIGN=TOP><TD ALIGN=CENTER VALIGN=CENTER>
+                                       <FONT FACE="arial,helvetica" SIZE=7>
+                                               MiniVend<BR>Configuration<BR>Wizard
+                                       </FONT>
+                                  </TD>
+<TD><FONT SIZE="-1" FACE="arial, helvetica"><BR></FONT>
+                       <TABLE BORDER=2 CELLPADDING=10 CELLSPACING=0 WIDTH=390>
+                       <TR><TD>
+                               [scratch name=fail_message interpolate=1]
+                       <P>
+[perl values]
+       my $msg = q{};
+       for(%{$Safe{'values'}}) {
+               next unless /^mv_error_(.*)/;
+               my $name = $1;
+               #my $value = delete $Safe{'values'}->{$_};
+               my $value = $Safe{'values'}->{$_};
+               next unless $value;
+               $msg .= "\n$name: $value\n";
+       }
+       sub redo_message {
+               my($param,$word) = @_;
+               if ($word =~ /diretory_write/i) {
+                       return "<LI>The directory you specify needs to be writable.\n";
+               }
+               elsif ($word =~ /phone/i) {
+                       return "<LI>Is that really a phone number?\n";
+               }
+               elsif ($word =~ /Mv_result/) {
+                       return "<LI> Check failed: $param";
+               }
+               else { return "<LI>$param: $word\n" }
+       }
+       @msg = grep /\S/, split /\n/, $msg;
+       $msg = '<UL>';
+       for(@msg) {
+               ($var, $val) = split /:\s*/, $_;
+               $msg .= redo_message($var, $val);
+       }
+       $msg .= '</UL>';
+       return $msg;
+[/perl]
+<P>
+                               
+</TD></TR></TABLE></TD></TR></TABLE>
+
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=550>
+<TR ALIGN="RIGHT"><TD>
+
+    <INPUT TYPE=submit VALUE="Return"> 
+    &nbsp; &nbsp; &nbsp; 
+    <INPUT TYPE=submit NAME=mv_submit VALUE="   Cancel   ">
+<P>
+<A HREF="[area menu]">Return to main menu</A>
+</TD>
+</TR>
+</TABLE>
+
+</table>
+</FORM>
+</BODY>
+</HTML>
diff --git a/dist/admin/pages/flypage.html b/dist/admin/pages/flypage.html
new file mode 100644 (file)
index 0000000..1073cd7
--- /dev/null
@@ -0,0 +1,85 @@
+<HTML><HEAD>
+[if explicit 'flypage' eq q{@@MV_PAGE@@}]
+[set page_arg][item-code][/set]
+[else]
+[set page_arg]@@MV_PAGE@@[/set]
+[/else]
+[/if]
+[fly-list code="[scratch page_arg]"]
+<TITLE>[data wizard title [item-code]]</TITLE>
+[value name=mv_submit set=""]
+[value name=mv_successpage set=""]
+[value name=mv_failpage set=""]
+[value name=mv_nextpage set=""]
+</HEAD>
+<BODY BGCOLOR="#C0C0C0">
+
+<FORM METHOD="POST" ACTION="[process-target]">
+<INPUT TYPE=hidden NAME="from_page" VALUE="[item-code]">
+<INPUT TYPE=hidden
+    NAME="mv_order_profile"
+    VALUE="[data wizard profile [item-code]]">
+<INPUT TYPE=hidden NAME="mv_doit" VALUE="submit">
+<TABLE WIDTH=580>
+    <TR VALIGN=TOP>
+        <TD ALIGN=CENTER VALIGN=CENTER>
+            [if type=data term="wizard::image::[item-code]"]
+            [data table=wizard column=image key="[item-code]"]
+            [else]
+            __WIZARD_BANNER__
+            [/else]
+            [/if]
+        </TD>
+        <TD>
+            <FONT SIZE="-1" FACE="arial, helvetica">
+                [data wizard instructions [item-code]]
+            </FONT>
+
+            <TABLE BORDER=2 CELLPADDING=10 CELLSPACING=0 WIDTH=390>
+            <TR>
+            <TD>
+
+[if data wizard::form::[item-code]]
+[data table=wizard column=form key="[item-code]" interpolate=1]
+[else]
+[comment] Here is the guts if you wish to customize this page [/comment]
+
+            THERE SHOULD BE A FORM HERE.
+
+[comment]   
+            End the guts. If you have a form value in the DB, then
+            this is ignored.
+[/comment]
+[/else]
+[/if]
+
+            </TD>
+            </TR>
+            </TABLE>
+        </TD>
+    </TR>
+</TABLE>
+
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=550>
+<TR ALIGN="RIGHT"><TD>
+
+      [if type=data term="wizard::back_label::[item-code]"]<INPUT
+        TYPE=submit
+        NAME=mv_submit
+        VALUE="[data wizard back_label [item-code]]">[/if]<INPUT
+        TYPE=submit
+        NAME=mv_submit
+        VALUE="[data wizard next_label [item-code]]"> &nbsp; &nbsp; &nbsp; &nbsp;
+        <input type="submit"
+          name="mv_submit" value="   Cancel   ">
+
+</TD>
+</TR>
+</TABLE>
+
+</TABLE>
+</FORM>
+
+[/fly-list]
+</BODY>
+</HTML>
diff --git a/dist/admin/pages/hintfile.html b/dist/admin/pages/hintfile.html
new file mode 100644 (file)
index 0000000..37fcba5
--- /dev/null
@@ -0,0 +1,62 @@
+SERVERNAME
+The server base location for this catalog. It can be any of
+<PRE>
+     www.[value CATALOGNAME].com
+     www.[value CATALOGNAME].com:8000
+     www.yourisp.com/~[value CATALOGNAME]
+</PRE>Or many variations.<BR>
+
+DOCUMENTROOT
+The base directory for HTML for this (possibly virtual) domain. Often
+it is <TT>[value HOMEDIR]/www</TT>, <TT>[value HOMEDIR]/html</TT>, or
+<TT>[value HOMEDIR]/public_html</TT>. 
+<BR>
+
+CGIDIR
+The location of the normal CGI directory.
+<P>
+If all CGI programs must end in .cgi, it would
+normally be the same as the HTML directory.
+<BR>
+
+CGIURL
+The URL location of the CGI program, without the http://
+or server name. Usually one of:
+<PRE>
+    /cgi-bin/[value CATALOGNAME]
+    /[value CATALOGNAME].cgi
+</PRE>
+You may also define aliases that are essentially the same
+in use; to use the internal HTTP server you must define
+one of /[value CATALOGNAME].
+
+IMAGEDIR
+Where the image files should be copied. A directory path
+name, not a URL. Put NONE in if you don't wish to copy images.
+<BR>
+
+SAMPLEHTML
+Where the sample HTML files should be
+installed. Usually a subdirectory of
+your HTML directory.
+<BR>
+
+CATROOT
+Where the MiniVend files for this catalog will go.
+This should not be in the HTML directory!
+The default usually works well.
+<BR>
+
+IMAGEURL
+The URL base for the sample images. Sets the ImageDir
+directive in the catalog configuration file. This is a URL
+fragment, not a directory or file name. It would be something
+like the bold portion of:
+<PRE>
+        <B>/[value CATALOGNAME]/images</B>/icon.gif
+</PRE><BR>
+
+HOMEDIR
+The home directory to base everything out of if this is a
+virtual domain.
+<BR>
diff --git a/dist/admin/pages/include/address_form b/dist/admin/pages/include/address_form
new file mode 100644 (file)
index 0000000..49a5c7a
--- /dev/null
@@ -0,0 +1,53 @@
+       <table border="0" cellpadding="0" cellspacing="0" width="400">
+               <tr>
+                 <td width="75"><font size="-1"><B>Company Name:</B> </font></td>
+                 <td><input name="COMPANY" type="TEXT" size="38"
+                               value="[default name=COMPANY default='The Art Store']"> </td>
+               </tr>
+               <tr>
+                 <td><font size="-1">Address:</font></td>
+                 <td><input name="ADDRESS" type="TEXT" size="38" value="[value ADDRESS]"> </td>
+               </tr>
+               <tr>
+                 <td><font size="-1">City,<BR>state/province,<BR>zip/postal code: </font></td>
+                 <td VALIGN=TOP><input name="CITY" type="TEXT" size="38" value="[value CITY]"> </td>
+               </tr>
+               <tr>
+                 <td><font size="-1">Phone:</font></td>
+                 <td><input name="PHONE" type="TEXT" size="30" value="[value PHONE]"></TD>
+               </tr>
+               <tr>
+                 <td><font size="-1">Toll-free:</font></td>
+                 <td><input name="TOLLFREE" type="TEXT" size="30"
+                                               value="[value TOLLFREE]"></TD>
+               </tr>
+               <tr>
+                 <td><font size="-1">FAX:</font></td>
+                 <td><input name="FAX" type="TEXT" size="30"
+                                               value="[value FAX]"></TD>
+               </tr>
+               <tr>
+                 <td><font size="-1"><B>Email orders to:</B></font></td>
+                 <td><input name="MAILORDERTO" type="TEXT" size="30"
+                                               value="[default MAILORDERTO webmaster]"></TD>
+               </tr>
+               <tr>
+                 <td><font size="-1"><B>Large logo image:</B></font></td>
+                 <td><input name="LOGO" type="TEXT" size="30"
+                                               value="[default LOGO artstore.gif]"></TD>
+               </tr>
+               <tr>
+                 <td><font size="-1"><B>Small logo image:</B></font></td>
+                 <td><input name="SMLOGO" type="TEXT" size="30"
+                                               value="[default SMLOGO artsmall.gif]"></TD>
+               </tr>
+               <tr>
+                 <td><font size="-1"><B>Encryption command</B>:</font></td>
+                 <td><input name="ENCRYPTOR" type="TEXT" size="30"
+                                               value="[default ENCRYPTOR none]"></TD>
+               </tr>
+               <tr>
+                 <td>&nbsp;</TD>
+                 <td valign="bottom"><BR><font size="-1">Fields in <B>bold</B> are required.</font></td>
+            </tr>
+          </table>
diff --git a/dist/admin/pages/include/base_dir_form b/dist/admin/pages/include/base_dir_form
new file mode 100644 (file)
index 0000000..b9d4e93
--- /dev/null
@@ -0,0 +1,47 @@
+       <table border="0" cellpadding="0" cellspacing="0" width="400">
+               <tr>
+                 <td width="75" VALIGN=CENTER><font size="-1"><B>Server name:</B> </font><BR></td>
+                 <td>[help name=SERVERNAME int]<input name="SERVERNAME" type="TEXT" size="38"
+                               value="[default
+                                                       name=SERVERNAME
+                                                       default='www.[value CATALOGNAME].com'
+                                                       ]"> </td>
+               </tr>
+               <tr>
+                 <td width="75" VALIGN=CENTER><font size="-1"><B>Catalog directory:</B> </font><BR></td>
+                 <td><BR>[help name=CATROOT int]<input name="CATROOT" type="TEXT" size="38"
+                               value="[default
+                                                       name=CATROOT
+                                                       default='[embed]
+                               if($^O =~ /win32/i) {
+                                       return "$Global::VendRoot/catalogs";
+                               }
+                               return $::Values{HOMEDIR} . "/" . $::Values{CATALOGNAME};
+                               [/embed]'
+                                                       ]"> </td>
+               </tr>
+               <tr>
+                 <td width="75" VALIGN=CENTER><font size="-1"><B>HTML directory:</B> </font><BR></td>
+                 <td><BR>[help name=DOCUMENTROOT int]<input name="DOCUMENTROOT" type="TEXT" size="38"
+                               value="[default
+                                                       name=DOCUMENTROOT
+                                                       default='[value HOMEDIR]/www'
+                                                       ]"> </td>
+               </tr>
+               <tr>
+                 <td VALIGN=CENTER><font size="-1"><B>CGI Directory:</B></font><BR></td>
+                 <td><BR>[help name=CGIDIR int]<input name="CGIDIR" type="TEXT" size="38"
+                               value="[default
+                                                       name=CGIDIR
+                                                       default='[value HOMEDIR]/cgi-bin'
+                                                       ]"> </td>
+               </tr>
+               <tr>
+                 <td VALIGN=CENTER><font size="-1"><B>Base URL for CGI:</B></font><BR></td>
+                 <td><BR>[help name=CGIBASE int]<input name="CGIBASE" type="TEXT" size="38"
+                               value="[default
+                                                       name=CGIBASE
+                                                       default='/cgi-bin'
+                                                       ]"> </td>
+               </tr>
+  </table>
diff --git a/dist/admin/pages/include/cat_dir_form b/dist/admin/pages/include/cat_dir_form
new file mode 100644 (file)
index 0000000..9dd652e
--- /dev/null
@@ -0,0 +1,91 @@
+<table border="0" cellpadding="0" cellspacing="0" width="400">
+       <tr>
+               <td width="75" VALIGN=CENTER>
+                       <font size="-1"><B>Catalog HTML:</B></font><BR>
+               </td>
+               <td>[help name=SAMPLEHTML int]
+                       <input name="SAMPLEHTML" type="TEXT" size="38"
+                               value="[default
+                                                       name=SAMPLEHTML
+                                                       default='[value DOCUMENTROOT]/[value CATALOGNAME]'
+                                                       ]">
+               </td>
+       </tr>
+       <tr>
+               <td width="75" VALIGN=CENTER>
+                       <font size="-1"><B>HTML URL:</B> </font><BR>
+               </td>
+               <td>
+                       <HR>[help name=SAMPLEURL int]
+                       <input name="SAMPLEURL" type="TEXT" size="38"
+                               value="[default
+                                                       name=SAMPLEURL
+                                                       default='http://[value SERVERNAME]/[value CATALOGNAME]'
+                                                       ]"> </td>
+       </tr>
+       <tr>
+               <td width="75" VALIGN=CENTER>
+                       <font size="-1"><B>Image directory:</B></font><BR>
+               </td>
+               <td>
+                       <HR>[help name=IMAGEDIR int]
+                               <input name="IMAGEDIR" type="TEXT" size="38"
+                                               value="[default
+                                                       name=IMAGEDIR
+                                                       default='[value DOCUMENTROOT]/[value CATALOGNAME]/images'
+                                                       ]"> </td>
+       </tr>
+       <tr>
+               <td width="75" VALIGN=CENTER>
+                       <font size="-1"><B>Image URL:</B> </font><BR>
+               </td>
+               <td>
+                       <HR>[help name=IMAGEURL int]
+                       <input name="IMAGEURL" type="TEXT" size="38"
+                               value="[default
+                                                       name=IMAGEURL
+                                                       default='/[value CATALOGNAME]/images'
+                                                       ]">
+               </td>
+       </tr>
+       <tr>
+               <td VALIGN=CENTER>
+                       <font size="-1"><B>CGI URL and ALIASES:</B></font><BR>
+               </td>
+                                                       [calc]
+                                                               $doc = q{[value DOCUMENTROOT]};
+                                                               $cgi = q{[value CGIDIR]};
+                                                               $cat = q{[value CATALOGNAME]};
+                                                               if($doc eq $cgi) {
+                                                                       $cgifile = "$doc/$cat.cgi";
+                                                                       $cgiurl  = "/$cat.cgi";
+                                                               }
+                                                               else {
+                                                                       $cgifile = "$cgi/$cat";
+                                                                       $cgi =~ s:.*/:/:;
+                                                                       $cgiurl  = "$cgi/$cat";
+                                                               }
+                                                               return '';
+                                                       [/calc]
+               <td>
+                       <HR>[help name=CGIURL int]
+                       <input name="CGIURL" type="TEXT" size="38"
+                               value="[default
+                                                       name=CGIURL
+                                                       default='[calc]return $cgiurl[/calc]'
+                                         ]"><BR>
+                       <input name="ALIASES" type="TEXT" size="38"
+                               value="[default
+                                                       name=ALIASES
+                                                       default='/[value CATALOGNAME]'
+                                         ]"><BR>
+                       Use INET mode
+                               <input name="LINKMODE"
+                                       [checked LINKMODE INET]
+                                       type="radio" VALUE="INET"> yes
+                               <input name="LINKMODE"
+                                       [checked name=LINKMODE value=UNIX default=1]
+                                       type="radio" VALUE="UNIX"> no
+               </td>
+       </tr>
+</table>
diff --git a/dist/admin/pages/include/catname_form b/dist/admin/pages/include/catname_form
new file mode 100644 (file)
index 0000000..1b43098
--- /dev/null
@@ -0,0 +1,28 @@
+<table border="0" cellpadding="0" cellspacing="0" width="400">
+       <tr>
+         <td width="75" VALIGN=CENTER><font size="-1"><B>Catalog name:</B> </font><BR></td>
+         <td>[help name=CATALOGNAME int]<input name="CATALOGNAME" type="TEXT" size="12"
+                               value="[value name=CATALOGNAME]" > </td>
+       </tr>
+       <tr>
+         <td width="75" VALIGN=CENTER><font size="-1"><B>Template to use:</B> </font><BR></td>
+         <td><BR>[help name=TEMPLATE int]<input name="TEMPLATE" type="TEXT" size="12"
+                               value="[default TEMPLATE simple]"> 
+               </td>
+       </tr>
+[embed]
+if($^O =~ /win32/i) {
+       return qq{<INPUT TYPE=hidden NAME=BASEDIR VALUE="$Global::VendRoot/catalogs">};
+}
+elsif ($ENV{HOME} and $ENV{HOME} ne $::Values->{HOMEDIR}) {
+       return <<EOF;
+       <tr>
+         <td width="75" VALIGN=CENTER><font size="-1"><B>Catalog base:</B> </font><BR></td>
+         <td>[help name=BASEDIR int]<input name="BASEDIR" type="TEXT" size="38"
+                               value="[default BASEDIR $ENV{HOME}/catalogs]" > </td>
+       </tr>
+EOF
+}
+return '';
+[/embed]
+</table>
diff --git a/dist/admin/pages/include/summary b/dist/admin/pages/include/summary
new file mode 100644 (file)
index 0000000..2007d52
--- /dev/null
@@ -0,0 +1,95 @@
+<TABLE>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Catalog name:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[value CATALOGNAME]</TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Directory:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[value CATROOT]</TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Mail orders to:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[value MAILORDERTO]</TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Company:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                    <TD VALIGN=TOP><B>
+           [value COMPANY]<BR>
+           [value ADDRESS]<BR>
+           [value CITY]
+                                       </TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+    Phone:<BR>
+Toll-free:<BR>
+      FAX:<BR>
+</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+<TD VALIGN=TOP>[value PHONE]<BR>
+ [value TOLLFREE]<BR>
+ [value FAX]<BR>
+                                       </TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+URLs to call catalog:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[value SAMPLEURL]<BR>
+                                                       http://[value SERVERNAME][value CGIURL]<BR></TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+HTML to:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[value SAMPLEHTML]</TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Logo Image:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[value LOGO]</TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Small Logo:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[value SMLOGO]</TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Images to:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[value IMAGEDIR]</TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Link mode:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP><B>[default LINKMODE UNIX]</TD></TR>
+<TR>
+<TD VALIGN=TOP ALIGN=RIGHT>
+Add to:</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD>
+                                       <TD VALIGN=TOP>
+                       minivend.cfg file
+                               <input name="NOCFG"
+                                       CHECKED
+                                       type="radio" VALUE="0"> yes
+                               <input name="NOCFG"
+                                       type="radio" VALUE="1"> no<BR>
+                                       
+                       Running server
+                               <input name="NORUNNING"
+                                       CHECKED
+                                       type="radio" VALUE="0"> yes
+                               <input name="NORUNNING"
+                                       type="radio" VALUE="1"> no<BR>
+                                       
+                                       </TD></TR>
+
+
+
+<TR>
+<TD COLSPAN=3>
+When you click <B>Next</B>, the catalog will be made. Go <B>Back</B> if you
+need to change anything.</TD>
+</TR></TABLE>
diff --git a/dist/admin/pages/menu.html b/dist/admin/pages/menu.html
new file mode 100644 (file)
index 0000000..f9d2557
--- /dev/null
@@ -0,0 +1,93 @@
+<HTML><HEAD>
+[if explicit 'flypage' eq q{@@MV_PAGE@@}]
+[set page_arg][item-code][/set]
+[else]
+[set page_arg]@@MV_PAGE@@[/set]
+[/else]
+[/if]
+[fly-list code="[scratch page_arg]"]
+<TITLE>[data wizard title [item-code]]</TITLE>
+[value name=mv_submit set=""]
+[value name=mv_successpage set=""]
+[value name=mv_failpage set=""]
+[value name=mv_nextpage set=""]
+</HEAD>
+<BODY BGCOLOR="#C0C0C0">
+
+<FORM METHOD="POST" ACTION="[process-target]">
+<INPUT TYPE=hidden NAME="from_page" VALUE="[item-code]">
+<INPUT TYPE=hidden
+    NAME="mv_order_profile"
+    VALUE="[data wizard profile [item-code]]">
+<INPUT TYPE=hidden NAME="mv_doit" VALUE="submit">
+<TABLE WIDTH=580>
+    <TR VALIGN=TOP>
+        <TD ALIGN=CENTER VALIGN=CENTER>
+            [if type=data term="wizard::image::[item-code]"]
+            [data table=wizard column=image key="[item-code]"]
+            [else]
+            __WIZARD_BANNER__
+            [/else]
+            [/if]
+        </TD>
+        <TD>
+            <FONT SIZE="-1" FACE="arial, helvetica">
+                [data wizard instructions [item-code]]
+            </FONT>
+
+            <TABLE BORDER=2 CELLPADDING=10 CELLSPACING=0 WIDTH=390>
+            <TR>
+            <TD>
+
+[if data wizard::form::[item-code]]
+[data table=wizard column=form key="[item-code]" interpolate=1]
+[else]
+[comment] Here is the guts if you wish to customize this page [/comment]
+                       <P>This MiniVend is installed at [global-value Global::VendRoot]
+                       <P>
+            <B><A MV="page makecat_step1">Make a new catalog</A></B><BR><BR>
+            <B>Restart a catalog</B><BR>
+                       <BLOCKQUOTE>
+                               [loop arg="[listcats]"]
+                               <INPUT TYPE=radio NAME=RECONFIGURE_CAT VALUE="[loop-code]">
+                               <A MV=page MV.HREF="reconfigure"  MV.ARG="[loop-code]" HREF="reconfigure">[loop-code]</A> running on [cat-param [loop-code] script]<BR>[/loop]
+                       </BLOCKQUOTE>
+
+[comment]   
+            End the guts. If you have a form value in the DB, then
+            this is ignored.
+[/comment]
+[/else]
+[/if]
+
+            </TD>
+            </TR>
+            </TABLE>
+        </TD>
+    </TR>
+</TABLE>
+
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=550>
+<TR ALIGN="RIGHT"><TD>
+
+      [if type=data term="wizard::back_label::[item-code]"]<INPUT
+        TYPE=submit
+        NAME=mv_submit
+        VALUE="[data wizard back_label [item-code]]">[/if]
+      [if data wizard::next_label::[item-code]]<INPUT
+        TYPE=submit
+        NAME=mv_submit
+        VALUE="[data wizard next_label [item-code]]">[/if] &nbsp; &nbsp; &nbsp; &nbsp;
+        <input type="submit"
+          name="mv_submit" value="   Cancel   ">
+
+</TD>
+</TR>
+</TABLE>
+
+</TABLE>
+</FORM>
+
+[/fly-list]
+</BODY>
+</HTML>
diff --git a/dist/admin/pages/reconfig_results.html b/dist/admin/pages/reconfig_results.html
new file mode 100644 (file)
index 0000000..caf8e9d
--- /dev/null
@@ -0,0 +1,51 @@
+<HTML><HEAD>
+<TITLE>Reconfiguring catalog [value RECONFIGURE_CAT]</TITLE>
+
+</HEAD>
+<BODY BGCOLOR="#C0C0C0">
+[set name=its send=1 int]
+[embed] 
+undef $::Scratch->{reconfigured};
+return join "\n", 1 .. ($Global::HouseKeeping + 5);
+[/embed]
+[/set]
+
+Reconfiguring catalog, please wait..<BR>
+[loop arg="[scratch its]"]
+[label name=junk send=1]
+[embed]
+       my $now = time();
+       my $mod = ( stat("$Global::ConfDir/status." . $::Values->{RECONFIGURE_CAT}))[9];
+       if( ($now - $mod) < $Global::HouseKeeping ) {
+               $::Scratch->{possible_timeout} = 0;
+               $::Scratch->{reconfigured} = 1;
+               return '[goto check]';
+       }
+       else {
+               sleep 1;
+               $::Scratch->{possible_timeout} = 1;
+               return 'Reconfiguring catalog, please wait...<BR>';
+       }
+[/embed]
+[/loop]
+
+[label check]
+[if scratch possible_timeout]
+<P> WARNING: Reconfiguration may have timed out.
+       [embed]
+       return $Global::ConfDir . '/status.' . $::Values->{RECONFIGURE_CAT};
+       [/embed]
+<P> Last config:
+       [file name="[embed]
+       return $Global::ConfDir . '/status.' . $::Values->{RECONFIGURE_CAT};
+       [/embed]"]
+[else]
+Reconfigured: [file name="[embed]
+       return $Global::ConfDir . '/status.' . $::Values->{RECONFIGURE_CAT};
+       [/embed]"]
+[/else]
+[/if]
+[set possible_timeout][/set]
+<P>
+<A MV="page menu" HREF="menu">Return to menu</A>
+</BODY></HTML>
diff --git a/dist/admin/pages/seefile.html b/dist/admin/pages/seefile.html
new file mode 100644 (file)
index 0000000..2b56e30
--- /dev/null
@@ -0,0 +1,5 @@
+<HTML><TITLE>File: [data session arg]</TITLE></HEAD><BODY BGCOLOR=WHITE>
+<XMP>
+[file name="[data session arg]"]
+</XMP>
+<A NAME=bottom><BR></A></BODY></HTML>
diff --git a/dist/admin/pages/special/noproduct.html b/dist/admin/pages/special/noproduct.html
new file mode 100644 (file)
index 0000000..6ce6ba6
--- /dev/null
@@ -0,0 +1,14 @@
+<html><head>
+<title>Requested Product Unavailable</title>
+</head>
+
+[body 2]
+<h1>Requested Product Unavailable</h1>
+
+We are sorry, but the product ([subject]) that you requested is
+not now available.  You can still [page catalog]browse our
+catalog[/page], if you wish.
+
+<P>
+[buttonbar 0]
+</body></html>
diff --git a/dist/admin/pages/special/notfound.html b/dist/admin/pages/special/notfound.html
new file mode 100644 (file)
index 0000000..8a7ccf1
--- /dev/null
@@ -0,0 +1,13 @@
+<html><head>
+<title>Not Found</title>
+</head>
+
+[body 2]
+<h1>Not Found</h1>
+
+No items with '[subject]' were found.  You can [page catalog]return to
+browsing our catalog[/page], if you wish.
+
+<P>
+[buttonbar 0]
+</body></html>
diff --git a/dist/admin/pages/special/violation.html b/dist/admin/pages/special/violation.html
new file mode 100644 (file)
index 0000000..83403e9
--- /dev/null
@@ -0,0 +1,19 @@
+<html><head>
+<title>SECURITY VIOLATION</title>
+</head>
+
+[body 2]
+
+<h2>There has been a security violation!</h2>
+
+A page that was supposed to be secure has been requested insecurely.
+You should cancel the session now, by pressing CANCEL.
+<P>
+<FORM ACTION="[process-order]" METHOD=POST>
+<INPUT TYPE=HIDDEN NAME="mv_doit" VALUE="cancel">
+<INPUT TYPE=SUBMIT NAME="mv_todo" VALUE="CANCEL">
+</FORM>
+
+<P>
+[buttonbar 0]
+</body></html>
diff --git a/dist/admin/products/database.asc b/dist/admin/products/database.asc
new file mode 100644 (file)
index 0000000..ed67d21
--- /dev/null
@@ -0,0 +1,5 @@
+code   products        locale  directive       wizard
+_file  products.asc    locale.asc      directive.asc   wizard.asc
+_type  LINE    TAB     TAB     TAB
+CONTINUE       NOTES   UNIX    UNIX    UNIX
+MEMORY 1       1       1       1
diff --git a/dist/admin/products/directive.asc b/dist/admin/products/directive.asc
new file mode 100644 (file)
index 0000000..868be3b
--- /dev/null
@@ -0,0 +1,2 @@
+code   Variable
+WIZARD_BANNER  <FONT FACE="arial,helvetica" SIZE=7>MiniVend<BR>Configuration<BR>Wizard</FONT>
diff --git a/dist/admin/products/locale.asc b/dist/admin/products/locale.asc
new file mode 100644 (file)
index 0000000..83bea2b
--- /dev/null
@@ -0,0 +1,2 @@
+code   en_US   fr_FR   de_DE
+test   test    test&eacute;    testenwurken
diff --git a/dist/admin/products/products.asc b/dist/admin/products/products.asc
new file mode 100644 (file)
index 0000000..9369b69
--- /dev/null
@@ -0,0 +1,45 @@
+code
+title
+
+code: makecat_step5
+title: Check Information
+
+\f
+code: makecat_step1
+title: Make MiniVend Catalog
+
+\f
+code: makecat_step6
+title: Making Catalog...
+
+\f
+code: makecat_step7
+title: Add catalog to server
+
+\f
+code: reconfigure
+title: Reconfigure a catalog
+
+
+\f
+code: makecat_step2
+title: Enter Name and Directory
+
+\f
+code: makecat_step3
+title: Enter Organization Information
+
+\f
+code: makecat_step8
+title: Making Catalog...
+
+\f
+code: menu
+title: MiniVend Administration
+
+
+\f
+code: makecat_step4
+title: Enter Organization Information
+
+\f
diff --git a/dist/admin/products/wizard.asc b/dist/admin/products/wizard.asc
new file mode 100644 (file)
index 0000000..2be8971
--- /dev/null
@@ -0,0 +1,12 @@
+code   title   next_page       next_label      back_page       back_label      fail_page       fail_message    subroutine      profile image   required        mandatory       form    instructions
+command_results        Command Results                                                                                                 Reconfiguring catalog, please wait.[embed send=1]sleep 1;[/embed].[embed send=1]sleep 1;[/embed].[embed send=1]sleep 1;[/embed][embed send=1]sleep 1;[/embed] Catalog should be reconfigured.
+makecat_step1  Make MiniVend Catalog   makecat_step2      Next &gt;    menu       &lt; Back to menu                            wizard          optype          <INPUT TYPE="RADIO" NAME="optype" VALUE="new" CHECKED>   Make a new catalog<BR> <INPUT TYPE="RADIO" NAME="optype" VALUE="existing">   Change existing catalog (not yet implemented)<BR> <INPUT NAME=HOMEDIR VALUE="[default name=HOMEDIR default='[embed]$ENV{HOME} = q{c:/webshare/wwwroot} if $^O =~ /win32/i; $ENV{HOME}[/embed]']"> Home directory for a virtual domain <P> <font size="-1"> <INPUT TYPE=CHECKBOX NAME=mv_helpon VALUE=1> <I>Turn on help messages</I> <INPUT TYPE=CHECKBOX NAME=mv_helpoff VALUE=1> <I>Turn off help messages</I> </font>  Select an option:
+makecat_step2  Enter Name and Directory        makecat_step3      Next &gt;    makecat_step1      &lt; Back            You must fill in all fields.    [makecat seed="catalogname homedir basedir template"]   wizard          TEMPLATE CATALOGNAME            [include pages/include/catname_form]    Enter catalog name and template to use:
+makecat_step3  Enter Organization Information  makecat_step4      Next &gt;    makecat_step2      &lt; Back            You must enter the fields in bold.              wizard          MAILORDERTO COMPANY ENCRYPTOR LOGO SMLOGO               [include pages/include/address_form]    Enter the organization information:
+makecat_step4  Base Directory Information      makecat_step5      Next &gt;    makecat_step3      &lt; Back            You must enter all fields. There must be: <OL><LI>HTTP server name. <LI>Valid directory for catalog. <LI>Valid directory for HTML. <LI>Valid CGI directory to copy the link program to.</OL>    [makecat seed="catroot catalogname servername documentroot cgidir cgibase template"]    wizard          DOCUMENTROOT CATROOT CGIDIR SERVERNAME          [include pages/include/base_dir_form]   
+makecat_step5  Detailed Directory Information  makecat_step6      Next &gt;    makecat_step4      &lt; Back            Some of these directories must exist or we must make them. For some you can enter NONE.                 wizard          CGIURL SAMPLEHTML SAMPLEURL IMAGEDIR IMAGEURL           [include pages/include/cat_dir_form]    Enter your detailed server information:
+makecat_step6  Ready to make catalog   makecat_step7      Next &gt;    makecat_step5      &lt; Back                    [makecat]       wizard                          [include pages/include/summary] Check the information:
+makecat_step7  Finished making catalog menu     Return to menu makecat_step6                                   wizard                          Your catalog <B>[value CATALOGNAME]</B> is finished.<P> <A HREF="http://[value SERVERNAME][VALUE CGIURL]">Try it</A> <P>        
+menu   MiniVend Administration reconfigure       Restart &gt;  menu                    Reconfiguration failed.         wizard                                  Click the link to make a new catalog, or select a catalog to reconfigure: 
+reconfig_results               reconfigure       Reconfigure   menu         Menu               You must check the box of a catalog to configure. You may also click a link to perform that function.           wizard          RECONFIGURE_CAT                 
+reconfigure    Reconfigure a catalog   reconfig_results          Reconfigure   menu      &lt; Back                     [reconfig name="[value RECONFIGURE_CAT]"]       wizard                          <H2>Reconfigure catalog <B>[value RECONFIGURE_CAT]</B></H2> Click <B>Reconfigure</B> to re-read configuration.  When you are ready, reconfigure:
diff --git a/dist/admin/session/.empty b/dist/admin/session/.empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/dist/admin/subs.cfg b/dist/admin/subs.cfg
new file mode 100644 (file)
index 0000000..39669ed
--- /dev/null
@@ -0,0 +1,277 @@
+UserTag  check-file  Order      file flags
+UserTag  check-file  PosNumber  2
+UserTag  check-file  Routine <<EOR
+use strict;
+sub {
+       my ($files, $flags) = @_;
+       $flags = 'dw' unless $flags;
+       my(@files) = grep /\S/, split /\s+/, $files;
+       my(@flags) = grep /[dwrfxluzse]/, split //, $flags;
+       my ($result, $file);
+       foreach $file (@files) {
+               for(@flags) {
+                       eval "\$result = -$_ '$file'";
+                       next if $result;
+                       $::Values->{mv_error_file_test} = "-$_ $file not passed.";
+                       return undef;
+               }
+       }
+       return 1;
+}
+EOR
+
+UserTag embed HasEndTag 1
+UserTag embed Routine <<EOR
+sub {
+       my $code = shift;
+       my ($result, $error);
+       eval {
+               ($result, $error) = eval $code;
+       };
+       if($@) {
+               $::Values->{mv_error_embed} = "Syntax? error: $@\nfrom code:\n $code";
+               return undef;
+       }
+       $::Values->{mv_error_embed} = $error || undef;
+       return $result;
+}
+EOR
+
+UserTag cat-param Order name param;
+UserTag cat-param PosNumber 2
+UserTag cat-param Routine <<EOR
+sub {
+       my ($name, $param) = @_;
+       my $g;
+       return undef unless $g = $Global::Catalog{$name};
+       if($param) {
+               return $g->{$param};
+       }
+       else {
+               return join " ", $name, $g->{'dir'}, $g->{script}, $g->{aliases}; 
+       }
+}
+EOR
+
+UserTag listcats Routine <<EOR
+sub {
+       return join "\n", grep $_ ne '_mv_admin', sort keys %Global::Catalog;
+}
+EOR
+
+UserTag makecat Order seed
+UserTag makecat Routine <<EOR
+sub {
+       my $test = shift;
+       my @session = ( qw/
+
+    address
+    aliases
+    basedir
+    catalogname
+    catroot
+    catuser
+    cgibase
+    cgidir
+    cgiurl
+    city
+    company
+    documentroot
+    encryptor
+    fax
+       homedir
+    imagedir
+    imageurl
+    linkmode
+    linkprogram
+    logo
+    mailorderto
+    minivendgroup
+    minivenduser
+       nocfg
+       norunning
+    phone
+    samplehtml
+    sampleurl
+    serverconf
+    servername
+    shipmodes
+    smlogo
+    template
+    tollfree
+    vendroot
+
+       /);
+
+       my %server = ( qw/
+    aliases                    1
+    basedir                    1
+    catalogname                1
+    catroot                    1
+    catuser            1
+    cgibase            1
+    cgidir                     1
+    cgiurl                     1
+    demotype           1
+    template           1
+    documentroot       1
+    imagedir           1
+       homedir                 1
+    imageurl           1
+    linkmode           1
+    linkprogram                1
+    mailorderto                1
+    minivendgroup      1
+    minivenduser       1
+    nocfg                      1
+    nocopy                     1
+    norunning          1
+    reference          1
+    samplehtml         1
+    sampleurl          1
+    serverconf         1
+    servername         1
+    vendroot           1
+
+       /);
+
+       my %implicit = qw/nocfg 1 norunning 1/;
+
+       my @parms;
+
+       if($test) {
+               @parms = grep /\S/, split /\s+/, $test;
+               for(@parms) {
+                       $_ = lc $_;
+               }
+       }
+       else {
+               @parms = @session;
+       }
+
+    my $die = sub {
+        $::Values->{mv_error_makecat_message} .= join "\n", @_;
+        return undef;
+    };
+       $::Values->{mv_error_makecat_message} = '';
+
+       my $script = "$Global::VendRoot/bin/makecat";
+
+       return &$die("No makecat program available.") unless -x $script
+               or $^O =~ /win32/i;
+       
+       my @cmdline;
+       my $val;
+       my $parm;
+       foreach $parm (@parms) {
+               next unless defined ($val = $::Values->{"\U$parm"});
+               my $prefix = defined $server{$parm} ? '--' : '';
+               unless ($val =~ m!^[-\w/:.]+$! ) {
+                       $val =~ s/"/\\"/g;
+                       $val = qq{"$val"};
+               }
+               if( defined $implicit{$parm} ) {
+                       next unless $val;
+               }
+               else {
+                       next if ! $val and ! $prefix;
+                       $val = '=' . $val;
+               }
+               push @cmdline, qq{$prefix$parm$val};
+       }
+
+       push @cmdline, ($test ? "--reference" : "-F");
+
+       unshift @cmdline, $script;
+
+       if($^O =~ /win32/i) {
+               unshift @cmdline, $Config::Config{perlpath};
+       }
+
+       my $string = join " ", @cmdline;
+
+       open(ERRLOG, ">makecat.errors")         or die "create makecat.errors: $!\n";
+       open(STDERR, ">&ERRLOG")                        or die "dup STDERR: $!\n";
+
+       my $save_umask = umask(0);
+
+       if($test) {
+               local($/) = undef;
+               my $save_umask = umask(0);
+               open(CMD, "$string |")
+                       or return &$die("cannot fork: $!");
+               my $safe = new Safe;
+               my $ref = $safe->reval(<CMD>);
+               close CMD;
+               if($@ or ! ref $ref) {
+                       umask $save_umask;
+                       my $msg = Vend::Util::readfile('makecat.errors');
+                       return &$die(<<EOErrors);
+Catalog test run failed. [page seefile#bottom makecat.log]See log.[/page]
+<PRE>
+Immediate errors:
+----------------
+$msg
+</PRE>
+EOErrors
+               }
+               else {
+                       $Vend::Session->{makecat_ref} = $ref;
+               }
+               my ($k, $v);
+               for (@session) {
+                       $k = $_;
+                       $k = 'demotype' if $k eq 'template';
+                       next unless defined $ref->{$k};
+                       $v = $ref->{$k};
+                       $::Values->{"\U$_"} = $v;
+               }
+       }
+       else {
+               system($string);
+               umask $save_umask;
+               #system(@cmdline);
+               if($?) {
+                       my $msg = Vend::Util::readfile('makecat.errors');
+                       return &$die(<<EOErrors);
+Catalog build failed. [page seefile#bottom makecat.log]See log.[/page]
+<PRE>
+Immediate errors:
+----------------
+$msg
+</PRE>
+EOErrors
+               }
+               if(! $Global::Windows) {
+                       sleep $Global::HouseKeeping
+                               if $Global::HouseKeeping < 11;
+               }
+       }
+
+       #if(defined $extra_file) {
+       #       open(ERR, $extra_file) or die "open extra_file: $!";
+       #       $extra = <ERR>;
+       #       close ERR;
+       #       unlink $extra_file;
+       #}
+
+       return 1;
+}
+EOR
+
+UserTag  global-value  Order  name
+UserTag  global-value  Routine <<EOR
+sub {
+       no strict 'refs';
+       defined ${$_[0]} and return ${$_[0]};
+       return '';
+}
+EOR
+
+UserTag wizard order current next back cancel fail default routine
+UserTag wizard HasEndTag 1
+UserTag wizard Routine <<EOR
+sub {
+       1;
+}
+EOR
diff --git a/dist/bin/autosplit b/dist/bin/autosplit
deleted file mode 100644 (file)
index 076c6b8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/local/bin/perl
-
-use AutoSplit;
-
-require 5.003_93;
-
-$AutoSplit::Maxlen = 20;
-
-for(@ARGV) {
-
-       autosplit($_, 'lib/auto', 0, 1, 1);
-
-}
index bf2bfa5..531a25e 100644 (file)
@@ -2,7 +2,7 @@
 #
 # MiniVend session dumper
 #
-# $Id: dump,v 1.9 1998/06/06 08:35:28 mike Exp mike $
+# $Id: dump,v 1.10 1998/08/11 18:16:32 mike Exp $
 #
 # This program is largely based on Vend 0.2
 # Copyright 1995 by Andrew M. Wilcox <awilcox@world.std.com>
@@ -150,6 +150,7 @@ EOF
                my $dir = $Vend::Cfg->{SessionDatabase};
                my $file;
                $dir =~ s:/?([^/]+)$::;
+               $dir = '.' unless $dir;
                $file = $1;
                die "Aborting, no lock files found, even in $dir/etc/$file.lock!\n"
                        unless -f "$dir/etc/$file.lock";
index 059a88e..0dedea7 100644 (file)
@@ -2,7 +2,7 @@
 #
 # MiniVend session expiration
 #
-# $Id: expire,v 1.7 1997/11/03 13:14:28 mike Exp mike $
+# $Id: expire,v 1.11 1998/07/18 11:45:02 mike Exp $
 #
 # This program is largely based on Vend 0.2
 # Copyright 1995 by Andrew M. Wilcox <awilcox@world.std.com>
diff --git a/dist/bin/expireall b/dist/bin/expireall
new file mode 100644 (file)
index 0000000..0088f45
--- /dev/null
@@ -0,0 +1,78 @@
+#!/usr/bin/perl
+#
+# expireall - Expire all minivend catalogs
+#
+
+use Getopt::Std;
+
+$VendRoot = $VendRoot || '/home/minivend/mvend';
+## END CONFIGURABLE VARIABLES
+
+BEGIN {
+    eval {
+        require 5.004;
+        require FindBin;
+        $VendRoot = $FindBin::RealBin;
+        $VendRoot =~ s/.bin$//;
+    };
+    ($VendRoot = $ENV{MINIVEND_ROOT})
+        if defined $ENV{MINIVEND_ROOT};
+}
+
+my $query;
+
+$USAGE = <<EOF;
+Expire all listed MiniVend catalogs. Will read information from
+either:
+
+       $VendRoot/minivend.cfg
+       $VendRoot/catalogs.list
+
+usage: expireall [-r]
+
+       -r    Use reorganize parameter in command
+
+EOF
+
+getopts('r') or die "$@\n$USAGE\n";
+
+if ($opt_r) {
+       $flag = '-r';
+}
+
+# Parse the minivend.cfg file to look for script/catalog info
+PARSECFG: {
+       my $file;
+       my @cfglines;
+
+       $file = "$VendRoot/minivend.cfg";
+       open(MVCFG, $file) or die "Couldn't read $file: $!\n";
+       while(<MVCFG>) { push(@cfglines, $_) if /^\s*(sub)?catalog\s+/i }
+       close MVCFG;
+
+       eval {
+               $file = "$VendRoot/catalogs.list";
+               open(MVCFG, $file) or die "Couldn't read $file: $!\n";
+               while(<MVCFG>) { push(@cfglines, $_) if /^\s*(sub)?catalog\s+/i }
+               close MVCFG;
+       };
+       eval {
+               $file = "$VendRoot/active.catalogs";
+               open(MVCFG, $file) or die "Couldn't read $file: $!\n";
+               while(<MVCFG>) { push(@cfglines, $_) if /^\s*(sub)?catalog\s+/i }
+               close MVCFG;
+               rename $file, "$file.bak";
+       };
+       my %seen;
+       @cfglines = grep !$seen{$_}++, @cfglines;
+
+       for(@cfglines) {
+               next unless /^\s*(sub)?catalog\s+([-\w_]+)/i;
+               push @cats, $2;
+       }
+
+}
+
+for(@cats) {
+       system "$VendRoot/bin/expire $flag -c $_";
+}
index 67fb7e4..edb2330 100644 (file)
@@ -2,7 +2,7 @@
 #
 # MiniVend localizer
 #
-# $Id$
+# $Id: localize,v 1.2 1998/04/24 07:13:08 mike Exp $
 #
 # Copyright 1996-1998 by Michael J. Heins <mikeh@minivend.com>
 #
index 3176873..510ddc1 100644 (file)
@@ -29,7 +29,7 @@ BEGIN {
     };
        ($VendRoot = $ENV{MINIVEND_ROOT})
                if defined $ENV{MINIVEND_ROOT};
-$VendRoot = $VendRoot || '/home/mike/mvend';
+$VendRoot = $VendRoot || '/home/minivend';
 }
 
 ## END CONFIGURABLE VARIABLES
@@ -39,42 +39,185 @@ use lib "$VendRoot/lib";
 $| = 1; select STDERR; 
 $| = 1; select STDOUT; 
 
-#use Data::Dumper;
-#$Data::Dumper::Terse = 1;
-#$Data::Dumper::Indent = 3;
-
 use Config;
 use File::Find;
 use File::Copy;
 use File::Path;
 use Vend::MakeCat;
 use Vend::Util;
-use Getopt::Std;
+use Getopt::Long;
 use IniConf;
 
 #use strict;
 
+my $Removeconfig;
+my $Reconfigure = 0;
+my $Configfile;
+my $Cfg;
+my $Interactive;
+my $Logfile = 'makecat.log';
+my $catalog_name;
+my %Conf;
+my $Inetmode;
+my $Windows;
+my $pid;
+$Windows = 1 if $Config{osname} =~ /win32/i;
+
+
 my $USAGE = <<EOF;
-usage: $0 [-rf] <catalogname>
+usage: $0 [options] [catalogname]
 
 options:
 
-       -F    Force make of catalog with defaults
-       -f    Configuration file (default is $0.cfg)
-       -i    Interactive edit of configuration
-       -r    Reconfigure defaults
+    -F    Force make of catalog with defaults
+    -f    Configuration file (default is $0.cfg)
+    -l    File to log to (default makecat.log)
+    -i    Interactive edit of configuration
+    -r    Reconfigure defaults
+
+    Defaults:
+    --basedir=directory      Base directory for catalogs
+    --cgibase=url_fragment   Base URL for link programs
+    --documentroot=directory The directory where HTML is based
+    --minivendgroup=group    The default group files should be owned by
+    --minivenduser=username  The user ID which runs MiniVend
+    --serverconf=filename    Location of httpd.conf
+    --vendroot=filename      Location of MiniVend software
+       --homedir=directory      Use instead of $HOME to set defaults
+
+    Required:
+    --catroot=directory      Directory where MiniVend catalog files go
+    --cgidir=directory       The directory the CGI link should go to
+    --servername=server      Name of server (www.whatever.domain)
+    --cgiurl=url_fragment    The path to the CGI link (no server name)
+    --demotype=template      The template catalog (simple is the default)
+    --mailorderto=email      Email address to send orders
+
+    Optional:
+    --catuser=username       The user files should be owned by (if root)
+    --samplehtml=directory   The directory where template HTML goes
+    --imagedir=directory     The directory where template images go
+    --imageurl=url           The URL to prefix images with
+    --nocfg                  Don't add to minivend.cfg
+    --nocopy                 Don't actually copy the files, just test
+    --norunning              Don't add to running server
+    --reference              Return hash of config as string (sets -F, no write)
+    --linkprogram=file       Use file as link program instead of vlink/tlink
+    --linkmode=mode          UNIX or INET (link program vlink or tlink)
+    --sampleurl=url          URL to access HTML for catalog
+    --noumask                Don't set umask
 
 EOF
 
-use vars qw($opt_i $opt_F $opt_f $opt_r);
-getopts('rfFi') or die "Couldn't get options: $@\n$USAGE\n";
+if (scalar @ARGV > 1) {
+
+Getopt::Long::config(qw/permute/);
+
+#Getopt::Long::config(qw/debug/);
+
+my %optctl = (
+
+    'F'                 => \$Vend::MakeCat::Force,
+    'aliases'           => \$Conf{aliases},
+    'basedir'           => \$Conf{basedir},
+    'catalogname'       => \$catalog_name,
+    'catroot'           => \$Conf{catroot},
+    'catuser'           => \$Conf{catuser},
+    'cgibase'           => \$Conf{cgibase},
+    'cgidir'            => \$Conf{cgidir},
+    'cgiurl'            => \$Conf{cgiurl},
+    'demotype'          => \$Conf{demotype},
+    'documentroot'      => \$Conf{documentroot},
+    'f'                 => \$Configfile,
+    'i'                 => \$Interactive,
+    'homedir'           => \$Conf{homedir},
+    'imagedir'          => \$Conf{imagedir},
+    'imageurl'          => \$Conf{imageurl},
+    'l'                 => \$Logfile,
+    'linkmode'          => \$Conf{linkmode},
+    'linkprogram'       => \$Conf{linkprogram},
+    'mailorderto'       => \$Conf{mailorderto},
+    'minivendgroup'     => \$Conf{minivendgroup},
+    'minivenduser'      => \$Conf{minivenduser},
+    'nocfg'             => \$Conf{nocfg},
+    'nocopy'            => \$Conf{nocopy},
+    'norunning'         => \$Conf{norunning},
+    'noumask'           => \$Conf{noumask},
+    'r'                 => \$Reconfigure,
+    'reference'         => \$Conf{reference},
+    'samplehtml'        => \$Conf{samplehtml},
+    'sampleurl'         => \$Conf{sampleurl},
+    'serverconf'        => \$Conf{serverconf},
+    'servername'        => \$Conf{servername},
+    'vendroot'          => \$Conf{vendroot},
+       '<>'                            => sub {
+                                                       my $arg = shift;
+                                                       return unless $arg =~ /=/;
+                                                       my ($opt, $val) = split /=/, $arg, 2;
+                                                       $opt = lc $opt;
+                                                       die "Can't set \U$opt\E twice.\n$USAGE\n"
+                                                               if defined $Conf{$opt};
+                                                       $Conf{$opt} = $val;
+                                                       return;
+                                                       },
+);
+
+my @options = ( qw/
+
+       F
+    aliases=s
+    basedir|base=s
+    catalogname|name=s
+    catroot|dir=s
+    catuser|user=s
+    cgibase=s
+    cgidir=s
+    cgiurl|script=s
+    demotype|template=s
+    documentroot=s
+    f
+    i
+    homedir=s
+    imagedir=s
+    imageurl=s
+    l=s
+    linkmode=s
+    linkprogram=s
+    mailorderto=s
+    minivendgroup|group=s
+    minivenduser|mvuser=s
+    nocfg
+    nocopy
+    norunning
+    r
+    reference
+    samplehtml|html=s
+    sampleurl=s
+    serverconf|conf=s
+    servername|server=s
+    vendroot|mvdir=s
+    <>
+
+/ );
+
+GetOptions(\%optctl, @options)                 or die "\n$USAGE\n";
+
+}
+
+$catalog_name = shift unless $catalog_name;
+if(@ARGV) {
+       die <<EOF . "\n";
+Extra command line arguments were found. (Did you specify
+both --catalogname=name and one on the command line?)
 
-my $Interactive = $opt_i;
+$USAGE
+EOF
+}
 
-my $catalog_name = shift;
 unless($catalog_name) {
-   $Interactive = 1;
-   print <<EOF;
+       die "$USAGE\n" if $Vend::MakeCat::Force;
+       $Interactive = 1;
+       print <<EOF;
 
 Select a short, mnemonic name for the catalog. This will be
 used to set the defaults for naming the catalog, executable,
@@ -88,15 +231,27 @@ EOF
 
 die "$USAGE\n" unless $catalog_name;
 
-if ($opt_F) {
-       $Vend::MakeCat::Force = 1;
-       open(LOGOUT, ">>makecat.log") or die "write makecat.log: $!\n";
+if($Conf{homedir}) {
+       die "Directory set with --homedir=$Conf{homedir} is not a directory.\n"
+               unless -d $Conf{homedir};
+       $ENV{HOME} = $Conf{homedir};
+}
+
+if($Conf{'reference'}) {
+       $Vend::MakeCat::Force =
+       $Conf{nocopy}         =
+       $Conf{norunning}      =
+       $Conf{nocfg}          = 1;
+       $Logfile = $Windows ?  'nul:'   : '/dev/null';
+}
+
+if ($Vend::MakeCat::Force) {
+       my $file = $Logfile || 'makecat.log';
+       open(LOGOUT, ">>$file") or die "write $file: $!\n";
        select LOGOUT;
 }
 
-my $Reconfigure = 0;
-$Reconfigure = 1 if $opt_r;
-my $Configfile = $opt_f || "$0.cfg";
+$Configfile = "$0.cfg" unless $Configfile;
 my $Servername;
 my $Servers;
 my $Done_defaults;
@@ -123,22 +278,19 @@ READCONFIG: {
        close READCONFIG;
 }
 
-my $CgiDefault         = $ENV{MVC_CGIDIR} || undef;
-my $DocrootDefault     = $ENV{MVC_DOCUMENTROOT} || undef;
+my $CgiDefault         = prefix('CGIDIR')                      || undef;
+my $DocrootDefault     = prefix('DOCUMENTROOT')        || undef;
 
-my $Windows;
-if($Config{osname} =~ /win32/i) {
-       $Windows = 1;
-       $ENV{HOME}              = $ENV{HOME} || $ENV{MINIVEND_ROOT} || '';
-       $ENV{MVC_ENCRYPTOR} = $ENV{MVC_ENCRYPTOR} || 'none';
-       $CgiDefault             =  $ENV{MVC_CGIDIR} || 'c:/webshare/scripts';
-       $CgiUrlDefault  =  $ENV{MVC_CGIURL} || '/scripts';
-       $DocrootDefault =  $ENV{MVC_DOCUMENTROOT} || 'c:/webshare/wwwroot';
-}
-else {
-       $ENV{MVC_ENCRYPTOR} = $ENV{MVC_ENCRYPTOR} || 'none';
+if ($Windows) {
+       $ENV{HOME}              = $ENV{HOME} || $ENV{MINIVEND_ROOT}
+                                               || prefix('VENDROOT') || '';
+       $CgiDefault             =  prefix('CGIDIR') || 'c:/webshare/scripts';
+       $CgiUrlDefault  =  prefix('CGIURL')  || '/scripts';
+       $DocrootDefault =  prefix('DOCUMENTROOT') || 'c:/webshare/wwwroot';
 }
 
+$ENV{MVC_ENCRYPTOR} = prefix('ENCRYPTOR') || 'none';
+
 FINDDOCROOT: {
        last FINDDOCROOT if defined $DocrootDefault;
        for(qw/www html web web-public public_html public-html/) {
@@ -218,7 +370,6 @@ if ($< == 0) {
        $isroot = 1 unless $Windows;
 }
 
-my %Conf;
 $Conf{catalogname} = $catalog_name;
 
 my %Initial;
@@ -228,6 +379,7 @@ my %IfRoot = (qw( permtype 1 minivenduser 1 minivendgroup 1 catuser 1));
 my %Prefix = (
        vendroot     =>  $VendRoot,
        basedir      =>  sub {
+                                                       return prefix('basedir', 1) if prefix('basedir', 1);
                                                        return "$Conf{vendroot}/catalogs"
                                                                if $Windows;
                                                        return "$ENV{HOME}/catalogs"
@@ -237,12 +389,15 @@ my %Prefix = (
        minivenduser =>  sub {  return 'everybody' if $Windows;
                                                        get_id(); },
        minivendgroup=>  '',
+    servername  =>  $Config{myhostname},
     documentroot =>  $ENV{MVC_DOCUMENTROOT} || $DocrootDefault,
        cgidir       =>  $ENV{MVC_CGIDIR} || $CgiDefault,
        cgibase      =>  $ENV{MVC_CGIBASE} || $CgiUrlDefault,
        demotype     =>  $ENV{MVC_DEMOTYPE} || 'simple',
-    catuser      => 
-                                               sub { $isroot ? '' : $Conf{'minivenduser'} },
+    catuser      =>  sub {
+                                                       $ENV{MVC_CATUSER} ||
+                                                       ($isroot ? '' : $Conf{'minivenduser'})
+                                               },
     mailorderto  => 
                                                sub {  return 'webmaster' if $Windows;
                                                        if($Conf{servername} =~ s:(/~[^/]+)$:: ) {
@@ -250,13 +405,13 @@ my %Prefix = (
                                                        }
                                                $Conf{catuser} },
        catroot      =>   sub {
-                                                       return $ENV{MVC_CATROOT} if $ENV{MVC_CATROOT};
-                                                       my $dir = $Conf{basedir} . "/" . $catalog_name;
+                                                       my $dir = prefix('basedir') . "/" . $catalog_name;
                                                        return $dir if $Windows;
                                                        my $userdir = (getpwnam($Conf{catuser}))[7];
-                                                       $dir =~ s/\~/$userdir/;
+                                                       $dir =~ s/^\~/$userdir/;
                                                        return $dir;
                                                        },
+       aliases      =>  sub { return "/" . $catalog_name },
        cgiurl       =>  sub {
                                                        return $ENV{MVC_CGIURL} if $ENV{MVC_CGIURL};
                                                        my $url = '';
@@ -312,9 +467,11 @@ my %Postprocess = (
 );
 
 sub prefix {
-       my $parm = shift;
+       my ($parm, $nodefault) = @_;
+       $parm = lc $parm;
        return $Conf{$parm} if $Conf{$parm};
        return $ENV{"MVC_\U$parm"} if $ENV{"MVC_\U$parm"};
+       return undef if $nodefault;
        if(ref $Prefix{$parm}) { 
                return &{ $Prefix{$parm} };
        }
@@ -463,16 +620,17 @@ unless($isroot) {
 my($ask,$param);
 
 unless (-f $Configfile) {
+       $Removeconfig = 1 if prefix('nocopy');
        open(CFGFILE, ">$Configfile")   or die "Can't write $Configfile: $!\n";
        while(<DATA>) {
                print CFGFILE $_;
        }
        close(CFGFILE)                                  or die "Can't close $Configfile: $!\n";
-       warn "\nNew configuration file '$Configfile'\n" ;
+       print "\nNew configuration file '$Configfile'\n" ;
        $Reconfigure = 1;
 }
 
-my $Cfg = new IniConf -file => $Configfile, -nocase => 1;
+$Cfg = new IniConf -file => $Configfile, -nocase => 1;
 
 die "Can't read config file $Configfile: $!\n" unless defined $Cfg;
 my @parms;
@@ -551,7 +709,7 @@ EOF
        if(@conf) {
                # Skip doing this again
        }
-       elsif($param = $Cfg->val('base', 'serverconf')) {
+       elsif($param = prefix('serverconf') || $Cfg->val('base', 'serverconf')) {
                last FINDCONF if $param =~ /^none$/i;
                @conf = split /\s+/, $param;
        }
@@ -595,9 +753,10 @@ EOF
                        last FINDCONF if $ask =~ /^\s*n/i;
                        redo FINDCONF;
                }
+               else {
+                       @Servers = sort keys %{$Servers};
+               }
        }
-
-       @Servers = sort keys %{$Servers};
 }
 
 ##############
@@ -607,6 +766,7 @@ SETDEFAULTS: {
        unless ($Reconfigure) {
                my @parms = $Cfg->Parameters('base');
                for(@parms) {
+                       next if $Conf{$_} = prefix($_, 1);
                        $Conf{$_} = $Cfg->val('base', $_) || undef;
                }
                last SETDEFAULTS;
@@ -632,7 +792,8 @@ EOF
 
                }
                else {
-                       print <<EOF ;
+                       last PERMS if prefix('permtype', 1);
+                       print <<EOF;
 
 You are the super-user. You can set the permissions to GROUP, MULTIPLE
 GROUP, or USER mode for catalogs on this server.
@@ -664,7 +825,7 @@ EOF
                        sethistory("MULTIPLE GROUP", "GROUP", "USER");
                        $Conf{permtype} = prompt("Permission Mode? ", "M");
                        unless($Conf{permtype} =~ s/^\s*([mgu]).*/uc $1/ie) {
-                               warn "Must be one of M(ULTIPLE), G(ROUP), or U(SER).\n";
+                               print "Must be one of M(ULTIPLE), G(ROUP), or U(SER).\n";
                                redo PERMS;
                        }
                        $Cfg->setval('base', 'permtype', $Conf{permtype});
@@ -714,6 +875,7 @@ EOF
        my @ask = $Cfg->val('global', 'askbase');
 
        for('cgidir') {
+               next if $Conf{$_};
                print <<EOF;
 
 
@@ -724,7 +886,7 @@ CGI directory.
 EOF
                $ask = prompt ("Do you have a CGI directory? ", 'y');
                last if is_yes($ask);
-               $Prefix{cgidir} = $Prefix{documentroot};
+               $Prefix{cgidir} = prefix('documentroot');
        }
 
        my ($p, $i);
@@ -738,7 +900,7 @@ EOF
                        $hval = $history[0];
                        sethistory(@history);
                }
-               $val = $Cfg->val("base", $p) || $hval;
+               $val = prefix($p, 1) || $Cfg->val("base", $p) || $hval;
                print "\n";
                print description($p);
                print "\n\n";
@@ -752,7 +914,10 @@ EOF
                if(defined $Postprocess{$p}) {
                        $Conf{$p} = &{$Postprocess{$p}}($Conf{$p});
                }
-               $Cfg->setval('base', $p, $Conf{$p});
+       }
+
+       for(@ask) {
+               $Cfg->setval('base', $_, $Conf{$_});
        }
 
        $Cfg->WriteConfig("$Configfile.new")
@@ -763,12 +928,13 @@ EOF
 }
 #############
 
+       my $serv = prefix('servername') || 'www.yourdomain'; 
        my $demo_template = <<"EndOfTemplate";
 # The server name, something like: www.company.com
 #                                  www.company.com:8000
 #                                  www.company.com/~yourname
 #
-SERVERNAME     $Conf{'servername'}
+SERVERNAME     $serv
 
 EndOfTemplate
 
@@ -836,7 +1002,8 @@ DEMOSETUP: {
                        /
                )
        {
-               next if defined $ENV{"MVC_$_"};
+               #next if defined $ENV{"MVC_$_"};
+               next if prefix($_);
                $demo_template =~ /^$_\s+(.*)/m;
                $ENV{"MVC_$_"} = $1;
        }
@@ -902,18 +1069,24 @@ During many of the following operations, defaults are placed in
 a buffer for you.  You may use the up and down arrows to toggle
 between the defaults.
 
+If you made a mistake on a *previous* entry and realize that
+in a later one, if you enter ONLY an @ sign and press return you
+should be returned to the previous step.
+
 EOF
 SETSERVER: {
        sethistory(@Servers);
        print description('servername');
-       $Servername = $ENV{MVC_SERVERNAME} || $Cfg->val('base', 'servername');
+       $Servername = prefix('servername', 1)                   || 
+                                 $Cfg->val('base', 'servername')       ||
+                                 prefix('servername');
        $Servername =
                $Conf{servername} =
                        prompt("Server name? ", ($Servername || $Servers[0]));
        $Cfg->setval("catalog $catalog_name", 'servername', $Conf{servername});
 }
 
-@ask = $Cfg->val('global', 'askconfig');
+       @ask = $Cfg->val('global', 'askconfig');
 
 
        for ($i = 0; $i < scalar @ask; $i++) {
@@ -921,13 +1094,16 @@ SETSERVER: {
                if (defined $History{$p}) {
                        @history = &{$History{$p}}(prefix($p));
                        sethistory(@history);
-                       $val = $Cfg->val("catalog $catalog_name", $p)
-                                       || $history[0] || prefix($p);
+                       $val =  prefix($p,1)                                                    ||
+                                       $Cfg->val("catalog $catalog_name", $p)  ||
+                                       $history[0]                                                             ||
+                                       prefix($p);
                }
                else {
-                       $val = $Cfg->val("catalog $catalog_name", $p) || prefix($p);
+                       $val =  prefix($p,1)                                                    ||
+                                       $Cfg->val("catalog $catalog_name", $p)  ||
+                                       prefix($p);
                }
-               $val = $ENV{"MVC_\U$val"} if defined $ENV{"MVC_\U$val"};
                if (! $isroot and defined $IfRoot{$p}) {
                        $Conf{$p} = $val;
                        next;
@@ -946,8 +1122,15 @@ SETSERVER: {
                $Cfg->setval("catalog $catalog_name", $p, $Conf{$p});
        }
 
-$Cfg->WriteConfig("$Configfile.new")
-       and rename "$Configfile.new", $Configfile;
+if($Removeconfig) {
+       unlink $Configfile;
+}
+elsif ( ! prefix('nocopy') ) {
+       $Cfg->WriteConfig("$Configfile.new")
+               and rename "$Configfile.new", $Configfile;
+}
+
+undef $Cfg;
 
 # Try and get the URL we will use to access the catalog
 GUESS: {
@@ -962,7 +1145,7 @@ GUESS: {
 
     unless( $guessdir =~ s/^$Conf{documentroot}// ) {
         print <<EOF;
-\a
+
 The specified HTML directory, $Conf{samplehtml},
 is not a subdirectory of DocumentRoot. This will make it
 hard for us to guess the URL needed to access pages from
@@ -1048,7 +1231,7 @@ $msg = q# supposed to be a directory, not a file. Can't continue.#;
 for ( $Conf{catroot}, $Conf{documentroot}, $Conf{basedir},
        $Conf{samplehtml}, $Conf{imagedir} ) {
        next unless -f $_;
-       warn "$_ $msg\n";
+       print "$_ $msg\n";
        $warn++;
 }
 die "\n" if $warn;
@@ -1056,7 +1239,11 @@ die "\n" if $warn;
 my $prog;
 
 SETLINKMODE: {
+       if($prog = prefix('linkprogram')) {
+               last SETLINKMODE;
+       }
        if ($Windows) {
+               $Conf{linkmode} = 'INET';
                $prog = "$VendRoot/bin/tlink.exe";
                last SETLINKMODE;
        }
@@ -1074,14 +1261,19 @@ EOF
                if $Vend::MakeCat::Prompt_sub;
 
        sethistory("NONE", "UNIX", "INET");
-       $default = ($Config{osname} =~ /bsd/i and $Config{osvers} gt '3')
+
+       unless ( $default = prefix('linkmode') ) {
+               $default = ($Config{osname} =~ /bsd/i and $Config{osvers} gt '3')
                                ? 'INET' : 'UNIX';
+       }
+       
        $ask = prompt("INET or UNIX mode? ", $default);
 
        $prog = "$VendRoot/bin/vlink";
 
        if($ask =~ /^\s*i/i) {
                $prog = "$VendRoot/bin/tlink";
+               $Inetmode = 1;
        }
        elsif($ask =~ /^\s*n/i) {
                $prog = "NONE";
@@ -1115,6 +1307,8 @@ EOF
        }
 }
 
+umask(022) unless $Conf{noumask};
+
 $warn = 0;
 print do_msg("Checking directories");
 
@@ -1126,8 +1320,10 @@ for($Conf{catroot}, $Conf{samplehtml}) {
 }
 
 if($warn) {
-       $ask = prompt "The above directories already exist. Overwrite files? ";
-       exit 2 unless is_yes($ask);
+       $ask = prompt "The above directories already exist. Overwrite files? ", 'n';
+       unless($Vend::MakeCat::Force) {
+               exit 2 unless is_yes($ask);
+       }
 }
 
 $warn = 0;
@@ -1152,7 +1348,7 @@ if($warn) {
 
                (warn "\n$_ is empty, skipping.\n", next)
                        unless $dir =~ /\S/;
-               unless(-d $dir) {
+               unless(-d $dir or prefix('nocopy') ) {
                        File::Path::mkpath([$dir], 0, 0775)
                                or die "Couldn't make directory $dir: $!\n";
                }
@@ -1165,6 +1361,17 @@ for(qw(catroot samplehtml imagedir)) {
        # Allow nocopy
        next if $dir =~ /^\s*none\s*$/i;
 
+       if (prefix('nocopy')) {
+               next if -w $dir;
+               my $parent = $dir;
+               do {
+                       $parent =~ s:/[^/]+$::;
+               } until ! $parent or -d $parent;
+               warn "Directory $dir (or parents) not writable, could be problems.\n"
+                       unless -w $dir || -w $parent;
+               next;
+       }
+
        die "Directory $dir not writable, can't continue.\n"
                unless -w $dir or $dir =~ /^\s*none\s*$/i;
        set_owner($dir);
@@ -1184,29 +1391,42 @@ unless (-d $Conf{'demotype'}) {
 else {
        $dir = $Conf{'demotype'};
 }
-chdir $dir || die "Couldn't change directory to $dir: $!\n";
 
-# Before Archive::Tar -- thank you, Calle!
-#system "tar -cf - * | (cd $Conf{catroot}; tar -xf -)";
+# Here we actually do the file copy unless --nocopy is set
+DOCOPY: {
 
-eval {
-       copy_current_to_dir($Conf{catroot});
-};
+       if (prefix('nocopy')) {
+               print "not copying.\n";
+               last DOCOPY;
+       }
 
-if($@) {
-       die <<EOF . "\n";
+       chdir $dir || die "Couldn't change directory to $dir: $!\n";
+
+       # This is what we used to do
+       #system "tar -cf - * | (cd $Conf{catroot}; tar -xf -)";
+
+       umask(07) unless $Conf{noumask};
+
+       eval {
+               copy_current_to_dir($Conf{catroot});
+       };
+
+       umask(022) unless $Conf{noumask};
+
+       if($@) {
+               die <<EOF . "\n";
 There were errors in copying the demo files.  Cannot
 continue.  Check to see if permissions are correct.
 
 EOF
-}
+       }
 
-unless($prog eq 'NONE') {
-File::Copy::copy( $prog, "$Conf{catroot}/executable")
-       or die "Couldn't copy link program from $prog: $!\n";
-}
+       unless($prog eq 'NONE') {
+               File::Copy::copy( $prog, "$Conf{catroot}/executable")
+                       or die "Couldn't copy link program from $prog: $!\n";
+       }
 
-print "done.\n";
+       print "done.\n";
 
 chdir $Conf{catroot} 
        || die "Couldn't change directory to $Conf{catroot}: $!\n";
@@ -1314,8 +1534,10 @@ sub wanted {
 
        $cginame = $Conf{cgiurl};
        $cginame =~ s:.*/::;
-       $cginame = "$Conf{cgidir}/$cginame";
+       $Conf{cgifile} = $cginame = "$Conf{cgidir}/$cginame";
        
+       umask(022) unless $Conf{noumask};
+
        unless ($prog eq 'NONE') {
 
                print do_msg("Moving link program to $cginame");
@@ -1329,8 +1551,9 @@ sub wanted {
                                or die "\nCouldn't set ownership of $cginame: $!\n";
                }
 
-               unless ($isroot or $Windows or can_do_suid()) {
-                       print <<EOF;
+               unless ($Windows or $Inetmode) {
+                       unless ($isroot or can_do_suid()) {
+                               print <<EOF;
 
 My test indicates you can't change vlink to SUID mode.
 This will cause big problems -- you can make MiniVend work anyway
@@ -1341,11 +1564,15 @@ you should run this as root, or su to root and do:
        chmod 4755 $cginame
 
 EOF
-                       $ask = prompt("Continue? ", 'n');
-                       exit 2 unless is_yes($ask);
+                               $ask = prompt("Continue? ", 'n');
+                               unless($Vend::MakeCat::Force) {
+                                       exit 2 unless is_yes($ask);
+                               }
+                       }
+
+                       chmod 04755, $cginame
+                               or warn "\nCouldn't set permissions on $cginame: $!\n";
                }
-               chmod 04755, $cginame
-                       or warn "\nCouldn't set permissions on $cginame: $!\n";
 
                print "done.\n";
        }
@@ -1414,9 +1641,41 @@ EOF
        chdir $Conf{vendroot}
                or die "\nCouldn't change directory to $VendRoot: $!\n";
 
-       $yes = prompt "Add catalog to minivend.cfg? ", 'y';
+       my $pidfile = 'etc/minivend.pid';
+       PID: {
+               local ($/);
+               open(PID,"+<$pidfile") or last PID;
+
+               # If we get lock we are not running
+               unless($Windows) {
+                       lockfile(\*PID,1,0)  and last PID;
+               }
+               
+               $pid = <PID>;
+               $pid =~ /(\d+)/;
+               $pid = $1;
+       }
+
+}
+       my $add;
+
+       umask(07) unless $Conf{noumask};
+
+       $add = prefix('nocfg') ? 'n' : 'y';
+       $yes = prompt "Add catalog to minivend.cfg? ", $add;
+
+       $add = prefix('norunning') ? 'n' : 'y';
+
+       if($pid) {
+               $add_to_running = prompt "Add catalog to server running on PID $pid? ", $add;
+               $add_to_running = is_yes($add_to_running);
+       }
 
        my $full = '';
+       my $newcfgline;
+
+       $newcfgline = sprintf "%-10s %s %s %s %s\n", 'Catalog',
+                               $catalog_name, $Conf{catroot}, $full . $Conf{cgiurl}, $Conf{aliases};
 
        if( is_yes($yes) ) {
                my ($newcfgline, $mark, @out);
@@ -1431,9 +1690,9 @@ EOF
                open(CFG, $tmpfile)
                        or die "\nCouldn't open $tmpfile: $!\n";
                while(<CFG>) {
-                       $mark = $. if /^#?\s*catalog\s+/i;
-                       warn "\nDeleting old configuration $catalog_name.\n"
-                               if s/^(\s*catalog\s+$catalog_name\s+)/#$1/io;
+                       $mark = $. if /^#?catalog\s+/i;
+                       print "\nDeleting old configuration $catalog_name.\n"
+                               if s/^(catalog\s+$catalog_name\s+)/#$1/io;
                        $full = is_yes($1)
                                if /^\s*fullurl\s+(.*)/i;
                        push @out, $_;
@@ -1446,7 +1705,7 @@ EOF
                open(NEWCFG, ">minivend.cfg")
                        or die "\nCouldn't write minivend.cfg: $!\n";
 
-               $newcfgline = sprintf "%-19s %s %s %s\n", 'Catalog',
+               $newcfgline = sprintf "%-13s %s %s %s\n", 'Catalog',
                                $catalog_name, $Conf{catroot}, $full . $Conf{cgiurl};
                if (defined $mark) {
                        print NEWCFG @out[0..$mark-1];
@@ -1455,7 +1714,7 @@ EOF
                }
                else { 
                        $newconfig = 1;
-                       warn "\nNo catalog previously defined. Adding $catalog_name at top.\n";
+                       print "\nNo catalog previously defined. Adding $catalog_name at top.\n";
                        print NEWCFG $newcfgline;
                        print NEWCFG @out;
                }
@@ -1467,8 +1726,6 @@ EOF
                }
        }
        else {
-               my $newcfgline = sprintf "%-19s %s %s %s\n", 'Catalog',
-                               $catalog_name, $Conf{catroot}, $Conf{cgiurl};
                print <<EOF;
 You will need to add the following line to your minivend.cfg file
 to activate the catalog.
@@ -1478,6 +1735,37 @@ $newcfgline
 EOF
        }
 
+       $newcfgline = sprintf "%-13s %s %s %s\n", 'Catalog',
+                               $catalog_name, $Conf{catroot}, $full . $Conf{cgiurl};
+
+       if($add_to_running) {
+               my $fn = 'etc/restart';
+               open(RESTART, ">>$fn") or
+                               die "Couldn't write $fn to add catalog: $!\n";
+               Vend::Util::lockfile(\*RESTART, 1, 1)   or die "lock $fn: $!\n";
+               printf RESTART $newcfgline;
+               Vend::Util::unlockfile(\*RESTART)               or die "unlock $fn: $!\n";
+               close RESTART;
+               unless ($Windows) {
+                       kill 'HUP', $pid;
+                       sleep 1;
+               }
+               $fn = 'etc/reconfig';
+               open(RESTART, ">>$fn") or
+                               die "Couldn't write $fn to add catalog: $!\n";
+               Vend::Util::lockfile(\*RESTART, 1, 1)   or die "lock $fn: $!\n";
+               printf RESTART $full . $Conf{cgiurl} . "\n";
+               if($isroot) {
+                       chown ($mvuid, $mvgid, $fn)
+                               or warn "\nCouldn't set ownership of $fn: $!\n";
+               }
+               Vend::Util::unlockfile(\*RESTART)               or die "unlock $fn: $!\n";
+               close RESTART;
+               unless ($Windows) {
+                       kill 'HUP', $pid;
+               }
+       }
+       
     my $start_string = $Windows        ? "$Conf{vendroot}\\minivend"
                                                                : "$Conf{vendroot}/bin/restart";
 
@@ -1510,9 +1798,9 @@ EOF
 For session expiration, you might want to place a line like this in your
 crontab:
 
-44 4 * * * $Conf{vendroot}/bin/expire -c $Conf{catalogname}
+44 4 * * * $Conf{vendroot}/bin/expireall -r
 
-It will prevent the session database from getting too large.
+It will prevent the session databases from getting too large.
 
 EOF
 
@@ -1528,6 +1816,12 @@ EOF
 
        print "Good luck with MiniVend!\n" if defined $newconfig;
 
+       if($Conf{'reference'}) {
+               $Data::Dumper::Terse = 1;
+               $Data::Dumper::Indent = 3;
+               print STDOUT Vend::Util::uneval(\%Conf);
+       }
+
 __END__
 
 # Sample catalog definition
@@ -1596,6 +1890,7 @@ vendroot=
 # All params allowed
 #
 params=<<EOF
+aliases
 basedir
 catroot
 catuser
@@ -1618,6 +1913,7 @@ vendroot
 EOF
 
 catparams=<<EOF
+aliases
 catroot
 catuser
 cgidir
@@ -1659,6 +1955,7 @@ mailorderto
 catroot
 cgidir
 cgiurl
+aliases
 documentroot
 samplehtml
 imagedir
@@ -1669,6 +1966,7 @@ EOF
 
 # Simple test to make sure legal for config file
 [legalconfig]
+aliases=1
 cgidir=1
 cgiurl=1
 catuser=1
index 3e08540..895ebe7 100644 (file)
@@ -1,8 +1,8 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
 #
-# MiniVend version 3.09
+# MiniVend version 3.11
 #
-# $Id: minivend,v 1.19 1998/01/18 06:42:42 mike Exp mike $
+# $Id: minivend,v 1.34 1998/09/01 13:15:22 mike Exp mike $
 #
 # This program is largely based on Vend 0.2
 # Copyright 1995 by Andrew M. Wilcox <awilcox@world.std.com>
@@ -46,7 +46,7 @@ BEGIN {
 $Global::VendRoot = $Global::VendRoot || '/home/minivend';
 $Global::ConfigFile = 'minivend.cfg';
 
-die "MiniVend not configured. Did you make a catalog?\n"
+die "MiniVend not configured, no $Global::ConfigFile.\n"
        unless -f "$Global::VendRoot/$Global::ConfigFile";
 
 $Global::ConfDir = "$Global::VendRoot/etc";
@@ -133,7 +133,7 @@ sub debug {
        return ($_[0] || 0) & $Global::DEBUG;
 }
 
-$VERSION = '3.10';
+$VERSION = '3.11';
 use strict;
 use Fcntl;
 
@@ -273,7 +273,7 @@ sub interaction_error {
 #    logError ("Difficulty interacting with browser: $msg");
     logError( errmsg('bin/minivend:2', "Difficulty interacting with browser: %s" , $msg) );
 
-    $page = readin($Vend::Cfg->{Special}->{'interact'});
+    $page = readin(find_special_page('interact'));
     if (defined $page) {
                $page =~ s#\[message\]#$msg#ig;
                response('html',interpolate_html($page, $wantref));
@@ -338,7 +338,7 @@ sub expect_form {
 # Display the initial catalog page.
 
 sub do_catalog {
-    do_page($Vend::Cfg->{Special}->{'catalog'});
+    do_page(find_special_page('catalog'));
 }
 
 
@@ -367,7 +367,7 @@ sub display_page {
        if($Vend::Cfg->{'ExtraSecure'} and
                $Vend::Cfg->{AlwaysSecure}->{$name}
                and !$CGI::secure) {
-               $name = $Vend::Cfg->{Special}->{'violation'};
+               $name = find_special_page('violation');
        }
 
     $page = readin($name);
@@ -382,7 +382,7 @@ sub display_page {
     } else {
                logData($Vend::Cfg->{'LogFile'}, format_log_msg('page not found'))
                        if defined $Vend::Cfg->{CollectData}->{nopage};
-               display_special_page($Vend::Cfg->{Special}->{'missing'}, $name);
+               display_special_page(find_special_page('missing'), $name);
                return 0;
     }
 }
@@ -434,7 +434,7 @@ sub cache_page {
        else {
                logData($Vend::Cfg->{'LogFile'}, format_log_msg('page not found'))
                        if defined $Vend::Cfg->{CollectData}->{nopage};
-               return display_special_page($Vend::Cfg->{Special}->{'missing'}, $name);
+               return display_special_page(find_special_page('missing'), $name);
     }
 }
 
@@ -477,14 +477,14 @@ sub do_order
 
     my $base = product_code_exists_tag($code, $catalog || undef);
 
-       $quantity = (defined $quantity and $quantity =~ /^[-+](\d+)$/)
-                               ? ($quantity =~ s/^_//, $quantity)
+       $quantity = (defined $quantity and $quantity =~ /^[-+_](\d+)$/)
+                               ? ($quantity =~ s/^[_+]//, $quantity)
                                : 1;
 
     if (! $base ) {
 #              logError("Attempt to order missing product code: $code");
                logError( errmsg('bin/minivend:5', "Attempt to order missing product code: %s" , $code) );
-               display_special_page($Vend::Cfg->{Special}->{'noproduct'}, $code);
+               display_special_page(find_special_page('noproduct'), $code);
                return;
     }
 
@@ -544,7 +544,7 @@ WARNING:
 Possible bad robot. Cart limit of $limit exceeded.  Cart emptied.
 EOF
                my $cmd;
-               if($cmd = $Vend::Cfg->{LockoutCommand}) {
+               if($cmd = $Global::LockoutCommand) {
                        my $host = http()->Client_IP_Address;
                        $cmd =~ s/%s/$host/ or $cmd .= " $host";
                        $msg .= "Performing lockout command '$cmd'.";
@@ -840,13 +840,22 @@ sub update_data {
                return undef;
        }
 
-       my $function    = $CGI::values{'mv_data_function'};
+       my $function    = lc (delete $CGI::values{'mv_data_function'});
+       if($function eq 'delete' and ! delete $CGI::values{'mv_data_verify'}) {
+               logError("DELETE without VERIFY, abort");
+               return undef;
+       }
        my $table               = $CGI::values{'mv_data_table'};
        my $prikey              = $CGI::values{'mv_data_key'};
+       my $decode              = is_yes($CGI::values{'mv_data_decode'});
        my ($ref, $type, $db, $msql, $database);
 
        $ref = $Vend::Cfg->{Database}->{$table} || '';
 
+       if (! $ref) {
+               logError("set: non-existent table $table");
+               return undef;
+       }
        $Vend::WriteDatabase{$table} = 1;
 
        if( $ref->{'type'} eq '7') {
@@ -872,9 +881,9 @@ sub update_data {
                return undef;
        }
 
-       my @fields              = split /[\s,]+/, $CGI::values{'mv_data_fields'};
+       my @fields              = grep $_, split /[\s\0,]+/, $CGI::values{'mv_data_fields'};
 
-       $function = ($function =~ /insert/i ? 'insert' : 'update');
+       $function = 'update' unless $function;
 
        my (%data);
        for(@fields, $prikey) {
@@ -905,11 +914,14 @@ sub update_data {
                for(keys %data) {
                        next unless (($value = $data{$_}->[$i]) || $CGI::values{mv_update_empty});
                        push(@k, $_);
-                       $value =~ s/'/\\'/g;
+                       HTML::Entities::decode($value) if $decode;
                        $select_key = $value if $_ eq $prikey;
                        push(@v, $value);
                }
-               if($type eq 'sql' and $function eq 'insert') {
+               if($function eq 'delete') {
+                       $db->delete_record($select_key);
+               }
+               elsif($type eq 'sql' and $function eq 'insert') {
                        sql_query('set', "", "delete from $table where code = '$select_key'",
                                                $msql || undef, $database);
                        $query = "insert into $table (";
@@ -945,7 +957,6 @@ sub update_data {
                        if $type eq 'sql';
        }
 
-
 }
 
 # Parse the mv_click and mv_check special variables
@@ -1175,7 +1186,8 @@ sub do_process {
                my(@map) = split /\s*[\0]+\s*/, $CGI::values{'mv_click_map'};
                foreach $click (@map) {
                        push (@clicks, $click)
-                               if defined $CGI::values{"mv_click.$click.x"};
+                               if defined $CGI::values{"mv_click.$click.x"}
+                               or defined $CGI::values{"$click.x"};
                }
        }
 
@@ -1187,7 +1199,7 @@ sub do_process {
     $todo = $CGI::values{'mv_todo'};
 
     $nextpage = $CGI::values{'mv_nextpage'} || $Vend::Session->{'page'};
-    $orderpage = $CGI::values{'mv_orderpage'} || $Vend::Cfg->{Special}->{'order'};
+    $orderpage = $CGI::values{'mv_orderpage'} || find_special_page('order');
     $ordered_items = $CGI::values{'mv_order_item'};
 
        # Maybe we have an imagemap input, if not, use $doit
@@ -1230,7 +1242,6 @@ sub do_process {
                update_quantity() || return; #Return on error
                my($ok);
                my($missing,$next,$status,$final);
-               my($values) = $Vend::Session->{'values'};
 
                # Set shopping cart
                
@@ -1238,60 +1249,72 @@ sub do_process {
 
          CHECK_ORDER: {
 
-               if (defined $CGI::values{'mv_order_profile'}) {
+               if (defined $CGI::values{mv_order_profile}) {
                        ($status,$final,$missing) =
-                               check_order($CGI::values{'mv_order_profile'});
-                       update_user();
+                               check_order($CGI::values{mv_order_profile});
                }
                else {
                        $status = $final = 1;
                }
 
                if($status) {
-                       $next = $Vend::Session->{'values'}->{'mv_successpage'} || $orderpage;
+                       $next = $::Values->{mv_successpage} || $orderpage;
                        display_page($next) unless $final;
                }
                else {
-                       $next = $CGI::values{'mv_failpage'} || $Vend::Cfg->{Special}->{'needfield'};
+                       $next = $::Values{mv_failpage} || find_special_page('needfield');
                        display_special_page($next, $missing);
                        last CHECK_ORDER;
                }
 
                last CHECK_ORDER unless $final;
 
-               ($status, $missing) = check_required($values);
+               ($status, $missing) = check_required($::Values);
                if (!$status) {
-                       display_special_page($Vend::Cfg->{Special}->{'needfield'}, $missing);
+                       display_special_page(find_special_page('needfield'), $missing);
                        put_session();
                        return;
                }
 
-               if($Vend::Cfg->{CyberCash} and defined $CGI::values{mv_cyber_mode}) {
+               my $order_no;
+
+               if (defined $CGI::values{mv_order_route}) {
+                       # $ok will not be defined unless Route "supplant" was set
+                       # $order_no will come back so we don't issue two of them
+                       ($ok, $order_no) = Vend::Order::route_order(
+                                                               $CGI::values{mv_order_route},
+                                                               $Vend::Items
+                                                               );
+               } 
+               elsif($Vend::Cfg->{CyberCash} and defined $CGI::values{mv_cyber_mode}) {
                        $status = cyber_charge();
                        unless($status) {
                                display_special_page(
-                                       $Vend::Cfg->{Special}->{failed},
+                                       find_special_page('failed'),
                                        $Vend::Session->{cybercash_error}
                                );
                                return;
                        }
                }
                                
-               # This function (followed down) now does the backend ordering
-               $ok = mail_order();
+               # This function (followed down) now does the backend ordering,
+               # so AsciiBackend won't work if you use "supplant"
+               # If the "supplant" option was set in order routing it will
+               # not be used ($ok would have been defined)
+#::logGlobal("Order number=$order_no\n");
+               $ok = mail_order(undef, $order_no || undef) unless defined $ok;
 
                # Display a receipt if configured
 
-               if ($ok && $Vend::Session->{'values'}->{'mv_order_receipt'}) {
-               display_special_page($Vend::Session->{'values'}->{'mv_order_receipt'});
-               }
-               elsif ($ok && $Vend::Cfg->{'ReceiptPage'}) {
-               display_special_page($Vend::Cfg->{'ReceiptPage'});
+               if ($ok) {
+               display_special_page(
+                                                               $::Values->{mv_order_receipt}   ||
+                                                               $Vend::Cfg->{ReceiptPage}               ||
+                                                               find_special_page('confirmation')
+                                                               );
                }
-               elsif ($ok) {
-               display_special_page($Vend::Cfg->{Special}->{'confirmation'});
-               } else {
-               display_special_page($Vend::Cfg->{Special}->{'failed'});
+               else {
+               display_special_page(find_special_page('failed'));
                }
 
                # Remove the items
@@ -1345,7 +1368,7 @@ sub do_process {
                        return;
                }
                else {
-                       do_page($Vend::Cfg->{Special}->{'order_security'});
+                       do_page(find_special_page('order_security'));
                        return;
                }
     }
@@ -1363,7 +1386,7 @@ sub do_process {
                get_session();
                init_session();
                $Vend::Session->{'frames'} = $frames;
-               display_page($Vend::Cfg->{Special}->{'canceled'});
+               display_page(find_special_page('canceled'));
     }
        else {
                interaction_error(
@@ -1420,7 +1443,9 @@ sub add_catalog {
        my $g = $Global::Catalog{$name}
                                or die "Catalog '$name' not parsed.\n";
 
-       my $c = $Global::Selector{$g->{script}} || {};
+       my $c = $Global::Selector{$g->{script}}                 ||
+                       $Global::SelectorAlias{$g->{script}}    ||
+                       {};
 
        $c->{CatalogName} = $name;
 
@@ -1562,10 +1587,109 @@ EOF
                read_salestax();
                read_shipping();
                open_database();
+               my $db;
+               DREAD: {
+                       if($db = $Vend::Cfg->{DbDatabase}) {
+                               $db = database_exists_ref($db)
+                                       or last DREAD;
+                               $db = $db->ref();
+                               my ($k, @f);    # key and fields
+                               my @l;                  # refs to locale repository
+                               my @n;                  # names of locales
+
+                               @n = $db->columns();
+                               my $name;
+                               foreach $name (@n) {
+                                       my $file = $db->field('_file', $name);
+                                       my $type = $db->field('_type', $name);
+                                       next unless $file and $type;
+                                       Vend::Config::parse_database('', "$name $file $type");
+                               }
+                               my $i;
+                               while( ($k , @f ) = $db->each_record) {
+                                       next if $k =~ /^_/;
+                                       for ($i = 0; $i < @f; $i++) {
+                                               next unless length $f[$i];
+                                               Vend::Config::parse_database('', "$n[$i] $k $f[$i]");
+                                       }
+                               }
+                       }
+                       my $save = $^W;
+                       $^W = 0;
+                       close_database();
+                       $^W = $save;
+                       open_database();
+               }
                (
                        $Vend::Cfg->{ItemPriceRoutine},
                        $Vend::Cfg->{QuantityPriceRoutine}
                )       = read_pricing();
+
+               LREAD: {
+                       if($db = $Vend::Cfg->{LocaleDatabase}) {
+                               $db = database_exists_ref($db)
+                                       or last LREAD;
+                               $db = $db->ref();
+                               my ($k, @f);    # key and fields
+                               my @l;                  # refs to locale repository
+                               my @n;                  # names of locales
+
+                               @n = $db->columns();
+                               my $extra;
+                               for(@n) {
+                                       $Vend::Cfg->{Locale_repository}{$_} = {}
+                                               unless $Vend::Cfg->{Locale_repository}{$_};
+                                       push @l, $Vend::Cfg->{Locale_repository}{$_};
+                               }
+                               my $i;
+                               while( ($k , @f ) = $db->each_record) {
+                                       for ($i = 0; $i < @f; $i++) {
+                                               next unless length($f[$i]);
+                                               $l[$i]->{$k} = $f[$i];
+                                       }
+                               }
+                               unless ($Vend::Cfg->{Locale}) {
+                                       for(@n) {
+                                               next unless $Vend::Cfg->{Locale_repository}{$_}{'default'};
+                                               $Vend::Cfg->{Locale} = $Vend::Cfg->{Locale_repository}{$_};
+                                               last;
+                                       }
+                                       $Vend::Cfg->{Locale} = $Vend::Cfg->{Locale_repository}{$n[0]}
+                                               unless $Vend::Cfg->{Locale};
+                               }
+                       }
+               }
+
+               SREAD: {
+                       if($db = $Vend::Cfg->{DirectiveDatabase}
+                                       || $Vend::Cfg->{VariableDatabase}) {
+                               $db = database_exists_ref($db)
+                                       or last SREAD;
+                               $db = $db->ref();
+                               my ($k, @f);    # key and fields
+                               my @l;                  # refs to locale repository
+                               my @n;                  # names of locales
+
+                               @n = $db->columns();
+                               my $extra;
+                               for(@n) {
+                                       if (! ref $Vend::Cfg->{$_} or $Vend::Cfg->{$_} !~ /HASH/) {
+                                               # ignore non-existent directive
+                                               push @l, {};
+                                               next;
+                                       }
+                                       push @l, $Vend::Cfg->{$_};
+                               }
+                               my $i;
+                               while( ($k , @f ) = $db->each_record) {
+                                       for ($i = 0; $i < @f; $i++) {
+                                               next unless length($f[$i]);
+                                               $l[$i]->{$k} = $f[$i];
+                                       }
+                               }
+                       }
+               }
+
 # STATICPAGE
                if($build) {
                        $Vend::BuildingPages = 1;
@@ -1587,6 +1711,8 @@ EOF
     }
 
        dump_structure($c, $g->{name}) if $Global::DumpStructure;
+       Vend::Util::writefile(">$Global::ConfDir/status.$g->{name}", scalar localtime());
+       Vend::Util::writefile(">$c->{ConfDir}/status.$g->{name}", scalar localtime());
 
        return $c;
 
@@ -1997,7 +2123,7 @@ sub build_all {
 
 sub map_cgi {
 
-    my($host, $ip, $user);
+    my($host);
 
     $CGI::request_method = http()->Method;
     die "REQUEST_METHOD is not defined" unless defined $CGI::request_method
@@ -2005,34 +2131,35 @@ sub map_cgi {
 
     $CGI::path_info = http()->Path_Info;
 
-       # The great and final AOL fix
+       # The great and really final AOL fix
        #
-    $host = $CGI::remote_host = http()->Client_Hostname;
-    $ip   = $CGI::remote_addr = http()->Client_IP_Address;
+    $host      = $CGI::remote_host = http()->Client_Hostname;
+    $CGI::ip   = $CGI::remote_addr = http()->Client_IP_Address;
 
        if($Global::DomainTail and $host) {
                $host =~ s/.*?([-A-Za-z0-9]+\.[A-Za-z]+)$/$1/;
        }
        elsif($Global::IpHead) {
+               $host = $Global::IpQuad == 0 ? 'nobody' : '';
                my @ip;
-               @ip = split /\./, $ip;
-               $ip = '';
-               $ip = join ".", @ip[0 .. ($Global::IpQuad - 1)] if $Global::IpQuad;
+               @ip = split /\./, $CGI::ip;
+               $CGI::ip = '';
+               $CGI::ip = join ".", @ip[0 .. ($Global::IpQuad - 1)] if $Global::IpQuad;
        }
        #
        # end AOL fix
 
-    $CGI::host = $host || $ip;
+    $CGI::host = $host || $CGI::ip;
 
     $CGI::secure = 1
                if http()->Https_on;
 
-    $user = http()->Authenticated_User;
-    $user = '' unless defined $user;
 
-    $CGI::user = $user;
+    $CGI::user = http()->Authenticated_User || '';
     $CGI::useragent = http()->User_Agent;
     $CGI::cookie = http()->Cookie;
+       $CGI::authorization = http()->{Authorization}
+               if defined $Vend::InternalHTTP and ! $CGI::user;
 
     #$CGI::content_length = http()->Content_Length;
     $CGI::content_type = http()->Content_Type;
@@ -2071,7 +2198,9 @@ sub map_cgi {
 sub dispatch {
        my($http, $debug) = @_;
        $H = $http;
-
+       if($Vend::Foreground) {
+               Vend::Interpolate::reset_calc();
+       }
 # DEBUG
 #Vend::Util::logDebug ("begin dispatch: " . (join " ", times()) . "\n")
 #                                              if ::debug(0x80);
@@ -2127,7 +2256,9 @@ sub dispatch {
                                unless $Vend::Cfg->{Static};
                }
 
-               if (defined $Global::SelectorAlias{$CGI::script_name}) {
+               if (defined $Global::SelectorAlias{$CGI::script_name}
+                       and ! defined $Vend::InternalHTTP                 )
+               {
                        my $real = $Global::SelectorAlias{$CGI::script_name};
                        if(defined $Vend::NoFork) {
                                $Vend::Save = {} unless $Vend::Save;
@@ -2140,6 +2271,13 @@ sub dispatch {
                                        and $Vend::Cfg->{VendURL}   !~ m!$CGI::script_name$!;
                        $Vend::Cfg->{SecureURL} =~ s!$real!$CGI::script_name!;
                }
+               elsif ($Vend::InternalHTTP) {
+                       $Vend::Cfg->{VendURL} = "http://" .
+                                                                       http()->{Http_Host} .
+                                                                       $CGI::script_path;
+                       $Vend::Cfg->{ImageDir} = $Vend::Cfg->{ImageDirInternal}
+                               if  $Vend::Cfg->{ImageDirInternal};
+               }
        }
        else {
                $Vend::Cfg = $Global::Standalone;
@@ -2149,7 +2287,6 @@ sub dispatch {
                $Global::DEBUG &= 0xF800;
                $Global::DEBUG |= $Vend::Cfg->{DebugMode};
        }
-
        if ($Vend::Cfg->{SetGroup}) {
                eval {$) = "$Vend::Cfg->{SetGroup} $Vend::Cfg->{SetGroup}"};
                if ($@) {
@@ -2192,20 +2329,23 @@ EOF
        umask $Vend::Cfg->{'Umask'};
        open_database();
 
+       $CGI::user = Vend::Util::check_authorization($CGI::authorization)
+               if defined $CGI::authorization;
+
        $Vend::OnlyProducts = defined $Vend::Cfg->{ProductFiles}->[1]
                                                  ? undef
                                                  : $Vend::Cfg->{ProductFiles}->[0];
 
     if (defined $CGI::query_string && $CGI::query_string ne '') {
                ($sessionid, $argument, $rest) = split(/;/, $CGI::query_string);
-               if ($CGI::cookie =~ /\bMV_SESSION_ID=(\w{8})
-                                                               : (
+               if ($CGI::cookie =~ /\bMV_SESSION_ID=(\w{8,32})
+                                                               [:_] (
                                                                        (       \d{1,3}\.   # An IP ADDRESS
                                                                                \d{1,3}\.
                                                                                \d{1,3}\.
                                                                                \d{1,3})
                                                                        # A user name or domain
-                                                                       |       ([A-Za-z0-9][-\@A-Za-z.0-9]+) )
+                                                                       |       ([A-Za-z0-9][-\@A-Za-z.0-9]+) )?
                                                                        \b/x) {
                        $sessionid = $1 unless defined $rest && $rest eq 'RESET';
                        $CGI::cookiehost = $3 || undef;
@@ -2219,34 +2359,53 @@ EOF
                $Vend::Argument = $argument;
     }
 
+       if ($Vend::Cfg->{WideOpen}) {
+               $CGI::host = 'nobody';
+               my $id;
+               if ($id = $CGI::values{mv_session_id}) {
+                       $sessionid = $id;
+               }
+               elsif($id = $Vend::Cfg->{Variable}{MV_SESSION_ID}) {
+                       $sessionid = $CGI::values{$id} if $CGI::values{$id};
+               }
+       }
+
        # Get a cookie if we have no session id (and its there)
-    unless (defined $sessionid && $sessionid ne '') {
+    unless ($sessionid) {
         if (defined $CGI::cookie and
-                       $CGI::cookie =~ /\bMV_SESSION_ID=(\w{8})
-                                                               : (
+                       $CGI::cookie =~ /\bMV_SESSION_ID=(\w{8,32})
+                                                               [:_] (
                                                                        (       \d{1,3}\.   # An IP ADDRESS
                                                                                \d{1,3}\.
                                                                                \d{1,3}\.
                                                                                \d{1,3})
                                                                        # A user name or domain
-                                                                       |       ([A-Za-z0-9][-\@A-Za-z.0-9]+) )
+                                                                       |       ([A-Za-z0-9][-\@A-Za-z.0-9]+) )?
                                                                        \b/x)
                {
             $sessionid = $1;
             $CGI::cookiehost = $3 || undef;
             $CGI::cookieuser = $4 || undef;
         }
+               elsif ($Vend::Cfg->{FallbackIP}) {
+                       $sessionid = generate_key($CGI::remote_addr . $CGI::useragent);
+               }
        }
 # DEBUG
 #Vend::Util::logDebug ("session='$sessionid' cookie='$CGI::cookie' chost='$CGI::cookiehost'\n") if ::debug(0x20);
 # END DEBUG
 
-    if (defined $sessionid && $sessionid ne '') {
+    if ($sessionid) {
                $Vend::SessionID = $sessionid;
        $Vend::SessionName = session_name();
                get_session();
                my $now = time;
-               if ($now - $Vend::Session->{'time'} > $Vend::Cfg->{'SessionExpire'}) {
+               if ($Vend::Session->{'expire'}) {
+                       init_session() if
+                               $now > $Vend::Session->{'expire'};
+                               
+               }
+               elsif ($now - $Vend::Session->{'time'} > $Vend::Cfg->{'SessionExpire'}) {
                init_session();
                }
                elsif($Vend::Cfg->{RobotLimit}) {
@@ -2261,7 +2420,7 @@ WARNING: POSSIBLE BAD ROBOT.  $Vend::Session->{'accesses'} accesses with
 no 30 second pause.
 EOF
                                        my $cmd;
-                                       if ($cmd = $Vend::Cfg->{LockoutCommand}) {
+                                       if ($cmd = $Global::LockoutCommand) {
                                                my $host = http()->Client_IP_Address;
                                                $cmd =~ s/%s/$host/ or $cmd .= " $host";
                                                $msg .= "Performing lockout command '$cmd'.";
@@ -2389,6 +2548,7 @@ sub dontwarn {
        $File::Find::name +
        $File::Find::prune +
        $Global::UserBuild +
+       <DATA> + 
 # END STATICPAGE
        $FindBin::RealBin +
        $Global::AdminSub +
@@ -2445,10 +2605,9 @@ sub parse_post {
                }
        }
        if($Global::TolerateGet and !$CGI::query_string  ) {
-               $CGI::query_string =    $CGI::values{mv_session_id} || '';
+               $CGI::query_string =    $CGI::cookie ? '' : $CGI::values{mv_session_id};
                $CGI::query_string .=   ';';
                $CGI::query_string .=   $CGI::values{mv_argument}   || '';
-               $CGI::query_string .=   ';0';
        }
 }
 
@@ -2752,7 +2911,8 @@ print "\n##### DEBUG MODE, level=0x" .
                        next if
                                $Vend::mode eq 'build' and
                                ! defined $Vend::CatalogToBuild{$g->{'name'}};
-                       print "Configuring catalog " . $g->{'name'} . '...';
+                       print "Configuring catalog " . $g->{'name'} . '...'
+                               unless $g->{name} eq '_mv_admin';
                        if (exists $Global::Selector{$g->{'script'}}) {
                                warn "Two catalogs with same script name $g->{'script'}.\n";
                                warn "Skipping catalog $g->{'name'}....\n\n";
@@ -2818,7 +2978,7 @@ EOF
                                }
                        }
 # END STATICPAGE
-                       print "done.\n";
+                       print "done.\n" unless $g->{name} eq '_mv_admin';
                }
        }
 
index 0d13999..b470b70 100644 (file)
@@ -2,7 +2,7 @@
 #
 # offline - MiniVend database builder and indexer
 #
-# $Id: offline,v 1.5 1997/09/03 05:55:05 mike Exp $
+# $Id: offline,v 1.8 1998/07/18 11:48:28 mike Exp $
 #
 # This program is largely based on Vend 0.2
 # Copyright 1995 by Andrew M. Wilcox <awilcox@world.std.com>
index c8c99dc..7026e5c 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl -w
+#!/usr/bin/perl -w
 # start - starts MiniVend UNIX, INET, combined server mode
 #       - also handles buildtree function
 
@@ -80,10 +80,13 @@ sub get_id {
        my $file = -f "$VendRoot/error.log"
                                ? "$VendRoot/error.log" : '';
        return '' unless $file;
+       return '' if $^O =~ /win32/i;
        my ($name, $group);
 
-       my($uid) = (stat($file))[4];
-       $name = (getpwuid($uid))[0];
+       eval {
+               my($uid) = (stat($file))[4];
+               $name = (getpwuid($uid))[0];
+       };
        return $name;
 }
 
@@ -123,7 +126,9 @@ EOM
 if (defined $Trysu) {
        exec "su -c $0 $name" or
        exec <<EndOfExec or die "Couldn't exec: $!\n";
-su -c $0 $name
+su $name <<EOF
+$0
+EOF
 EndOfExec
 
 }
index 583bf46..e657fcf 100644 (file)
@@ -82,8 +82,10 @@ sub get_id {
        return '' unless $file;
        my ($name, $group);
 
-       my($uid) = (stat($file))[4];
-       $name = (getpwuid($uid))[0];
+       eval {
+               my($uid) = (stat($file))[4];
+               $name = (getpwuid($uid))[0];
+       };
        return $name;
 }
 
index 583bf46..e657fcf 100644 (file)
@@ -82,8 +82,10 @@ sub get_id {
        return '' unless $file;
        my ($name, $group);
 
-       my($uid) = (stat($file))[4];
-       $name = (getpwuid($uid))[0];
+       eval {
+               my($uid) = (stat($file))[4];
+               $name = (getpwuid($uid))[0];
+       };
        return $name;
 }
 
index 1ea0c6a..9697bef 100644 (file)
@@ -128,7 +128,7 @@ EOF
 sub adjustvars {
        my ($file,%vars) = @_;
 
-       my $bak = 'mytemp.fil';
+       my $bak = $file . "_";
        return undef unless $file && defined %vars;
 
        my $check;
@@ -199,7 +199,7 @@ sub adjustdefs {
        my ($file,%defs) = @_;
        my $changed = 0;
 
-       my $bak = 'mytemp.fil';
+       my $bak = $file . "_";
        return undef unless $file && defined %defs;
        my $save = $\17;
        $\17 = 0;
@@ -262,7 +262,7 @@ sub shbang {
        my $file = shift;
        my $perl = shift;
        my $changed = 0;
-       my $bak = 'mytemp.fil';
+       my $bak = $file . "_";
        return undef unless $file && $perl;
        rename $file, $bak;
        open(ADJUST_IN,$bak)
@@ -641,10 +641,11 @@ my $Makecat;
 
 FINISHMESSAGE: {
        my $dir = $Initial{VendRoot};
+       $dir =~ s:/:\\:g if $Windows;
        $Runcommand = ! $Windows ? "$Initial{VendRoot}/bin/restart" : <<EOF;
 $dir\\minivend
 
-You may also use the shortcuts that should be present in that folder.
+You may also use the shortcuts that might be present in that folder.
 EOF
        $Makecat = ! $Windows ? "$Initial{VendRoot}/bin/makecat" : "$dir\\makecat";
        if($Windows) {
@@ -669,16 +670,43 @@ Welcome to MiniVend!
 EOF
 }
 
-$Runcommand =~ s/\n.*//s;
+my $have_www_stuff;
+eval {
+       require URI::URL;
+       require MIME::Base64;
+};
+unless ($@) {
+       $have_www_stuff = 1;
+}
+
+my $extrahost;
+if(! $Windows) {
+       $extrahost = `hostname`;
+       chomp $extrahost;
+}
+else {
+       $extrahost = 'localhost';
+}
+my $host = $extrahost || $Config{'myhost'};
+
+$Runcommand =~ s/\r?\n.*//s;
 
 MAKECAT: {
        last MAKECAT if -f "minivend.cfg";
+       last MAKECAT if $have_www_stuff and $Windows;
        print <<EOF;
 If you choose, you can make the "simple" demo catalog now, which will
 fully test MiniVend and give you a starting point for your own catalog.
 
 EOF
-       $ans = prompt "Make the simple demo? ", "yes";
+       print <<EOF if $have_www_stuff;
+Or you can reply "No" and try the new interface to the
+makecat program at:
+
+               http://$host:7786/mv_admin
+
+EOF
+       $ans = prompt "Make the simple demo now? ", ($have_www_stuff ? 'no' : 'yes');
        last MAKECAT unless $ans =~ /^\s*y/i;
        system $Makecat;
        if($?) {
@@ -687,21 +715,46 @@ The configuration did not appear to succeed. You can re-run it at
 any time, including now.
 
 EOF
-               $ans = prompt "Re-try making catalog? ", "yes";
+               print <<EOF if $have_www_stuff;
+Or you can try the new interface to the makecat program at:
+
+               http://$host:7786/mv_admin
+
+EOF
+               $ans = prompt "Re-try making catalog? ",  ($have_www_stuff ? 'no' : 'yes');
                redo MAKECAT if $ans =~ /^\s*y/i;
        }
 }
 
 RUNSERVER: {
        if(! -f "minivend.cfg") {
-               print <<EOF;
+               my $user = prompt ("Select an administrative username: ", 'minivend');
+               my $pass = prompt ("Select an administrative password: ", '');
+               unless($pass) {
+                       print "MUST select a password.\n";
+                       redo RUNSERVER;
+               }
+               open(IN, 'minivend.cfg.dist')   or die "open minivend.cfg.dist: $!\n";
+               open(OUT, '>minivend.cfg')              or die "create minivend.cfg: $!\n";
+               while(<IN>) {
+                       s/^AdminUser\s+.*/AdminUser   $user:$pass/;
+                       print OUT $_;
+               }
+               close IN; close OUT;
+               
+               unless ($have_www_stuff) {
+                       print <<EOF;
 
 Apparently there are no catalogs made. When you make one, you
 can start the MiniVend server with:
 
     $Runcommand
+
 EOF
-               exit;
+                       exit;
+               }
+               else {
+               }
        }
        print <<EOF;
 The MiniVend server must be running for your catalog to operate.
@@ -713,17 +766,40 @@ the "Start MiniVend Server" shortcut in your Start Menu. You will
 probably want to set it to run minimized by default -- use the
 Properties menu and select "Run minimized".
 
-To stop the MiniVend server, close the window -- you cannot
-stop it from the keyboard.
-
 To start the server, double click on the "Start MiniVend Server"
 icon which should be present in $Initial{VendRoot}.
 
+ NOTE: If you are on some versions of Windows, the shortcut may not
+ have been made. Make one yourself by taking "start.bat" and
+ creating a shortcut.
+
+To stop the MiniVend server, you may hit Ctrl-C on some versions
+of Windows and Perl; otherwise you must close the window.
+
+EOF
+       print <<EOF if $have_www_stuff && ! $Windows && findexe('netscape');
+Since you have Netscape in your path, we can start it with the catalog
+configuration program pre-loaded.
+
+EOF
+       print <<EOF if $have_www_stuff && $Windows;
+------------
+
+We will attempt to start the MiniVend server now, and to
+send a menu to your configured web browser.
+
 EOF
        last RUNSERVER if $Windows;
        $ans = prompt("Start the MiniVend server? ", "yes");
        last RUNSERVER unless $ans =~ /^\s*y/i;
-       exec $Runcommand;
+       system $Runcommand;
+       my $h = "http://$host:7786/mv_admin";
+       $ans = prompt("Start Netscape with $h? ", "yes");
+       last RUNSERVER unless $ans =~ /^\s*y/i;
+       system "netscape -remote 'openURL($h,new-window)'";
+       if ($?) {
+               system "netscape '$h' &";
+       }
 }
 
 exit;
index ef073cc..e69de29 100644 (file)
@@ -1 +0,0 @@
-n
\ No newline at end of file
index 0dbc291..824155e 100644 (file)
@@ -1,24 +1,30 @@
-### MiniVend 3.00 Manifest ###
+### MiniVend 3.11 Manifest ###
 ###                        ###
 ###   DON'T edit this !!!  ###
 ###                        ###
-### $Revision: 1.6 $
+### $Revision: 1.8 $
 ##############################
 
-bin/autosplit script 0755 shbang
+bin/buildtree script 0755 shbang
 bin/check script 0755 shbang,vars:VendRoot
+bin/checkstat.sh
+bin/compact script 0755 shbang
 bin/dump script 0755 shbang,vars:VendRoot
 bin/expire script 0755 shbang,vars:VendRoot
+bin/expireall script 0755 shbang,vars:VendRoot
 bin/htpasswd.pl script 0755 shbang
 bin/ifdef script 0755 shbang
+bin/localize script 0755 shbang
 bin/makecat script 0755 shbang,vars:VendRoot
 bin/offline script 0755 shbang,vars:VendRoot
 bin/reconfig script 0755 shbang
 bin/restart script 0755 shbang,vars:VendRoot
+bin/restart_inet script 0755 shbang,vars:VendRoot
+bin/restart_unix script 0755 shbang,vars:VendRoot
 bin/start script 0755 shbang,vars:VendRoot:PERL
+bin/start_inet script 0755 shbang,vars:VendRoot:PERL
+bin/start_unix script 0755 shbang,vars:VendRoot:PERL
 bin/stop script 0755 shbang,vars:VendRoot
 bin/update script 0755 shbang,vars:VendRoot
-configure.pl script 0755 shbang
 bin/minivend script 0755 shbang,vars:VendRoot:SendMailLocation
 src/config.h.in csrc 0644 defs:LINK_FILE
-src/vlink.pl script 0755 vars:LINK_FILE
index 2167b75..b2b169d 100644 (file)
 # This is a multiple directive -- the number of catalogs that can be defined is
 # limited only by your machine resources.
 #
-# Catalog  simple /home/user/catalogs/simple /cgi-bin/simple /cgi-bin/alias
+#Catalog  simple /home/user/catalogs/simple /cgi-bin/simple /cgi-bin/alias
+
+
+
+## Default: blank
+#
+# The user and password which will allow access to the special mv_admin
+# administration catalog. No default; if not present then access is
+# disabled.
+#
+# The password is a normal encrypted string unless the global
+# Variable MV_NO_CRYPT is non-blank and non-zero.
+#
+Variable   MV_NO_CRYPT   1
+AdminUser  minivend:nevairbe
 
 
 ## Default: blank
@@ -21,7 +35,7 @@
 # user not only to write good Perl code, but to have access to all files
 # readable and writable by MiniVend.
 #
-# AllowGlobal simple
+AllowGlobal _mv_admin
 
 
 ## Default: blank
@@ -79,7 +93,6 @@
 #
 # You may define as many as desired.
 #
-
 GlobalSub sub test_global_sub { return 'Test of global subroutine OK.' }
 
 
@@ -107,7 +120,7 @@ GlobalSub sub test_global_sub { return 'Test of global subroutine OK.' }
 # If you have a very lightly used server then you could set this to a high
 # number to allow MiniVend to be swapped to disk more readily.
 #
-# HouseKeeping
+HouseKeeping 5
 
 
 ## Default: No
@@ -124,6 +137,7 @@ GlobalSub sub test_global_sub { return 'Test of global subroutine OK.' }
 #
 # IpHead
 
+
 ## Default: blank
 #
 # The name of a command (as you would enter it from the shell) that will lock
@@ -238,6 +252,17 @@ GlobalSub sub test_global_sub { return 'Test of global subroutine OK.' }
 #
 # UserBuild
 
+
+########### Variable
+##
+## Default: none
+#
+# Variable values that can be accessed on pages of ALL catalogs with
+# @@VARIABLE@@ notation.
+#
+Variable TEST_VARIABLE Test of global variable OK.
+
+
 ## Default: none
 #
 # Custom tag for every catalog served by this MiniVend.
@@ -249,7 +274,6 @@ GlobalSub sub test_global_sub { return 'Test of global subroutine OK.' }
 # This tag is the equivalent of [L] ... [/L] localization, except
 # it works with contained tags
 #
-
 UserTag loc hasEndTag   1
 UserTag loc Interpolate 1
 UserTag loc Order locale
@@ -270,21 +294,32 @@ sub {
 }
 EOF
 
-
-Variable TEST_VARIABLE Test of global variable OK.
-
-UserTag  db-date  Order format 
+# [db-date table format]
+#
+# This tag returns the last-modified time of a database table,
+# 'products' by default. Accepts a POSIX strftime value for
+# date format; uses '%A %d %b %Y' by default.
+#
+UserTag  db-date  Order table format
+UserTag  db-date  PosNumber 2
 UserTag  db-date  Routine <<EOF
 sub {
-    my ($format) = @_;
+    my ($format, $db) = @_;
     $format = '%A %d %b %Y';
 
-    my $mtime = (stat('products/products.asc'))[9];
+       $db = 'products' unless $db;
+
+    my $mtime = (stat($Vend::Cfg->{Database}{'file'}))[9];
     return POSIX::strftime($format, localtime($mtime));
 
 }
 EOF
 
+### The user database stuff
 #include userdb.cfg
 
+### The minivend administration stuff
+#include admin/mv_admin.cfg
+
 # #include locale.error
+
index d4fbed5..814d277 100644 (file)
@@ -1,22 +1,25 @@
 # Define the site-specific information
-
-Variable    SERVER_NAME   __MVC_SERVERNAME__
-Variable    CGI_URL       __MVC_CGIURL__
-Variable    ORDERS_TO     __MVC_MAILORDERTO__
-Variable    IMAGE_DIR     __MVC_IMAGEURL__
-
-Variable    COMPANY     __MVC_COMPANY__
-Variable    ADDRESS     __MVC_ADDRESS__
-Variable    CITY        __MVC_CITY__
-Variable    PHONE       __MVC_PHONE__
-Variable    TOLLFREE    __MVC_TOLLFREE__
-Variable    FAX         __MVC_FAX__
-Variable    SHIPMODES   __MVC_SHIPMODES__
+#
+Variable    SERVER_NAME  __MVC_SERVERNAME__
+Variable    CGI_URL      __MVC_CGIURL__
+Variable    ORDERS_TO    __MVC_MAILORDERTO__
+Variable    IMAGE_DIR    __MVC_IMAGEURL__
+Variable    DOCROOT      __MVC_DOCUMENTROOT__
+Variable    SAMPLEHTML   __MVC_SAMPLEHTML__
+Variable    SAMPLEURL    __MVC_SAMPLEURL__
+
+Variable    COMPANY      __MVC_COMPANY__
+Variable    ADDRESS      __MVC_ADDRESS__
+Variable    CITY         __MVC_CITY__
+Variable    PHONE        __MVC_PHONE__
+Variable    TOLLFREE     __MVC_TOLLFREE__
+Variable    FAX          __MVC_FAX__
+Variable    SHIPMODES    __MVC_SHIPMODES__
 Variable    LOGO         __MVC_LOGO__
 Variable    SMLOGO       __MVC_SMLOGO__
-Variable    ENCRYPTOR   __MVC_ENCRYPTOR__
+Variable    ENCRYPTOR    __MVC_ENCRYPTOR__
 
-# END SITE CONFIGURATION
+## END SITE CONFIGURATION
 
 ########################## TURN ON PARSING
 # Allow substitution of site-specific information
@@ -124,6 +127,7 @@ Database            pricing     pricing.asc    TAB
 Database            inventory   inventory.asc  TAB
 Database            userdb      userdb.asc     TAB
 Database            country     country.asc    TAB
+Database            locale      locale.asc     TAB
 Database            Ground      Ground.csv     CSV
 Database            2ndDayAir   2ndDayAir.csv  CSV
 Database            NextDayAir  NextDayAir.csv CSV
@@ -203,7 +207,7 @@ ActionMap            control color
 # page(s). 
 #
 # AdminPage       config/menu
-                                                                
+
 
 ########### AlwaysSecure
 ##
@@ -324,7 +328,7 @@ ClearCache  Yes
 #
 # Part of the price adjustment scheme -- see the documentation.
 #
-#   CommonAdjust   adjustments
+CommonAdjust   pricing:q2,q5,q10,q25,q100, ;products:price, ==color:pricing, ==size:pricing
 
 
 ########### ConfigDir
@@ -613,6 +617,18 @@ Help                    hintfile
 ImageDir                __IMAGE_DIR__/
 
 
+########### ImageDir
+##
+## Default: blank
+#
+# Where the images are, relative to HTTP server DocumentRoot.
+# This allows images to be referenced in a relative fashion
+# and translated by MiniVend.  Useful for multi-catalog setups
+# using common pages.  MUST HAVE A TRAILING SLASH.
+#
+ImageDirInternal        http://__SERVER_NAME____IMAGE_DIR__/
+
+
 ########### Locale
 ##
 ## Default: none (U.S.)
@@ -622,12 +638,20 @@ ImageDir                __IMAGE_DIR__/
 # to be displayed as 3.400,00. To remove the decimal places, make
 # frac_digits '0'.
 # 
-Locale en_US mon_decimal_point .
-Locale en_US mon_thousands_sep ,
-Locale en_US frac_digits 2
-Locale en_US currency_symbol $
-Locale en_US p_cs_precedes 1
-#include locale.fr_FR
+# Locale en_US mon_decimal_point .
+# Locale en_US mon_thousands_sep ,
+# Locale en_US frac_digits 2
+# Locale en_US currency_symbol $
+# Locale en_US p_cs_precedes 1
+
+########### LocaleDatabase
+##
+## Default: none
+#
+# Sets a database that will be used as the basis for the Locale
+# settings. The columns are the locales, the rows the keys.
+#
+LocaleDatabase  locale
 
 
 ########### LogFile
@@ -933,9 +957,10 @@ Password                bAWoVkuzphOX.
 # If present, there must be a valid I<pricing> database.
 #
 # This directive should normally be disabled unless you are using quantity
-# pricing (as in this demo).
+# pricing (as in this demo).  This feature is somewhat deprecated
+# by CommonAdjust.
 #
-PriceBreaks          2 5 10 25 100
+# PriceBreaks          2 5 10 25 100
 
 
 ########### PriceAdjustment
@@ -943,10 +968,10 @@ PriceBreaks          2 5 10 25 100
 ## Default: blank
 #
 # A MiniVend item attribute (see UseModifier) which contains a value upon which
-# a price adjustment to the item may be made. See the documentation for use
-# of this advanced feature.
+# a price adjustment to the item may be made. This feature is somewhat deprecated
+# by CommonAdjust.
 #
-PriceAdjustment size
+# PriceAdjustment size
 
 
 ########### PriceCommas
@@ -974,8 +999,11 @@ PriceAdjustment size
 #
 # The field in the product database that will be accessed with the [item-price]
 # element.
+# 
+# If set to a non-existent field enables the CommonAdjust scheme
+# for all products.
 #
-# PriceField
+PriceField   no_price
 
 
 ########### Random
@@ -1247,7 +1275,7 @@ StaticAll   Yes
 # static pages. The user ID executing MiniVend must have write permission on
 # the directory (and all files within) if this is to work.
 #
-StaticDir   __MVC_SAMPLEHTML__/pages
+StaticDir   __CATDOCROOT__/pages
 
 ########### StaticFly
 ##
@@ -1278,7 +1306,7 @@ StaticFly   Yes
 # The path (relative to HTTP document root) which should be used in references
 # built by and referred to by the page-building capability of MiniVend.
 #
-StaticPath __MVC_SAMPLEURL__/pages
+StaticPath __CATDOCURL__/pages
 
 
 ########### StaticPattern
@@ -1365,5 +1393,5 @@ UseModifier size color
 # Though it is highly discouraged, if you can't run vlink SUID
 # you can set this to 'world' and have MiniVend work.
 #
-# WritePermission
+WritePermission group
 
index 8ac2eb5..e69de29 100644 (file)
@@ -1 +0,0 @@
-H
\ No newline at end of file
diff --git a/dist/simple/etc/order.number b/dist/simple/etc/order.number
deleted file mode 100644 (file)
index 400e07b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#COUNTER-1.0
-__MVC_ORDPREFIX__
index 49222d4..cf2c0cd 100644 (file)
@@ -1,12 +1,12 @@
 <HTML>
 <HEAD>
-<TITLE>The Art Store Home Page</TITLE>
+<TITLE>__MVC_COMPANY__ Home Page</TITLE>
 </HEAD>
 <BODY BACKGROUND="__MVC_IMAGEURL__/blue_pap.gif">
  
 
 <IMG  WIDTH=307 HEIGHT=153 SRC="__MVC_IMAGEURL__/artstore.gif" ALIGN="CENTER">
-<H1>Welcome to The Art Store</H1>
+<H1>Welcome to __MVC_COMPANY__</H1>
 <P>
 We have reproductions of some the great are of all ages. 
 <A HREF="__MVC_CGIURL__/browse">Browse</A> if you like -- or try
diff --git a/dist/simple/html/nav.html b/dist/simple/html/nav.html
deleted file mode 100644 (file)
index 4ca30c2..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN">
-<HTML>
-<HEAD><BASE TARGET="main">
-<TITLE>Table of Contents</TITLE>
-</HEAD>
-<BODY BGCOLOR=WHITE>
-<H1>Table of Contents</H1>
-
-<FONT SIZE="-1"><A HREF="minivend.html#minivend_name_0">MiniVend -- multi-catalog shopping cart and mall
-
-</CENTER></A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#minivend_version_0">Version</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Version">Version</A>
-<P><A HREF="minivend.html#DESCRIPTION">DESCRIPTION</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#OVERVIEW_OF_MINIVEND">OVERVIEW OF MINIVEND</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#The_Vend_Concept">The Vend Concept</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#A_typical_user_session">A typical user session</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#How_MiniVend_Manages_Sessions">How MiniVend Manages Sessions</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Page_Delivery">Page Delivery</A>
-<P><A HREF="minivend.html#DISTRIBUTION_AND_SUPPORT_INFORMA">DISTRIBUTION AND SUPPORT INFORMATION</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Where_to_Download_MiniVend">Where to Download MiniVend</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Perl">Perl</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Setup_for_HTTP_Servers">Setup for HTTP Servers</A>
-<P><A HREF="minivend.html#QUICK_START">QUICK START</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#The_Catalog">The Catalog</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#makecat_set_up_a_catalog_from">makecat -- set up a catalog from a template</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Setting_up_multiple_catalogs">Setting up multiple catalogs</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#If_something_goes_wrong">If something goes wrong</A>
-<P><A HREF="minivend.html#SETTING_UP_YOUR_CATALOG">SETTING UP YOUR CATALOG</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Start_with_a_database">Start with a database</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#On_the_fly_pages_static_or_bot">On-the-fly pages, static, or both?</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Use_the_demo_catalogs">Use the demo catalogs</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Tree_design">Tree design</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#The_Essentials">The Essentials</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Catalog_Pages_MiniVend_tags">Catalog Pages -- MiniVend tags</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Cookies">Cookies</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Basic_MiniVend_Tags">Basic MiniVend Tags</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#How_to_order_an_item">How to order an item</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Where_do_I_go_from_here_">Where do I go from here?</A>
-<P><A HREF="minivend.html#DATABASES">DATABASES</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#The_Product_Database">The Product Database</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Arbitrary_Databases">Arbitrary Databases</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#MiniVend_built_in_database_suppo">MiniVend built-in database support</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Character_usage_restrictions">Character usage restrictions</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Import_Attributes">Import Attributes</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Dictionary_indexing_with_INDEX">Dictionary indexing with INDEX</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#MEMORY_for_memory_only_databases">MEMORY for memory-only databases</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#IMPORT_ONCE">IMPORT_ONCE</A>
-<P><A HREF="minivend.html#SQL_SUPPORT">SQL SUPPORT</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Msql_support">Msql support</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#SQL_support_via_DBI">SQL support via DBI</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#SQL_Access_Methods">SQL Access Methods</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Importing_from_an_ASCII_file">Importing from an ASCII file</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Exporting_from_a_database">Exporting from a database</A>
-<P><A HREF="minivend.html#MINIVEND_TAG_REFERENCE">MINIVEND TAG REFERENCE</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#New_and_Old_Style_tags">New and Old Style tags</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#DATA_and_FIELD">DATA and FIELD</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#SET_and_SCRATCH">SET and SCRATCH</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#DEFAULT_and_LOOKUP">DEFAULT and LOOKUP</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#LOOP_and_TAG_EACH">LOOP and TAG EACH</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#IF">IF</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#TAG_the_catch_all">TAG -- the catch all</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#User_defined_Tags">User-defined Tags</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#PRICE_DESCRIPTION_ACCESSORIES">PRICE, DESCRIPTION, ACCESSORIES</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#FILE_and_INCLUDE">FILE and INCLUDE</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#BODY_BUTTONBAR_RANDOM_ROTATE">BODY, BUTTONBAR, RANDOM, ROTATE</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Tags_for_summarizing_shopping_ba">Tags for summarizing shopping basket/cart</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Item_Lists">Item Lists</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Embedded_Perl_Code">Embedded Perl Code</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#On_the_fly_Catalog_Pages">On-the-fly Catalog Pages</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Tags_for_controlling_old_syntax_">Tags for controlling old syntax interpolation order</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Required_Pages">Required Pages</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Checking_Page_HTML">Checking Page HTML</A>
-<P><A HREF="minivend.html#FORMS_AND_MINIVEND">FORMS AND MINIVEND</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Special_Form_Fields">Special Form Fields</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Form_Actions">Form Actions</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#One_click_Multiple_Variables">One-click Multiple Variables</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Checks_and_Selections">Checks and Selections</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Setting_Form_Security">Setting Form Security</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Stacking_Variables_on_the_Form">Stacking Variables on the Form</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Setting_SQL_tables_with_a_form">Setting SQL tables with a form</A>
-<P><A HREF="minivend.html#THE_SEARCH_ENGINE">THE SEARCH ENGINE</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#The_Search_Form">The Search Form</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Glimpse">Glimpse</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Fast_Binary_Search">Fast Binary Search</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Coordinated_searching">Coordinated searching</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Specifying_a_text_based_search_w">Specifying a text-based search with SQL-like syntax</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Range_Searching">Range Searching</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#SQL_searches">SQL searches</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#One_click_searches">One-click searches</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#In_page_searches">In-page searches</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Search_Profiles">Search Profiles</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Search_Reference">Search Reference</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#The_Results_Page">The Results Page</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Updating_session_variables_after">Updating session variables after a search</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Using_a_Search_Cache">Using a Search Cache</A>
-<P><A HREF="minivend.html#THE_ORDER_PROCESS">THE ORDER PROCESS</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#How_to_set_up_an_order_link">How to set up an order link</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#How_to_set_up_an_order_button">How to set up an order button</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Order_Groups">Order Groups</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Basket_display">Basket display</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Multiple_Shopping_Carts">Multiple Shopping Carts</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Advanced_Multi_level_Order_Pages">Advanced Multi-level Order Pages</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Simple_Order_Report_File">Simple Order Report File</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Fully_configurable_Order_Reports">Fully-configurable Order Reports</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Order_Receipts">Order Receipts</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#The_Order_Counter">The Order Counter</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Customer_Input_Fields">Customer Input Fields</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Product_Pricing">Product Pricing</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Item_Attributes">Item Attributes</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Product_Discounts">Product Discounts</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Sales_Tax">Sales Tax</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Using_CyberCash">Using CyberCash</A>
-<P><A HREF="minivend.html#SORTING">SORTING</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#SHIPPING">SHIPPING</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Default_Shipping_Mode">Default Shipping Mode</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Shipping_Cost_Database">Shipping Cost Database</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#More_on_UPS_style_lookup">More on UPS-style lookup</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Determining_shipping_modes">Determining shipping modes</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Geographic_qualification">Geographic qualification</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Handling_charges">Handling charges</A>
-<P><A HREF="minivend.html#TRACKING_AND_BACKEND_ORDER_ENTRY">TRACKING AND BACKEND ORDER ENTRY</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Easy_ASCII_Tracking">Easy ASCII Tracking</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#SQL_Tracking">SQL Tracking</A>
-<P><A HREF="minivend.html#SSL_SECURITY">SSL SECURITY</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Administrative_Pages">Administrative Pages</A>
-<P><A HREF="minivend.html#CONTROLLING_PAGE_APPEARANCE">CONTROLLING PAGE APPEARANCE</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Using_Frames">Using Frames</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Changing_output_frame_in_a_form">Changing output frame in a form</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Body_and_Buttonbar_Control">Body and Buttonbar Control</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Integrated_Image_Maps">Integrated Image Maps</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Random_Banners">Random Banners</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Rotating_Banners">Rotating Banners</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#In_line_Help">In-line Help</A>
-<P><A HREF="minivend.html#STATIC_PAGE_BUILDING">STATIC PAGE BUILDING</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#INTERNATIONALIZATION">INTERNATIONALIZATION</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Setting_the_locale">Setting the locale</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#MiniVend_Locale_Settings">MiniVend Locale Settings</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Special_Locale_keys_for_price_re">Special Locale keys for price representation</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Dynamic_locale_directive_changes">Dynamic locale directive changes</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Sorting_based_on_Locale">Sorting based on Locale</A>
-<P><A HREF="minivend.html#MINIVEND_CONFIGURATION_FILES">MINIVEND CONFIGURATION FILES</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Server_Configuration_File">Server Configuration File</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Catalog_Configuration_File">Catalog Configuration File</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Required_Configuration_Directive">Required Configuration Directives</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Optional_Configuration_Directive">Optional Configuration Directives</A>
-<P><A HREF="minivend.html#ADMINISTERING_MINIVEND">ADMINISTERING MINIVEND</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Starting_Stopping_and_Re_start">Starting, Stopping, and Re-starting the Servers</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#UNIX_and_INET_modes">UNIX and INET modes</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#User_reconfiguration">User reconfiguration</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Making_the_Product_Database">Making the Product Database</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Updating_Individual_Records">Updating Individual Records</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Expiring_Sessions">Expiring Sessions</A>
-<P><A HREF="minivend.html#DEBUGGING">DEBUGGING</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#MANUAL_INSTALLATION_OF_CATALOGS">MANUAL INSTALLATION OF CATALOGS</A>
-<BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Needed_Directories">Needed Directories</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#The_Demo_Systems">The Demo Systems</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Setting_up_VLINK_and_TLINK">Setting up VLINK and TLINK</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#Compiling_VLINK_and_TLINK">Compiling VLINK and TLINK</A>
-<P><A HREF="minivend.html#AUTHOR">AUTHOR</A><BR><IMG SRC="bullet.gif"><A HREF="minivend.html#ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</A>
-</BODY>
-</HTML>
diff --git a/dist/simple/html/ord/basket.html b/dist/simple/html/ord/basket.html
deleted file mode 100644 (file)
index a530dfd..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-<HTML>
-<HEAD>
-   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-   <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; Linux 2.0.31 i686) [Netscape]">
-   <TITLE>Shopping Cart Contents</TITLE>
-</HEAD>
-<BODY mv="body 1 TEXT=GREEN">
-[new]
-<CENTER><FORM ACTION="[process-target secure=1]" METHOD=POST><INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]"><INPUT type="hidden" name="mv_doit" value="refresh"><INPUT type="hidden" name="mv_orderpage" value="ord/basket"><INPUT type="hidden" name="mv_checkout" value="ord/checkout"><INPUT type="hidden" name="mv_nextpage" value="catalog"><A HREF="/" MV="page catalog"><IMG SRC="__SMLOGO__" ALT="__COMPANY__ Logo" BORDER=0  ALIGN=CENTER></A></CENTER>
-<DEL MV="discount ENTIRE_ORDER">$s &lt; 30 ? 30 : $s;</DEL>
-<CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 NOSAVE >
-<CAPTION><FONT SIZE=+4>Shopping Cart Contents</FONT></CAPTION>
-
-<TR NOSAVE>
-<TH VALIGN=BOTTOM WIDTH="70" BGCOLOR="#00F0F0" NOSAVE>SKU&nbsp;</TH>
-
-<TH ALIGN=LEFT VALIGN=BOTTOM BGCOLOR="#00F0F0">Description&nbsp;</TH>
-
-<TH ALIGN=CENTER VALIGN=BOTTOM WIDTH="70" BGCOLOR="#00F0F0">Quantity&nbsp;</TH>
-
-<TH ALIGN=CENTER VALIGN=BOTTOM WIDTH="90" BGCOLOR="#00F0F0">Price&nbsp;</TH>
-
-<TH ALIGN=CENTER VALIGN=BOTTOM WIDTH="90" BGCOLOR="#00F0F0">Extension&nbsp;</TH>
-</TR>
-
-<TR NOSAVE MV="item-list" mv.name="main">
-<TD ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFFFFF">[item-code]&nbsp;
-<BR><INPUT TYPE=checkbox NAME="[quantity-name]"
-                          VALUE=0 onClick="document.forms[0].submit()"><FONT SIZE=-1>remove</FONT></TD>
-
-<TD VALIGN=TOP BGCOLOR="#FFFFFF" NOSAVE MARGINWIDTH="12" MARGINHEIGHT="12"><A HREF="[area [item-code]]">[item-description]</A>&nbsp;
-<BR><FONT SIZE=-1>[if-field related] [loop arg="[item-field related]"]
-[if !ordered [loop-code]]&nbsp;</FONT>&nbsp;
-<BR><B><FONT SIZE=-1>Order this fine accessory:</FONT></B>&nbsp;
-<BR><FONT SIZE=-1>[loop-field title]&nbsp;<INPUT TYPE="CHECKBOX" NAME="mv_order_item"
-                       onClick="document.forms[0].submit()"
-                       VALUE="[loop-code]"><INPUT TYPE="HIDDEN" NAME="mv_order_quantity" VALUE="1">[/if]
-[/loop] [/if-field][item-accessories size][item-accessories color]</FONT>&nbsp;</TD>
-
-<TD ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFFFFF"><INPUT type="text"
-               name=[quantity-name] value="[item-quantity]" size=3></TD>
-
-<TD ALIGN=RIGHT VALIGN=TOP BGCOLOR="#FFFFFF">[discount-price] [if discount
-[item-code]]&nbsp;
-<BR><FONT COLOR="#FF0000"><FONT SIZE=-2>Item is discounted [item-discount]
-</FONT></FONT>[/if]&nbsp;</TD>
-
-<TD ALIGN=RIGHT VALIGN=TOP BGCOLOR="#FFFFFF">[item-subtotal]&nbsp;</TD>
-</TR>
-
-<TR MV="if !items">
-<TD ALIGN=CENTER COLSPAN="5" BGCOLOR="#FFFFFF">
-<H3>
-No items at the moment.</H3>
-</TD>
-</TR>
-
-<TR MV="if discount ALL_ITEMS">
-<TD ALIGN=CENTER COLSPAN="5" BGCOLOR="#00F0F0"><FONT COLOR="#FF0000">All
-items are discounted by 30 percent!</FONT>&nbsp;</TD>
-</TR>
-
-<TR>
-<TD ALIGN=RIGHT VALIGN=CENTER COLSPAN="4" BGCOLOR="#00F0F0"><INPUT type="submit"
-       onClick="document.forms[0].action='[process-target]'"
-       name="mv_submit" value="Recalculate"><IMG SRC="bg.gif" ALT=". ." BORDER=0 HEIGHT=2 WIDTH=50>&nbsp;<IMG SRC="bg.gif" ALT=". ." BORDER=0 HEIGHT=2 WIDTH=50>
-<B>Subtotal</B>&nbsp;</TD>
-
-<TD ALIGN=RIGHT VALIGN=CENTER BGCOLOR="#FFFFFF">[subtotal]</TD>
-</TR>
-
-<TR>
-<TD ALIGN=CENTER COLSPAN="5" BGCOLOR="#00F0F0"><INPUT type="submit" name="mv_todo" value="Check out"><INPUT type="submit"
-       onClick="document.forms[0].action='[process-target]'"
-       name="mv_click" value="Search"><INPUT type="submit"
-       onClick="document.forms[0].action='[process-target]'"
-       name="mv_click" value="Browse"><INPUT type="submit"
-       onClick="document.forms[0].action='[process-target]'"
-       name="mv_click" value="Home"><INPUT type="submit"
-       onClick="document.forms[0].action='[process-target]'"
-       name="mv_click" value="Stop shopping"></TD>
-</TR>
-</TABLE></CENTER>
-</FORM>
-<CENTER><PARAM MV="if session logged_in"><FORM ACTION="[process-target]" METHOD=POST>Hi
-[value name]! You are logged in as user <B>[value mv_username]</B>.&nbsp;<INPUT TYPE=submit NAME="mv_click" VALUE="Log out">&nbsp;</FORM></CENTER>
-
-<PRE MV="set" mv.name="Log out">mv_todo=return
-mv_nextpage=ord/basket
-mv_subroutine=userdb
-mv_arg0=LITERAL(logout)</PRE>
-</PARAM><PARAM MV="[else]">
-<PRE MV="set Login">mv_username=[value mv_username]
-mv_arg0=LITERAL(login)
-mv_subroutine=userdb</PRE>
-
-<CENTER>[if session failure] [data session failure] [/if]</CENTER>
-
-<CENTER>If you have an account with us, please enter your user name and
-password.</CENTER>
-
-<CENTER><FORM ACTION="[process-target]" METHOD=POST><INPUT TYPE=hidden NAME=mv_click VALUE=Login><INPUT TYPE=hidden NAME=mv_doit  VALUE=return><INPUT TYPE=hidden NAME=mv_nextpage VALUE="ord/basket"></CENTER>
-
-<CENTER><TABLE CELLSPACING=0 CELLPADDING=0 >
-<TR>
-<TD ALIGN=RIGHT>Username</TD>
-
-<TD><INPUT NAME=mv_username VALUE="[value mv_username]" SIZE=10><A HREF="[area new_account]">Create
-a new account</A></TD>
-</TR>
-
-<TR>
-<TD ALIGN=RIGHT>Password</TD>
-
-<TD><INPUT 
-                               onChange="document.forms[1].submit()"
-                         TYPE=password NAME=mv_password VALUE="" SIZE=10><INPUT TYPE=submit VALUE="Log in">&nbsp;</TD>
-</TR>
-</TABLE></CENTER>
-</FORM></PARAM>[comment] Following sets mv_click destinations[/comment]
-<PRE MV="set" MV.NAME="Stop shopping">mv_todo=return
-mv_nextpage=canceled</PRE>
-
-<PRE MV="set" mv.name=" Home">mv_todo=return
-mv_nextpage=catalog</PRE>
-
-<PRE MV="set" mv.name="Search">mv_todo=return
-mv_nextpage=srchform</PRE>
-
-<PRE MV="set" mv.name="Browse">mv_todo=return
-mv_nextpage=browse</PRE>
-
-</BODY>
-</HTML>
diff --git a/dist/simple/html/toc.html b/dist/simple/html/toc.html
deleted file mode 100644 (file)
index 908dd81..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN">
-<HTML>
-<HEAD>
-<TITLE>Table of Contents</TITLE>
-</HEAD>
-<BODY BGCOLOR=WHITE>
-<H1>Table of Contents</H1>
-
-<UL><LI><A HREF="minivend.html#minivend_name_0">MiniVend -- multi-catalog shopping cart and mall
-
-</CENTER></A>
-<UL><LI><A HREF="minivend.html#minivend_version_0">Version</A><LI><A HREF="minivend.html#Version">Version</A>
-</UL><LI><A HREF="minivend.html#DESCRIPTION">DESCRIPTION</A><LI><A HREF="minivend.html#OVERVIEW_OF_MINIVEND">OVERVIEW OF MINIVEND</A>
-<UL><LI><A HREF="minivend.html#The_Vend_Concept">The Vend Concept</A><LI><A HREF="minivend.html#A_typical_user_session">A typical user session</A><LI><A HREF="minivend.html#How_MiniVend_Manages_Sessions">How MiniVend Manages Sessions</A><LI><A HREF="minivend.html#Page_Delivery">Page Delivery</A>
-</UL><LI><A HREF="minivend.html#DISTRIBUTION_AND_SUPPORT_INFORMA">DISTRIBUTION AND SUPPORT INFORMATION</A>
-<UL><LI><A HREF="minivend.html#Where_to_Download_MiniVend">Where to Download MiniVend</A><LI><A HREF="minivend.html#Perl">Perl</A><LI><A HREF="minivend.html#Setup_for_HTTP_Servers">Setup for HTTP Servers</A>
-</UL><LI><A HREF="minivend.html#QUICK_START">QUICK START</A>
-<UL><LI><A HREF="minivend.html#The_Catalog">The Catalog</A><LI><A HREF="minivend.html#makecat_set_up_a_catalog_from">makecat -- set up a catalog from a template</A><LI><A HREF="minivend.html#Setting_up_multiple_catalogs">Setting up multiple catalogs</A><LI><A HREF="minivend.html#If_something_goes_wrong">If something goes wrong</A>
-</UL><LI><A HREF="minivend.html#SETTING_UP_YOUR_CATALOG">SETTING UP YOUR CATALOG</A>
-<UL><LI><A HREF="minivend.html#Start_with_a_database">Start with a database</A><LI><A HREF="minivend.html#On_the_fly_pages_static_or_bot">On-the-fly pages, static, or both?</A><LI><A HREF="minivend.html#Use_the_demo_catalogs">Use the demo catalogs</A><LI><A HREF="minivend.html#Tree_design">Tree design</A><LI><A HREF="minivend.html#The_Essentials">The Essentials</A><LI><A HREF="minivend.html#Catalog_Pages_MiniVend_tags">Catalog Pages -- MiniVend tags</A><LI><A HREF="minivend.html#Cookies">Cookies</A><LI><A HREF="minivend.html#Basic_MiniVend_Tags">Basic MiniVend Tags</A><LI><A HREF="minivend.html#How_to_order_an_item">How to order an item</A><LI><A HREF="minivend.html#Where_do_I_go_from_here_">Where do I go from here?</A>
-</UL><LI><A HREF="minivend.html#DATABASES">DATABASES</A>
-<UL><LI><A HREF="minivend.html#The_Product_Database">The Product Database</A><LI><A HREF="minivend.html#Arbitrary_Databases">Arbitrary Databases</A><LI><A HREF="minivend.html#MiniVend_built_in_database_suppo">MiniVend built-in database support</A><LI><A HREF="minivend.html#Character_usage_restrictions">Character usage restrictions</A><LI><A HREF="minivend.html#Import_Attributes">Import Attributes</A><LI><A HREF="minivend.html#Dictionary_indexing_with_INDEX">Dictionary indexing with INDEX</A><LI><A HREF="minivend.html#MEMORY_for_memory_only_databases">MEMORY for memory-only databases</A><LI><A HREF="minivend.html#IMPORT_ONCE">IMPORT_ONCE</A>
-</UL><LI><A HREF="minivend.html#SQL_SUPPORT">SQL SUPPORT</A>
-<UL><LI><A HREF="minivend.html#Msql_support">Msql support</A><LI><A HREF="minivend.html#SQL_support_via_DBI">SQL support via DBI</A><LI><A HREF="minivend.html#SQL_Access_Methods">SQL Access Methods</A><LI><A HREF="minivend.html#Importing_from_an_ASCII_file">Importing from an ASCII file</A><LI><A HREF="minivend.html#Exporting_from_a_database">Exporting from a database</A>
-</UL><LI><A HREF="minivend.html#MINIVEND_TAG_REFERENCE">MINIVEND TAG REFERENCE</A>
-<UL><LI><A HREF="minivend.html#New_and_Old_Style_tags">New and Old Style tags</A><LI><A HREF="minivend.html#DATA_and_FIELD">DATA and FIELD</A><LI><A HREF="minivend.html#SET_and_SCRATCH">SET and SCRATCH</A><LI><A HREF="minivend.html#DEFAULT_and_LOOKUP">DEFAULT and LOOKUP</A><LI><A HREF="minivend.html#LOOP_and_TAG_EACH">LOOP and TAG EACH</A><LI><A HREF="minivend.html#IF">IF</A><LI><A HREF="minivend.html#TAG_the_catch_all">TAG -- the catch all</A><LI><A HREF="minivend.html#User_defined_Tags">User-defined Tags</A><LI><A HREF="minivend.html#PRICE_DESCRIPTION_ACCESSORIES">PRICE, DESCRIPTION, ACCESSORIES</A><LI><A HREF="minivend.html#FILE_and_INCLUDE">FILE and INCLUDE</A><LI><A HREF="minivend.html#BODY_BUTTONBAR_RANDOM_ROTATE">BODY, BUTTONBAR, RANDOM, ROTATE</A><LI><A HREF="minivend.html#Tags_for_summarizing_shopping_ba">Tags for summarizing shopping basket/cart</A><LI><A HREF="minivend.html#Item_Lists">Item Lists</A><LI><A HREF="minivend.html#Embedded_Perl_Code">Embedded Perl Code</A><LI><A HREF="minivend.html#On_the_fly_Catalog_Pages">On-the-fly Catalog Pages</A><LI><A HREF="minivend.html#Tags_for_controlling_old_syntax_">Tags for controlling old syntax interpolation order</A><LI><A HREF="minivend.html#Required_Pages">Required Pages</A><LI><A HREF="minivend.html#Checking_Page_HTML">Checking Page HTML</A>
-</UL><LI><A HREF="minivend.html#FORMS_AND_MINIVEND">FORMS AND MINIVEND</A>
-<UL><LI><A HREF="minivend.html#Special_Form_Fields">Special Form Fields</A><LI><A HREF="minivend.html#Form_Actions">Form Actions</A><LI><A HREF="minivend.html#One_click_Multiple_Variables">One-click Multiple Variables</A><LI><A HREF="minivend.html#Checks_and_Selections">Checks and Selections</A><LI><A HREF="minivend.html#Setting_Form_Security">Setting Form Security</A><LI><A HREF="minivend.html#Stacking_Variables_on_the_Form">Stacking Variables on the Form</A><LI><A HREF="minivend.html#Setting_SQL_tables_with_a_form">Setting SQL tables with a form</A>
-</UL><LI><A HREF="minivend.html#THE_SEARCH_ENGINE">THE SEARCH ENGINE</A>
-<UL><LI><A HREF="minivend.html#The_Search_Form">The Search Form</A><LI><A HREF="minivend.html#Glimpse">Glimpse</A><LI><A HREF="minivend.html#Fast_Binary_Search">Fast Binary Search</A><LI><A HREF="minivend.html#Coordinated_searching">Coordinated searching</A><LI><A HREF="minivend.html#Specifying_a_text_based_search_w">Specifying a text-based search with SQL-like syntax</A><LI><A HREF="minivend.html#Range_Searching">Range Searching</A><LI><A HREF="minivend.html#SQL_searches">SQL searches</A><LI><A HREF="minivend.html#One_click_searches">One-click searches</A><LI><A HREF="minivend.html#In_page_searches">In-page searches</A><LI><A HREF="minivend.html#Search_Profiles">Search Profiles</A><LI><A HREF="minivend.html#Search_Reference">Search Reference</A><LI><A HREF="minivend.html#The_Results_Page">The Results Page</A><LI><A HREF="minivend.html#Updating_session_variables_after">Updating session variables after a search</A><LI><A HREF="minivend.html#Using_a_Search_Cache">Using a Search Cache</A>
-</UL><LI><A HREF="minivend.html#THE_ORDER_PROCESS">THE ORDER PROCESS</A>
-<UL><LI><A HREF="minivend.html#How_to_set_up_an_order_link">How to set up an order link</A><LI><A HREF="minivend.html#How_to_set_up_an_order_button">How to set up an order button</A><LI><A HREF="minivend.html#Order_Groups">Order Groups</A><LI><A HREF="minivend.html#Basket_display">Basket display</A><LI><A HREF="minivend.html#Multiple_Shopping_Carts">Multiple Shopping Carts</A><LI><A HREF="minivend.html#Advanced_Multi_level_Order_Pages">Advanced Multi-level Order Pages</A><LI><A HREF="minivend.html#Simple_Order_Report_File">Simple Order Report File</A><LI><A HREF="minivend.html#Fully_configurable_Order_Reports">Fully-configurable Order Reports</A><LI><A HREF="minivend.html#Order_Receipts">Order Receipts</A><LI><A HREF="minivend.html#The_Order_Counter">The Order Counter</A><LI><A HREF="minivend.html#Customer_Input_Fields">Customer Input Fields</A><LI><A HREF="minivend.html#Product_Pricing">Product Pricing</A><LI><A HREF="minivend.html#Item_Attributes">Item Attributes</A><LI><A HREF="minivend.html#Product_Discounts">Product Discounts</A><LI><A HREF="minivend.html#Sales_Tax">Sales Tax</A><LI><A HREF="minivend.html#Using_CyberCash">Using CyberCash</A>
-</UL><LI><A HREF="minivend.html#SORTING">SORTING</A><LI><A HREF="minivend.html#SHIPPING">SHIPPING</A>
-<UL><LI><A HREF="minivend.html#Default_Shipping_Mode">Default Shipping Mode</A><LI><A HREF="minivend.html#Shipping_Cost_Database">Shipping Cost Database</A><LI><A HREF="minivend.html#More_on_UPS_style_lookup">More on UPS-style lookup</A><LI><A HREF="minivend.html#Determining_shipping_modes">Determining shipping modes</A><LI><A HREF="minivend.html#Geographic_qualification">Geographic qualification</A><LI><A HREF="minivend.html#Handling_charges">Handling charges</A>
-</UL><LI><A HREF="minivend.html#TRACKING_AND_BACKEND_ORDER_ENTRY">TRACKING AND BACKEND ORDER ENTRY</A>
-<UL><LI><A HREF="minivend.html#Easy_ASCII_Tracking">Easy ASCII Tracking</A><LI><A HREF="minivend.html#SQL_Tracking">SQL Tracking</A>
-</UL><LI><A HREF="minivend.html#SSL_SECURITY">SSL SECURITY</A>
-<UL><LI><A HREF="minivend.html#Administrative_Pages">Administrative Pages</A>
-</UL><LI><A HREF="minivend.html#CONTROLLING_PAGE_APPEARANCE">CONTROLLING PAGE APPEARANCE</A>
-<UL><LI><A HREF="minivend.html#Using_Frames">Using Frames</A><LI><A HREF="minivend.html#Changing_output_frame_in_a_form">Changing output frame in a form</A><LI><A HREF="minivend.html#Body_and_Buttonbar_Control">Body and Buttonbar Control</A><LI><A HREF="minivend.html#Integrated_Image_Maps">Integrated Image Maps</A><LI><A HREF="minivend.html#Random_Banners">Random Banners</A><LI><A HREF="minivend.html#Rotating_Banners">Rotating Banners</A><LI><A HREF="minivend.html#In_line_Help">In-line Help</A>
-</UL><LI><A HREF="minivend.html#STATIC_PAGE_BUILDING">STATIC PAGE BUILDING</A><LI><A HREF="minivend.html#INTERNATIONALIZATION">INTERNATIONALIZATION</A>
-<UL><LI><A HREF="minivend.html#Setting_the_locale">Setting the locale</A><LI><A HREF="minivend.html#MiniVend_Locale_Settings">MiniVend Locale Settings</A><LI><A HREF="minivend.html#Special_Locale_keys_for_price_re">Special Locale keys for price representation</A><LI><A HREF="minivend.html#Dynamic_locale_directive_changes">Dynamic locale directive changes</A><LI><A HREF="minivend.html#Sorting_based_on_Locale">Sorting based on Locale</A>
-</UL><LI><A HREF="minivend.html#MINIVEND_CONFIGURATION_FILES">MINIVEND CONFIGURATION FILES</A>
-<UL><LI><A HREF="minivend.html#Server_Configuration_File">Server Configuration File</A><LI><A HREF="minivend.html#Catalog_Configuration_File">Catalog Configuration File</A><LI><A HREF="minivend.html#Required_Configuration_Directive">Required Configuration Directives</A><LI><A HREF="minivend.html#Optional_Configuration_Directive">Optional Configuration Directives</A>
-</UL><LI><A HREF="minivend.html#ADMINISTERING_MINIVEND">ADMINISTERING MINIVEND</A>
-<UL><LI><A HREF="minivend.html#Starting_Stopping_and_Re_start">Starting, Stopping, and Re-starting the Servers</A><LI><A HREF="minivend.html#UNIX_and_INET_modes">UNIX and INET modes</A><LI><A HREF="minivend.html#User_reconfiguration">User reconfiguration</A><LI><A HREF="minivend.html#Making_the_Product_Database">Making the Product Database</A><LI><A HREF="minivend.html#Updating_Individual_Records">Updating Individual Records</A><LI><A HREF="minivend.html#Expiring_Sessions">Expiring Sessions</A>
-</UL><LI><A HREF="minivend.html#DEBUGGING">DEBUGGING</A><LI><A HREF="minivend.html#MANUAL_INSTALLATION_OF_CATALOGS">MANUAL INSTALLATION OF CATALOGS</A>
-<UL><LI><A HREF="minivend.html#Needed_Directories">Needed Directories</A><LI><A HREF="minivend.html#The_Demo_Systems">The Demo Systems</A><LI><A HREF="minivend.html#Setting_up_VLINK_and_TLINK">Setting up VLINK and TLINK</A><LI><A HREF="minivend.html#Compiling_VLINK_and_TLINK">Compiling VLINK and TLINK</A>
-</UL><LI><A HREF="minivend.html#AUTHOR">AUTHOR</A><LI><A HREF="minivend.html#ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</A></UL>
-</BODY>
-</HTML>
index 42f38d9..efc13f3 100644 (file)
Binary files a/dist/simple/images/browse.gif and b/dist/simple/images/browse.gif differ
diff --git a/dist/simple/images/browse_up.gif b/dist/simple/images/browse_up.gif
new file mode 100644 (file)
index 0000000..42f38d9
Binary files /dev/null and b/dist/simple/images/browse_up.gif differ
diff --git a/dist/simple/images/checkout.gif b/dist/simple/images/checkout.gif
new file mode 100644 (file)
index 0000000..3429fee
Binary files /dev/null and b/dist/simple/images/checkout.gif differ
diff --git a/dist/simple/images/checkout_up.gif b/dist/simple/images/checkout_up.gif
new file mode 100644 (file)
index 0000000..be5d996
Binary files /dev/null and b/dist/simple/images/checkout_up.gif differ
index ac931b4..81ea3f7 100644 (file)
Binary files a/dist/simple/images/contents.gif and b/dist/simple/images/contents.gif differ
diff --git a/dist/simple/images/contents_up.gif b/dist/simple/images/contents_up.gif
new file mode 100644 (file)
index 0000000..ac931b4
Binary files /dev/null and b/dist/simple/images/contents_up.gif differ
index a97df11..ed0880e 100644 (file)
Binary files a/dist/simple/images/details.gif and b/dist/simple/images/details.gif differ
diff --git a/dist/simple/images/details_up.gif b/dist/simple/images/details_up.gif
new file mode 100644 (file)
index 0000000..a97df11
Binary files /dev/null and b/dist/simple/images/details_up.gif differ
index 7452874..446177a 100644 (file)
Binary files a/dist/simple/images/home.gif and b/dist/simple/images/home.gif differ
diff --git a/dist/simple/images/home_up.gif b/dist/simple/images/home_up.gif
new file mode 100644 (file)
index 0000000..7452874
Binary files /dev/null and b/dist/simple/images/home_up.gif differ
index 6e9dea8..6d77c66 100644 (file)
Binary files a/dist/simple/images/ordernow.gif and b/dist/simple/images/ordernow.gif differ
diff --git a/dist/simple/images/ordernow_up.gif b/dist/simple/images/ordernow_up.gif
new file mode 100644 (file)
index 0000000..6e9dea8
Binary files /dev/null and b/dist/simple/images/ordernow_up.gif differ
index e1fa80b..4bf5d58 100644 (file)
Binary files a/dist/simple/images/search.gif and b/dist/simple/images/search.gif differ
diff --git a/dist/simple/images/search_up.gif b/dist/simple/images/search_up.gif
new file mode 100644 (file)
index 0000000..e1fa80b
Binary files /dev/null and b/dist/simple/images/search_up.gif differ
diff --git a/dist/simple/locale.fr_FR b/dist/simple/locale.fr_FR
deleted file mode 100644 (file)
index 371d8b1..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-Locale fr_FR <<EOF
-{
-'PriceDivide', 0.1694,
-'mon_decimal_point', ',',
-'mon_thousands_sep', '.',
-'currency_symbol', 'fr',