#!/usr/bin/perl # -I/usr/local/apache/virtual/o/www.obm.co.uk/bin/webdb use lib '../bin/webdb'; use lib '../bin/perl5/lib'; #$ENV{'PATH'}.=":/usr/local/apache/virtual/o/www.obm.co.uk/bin"; #$ENV{'PATH'}.=":../bin"; $ENV{'PATH'}="/bin:/usr/bin:../bin"; $VAT=17.5; # V.A.T. Amount $company="Leisuretec"; # Company name to appear on HTML output pages $bgcolor="#ffffff"; # Background color for HTML pages $poundsign="£"; # HTML Entity for Pound Sign (£) $titlebgcolor="whitesmoke"; # Background colour for titles # Program name if($0=~/\//) { ($ProgramDir=$0)=~s/^(.*)\/[^\/]*$/$1/; } else { $ProgramDir=$ENV{'CWD'}; } $ProgramName=$0; $ProgramName=~s/^.*\/([^\/]+)$/$1/; $ProgramName=~s/\.([^\.]+)$//; $ProgramDir="." if(!$ProgramDir); $SilentMode=0; # Silent operation mode off by default # HTML Output Directory #$htmlwwwhome="/usr/local/apache/virtual/o/www.obm.co.uk/docs"; # Home directory for WWW server $htmlwwwhome="../docs"; # Home directory for WWW server $htmloutput="${htmlwwwhome}/catalog"; $htmlext=".html"; $tocfilename="toc"; $bullet="/images/blt_blue.gif"; # Bullet image to use #$update_catalogue_cache_program="/usr/local/apache/virtual/o/www.obm.co.uk/bin/catalogue.pl -updatecache"; $update_catalogue_cache_program="../bin/catalogue.pl -updatecache"; # Shopping Basket Configuration $HREFbasket="/cgi-bin/basket"; # Shopping Basket URL location $IMGbasket="/images/basket1.gif"; # Bullet image to use $HREFprefixNeeded="YES"; # Set to YES if basket resides on another site $HREFprefix="http://www.obm.co.uk"; # Normal site prefix $HREFprefixBasket="https://www.obm.co.uk"; # Basket site prefix #$HREFprefixBasket="http://194.168.85.58"; # Basket site prefix $HREFSecureprefix="https://www.obm.co.uk"; # Secure site prefix if($HREFprefixNeeded eq "YES") { $HREFbasket=$HREFprefixBasket.$HREFbasket; } else { $HREFprefix = ""; } # Recommendation Configuration File $RecommendConfigFile="${htmloutput}/recommend.cnf"; $RecommendTitle="Recommendations"; $RecommendDataFile="${htmloutput}/recommend.dat"; $BasketItemsDataFile="${htmloutput}/basketitems.dat"; # Database Export File settings $input_filename="full_bin.txt"; $fielddelimchar="^"; # Field Delimited $fielddelim='\^'; # RegEx to match field delimited $fieldsexpected=19; # Record Selection #$ignore_manu_codes="(0|40|41|5|60)"; # Ignore these manufacturers #$ignore_manu_codes="(0|40|41|5|60|24|90)"; # Ignore these manufacturers $ignore_manu_codes="(0|40|41|5|60|24|90|10)"; # Ignore these manufacturers # Pricing codes $pricePOA="P.O.A."; # Price code = -2 # Determine Input Filename if(length($ARGV[0])>0) { $input_filename=$ARGV[0]; } # Setup output string arrays @monthstring=("January","February","March","April","May","June","July","August","September","October","November","December"); @daystring=("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"); # HTML Output $htmlheader="
| Leisuretec | \n"; $htmlheader.="PO Box 68 - Benfleet - SS7 2YX - England - +44 1702 551863 | \n"; $htmlheader.="
| \n";
$htmlfooter.="Please note that all models may change without notification. \n"; $htmlfooter.="Please telephone for up-to-date information and details.\n"; $htmlfooter.=" | \n";
$htmlfooter.="
|---|
| \n";
$string.="\n";
$string.="Sales / sales\@obm.co.uk \n"; $string.="\n | \n";
$string.="\n\n";
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime((stat($input_filename))[9]);
#$year=sprintf "%d$year",($year>95)?19:20;
$year=$year+1900;
$timestring=sprintf "%s %d %s %d %d:%.2d",$daystring[$wday],$mday,$monthstring[$mon],$year,$hour,$min;
$string.="Last Modified: ${timestring} \n"; #$string.="URL: http://www.leisuretec.mail.co.uk\n"; $string.="\n"; $string.=" |