Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Auction.pl

By: Joven76 on Mar 28th, 2013  |  syntax: None  |  size: 367.60 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/usr/bin/perl
  2. #!perl
  3. #!/usr/bin/perl5
  4. #!/usr/local/bin/perl
  5. #!/usr/local/bin/perl5
  6.  
  7. use strict;
  8. use vars qw(%config %category %supercat %form %cookie $loginalias $loginpassword);
  9. use POSIX qw(strftime);
  10. use File::Copy;
  11. #use FileHandle ();
  12. #use DirHandle ();
  13. use CGI;
  14. #use CGI qw(:standard);
  15. use CGI::Carp qw(fatalsToBrowser);
  16.  
  17. # on Windows servers only you may need to specify
  18. # the drive letter (c:,d:,e:) with the server path to the config.pl file example:
  19. # require "c:/your/path/cgi-bin/auction/config.pl";
  20. # for UNIX leave this alone
  21.  
  22. require "config.pl";
  23.  
  24. # Sub: Get Form Data
  25. # This gets data from a post.
  26.  
  27. sub get_form_data {
  28.         my $temp;
  29.         my $buffer;
  30.         my @data;  
  31.  
  32.         if (($ENV{'REQUEST_METHOD'} ne 'POST') && ($ENV{'REQUEST_METHOD'} ne 'post') && ($ENV{'REQUEST_METHOD'} ne 'GET') && ($ENV{'REQUEST_METHOD'} ne 'get')) {
  33.         &oops("Request Method Not Allowed");
  34.         }
  35.         else {
  36.         read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  37.         foreach $temp (split(/&|=/,$buffer)) {
  38.                 $temp =~ tr/+/ /;              
  39.                 $temp =~ s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
  40.                 #if ($temp eq 'DESC' !~ /\<(?:[\s\S]*?\s*)?>/g) {
  41.                 #if ($temp !~ /\<(?:[\s\S]*?\s*)?>/g) {  
  42.                 if ($temp !~ /\<(.+)\>/g) {                
  43.                 $temp =~ s/\r\n/\<BR\>/g;
  44.                 #$temp =~ s/\s(?!\w+)/\&nbsp\;/g;                            
  45.                 }
  46.                 else {                  
  47.                 $temp =~ s/[\r\n]/ /g;
  48.                 $temp =~s/[\~\^]//g; # Remove single word character    
  49.                 $temp =~ s/~!/ ~!/g;  # Stop people from using subshells to execute commands
  50.                 #$temp =~s/[;<>\*\|'&\$!?#\(\)\[\]\{\}:'"\\]//go; # Stop subshells commands
  51.                 #$temp =~ s/([\&;\`'\|\"*\?\~\^\(\)\[\]\{\}\$\n\r])/\\$1/g;
  52.                 #$temp =~ s/^\s*cd\s+(.+)//g:
  53.                 $temp =~ s/<*(script)[^>]+>//gi;
  54.                 $temp =~ s/<*(applet)[^>]+>//gi;
  55.                 $temp =~ s/<*(embed)[^>]+>//gi;
  56.                 $temp =~ s/system\(.+//g;
  57.                 $temp =~ s/alert//g;
  58.                 $temp =~ s/param//g;
  59.                 $temp =~ s/hash//g;
  60.                 $temp =~ s/exec//g;
  61.                 $temp =~ s/grep//g;
  62.                 $temp =~ s/eval//g;  
  63.                 $temp =~ s/chmod//g;
  64.                 $temp =~ s/echo//g;
  65.                 }
  66.                 push @data, $temp;
  67.         }
  68.         foreach $temp (split(/&|=/,$ENV{'QUERY_STRING'})) {
  69.                 $temp =~ tr/+/ /;              
  70.                 $temp =~ s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
  71.                 if ($temp !~ /\<(.+)\>/g) {                
  72.                 $temp =~ s/\r\n/\<BR\>/g;
  73.                 }
  74.                 else {                  
  75.                 $temp =~ s/[\r\n]/ /g;
  76.                 $temp =~s/[\~\^]//g; # Remove single word character    
  77.                 $temp =~ s/~!/ ~!/g;  # Stop people from using subshells to execute commands
  78.                 $temp =~ s/<*(script)[^>]+>//gi;
  79.                 $temp =~ s/<*(applet)[^>]+>//gi;
  80.                 $temp =~ s/<*(embed)[^>]+>//gi;
  81.                 $temp =~ s/system\(.+//g;
  82.                 $temp =~ s/alert//g;
  83.                 $temp =~ s/param//g;
  84.                 $temp =~ s/hash//g;
  85.                 $temp =~ s/exec//g;
  86.                 $temp =~ s/grep//g;
  87.                 $temp =~ s/eval//g;  
  88.                 $temp =~ s/chmod//g;
  89.                 $temp =~ s/echo//g;
  90.                 }
  91.                 push @data, $temp;
  92.         }        
  93.         return @data;  
  94.         }
  95.    
  96. }
  97.  
  98. #-#############################################
  99. # Sub: Pagebreak
  100. # This displays pagebreak links
  101.  
  102. sub pagebreak  {
  103.    
  104.     my $pagecnt = shift || 0;
  105.     my $firstnumber = 0;
  106.     my $lastnumber = $pagecnt;
  107.     my $next = "Next Page >>";
  108.     my $previous = "<< Previous Page";  
  109.     my $nonext = "";
  110.     my $noprevious = "";  
  111.     my $totalcnt = ($pagecnt + 1);      
  112.     local $_;  
  113.  
  114.          my $currentpage;        
  115.          ($currentpage = $form{'page'})++;
  116.  
  117.          if ($pagecnt > 10) {    
  118.          $firstnumber = ($currentpage - 6) if ($currentpage > 6);
  119.          $lastnumber = ($currentpage + 4) if (($currentpage + 4) < $pagecnt);
  120.          }                
  121.              
  122.              my $action;
  123.              foreach(keys %form){            
  124.              next if($_ eq 'pb' || $_ eq 'page');
  125.              $action .= '&' if $action;
  126.              $action .= "$_=$form{$_}";
  127.              }
  128.              my($pagebreak) = @_;
  129.  
  130.       print "<center>";
  131.       ## Print Pagebreak Links ##
  132.       if ($form{page} >= 1) {
  133.       print " <a href=\"$config{'scripturl'}?$action&page=@{[$form{page}-1]}\">$previous</a> ";
  134.       }
  135.       else {
  136.       print " $noprevious ";
  137.       }
  138.       print "|" unless ($form{pb});
  139.       for ($firstnumber .. ($form{'page'} - 1)) {
  140.       print " <a href=\"$config{'scripturl'}?$action&page=$_\">@{[$_+1]}</a> ";  
  141.       }            
  142.       print " <b>$currentpage</b> " unless ($form{pb});
  143.       print " <b>All Items</b> " if ($form{pb});
  144.       for (($form{'page'} + 1) .. $lastnumber) {      
  145.       print " <a href=\"$config{'scripturl'}?$action&page=$_\">@{[$_+1]}</a> ";    
  146.       }                
  147.       print " <b>of $totalcnt</b> " unless ($form{pb});
  148.       print "|" unless ($form{pb}) or ($pagecnt eq 0);
  149.       if($pagecnt > 0) {                
  150.       print " <a href=\"$config{'scripturl'}?$action&pb=@{[(1+$pagecnt)*$pagebreak]}\">View All</a> ";
  151.       }
  152.       if ($form{pb}) {        
  153.       print " <a href=\"$config{'scripturl'}?$action&page=@{[$form{page}*$pagebreak]}\">Back</a> ";      
  154.       }
  155.       print "|" unless ($form{pb});
  156.       if ($form{page} < $pagecnt) {
  157.       print " <a href=\"$config{'scripturl'}?$action&page=@{[$form{page}+1]}\">$next</a> ";
  158.       }
  159.       else {
  160.       print " $nonext ";                
  161.       }    
  162.       ## END Print Pagebreak Links ##
  163.       print "</center>";
  164.  
  165. }
  166.  
  167. #-#############################################
  168. # Sub: Backto
  169. # Provides the category path for the
  170. # supercat add-on.
  171.  
  172. sub backto{        
  173.         my $Separator = " > ";
  174.         my $Item = "Item";
  175.         my $Home = "Categories";
  176.  
  177.         my (@backs, $backto, $path, $thispath, $current);
  178.         if($_[0] eq ''){$_[0] = $form{category}}
  179.         $thispath=$_[0];
  180.         if($category{$_[0]} ne ''){
  181.                 $thispath=$category{$form{category}};
  182.                 while($thispath=~s/^<!--([^\>]*)-->//){
  183.                         if($supercat{$1} ne ''){$thispath.=":$1"}
  184.                 }
  185.                 # $current=$category{$_[0]};##
  186.         }
  187.         @backs=split(/\:/, $thispath);
  188.         foreach (0..($#backs-1)){
  189.                 if($supercat{$backs[$_]} ne ''){
  190.                         $path.=":$backs[$_]";
  191.                         $backto.="$Separator<a href=\"$config{'scripturl'}?category=$path&super=true\">$supercat{$backs[$_]}</a>";
  192.                 }
  193.         }
  194.         $path.=":$backs[-1]";
  195.         if($supercat{$backs[-1]} ne '' && $category{$_[0]} ne ''){
  196.                 if($form{item} ne ''){
  197.                         # ITEM
  198.                         $backto.="$Separator<a href=\"$config{'scripturl'}?category=$path&super=true\">$supercat{$backs[-1]}</a>$Separator<a href=\"$config{'scripturl'}?category=$_[0]&listtype=current\">$category{$_[0]}</a>$Separator$Item";
  199.                 }
  200.                 else {
  201.                         # ITEMLIST
  202.                         $backto.="$Separator<a href=\"$config{'scripturl'}?category=$path&super=true\">$supercat{$backs[-1]}</a>$Separator$category{$_[0]}";
  203.                 }
  204.         }elsif($supercat{$backs[-1]} ne ''){
  205.                          # SUBCATEGORIES
  206.                 $backto.="$Separator$supercat{$backs[-1]}";
  207.         }
  208.         if($backto ne ''){return "<a href=\"$config{'scripturl'}\">$Home</a>$backto"}
  209.         else{return ''}
  210. }
  211.  
  212. #-#############################################
  213. # Sub: Display List Of Items
  214. # This creates a "nice" list of items in a
  215. # category.
  216.  
  217. sub displist {
  218.                    my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  219.                                          
  220.                    ### 24 Hr clock ######
  221.                    #my $nowtime = localtime(time + ($config{'systemtime'}* 3600 ));  
  222.  
  223.                    my $backto = &backto;
  224.         print "<H2><center>All Files Listed in Category $category{$form{'category'}}: <br><p></H2></center>";
  225.         print "<center><b>Current Time: $nowtime $config{'timezone'}</b></center>";
  226.         print "<center><b>Status Icons ></b> <IMG SRC=$config{'newpic'}>New | <IMG SRC=$config{'dutchpic'}>Dutch | <IMG SRC=$config{'buyitnowpic'}>BuyIt| <IMG SRC=$config{'hotpic'}>Hot | <IMG SRC=$config{'endpic'}>Ending | <IMG SRC=$config{'reservepic'}>Reserve Price | <IMG SRC=$config{'reservemetpic'}>Reserve Price Met </center>";  
  227.  
  228.         print "<p><table border=\"0\" width=\"100%\"><tr><td align=\"center\">Sort by: <a HREF=\"$config{'scripturl'}?category=$form{'category'}&sort=closes&listtype=current\">Items ending first</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a HREF=\"$config{'scripturl'}?category=$form{'category'}&sort=starts&listtype=current\">Newly-listed first</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a HREF=\"$config{'scripturl'}?category=$form{'category'}&sort=lowbid&listtype=current\">Lowest prices first</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a HREF=\"$config{'scripturl'}?category=$form{'category'}&sort=highbid&listtype=current\">Highest prices first</a></td></tr></table></p>";
  229.  
  230.         print "<p><table border=\"0\" width=\"100%\"><tr><td align=\"center\">Sort by: <A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&listtype=gal\"> Gallery </A> &nbsp;&nbsp;|&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&listtype=new\"> New </A>&nbsp;&nbsp;|&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&listtype=hot\"> Hot </a>&nbsp;&nbsp;|&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&listtype=close\"> Closing Today </a>&nbsp;&nbsp;|&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&listtype=gone\"> 3 Hours Left </a>&nbsp;&nbsp;|&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&listtype=dutch\"> Dutch Items</a></td></tr></table></p>";
  231.              
  232.         ####### Standard Item Category List ###############      
  233.         print "<table align=\"center\" border=\"3\" width=\"85%\">\n";
  234.         print "<tr>
  235. <td align=center width=100% bgcolor=$config{'regcolorhead'}><font size=3><b>Auction Listings In $backto</font></b></td></tr>";
  236.         print "</table>";
  237.         print "<table align=\"center\" border=\"3\" width=\"85%\">";        
  238.             print "<tr>
  239. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Status</b></font></td>
  240. <td width=\"60%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Item</b></font></td>
  241. <td width=\"5%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>#Bids</b></font></td>
  242. <td width=\"15%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>High Bid</b></font></td>
  243. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Closes</b>
  244. </font></td></tr>";  
  245.         opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened.");
  246.         my @allfiles = &sort_items;
  247.         closedir THEDIR;
  248.         my $rowcount2 = 0;            
  249.         ##### Page Break
  250.         my $pagebreak = int $form{pb} || 30;
  251.         my ($icount, $pcount) = (0,0);
  252.         my $file;
  253.         foreach $file (@allfiles) {  
  254.                 ##### End Page Break
  255.                 $file =~ s/^$config{'basepath'}$form{'category'}\///;
  256.                 $file =~ s/\.dat$//;    
  257.                  
  258.            open FILE, "$config{'basepath'}$form{'category'}/$file.dat";
  259.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <FILE>;  
  260.            close FILE;
  261.                 chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  262.                                
  263.                         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]);                        
  264.                         my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);                        
  265.  
  266.                         my $timeremain = time_remain($file);  
  267.                                      
  268.                   if(++$icount > $pagebreak){$icount=1; $pcount++} next if $pcount != $form{page};              
  269.                       my $itemrowcolor2;
  270.                       if ($rowcount2 % 2 == 1) {
  271.                       $itemrowcolor2=$config{'colorevenrow'}
  272.                       }
  273.                       else {
  274.                       $itemrowcolor2=$config{'coloroddrow'}
  275.                       }                      
  276.                       $rowcount2++;
  277.  
  278.           my $filler = "<IMG SRC=\"$config{'fillerpic'}\">";
  279.           my $new = "<IMG SRC=\"$config{'newpic'}\">" if (($sellertime + (86400 * $config{'newdays'})) > time);          
  280.           my $hot = "<IMG SRC=\"$config{'hotpic'}\">" if ($#bids >= $config{'hotnum'});
  281.           my $end = "<IMG SRC=\"$config{'endpic'}\">" if ($file < (time + $config{'endhours'} * 86400));        
  282.           my $dutchicon = "<IMG SRC=\"$config{'dutchpic'}\">" if ($dutch eq 'yes');
  283.           my $buyitnow = "<IMG SRC=\"$config{'buyitnowpic'}\">" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > $bid));      
  284.           my $reserveprice = "<IMG SRC=\"$config{'reservepic'}\">" if ($reserve > '0.00') && ($reserve > $bid) && ($dutch eq 'no');
  285.           my $reservepricemet = "<IMG SRC=\"$config{'reservemetpic'}\">" if ($bid >= $reserve) && ($reserve > '0.00') && ($dutch eq 'no');
  286.  
  287.                  my $imagedisp;
  288.                  if ($config{'ImageMagick'} eq "on") {
  289.                     use File::Basename;                      
  290.                     my($thumb1, $thumburl) = fileparse($image1);                      
  291.                     if ($config{'imageurl'} eq "$thumburl") {
  292.                        $imagedisp = "<center><IMG SRC=\"$config{'imageurl'}thumb/$thumb1\" BORDER=\"0\" WIDTH=\"80\"></center>";                        
  293.                     }
  294.                     if ($config{'imageurl'} ne "$thumburl") {
  295.                         $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  296.                         $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  297.                     }
  298.                  }
  299.                  if ($config{'ImageMagick'} eq "off") {
  300.                      $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  301.                      $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  302.                  }
  303.  
  304.           my $bidstatus;
  305.           $bidstatus = "Current Bid $currency$bid" if ($dutch eq 'no');
  306.           $bidstatus = "Buy It Now $currency$bid" if ($dutch eq 'yes');
  307.           $bidstatus = "Current Bid $currency$bid <br> Buy It Now $currency$buyit" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > "$bid"));
  308.  
  309.           my $grabberpic = "";
  310.           $grabberpic = "<IMG SRC=\"$config{'grabber1'}\" border=\"0\">" if ($grabber eq "grab1");
  311.           $grabberpic = "<IMG SRC=\"$config{'grabber2'}\" border=\"0\">" if ($grabber eq "grab2");
  312.           $grabberpic = "<IMG SRC=\"$config{'grabber3'}\" border=\"0\">" if ($grabber eq "grab3");
  313.           $grabberpic = "<IMG SRC=\"$config{'grabber4'}\" border=\"0\">" if ($grabber eq "grab4");
  314.           $grabberpic = "<IMG SRC=\"$config{'grabber5'}\" border=\"0\">" if ($grabber eq "grab5");
  315.           $grabberpic = "<IMG SRC=\"$config{'grabber6'}\" border=\"0\">" if ($grabber eq "grab6");
  316.           $grabberpic = "<IMG SRC=\"$config{'grabber7'}\" border=\"0\">" if ($grabber eq "grab7");
  317.           $grabberpic = "<IMG SRC=\"$config{'grabber8'}\" border=\"0\">" if ($grabber eq "grab8");                        
  318.                
  319.                             my $mytitle;
  320.                             if ($feat_yt eq "YES"){                                        
  321.                             print "<tr bgcolor=$config{'boldbackground'}>";
  322.                             }
  323.                             else {
  324.                             print "<tr bgcolor=$itemrowcolor2>";
  325.                             }
  326.                             if ($feat_bf eq "YES") {
  327.                             $mytitle = "<b>$title</b>";
  328.                             }
  329.                             else {
  330.                             $mytitle = "$title";
  331.                             }
  332.                             print "<TD><A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\"> $imagedisp</A></TD><TD>$config{'displistfont'}&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$mytitle</A>&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$grabberpic</a></TD><TD>$#bids bids</TD><TD>$new$end$hot$dutchicon$buyitnow$reserveprice$reservepricemet<br>$bidstatus<br>Shipping $currency$shippfee1</TD><TD>$timeremain</TD></TR></FONT>\n";
  333.                        }
  334.                                
  335.         if ($icount <= 0){
  336.             print "<tr><td COLSPAN=\"5\" bgcolor=\"$config{'colortablebody'}\"><b>No Items to View</b></td></tr>";
  337.         }
  338.         print "</table>";
  339. ### Page Break
  340. &pagebreak($pcount,$pagebreak);              
  341.        
  342.         print "</td></tr></table>";                      
  343.         print "<p>\&nbsp\;</p>";
  344. }
  345.  
  346. #-#############################################
  347. # Sub: Auction Items sorting
  348. # sorts auction items by:
  349. # Ending first
  350. # New listed first
  351. # Lowest prices first
  352. # Highest prices first
  353. #
  354.  
  355. sub sort_items {
  356.  
  357.          my @sortedfiles;
  358.          opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened.");
  359.  
  360.         if (!defined($form{'sort'}) || $form{'sort'} eq 'closes') {
  361.            @sortedfiles = ( grep -T, map "$config{'basepath'}$form{'category'}/$_", sort {int($main::a) <=> int($main::b)} (readdir THEDIR));
  362.         }
  363.         else {
  364.           my @allfiles = readdir THEDIR;
  365.           my $file;
  366.           my %pairs;
  367.           foreach $file (@allfiles) {
  368.             if (-T "$config{'basepath'}$form{'category'}/$file") {
  369.               open THEFILE, "$config{'basepath'}$form{'category'}/$file";
  370.               my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <THEFILE>;
  371.               close THEFILE;
  372.               chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  373.              
  374.               my @firstbid = split(/\[\]/,$bids[$#bids]);
  375.               my @lastbid = split(/\[\]/,$bids[$#bids]);
  376.              
  377.               if ($form{'sort'} eq 'starts') {           
  378.                   $pairs{$file} = $firstbid[3];
  379.               }
  380.               elsif ($form{'sort'} eq 'lowbid') {
  381.                   $pairs{$file} = $lastbid[2];
  382.               }
  383.               elsif ($form{'sort'} eq 'highbid') {
  384.                   $pairs{$file} = $lastbid[2];
  385.               }
  386.             }
  387.           }
  388.           closedir THEDIR;
  389.    
  390.       if ($form{'sort'} eq 'starts') {
  391.          @sortedfiles = sort {$pairs{$main::b} <=> $pairs{$main::a} || ($main::a <=> $main::b) } (keys(%pairs));  
  392.           }
  393.       elsif ($form{'sort'} eq 'highbid') {
  394.           @sortedfiles = sort { ((($pairs{$main::b}) <=> ($pairs{$main::a})) || ($main::a <=> $main::b)) } (keys(%pairs));
  395.           }
  396.       elsif ($form{'sort'} eq 'lowbid') {
  397.           @sortedfiles = sort { ((($pairs{$main::a}) <=> ($pairs{$main::b})) || ($main::a <=> $main::b)) } (keys(%pairs));
  398.         }  
  399.       }
  400.     return @sortedfiles;
  401.   }
  402.  
  403. #-#############################################
  404. # Sub: Display List Of Gallery Items
  405. # This creates a "nice" list of items in a
  406. # category.
  407.  
  408. sub displistgal {
  409.                my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  410.         print "<center><H2>Gallery Featured Items in Category <a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=current\">$category{$form{'category'}}</a>: </H2></center><br><p>\n";
  411.         print "<center><b>Current Time: $nowtime $config{'timezone'}</b></center>";
  412.         print "<center><b>Status Icons ></b> <IMG SRC=$config{'newpic'}>New | <IMG SRC=$config{'dutchpic'}>Dutch | <IMG SRC=$config{'buyitnowpic'}>BuyIt| <IMG SRC=$config{'hotpic'}>Hot | <IMG SRC=$config{'endpic'}>Ending | <IMG SRC=$config{'reservepic'}>Reserve Price | <IMG SRC=$config{'reservemetpic'}>Reserve Price Met </center>";
  413.  
  414.         print "<br><center>Gallery |";              
  415.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=new\"> New </a> |";        
  416.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=hot\"> Hot </a> |";
  417.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=close\"> Closing Today </a> |";
  418.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gone\"> 3 Hours Left </a> |";        
  419.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=dutch\"> Dutch Items</a> |</center><br>";        
  420.                    
  421.         print "<center><table border=\"0\" cellspacing=\"0\" width=\"90%\"><tr><td colspan=4 bgcolor=\"$config{'colortablehead'}\"><center><h2><font face=\"arial\" size=\"3\" $config{'colortext'}>Featured Picture GALLERY (Click on an image for more details)</font></center></h2></td></tr>";
  422.        
  423.         my $s = 1;        
  424.         my $pagebreak = int $form{pb} || 24;
  425.         my ($icount, $pcount) = (0,0);
  426.         opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened.");
  427.         my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", (readdir THEDIR);  
  428.         closedir THEDIR;
  429.         my $file;
  430.         foreach $file (sort { $a <=> $b } @allfiles) {                
  431.                 $file =~ s/^$config{'basepath'}$form{'category'}\///;
  432.                 $file =~ s/\.dat$//;
  433.  
  434.            open FILE, "$config{'basepath'}$form{'category'}/$file.dat";
  435.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <FILE>;  
  436.            close FILE;
  437.                 chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  438.  
  439.                         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]);
  440.                         my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);
  441.                          
  442.                             my $timeremain = time_remain($file);
  443.  
  444.                             my $image = "<IMG SRC=\"$image1\" border=\"0\" width=\"100\">";
  445.                             if ($gallery eq "Yes") {  
  446.                             if(++$icount > $pagebreak){$icount=1; $pcount++} next if $pcount != $form{page};
  447.                            
  448.                             print "<td width=\"25%\" align=\"center\"><a
  449. HREF=\"$config{'scripturl'}?category=$form{'category'}&item=$file\">$image</a><br><font size=\"-1\" FACE=\"ARI\"AL><b>$title</b></font><br><font size=\"-1\" FACE=ARIAL>Current Bid: $currency$bid</font><br><font size=\"-1\" FACE=\"ARIAL\">Number of Bids: $#bids</font><br><font size=\"-1\" FACE=\"ARIAL\">Closes: $timeremain</font></td>" if ($image);
  450.                                if ($s==4) {
  451.                                print "</tr>";
  452.                                $s = 1;
  453.                                }
  454.                                else {
  455.                                $s++;
  456.                                }        
  457.                         }
  458.                 }
  459.        
  460.         if ($icount <= 0){
  461.             print "<tr><td COLSPAN=\"4\" bgcolor=\"$config{'colortablebody'}\"><b>No Gallery Items to View</b></td></tr>";
  462.         }
  463.         if ($s > 1 && $s < 4) {
  464.         print "</tr>";
  465.         }
  466.         print "</table>";
  467.         print "</center>";
  468.         &pagebreak($pcount,$pagebreak);  
  469. }
  470.  
  471. #-#############################################
  472. # Sub: Display List Of NEW Items
  473. # This creates a "nice" list of items in a
  474. # category.
  475.  
  476. sub displistnew {
  477.                my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  478.         print "<center><H2>New Items in Category <a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=current\">$category{$form{'category'}}</a>: </H2></center><br><p>\n";  
  479.         print "<center><b>Current Time: $nowtime $config{'timezone'}</b></center>";  
  480.         print "<center><b>Status Icons ></b> <IMG SRC=$config{'newpic'}>New | <IMG SRC=$config{'dutchpic'}>Dutch | <IMG SRC=$config{'buyitnowpic'}>BuyIt| <IMG SRC=$config{'hotpic'}>Hot | <IMG SRC=$config{'endpic'}>Ending | <IMG SRC=$config{'reservepic'}>Reserve Price | <IMG SRC=$config{'reservemetpic'}>Reserve Price Met </center>";
  481.    
  482.         print "<br><center>New |";
  483.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gal\"> Gallery </a> |";        
  484.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=hot\"> Hot </a> |";
  485.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=close\"> Closing Today </a> |";
  486.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gone\"> 3 Hours Left </a> |";        
  487.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=dutch\"> Dutch Items</a> |</center></br>";
  488.              
  489.         print "<table border=\"0\" width=\"100%\">";
  490.                 print "<tr>
  491. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Status</b></font></td>
  492. <td width=\"60%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Item</b></font></td>
  493. <td width=\"5%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>#Bids</b></font></td>
  494. <td width=\"15%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>High Bid</b></font></td>
  495. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Closes</b>
  496. </font></td></tr>";    
  497.         opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened.");  
  498.         my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", (readdir THEDIR);  
  499.         closedir THEDIR;
  500.         my $file;
  501.         my $rowcount = 0;
  502.         ##### Page Break      
  503.         my $pagebreak = int $form{pb} || 30;
  504.         my ($icount, $pcount) = (0,0);
  505.         foreach $file (sort { $a <=> $b } @allfiles) {  
  506.                 ##### End Page Break
  507.                 $file =~ s/^$config{'basepath'}$form{'category'}\///;
  508.                 $file =~ s/\.dat$//;
  509.                    my $itemrowcolor;
  510.                       if ($rowcount % 2 == 1) {
  511.                       $itemrowcolor=$config{'colorevenrow'};
  512.                       }
  513.                       else {
  514.                       $itemrowcolor=$config{'coloroddrow'};
  515.                       }                      
  516.  
  517.            open FILE, "$config{'basepath'}$form{'category'}/$file.dat";
  518.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <FILE>;  
  519.            close FILE;
  520.                 chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  521.  
  522.                         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]);
  523.                         my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);                          
  524.                                                    
  525.                             my $timeremain = time_remain($file);
  526.                             if (($sellertime + (86400 * $config{'newdays'})) > time){
  527.                              $rowcount++;
  528.                             if(++$icount > $pagebreak){$icount=1; $pcount++} next if $pcount != $form{page};  
  529.  
  530.           my $filler = "<IMG SRC=\"$config{'fillerpic'}\">";
  531.           my $new = "<IMG SRC=\"$config{'newpic'}\">" if (($sellertime + (86400 * $config{'newdays'})) > time);          
  532.           my $hot = "<IMG SRC=\"$config{'hotpic'}\">" if ($#bids >= $config{'hotnum'});
  533.           my $end = "<IMG SRC=\"$config{'endpic'}\">" if ($file < (time + $config{'endhours'} * 86400));        
  534.           my $dutchicon = "<IMG SRC=\"$config{'dutchpic'}\">" if ($dutch eq 'yes');
  535.           my $buyitnow = "<IMG SRC=\"$config{'buyitnowpic'}\">" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > $bid));      
  536.           my $reserveprice = "<IMG SRC=\"$config{'reservepic'}\">" if ($reserve > '0.00') && ($reserve > $bid) && ($dutch eq 'no');
  537.           my $reservepricemet = "<IMG SRC=\"$config{'reservemetpic'}\">" if ($bid >= $reserve) && ($reserve > '0.00') && ($dutch eq 'no');  
  538.  
  539.                  my $imagedisp;
  540.                  if ($config{'ImageMagick'} eq "on") {
  541.                     use File::Basename;                      
  542.                     my($thumb1, $thumburl) = fileparse($image1);                      
  543.                     if ($config{'imageurl'} eq "$thumburl") {
  544.                        $imagedisp = "<center><IMG SRC=\"$config{'imageurl'}thumb/$thumb1\" BORDER=\"0\" WIDTH=\"80\"></center>";                        
  545.                     }
  546.                     if ($config{'imageurl'} ne "$thumburl") {
  547.                         $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  548.                         $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  549.                     }
  550.                  }
  551.                  if ($config{'ImageMagick'} eq "off") {
  552.                      $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  553.                      $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  554.                  }
  555.  
  556.           my $bidstatus;
  557.           $bidstatus = "Current Bid $currency$bid" if ($dutch eq 'no');
  558.           $bidstatus = "Buy It Now $currency$bid" if ($dutch eq 'yes');
  559.           $bidstatus = "Current Bid $currency$bid <br> Buy It Now $currency$buyit" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > "$bid"));        
  560.  
  561.           my $grabberpic = "";
  562.           $grabberpic = "<IMG SRC=\"$config{'grabber1'}\" border=\"0\">" if ($grabber eq "grab1");
  563.           $grabberpic = "<IMG SRC=\"$config{'grabber2'}\" border=\"0\">" if ($grabber eq "grab2");
  564.           $grabberpic = "<IMG SRC=\"$config{'grabber3'}\" border=\"0\">" if ($grabber eq "grab3");
  565.           $grabberpic = "<IMG SRC=\"$config{'grabber4'}\" border=\"0\">" if ($grabber eq "grab4");
  566.           $grabberpic = "<IMG SRC=\"$config{'grabber5'}\" border=\"0\">" if ($grabber eq "grab5");
  567.           $grabberpic = "<IMG SRC=\"$config{'grabber6'}\" border=\"0\">" if ($grabber eq "grab6");
  568.           $grabberpic = "<IMG SRC=\"$config{'grabber7'}\" border=\"0\">" if ($grabber eq "grab7");
  569.           $grabberpic = "<IMG SRC=\"$config{'grabber8'}\" border=\"0\">" if ($grabber eq "grab8");
  570.  
  571.                             my $mytitle;
  572.                             if ($feat_yt eq "YES"){                              
  573.                             print "<tr bgcolor=\"$config{'boldbackground'}\">";
  574.                             }
  575.                             else {
  576.                             print "<tr bgcolor=\"$itemrowcolor\">";
  577.                             }
  578.                             if ($feat_bf eq "YES") {
  579.                             $mytitle = "<b>$title</b>";
  580.                             }
  581.                             else {
  582.                             $mytitle = "$title";
  583.                             }
  584.                             print "<TD><A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\"> $imagedisp</A></TD><TD>$config{'displistfont'}&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$mytitle</A>&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$grabberpic</a></TD><TD>$#bids bids</TD><TD>$new$end$hot$dutchicon$buyitnow$reserveprice$reservepricemet<br>$bidstatus<br>Shipping $currency$shippfee1</TD><TD>$timeremain</TD></TR></FONT>\n";
  585.                         }
  586.                 }
  587.        
  588.         if ($icount <= 0){
  589.             print "<tr><td COLSPAN=\"5\" bgcolor=\"$config{'colortablebody'}\"><b>No Items to View</b></td></tr>";
  590.         }
  591.         print "</table>";
  592. ### Page Break
  593. &pagebreak($pcount,$pagebreak);    
  594. }
  595.  
  596. #-#############################################
  597. # Sub: Display List Of HOT Items
  598. # This creates a "nice" list of items in a
  599. # category.
  600.  
  601. sub displisthot {
  602.                my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  603.         print "<center><H2>Hot Items in Category <a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=current\">$category{$form{'category'}}</a>: </H2></center><br><p>\n";
  604.         print "<center><b>Current Time: $nowtime $config{'timezone'}</b></center>";
  605.         print "<center><b>Status Icons ></b> <IMG SRC=$config{'newpic'}>New | <IMG SRC=$config{'dutchpic'}>Dutch | <IMG SRC=$config{'buyitnowpic'}>BuyIt| <IMG SRC=$config{'hotpic'}>Hot | <IMG SRC=$config{'endpic'}>Ending | <IMG SRC=$config{'reservepic'}>Reserve Price | <IMG SRC=$config{'reservemetpic'}>Reserve Price Met </center>";
  606.  
  607.         print "<br><center>Hot |";
  608.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gal\"> Gallery </a> |";        
  609.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=new\"> New </a> |";        
  610.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=close\"> Closing Today </a> |";
  611.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gone\"> 3 Hours Left </a> |";        
  612.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=dutch\"> Dutch Items</a> |</center></br>";
  613.      
  614.         print "<table border=\"0\" width=\"100%\">";
  615.         print "<tr>
  616. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Status</b></font></td>
  617. <td width=\"60%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Item</b></font></td>
  618. <td width=\"5%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>#Bids</b></font></td>
  619. <td width=\"15%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>High Bid</b></font></td>
  620. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Closes</b>
  621. </font></td></tr>";    
  622.         opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened.");  
  623.         my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", (readdir THEDIR);  
  624.         closedir THEDIR;
  625.         my $file;
  626.         my $rowcount = 0;
  627.         ##### Page Break        
  628.         my $pagebreak = int $form{pb} || 30;
  629.         my ($icount, $pcount) = (0,0);
  630.         foreach $file (sort { $a <=> $b } @allfiles) {  
  631.                 ##### End Page Break
  632.                 $file =~ s/^$config{'basepath'}$form{'category'}\///;
  633.                 $file =~ s/\.dat$//;
  634.                    my $itemrowcolor;
  635.                       if ($rowcount % 2 == 1) {
  636.                       $itemrowcolor=$config{'colorevenrow'};
  637.                       }
  638.                       else {
  639.                       $itemrowcolor=$config{'coloroddrow'};
  640.                       }                      
  641.  
  642.            open FILE, "$config{'basepath'}$form{'category'}/$file.dat";
  643.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <FILE>;  
  644.            close FILE;
  645.                 chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  646.                        
  647.                             my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]);
  648.                             my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);
  649.                              
  650.                             my $timeremain = time_remain($file);
  651.  
  652.                             if ($#bids >= $config{'hotnum'}){
  653.                                 $rowcount++;
  654.                             if(++$icount > $pagebreak){$icount=1; $pcount++} next if $pcount != $form{page};  
  655.  
  656.          my $filler = "<IMG SRC=$config{'fillerpic'}>";
  657.         my $new = "<IMG SRC=$config{'newpic'}>" if (($sellertime + (86400 * $config{'newdays'})) > time);
  658.           my $imageicon = "<IMG SRC=$config{'picpic'}>" if ($image1);
  659.           my $hot = "<IMG SRC=$config{'hotpic'}>" if ($#bids >= $config{'hotnum'});
  660.           my $end = "<IMG SRC=$config{'endpic'}>" if ($file < (time + $config{'endhours'} * 86400));        
  661.           my $dutchicon = "<IMG SRC=\"$config{'dutchpic'}\">" if ($dutch eq 'yes');          
  662.           my $buyitnow = "<IMG SRC=\"$config{'buyitnowpic'}\">" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > $bid));      
  663.           my $reserveprice = "<IMG SRC=\"$config{'reservepic'}\">" if ($reserve > '0.00') && ($reserve > $bid) && ($dutch eq 'no');
  664.           my $reservepricemet = "<IMG SRC=\"$config{'reservemetpic'}\">" if ($bid >= $reserve) && ($reserve > '0.00') && ($dutch eq 'no');  
  665.    
  666.                  my $imagedisp;
  667.                  if ($config{'ImageMagick'} eq "on") {
  668.                     use File::Basename;                      
  669.                     my($thumb1, $thumburl) = fileparse($image1);                      
  670.                     if ($config{'imageurl'} eq "$thumburl") {
  671.                        $imagedisp = "<center><IMG SRC=\"$config{'imageurl'}thumb/$thumb1\" BORDER=\"0\" WIDTH=\"80\"></center>";                        
  672.                     }
  673.                     if ($config{'imageurl'} ne "$thumburl") {
  674.                         $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  675.                         $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  676.                     }
  677.                  }
  678.                  if ($config{'ImageMagick'} eq "off") {
  679.                      $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  680.                      $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  681.                  }
  682.  
  683.           my $bidstatus;
  684.           $bidstatus = "Current Bid $currency$bid" if ($dutch eq 'no');
  685.           $bidstatus = "Buy It Now $currency$bid" if ($dutch eq 'yes');
  686.           $bidstatus = "Current Bid $currency$bid <br> Buy It Now $currency$buyit" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > "$bid"));  
  687.            
  688.           my $grabberpic = "";
  689.           $grabberpic = "<IMG SRC=\"$config{'grabber1'}\" border=\"0\">" if ($grabber eq "grab1");
  690.           $grabberpic = "<IMG SRC=\"$config{'grabber2'}\" border=\"0\">" if ($grabber eq "grab2");
  691.           $grabberpic = "<IMG SRC=\"$config{'grabber3'}\" border=\"0\">" if ($grabber eq "grab3");
  692.           $grabberpic = "<IMG SRC=\"$config{'grabber4'}\" border=\"0\">" if ($grabber eq "grab4");
  693.           $grabberpic = "<IMG SRC=\"$config{'grabber5'}\" border=\"0\">" if ($grabber eq "grab5");
  694.           $grabberpic = "<IMG SRC=\"$config{'grabber6'}\" border=\"0\">" if ($grabber eq "grab6");
  695.           $grabberpic = "<IMG SRC=\"$config{'grabber7'}\" border=\"0\">" if ($grabber eq "grab7");
  696.           $grabberpic = "<IMG SRC=\"$config{'grabber8'}\" border=\"0\">" if ($grabber eq "grab8");
  697.  
  698.                             my $mytitle;
  699.                             if ($feat_yt eq "YES"){                              
  700.                             print "<tr bgcolor=\"$config{'boldbackground'}\">";
  701.                             }
  702.                             else {
  703.                             print "<tr bgcolor=\"$itemrowcolor\">";
  704.                             }
  705.                             if ($feat_bf eq "YES") {
  706.                             $mytitle = "<b>$title</b>";
  707.                             }
  708.                             else {
  709.                             $mytitle = "$title";
  710.                             }
  711.                             print "<TD><A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\"> $imagedisp</A></TD><TD>$config{'displistfont'}&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$mytitle</A>&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$grabberpic</a></TD><TD>$#bids bids</TD><TD>$new$end$hot$dutchicon$buyitnow$reserveprice$reservepricemet<br>$bidstatus<br>Shipping $currency$shippfee1</TD><TD>$timeremain</TD></TR></FONT>\n";
  712.                         }
  713.                 }
  714.        
  715.         if ($icount <= 0){
  716.             print "<tr><td COLSPAN=\"5\" bgcolor=\"$config{'colortablebody'}\"><b>No Items to View</b></td></tr>";
  717.         }
  718.         print "</table>";
  719. ### Page Break
  720. &pagebreak($pcount,$pagebreak);      
  721. }
  722.  
  723. #-#############################################
  724. # Sub: Display List Of Going Items in 3 hrs
  725. # This creates a "nice" list of items in a
  726. # category.
  727.  
  728. sub displistgone {
  729.               my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  730.         print "<center><H2>Closing Items in 3Hrs in Category <a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=current\">$category{$form{'category'}}</a>: </H2></center><br><p>\n";
  731.         print "<center><b>Current Time: $nowtime $config{'timezone'}</b></center>";
  732.         print "<center><b>Status Icons ></b> <IMG SRC=$config{'newpic'}>New | <IMG SRC=$config{'dutchpic'}>Dutch | <IMG SRC=$config{'buyitnowpic'}>BuyIt| <IMG SRC=$config{'hotpic'}>Hot | <IMG SRC=$config{'endpic'}>Ending | <IMG SRC=$config{'reservepic'}>Reserve Price | <IMG SRC=$config{'reservemetpic'}>Reserve Price Met </center>";
  733.  
  734.         print "<br><center>3 Hours Left |";
  735.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gal\"> Gallery </a> |";        
  736.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=new\"> New </a> |";
  737.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=hot\"> Hot </a> |";
  738.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=close\"> Closing Today </a> |";      
  739.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=dutch\"> Dutch Items</a> |</center></br>";
  740.    
  741.         print "<table border=\"0\" width=\"100%\">";
  742.                 print "<tr>
  743. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Status</b></font></td>
  744. <td width=\"60%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Item</b></font></td>
  745. <td width=\"5%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>#Bids</b></font></td>
  746. <td width=\"15%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>High Bid</b></font></td>
  747. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Closes</b>
  748. </font></td></tr>";  
  749.         opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened.");
  750.         my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", (readdir THEDIR);  
  751.         closedir THEDIR;
  752.         my $file;
  753.         my $rowcount = 0;
  754.         ##### Page Break
  755.         my $pagebreak = int $form{pb} || 30;
  756.         my ($icount, $pcount) = (0,0);
  757.         foreach $file (sort { $a <=> $b } @allfiles) {  
  758.                 ##### End Page Break
  759.                 $file =~ s/^$config{'basepath'}$form{'category'}\///;
  760.                 $file =~ s/\.dat$//;
  761.                     my $itemrowcolor;
  762.                       if ($rowcount % 2 == 1) {
  763.                       $itemrowcolor=$config{'colorevenrow'};
  764.                       }
  765.                       else {
  766.                       $itemrowcolor=$config{'coloroddrow'};
  767.                       }
  768.                                  
  769.            open FILE, "$config{'basepath'}$form{'category'}/$file.dat";
  770.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <FILE>;  
  771.            close FILE;
  772.                 chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  773.  
  774.                                 my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]);
  775.                                 my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);
  776.                                  
  777.                                 my $timeremain = time_remain($file);
  778.                         if ($file < (time + (3600 * $config{'goinghours'}))){
  779.                         $rowcount++;
  780.                         if(++$icount > $pagebreak){$icount=1; $pcount++} next if $pcount != $form{page};  
  781.  
  782.           my $filler = "<IMG SRC=\"$config{'fillerpic'}\">";
  783.           my $new = "<IMG SRC=\"$config{'newpic'}\">" if (($sellertime + (86400 * $config{'newdays'})) > time);          
  784.           my $hot = "<IMG SRC=\"$config{'hotpic'}\">" if ($#bids >= $config{'hotnum'});
  785.           my $end = "<IMG SRC=\"$config{'endpic'}\">" if ($file < (time + $config{'endhours'} * 86400));        
  786.           my $dutchicon = "<IMG SRC=\"$config{'dutchpic'}\">" if ($dutch eq 'yes');
  787.           my $buyitnow = "<IMG SRC=\"$config{'buyitnowpic'}\">" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > $bid));      
  788.           my $reserveprice = "<IMG SRC=\"$config{'reservepic'}\">" if ($reserve > '0.00') && ($reserve > $bid) && ($dutch eq 'no');
  789.           my $reservepricemet = "<IMG SRC=\"$config{'reservemetpic'}\">" if ($bid >= $reserve) && ($reserve > '0.00') && ($dutch eq 'no');  
  790.          
  791.                  my $imagedisp;
  792.                  if ($config{'ImageMagick'} eq "on") {
  793.                     use File::Basename;                      
  794.                     my($thumb1, $thumburl) = fileparse($image1);                      
  795.                     if ($config{'imageurl'} eq "$thumburl") {
  796.                        $imagedisp = "<center><IMG SRC=\"$config{'imageurl'}thumb/$thumb1\" BORDER=\"0\" WIDTH=\"80\"></center>";                        
  797.                     }
  798.                     if ($config{'imageurl'} ne "$thumburl") {
  799.                         $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  800.                         $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  801.                     }
  802.                  }
  803.                  if ($config{'ImageMagick'} eq "off") {
  804.                      $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  805.                      $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  806.                  }
  807.  
  808.           my $bidstatus;
  809.           $bidstatus = "Current Bid $currency$bid" if ($dutch eq 'no');
  810.           $bidstatus = "Buy It Now $currency$bid" if ($dutch eq 'yes');
  811.           $bidstatus = "Current Bid $currency$bid <br> Buy It Now $currency$buyit" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > "$bid"));          
  812.  
  813.           my $grabberpic = "";
  814.           $grabberpic = "<IMG SRC=\"$config{'grabber1'}\" border=\"0\">" if ($grabber eq "grab1");
  815.           $grabberpic = "<IMG SRC=\"$config{'grabber2'}\" border=\"0\">" if ($grabber eq "grab2");
  816.           $grabberpic = "<IMG SRC=\"$config{'grabber3'}\" border=\"0\">" if ($grabber eq "grab3");
  817.           $grabberpic = "<IMG SRC=\"$config{'grabber4'}\" border=\"0\">" if ($grabber eq "grab4");
  818.           $grabberpic = "<IMG SRC=\"$config{'grabber5'}\" border=\"0\">" if ($grabber eq "grab5");
  819.           $grabberpic = "<IMG SRC=\"$config{'grabber6'}\" border=\"0\">" if ($grabber eq "grab6");
  820.           $grabberpic = "<IMG SRC=\"$config{'grabber7'}\" border=\"0\">" if ($grabber eq "grab7");
  821.           $grabberpic = "<IMG SRC=\"$config{'grabber8'}\" border=\"0\">" if ($grabber eq "grab8");
  822.  
  823.                             my $mytitle;
  824.                             if ($feat_yt eq "YES"){                              
  825.                             print "<tr bgcolor=\"$config{'boldbackground'}\">";
  826.                             }
  827.                             else {
  828.                             print "<tr bgcolor=\"$itemrowcolor\">";
  829.                             }
  830.                             if ($feat_bf eq "YES") {
  831.                             $mytitle = "<b>$title</b>";
  832.                             }
  833.                             else {
  834.                             $mytitle = "$title";
  835.                             }
  836.                             print "<TD><A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\"> $imagedisp</A></TD><TD>$config{'displistfont'}&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$mytitle</A>&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$grabberpic</a></TD><TD>$#bids bids</TD><TD>$new$end$hot$dutchicon$buyitnow$reserveprice$reservepricemet<br>$bidstatus<br>Shipping $currency$shippfee1</TD><TD>$timeremain</TD></TR></FONT>\n";
  837.                         }
  838.                 }
  839.        
  840.         if ($icount <= 0){
  841.             print "<tr><td COLSPAN=\"5\" bgcolor=\"$config{'colortablebody'}\"><b>No Items to View</b></td></tr>";
  842.         }
  843.         print "</table>";
  844. ### Page Break
  845. &pagebreak($pcount,$pagebreak);    
  846. }
  847.  
  848. #-#############################################
  849. # Sub: Display List Of Items Closing Today
  850. # This creates a "nice" list of items in a
  851. # category.
  852.  
  853. sub displistclose {
  854.                my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  855.         print "<center><H2>Closing Today Items in Category <a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=current\">$category{$form{'category'}}</a>: </H2></center><br><p>\n";
  856.         print "<center><b>Current Time: $nowtime $config{'timezone'}</b></center>";
  857.         print "<center><b>Status Icons ></b> <IMG SRC=$config{'newpic'}>New | <IMG SRC=$config{'dutchpic'}>Dutch | <IMG SRC=$config{'buyitnowpic'}>BuyIt| <IMG SRC=$config{'hotpic'}>Hot | <IMG SRC=$config{'endpic'}>Ending | <IMG SRC=$config{'reservepic'}>Reserve Price | <IMG SRC=$config{'reservemetpic'}>Reserve Price Met </center>";
  858.  
  859.         print "<br><center>Closing Today |";
  860.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gal\"> Gallery </a> |";        
  861.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=new\"> New </a> |";
  862.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=hot\"> Hot </a> |";        
  863.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gone\"> 3 Hours Left </a> |";        
  864.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=dutch\"> Dutch Items</a> |</center></br>";
  865.  
  866.         print "<table border=0 width=100%>";
  867.         print "<tr>
  868. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Status</b></font></td>
  869. <td width=\"60%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Item</b></font></td>
  870. <td width=\"5%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>#Bids</b></font></td>
  871. <td width=\"15%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>High Bid</b></font></td>
  872. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Closes</b>
  873. </font></td></tr>";  
  874.         opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened.");
  875.         my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", (readdir THEDIR);  
  876.         closedir THEDIR;
  877.         my $file;
  878.         my $rowcount = 0;
  879.         ##### Page Break
  880.         my $pagebreak = int $form{pb} || 30;
  881.         my ($icount, $pcount) = (0,0);
  882.         foreach $file (sort { $a <=> $b } @allfiles) {  
  883.                 ##### End Page Break
  884.                 $file =~ s/^$config{'basepath'}$form{'category'}\///;
  885.                 $file =~ s/\.dat$//;
  886.                    my $itemrowcolor;
  887.                       if ($rowcount % 2 == 1) {
  888.                       $itemrowcolor=$config{'colorevenrow'};
  889.                       }
  890.                       else {
  891.                       $itemrowcolor=$config{'coloroddrow'};
  892.                       }
  893.                                
  894.            open FILE, "$config{'basepath'}$form{'category'}/$file.dat";
  895.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <FILE>;  
  896.            close FILE;
  897.                 chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  898.  
  899.                             my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]);
  900.                             my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);
  901.                              
  902.                             my $timeremain = time_remain($file);
  903.                         if ($file < (time + 86400)) {
  904.                         $rowcount++;
  905.                         if(++$icount > $pagebreak){$icount=1; $pcount++} next if $pcount != $form{page};  
  906.  
  907.           my $filler = "<IMG SRC=\"$config{'fillerpic'}\">";
  908.           my $new = "<IMG SRC=\"$config{'newpic'}\">" if (($sellertime + (86400 * $config{'newdays'})) > time);          
  909.           my $hot = "<IMG SRC=\"$config{'hotpic'}\">" if ($#bids >= $config{'hotnum'});
  910.           my $end = "<IMG SRC=\"$config{'endpic'}\">" if ($file < (time + $config{'endhours'} * 86400));        
  911.           my $dutchicon = "<IMG SRC=\"$config{'dutchpic'}\">" if ($dutch eq 'yes');
  912.           my $buyitnow = "<IMG SRC=\"$config{'buyitnowpic'}\">" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > $bid));      
  913.           my $reserveprice = "<IMG SRC=\"$config{'reservepic'}\">" if ($reserve > '0.00') && ($reserve > $bid) && ($dutch eq 'no');
  914.           my $reservepricemet = "<IMG SRC=\"$config{'reservemetpic'}\">" if ($bid >= $reserve) && ($reserve > '0.00') && ($dutch eq 'no');
  915.  
  916.                  my $imagedisp;
  917.                  if ($config{'ImageMagick'} eq "on") {
  918.                     use File::Basename;                      
  919.                     my($thumb1, $thumburl) = fileparse($image1);                      
  920.                     if ($config{'imageurl'} eq "$thumburl") {
  921.                        $imagedisp = "<center><IMG SRC=\"$config{'imageurl'}thumb/$thumb1\" BORDER=\"0\" WIDTH=\"80\"></center>";                        
  922.                     }
  923.                     if ($config{'imageurl'} ne "$thumburl") {
  924.                         $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  925.                         $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  926.                     }
  927.                  }
  928.                  if ($config{'ImageMagick'} eq "off") {
  929.                      $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  930.                      $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  931.                  }
  932.  
  933.           my $bidstatus;
  934.           $bidstatus = "Current Bid $currency$bid" if ($dutch eq 'no');
  935.           $bidstatus = "Buy It Now $currency$bid" if ($dutch eq 'yes');
  936.           $bidstatus = "Current Bid $currency$bid <br> Buy It Now $currency$buyit" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > "$bid"));  
  937.      
  938.           my $grabberpic = "";
  939.           $grabberpic = "<IMG SRC=\"$config{'grabber1'}\" border=\"0\">" if ($grabber eq "grab1");
  940.           $grabberpic = "<IMG SRC=\"$config{'grabber2'}\" border=\"0\">" if ($grabber eq "grab2");
  941.           $grabberpic = "<IMG SRC=\"$config{'grabber3'}\" border=\"0\">" if ($grabber eq "grab3");
  942.           $grabberpic = "<IMG SRC=\"$config{'grabber4'}\" border=\"0\">" if ($grabber eq "grab4");
  943.           $grabberpic = "<IMG SRC=\"$config{'grabber5'}\" border=\"0\">" if ($grabber eq "grab5");
  944.           $grabberpic = "<IMG SRC=\"$config{'grabber6'}\" border=\"0\">" if ($grabber eq "grab6");
  945.           $grabberpic = "<IMG SRC=\"$config{'grabber7'}\" border=\"0\">" if ($grabber eq "grab7");
  946.           $grabberpic = "<IMG SRC=\"$config{'grabber8'}\" border=\"0\">" if ($grabber eq "grab8");
  947.  
  948.                             my $mytitle;
  949.                             if ($feat_yt eq "YES"){                              
  950.                             print "<tr bgcolor=\"$config{'boldbackground'}\">";
  951.                             }
  952.                             else {
  953.                             print "<tr bgcolor=\"$itemrowcolor\">";
  954.                             }
  955.                             if ($feat_bf eq "YES") {
  956.                             $mytitle = "<b>$title</b>";
  957.                             }
  958.                             else {
  959.                             $mytitle = "$title";
  960.                             }
  961.                             print "<TD><A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\"> $imagedisp</A></TD><TD>$config{'displistfont'}&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$mytitle</A>&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$grabberpic</a></TD><TD>$#bids bids</TD><TD>$new$end$hot$dutchicon$buyitnow$reserveprice$reservepricemet<br>$bidstatus<br>Shipping $currency$shippfee1</TD><TD>$timeremain</TD></TR></FONT>\n";
  962.                         }
  963.                 }
  964.        
  965.         if ($icount <= 0){
  966.             print "<tr><td COLSPAN=\"5\" bgcolor=\"$config{'colortablebody'}\"><b>No Items to View</b></td></tr>";
  967.         }
  968.         print "</table>";
  969. ### Page Break
  970. &pagebreak($pcount,$pagebreak);      
  971. }
  972.  
  973. #-#############################################
  974. # Sub: Display List Of Dutch Items  
  975. # This creates a "nice" list of items in a
  976. # category.
  977.  
  978. sub displistdutch {
  979.                my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));        
  980.         print "<center><H2>Dutch Items in Category <a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=current\">$category{$form{'category'}}</a>: </H2></center><br><p>\n";
  981.         print "<center><b>Current Time: $nowtime $config{'timezone'}</b></center>";
  982.         print "<center><b>Status Icons ></b> <IMG SRC=$config{'newpic'}>New | <IMG SRC=$config{'dutchpic'}>Dutch | <IMG SRC=$config{'buyitnowpic'}>BuyIt| <IMG SRC=$config{'hotpic'}>Hot | <IMG SRC=$config{'endpic'}>Ending | <IMG SRC=$config{'reservepic'}>Reserve Price | <IMG SRC=$config{'reservemetpic'}>Reserve Price Met </center>";
  983.  
  984.         print "<br><center>Dutch |";
  985.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gal\"> Gallery </a> |";        
  986.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=new\"> New </a> |";
  987.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=hot\"> Hot </a> |";
  988.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=close\"> Closing Today </a> |";
  989.         print "<a HREF=\"$config{'scripturl'}?category=$form{'category'}&listtype=gone\"> 3 Hours Left </a> |</center><br>";        
  990.  
  991.         print "<table border=\"0\" width=\"85%\">";
  992.         print "<tr>
  993. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Status</b></font></td>
  994. <td width=\"60%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Item</b></font></td>
  995. <td width=\"5%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>#Bids</b></font></td>
  996. <td width=\"15%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>High Bid</b></font></td>
  997. <td width=\"10%\" bgcolor=\"$config{'colortablehead'}\"><font size=\"3\"><b>Closes</b>
  998. </font></td></tr>";    
  999.         opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened.");
  1000.         my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", (readdir THEDIR);  
  1001.         closedir THEDIR;
  1002.         my $file;
  1003.         my $rowcount = 0;
  1004.         ##### Page Break      
  1005.         my $pagebreak = int $form{pb} || 30;
  1006.         my ($icount, $pcount) = (0,0);
  1007.         foreach $file (sort { $a <=> $b } @allfiles) {  
  1008.                 ##### End Page Break
  1009.                 $file =~ s/^$config{'basepath'}$form{'category'}\///;
  1010.                 $file =~ s/\.dat$//;
  1011.                    my $itemrowcolor;
  1012.                       if ($rowcount % 2 == 1) {
  1013.                       $itemrowcolor=$config{'colorevenrow'};
  1014.                       }
  1015.                       else {
  1016.                       $itemrowcolor=$config{'coloroddrow'};
  1017.                       }
  1018.                      
  1019.            open FILE, "$config{'basepath'}$form{'category'}/$file.dat";
  1020.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <FILE>;  
  1021.            close FILE;
  1022.                 chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  1023.                         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]);
  1024.                         my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);
  1025.                                                                              
  1026.                             my $timeremain = time_remain($file);
  1027.                             if (($dutch) eq ('yes')) {    
  1028.                             $rowcount++;
  1029.                             if(++$icount > $pagebreak){$icount=1; $pcount++} next if $pcount != $form{page};  
  1030.  
  1031.           my $filler = "<IMG SRC=\"$config{'fillerpic'}\">";
  1032.           my $new = "<IMG SRC=\"$config{'newpic'}\">" if (($sellertime + (86400 * $config{'newdays'})) > time);          
  1033.           my $hot = "<IMG SRC=\"$config{'hotpic'}\">" if ($#bids >= $config{'hotnum'});
  1034.           my $end = "<IMG SRC=\"$config{'endpic'}\">" if ($file < (time + $config{'endhours'} * 86400));        
  1035.           my $dutchicon = "<IMG SRC=\"$config{'dutchpic'}\">" if ($dutch eq 'yes');
  1036.           my $buyitnow = "<IMG SRC=\"$config{'buyitnowpic'}\">" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > $bid));      
  1037.           my $reserveprice = "<IMG SRC=\"$config{'reservepic'}\">" if ($reserve > '0.00') && ($reserve > $bid) && ($dutch eq 'no');
  1038.           my $reservepricemet = "<IMG SRC=\"$config{'reservemetpic'}\">" if ($bid >= $reserve) && ($reserve > '0.00') && ($dutch eq 'no');  
  1039.  
  1040.                  my $imagedisp;
  1041.                  if ($config{'ImageMagick'} eq "on") {
  1042.                     use File::Basename;                      
  1043.                     my($thumb1, $thumburl) = fileparse($image1);                      
  1044.                     if ($config{'imageurl'} eq "$thumburl") {
  1045.                        $imagedisp = "<center><IMG SRC=\"$config{'imageurl'}thumb/$thumb1\" BORDER=\"0\" WIDTH=\"80\"></center>";                        
  1046.                     }
  1047.                     if ($config{'imageurl'} ne "$thumburl") {
  1048.                         $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  1049.                         $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  1050.                     }
  1051.                  }
  1052.                  if ($config{'ImageMagick'} eq "off") {
  1053.                      $imagedisp = "<center><IMG SRC=\"$image1\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 ne "");  
  1054.                      $imagedisp = "<center><IMG SRC=\"$config{'imagedir'}/images.jpg\" BORDER=\"0\" WIDTH=\"80\"></center>" if ($image1 eq "");
  1055.                  }
  1056.  
  1057.           my $bidstatus;
  1058.           $bidstatus = "Current Bid $currency$bid" if ($dutch eq 'no');
  1059.           $bidstatus = "Buy It Now $currency$bid" if ($dutch eq 'yes');
  1060.           $bidstatus = "Current Bid $currency$bid <br> Buy It Now $currency$buyit" if (($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0') or ($buyit > '0') && ($dutch eq 'no') &&  ($reserve > '0') && ($reserve > "$bid"));          
  1061.  
  1062.           my $grabberpic = "";
  1063.           $grabberpic = "<IMG SRC=\"$config{'grabber1'}\" border=\"0\">" if ($grabber eq "grab1");
  1064.           $grabberpic = "<IMG SRC=\"$config{'grabber2'}\" border=\"0\">" if ($grabber eq "grab2");
  1065.           $grabberpic = "<IMG SRC=\"$config{'grabber3'}\" border=\"0\">" if ($grabber eq "grab3");
  1066.           $grabberpic = "<IMG SRC=\"$config{'grabber4'}\" border=\"0\">" if ($grabber eq "grab4");
  1067.           $grabberpic = "<IMG SRC=\"$config{'grabber5'}\" border=\"0\">" if ($grabber eq "grab5");
  1068.           $grabberpic = "<IMG SRC=\"$config{'grabber6'}\" border=\"0\">" if ($grabber eq "grab6");
  1069.           $grabberpic = "<IMG SRC=\"$config{'grabber7'}\" border=\"0\">" if ($grabber eq "grab7");
  1070.           $grabberpic = "<IMG SRC=\"$config{'grabber8'}\" border=\"0\">" if ($grabber eq "grab8");
  1071.  
  1072.                             my $mytitle;
  1073.                             if ($feat_yt eq "YES"){                              
  1074.                             print "<tr bgcolor=\"$config{'boldbackground'}\">";
  1075.                             }
  1076.                             else {
  1077.                             print "<tr bgcolor=\"$itemrowcolor\">";
  1078.                             }
  1079.                             if ($feat_bf eq "YES") {
  1080.                             $mytitle = "<b>$title</b>";
  1081.                             }
  1082.                             else {
  1083.                             $mytitle = "$title";
  1084.                             }
  1085.                             print "<TD><A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\"> $imagedisp</A></TD><TD>$config{'displistfont'}&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$mytitle</A>&nbsp;&nbsp;<A HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category'}&item=$file\">$grabberpic</a></TD><TD>$#bids bids</TD><TD>$new$end$hot$dutchicon$buyitnow$reserveprice$reservepricemet<br>$bidstatus<br>Shipping $currency$shippfee1</TD><TD>$timeremain</TD></TR></FONT>\n";
  1086.                         }
  1087.                 }
  1088.        
  1089.         if ($icount <= 0){
  1090.             print "<tr><td COLSPAN=\"5\" bgcolor=\"$config{'colortablebody'}\"><b>No Items to View</b></td></tr>";
  1091.         }
  1092.         print "</table>";
  1093. ### Page Break
  1094. &pagebreak($pcount,$pagebreak);
  1095. }
  1096.  
  1097. #-#############################################
  1098. # Sub: Display Item
  1099. # This displays a particular item, its
  1100. # description, and its associated bids.
  1101.  
  1102. sub dispitem {      
  1103.  
  1104.               my ($loginalias, $loginpassword) = setlogin();
  1105.               $loginalias = ucfirst lc $loginalias;
  1106.               my($password, $undef) = &read_reg_file($loginalias);
  1107.               if(lc $password ne lc $loginpassword || $password eq '') {
  1108.                  $loginalias = '';
  1109.                  $loginpassword = '';
  1110.               }
  1111.            
  1112.         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = &read_item_file($form{'category'},$form{'item'});
  1113.                  
  1114.        &oops("This item is now closed. You can view this item and bid history using the <a HREF=$config{'scripturl'}?action=dispallclosed>All Closed Auctions</a> link then by selecting the item number in question. If you were the seller or the winning bidder, you can use the <font color=\"green\">View Your Closed Won/Sold </font>link from site links menu to view your closed auction items won or sold.") unless ($title);
  1115.  
  1116.         my ($highbidder, $reservemsg, $sellerpage, $sellersstore, $bidderpage, $buyitnow);
  1117.         my $backto = &backto;
  1118.  
  1119.         my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  1120.         my $closetime = strftime "%a %b %d, %I:%M %p", gmtime($form{item} + ($config{'systemtime'}* 3600 ));   
  1121.        
  1122.         my ($selleralias, $selleremail, $bid, $sellertime, $selleradd1, $selleradd2, $selleradd3, $selleroqty, $sellersoldqty) = &read_bid($bids[0]); # read first bid
  1123.          my $bidstart = strftime "%a %b %d, %I:%M %p", gmtime($sellertime + ($config{'systemtime'}* 3600 ));      
  1124.         my $numbids = $#bids;  
  1125.         my $firstbid = $bid;          
  1126.         my $location = $selleradd3;                  
  1127.      
  1128.         my ($alias, $email, $lastbid, $time, $add1, $add2, $add3, $oqty, $soldqty) = &read_bid($bids[$numbids]); # read last bid  
  1129.  
  1130.         my $timeremain;        
  1131.         if ((time > int($form{'item'})) && (time < (60 * $config{'aftermin'} + $time))) {
  1132.         $timeremain = "Extended over time bidding";
  1133.         }
  1134.         else {
  1135.         $timeremain = time_remain($form{item});        
  1136.         }
  1137.    
  1138.         my $bidhistory;
  1139.         if ($private eq 'yes') {
  1140.         $bidhistory = "<font COLOR=\"RED\">Private Bids Not Displayed</font>";
  1141.         }    
  1142.         else {
  1143.         $bidhistory = "<a HREF=\"$config{'scripturl'}?action=bidhistory&category=$form{'category'}&item=$form{'item'}\">(bid history)</a>";
  1144.         }
  1145.  
  1146.         my $sold;
  1147.         if (($dutch eq 'yes') && ($soldqty eq "")) {
  1148.         $sold = "Number Sold: <b>None</b>";
  1149.         }
  1150.         if (($dutch eq 'yes') && ($soldqty ne "")) {
  1151.         $sold = "Number Sold: <b>$soldqty</b>";
  1152.         }    
  1153.         if ($dutch eq 'no') {
  1154.         $sold = "";
  1155.         }
  1156.  
  1157.         $reservemsg = "";
  1158.         $reservemsg = "<font FACE=\"Arial\" COLOR=\"#FFOOOO\" size=\"2\">(Reserve not met)</font>" if (($lastbid < $reserve) && ($dutch eq 'no'));
  1159.         $reservemsg = "<font FACE=\"Arial\" COLOR=\"#FFOOOO\" size=\"2\">(Reserve met)</font>" if (($lastbid >= $reserve) && ($reserve > 0) && ($dutch eq 'no'));
  1160.         $reservemsg = "<font FACE=\"Arial\" COLOR=\"#FFOOOO\" size=\"2\">(No Reserve)</font> " if (($reserve <= 0)  && ($dutch eq 'no'));
  1161.         $reservemsg = "<font FACE=\"Arial\" COLOR=\"#FFOOOO\" size=\"2\">(Dutch Fixed Price)</font> " if ($dutch eq 'yes');
  1162.        
  1163.                 my $qacount = 0;
  1164.                 if (-e("$config{'basepath'}askseller/$form{'item'}.dat")) {
  1165.                 open QAFILE, "$config{'basepath'}askseller/$form{'item'}.dat";
  1166.                 my (@qadata) = <QAFILE>;
  1167.                 close QAFILE;
  1168.                 $qacount = @qadata;          
  1169.                 }
  1170.                 else {
  1171.                 $qacount = 0;
  1172.                 }
  1173.  
  1174.                 open (FEEDFILE, "$config{'feeddir'}/$selleralias.dat");
  1175.                 my ($spositive, $sneutral, $snegative, @suserfeeds) = <FEEDFILE>;
  1176.                 close FEEDFILE;
  1177.                 chomp($spositive, $sneutral, $snegative, @suserfeeds);
  1178.                 my $sellerrating = $spositive - $snegative;                  
  1179.                 my $sellervotes = $spositive + $sneutral + $snegative;
  1180.  
  1181.   my $star1s = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($sellerrating >= '4');
  1182.   my $star2s = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($sellerrating >= '8');
  1183.   my $star3s = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($sellerrating >= '12');
  1184.   my $star4s = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($sellerrating >= '16');
  1185.   my $star5s = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($sellerrating >= '20');
  1186.  
  1187.                 open (FEEDFILE, "$config{'feeddir'}/$alias.dat");
  1188.                 my ($bpositive, $bneutral, $bnegative, @buserfeeds) = <FEEDFILE>;
  1189.                 close FEEDFILE;
  1190.                 chomp($bpositive, $bneutral, $bnegative, @buserfeeds);
  1191.                 my $bidderrating = $bpositive - $bnegative;
  1192.                 my $biddervotes = $bpositive + $bneutral + $bnegative;
  1193.  
  1194.   my $star1b = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($bidderrating >= '4');
  1195.   my $star2b = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($bidderrating >= '8');
  1196.   my $star3b = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($bidderrating >= '12');
  1197.   my $star4b = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($bidderrating >= '16');
  1198.   my $star5b = "<img src=\"$config{'imagedir'}/stargreen.gif\" hight=\"10\" width=\"10\" border=\"0\">" if ($bidderrating >= '20');
  1199.                
  1200.  
  1201.         if ($private eq 'yes') {
  1202.         $highbidder = "<font COLOR=\"RED\">Private bidders info Not Displayed</font>";
  1203.         }
  1204.         elsif ($alias eq $selleralias){
  1205.         $highbidder = "<font color=red>No bids yet</font>";                            
  1206.         }
  1207.         else {
  1208.         $highbidder = "<font color=\"green\"><b>$alias</b></font> <a HREF=\"$config{'scripturl'}?action=viewrate&ALIAS=$alias\">
  1209. (bidders's feedback:<font color=\"red\">( $bidderrating )</font> $star1b $star2b $star3b $star4b $star5b)</a> - <a href=\"$config{'scripturl'}?action=search&searchtype=viewother&searchstring=$alias\">(bidders auctions)</a>";
  1210.         }
  1211.  
  1212.          if (-f "$config{'basepath'}$config{'mystoredir'}/$selleralias.st") {
  1213.          $sellersstore ="
  1214.  - <a HREF=\"$config{'scripturl'}?action=showstore&user=$selleralias\">(View My Store)</a>";
  1215.         }
  1216.         else {
  1217.         print "";
  1218.         }
  1219.  
  1220.          if (-f "$config{'basepath'}$config{'mypagedir'}/$selleralias.me") {
  1221.          $sellerpage ="
  1222.  - <a HREF=\"$config{'scripturl'}?action=showme&user=$selleralias\">(View My Page)</a>";
  1223.         }
  1224.         else {
  1225.         print "";
  1226.         }
  1227.        
  1228.         if (($#bids) && (-f "$config{'basepath'}$config{'mypagedir'}/$alias.me")) {
  1229.         $bidderpage ="
  1230.  - <a HREF=\"$config{'scripturl'}?action=showme&user=$alias\">(View My Page)</a>";
  1231.         }        
  1232.         else {
  1233.         print "";
  1234.         }
  1235.  
  1236.         my $retract;
  1237.         if ($#bids) {
  1238.         $retract = "High Bidder: You may <a HREF=\"$config{'scripturl'}?action=retractbid&category=$form{'category'}&item=$form{'item'}\">retract</a> your bid for a good reason.";
  1239.         }
  1240.  
  1241.          my $grabberpic = "";
  1242.           $grabberpic = "<IMG SRC=\"$config{'grabber1'}\" border=\"0\">" if ($grabber eq "grab1");
  1243.           $grabberpic = "<IMG SRC=\"$config{'grabber2'}\" border=\"0\">" if ($grabber eq "grab2");
  1244.           $grabberpic = "<IMG SRC=\"$config{'grabber3'}\" border=\"0\">" if ($grabber eq "grab3");
  1245.           $grabberpic = "<IMG SRC=\"$config{'grabber4'}\" border=\"0\">" if ($grabber eq "grab4");
  1246.           $grabberpic = "<IMG SRC=\"$config{'grabber5'}\" border=\"0\">" if ($grabber eq "grab5");
  1247.           $grabberpic = "<IMG SRC=\"$config{'grabber6'}\" border=\"0\">" if ($grabber eq "grab6");
  1248.           $grabberpic = "<IMG SRC=\"$config{'grabber7'}\" border=\"0\">" if ($grabber eq "grab7");
  1249.           $grabberpic = "<IMG SRC=\"$config{'grabber8'}\" border=\"0\">" if ($grabber eq "grab8");
  1250.  
  1251.           my $bgmusic = "";
  1252.           $bgmusic = "$config{'music1'}" if ($music eq "music1");
  1253.           $bgmusic = "$config{'music2'}" if ($music eq "music2");
  1254.           $bgmusic = "$config{'music3'}" if ($music eq "music3");
  1255.           $bgmusic = "$config{'music4'}" if ($music eq "music4");
  1256.           $bgmusic = "$config{'music5'}" if ($music eq "music5");
  1257.           $bgmusic = "$config{'music6'}" if ($music eq "music6");
  1258.           $bgmusic = "$config{'music7'}" if ($music eq "music7");
  1259.           $bgmusic = "$config{'music8'}" if ($music eq "music8");
  1260.  
  1261.         ### use commas in the bid price ###
  1262.         my $chklastbid = $lastbid;
  1263.         $buyit = &parsebid($buyit, $currency);
  1264.  
  1265.         if ($currency eq '$') {
  1266.         $firstbid  =~ s/\G(\d{1,3})(?=(?:\d\d\d)+(?:\.|$))/$1,/g;
  1267.         $lastbid =~ s/\G(\d{1,3})(?=(?:\d\d\d)+(?:\.|$))/$1,/g;
  1268.         $buyit =~ s/\G(\d{1,3})(?=(?:\d\d\d)+(?:\.|$))/$1,/g;
  1269.         }
  1270.  
  1271.         my $pay;
  1272.         if ($paypalacc ne "") {
  1273.         $pay = "PayPal.com ";
  1274.         }
  1275.         else {
  1276.         $pay = "";
  1277.         }
  1278.              
  1279. if ($config{'backgroungmusic'} eq 'yes') {
  1280.     print <<"EOF";
  1281. <embed src="$bgmusic" width="0" height="0" loop="true" autoplay="true" hidden="true">
  1282. EOF
  1283. }  
  1284.  
  1285.         print <<"EOF";
  1286. <div align="center">
  1287. <table border="0" width="85%">
  1288.   <tr>
  1289.     <td align="left"><!-- AddThis Button BEGIN -->
  1290. <div class="addthis_toolbox addthis_default_style " align="right">
  1291. <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
  1292. <a class="addthis_button_tweet"></a>
  1293. <a class="addthis_button_pinterest_pinit"></a>
  1294. <a class="addthis_counter addthis_pill_style"></a>
  1295. </div>
  1296. <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5147203a442b234c"></script>
  1297. <!-- AddThis Button END --></td>
  1298. <td align="right">Current Time: $nowtime $config{'timezone'}
  1299. </td>
  1300. </tr>
  1301. </table>
  1302. </div>
  1303.  
  1304. <div align="center">  
  1305. <table border="0" cellspacing="0" width="85%" bgcolor="$config{'colortablebody'}">
  1306.   <tr>
  1307.     <td align="left" valign="Top"><p><b>$backto</b></p></td>  
  1308.     <td align="right" valign="Top"><p><font size="3"><b>Item #$form{'item'}</b></font><BR><font size="2"><a HREF="$config{'scripturl'}?action=trackitem&category=$form{'category'}&item=$form{'item'}"> (Add this item to your watch list)</a></font></p></td>  
  1309. </tr>
  1310.   </table>
  1311. <BR><BR>
  1312. </div>
  1313.  
  1314. EOF
  1315.        
  1316. if ($loginalias eq $alias) {
  1317. print <<"EOF";
  1318. <BR>
  1319. <div align="center">  
  1320. <table border="0" cellspacing="0" width="85%" bgcolor="$config{'colortablebody'}">
  1321.   <tr>
  1322.     <td align="center" >******************************************************************************************************</td>  
  1323.   </tr>
  1324.   <tr>
  1325.   <td align="center" width="%"><Font size="5">Congratulations $alias Your Are The High Bidder!</font></td>
  1326.   <tr>
  1327.     <td align="center">******************************************************************************************************</td>  
  1328.   </tr>
  1329. </table>
  1330. </div>
  1331. EOF
  1332. }
  1333.  
  1334. print <<"EOF";
  1335.  
  1336. <div align="center">
  1337. <table align="center" width="85%" border="0" cellspacing="0">
  1338. <tr>
  1339. <th valign="top" rowspan="23" scope="col"><a name="IMG"><img name="large" SRC="$image1" border="1"></th>
  1340. <th align="left" colspan="5" scope="col"><font size="6"><b>$title</b></font></th>
  1341. </tr>
  1342. <tr>
  1343. <td width="10%" align="right" valign="top">Item Condition:</td>
  1344. <td width="30%" valign="top"><b>$condition</b></td>
  1345. <td width=1%></td>
  1346. <td width="25%"></td>
  1347. <td width="2%"></td>
  1348. </tr>
  1349. <tr>
  1350. <td align="right" valign="top">Time Left:</td>
  1351. <td valign="top"><b>$timeremain</b><BR>
  1352. <font size="2"><B>Ends: </b>$closetime</font></td>
  1353. <td></td>
  1354. <td></td>
  1355. <td></td>
  1356. </tr>
  1357. <tr>
  1358. <td></td>
  1359. <td></td>
  1360. <td></td>
  1361. <td style="border: 3px solid; border-color:#9900FF;" bgcolor="e5e5e5"><font color="#9900CC" size="5"><b>Seller Information</B></font></td>
  1362. <td></td>
  1363. </tr>
  1364. <tr>
  1365. <td style="border-bottom: 3px solid; border-color:#9900FF" align="right" valign="top">Dutch Auction:</td>
  1366. <td style="border-bottom: 3px solid; border-color:#9900FF" valign="top"><b>$dutch</b></td>
  1367. <td></td>
  1368. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><span class="style3"><b>$selleralias</b> <a HREF="$config{'scripturl'}?action=viewrate&ALIAS=$selleralias&ITEM=$form{'item'}">( $sellerrating ) $star1s $star2s $star3s $star4s $star5s</a></span></td>
  1369. <td></td>
  1370. </tr>
  1371. <tr>
  1372. <td valign="top"></td>
  1373. <td valign="top"></td>
  1374. <td></td>
  1375. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><span class="style3">$sellerrating Positive Feedback</span></td>
  1376. <td></td>
  1377. </tr>
  1378. <tr>
  1379. <td align="right" valign="top">Current Bid: </td>
  1380. <td valign="middle"><b><font size="5" color="Green">$currency$lastbid</font> ($numbids)</b> $bidhistory<BR>$reservemsg</td>
  1381. <td></td>
  1382. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><P><span class="style2"><span class="style3"></span></span></td>
  1383. <td></td>
  1384. </tr>
  1385. <tr>
  1386. <td align="right" valign="top">&nbsp;</td>
  1387. <td valign="top">&nbsp;</td>
  1388. <td></td>
  1389. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><a HREF="$config{'scripturl'}?action=askquestion&category=$form{'category'}&item=$form{'item'}" class="style3">Ask question or view Q&A ( $qacount )</a></td>
  1390. <td></td>
  1391. </tr>
  1392. <tr>
  1393. <td colspan="2" align="center" valign="top">Buy It Now Code</td>
  1394. <td></td>
  1395. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><span class="style3"><a href="$config{'scripturl'}?action=search&searchtype=viewother&searchstring=$selleralias">$selleralias 's other auctions</a> $sellerpage $sellersstore</span></td>
  1396. <td></td>
  1397. </tr>
  1398. <tr>
  1399. <td valign="top"></td>
  1400. <td valign="top"></td>
  1401. <td></td>
  1402. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><a href="$config{'scripturl'}?action=mailto&category=$form{'category'}&item=$form{'item'}" class="style3">Email this to a friend</a></td>
  1403. <td></td>
  1404. </tr>
  1405. <tr>
  1406. <td valign="top">bid button</td>
  1407. <td valign="top">Your Bid Field}</td>
  1408. <td></td>
  1409. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><P><span class="style2"><span class="style3"></span></span></td>
  1410. <td></td>
  1411. </tr>
  1412. <tr>
  1413. <td align="left" valign="top" colspan="2"><font size="2">Enter lowest bid or more in bid inc increments</font></td>
  1414. <td></td>
  1415. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><span class="style3">Buyer</span></td>
  1416. <td></td>
  1417. </tr>
  1418. <tr>
  1419. <td align="left" valign="top" colspan="2"><font size="2">Registered user required to bid.</font></td>
  1420. <td></td>
  1421. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><span class="style3">Retract Bid</span></td>
  1422. <td></td>
  1423. </tr>
  1424. <tr>
  1425. <td align="right" valign="top">User Name:</td>
  1426. <td valign="top">user name field</td>
  1427. <td></td>
  1428. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><P><span class="style2"><span class="style3"></span></span></td>
  1429. <td></td>
  1430. </tr>
  1431. <tr>
  1432. <td align="right" valign="top">Password:</td>
  1433. <td valign="top">password field</td>
  1434. <td></td>
  1435. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><span class="style3">Seller</span></td>
  1436. <td></td>
  1437. </tr>
  1438. <tr>
  1439. <td style="border-bottom: 3px solid; border-color:#9900FF"><p></td>
  1440. <td style="border-bottom: 3px solid; border-color:#9900FF"><p></td>
  1441. <td></td>
  1442. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><span class="style3">Ban a Bidder</span></td>
  1443. <td></td>
  1444. </tr>
  1445. <tr>
  1446. <td align="right" valign="top">Shipping:</td>
  1447. <td valign="top">$currency$shippfee1 via $shippservice1</td>
  1448. <td></td>
  1449. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#F2F2F2"><a HREF="$config{'scripturl'}?action=sellerlogon&category=$form{'category'}&item=$form{'item'}" class="style3">Edit item if no bids placed</a></td>
  1450. <td></td>
  1451. </tr>
  1452. <tr>
  1453. <td valign="top"></td>
  1454. <td valign="top"><font size="2">Item Location: <b>$location</b></font></td>
  1455. <td></td>
  1456. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#f2f2f2"><P><span class="style3"></span></td>
  1457. <td></td>
  1458. </tr>
  1459. <tr>
  1460. <td valign="top"></td>
  1461. <td valign"Top"><font size="2">Ships to: <b>$shipsto</b></font></td>
  1462. <td></td>
  1463. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#f2f2f2"><P><span class="style3"></span></td>
  1464. <td></td>
  1465. </tr>
  1466. <tr>
  1467. <td></td>
  1468. <td></td>
  1469. <td></td>
  1470. <td style="border-left: 3px solid; border-right: 3px solid; border-color:#9900FF" bgcolor="#f2f2f2"></td>
  1471. <td></td>
  1472. </tr>
  1473. <tr>
  1474. <td align="right" valign="top">Payments:</td>
  1475. <td valign="top">$pay <a href="#PAYMENTACCEPTED">(See Details)</a></td>
  1476. <td></td>
  1477. <td style="border-left: 3px solid; border-right: 3px solid; border-bottom: 3px solid; border-color:#9900FF" bgcolor="#f2f2f2"><P><span class="style3"></span></td>
  1478. <td></td>
  1479. </tr>
  1480. <tr>
  1481. <td></td>
  1482. <td></td>
  1483. <td></td>
  1484. <td></td>
  1485. <td></td>
  1486. </tr>
  1487. <tr>
  1488. <td></td>
  1489. <td></td>
  1490. <td></td>
  1491. <td></td>
  1492. <td></td>
  1493. </tr>
  1494. </table></div>
  1495. EOF
  1496. if (($config{'buyitnow'} eq 'yes') && ($buyit > '0') && ($#bids eq '0') && ($dutch eq 'no') && ($reserve <= '0')) {
  1497. print <<"EOF";
  1498. <p>
  1499. <div align="center">
  1500. <table align="center" border="0" width="30%" cellpadding="0" cellspacing="0">
  1501. <tr>
  1502.     <td align="left"><a HREF="$config{'scripturl'}?action=buyit&CATEGORY=$form{'category'}&ITEM=$form{'item'}"><B>Buy It for <font color="green" size="5">$currency$buyit</font></B></a><br>This option disappears once a bid is placed.</td>
  1503. </tr>
  1504. </table><BR><BR>
  1505. </div>
  1506. EOF
  1507. }
  1508.         if (($config{'buyitnow'} eq 'yes') && ($buyit > '0') && ($dutch eq 'no') && ($reserve > '0') && ($reserve > "$chklastbid")) {
  1509. print <<"EOF";
  1510. <p>
  1511. <div align="center">
  1512. <table border="0" width="35%" cellpadding="0" cellspacing="0">
  1513. <tr>
  1514.     <td ><a HREF="$config{'scripturl'}?action=buyit&CATEGORY=$form{'category'}&ITEM=$form{'item'}">Buy It</a> for $currency$buyit<BR>This option disappears once the reserve price has been met.</td>
  1515. </tr>
  1516. </table>
  1517. <BR><BR>
  1518. </div>
  1519. EOF
  1520. }
  1521.  
  1522.  
  1523.  
  1524.  
  1525.            if ($usecounter eq "Yes") {    
  1526.    my $totalReads = "0";
  1527.    open(COUNT, "$config{'basepath'}$config{'countdir'}/$form{'item'}.dat");
  1528.    $totalReads = <COUNT>;  
  1529.    close(COUNT);
  1530.    #chomp($totalReads);
  1531.  
  1532.       ++$totalReads;
  1533.       open(COUNT, "> $config{'basepath'}$config{'countdir'}/$form{'item'}.dat");
  1534.       if ($config{'flock'}) {
  1535.       flock(COUNT, 2);
  1536.       seek COUNT, 0, 0;
  1537.       }
  1538.       print COUNT "$totalReads";
  1539.       close(COUNT);
  1540.                          
  1541. print <<"EOF";
  1542. <table align="center" border="2" bgcolor=""><tr><td>
  1543. <center><font size="4">This item has been viewed ( <b>$totalReads</b> )times</font></center></td></table>
  1544. EOF
  1545.             }
  1546.  
  1547.        
  1548. print <<"EOF";
  1549. </font>
  1550.  
  1551. <div align="center">
  1552. <table border="0" cellpadding="8" cellspacing="0" width="85%">
  1553.   <tr>
  1554.     <td><p></td>
  1555.   </tr>
  1556.   <tr>
  1557.     <td width="50%"><font size="2" face="Arial"><center>Seller assumes all responsibility for listing this item.<br>
  1558.     You should contact the seller to resolve any questions before bidding.<br>
  1559.     Currency is $currency unless otherwise noted.</center></font></td>
  1560.   </tr>
  1561.   <tr>
  1562.     <td><p></td>
  1563.   </tr>
  1564. </table>
  1565. </div>
  1566.  
  1567. <div align="center">
  1568. <table style="border-bottom: 2px solid purple; border-top: 2px solid purple;" cellspacing="0" width="85%" bgcolor="$config{'colortablehead'}">
  1569.   <tr>
  1570.     <td align="center" width="85%"><font size="6"><b><a name="DESC"></a><center>Description</center></b></font></td>
  1571.   </tr>
  1572. </table>
  1573. </div>
  1574.  
  1575. <div align="center">
  1576. <table border="0" cellspacing="0" width="95%">
  1577.   <tr>
  1578.     <td><p></td>  
  1579.   </tr>
  1580.   <tr>
  1581.     <td>
  1582. $desctitcolor$desctitsize<center>$desctit</center>
  1583. </font></font></BOLD></b></I></U></H1></H2></H3></H4></H5></center>
  1584.    </td>
  1585.    </tr>
  1586. </table>
  1587. </div>
  1588.  
  1589.  
  1590.  
  1591. <div align="center">
  1592. <table border="0" cellspacing="0" width="85%">
  1593.   <tr>
  1594.     <td>$desccolor$descsize<blockquote>$desc</blockquote>
  1595. </font></font></BOLD></b></I></U></H1></H2></H3></H4></H5></center>
  1596.    </td>
  1597.    </tr>
  1598. </table>
  1599. </div>
  1600.  
  1601. <div align="center">
  1602. <SCRIPT LANGUAGE="JavaScript">
  1603. function EnlargeImage(name) {
  1604. newsrc = name;
  1605. document.images.large.src = newsrc;
  1606. }
  1607. </SCRIPT>
  1608. EOF
  1609. if ($image1 ne "") {
  1610. print <<"EOF";
  1611. <table align="center" border="0" width="85%">
  1612. <tr>
  1613. <td align="center"><a name="IMG"><img name="large" SRC="$image1" border="0"><br><br><br></td>      
  1614. EOF
  1615. }
  1616. if ($image2 ne "") {
  1617. print <<"EOF";
  1618. <td>
  1619. <table border="0"><tr><td colspan="2" align="center"><b>Click Thumbnails For Larger Picture</b></td>
  1620. </tr>
  1621. EOF
  1622. }
  1623. if ($image1 ne "") {
  1624. print <<"EOF";
  1625. <tr align="Center">
  1626. <td><a href="javascript:EnlargeImage('$image1')"><img SRC="$image1" border="0" width="75"></a></td>
  1627. EOF
  1628. }
  1629. if ($image2 ne "") {
  1630. print <<"EOF";
  1631. <td><a href="javascript:EnlargeImage('$image2')"><img SRC="$image2" border="0" width="75"></a></td>
  1632. </tr>
  1633. EOF
  1634. }
  1635. if ($image3 ne "") {
  1636. print <<"EOF";
  1637. <tr>
  1638. <td><a href="javascript:EnlargeImage('$image3')"><img SRC="$image3" border="0" width="75"></a></td>
  1639. EOF
  1640. }
  1641. if ($image4 ne "") {
  1642. print <<"EOF";
  1643. <td><a href="javascript:EnlargeImage('$image4')"><img SRC="$image4" border="0" width="75"></a></td>
  1644. EOF
  1645. }
  1646. if ($image5 ne "") {
  1647. print <<"EOF";
  1648. <tr>
  1649. <td><a href="javascript:EnlargeImage('$image5')"><img SRC="$image5" border="0" width="75"></a></td>
  1650. EOF
  1651. }
  1652. if ($image6 ne "") {
  1653. print <<"EOF";
  1654. <td><a href="javascript:EnlargeImage('$image6')"><img SRC="$image6" border="0" width="75"></a></td>
  1655. </tr>
  1656. EOF
  1657. }
  1658. if ($image7 ne "") {
  1659. print <<"EOF";
  1660. <tr>
  1661. <td><a href="javascript:EnlargeImage('$image7')"><img SRC="$image7" border="0" width="75"></a></td>
  1662. EOF
  1663. }
  1664. if ($image8 ne "") {
  1665. print <<"EOF";
  1666. <td><a href="javascript:EnlargeImage('$image8')"><img SRC="$image8" border="0" width="75"></a></td>
  1667. EOF
  1668. }
  1669. if ($image1 ne "") {
  1670. print <<"EOF";
  1671. </tr>
  1672. </table>
  1673. </tr>
  1674. </table>
  1675. </div>
  1676. EOF
  1677. }
  1678.  
  1679. print <<"EOF";
  1680. </table>
  1681. </div>
  1682.  
  1683.  
  1684.  
  1685. <div align="center">
  1686. <table width="85%"border="0" cellspacing="0" width="85%" bgcolor="$config{'colortablehead'}">
  1687.   <tr>
  1688.     <td align="center" width="85%"></B></a><font size="4"><b><a name="SHIPPINGINS"></a>Sellers Shipping Methods</b></font></td>
  1689.   </tr>
  1690. </table>
  1691. </div>
  1692.  
  1693. <div align="center">
  1694. <table border="0" cellspacing="0" width=85%>  
  1695.    <tr>
  1696.     <td><p><br></td>  
  1697.   </tr>
  1698.   <tr>
  1699.     <td width="20%"><b>Shipping Cost</b></td>
  1700.     <td width="1%"></td>
  1701.     <td width="20%"><b>Services Available</b></td>
  1702.     <td width="1%"></td>
  1703.     <td width="20%"><b>Available to</b></td>
  1704.  </tr>
  1705.  <tr>
  1706.     <td width="20%">Shipping: $currency$shippfee1</td>
  1707.     <td width="1%"></td>
  1708.     <td width="20%">$shippservice1</td>
  1709.     <td width="1%"></td>
  1710.     <td width="20%">$shipsto</td>
  1711.  </tr>
  1712. <tr>
  1713.     <td width="20%">Shipping: $currency$shippfee2</td>
  1714.     <td width="1%"></td>
  1715.     <td width="20%">$shippservice2</td>
  1716.     <td width="1%"></td>
  1717.     <td width="20%"></td>
  1718.  </tr>
  1719.  <tr>
  1720.     <td width="20%">Insurance: $currency$insurancefee</td>
  1721.     <td width="1%"></td>
  1722.     <td width="20%"></td>
  1723.     <td width="1%"></td>
  1724.     <td width="20%"></td>
  1725.  </tr>
  1726.  <tr>
  1727.     <td width="20%">Additional Item(s) Shipping fee: $currency$multishipping</td>
  1728.     <td width="1%"></td>
  1729.     <td width="20%"></td>
  1730.     <td width="1%"></td>
  1731.     <td width="20%"></td>
  1732.  </tr>
  1733.   <tr>
  1734.     <td><p><br></td>  
  1735.   </tr>
  1736.  </table>
  1737. </div>
  1738.  
  1739. <div align="center">
  1740. <table border="0" cellspacing="0" width="85%" bgcolor="$config{'colortablehead'}">
  1741.   <tr>
  1742.     <td align="center" width="85%"></B></a><font size="4"><b><a name="SALESTAXINS"></a>Sales Tax Info</b></font></td>
  1743.   </tr>
  1744. </table>
  1745. </div>
  1746.  
  1747. <div align="center">
  1748. <table border="0" cellspacing="0" width=675>
  1749.   <tr>
  1750.     <td><p><br></td>  
  1751.   </tr>
  1752.  <tr>
  1753.     <td align="center">Sales Tax: $salestax</td>
  1754.   </tr>
  1755.  <tr>
  1756.     <td><p><br></td>
  1757.   </tr>
  1758.  <tr>
  1759.     <td align="center">Sales Tax Info: $salesinfo</td>
  1760.   </tr>
  1761.   <tr>
  1762.     <td><p><br></td>  
  1763.   </tr>
  1764. </table>
  1765. </div>
  1766.  
  1767. <div align="center">
  1768. <table border="0" cellspacing="0" width="85%" bgcolor="$config{'colortablehead'}">
  1769.   <tr>
  1770.     <td align="center" width="85%"></B></a><font size="4"><b><a name="RETURNINS"></a>Sellers Return Policy:</b></font></td>
  1771.   </tr>
  1772. </table>
  1773. </div>
  1774.  
  1775. <div align="center">
  1776. <table border="0" cellspacing="0" width=675>  
  1777.   <tr>
  1778.     <td><p><br></td>  
  1779.   </tr>
  1780.   <tr>
  1781.     <td align="Center">$return</td>  
  1782.   </tr>
  1783.   <tr>
  1784.     <td><p><br></td>  
  1785.   </tr>
  1786. </table>
  1787. </div>
  1788.  
  1789. <div align="center">
  1790. <table border="0" cellspacing="0" width="85%" bgcolor="$config{'colortablehead'}">
  1791.   <tr>
  1792.     <td align="center" width="85%"></B></a><font size="4"><b><a name="PAYMENTINS"></a>Sellers Payment Instructions</b></font></td>
  1793.   </tr>
  1794. </table>
  1795. </div>
  1796.  
  1797. <div align="center">
  1798. <table border="0" cellspacing="0" width=675>  
  1799.   <tr>
  1800.     <td><p><br></td>  
  1801.   </tr>
  1802.   <tr>
  1803.     <td align="center">$paymentinst</td>  
  1804.   </tr>
  1805.   <tr>
  1806.     <td><p><br></td>  
  1807.   </tr>
  1808. </table>
  1809. </div>
  1810. EOF
  1811.  
  1812. if ($paypalacc ne "") {
  1813. print <<"EOF";
  1814. <div align="center">
  1815. <table border="0" cellspacing="0" width="85%" bgcolor="$config{'colortablehead'}">
  1816.   <tr>
  1817.     <td align="center" width="85%"></B></a><font size="4"><b><a name="PAYMENTACCEPTED"></a>Sellers Payment Methods Accepted</b></font></td>
  1818.   </tr>
  1819. </table>
  1820.  
  1821. <div align="center">
  1822. <table border="0" cellspacing="0" width=675>  
  1823.   <tr>
  1824.     <td><p><br></td>  
  1825.   </tr>
  1826. </div>
  1827.   <tr>
  1828.     <td><b>Automated Payments Accepted:</b>
  1829.   </tr>
  1830.   <tr>
  1831.     <td><img src="$config{'imagedir'}/payusingpaypal.gif"></td>
  1832.   </tr>
  1833.   <tr>
  1834.     <td><p><br></td>
  1835.   </tr>
  1836.   <tr>
  1837.     <td><b>Non Automated Payments Accepted:</b></td>
  1838.   </tr>
  1839.  <tr>
  1840.     <td>$payment</td>
  1841.   </tr>
  1842.  <tr>
  1843.     <td><p><br></td>
  1844.   </tr>
  1845. </table>
  1846. </div>
  1847. EOF
  1848. }
  1849. else {
  1850. print <<"EOF";
  1851. <div align="center">
  1852. <table border="0" cellspacing="0" width="85%" bgcolor="$config{'colortablehead'}">
  1853.   <tr>
  1854.     <td align="center" width="85%"></B></a><font size="4"><b><a name="PAYMENTACCEPTED"></a>Sellers Payment Methods Accepted</b></font></td>
  1855.   </tr>
  1856. </table>
  1857.  
  1858. <div align="center">
  1859. <table border="0" cellspacing="0" width=675>  
  1860.   <tr>
  1861.     <td><p><br></td>  
  1862.   </tr>
  1863. </div>
  1864.   <tr>
  1865.     <td>$payment</td>  
  1866.   </tr>
  1867.   <tr>
  1868.     <td><p><br></td>  
  1869.   </tr>
  1870.   <tr>
  1871.     <td>PayPal not execpted</td>  
  1872.   </tr>
  1873.   <tr>
  1874.     <td><p><br></td>  
  1875.   </tr>
  1876. </table>
  1877. </div>
  1878. EOF
  1879. }
  1880.  
  1881.         ### Either the item is closed or we will display a bid form ###      
  1882.         if ((time > int($form{'item'})) && (time > (60 * $config{'aftermin'} + $time))) {
  1883.                 print "<font size=\"-1\" COLOR=\"#FF0000\"><b>BIDDING IS NOW CLOSED</b></font><BR>";                
  1884.         }
  1885.         else {
  1886.         #####  Normal Bid Form
  1887.         my $lowest_new_bid;
  1888.         if ($dutch eq 'no') {          
  1889.             my $closetime = localtime($form{'item'});
  1890.             my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]); # read the last bid          
  1891.             $lowest_new_bid = (&read_bid($bids[0]))[2];  
  1892.             $lowest_new_bid = &parsebid($bid, $currency);                      
  1893.             $lowest_new_bid = &parsebid($bid + $inc, $currency) if ($#bids);
  1894.  
  1895.             print <<"EOF";
  1896. <FORM ACTION="$config{'scripturl'}" METHOD="POST">
  1897. <table width="100%"><tr><td bgcolor="$config{'colortablehead'}">
  1898. <font size="4"><b><a name="BID"></a><center>Bidding</center></b></font>
  1899. </td></tr></table>
  1900. <table width="85%" border="0">
  1901.   <tr>
  1902.     <td width="70%" bgcolor="$config{'colortablebody'}">
  1903. EOF
  1904.  
  1905.        
  1906.  
  1907. print <<"EOF";
  1908. <INPUT TYPE="HIDDEN" NAME="action" VALUE="confirmbid">
  1909. <INPUT TYPE="HIDDEN" NAME="ITEM" VALUE="$form{'item'}">
  1910. <INPUT TYPE="HIDDEN" NAME="CATEGORY" VALUE="$form{'category'}">
  1911. <b>Number of bids:</b> $#bids<BR>
  1912. <b>The Current High Bid Is:</b> $currency$bid<BR>
  1913. <b>The Bid Increment Is:</b> $currency$inc<BR>
  1914. <b>The Lowest You May Bid Is:</b> $currency$lowest_new_bid  
  1915. EOF
  1916.  
  1917.                 if ($config{'regdir'}) {
  1918.                         print <<"EOF";
  1919. <table width="100%"><tr><td bgcolor="$config{'colortablebody'}">
  1920. <BR><b>Your Bid:</b>  $currency<INPUT NAME=BID TYPE=TEXT size=10 VALUE="$lowest_new_bid"><INPUT TYPE=SUBMIT NAME=proxy VALUE="===>>  Place Bid  <<===">
  1921. <BR>(Do not enter commas)
  1922. <br>Enter the max you are willing to pay and the system will bid for you.
  1923. <P><b><a HREF="$config{'scripturl'}?action=agree">Registration</a> is required to make a bid!</b>
  1924. <P><b>Your Username:</b>  <INPUT NAME=ALIAS TYPE=TEXT size=30 MAXLENGTH=30 VALUE=$loginalias> (used to track your bid)
  1925. <BR><b>Your Password:</b><INPUT NAME=PASSWORD TYPE=PASSWORD size=30 VALUE=$loginpassword> (must be valid)
  1926. <br>
  1927. </td></tr></table>
  1928. EOF
  1929.                 }
  1930.                 else {
  1931.                         print <<"EOF";
  1932. <table width="100%"><tr><td bgcolor="$config{'colortablebody'}">
  1933. <P><b>Your Username:</b> <INPUT NAME=ALIAS TYPE=TEXT size=30 MAXLENGTH=30> (used to track your bid)
  1934. <BR><b>Your E-Mail Address:</b> <INPUT NAME=EMAIL TYPE=TEXT size=30> (must be valid)
  1935. <BR><b>Your Bid:</b> $currency<INPUT NAME=BID TYPE=TEXT SIZE=9 VALUE="$lowest_new_bid">
  1936. <P><b>Contact Information:</b> (will be given out only to the seller)<BR>
  1937. <TT>Full Name: </TT><BR><INPUT NAME=ADDRESS1 TYPE=TEXT size=30><BR>
  1938. <TT>Street Address: </TT><BR><INPUT NAME=ADDRESS2 TYPE=TEXT size=30><BR>
  1939. <TT>City, State, ZIP: </TT><BR><INPUT NAME=ADDRESS3 TYPE=TEXT size=30><P>
  1940. </td></tr></table>
  1941. EOF
  1942.                 }              
  1943.                
  1944. print <<"EOF";      
  1945. <p><b>Placing Bids:</b><br>
  1946. &nbsp;&nbsp;Please bid the <strong>maximum amount</strong>
  1947. you are willing to pay for this item. Your maximum amount will be kept <b>secret;</b>
  1948. $config{'sitename'} will bid on your behalf as necessary by increasing your bid by the current bid increment up until your maximum is reached. This saves you the trouble of having to keep track of the auction as it proceeds and prevents you from being outbid at the last minute unless your spending limit is exceeded. Also, in case of a tie for high bidder, <b>earlier</b> bids take precedence.<br>
  1949.  
  1950. <p><b>Binding contract:</b><br>
  1951. <font size="3">&nbsp;&nbsp;By placing a bid you are making a <b>CONTRACT</b> between you and the seller. Once you place a bid, you may not retract it.  In some states, it is illegal to win an auction and not purchase the item.  In other words, if you don't want to pay for it,
  1952. don't bid!<br>
  1953.  
  1954. <td width="30%" bgcolor="$config{'colortablebody'}">
  1955. <center><b>How to Bid</b></center><br>
  1956. <OL>
  1957.         <LI><a HREF="$config{'scripturl'}?action=agree">Register to bid</a> - It's free, and required to bid or sell.
  1958.         <LI><a HREF="#DESC">Know the Item</a> - Read the full description of the item you are bidding on.
  1959.         <LI>If you have questions about the item<br><a HREF="$config{'scripturl'}?action=askquestion&category=$form{'category'}&item=$form{'item'}&title=$title">(ask or view Q&A)</a> <b>BEFORE</b> you place a bid.
  1960.         <LI>Decide on the price, and submit your bid!
  1961. </OL>
  1962. </td></tr>
  1963. </table>
  1964. </FORM>
  1965. EOF
  1966. }
  1967. ## End Normal Bid Form
  1968.  
  1969.         else {
  1970.         ##### Go Dutch
  1971.         if ($dutch eq 'yes') {        
  1972. ### Place Bid on a Auction Item  
  1973.             $form{'SOLDQTY'} = $soldqty if !($form{'SOLDQTY'});      
  1974.             $form{'OQTY'} = $oqty if !($form{'OQTY'});                      
  1975.             my $closetime = localtime($form{'item'});
  1976.             my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]); # read the last bid          
  1977.             my $lowest_new_bid;
  1978.             $lowest_new_bid = (&read_bid($bids[0]))[2];            
  1979.             $lowest_new_bid = &parsebid($bid, $currency);  
  1980.  
  1981.               print <<"EOF";
  1982. <FORM ACTION="$config{'scripturl'}" METHOD="POST">
  1983. <table width="100%"><tr><td bgcolor="$config{'colortablehead'}">
  1984. <font size="+2"><a name="BID"><b>Place a bid on a dutch fixed price item</b></a></font>
  1985. </td></tr></table>
  1986. <table width="100%" border="0"><tr><td width="70%" bgcolor="$config{'colortablebody'}">
  1987. <center><font size="+1">$title</font><br>
  1988. <font size=+1>Item # - $form{'item'}</font>
  1989. </center>
  1990. <INPUT TYPE="HIDDEN" NAME="action" VALUE="confirmdutchbid">
  1991. <INPUT TYPE="HIDDEN" NAME="ITEM" VALUE="$form{'item'}">
  1992. <INPUT TYPE="HIDDEN" NAME="CATEGORY" VALUE="$form{'category'}">
  1993. <b>Item Price Each Is:</b> $currency$lowest_new_bid
  1994. EOF
  1995.  
  1996.                 if ($config{'regdir'}) {
  1997.                         print <<"EOF";
  1998. <table width="100%"><tr><td bgcolor="$config{'colortablebody'}">
  1999. <P><b><a HREF="$config{'scripturl'}?action=agree">Registration</a> is required to make a bid!</b>
  2000. <P><b>Your Username:</b> <INPUT NAME=ALIAS TYPE=TEXT size=30 MAXLENGTH=30 VALUE=$loginalias> (used to track your bid)
  2001. <BR><b>Your Password:</b> &nbsp;<INPUT NAME=PASSWORD TYPE=PASSWORD size=30 VALUE=$loginpassword> (must be valid)
  2002. <BR><b>Your Fixed Dutch Price Is:</b> $currency$lowest_new_bid
  2003. <BR><INPUT NAME=BID TYPE=HIDDEN VALUE="$lowest_new_bid">
  2004. <BR><b>Quantity your bidding on:</b>
  2005. <INPUT NAME=OQTY TYPE=TEXT size=6 VALUE="1">
  2006. <INPUT TYPE=SUBMIT NAME=dutch VALUE="===> Place Bid <===">
  2007. </td></tr></table>
  2008. EOF
  2009.                 }
  2010.                 else {
  2011.                         print <<"EOF";
  2012. <table width="100%"><tr><td bgcolor="$config{'colortablebody'}">
  2013. <P><b>Your Username:</b> <INPUT NAME=ALIAS TYPE=TEXT size=30 MAXLENGTH=30> (used to track your bid)
  2014. <BR><b>Your E-Mail Address:</b> <INPUT NAME=EMAIL TYPE=TEXT size=30> (must be valid)
  2015. <BR><b>Your Bid:</b> $currency<INPUT NAME=BID TYPE=TEXT SIZE=9 VALUE="$lowest_new_bid">
  2016. <P><b>Contact Information:</b> (will be given out only to the seller)<BR>
  2017. <TT>Full Name: </TT><BR><INPUT NAME=ADDRESS1 TYPE=TEXT size=30><BR>
  2018. <TT>Street Address: </TT><BR><INPUT NAME=ADDRESS2 TYPE=TEXT size=30><BR>
  2019. <TT>City, State, ZIP: </TT><BR><INPUT NAME=ADDRESS3 TYPE=TEXT size=30><P>
  2020. </td></tr></table>
  2021. EOF
  2022.        }  
  2023.                
  2024. print <<"EOF";      
  2025. <p><b>Binding contract:</b><br>
  2026. <font size="3">&nbsp;&nbsp;By placing a bid you are making a <b>CONTRACT</b> between you and the seller. Once you place a bid, you may not retract it.  In some states, it is illegal to win an auction and not purchase the item.  In other words, if you don't want to pay for it,
  2027. don't bid!<br>
  2028. <p><b>This is a Dutch Auction!</b><BR>
  2029. Please refer to our rules governing Dutch auctions before bidding.(NOTE:) There is no proxy bidding in a dutch Auction, item price does not change when bidding, When a bid is placed the seller and buyer will be E-Mailed contact information price and quantity of bid, It is up to the buyer and seller to contact each other to make nessary arrangements.<p></font>
  2030.  
  2031. <td width="30%" bgcolor="$config{'colortablebody'}">
  2032. <center><b>How to Bid</b></center><br>
  2033. <OL>
  2034.         <LI><a HREF="$config{'scripturl'}?action=agree">Register to bid</a> - It's free, and required to bid or sell.
  2035.         <LI><a HREF="#DESC">Know the Item</a> - Read the full description of the item you are bidding on.
  2036.         <LI>If you have questions about the item<br><a HREF="$config{'scripturl'}?action=askquestion&category=$form{'category'}&item=$form{'item'}&title=$title">(ask or view Q&A)</a> <b>BEFORE</b> you place a bid.
  2037.         <LI>Decide on the quantity you need!
  2038. </OL>
  2039. </td></tr>
  2040. </table>
  2041. </FORM>
  2042. EOF
  2043. ## End Dutch Bid Form
  2044. }
  2045. }
  2046. }
  2047. }
  2048.  
  2049. #-##########################################
  2050. # Allows user to confirm bid
  2051.  
  2052. sub confirmbid {
  2053.  
  2054.         my ($password, @userbids);
  2055.  
  2056.                 $form{'ALIAS'} = lc($form{'ALIAS'});
  2057.                 $form{'ALIAS'} = ucfirst($form{'ALIAS'});
  2058.  
  2059.         if ($config{'regdir'} ne "") {
  2060.         &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, $form{'PHONE'}, $form{'IP'}, $form{'REFERRAL'}, $form{'REFNAME'}, @userbids) = &read_reg_file($form{'ALIAS'});
  2061.        
  2062.         &oops('Your password is incorrect.') unless ((lc $password) eq
  2063. (lc $form{'PASSWORD'}));
  2064.         }
  2065.         &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'});
  2066.         &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/);
  2067.         &oops('You must enter a valid bid amount.') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/);                      
  2068.         &oops('You must enter your full name.') unless ($form{'ADDRESS1'});
  2069.         &oops('You must enter your street address.') unless ($form{'ADDRESS2'});
  2070.         &oops('You must enter you city, state, and zip.') unless ($form{'ADDRESS3'});
  2071.  
  2072. #### Checks suspended Users ###############
  2073. &checksuspendeduser($form{'ALIAS'});
  2074. #### END Checks suspended Users ###############
  2075.  
  2076. #### Clean old bid history from users registration data file ###############
  2077. &delete_sell_bid_history($form{'ALIAS'});
  2078. #### END Clean old bid history from users registration data file ###############
  2079.  
  2080.         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = &read_item_file($form{'CATEGORY'},$form{'ITEM'});
  2081.         &oops('The item number you entered cannot be found.  Maybe it has closed or it was moved since you last loaded the page.') if $title eq '';
  2082.  
  2083.         my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]); # read first bid
  2084.         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]); # read last bid  
  2085.  
  2086. ######## Being called here ############
  2087.         if ($config{'limitbidding'} eq 'on') {
  2088. &limitbidding($form{'CATEGORY'}, $form{'ITEM'}, $form{'ALIAS'}, @userbids);
  2089.         }
  2090.  
  2091. ##### Seller Ban user #######
  2092. my $nobid;
  2093. if (open (NOTO, "$config{'basepath'}$config{'bandir'}/$selleralias.txt")) {
  2094.         my @allnoto=<NOTO>;
  2095.         close NOTO;
  2096.  
  2097.         chomp(@allnoto);
  2098.         foreach $nobid (@allnoto) {
  2099.                 if($form{'ALIAS'} eq $nobid){
  2100.         &oops('<font size=-1 face=verdana><b>  Sorry... that seller does not allow you to bid on their auctions.</b></font> ');
  2101.  
  2102.                 }
  2103.         }      
  2104. }    
  2105.        
  2106. ############# Normal Bidding do not allow a new bid if a the bider already has the high bid #########
  2107.     if ((defined ($form{'std'})) && ($alias eq $form{'ALIAS'}) && ($reserve <= $bid)) {
  2108.         &oops('You already have the high bid you can not bid against yourself. use the proxy bidding if you need to rase the max bid you are willing to pay!');
  2109.         }                  
  2110.     if ((defined ($form{'std'})) && ($alias eq $form{'ALIAS'}) && ($reserve eq '0.00')) {  
  2111.         &oops('You already have the high bid you can not bid against yourself. use the proxy bidding if you need to rase the max bid you are willing to pay!');        
  2112.         }
  2113. ########## End ###############
  2114.  
  2115.          &oops('You cannot bid on your own item!') if ($selleralias eq $form{'ALIAS'});
  2116.        
  2117.          $form{'BID'} = &parsebid($form{'BID'}, $currency);
  2118.  
  2119.         &oops('<H2>Your bid is too low.  Sorry.</H2>') if ($form{'BID'} < ($bid+$inc) and ($#bids)) or ($form{'BID'} < $bid);
  2120.            
  2121.             my $lowest_new_bid;            
  2122.             my $biddisp;
  2123.             $lowest_new_bid = (&read_bid($bids[0]))[2];
  2124.             $lowest_new_bid = &parsebid($bid, $currency);                      
  2125.             $lowest_new_bid = &parsebid($bid + $inc, $currency) if ($#bids);  
  2126.                      
  2127.             my $update_bid = &parsebid($bid);
  2128.             my ($t,$b) = split(/\#/,$time);
  2129.             my $current_max_bid = &parsebid($b);
  2130.  
  2131.              if ((defined ($form{'proxy'})) && ($alias ne $form{'ALIAS'})) {              
  2132.              print <<"EOF";
  2133.         <FORM ACTION=$config{'scripturl'} METHOD=POST>
  2134.         <INPUT TYPE=HIDDEN NAME=action VALUE=procbid>
  2135.         <INPUT TYPE=HIDDEN NAME=ITEM VALUE=$form{'ITEM'}>
  2136.         <INPUT TYPE=HIDDEN NAME=CATEGORY VALUE=$form{'CATEGORY'}>
  2137.         <INPUT TYPE=HIDDEN NAME=ALIAS VALUE=$form{'ALIAS'}>
  2138.         <INPUT TYPE=HIDDEN NAME=PASSWORD VALUE=$form{'PASSWORD'}>
  2139.         <INPUT TYPE=HIDDEN NAME=BID VALUE=$form{'BID'}>  
  2140.         <INPUT TYPE=HIDDEN NAME=\"bidtype\" VALUE=\"proxy\">                    
  2141. EOF
  2142.  
  2143. print "<p><center><h1>Proxy Bid Confirmation</h1></center></p></font>";
  2144. print "<p><font size=3>";
  2145. print "<center><h3>Review bid for title:<font color=blue> $title</font><br>Item Number: <font color=blue>$form{'ITEM'}</font></h3></center></p></font>";
  2146. print "Your bid was in the amount of: <b>$currency$lowest_new_bid </b><BR>\n";
  2147. print "Your maximum bid was in the amount of: <b>$currency$form{'BID'}</b><BR>";
  2148. print "<b>Before finalizing your bid:</b><BR>";
  2149. print "<p><b>1.</b>  View <a HREF=$config{'scripturl'}\?action=viewrate&ALIAS=$selleralias&ITEM=$form{'item'}\>comments</a> left by other users in the Feedback Profile for the seller.</b>
  2150.  <p><b>2.</b> Understand the seller's payment and shipping terms and conditions. Your bid means that you accept them and will comply if you are the winning bidder.
  2151.  <p><b>3.</b> If you have any questions contact the seller before placing a bid.
  2152.  <p><b>4.</b> The proxy bid will bid on your behalf as necessary by increasing your bid by the current bid increment up until your maximum is reached. This saves you the trouble of having to keep track of the auction as it proceeds and prevents you from being outbid at the last minute unless your spending limit is exceeded.<br><b><font color=red> KEEP IN MIND THAT IF YOUR MAXIMUM BID MEETS OR BEATS THE RESERVE PRICE THE MINIMUM BID WILL BE SET TO THAT AMOUNT</font></b>\n";
  2153. print "<p>If your bid amount is correct, click the 'place bid' button below. Otherwise, use the back button on your browser to go back and make the necessary corrections. Once you place your bid, you cannot cancel it.\n";
  2154. print "<br><p><center><input type=submit value=\"===>>  Place Bid  <<===\"></center><br></form>\n";
  2155. }
  2156.        
  2157.              if ((defined ($form{'proxy'})) && ($alias eq $form{'ALIAS'})) {  
  2158.              print <<"EOF";
  2159.         <FORM ACTION=$config{'scripturl'} METHOD=POST>
  2160.         <INPUT TYPE=HIDDEN NAME=action VALUE=procbid>
  2161.         <INPUT TYPE=HIDDEN NAME=ITEM VALUE=$form{'ITEM'}>
  2162.         <INPUT TYPE=HIDDEN NAME=CATEGORY VALUE=$form{'CATEGORY'}>
  2163.         <INPUT TYPE=HIDDEN NAME=ALIAS VALUE=$form{'ALIAS'}>
  2164.         <INPUT TYPE=HIDDEN NAME=PASSWORD VALUE=$form{'PASSWORD'}>
  2165.         <INPUT TYPE=HIDDEN NAME=BID VALUE=$form{'BID'}>  
  2166.         <INPUT TYPE=HIDDEN NAME=\"bidtype\" VALUE=\"proxy\">                    
  2167. EOF
  2168.  
  2169. print "<p><center><h1>Current High Bidder Increase or Decrease Proxy Bid Confirmation</h1></center></p></font>";
  2170. print "<p><font size=3>";
  2171. print "<center><h3>Review bid for title:<font color=blue> $title</font><br>Item Number: <font color=blue>$form{'ITEM'}</font></h3></center></p></font>";
  2172. print "The current bid is in the amount of: <b>$currency$update_bid </b><BR>\n";
  2173. print "Your current maximum bid is: <b>$currency$current_max_bid</b><BR>";
  2174. print "Your increasing or decreasing your maximum bid to the amount of: <b>$currency$form{'BID'}</b><BR>";
  2175. print "<b>Before finalizing your bid:</b><BR>";
  2176. print "<p><b>1.</b>  View <a HREF=$config{'scripturl'}\?action=viewrate&ALIAS=$selleralias&ITEM=$form{'item'}\>comments</a> left by other users in the Feedback Profile for the seller.</b>
  2177.  <p><b>2.</b> Understand the seller's payment and shipping terms and conditions. Your bid means that you accept them and will comply if you are the winning bidder.
  2178.  <p><b>3.</b> If you have any questions contact the seller before placing a bid.
  2179.  <p><b>4.</b> The proxy bid will bid on your behalf as necessary by increasing your bid by the current bid increment up until your maximum is reached. This saves you the trouble of having to keep track of the auction as it proceeds and prevents you from being outbid at the last minute unless your spending limit is exceeded.<br><b><font color=red> KEEP IN MIND THAT IF YOUR MAXIMUM BID MEETS OR BEATS THE RESERVE PRICE THE MINIMUM BID WILL BE SET TO THAT AMOUNT</font></b>\n";
  2180. print "<p>If your bid amount is correct, click the 'place bid' button below. Otherwise, use the back button on your browser to go back and make the necessary corrections. Once you place your bid, you cannot cancel it.\n";
  2181. print "<br><p><center><input type=submit value=\"===>>  Place Bid  <<===\"></center><br></form>\n";
  2182. }
  2183.  
  2184.         if (defined ($form{'std'})) {
  2185.         print <<"EOF";
  2186.         <FORM ACTION=$config{'scripturl'} METHOD=POST>
  2187.         <INPUT TYPE=HIDDEN NAME=action VALUE=procbid>
  2188.         <INPUT TYPE=HIDDEN NAME=ITEM VALUE=$form{'ITEM'}>
  2189.         <INPUT TYPE=HIDDEN NAME=CATEGORY VALUE=$form{'CATEGORY'}>
  2190.         <INPUT TYPE=HIDDEN NAME=ALIAS VALUE=$form{'ALIAS'}>
  2191.         <INPUT TYPE=HIDDEN NAME=PASSWORD VALUE=$form{'PASSWORD'}>
  2192.         <INPUT TYPE=HIDDEN NAME=BID VALUE=$form{'BID'}>
  2193.         <INPUT TYPE=HIDDEN NAME=\"bidtype\" VALUE=\"std\">
  2194. EOF
  2195.  
  2196. print "<p><center><h1>Standard Bid Confirmation</h1></center></p></font>";
  2197. print "<p><font size=3>";
  2198. print "<center><h3>Review bid for title:<font color=blue> $title</font><br>Item Number: <font color=blue>$form{'ITEM'}</font></h3></center></p></font>";
  2199. print "Your bid was in the amount of: <b>$currency$form{'BID'}</b><BR>\n";
  2200. print "<b>Before finalizing your bid:</b><BR>";
  2201. print "<p><b>1.</b>  View <a HREF=$config{'scripturl'}\?action=viewrate&ALIAS=$selleralias&ITEM=$form{'item'}\>comments</a> left by other users in the Feedback Profile for the seller.</b>
  2202.  <p><b>2.</b> Understand the seller's payment and shipping terms and conditions. Your bid means that you accept them and will comply if you are the winning bidder.
  2203.  <p><b>3.</b> If you have any questions contact the seller before placing a bid.\n";
  2204. print "<p>If your bid amount is correct, click the 'place bid' button below. Otherwise, use the back button on your browser to go back and make the necessary corrections. Once you place your bid, you cannot cancel it.\n";
  2205. print "<br><p><center><input type=submit value=\"===>>  Place Bid  <<===\"></center><br></form>\n";
  2206. }
  2207.  
  2208. }
  2209.  
  2210. #-##########################################
  2211. # Allows user to confirm bid
  2212.  
  2213. sub confirmdutchbid {
  2214.  
  2215.         my ($password, @userbids);
  2216.  
  2217.                 $form{'ALIAS'} = lc($form{'ALIAS'});
  2218.                 $form{'ALIAS'} = ucfirst($form{'ALIAS'});
  2219.  
  2220.         if ($config{'regdir'} ne "") {
  2221.         &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, $form{'PHONE'}, $form{'IP'}, $form{'REFERRAL'}, $form{'REFNAME'}, @userbids) = &read_reg_file($form{'ALIAS'});
  2222.        
  2223.         &oops('Your password is incorrect.') unless ((lc $password) eq
  2224. (lc $form{'PASSWORD'}));
  2225.         }
  2226.         &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'});
  2227.         &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/);
  2228.         &oops('You must enter a valid dutch bid amount.') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/);                                        
  2229.         &oops('You must enter your full name.') unless ($form{'ADDRESS1'});
  2230.         &oops('You must enter your street address.') unless ($form{'ADDRESS2'});
  2231.         &oops('You must enter you city, state, and zip.') unless ($form{'ADDRESS3'});
  2232.  
  2233. #### Checks suspended Users ###############
  2234. &checksuspendeduser($form{'ALIAS'});
  2235. #### END Checks suspended Users ###############
  2236.  
  2237. #### Clean old bid history from users registration data file ###############
  2238. &delete_sell_bid_history($form{'ALIAS'});
  2239. #### END Clean old bid history from users registration data file ###############
  2240.  
  2241.         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = &read_item_file($form{'CATEGORY'},$form{'ITEM'});
  2242.         &oops('The item number you entered cannot be found.  Maybe it has closed or it was moved since you last loaded the page.') if $title eq '';
  2243.  
  2244. ######## Being called here ############
  2245.         if ($config{'limitbidding'} eq 'on') {
  2246. &limitbidding($form{'CATEGORY'}, $form{'ITEM'}, $form{'ALIAS'}, @userbids);
  2247.         }
  2248.  
  2249.         my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);
  2250. ################ for bidding on own item. ###
  2251.         &oops('You cannot bid on your own item!') if ($selleralias eq $form{'ALIAS'});
  2252. ##### End ###############################
  2253. ##### Seller Ban user #######
  2254. my $nobid;
  2255. if (open (NOTO, "$config{'basepath'}$config{'bandir'}/$selleralias.txt")) {
  2256.         my @allnoto=<NOTO>;
  2257.         close NOTO;
  2258.  
  2259.         chomp(@allnoto);
  2260.         foreach $nobid (@allnoto) {
  2261.                 if($form{'ALIAS'} eq $nobid){
  2262.         &oops('<font size=-1 face=verdana><b>  Sorry... that seller does not allow you to bid on their auctions.</b></font> ');
  2263.  
  2264.                 }
  2265.         }      
  2266. }
  2267. ############
  2268. #### Dutch Count Quantity ######################
  2269.        if(($form{'OQTY'}) > $qty) {
  2270.        print "<H2>You may not bid on more items than are available!<br> Check quantity available, then check the number of bids.<br> You need to decrease the number of items that you are bidding on!</H2>\n";      
  2271.        }
  2272. ######### End Dutch Count Quantity #############
  2273.         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]);
  2274. #########  Dutch Sold Count #############  
  2275.         oops('<H2>All dutch items are sold! Or you need to decrease<br> the number of items that you are bidding on!</H2>') if (($soldqty+$form{'OQTY'}) > $qty);                    
  2276. ######### End Dutch Sold Count #############
  2277.  
  2278.         $form{'BID'} = &parsebid($form{'BID'}, $currency);
  2279.         oops('<H2>Your bid is too low. Sorry.</H2>') if ($form{'BID'} < ($bid) and ($#bids)) or ($form{'BID'} < $bid);                    
  2280.                                
  2281.             my $lowest_new_bid;
  2282.             $lowest_new_bid = (&read_bid($bids[0]))[2];            
  2283.             $lowest_new_bid = &parsebid($bid, $currency);  
  2284.        
  2285.         print <<"EOF";
  2286.         <FORM ACTION=$config{'scripturl'} METHOD=POST>
  2287.         <INPUT TYPE=HIDDEN NAME=action VALUE=procdutchbid>
  2288.         <INPUT TYPE=HIDDEN NAME=ITEM VALUE=$form{'ITEM'}>
  2289.         <INPUT TYPE=HIDDEN NAME=CATEGORY VALUE=$form{'CATEGORY'}>
  2290.         <INPUT TYPE=HIDDEN NAME=ALIAS VALUE=$form{'ALIAS'}>
  2291.         <INPUT TYPE=HIDDEN NAME=PASSWORD VALUE=$form{'PASSWORD'}>
  2292.         <INPUT TYPE=HIDDEN NAME=OQTY VALUE=$form{'OQTY'}>
  2293.         <INPUT TYPE=HIDDEN NAME=BID VALUE=$form{'BID'}>        
  2294. EOF
  2295.                
  2296.                my $totaldutchprice = &parsebid($form{'OQTY'} * $form{'BID'}, $currency);    
  2297.  
  2298. print "<p><center><h1>Dutch Bid Confirmation</h1></center></p></font>";
  2299. print "<p><font size=3>";
  2300. print "<center><h3>Review bid for title:<font color=blue> $title</font><br>Item Number: <font color=blue>$form{'ITEM'}</font></h3></center></p></font>";
  2301. print "Your bid was in the amount of: <b>$currency$form{'BID'}</b><BR>\n";
  2302. print "The quantity your of order is: <b>$form{'OQTY'}</b><BR>\n";
  2303. print "Total price: <b>$currency$form{'BID'} X $form{'OQTY'} = $currency$totaldutchprice</b><BR>\n";
  2304. print "<p>";
  2305. print "<b>Before finalizing your bid:</b><BR>";
  2306. print "<p><b>1.</b>  View <a HREF=$config{'scripturl'}\?action=viewrate&ALIAS=$selleralias&ITEM=$form{'item'}\>comments</a> left by other users in the Feedback Profile for the seller.</b>
  2307.  <p><b>2.</b> Understand the seller's payment and shipping terms and conditions. Your bid means that you accept them and will comply if you are the winning bidder.
  2308.  <p><b>3.</b> If you have any questions contact the seller before placing a bid.
  2309.  <p><b>4.</b>There is no proxy bidding in a dutch Auction, item price does not change when bidding, When a bid is placed the seller and buyer will be E-Mailed contact information price and quantity of bid, It is up to the buyer and seller to contact each other to make nessary arrangements.\n";
  2310. print "<p>If your bid amount is correct, click the 'place bid' button below. Otherwise, use the back button on your browser to go back and make the necessary corrections. Once you place your bid, you cannot cancel it, and being a dutch item this bid will buy the item.\n";
  2311. print "<br><p><center><input type=submit value=\"===>>  Place Bid  <<===\"></center><br></form>\n";
  2312. }
  2313.  
  2314. #-##################211911452031851209151419###########################
  2315. # Sub: Process Bid
  2316. # This processes new bids from a posted form
  2317.  
  2318. sub procbid {
  2319.         my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  2320.         my ($password, @userbids);
  2321.  
  2322.                 $form{'ALIAS'} = lc($form{'ALIAS'});
  2323.                 $form{'ALIAS'} = ucfirst($form{'ALIAS'});
  2324.  
  2325.         if ($config{'regdir'} ne "") {
  2326.         &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, $form{'PHONE'}, $form{'IP'}, $form{'REFERRAL'}, $form{'REFNAME'}, @userbids) = &read_reg_file($form{'ALIAS'});
  2327.        
  2328.         &oops('Your password is incorrect.') unless ((lc $password) eq
  2329. (lc $form{'PASSWORD'}));
  2330.         }
  2331.         &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'});
  2332.         &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/);
  2333.         &oops('You must enter a valid bid amount.') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/);                    
  2334.         &oops('You must enter your full name.') unless ($form{'ADDRESS1'});
  2335.         &oops('You must enter your street address.') unless ($form{'ADDRESS2'});
  2336.         &oops('You must enter you city, state, and zip.') unless ($form{'ADDRESS3'});
  2337.         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = &read_item_file($form{'CATEGORY'},$form{'ITEM'});
  2338.         &oops('The item number you entered cannot be found.  Maybe it has closed or it was moved since you last loaded the page.') if $title eq '';
  2339.         my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]); # read first bid  
  2340.         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]); # read last bid  
  2341.  
  2342.         ############# BEGIN OF AUTOBIDDER ##################
  2343.         if ((time <= $form{'ITEM'}) or (time <= (60 * $config{'aftermin'} + $time))) {
  2344.                 if(($form{BID} < $bid + $inc && $#bids) || $form{BID} < $bid){
  2345.                         &oops("<br>Your bid is too low. Sorry...<table><tr><td></table><a href=$ENV{SCRIPT_NAME}?category=$form{CATEGORY}&item=$form{ITEM}&refr=$^T><b>Go Back to the Item</b></a><p>");
  2346.                 }
  2347.  
  2348.                 # Uncomment to disallow $0.00 bids, the normal(though wrong) behavior.
  2349.                 #&oops('Your bid cannot be 0.00') if $form{BID} == 0;
  2350.  
  2351.                 my @autobid = &read_bid($bids[-1]);
  2352.                 my $changed = 0;
  2353.                 # Change Option
  2354.                 if($#bids && lc $autobid[0] eq lc $form{ALIAS}){
  2355.                         &oops('Cannot update bidhistory.') unless open DAT, "$config{basepath}$form{CATEGORY}/$form{ITEM}.dat";
  2356.                         my @old = <DAT>;
  2357.                         pop @old; # Delete last bid
  2358.                         chomp $old[-1]; # Crop LF
  2359.                         close(DAT);
  2360.                         &oops('Cannot update bidhistory.') unless open DAT, ">$config{basepath}$form{CATEGORY}/$form{ITEM}.dat";
  2361.                         eval { flock(DAT, 2); } if $config{flock};
  2362.                         print DAT @old;
  2363.                         close(DAT);
  2364.                         ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = read_item_file($form{CATEGORY}, $form{ITEM});
  2365.                         ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty) = read_bid($bids[-1]);
  2366.                         $changed = 1;
  2367.                 }
  2368.                 # Change Option
  2369.  
  2370.                 &oops('Cannot update bidhistory.') unless open NEW, ">>$config{basepath}$form{CATEGORY}/$form{ITEM}.dat";
  2371.                 eval { flock(NEW, 2); } if $config{flock};
  2372.                  
  2373.                 ############ PROXY AND STANDARD BIDDER #############
  2374.                 $form{'OQTY'} = "";
  2375.                 $form{'SOLDQTY'} = "";
  2376.                 $form{'PAID'} = "no";
  2377.                 $form{'PAIDTIME'} = "";
  2378.                 my $mybidder = sub {print NEW "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$_[0]\[\]$_[1]\[\]$form{'ADDRESS1'}\[\]$form{'ADDRESS2'}\[\]$form{'ADDRESS3'}\[\]$form{'OQTY'}\[\]$form{'SOLDQTY'}\[\]$form{'PAID'}\[\]$form{'PAIDTIME'}"};
  2379.  
  2380.                 my $autobidder = sub { my (@this) = @autobid; ($this[2], $this[3]) = ($_[0], $_[1]); print NEW "\n", join("[]", @this)};
  2381.  
  2382.                 ################
  2383.                 ## Now The Bids:
  2384.                 $form{MAXBID} = &parsebid($form{BID});
  2385.                 if ($form{'bidtype'} eq 'proxy'){
  2386.                         $form{BID} = &parsebid($bid);
  2387.                         $form{BID} = &parsebid($bid + $inc) if ($#bids);
  2388.                 }
  2389.                 my $proxy = ($time =~ /\d*\#(\-?\d*\.?\d*)/ ? parsebid($1*1) : -1);
  2390.                 my $message;
  2391.                 #####################################################
  2392.                 ## BID WAS IMMEDIATELY BEATEN SO RETURN WITHOUT EMAIL
  2393.                 if($proxy >= $form{MAXBID} && $#bids >= 0){
  2394.                         $form{BID} = &parsebid($form{MAXBID});
  2395.                         &$mybidder($form{MAXBID}, "$^T#$form{MAXBID}#beaten");
  2396.                         &$autobidder($form{MAXBID}, "$^T#$proxy#");
  2397.                         $message = "Your bid was beaten by a proxy bid.<br><big><b>You are not the high bidder!</b></big>";
  2398.                 }            
  2399.                 ####################################################
  2400.                 ## BID WAS IMMEDIATELY BEATEN BUT SUCCESSFULLY REBID
  2401.                 elsif($proxy >= $form{BID} && $#bids >= 0){ ##(add-on remark: If rebid is necessary the reserve price is allways lower than the high bid because there cannot be a hidden proxybid if reserve is not matched. Proxbids are allways raised to the maximum if reserve price is not matched. So we needn't care about this here.)
  2402.                         &$mybidder($form{BID}, "$^T#$form{MAXBID}#beaten");
  2403.                         &$autobidder($proxy, "$^T#$proxy#beaten");
  2404.                         $form{BID} = &parsebid((($proxy + $inc) > $form{MAXBID}) ? ($form{MAXBID}) : ($proxy + $inc));
  2405.                         &$mybidder($form{BID}, "$^T#$form{MAXBID}#");
  2406.                         $message = "Your bid has been raised to $form{BID} in order to outbid an old proxy bid";
  2407.                         }
  2408.                         else {
  2409.                         ###################################################
  2410.                         ## RAISED TO RESERVE PRICE BUT RESERVE WAS TOO HIGH
  2411.                         if($reserve > $form{MAXBID} && $form{MAXBID} > $form{BID}){
  2412.                                 $form{BID} = &parsebid($form{MAXBID});
  2413.                                 &$mybidder($form{BID}, "$^T#$form{MAXBID}#");
  2414.                                 $message = "Your bid has been raised to \$$form{BID} in order to meet the reserve price.<br>The reserve price is not yet met.";
  2415.                         }
  2416.                         #######################################
  2417.                         ## SUCCESSFULLY RAISED TO RESERVE PRICE                        
  2418.                         elsif($reserve > $form{BID} && $form{MAXBID} > $form{BID}){
  2419.                                 $form{BID} = $reserve;
  2420.                                 &$mybidder($form{BID}, "$^T#$form{MAXBID}#");
  2421.                                 $message = "Your bid has been raised in order to meet the reserve price.<br>The reserve price was \$$reserve.";
  2422.                         }
  2423.                         #####################
  2424.                         ## BID JUST REGULARLY                        
  2425.                         else {
  2426.                         &$mybidder($form{BID}, "$^T#$form{MAXBID}#")
  2427.                         }
  2428.                 }
  2429.                 $message .= "<br>The proxy will automatically bid for you until \$@{[parsebid($form{MAXBID})]}" if ($form{BID} < $form{MAXBID});
  2430.                 $message = "<p><b>Note:</b><br>$message</p>" if $message;
  2431.                 close NEW;
  2432.                                
  2433.                 if(($changed) && ($form{'bidtype'} eq 'proxy')) {
  2434.                         print "<b>$form{ALIAS}, your bid on item number $form{ITEM} is: $currency$form{BID}.<br>your maxbid has been increased to: $currency$form{MAXBID}</b>$message<p>You may want to print this notice as confirmation of your bid.<p>Go <a href=\"$ENV{SCRIPT_NAME}?category=$form{CATEGORY}&item=$form{ITEM}\">back to the item</a></p>";
  2435.                 }
  2436.                 else {
  2437.                         print "$form{ALIAS}, your bid has been placed on item number $form{ITEM} for $currency$form{BID} on $nowtime$message<p>You may want to print this notice as confirmation of your bid.<p>Go <a href=\"$config{'scripturl'}\?category=$form{CATEGORY}&item=$form{ITEM}\">back to the item</a></p>";
  2438.                 }
  2439.                 return if $changed || $proxy >= $form{MAXBID};
  2440.                
  2441.                 my $ends = localtime int $form{ITEM};
  2442.  
  2443.                 sendemail($email, $config{admin_address}, "Outbid Notice", <<EOF) if $config{scripturl} && $#bids;
  2444. *** DO NOT REPLY TO THIS AUTOMATED MESSAGE. ***
  2445.  
  2446. \u$alias, you have been outbid on item #$form{ITEM}!
  2447.  
  2448.    Item Title: $title
  2449.    Current High Bid: $currency$form{BID}
  2450.  
  2451. If you want to place a higher bid, please visit the following URL:
  2452. $config{'scripturl'}\?category=$form{CATEGORY}&item=$form{ITEM}
  2453.  
  2454. Bids may be placed until $ends.
  2455.  
  2456. Thanks for using $config{sitename}
  2457. EOF
  2458.        
  2459.         ############ END PROXY AND STANDARD BIDDER #############
  2460.  
  2461.                 my $flag=0;
  2462.                 my $userbid;
  2463.                 foreach $userbid (@userbids) {
  2464.                         $flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid);
  2465.                 }
  2466.                 if ($flag==0 && $config{'regdir'} ne "") {
  2467.                         &oops('We could not open the registration file.  This could be a server write issue.') unless (open(REGFILE, ">>$config{'regdir'}/$form{'ALIAS'}.dat"));
  2468.                         if ($config{'flock'}) {
  2469.                         flock(REGFILE, 2);
  2470.                         seek(REGFILE, 0, 2);
  2471.                         }
  2472.                         print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}";
  2473.                         close REGFILE;
  2474.                 }
  2475.                 #### Sends the buyer and seller the Dutch Bids                      
  2476.                 my @lastbid = &read_bid($bids[$#bids]); # read last bid  
  2477.                 my @firstbid =  &read_bid($bids[0]); # read first bid  
  2478.                 ###### Add for SUB Cats E-Mail Display ####          
  2479.                 my($key, $disppath, $thispath, @this);
  2480.                 foreach $key (keys %category) {
  2481.                         $disppath = '';
  2482.                         $thispath = $category{$form{'CATEGORY'}};
  2483.                         while($thispath =~ s/^<!--([^\>]*)-->//){
  2484.                                 if($supercat{$1} ne ''){
  2485.                                 $disppath .= "$supercat{$1} -> ";
  2486.                                 }
  2487.                         }
  2488.                 }
  2489.                 ###### END Add for SUB Cats E-Mail Display ####
  2490.  
  2491.                 if (($lastbid[0] ne $firstbid[0]) && ($alias ne $form{'ALIAS'})) {
  2492.                 &sendemail($selleremail, $config{'admin_address'}, 'You Have Another Bid!',
  2493. "Another bid placed on your auction $title!
  2494. Auction number $form{'ITEM'}
  2495. Category: $disppath $thispath
  2496.  
  2497. Seller: $selleralias
  2498. New Bidder: $form{'ALIAS'}
  2499. The current high bid is $currency$form{'BID'}
  2500.  
  2501. If you want to view the bid, please visit:
  2502. $config{'scripturl'}\?category=$form{'CATEGORY'}\&item=$form{'ITEM'}");
  2503.        
  2504.                    &sendemail($form{'EMAIL'}, $config{'admin_address'}, 'Your bid confirmation!', "Bid confirmation on $title!
  2505. Auction number $form{'ITEM'}
  2506. Category: $disppath $thispath
  2507.  
  2508. Seller: $selleralias
  2509. Bidder: $form{'ALIAS'}
  2510. The current high bid is $currency$form{'BID'}
  2511.  
  2512. If you want to View the item, please visit:
  2513. $config{'scripturl'}\?category=$form{'CATEGORY'}\&item=$form{'ITEM'}");
  2514.  
  2515.                 &sendemail($email, $config{'admin_address'}, 'You\'ve been outbid!', "You have been outbid on $title!
  2516. Auction number $form{'ITEM'}
  2517. Category: $disppath $thispath
  2518.  
  2519. Seller: $selleralias
  2520. New Bidder: $form{'ALIAS'}
  2521. The current high bid is $currency$form{'BID'}
  2522.  
  2523. If you want to View the item or place a higher bid, please visit:
  2524. $config{'scripturl'}\?category=$form{'CATEGORY'}\&item=$form{'ITEM'}");
  2525.                 }              
  2526.              if ($lastbid[0] eq $firstbid[0]) {
  2527.                 &sendemail($selleremail, $config{'admin_address'}, 'Bidding has begun!', "You have a bid on $title!
  2528. Auction number $form{'ITEM'}
  2529. Category: $disppath $thispath
  2530.  
  2531. Information:
  2532. Seller: $selleralias
  2533. New Bidder: $form{'ALIAS'}
  2534. The current high bid is $currency$form{'BID'}
  2535.  
  2536. If you want to view the bid, please visit:
  2537. $config{'scripturl'}\?category=$form{'CATEGORY'}\&item=$form{'ITEM'}");
  2538.  
  2539.                    &sendemail($form{'EMAIL'}, $config{'admin_address'}, 'Your bid confirmation!', "Bid confirmation on $title!
  2540. Auction number $form{'ITEM'}
  2541. Category: $disppath $thispath
  2542.  
  2543. Seller: $selleralias
  2544. Bidder: $form{'ALIAS'}
  2545. The current high bid is $currency$form{'BID'}
  2546.  
  2547. If you want to View the item, please visit:
  2548. $config{'scripturl'}\?category=$form{'CATEGORY'}\&item=$form{'ITEM'}");
  2549.                 }
  2550.                 #### End Sends the buyer and seller placed bids and buyers a outbid notis
  2551.          }            
  2552.        
  2553. }
  2554.  
  2555. #-#############################################
  2556. # Sub: Process Dutch bids
  2557.  
  2558. sub procdutchbid {
  2559.         my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  2560.         my ($password, @userbids);
  2561.  
  2562.                 $form{'ALIAS'} = lc($form{'ALIAS'});
  2563.                 $form{'ALIAS'} = ucfirst($form{'ALIAS'});
  2564.  
  2565.         if ($config{'regdir'} ne "") {
  2566.         &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, $form{'PHONE'}, $form{'IP'}, $form{'REFERRAL'}, $form{'REFNAME'}, @userbids) = &read_reg_file($form{'ALIAS'});
  2567.        
  2568.         &oops('Your password is incorrect.') unless ((lc $password) eq
  2569. (lc $form{'PASSWORD'}));
  2570.         }
  2571.         &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'});
  2572.         &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/);
  2573.         &oops('You must enter a valid dutch bid amount.') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/);                                        
  2574.         &oops('You must enter your full name.') unless ($form{'ADDRESS1'});
  2575.         &oops('You must enter your street address.') unless ($form{'ADDRESS2'});
  2576.         &oops('You must enter you city, state, and zip.') unless ($form{'ADDRESS3'});
  2577.         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = &read_item_file($form{'CATEGORY'},$form{'ITEM'});
  2578.         &oops('The item number you entered cannot be found.  Maybe it has closed or it was moved since you last loaded the page.') if $title eq '';
  2579. ######### check for bidding on own item. ###
  2580.         my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);
  2581.         &oops('You cannot bid on your own dutch item!') if ($selleralias eq $form{'ALIAS'});
  2582. ##### End check for bidding on own item. ###############################
  2583. #### Dutch Count quantity ######################
  2584.        if(($form{'OQTY'}) > $qty) {
  2585.        print "<H2>You may not bid on more items than are available!<br> Check quantity available, then check the number of bids.<br> You need to decrease the number of items that you are bidding on!</H2>\n";      
  2586.        }
  2587. ######### End Dutch Count quantity #############          
  2588.         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = &read_bid($bids[$#bids]); # read last bid  
  2589. #########  Dutch Sold Count #############  
  2590.         oops('<H2>All dutch items are sold! Or you need to decrease<br> the number of items that you are bidding on!</H2>') if (($soldqty+$form{'OQTY'}) > $qty);                    
  2591. ######### End Dutch Sold Count #############    
  2592.         $form{'BID'} = &parsebid($form{'BID'}, $currency);
  2593.         oops('<H2>Your bid is too low. Sorry.</H2>') if ($form{'BID'} < ($bid) and ($#bids)) or ($form{'BID'} < $bid);
  2594.  
  2595.         if ((time <= $form{'ITEM'}) or (time <= (60 * $config{'aftermin'} + $time))) {                                  
  2596.         &oops('We are unable to append your bid to the auction item. It appears to be a file write problem.') unless (open NEW, ">>$config{'basepath'}$form{'CATEGORY'}/$form{'ITEM'}.dat");
  2597.                 if ($config{'flock'}) {
  2598.                         flock(NEW, 2);
  2599.                         seek(NEW, 0, 2);
  2600.                 }  
  2601.  
  2602. $form{'SOLDQTY'} = $soldqty+$form{'OQTY'};
  2603. $form{'PAID'} = "no";
  2604.  
  2605.                 print NEW "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$form{'BID'}\[\]".time."\[\]$form{'ADDRESS1'}\[\]$form{'ADDRESS2'}\[\]$form{'ADDRESS3'}\[\]$form{'OQTY'}\[\]$form{'SOLDQTY'}\[\]$form{'PAID'}\[\]$form{'PAIDTIME'}";
  2606.                 close NEW;     
  2607.                 my $flag=0;
  2608.                 my $userbid;
  2609.                 foreach $userbid (@userbids) {
  2610.                         $flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid);
  2611.                 }
  2612.                 if ($flag==0 && $config{'regdir'} ne "") {
  2613.                         &oops('We could not open the registration file.  This could be a server write issue.') unless (open(REGFILE, ">>$config{'regdir'}/$form{'ALIAS'}.dat"));
  2614.                         if ($config{'flock'}) {
  2615.                         flock(REGFILE, 2);
  2616.                         seek(REGFILE, 0, 2);
  2617.                         }
  2618.                         print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}";
  2619.                         close REGFILE;
  2620.                 }  
  2621.                 #### Sends the buyer and seller the Dutch Bids  
  2622.                 #### Sends the buyer and seller the Dutch Bids                      
  2623.                 my @lastbid = &read_bid($bids[$#bids]); # read last bid  
  2624.                 my @firstbid =  &read_bid($bids[0]); # read first bid  
  2625.                 ###### Add for SUB Cats E-Mail Display ####          
  2626.                 my($key, $disppath, $thispath, @this);
  2627.                 foreach $key (keys %category) {
  2628.                         $disppath = '';
  2629.                         $thispath = $category{$form{'CATEGORY'}};
  2630.                         while($thispath =~ s/^<!--([^\>]*)-->//){
  2631.                                 if($supercat{$1} ne ''){
  2632.                                 $disppath .= "$supercat{$1} -> ";
  2633.                                 }
  2634.                         }
  2635.                 }
  2636.                 ###### END Add for SUB Cats E-Mail Display ###  
  2637.  
  2638.                    my $dutchprice = ($lastbid[2]);
  2639.                    my $dutchoqty = ($form{'OQTY'});
  2640.                    my $dutchpricexqty = ($dutchprice * $dutchoqty);
  2641.                                      
  2642.                    my $salestax = &parsebid($dutchpricexqty * $salestax, $currency);
  2643.                    $salestax = &parsebid($salestax / 100, $currency);
  2644.                    $salestax = &parsebid($salestax + 0.00, $currency);
  2645.  
  2646.                    my $totaldutchprice = &parsebid($dutchoqty * $dutchprice + $salestax, $currency);
  2647.  
  2648.         print "<b>$form{'ALIAS'}, your bid has been placed on item number $form{'ITEM'} for the quantity of $form{'OQTY'} at $currency$form{'BID'} for the total price of $currency$totaldutchprice $nowtime</b><BR>You may want to print this notice as confirmation of your bid.<P>Go <a HREF=\"$config{'scripturl'}\?category=$form{'CATEGORY'}\&item=$form{'ITEM'}\">back to the item</a>\n";
  2649.  
  2650. #--Accounting Dutch Sales Item Charge Entry Point---------#
  2651.                
  2652.          if ($config{'percentageclose'} eq "on") {
  2653.               &transaction_percentage_closed($firstbid[0], "Dutch Auction Sale, #$form{'ITEM'} ($title) $dutchpricexqty", $firstbid[2], $totaldutchprice, $reserve);
  2654.          }
  2655. #--End-------------------------------------------------#  
  2656.                                
  2657.                 &sendemail($selleremail, $config{'admin_address'}, 'New Dutch Bid!', "$selleralias
  2658.  
  2659. Dutch Item Title: $title
  2660. Auction number $form{'ITEM'}
  2661. Category: $disppath $thispath
  2662.  
  2663. Information:
  2664. Bidders User ID: $form{'ALIAS'}
  2665. Bidders E-Mail: $form{'EMAIL'}
  2666. DUTCH price each: $currency$form{'BID'}
  2667. Quantity bidded on: $form{'OQTY'}
  2668. Total Sales Tax: $currency$salestax
  2669. Total price: $dutchprice X $form{'OQTY'} + $salestax = $totaldutchprice
  2670.  
  2671. Click the link below to review this auction item:
  2672. $config{'scripturl'}?action=viewcloseddisp&ALIAS=$firstbid[0]&BIDTOVIEW=$form{'CATEGORY'}$form{'ITEM'}
  2673.  
  2674. Click the link below to review, enter feedback, or check the paid statis for all the auction items you sold or won: $config{'scripturl'}?action=closed
  2675.  
  2676. Now What?
  2677. The buyer and seller should contact each other within three business days to complete the sale. Not getting in touch leaves the contract open and can earn you negative feedback.
  2678.  
  2679. We hope you have enjoyed using the $config{'sitename'} and will come back often.");
  2680.                                
  2681.                 &sendemail($form{'EMAIL'}, $config{'admin_address'}, 'Your Dutch Bid!',
  2682. "$form{'ALIAS'}
  2683.  
  2684. Dutch Item Title: $title
  2685. Auction number $form{'ITEM'}
  2686. Category: $disppath $thispath
  2687.  
  2688. Information:
  2689. Seller User ID: $selleralias
  2690. Seller E-mail: $selleremail
  2691. DUTCH price each: $currency$form{'BID'}
  2692. Quantity bidded on: $form{'OQTY'}
  2693. Total Sales Tax: $currency$salestax
  2694. Total price: $dutchprice X $form{'OQTY'} + $salestax = $totaldutchprice
  2695.  
  2696.  
  2697. Click the link below to review this auction item:
  2698. $config{'scripturl'}?action=viewcloseddisp&ALIAS=$lastbid[0]&BIDTOVIEW=$form{'CATEGORY'}$form{'ITEM'}
  2699.  
  2700. Click the link below to review, enter feedback, or check the paid statis for all the auction items you sold or won: $config{'scripturl'}?action=closed
  2701.  
  2702. Now What?
  2703. The buyer and seller should contact each other within three business days to complete the sale. Not getting in touch leaves the contract open and can earn you negative feedback.
  2704.  
  2705. We hope you have enjoyed using the $config{'sitename'} and will come back often.");
  2706.              
  2707.                #### End Sends the buyer and seller the Dutch Bids
  2708.         }              
  2709.                 if (($soldqty+$form{'OQTY'}) eq $qty) {
  2710.                 &earlydutchclose($form{'CATEGORY'},$form{'ITEM'});
  2711.                 }
  2712.                 else {
  2713.                 print "Please notify the site admin that this item cannot be copied to your closed items.\n" unless &copyfile("$config{'basepath'}$form{'CATEGORY'}/$form{'ITEM'}.dat", "$config{'basepath'}$config{'closedir'}/$form{'CATEGORY'}$form{'ITEM'}.dat");
  2714.                 }
  2715.  
  2716. }
  2717.  
  2718. #################################
  2719. # Closes dutch auction early
  2720. # when all dutch items are sold
  2721.  
  2722. sub earlydutchclose {
  2723.  
  2724.                 if ($form{'CATEGORY'} ne $config{'closedir'}) {
  2725.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = &read_item_file($form{'CATEGORY'},$form{'ITEM'});
  2726.                
  2727.                 my @lastbid = &read_bid($bids[$#bids]);
  2728.                 my @firstbid =  &read_bid($bids[0]);  
  2729.                    my $numauct;
  2730.                    $numauct = $form{'ITEM'};
  2731.                    $numauct =~ s/\.dat//;
  2732.                                                        
  2733.                             my $qtyleft;
  2734.                             $qtyleft = $qty - $lastbid[8];                                  
  2735.  
  2736.         &sendemail($firstbid[1], $config{'admin_address'}, "Auction Close: Item #$numauct \($title\)",
  2737. "$firstbid[4]
  2738.  
  2739. Congratulations! This dutch auction has ended early successfully selling all $qty dutch items you listed for auction.
  2740. Item #$numauct \($title\)
  2741. Starting quantity: $qty
  2742. Sold quantity: $lastbid[8]
  2743. Items Left: $qtyleft
  2744. Item Title: $title
  2745.  
  2746. Click the link below to review this auction item:
  2747. $config{'scripturl'}?action=viewcloseddisp&ALIAS=$firstbid[0]&BIDTOVIEW=$form{'CATEGORY'}$form{'ITEM'}
  2748.  
  2749. Click the link below to review, enter feedback, or check the paid statis for all the auction items you sold or won: $config{'scripturl'}?action=closed
  2750.  
  2751. Now What?
  2752. The buyer and seller should have received contact info and with quantity ordered at the time dutch bids were placed to be able to contact each other within three business days to complete the sale. Not getting in touch leaves the contract open and can earn you negative feedback.
  2753.  
  2754. We hope you have enjoyed using the $config{'sitename'} and will come back often!");
  2755.  
  2756.          if ($config{'closedir'}) {
  2757.          umask(000); # UNIX file permission junk
  2758.          mkdir("$config{'basepath'}$config{'closedir'}", 0777) unless (-d "$config{'basepath'}$config{'closedir'}");
  2759.                  print "Please notify the site admin that this item cannot be copied to the closed directory even though it is closed.\n" unless &movefile("$config{'basepath'}$form{'CATEGORY'}/$form{'ITEM'}.dat", "$config{'basepath'}$config{'closedir'}/$form{'CATEGORY'}$form{'ITEM'}.dat");
  2760.                  unlink("$config{'basepath'}$config{'countdir'}/$form{'ITEM'}.dat");
  2761.                  }
  2762.                  else {
  2763.                  print "Please notify the site admin that this item cannot be removed even though it is closed.\n" unless unlink("$config{'basepath'}$form{'CATEGORY'}/$form{'ITEM'}.dat");
  2764.                  }                      
  2765.         }
  2766. }
  2767.  
  2768. #-#############################################
  2769. # Sub New auction posting verify user login 2
  2770. # This logs in a user and verifies they
  2771. # have a Credit Card on file before posting a new auction item
  2772.  
  2773. sub newlogin {
  2774.  
  2775.               my ($loginalias, $loginpassword) = setlogin();
  2776.               $loginalias = ucfirst lc $loginalias;
  2777.               my($password, $undef) = &read_reg_file($loginalias);
  2778.  
  2779.               if(lc $password ne lc $loginpassword || $password eq ''){ $loginalias = $loginpassword = '' }
  2780.  
  2781.      print <<"EOF";
  2782. <FORM ACTION=$config{'scripturl'} METHOD=POST>
  2783. <CENTER><TABLE WIDTH=50% BORDER=0 cellspacing=0 cellpadding=3>
  2784. <INPUT TYPE=HIDDEN NAME=action VALUE=verifynewlogin>
  2785. <TR><TD COLSPAN=2 BGCOLOR=$config{'colortablehead'}><b>Validate Username and Password to post a new auction item.</b></TD></TR>
  2786. <TR><TD BGCOLOR=$config{'colortablebody'}><B>Your Username:</B></TD>
  2787. <TD BGCOLOR=$config{'colortablebody'}><INPUT NAME=ALIAS TYPE=TEXT SIZE=30 MAXLENGTH=30 VALUE=$loginalias></td></tr>
  2788. <TR><TD BGCOLOR=$config{'colortablebody'}><B>Your Password:</B></TD>
  2789. <TD BGCOLOR=$config{'colortablebody'}><INPUT NAME=PASSWORD TYPE=PASSWORD SIZE=30 MAXLENGTH=30 VALUE=$loginpassword></font></TD></TR>
  2790. </TABLE>
  2791. <INPUT TYPE=SUBMIT VALUE="Submit"></form></CENTER>
  2792. EOF
  2793.  
  2794.   }
  2795.  
  2796.  
  2797. ###############################################
  2798. # Sub New auction posting verify user login 2
  2799.  
  2800. sub verifynewlogin {
  2801.  
  2802.                 umask(000);  # UNIX file permission junk
  2803.                 mkdir("$config{'creditcarddir'}", 0777) unless (-d "$config{'creditcarddir'}");    
  2804.                  
  2805.                 $form{'ALIAS'} = lc($form{'ALIAS'});
  2806.                 $form{'ALIAS'} = ucfirst($form{'ALIAS'});      
  2807.  
  2808.         if (($form{'ALIAS'} eq "") || ($form{'PASSWORD'} eq "")) {
  2809.         &oops("Sorry... you must enter a valid username and password.");        
  2810.         }
  2811.  
  2812.         if ($config{'regdir'} ne "") {  
  2813.         &oops('Your alias could not be found!') unless my($password, $email, $add1, $add2, $add3, $phone, $ip, $referral, $refname, @userbids) = &read_reg_file($form{'ALIAS'});
  2814.         &oops('Your password is incorrect.') unless ((lc $password) eq (lc $form{'PASSWORD'}));
  2815.         }            
  2816.        
  2817. #### Checks suspended Users ###############
  2818. &checksuspendeduser($form{'ALIAS'});
  2819. #### END Checks suspended Users ###############
  2820.  
  2821. #### Clean old bid history from users registration data file ###############
  2822. &delete_sell_bid_history($form{'ALIAS'});
  2823. #### END Clean old bid history from users registration data file ###############      
  2824.  
  2825. if ($config{'AccountStatus'} eq "on") {
  2826. &Account_Status($form{'ALIAS'});
  2827. }
  2828. if ($config{'requirecreditcard'} eq "off") {
  2829. &selectnew;
  2830. }
  2831.  
  2832. if ($config{'requirecreditcard'} eq "on") {            
  2833.                 umask(000);  # UNIX file permission junk
  2834.                 mkdir("$config{'creditcarddir'}", 0777) unless (-d "$config{'creditcarddir'}");    
  2835.  
  2836.          open(HTACCESS, ">$config{'creditcarddir'}.htaccess");                
  2837.          print HTACCESS "order deny,allow\ndeny from all" unless (-d "$config{'creditcarddir'}.htaccess");
  2838.          close(HTACCESS);
  2839.    
  2840.     opendir THEDIR, "$config{'creditcarddir'}" || die "Unable to open credit card directory: $!";    
  2841.     my @allfiles = readdir THEDIR;
  2842.     closedir THEDIR;              
  2843.      
  2844.      if (-T "$config{'creditcarddir'}$form{'ALIAS'}.bill") {
  2845.         &selectnew;
  2846.         }        
  2847.         else {      
  2848.         my $ip = $ENV{'REMOTE_ADDR'};                    
  2849. print <<"EOF";
  2850. <FORM ACTION=$config{'scripturl'} METHOD=POST><TABLE WIDTH=100% BORDER=1 BGCOLOR=$config{'colortablebody'}><INPUT TYPE=HIDDEN NAME=action VALUE=proccc>
  2851. <INPUT TYPE=HIDDEN NAME=ALIAS VALUE=$form{'ALIAS'}><TR BGCOLOR=$config{'colortablehead'}><TD COLSPAN=2 VALIGN=TOP><h3>Your credit card info is required for monthly billing. This is only used to cover the posting fees only if any, and this is a must in order to place a auction item up for bid on $config{'sitename'}.</h3><CENTER><b>For your security your IP address is recorded: <font color=green>$ip</font></B></CENTER> <INPUT TYPE=HIDDEN NAME=IPADDRESS value=$ip></TD></TR><TR><TD VALIGN=TOP>Card Type:</TD><TD><SELECT NAME=CARDTYPE></OPTION><OPTION NAME=CARDTYPE>MasterCard</OPTION><OPTION NAME=CARDTYPE>Visa</OPTION><OPTION NAME=CARDTYPE>Discover</OPTION><OPTION NAME=CARDTYPE>Amex</OPTION></SELECT></TD></TR><TR><TD VALIGN=TOP>Expires \(Month\):
  2852. </TD><TD><SELECT NAME=EXPMONTH></OPTION><OPTION NAME=EXPMONTH>Jan</OPTION><OPTION NAME=EXPMONTH>Feb</OPTION><OPTION NAME=EXPMONTH>Mar</OPTION><OPTION NAME=EXPMONTH>Apr</OPTION><OPTION NAME=EXPMONTH>May</OPTION><OPTION NAME=EXPMONTH>Jun</OPTION><OPTION NAME=EXPMONTH>Jul</OPTION><OPTION NAME=EXPMONTH>Aug</OPTION><OPTION NAME=EXPMONTH>Sep</OPTION><OPTION NAME=EXPMONTH>Oct</OPTION><OPTION NAME=EXPMONTH>Nov</OPTION><OPTION NAME=EXPMONTH>Dec</OPTION></SELECT></TD></TR><TR><TD VALIGN=TOP>Expires \(Year\):</TD>
  2853. <TD><SELECT NAME=EXPYEAR></OPTION><OPTION NAME=EXPYEAR>2010</OPTION><OPTION NAME=EXPYEAR>2011</OPTION><OPTION NAME=EXPYEAR>2012</OPTION><OPTION NAME=EXPYEAR>2013</OPTION><OPTION NAME=EXPYEAR>2014</OPTION><OPTION NAME=EXPYEAR>2015</OPTION><OPTION NAME=EXPYEAR>2016</OPTION><OPTION NAME=EXPYEAR>2017</OPTION><OPTION NAME=EXPYEAR>2018</OPTION><OPTION NAME=EXPYEAR>2019</OPTION><OPTION NAME=EXPYEAR>2020</OPTION></SELECT></TD></TR>
  2854. <TR><TD VALIGN=TOP>Card Number:</TD><TD><INPUT TYPE=TEXT SIZE=16 MAXLENGTH=16 NAME=CARDNUM></TD></TR>
  2855. <TD VALIGN=TOP>Card Security Number:<br>This is the 3 digit number on back of the card</TD><TD><INPUT TYPE=TEXT SIZE=16 MAXLENGTH=16 NAME=SECURITYNUM></TD></TR>
  2856. <TR><TD VALIGN=TOP>Full Name used on card:</TD><TD VALIGN=TOP><INPUT NAME=NAME TYPE=TEXT SIZE=20></TD></TR><TR><TD VALIGN=TOP>Address used on card:</TD><TD VALIGN=TOP><INPUT NAME=ADDRESS TYPE=TEXT SIZE=20></TD></TR><TR><TD VALIGN=TOP>City used on card:
  2857. </TD><TD VALIGN=TOP><INPUT NAME=CITY TYPE=TEXT SIZE=20></TD></TR>
  2858. <TR><TD VALIGN=TOP>State used on card:</TD><TD VALIGN=TOP><INPUT NAME=STATE TYPE=TEXT SIZE=20></TD></TR><TR><TD VALIGN=TOP>Zip Code used on card:</TD><TD VALIGN=TOP><INPUT NAME=ZIP TYPE=TEXT SIZE=10><TR><TD VALIGN=TOP>Your area code and phone number:</TD><TD VALIGN=TOP><INPUT NAME=PHONE TYPE=TEXT SIZE=12></TD></TR></TD></TR>
  2859. </TABLE><BR><CENTER><INPUT TYPE=SUBMIT VALUE="Process my Credit Card"></CENTER>
  2860. </form>
  2861. EOF
  2862.     }
  2863.   }
  2864. }
  2865.  
  2866. #-#############################################
  2867. # Sub Process new credit card
  2868. # This will process the users Credit Card for monthly Billing
  2869.  
  2870. sub proccc {
  2871.  
  2872.             &oops('You must enter the card type.') unless ($form{'CARDTYPE'});
  2873.             &oops('You must enter the card expire month.') unless ($form{'EXPMONTH'});
  2874.             &oops('You must enter the card expire year.') unless ($form{'EXPYEAR'});
  2875.             &oops('You must enter the card number.') unless ($form{'CARDNUM'});
  2876.             &oops('You must enter your fill name on card.') unless ($form{'NAME'});
  2877.             &oops('You must enter your address on card.') unless ($form{'ADDRESS'});    
  2878.             &oops('You must enter you city and state on card.') unless ($form{'CITY'});    
  2879.             &oops('You must enter your zip code on card.') unless ($form{'ZIP'});    
  2880.             &oops('You must enter your home phone number.') unless ($form{'PHONE'});    
  2881.  
  2882.             &oops('We were unable to write to the user credit card info.') unless (open NEWCC, ">$config{'creditcarddir'}$form{'ALIAS'}.bill");
  2883.                         print NEWCC "$form{'CARDNUM'}\n$form{'SECURITYNUM'}\n$form{'EXPMONTH'}\n$form{'EXPYEAR'}\n$form{'CARDTYPE'}\n$form{'PHONE'}\n$form{'LINESPACE'}\n$form{'IPADDRESS'}\n$form{'NAME'}\n$form{'ADDRESS'}\n$form{'CITY'}\n$form{'STATE'}\n$form{'ZIP'}";
  2884.                          close NEWCC;
  2885.  
  2886. print <<"EOF";
  2887. <center>
  2888. <FORM ACTION=$config{'scripturl'} METHOD=POST>
  2889. <INPUT TYPE=HIDDEN NAME=action VALUE=selectnew>
  2890. <INPUT TYPE=SUBMIT VALUE="Credit card verified click here to continue">
  2891. </FORM>
  2892. </center>
  2893. EOF
  2894.  
  2895. }
  2896.  
  2897. #-#############################################
  2898. # Sub: This allows a user to select the image type
  2899. # to be place with a new item to be put up for sale
  2900.  
  2901. sub selectnew {
  2902.  
  2903. $config{'uploadimagefee1'} = "FREE"  if ($config{'uploadimagefee1'} eq "0.00");
  2904. $config{'uploadimagefee2'} = "FREE"  if ($config{'uploadimagefee2'} eq "0.00");
  2905. $config{'uploadimagefee3'} = "FREE"  if ($config{'uploadimagefee3'} eq "0.00");
  2906. $config{'uploadimagefee4'} = "FREE"  if ($config{'uploadimagefee4'} eq "0.00");
  2907.  
  2908. if ($config{'allowimageuploads'} eq 'yes') {
  2909. print <<"EOF";
  2910. <p>
  2911. <center><table bgcolor=$config{'colortablebody'} border=1 COLS=1 width="75%">
  2912. <tr><td><blockquote><center><b><font color="#9900CC"><font face=Arial Black size=+2>Option 1</font></font></b></center><b><font face=Arial Black size=+1><font color="#9900CC">Post a new auction listing and </font>UPLOAD a gif or jpg image \($config{'limit'}k MAX SIZE\) so your buyers may SEE what you are offering for sale.</font></b><p><b><font color="#9900CC">With this option you have to upload a gif or jpg image picture before you can proceed to the post an auction item form. The image picture has to be somewhere on the hard drive of the computer you are using now!<br>The image upload/hosing fees are as follows:<br>Image 1 = $config{'currencytype'}$config{'uploadimagefee1'}<br>Image 2 = $config{'currencytype'}$config{'uploadimagefee2'}<br>Image 3 = $config{'currencytype'}$config{'uploadimagefee3'}<br>Image 4 = $config{'currencytype'}$config{'uploadimagefee4'}<br>Image 5 = $config{'currencytype'}$config{'uploadimagefee5'}<br>Image 6 = $config{'currencytype'}$config{'uploadimagefee6'}<br>Image 7 = $config{'currencytype'}$config{'uploadimagefee7'}<br>Image 8 = $config{'currencytype'}$config{'uploadimagefee8'}</font></b></blockquote>
  2913.     <center><FORM ACTION=$config{'yourphotourl'} METHOD=POST>    
  2914.     <input TYPE=SUBMIT VALUE="Post a new auction Option 1"></form></center>
  2915. </td></tr>
  2916.  
  2917. <tr><td><blockquote><center><b><font color="#9900CC"><font face=Arial Black size=+2>Option              2</font></font></b></center><b><font color="#9900CC"><font face=Arial Black size=+1>Post a new auction listing without the auction items image picture being on the computer you are using now by entering a PICTURE's URL location from another Internet Server somewhere                on the Internet on the next posting screen, or post an auction WITHOUT A               PICTURE at all.</font></font></b><b><font color="#9900CC"></font></b>
  2918. <p><b><font color="#9900CC">You may specify a URL with a picture already web               assessable (already on an internet server) on the next page to do this. Leave the image URL box on the next page BLANK for NO AUCTION PICTURE at all for this auction.</font></b></blockquote>
  2919.      <center><FORM ACTION=$config{'scripturl'} METHOD=POST>
  2920.      <input TYPE=hidden NAME=action VALUE=new>
  2921.      <input TYPE=SUBMIT VALUE="Post a new auction Option 2"></form></center>
  2922. </td></tr></table></center>
  2923. </p>
  2924.  
  2925. EOF
  2926.        }
  2927.        else {
  2928.        &new;
  2929.        }
  2930.  
  2931. }
  2932.  
  2933. #-######################################
  2934. # Sub: Add New Item
  2935. # This allows a new item to be put up for sale
  2936.  
  2937. sub new {
  2938.  
  2939.               my ($loginalias, $loginpassword) = setlogin();
  2940.               $loginalias = ucfirst lc $loginalias;
  2941.               my($password, $undef) = &read_reg_file($loginalias);
  2942.               if(lc $password ne lc $loginpassword || $password eq '') {
  2943.                  $loginalias = '';
  2944.                  $loginpassword = '';
  2945.               }
  2946.                    
  2947.         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  2948.              my $startbid1 = "0.00";
  2949.              my $reserve1 = "0.00";
  2950.              my $inc1 = "1.00";
  2951.              my $buyit1 = "0.00";
  2952.              my $startbid2 = "0";
  2953.              my $reserve2 = "0";
  2954.              my $inc2 = "1";
  2955.              my $buyit2 = "0";
  2956.         if ($form{'REPOST'}) {
  2957.                 $form{'REPOST'} =~ s/\W//g;
  2958.                 if (-T "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat") {
  2959.                 open THEFILE, "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat";              
  2960.                         ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <THEFILE>;
  2961.                         close THEFILE;
  2962.                         chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  2963.                         my ($selleralias, $selleremail, $bid, $time, $selleradd1, $selleradd2, $selleradd3, $oqty, $soldqty) = &read_bid($bids[0]); # read first bid
  2964.                              $startbid1 = $bid;
  2965.                              $reserve1 = $reserve;
  2966.                              $inc1 = $inc;
  2967.                              $buyit1 = $buyit;
  2968.                              $startbid2 = $bid;
  2969.                              $reserve2 = $reserve;
  2970.                              $inc2 = $inc;
  2971.                              $buyit2 = $buyit;                    
  2972.                         $title =~ s/\"//g;  # quotes cause problems for a text input field
  2973.                 }
  2974.         }
  2975.         if ($form{'DUTCHREPOST'}) {
  2976.                 $form{'DUTCHREPOST'} =~ s/\W//g;
  2977.                 if (-T "$config{'basepath'}$config{'closedir'}/$form{'DUTCHREPOST'}.dat") {
  2978.                 open THEFILE, "$config{'basepath'}$config{'closedir'}/$form{'DUTCHREPOST'}.dat";              
  2979.                         ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <THEFILE>;
  2980.                         close THEFILE;
  2981.                         chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  2982.                         my ($selleralias, $selleremail, $bid, $time, $selleradd1, $selleradd2, $selleradd3, $oqty, $soldqty) = &read_bid($bids[0]); # read first bid
  2983.                              $startbid1 = $bid;
  2984.                              $reserve1 = $reserve;
  2985.                              $inc1 = $inc;
  2986.                              $buyit1 = $buyit;
  2987.                              $startbid2 = $bid;
  2988.                              $reserve2 = $reserve;
  2989.                              $inc2 = $inc;
  2990.                              $buyit2 = $buyit;                    
  2991.                         $title =~ s/\"//g;  # quotes cause problems for a text input field
  2992.                 }
  2993.         }
  2994.         if ($form{'SOLDREPOST'}) {
  2995.                 $form{'SOLDREPOST'} =~ s/\W//g;
  2996.                 if (-T "$config{'basepath'}$config{'closedir'}/$form{'SOLDREPOST'}.dat") {
  2997.                 open THEFILE, "$config{'basepath'}$config{'closedir'}/$form{'SOLDREPOST'}.dat";              
  2998.                         ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <THEFILE>;
  2999.                         close THEFILE;
  3000.                         chomp($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  3001.                         my ($selleralias, $selleremail, $bid, $time, $selleradd1, $selleradd2, $selleradd3, $oqty, $soldqty) = &read_bid($bids[0]); # read first bid
  3002.                              $startbid1 = $bid;
  3003.                              $reserve1 = $reserve;
  3004.                              $inc1 = $inc;
  3005.                              $buyit1 = $buyit;
  3006.                              $startbid2 = $bid;
  3007.                              $reserve2 = $reserve;
  3008.                              $inc2 = $inc;
  3009.                              $buyit2 = $buyit;                    
  3010.                         $title =~ s/\"//g;  # quotes cause problems for a text input field
  3011.                 }
  3012.         }
  3013.  
  3014. $config{'listingfee'} = "FREE"  if ($config{'listingfee'} eq "0.00");
  3015. $config{'feat_green_fee'} = "FREE"  if ($config{'feat_green_fee'} eq "0.00");
  3016. $config{'feat_bold_fee'} = "FREE"  if ($config{'feat_bold_fee'} eq "0.00");
  3017. $config{'grabberfee'} = "FREE"  if ($config{'grabberfee'} eq "0.00");
  3018. $config{'galleryfee'} = "FREE"  if ($config{'galleryfee'} eq "0.00");
  3019. $config{'counterfee'} = "FREE"  if ($config{'counterfee'} eq "0.00");
  3020. $config{'musicfee'} = "FREE"  if ($config{'musicfee'} eq "0.00");
  3021. $config{'uploadimagefee1'} = "FREE"  if ($config{'uploadimagefee1'} eq "0.00");
  3022. $config{'uploadimagefee2'} = "FREE"  if ($config{'uploadimagefee2'} eq "0.00");
  3023. $config{'uploadimagefee3'} = "FREE"  if ($config{'uploadimagefee3'} eq "0.00");
  3024. $config{'uploadimagefee4'} = "FREE"  if ($config{'uploadimagefee4'} eq "0.00");
  3025. $config{'uploadimagefee5'} = "FREE"  if ($config{'uploadimagefee5'} eq "0.00");
  3026. $config{'uploadimagefee6'} = "FREE"  if ($config{'uploadimagefee6'} eq "0.00");
  3027. $config{'uploadimagefee7'} = "FREE"  if ($config{'uploadimagefee7'} eq "0.00");
  3028. $config{'uploadimagefee8'} = "FREE"  if ($config{'uploadimagefee8'} eq "0.00");
  3029.  
  3030.         print <<"EOF";
  3031. <p></p>
  3032. EOF
  3033.  
  3034. if ($config{'postpercentage'} eq 'on') {
  3035.         print <<"EOF";
  3036. <table align="center" border=1 width="75%" bgcolor="#ffffff">
  3037. <tr>
  3038. <td width="46%">Posting percentage commissions based of the starting bid.</td>
  3039. <td align=center width="54%">0.00 to 150.99 = 2.0%<br>151.00 to 250.99 = 1.80%<br>251.00 to 500.99 = 1.5%<br>501.00 to 999999.99 = 1.3%</td>
  3040. </tr>
  3041. </table>
  3042. EOF
  3043. }
  3044.  
  3045. if ($config{'percentageclose'} eq 'on') {
  3046.         print <<"EOF";
  3047. <table align="center" border=1 width="75%" bgcolor="#ffffff">
  3048. <tr>
  3049. <td width="46%">Closing percentage commissions based of the winning bid. no commission if not sold!</td>
  3050. <td align=center width="54%">0.00 to 150.99 = 2.0%<br>151.00 to 250.99 = 1.80%<br>251.00 to 500.99 = 1.5%<br>501.00 to 999999.99 = 1.3%</td>
  3051. </tr>
  3052. </table>
  3053. EOF
  3054. }
  3055.  
  3056.         print <<"EOF";
  3057. <SCRIPT LANGUAGE="JavaScript">
  3058. <!--
  3059. function openWin(URL) {aWindow=window.open(URL,"thewindow","resizable=yes,width=760,height=420,left=10,top=10,toolbar=yes,status=yes,scrollbars=yes,menubar=yes,location=yes,titlebar=yes");}
  3060. //-->
  3061. </SCRIPT>
  3062. EOF
  3063.  
  3064.         print <<"EOF";
  3065. <table align="center" border=1 width="75%" bgcolor="#000000">
  3066. <tr>
  3067. <td width="46%">Auction Insertion Fee</td>
  3068. <td align=center width="54%">$config{'listingfee'}</td>
  3069. </tr>
  3070. </table>
  3071. EOF
  3072.        
  3073.         print <<"EOF";
  3074. <p>
  3075. <FORM ACTION=$config{'scripturl'} METHOD=POST>
  3076. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3077. <INPUT TYPE=HIDDEN NAME=REPOST VALUE=$form{'REPOST'}>
  3078. <INPUT TYPE=HIDDEN NAME=action VALUE=procnew>
  3079. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><H2>Post A New Item</H2></TH></tr>
  3080.  
  3081. <tr><td Valign=TOP><b>Title/Item Name:<BR></b>No HTML</td><td><INPUT NAME=TITLE VALUE=\"$title\" TYPE=TEXT size=55 MAXLENGTH=55></td></tr>
  3082.  
  3083. <tr><td Valign=TOP><b>Category:<BR></b>Select One</td><td><SELECT NAME=CATEGORY>
  3084. <OPTION SELECTED>========   Select A Category   ========</OPTION>
  3085. EOF
  3086.  
  3087.        my($key, $disppath, $thispath, @this);
  3088.         foreach $key (keys %category) {
  3089.                 $disppath = '';
  3090.                 $thispath = $category{$key};
  3091.                 while($thispath =~ s/^<!--([^\>]*)-->//){
  3092.                         if($supercat{$1} ne ''){
  3093.                         $disppath .= "$supercat{$1} -> ";
  3094.                         }
  3095.                 }
  3096.                 push(@this, ["$disppath$thispath", $disppath, "<OPTION VALUE=\"$key\">$disppath$thispath</OPTION>\n"]);
  3097.         }
  3098.         foreach $key (sort {lc $a->[0] cmp lc $b->[0]} @this){
  3099.                 if($key->[1] ne $thispath){
  3100.                         $thispath=$key->[1];
  3101.                         print "<option></option>\n"; # Insert a blank line between Cats
  3102.                 }
  3103.                 print $key->[2];
  3104.         }    
  3105.  
  3106. print <<"EOF";  
  3107. </SELECT></td></tr>
  3108.  
  3109. <tr><td Valign=TOP><b>Image URL:<BR></b>Optional, should be no larger than 200x200<br> Example:<br>http://www.your.com/images/myimage.gif</td>
  3110. <td>
  3111. Image 1<INPUT NAME=IMAGE1 VALUE=\"$image1\" TYPE=TEXT size=55><br>
  3112. Image 2<INPUT NAME=IMAGE2 VALUE=\"$image2\" TYPE=TEXT size=55><br>
  3113. Image 3<INPUT NAME=IMAGE3 VALUE=\"$image3\" TYPE=TEXT size=55><br>
  3114. Image 4<INPUT NAME=IMAGE4 VALUE=\"$image4\" TYPE=TEXT size=55><br>
  3115. Image 5<INPUT NAME=IMAGE5 VALUE=\"$image5\" TYPE=TEXT size=55><br>
  3116. Image 6<INPUT NAME=IMAGE6 VALUE=\"$image6\" TYPE=TEXT size=55><br>
  3117. Image 7<INPUT NAME=IMAGE7 VALUE=\"$image7\" TYPE=TEXT size=55><br>
  3118. Image 8<INPUT NAME=IMAGE8 VALUE=\"$image8\" TYPE=TEXT size=55>
  3119. </td>
  3120. </tr>
  3121.  
  3122. <tr><td Valign=TOP><b>Days Until Close:<BR></b>1-$config{'listingdays'}</td><td><INPUT NAME=DAYS TYPE=TEXT size=2 MAXLENGTH=2 VALUE=$config{'listingdays'}></td></tr>
  3123. <tr>
  3124.   <td Valign=TOP><b>Auto Relist:</b><br>
  3125.     Optional, this will allow you to relist your item up to 2 times if not sold equal to the same running days as you entered above.
  3126.   </td>
  3127.   <td><b>Number of times to relist item:</b><br>
  3128. <INPUT NAME=RELIST TYPE=Radio VALUE="0" checked>None<br>
  3129. <INPUT NAME=RELIST TYPE=Radio VALUE="1">1<br>
  3130. <INPUT NAME=RELIST TYPE=Radio VALUE="2">2<br>
  3131. </td></tr>
  3132.  
  3133. <tr><td Valign=TOP><b>Description Title Color :<BR></b>This is the font color you would like the description title to be.</td>
  3134. <td><INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#000000>" checked><font color=000000>Black</font><br>
  3135. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#0000FF>"><font color=0000FF>Blue</font><br>
  3136. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#EE0000>"><font color=EE0000>Red</font><br>
  3137. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#00AA00>"><font color=00AA00>Green</font><br>
  3138. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#FF9900>"><font color=FF9900>Orange</font><br>
  3139. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#663300>"><font color=663300>Brown</font><br></td>
  3140. </tr>
  3141.  
  3142. <tr><td Valign=TOP><b>Description Title Size :<BR></b>This is the font size you would like the description title to be.</td>
  3143. <td><INPUT NAME=DESCTITSIZE TYPE=Radio VALUE="<font size=4>" checked><font size=4>4</font><br>
  3144. <INPUT NAME=DESCTITSIZE TYPE=Radio VALUE="<font size=5>"><font size=5>5</font><br>
  3145. <INPUT NAME=DESCTITSIZE TYPE=Radio VALUE="<font size=6>"><font size=6>6</font><br>
  3146. <INPUT NAME=DESCTITSIZE TYPE=Radio VALUE="<font size=7>"><font size=7>7</font><br></td>
  3147. </tr>
  3148.  
  3149. <tr><td Valign=TOP><b>Description Title:<BR></b>This is the description title of your item.</td><td><TEXTAREA NAME=DESCTIT ROWS=5 COLS=55 WRAP=vertical>$desctit</TEXTAREA></td></tr>
  3150.  
  3151. <tr><td Valign=TOP><b>Description Color :<BR></b>This is the font color you would like the description to be.</td>
  3152. <td><INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#000000>" checked><font color=000000>Black</font><br>
  3153. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#0000FF>"><font color=0000FF>Blue</font><br>
  3154. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#EE0000>"><font color=EE0000>Red</font><br>
  3155. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#00AA00>"><font color=00AA00>Green</font><br>
  3156. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#FF9900>"><font color=FF9900>Orange</font><br>
  3157. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#663300>"><font color=663300>Brown</font><br></td>
  3158. </tr>
  3159.  
  3160. <tr><td Valign=TOP><b>Description Size :<BR></b>This is the font size you would like the description to be.</td>
  3161. <td><INPUT NAME=DESCSIZE TYPE=Radio VALUE="<font size=4>" checked><font size=4>4</font><br>
  3162. <INPUT NAME=DESCSIZE TYPE=Radio VALUE="<font size=5>"><font size=5>5</font><br>
  3163. <INPUT NAME=DESCSIZE TYPE=Radio VALUE="<font size=6>"><font size=6>6</font><br></td>
  3164. </tr>
  3165.  
  3166. <tr><td Valign=TOP><b>Description:<BR></b>The description may be text or HTML. The description should include all information the buyer should know.
  3167. <br><p><b>NOTE: The description my not include FORM, SCRIPT, OBJECT, EMBED, APPLET, and INPUT tags will they will be removed.<b></td><td><TEXTAREA NAME=DESC ROWS=5 COLS=55 WRAP=vertical>$desc</TEXTAREA></td></tr>
  3168. <tr><td Valign=TOP><b>Condition:</b><br>Select the condition of the item(s) your auctioning.
  3169. </td>
  3170. <td><b>Select One</b><BR>
  3171. <INPUT NAME=CONDITION TYPE=Radio VALUE="See Item Description" checked>See Item Description<br>
  3172. <INPUT NAME=CONDITION TYPE=Radio VALUE="New">New<br>
  3173. <INPUT NAME=CONDITION TYPE=Radio VALUE="Great">Great<br>
  3174. <INPUT NAME=CONDITION TYPE=Radio VALUE="Good">Good<br>
  3175. <INPUT NAME=CONDITION TYPE=Radio VALUE="Fair">Fair<br>
  3176. <INPUT NAME=CONDITION TYPE=Radio VALUE="Repairable">Repairable<br>
  3177. <INPUT NAME=CONDITION TYPE=Radio VALUE="ASIS">ASIS<br>
  3178. <INPUT NAME=CONDITION TYPE=Radio VALUE="N/A">N/A<br>
  3179. </td></tr>
  3180. </table>
  3181.  
  3182. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3183. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2>Payment Arrangements</b></font></TH></tr>
  3184. <tr><td Valign=TOP><b>Use PayPal.com as your automated payment option:<BR></b><br>To allow the winner to pay you using paypal.com<br> then enter your paypal account e-mail address here!<br>Leave blank if you don't want to use paypal or if you don't have a paypal account</td>
  3185. <td>PayPal Account E-mail <INPUT NAME=PAYPALACC TYPE=TEXT size=30 MAXLENGTH=30>
  3186. </td></tr>
  3187. <tr><td Valign=TOP><b>Other Payment Options:<BR></b><br>Select the non automated payments you will accept.</td>
  3188. <td><b>Select One</b><BR>
  3189. <INPUT NAME=PAYMENT TYPE=Radio VALUE="None" checked>None<br>
  3190. <INPUT NAME=PAYMENT TYPE=Radio VALUE="See item description for payment methods accepted.">See item description for payment methods accepted.<br>
  3191. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Master Card">Master Card<br>
  3192. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Visa">Visa<br>
  3193. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Debit Card">Debit Card<br>
  3194. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Money Order">Money Order<br>
  3195. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Personal Check">Personal Check<br>
  3196. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Master Card, Visa">Master Card, Visa<br>
  3197. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Master Card, Visa, Debit Card">Master Card, Visa, Debit Card<br>
  3198. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Master, Visa, Debit Card, Money order, Personal Check">Master, Visa, Debit Card, Money order, Personal Check
  3199. </td></tr>
  3200. </table>
  3201.  
  3202. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3203. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2>Shipping Arrangements</b></font></TH></tr>
  3204. <tr><td Valign=TOP><b>Shipping and Insurance (If any Insurance is offered):</b><br>Who will pay the shipping and insurance cost of this auction item.</td>
  3205. <td><b>Select One</b><BR>
  3206. <INPUT NAME=SHIPPING TYPE=Radio VALUE="See Item Description" checked>See Item Description<br>
  3207. <INPUT NAME=SHIPPING TYPE=Radio VALUE="Buyer Pays">Buyer Pays<br>
  3208. <INPUT NAME=SHIPPING TYPE=Radio VALUE="Seller Pays">Seller Pays<br>
  3209. <INPUT NAME=SHIPPING TYPE=Radio VALUE="Buyer & Seller Splits">Buyer & Seller Splits<br>
  3210. <INPUT NAME=SHIPPING TYPE=Radio VALUE="Pick-Up Only">Pick-Up Only<br>
  3211. <INPUT NAME=SHIPPING TYPE=Radio VALUE="No Shipping Required">No Shipping Required<br>
  3212. </td></tr>
  3213. <tr><td Valign=TOP><b>Shipping Service 1:</b><br>Select the shipping services you will use</td>
  3214. <td><b>Select One</b><BR>
  3215. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="See Item Description" checked>See Item Description<br>
  3216. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="USPS">USPS<br>
  3217. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="UPS">UPS<br>
  3218. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="USPS, UPS">USPS, UPS<br>
  3219. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="Pick-Up Only">Pick-Up Only<br>
  3220. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="No Shipping Required">No Shipping Required<br>
  3221. </td></tr>
  3222. <tr><td Valign=TOP><b>Shipping Cost 1:</b></p>Enter the shipping fee!</td>
  3223. <td>Shipping Fee (ENTER 0.00 for "see item description") <INPUT NAME=SHIPPFEE1 TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00><p><a href=\"javascript:openWin('http://postcalc.usps.gov/');\">USPS Postage Calculator</a>
  3224. <br><a href=\"javascript:openWin('https://wwwapps.ups.com/ctc/request?WBPM_lid=homepage/ct1.html_pnl_ctc');\">UPS Postage Calculator</a></p></td>
  3225. <tr><td Valign=TOP><b>Shipping Service 2:</b><br>Select the shipping services you will use</td>
  3226. <td><b>Select One</b><BR>
  3227. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="No other service offered" checked>No other service offered<br>
  3228. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="See Item Description">See Item Description<br>
  3229. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="Royal Mail Airmail">Royal Mail Airmail<br>
  3230. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="Pick-Up Only">Pick-Up Only<br>
  3231. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="No Shipping Required">No Shipping Required<br>
  3232. </td></tr>
  3233. <tr><td Valign=TOP><b>Shipping Cost 2:<BR></b><br>Enter the shipping fee!</td>
  3234. <td>Shipping Fee (ENTER 0.00 for "see item description") <INPUT NAME=SHIPPFEE2 TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00><p><a href=\"javascript:openWin('http://postcalc.usps.gov/');\">USPS Postage Calculator</a>
  3235. <br><a href=\"javascript:openWin('https://wwwapps.ups.com/ctc/request?WBPM_lid=homepage/ct1.html_pnl_ctc');\">UPS Postage Calculator</a></p></td>
  3236. <tr><td Valign=TOP><b>Multi Item Shipping Fee:<BR></b><br>"This is only used if this is a multi item Dutch auction where you selling more than one of the same items where the bidder selects the quantity they want"</td>
  3237. <td>Enter the shipping fee for each additional item <INPUT NAME=MULTISHIPPING TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00></td>
  3238. <tr><td Valign=TOP><b>Shipping Insurance:<BR></b><br>Enter the shipping insurance fee.</td>
  3239. <td>Shipping Insurance Fee (ENTER 0.00 for "see item description") <INPUT NAME=INSURANCEFEE TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00></td>
  3240. <tr><td Valign=TOP><b>Will Shipp to:</b><br>Select the countries you will ship this item to.
  3241. </td>
  3242. <td><b>Select One</b><BR>
  3243. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="See Item Description" checked>See Item Description<br>
  3244. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="Any where in the world">Any where in the world<br>
  3245. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="US only">US only<br>
  3246. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="UK only">UK only<br>
  3247. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="US and Uk Only">US and UK Only<br>
  3248. </td></tr>
  3249. </table>
  3250.  
  3251. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3252. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2>Sales Tax and Other Special Info</b></font></TH></tr>
  3253. <tr><td Valign=TOP><b>State Sales Tax:<BR></b><br>Enter the State Sales Tax Percentage!</td>
  3254. <td>State Sales Tax Percentage ("IF ANY") Leave or enter 0.00 for no state sales tax, as this will charge all bidders sales tax no matter the State they live in") <INPUT NAME=SALESTAX TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00></td>
  3255. <tr><td Valign=TOP><b>Sales Tax Info:</b><BR>Enter your sales tax instructions (Leave blank for NONE)</td>
  3256. <td><TEXTAREA NAME=SALESINFO ROWS=3 COLS=55 WRAP=vertical></TEXTAREA></td>
  3257. <tr><td Valign=TOP><b>Special Payment Instructions:<BR></b><br>Enter any special payment instructions (Leave blank for NONE)</td>
  3258. <td><TEXTAREA NAME=PAYMENTINST ROWS=3 COLS=55 WRAP=vertical></TEXTAREA></td></tr>
  3259. <tr><td Valign=TOP><b>Return Policy:<BR></b><br>Enter return policy instructions (Leave blank for NONE)</td>
  3260. <td><TEXTAREA NAME=RETURN ROWS=3 COLS=55 WRAP=vertical></TEXTAREA></td></tr>
  3261. </tr>
  3262. </table>
  3263.  
  3264. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3265. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2><b>Sell your auction item with these added options\!</b></font></TH></tr>
  3266. <tr><td COLSPAN=2 Valign=TOP><b><font face=arial size=2>The next items are <font color=red>optional</font>, but will make your auction item stand out among others, and will increase the number of bids. <font color=red>These options do have a small fee, and are charged to your account even if you do not sell your item!</font></b></td></tr>
  3267.  
  3268. <tr><td Valign=TOP><b>Attention Grabbers:<BR></b>Really make your auction stand out from the crowd with these special icons for only  <b>$config{'currencytype'}$config{'grabberfee'}</b></font></td>
  3269. <td><table bgcolor=$config{'colortablebody'} border=2 CELLSPACING=0 CELLPADDING=3 COLS=7 width=\"350\" >
  3270. <INPUT NAME=GRABBER TYPE=Radio VALUE="NONE" checked><b>None</b>
  3271. <br>
  3272. <tr align=center Valign=center>
  3273. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab1"><IMG SRC=$config{'grabber1'}></td>
  3274. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab2"><IMG SRC=$config{'grabber2'}></td>
  3275. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab3"><IMG SRC=$config{'grabber3'}></td>
  3276. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab4"><IMG SRC=$config{'grabber4'}></td>
  3277. </tr>
  3278. <tr align=center Valign=center>
  3279. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab5"><IMG SRC=$config{'grabber5'}></td>
  3280. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab6"><IMG SRC=$config{'grabber6'}></td>
  3281. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab7"><IMG SRC=$config{'grabber7'}></td>
  3282. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab8"><IMG SRC=$config{'grabber8'}></td>
  3283. </tr>
  3284. </table>
  3285. EOF
  3286.  
  3287.  if ($config{'backgroungmusic'} eq "yes") {
  3288.                 print <<"EOF";
  3289. <tr><td Valign=TOP><b>Auction Back Ground Music:<BR></b>Really make your auction stand out from the crowd with back ground music for only  <b>$config{'currencytype'}$config{'musicfee'}</b></font></td>
  3290. <td><table bgcolor=$config{'colortablebody'} border=2 CELLSPACING=0 CELLPADDING=3 COLS=7 width=\"350\" >
  3291. <INPUT NAME=MUSIC TYPE=Radio VALUE="NONE" checked><b>None</b>
  3292. <br>
  3293. <tr align=center Valign=center>
  3294. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music1">$config{'musictitle1'}</td>
  3295. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music2">$config{'musictitle2'}</td>
  3296. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music3">$config{'musictitle3'}</td>
  3297. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music4">$config{'musictitle4'}</td>
  3298. </tr>
  3299. <tr align=center Valign=center>
  3300. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music5">$config{'musictitle5'}</td>
  3301. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music6">$config{'musictitle6'}</td>
  3302. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music7">$config{'musictitle7'}</td>
  3303. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music8">$config{'musictitle8'}</td>
  3304. </tr>
  3305. </table>
  3306. EOF
  3307. }
  3308.  
  3309. print <<"EOF";
  3310. <tr><td Valign=TOP><b>Full Featured Gallery Listed On The Main Home Page (Must Have a image linked or uploaded):<BR></b>cost: <b>$config{'currencytype'}$config{'galleryfee'}</b><br>Will be viewed by anyone entering the auction website.<br></td>
  3311. <td><b>Select One</b><BR>
  3312. <INPUT NAME=GALLERY TYPE=Radio VALUE="No" checked>No<br>
  3313. <INPUT NAME=GALLERY TYPE=Radio VALUE="Yes">Yes
  3314. </td></tr>
  3315.  
  3316. <tr><td Valign=TOP><b>Item title highlighted in $config{'boldbackground'} background for better visibility:<BR></b>cost: <b>$config{'currencytype'}$config{'feat_green_fee'}</b><br>This is a real nice attention grabber.</td>
  3317. <td><b>Select One</b><BR>
  3318. <INPUT NAME=FEAT_YT TYPE=Radio VALUE="NO" checked>No<br>
  3319. <INPUT NAME=FEAT_YT TYPE=Radio VALUE="YES">Yes
  3320. </td></tr>
  3321. <tr><td Valign=TOP><b>Item title in bold for better visibility:<BR></b>cost: <b>$config{'currencytype'}$config{'feat_bold_fee'}</b><br>The famous<b> BOLD TITLE!</b> This is a real nice attention grabber.</td>
  3322. <td><b>Select One</b><BR>
  3323. <INPUT NAME=FEAT_BF TYPE=Radio VALUE="NO" checked>No<br>
  3324. <INPUT NAME=FEAT_BF TYPE=Radio VALUE="YES">Yes
  3325. </td></tr>
  3326. </table>
  3327. EOF
  3328.  
  3329. if ($config{'allowcounter'} eq "yes") {
  3330. print <<"EOF";
  3331. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3332. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2><b><font face=arial size=2>This is <font color=red>optional</font>, Will add a counter to your page to monitor your auction page visits.</font></b></TH></tr>
  3333.  
  3334. <tr><td Valign=TOP><b>Auction Item page view counter:</b><BR>
  3335. Counter Fee: <b>$config{'currencytype'}$config{'counterfee'}</b></font></td>
  3336. <td><INPUT NAME=USECOUNTER TYPE=Radio VALUE="No" checked>No<br>
  3337. <INPUT NAME=USECOUNTER TYPE=Radio VALUE="Yes">Yes</td>
  3338. </tr>
  3339. </table>
  3340. EOF
  3341. }
  3342.  
  3343. if ($config{'allowprivate'} eq "yes") {
  3344. print <<"EOF";
  3345. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3346. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2><b>Private Auction</font></b></td></tr>
  3347. <tr><td Valign=TOP><b>Private Auction:</b><br>With this option you can list your item as a private auction meanning<br>none of the bidders info will be displayed!</td>
  3348. <td><b>Select One</b><BR>
  3349. <INPUT NAME=PRIVATE TYPE=Radio VALUE="no" checked>No<br>
  3350. <INPUT NAME=PRIVATE TYPE=Radio VALUE="yes">Yes
  3351. </td></tr>
  3352. </table>
  3353. EOF
  3354. }
  3355.  
  3356.         if ($config{'dutchauctions'} eq "yes") {
  3357. print <<"EOF";
  3358. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3359. <tr><td COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2><b>Auction Type Standard or Fixed Price Dutch Auction</b></font></td></tr>
  3360. <tr><td Valign=TOP><b>Dutch:<BR></b><br>Select this if you are selling one or more of the same item(s) for a set price.<br><font color="red"><b>This is only for setting a item(s) at the price you set  (no bidding).</b></font></td>
  3361. <td><b>Select One</b><BR>
  3362. <INPUT NAME=DUTCH TYPE=Radio VALUE="no" checked>No<br>
  3363. <INPUT NAME=DUTCH TYPE=Radio VALUE="yes">Yes
  3364. </td></tr>
  3365. <tr><td Valign=TOP>Enter how many item(s) you have if you selected Dutch "yes" above::</td>
  3366. <td>Quantity <INPUT NAME=QTY TYPE=TEXT size=7 MAXLENGTH=6 VALUE=1>
  3367. </td></tr>
  3368. </table>
  3369. EOF
  3370.           }          
  3371.        
  3372. print <<"EOF";
  3373. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3374. <tr><td Valign=TOP><b>Currency type to use for this auction item:</b><br></td>
  3375. <td><b>Currency:</b><br>
  3376. <INPUT NAME=CURRENCY TYPE=Radio VALUE="\$" checked>\$<br>
  3377. <INPUT NAME=CURRENCY TYPE=Radio VALUE="A\$">A\$<br>
  3378. <INPUT NAME=CURRENCY TYPE=Radio VALUE="C">C<br>
  3379. <INPUT NAME=CURRENCY TYPE=Radio VALUE="£">£<br>
  3380. <INPUT NAME=CURRENCY TYPE=Radio VALUE="€">€<br>
  3381. <INPUT NAME=CURRENCY TYPE=Radio VALUE="¥">¥<br>
  3382. </td></tr>
  3383.  
  3384. <tr><td Valign=TOP><b>Your Starting Bid or if Dutch the fixed selling price:</b><br><b>do not include your countries currency sign or ,</b></td><td><INPUT NAME=BID TYPE=TEXT SIZE=9 VALUE=0.00>
  3385. <tr><td Valign=TOP><b>Your Reserve Price:<BR></b>You are not obligated to sell below this price. Leave 0.00 for no reserve.<br><b>do not include your countries currency sign</b><br><font color="red"><b>This has no effect on Dutch Auctions</b></font></td><td><INPUT NAME=RESERVE TYPE=TEXT SIZE=9 VALUE=0.00>
  3386. <tr><td Valign=TOP><b>Bid Increment:</b><br><b>do not include your countries currency sign</b><br><font color="red"><b>This has no effect on Dutch Auctions</b></font></td><td><INPUT NAME=INC TYPE=TEXT SIZE=9 VALUE=1.00></td></tr>
  3387. EOF
  3388.  
  3389. if ($config{'buyitnow'} eq 'yes') {
  3390. print <<"EOF";
  3391. <tr><td Valign=TOP><b>Buy It Price:</b><br><b>With this option a buyer can buy your item until the bidding starts for the price you set here</b><br><font color="red"><b>For No (Buy It) feature leave this 0.00</b><br><b>If DUTCH auction leave this 0.00</b></font></td><td>$currency<INPUT NAME=BUYIT TYPE=TEXT SIZE=9 VALUE=0.00></td></tr>
  3392. EOF
  3393. }
  3394.  
  3395. print <<"EOF";
  3396. <tr><td COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><b>PLEASE NOTE:</b> By placing an item up for bid you are making a <b>CONTRACT</b> between you and the buyer. Once you place an item, you may not retract it and you must sell it for the highest bid. In other words, if you don't want to sell it, don't place it up for bid! <a HREF="$config{'scripturl'}?action=agree"> Registration</a> is required to sell an Item.</td></tr>
  3397. <tr><td Valign=TOP><b>Your Username:<BR></b>Used to track your item</td><td><INPUT NAME=ALIAS TYPE=TEXT size=30 MAXLENGTH=30 VALUE=$loginalias>
  3398. <tr><td Valign=TOP><b>Your Password:<BR></b>Must be valid</td><td><INPUT NAME=PASSWORD TYPE=PASSWORD size=30 MAXLENGTH=30 VALUE=$loginpassword>
  3399. </table>
  3400.  
  3401. <center><h3>Press the Preview Button Below to Continue.</h3>
  3402. <INPUT TYPE=SUBMIT VALUE=Preview><p></center>
  3403. </FORM>
  3404. EOF
  3405.  
  3406. }
  3407.  
  3408. #-#############################################
  3409. # Sub: Add New Item
  3410. # This allows a new item to be put up for sale
  3411.  
  3412. sub new2 {
  3413.  
  3414.               my ($loginalias, $loginpassword) = setlogin();
  3415.               $loginalias = ucfirst lc $loginalias;
  3416.               my($password, $undef) = &read_reg_file($loginalias);
  3417.               if(lc $password ne lc $loginpassword || $password eq '') {
  3418.                  $loginalias = '';
  3419.                  $loginpassword = '';
  3420.               }        
  3421.        
  3422.         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  3423.              $inc = "1.00"; # default increment
  3424.              $title =~ s/\"//g;  # quotes cause problems for a text input field  
  3425.  
  3426. $config{'listingfee'} = "FREE"  if ($config{'listingfee'} eq "0.00");
  3427. $config{'feat_green_fee'} = "FREE"  if ($config{'feat_green_fee'} eq "0.00");
  3428. $config{'feat_bold_fee'} = "FREE"  if ($config{'feat_bold_fee'} eq "0.00");
  3429. $config{'grabberfee'} = "FREE"  if ($config{'grabberfee'} eq "0.00");
  3430. $config{'galleryfee'} = "FREE"  if ($config{'galleryfee'} eq "0.00");
  3431. $config{'counterfee'} = "FREE"  if ($config{'counterfee'} eq "0.00");
  3432. $config{'musicfee'} = "FREE"  if ($config{'musicfee'} eq "0.00");
  3433. $config{'uploadimagefee1'} = "FREE"  if ($config{'uploadimagefee1'} eq "0.00");
  3434. $config{'uploadimagefee2'} = "FREE"  if ($config{'uploadimagefee2'} eq "0.00");
  3435. $config{'uploadimagefee3'} = "FREE"  if ($config{'uploadimagefee3'} eq "0.00");
  3436. $config{'uploadimagefee4'} = "FREE"  if ($config{'uploadimagefee4'} eq "0.00");
  3437. $config{'uploadimagefee5'} = "FREE"  if ($config{'uploadimagefee5'} eq "0.00");
  3438. $config{'uploadimagefee6'} = "FREE"  if ($config{'uploadimagefee6'} eq "0.00");
  3439. $config{'uploadimagefee7'} = "FREE"  if ($config{'uploadimagefee7'} eq "0.00");
  3440. $config{'uploadimagefee8'} = "FREE"  if ($config{'uploadimagefee8'} eq "0.00");
  3441.  
  3442.         print <<"EOF";
  3443. <p></p>
  3444. EOF
  3445.  
  3446. if ($config{'postpercentage'} eq 'on') {
  3447.         print <<"EOF";
  3448. <table align="center" border=1 width="75%" bgcolor="#ffffff">
  3449. <tr>
  3450. <td width="46%">Posting percentage commissions based of the starting bid.</td>
  3451. <td align=center width="54%">0.00 to 150.99 = 2.0%<br>151.00 to 250.99 = 1.80%<br>251.00 to 500.99 = 1.5%<br>501.00 to 999999.99 = 1.3%</td>
  3452. </tr>
  3453. </table>
  3454. EOF
  3455. }
  3456.  
  3457. if ($config{'percentageclose'} eq 'on') {
  3458.         print <<"EOF";
  3459. <table align="center" border=1 width="75%" bgcolor="#ffffff">
  3460. <tr>
  3461. <td width="46%">Closing percentage commissions based of the winning bid. no commission if not sold!</td>
  3462. <td align=center width="54%">0.00 to 150.99 = 2.0%<br>151.00 to 250.99 = 1.80%<br>251.00 to 500.99 = 1.5%<br>501.00 to 999999.99 = 1.3%</td>
  3463. </tr>
  3464. </table>
  3465. EOF
  3466. }
  3467.  
  3468.         print <<"EOF";
  3469. <SCRIPT LANGUAGE="JavaScript">
  3470. <!--
  3471. function openWin(URL) {aWindow=window.open(URL,"thewindow","resizable=yes,width=760,height=420,left=10,top=10,toolbar=yes,status=yes,scrollbars=yes,menubar=yes,location=yes,titlebar=yes");}
  3472. //-->
  3473. </SCRIPT>
  3474. EOF
  3475.  
  3476.         print <<"EOF";
  3477. <table align="center" border=1 width="75%" bgcolor="#ffffff">
  3478. <tr>
  3479. <td width="46%">Auction Insertion Fee</td>
  3480. <td align=center width="54%">$config{'listingfee'}</td>
  3481. </tr>
  3482. </table>
  3483. EOF
  3484.        
  3485.         print <<"EOF";
  3486. <p>        
  3487. <FORM ACTION=$config{'scripturl'} METHOD=POST>
  3488. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3489. <INPUT TYPE=HIDDEN NAME=action VALUE=procnew>
  3490. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><H2>Post A New Item</H2></TH></tr>
  3491.  
  3492. <tr><td Valign=TOP><b>Title/Item Name:<BR></b>No HTML</td><td><INPUT NAME=TITLE TYPE=TEXT size=55 MAXLENGTH=55></td></tr>
  3493.  
  3494. <tr><td Valign=TOP><b>Category:<BR></b>Select One</td><td><SELECT NAME=CATEGORY>
  3495. <OPTION SELECTED>========   Select A Category   ========</OPTION>
  3496. EOF
  3497.        my($key, $disppath, $thispath, @this);
  3498.         foreach $key (keys %category) {
  3499.                 $disppath = '';
  3500.                 $thispath = $category{$key};
  3501.                 while($thispath =~ s/^<!--([^\>]*)-->//){
  3502.                         if($supercat{$1} ne ''){
  3503.                         $disppath .= "$supercat{$1} -> ";
  3504.                         }
  3505.                 }
  3506.                 push(@this, ["$disppath$thispath", $disppath, "<OPTION VALUE=\"$key\">$disppath$thispath</OPTION>\n"]);
  3507.         }
  3508.         foreach $key (sort {lc $a->[0] cmp lc $b->[0]} @this){
  3509.                 if($key->[1] ne $thispath){
  3510.                         $thispath=$key->[1];
  3511.                         print "<option></option>\n"; # Insert a blank line between Cats
  3512.                 }
  3513.                 print $key->[2];
  3514.         }    
  3515.  
  3516. print <<"EOF";  
  3517. </SELECT></td></tr>
  3518.  
  3519. <tr><td Valign=TOP bgcolor=$config{'colortablebody'}><font face=arial size=2><b>Image Uploaded :</b></td>
  3520. <td>
  3521. <INPUT NAME=UPIMAGE1 TYPE=HIDDEN VALUE=\"$form{'UPIMAGE1'}\">
  3522. <INPUT NAME=UPIMAGE2 TYPE=HIDDEN VALUE=\"$form{'UPIMAGE2'}\">
  3523. <INPUT NAME=UPIMAGE3 TYPE=HIDDEN VALUE=\"$form{'UPIMAGE3'}\">
  3524. <INPUT NAME=UPIMAGE4 TYPE=HIDDEN VALUE=\"$form{'UPIMAGE4'}\">
  3525. <INPUT NAME=UPIMAGE5 TYPE=HIDDEN VALUE=\"$form{'UPIMAGE5'}\">
  3526. <INPUT NAME=UPIMAGE6 TYPE=HIDDEN VALUE=\"$form{'UPIMAGE6'}\">
  3527. <INPUT NAME=UPIMAGE7 TYPE=HIDDEN VALUE=\"$form{'UPIMAGE7'}\">
  3528. <INPUT NAME=UPIMAGE8 TYPE=HIDDEN VALUE=\"$form{'UPIMAGE8'}\">
  3529. EOF
  3530. if ($form{'UPIMAGE1'}) {
  3531. print <<"EOF";
  3532. Image 1 Uploaded:<b> YES: $form{'UPIMAGE1'}</b><br>
  3533. EOF
  3534. }
  3535. else {
  3536. print <<"EOF";
  3537. Image 1:<b> NO Image Selected</b><br>
  3538. EOF
  3539. }
  3540. if ($form{'UPIMAGE2'}) {
  3541. print <<"EOF";
  3542. image 2 Uploaded: <b> YES: $form{'UPIMAGE2'}</b><br>
  3543. EOF
  3544. }
  3545. else {
  3546. print <<"EOF";
  3547. Image 2:<b> NO Image Selected</b><br>
  3548. EOF
  3549. }
  3550. if ($form{'UPIMAGE3'}) {
  3551. print <<"EOF";
  3552. image 3 Uploaded: <b> YES: $form{'UPIMAGE3'}</b><br>
  3553. EOF
  3554. }
  3555. else {
  3556. print <<"EOF";
  3557. Image 3:<b> NO Image Selected</b><br>
  3558. EOF
  3559. }
  3560. if ($form{'UPIMAGE4'}) {
  3561. print <<"EOF";
  3562. image 4 Uploaded: <b> YES: $form{'UPIMAGE4'}</b><br>
  3563. EOF
  3564. }
  3565. else {
  3566. print <<"EOF";
  3567. Image 4:<b> NO Image Selected</b><br>
  3568. EOF
  3569. }
  3570. if ($form{'UPIMAGE5'}) {
  3571. print <<"EOF";
  3572. Image 5 Uploaded:<b> YES: $form{'UPIMAGE5'}</b><br>
  3573. EOF
  3574. }
  3575. else {
  3576. print <<"EOF";
  3577. Image 5:<b> NO Image Selected</b><br>
  3578. EOF
  3579. }
  3580. if ($form{'UPIMAGE6'}) {
  3581. print <<"EOF";
  3582. image 6 Uploaded: <b> YES: $form{'UPIMAGE6'}</b><br>
  3583. EOF
  3584. }
  3585. else {
  3586. print <<"EOF";
  3587. Image 6:<b> NO Image Selected</b><br>
  3588. EOF
  3589. }
  3590. if ($form{'UPIMAGE7'}) {
  3591. print <<"EOF";
  3592. image 7 Uploaded: <b> YES: $form{'UPIMAGE7'}</b><br>
  3593. EOF
  3594. }
  3595. else {
  3596. print <<"EOF";
  3597. Image 7:<b> NO Image Selected</b><br>
  3598. EOF
  3599. }
  3600. if ($form{'UPIMAGE8'}) {
  3601. print <<"EOF";
  3602. image 8 Uploaded: <b> YES: $form{'UPIMAGE8'}</b><br>
  3603. EOF
  3604. }
  3605. else {
  3606. print <<"EOF";
  3607. Image 8:<b> NO Image Selected</b><br>
  3608. EOF
  3609. }
  3610. print <<"EOF";
  3611. </td>
  3612. </tr>
  3613.  
  3614. <tr><td Valign=TOP><b>Days Until Close:<BR></b>1-$config{'listingdays'}</td><td><INPUT NAME=DAYS TYPE=TEXT size=2 MAXLENGTH=2 VALUE=$config{'listingdays'}></td></tr>
  3615. <tr>
  3616.   <td Valign=TOP><b>Auto Relist:</b><br>
  3617.     Optional, this will allow you to relist your item up to 2 times if not sold equal to the same running days as you entered above.
  3618.   </td>
  3619.   <td><b>Number of times to relist item:</b><br>
  3620. <INPUT NAME=RELIST TYPE=Radio VALUE="0" checked>None<br>
  3621. <INPUT NAME=RELIST TYPE=Radio VALUE="1">1<br>
  3622. <INPUT NAME=RELIST TYPE=Radio VALUE="2">2<br>
  3623. </td></tr>
  3624.  
  3625. <tr><td Valign=TOP><b>Description Title Color :<BR></b>This is the font color you would like the description title to be.</td>
  3626. <td><INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#000000>" checked><font color=000000>Black</font><br>
  3627. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#0000FF>"><font color=0000FF>Blue</font><br>
  3628. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#EE0000>"><font color=EE0000>Red</font><br>
  3629. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#00AA00>"><font color=00AA00>Green</font><br>
  3630. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#FF9900>"><font color=FF9900>Orange</font><br>
  3631. <INPUT NAME=DESCTITCOLOR TYPE=Radio VALUE="<font color=#663300>"><font color=663300>Brown</font><br></td>
  3632. </tr>
  3633.  
  3634. <tr><td Valign=TOP><b>Description Title Size :<BR></b>This is the font size you would like the description title to be.</td>
  3635. <td><INPUT NAME=DESCTITSIZE TYPE=Radio VALUE="<font size=4>" checked><font size=4>4</font><br>
  3636. <INPUT NAME=DESCTITSIZE TYPE=Radio VALUE="<font size=5>"><font size=5>5</font><br>
  3637. <INPUT NAME=DESCTITSIZE TYPE=Radio VALUE="<font size=6>"><font size=6>6</font><br>
  3638. <INPUT NAME=DESCTITSIZE TYPE=Radio VALUE="<font size=7>"><font size=7>7</font><br></td>
  3639. </tr>
  3640.  
  3641. <tr><td Valign=TOP><b>Description Title:<BR></b>This is the description title of your item.</td><td><TEXTAREA NAME=DESCTIT ROWS=5 COLS=55 WRAP=vertical>$desctit</TEXTAREA></td></tr>
  3642.  
  3643. <tr><td Valign=TOP><b>Description Color :<BR></b>This is the font color you would like the description to be.</td>
  3644. <td><INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#000000>" checked><font color=000000>Black</font><br>
  3645. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#0000FF>"><font color=0000FF>Blue</font><br>
  3646. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#EE0000>"><font color=EE0000>Red</font><br>
  3647. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#00AA00>"><font color=00AA00>Green</font><br>
  3648. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#FF9900>"><font color=FF9900>Orange</font><br>
  3649. <INPUT NAME=DESCCOLOR TYPE=Radio VALUE="<font color=#663300>"><font color=663300>Brown</font><br></td>
  3650. </tr>
  3651.  
  3652. <tr><td Valign=TOP><b>Description Size :<BR></b>This is the font size you would like the description to be.</td>
  3653. <td><INPUT NAME=DESCSIZE TYPE=Radio VALUE="<font size=4>" checked><font size=4>4</font><br>
  3654. <INPUT NAME=DESCSIZE TYPE=Radio VALUE="<font size=5>"><font size=5>5</font><br>
  3655. <INPUT NAME=DESCSIZE TYPE=Radio VALUE="<font size=6>"><font size=6>6</font><br></td>
  3656. </tr>
  3657.  
  3658. <tr><td Valign=TOP><b>Description:<BR></b>The description may be text or HTML. The description should include all information the buyer should know.
  3659. <br><p><b>NOTE: The description my not include FORM, SCRIPT, OBJECT, EMBED, APPLET, and INPUT tags will they will be removed.<b></td><td><TEXTAREA NAME=DESC ROWS=5 COLS=55 WRAP=vertical>$desc</TEXTAREA></td></tr>
  3660. <tr><td Valign=TOP><b>Condition:</b><br>Select the condition of the item(s) your auctioning.
  3661. </td>
  3662. <td><b>Select One</b><BR>
  3663. <INPUT NAME=CONDITION TYPE=Radio VALUE="See Item Description" checked>See Item Description<br>
  3664. <INPUT NAME=CONDITION TYPE=Radio VALUE="New">New<br>
  3665. <INPUT NAME=CONDITION TYPE=Radio VALUE="Great">Great<br>
  3666. <INPUT NAME=CONDITION TYPE=Radio VALUE="Good">Good<br>
  3667. <INPUT NAME=CONDITION TYPE=Radio VALUE="Fair">Fair<br>
  3668. <INPUT NAME=CONDITION TYPE=Radio VALUE="Repairable">Repairable<br>
  3669. <INPUT NAME=CONDITION TYPE=Radio VALUE="ASIS">ASIS<br>
  3670. <INPUT NAME=CONDITION TYPE=Radio VALUE="N/A">N/A<br>
  3671. </td></tr>
  3672. </table>
  3673.  
  3674. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3675. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2>Payment Arrangements</b></font></TH></tr>
  3676. <tr><td Valign=TOP><b>Use PayPal.com as your automated payment option:<BR></b><br>To allow the winner to pay you using paypal.com<br> then enter your paypal account e-mail address here!<br>Leave blank if you don't want to use paypal or if you don't have a paypal account</td>
  3677. <td>PayPal Account E-mail <INPUT NAME=PAYPALACC TYPE=TEXT size=30 MAXLENGTH=30>
  3678. </td></tr>
  3679. <tr><td Valign=TOP><b>Other Payment Options:<BR></b><br>Select the non automated payments you will accept.</td>
  3680. <td><b>Select One</b><BR>
  3681. <INPUT NAME=PAYMENT TYPE=Radio VALUE="None" checked>None<br>
  3682. <INPUT NAME=PAYMENT TYPE=Radio VALUE="See item description for payment methods accepted.">See item description for payment methods accepted.<br>
  3683. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Master Card">Master Card<br>
  3684. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Visa">Visa<br>
  3685. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Debit Card">Debit Card<br>
  3686. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Money Order">Money Order<br>
  3687. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Personal Check">Personal Check<br>
  3688. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Master Card, Visa">Master Card, Visa<br>
  3689. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Master Card, Visa, Debit Card">Master Card, Visa, Debit Card<br>
  3690. <INPUT NAME=PAYMENT TYPE=Radio VALUE="Master, Visa, Debit Card, Money order, Personal Check">Master, Visa, Debit Card, Money order, Personal Check
  3691. </td></tr>
  3692. </table>
  3693.  
  3694. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3695. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2>Shipping Arrangements</b></font></TH></tr>
  3696. <tr><td Valign=TOP><b>Shipping and Insurance (If any Insurance is offered):</b><br>Who will pay the shipping and insurance cost of this auction item.</td>
  3697. <td><b>Select One</b><BR>
  3698. <INPUT NAME=SHIPPING TYPE=Radio VALUE="See Item Description" checked>See Item Description<br>
  3699. <INPUT NAME=SHIPPING TYPE=Radio VALUE="Buyer Pays">Buyer Pays<br>
  3700. <INPUT NAME=SHIPPING TYPE=Radio VALUE="Seller Pays">Seller Pays<br>
  3701. <INPUT NAME=SHIPPING TYPE=Radio VALUE="Buyer & Seller Splits">Buyer & Seller Splits<br>
  3702. <INPUT NAME=SHIPPING TYPE=Radio VALUE="Pick-Up Only">Pick-Up Only<br>
  3703. <INPUT NAME=SHIPPING TYPE=Radio VALUE="No Shipping Required">No Shipping Required<br>
  3704. </td></tr>
  3705.  
  3706. <tr><td Valign=TOP><b>Shipping Service 1:</b><br>Select the shipping services you will use</td>
  3707. <td><b>Select One</b><BR>
  3708. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="See Item Description" checked>See Item Description<br>
  3709. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="USPS">USPS<br>
  3710. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="UPS">UPS<br>
  3711. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="USPS, UPS">USPS, UPS<br>
  3712. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="Pick-Up Only">Pick-Up Only<br>
  3713. <INPUT NAME=SHIPPSERVICE1 TYPE=Radio VALUE="No Shipping Required">No Shipping Required<br>
  3714. </td></tr>
  3715. <tr><td Valign=TOP><b>Shipping Cost 1:</b>Enter the shipping fee!</td>
  3716. <td>Shipping Fee (ENTER 0.00 for "see item description") <INPUT NAME=SHIPPFEE1 TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00><p><a href=\"javascript:openWin('http://postcalc.usps.gov/');\">USPS Postage Calculator</a>
  3717. <br><a href=\"javascript:openWin('https://wwwapps.ups.com/ctc/request?WBPM_lid=homepage/ct1.html_pnl_ctc');\">UPS Postage Calculator</a></p></td>
  3718. <tr><td Valign=TOP><b>Shipping Service 2:</b><br>Select the shipping services you will use</td>
  3719. <td><b>Select One</b><BR>
  3720. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="No other service offered" checked>No other service offered<br>
  3721. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="See Item Description">See Item Description<br>
  3722. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="Royal Mail Airmail">Royal Mail Airmail<br>
  3723. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="Pick-Up Only">Pick-Up Only<br>
  3724. <INPUT NAME=SHIPPSERVICE2 TYPE=Radio VALUE="No Shipping Required">No Shipping Required<br>
  3725. </td></tr>
  3726. <tr><td Valign=TOP><b>Shipping Cost 2:<BR></b><br>Enter the shipping fee!</td>
  3727. <td>Shipping Fee (ENTER 0.00 for "see item description") <INPUT NAME=SHIPPFEE2 TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00><p><a href=\"javascript:openWin('http://postcalc.usps.gov/');\">USPS Postage Calculator</a>
  3728. <br><a href=\"javascript:openWin('https://wwwapps.ups.com/ctc/request?WBPM_lid=homepage/ct1.html_pnl_ctc');\">UPS Postage Calculator</a></p></td>
  3729. <tr><td Valign=TOP><b>Multi Item Shipping Fee:<BR></b><br>"This is only used if this is a multi item Dutch auction where you selling more than one of the same items where the bidder selects the quantity they want"</td>
  3730. <td>Enter the shipping fee for each additional item <INPUT NAME=MULTISHIPPING TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00></td>
  3731. <tr><td Valign=TOP><b>Shipping Insurance:<BR></b><br>Enter the shipping insurance fee.</td>
  3732. <td>Shipping Insurance Fee (ENTER 0.00 for "see item description") <INPUT NAME=INSURANCEFEE TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00></td>
  3733. <tr><td Valign=TOP><b>Will Shipp to:</b><br>Select the countries you will ship this item to.
  3734. </td>
  3735. <td><b>Select One</b><BR>
  3736. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="See Item Description" checked>See Item Description<br>
  3737. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="Any where in the world">Any where in the world<br>
  3738. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="US only">US only<br>
  3739. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="UK only">UK only<br>
  3740. <INPUT NAME=SHIPSTO TYPE=Radio VALUE="US and Uk Only">US and UK Only<br>
  3741. </td></tr>
  3742. </table>
  3743.  
  3744. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3745. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2>Sales Tax and Other Special Info</b></font></TH></tr>
  3746. <tr><td Valign=TOP><b>State Sales Tax:<BR></b><br>Enter the State Sales Tax Percentage!</td>
  3747. <td>State Sales Tax Percentage ("IF ANY") Leave or enter 0.00 for no state sales tax, as this will charge all bidders sales tax no matter the State they live in") <INPUT NAME=SALESTAX TYPE=TEXT size=7 MAXLENGTH=6 VALUE=0.00></td>
  3748. <tr><td Valign=TOP><b>Sales Tax Info:</b><BR>Enter your sales tax instructions (Leave blank for NONE)</td>
  3749. <td><TEXTAREA NAME=SALESINFO ROWS=3 COLS=55 WRAP=vertical></TEXTAREA></td>
  3750. <tr><td Valign=TOP><b>Special Payment Instructions:<BR></b><br>Enter any special payment instructions (Leave blank for NONE)</td>
  3751. <td><TEXTAREA NAME=PAYMENTINST ROWS=3 COLS=55 WRAP=vertical></TEXTAREA></td></tr>
  3752. <tr><td Valign=TOP><b>Return Policy:<BR></b><br>Enter return policy instructions (Leave blank for NONE)</td>
  3753. <td><TEXTAREA NAME=RETURN ROWS=3 COLS=55 WRAP=vertical></TEXTAREA></td></tr>
  3754. </tr>
  3755. </table>
  3756.  
  3757. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3758. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2><b>Sell your auction item with these added options\!</b></font></TH></tr>
  3759. <tr><td COLSPAN=2 Valign=TOP><b><font face=arial size=2>The next items are <font color=red>optional</font>, but will make your auction item stand out among others, and will increase the number of bids. <font color=red>These options do have a small fee, and are charged to your account even if you do not sell your item!</font></b></td></tr>
  3760.  
  3761. <tr><td Valign=TOP><b>Attention Grabbers:<BR></b>Really make your auction stand out from the crowd with these special icons for only  <b>$config{'currencytype'}$config{'grabberfee'}</b></font></td>
  3762. <td><table bgcolor=$config{'colortablebody'} border=2 CELLSPACING=0 CELLPADDING=3 COLS=7 width=\"350\" >
  3763. <INPUT NAME=GRABBER TYPE=Radio VALUE="NONE" checked><b>None</b>
  3764. <br>
  3765. <tr align=center Valign=center>
  3766. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab1"><IMG SRC=$config{'grabber1'}></td>
  3767. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab2"><IMG SRC=$config{'grabber2'}></td>
  3768. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab3"><IMG SRC=$config{'grabber3'}></td>
  3769. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab4"><IMG SRC=$config{'grabber4'}></td>
  3770. </tr>
  3771. <tr align=center Valign=center>
  3772. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab5"><IMG SRC=$config{'grabber5'}></td>
  3773. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab6"><IMG SRC=$config{'grabber6'}></td>
  3774. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab7"><IMG SRC=$config{'grabber7'}></td>
  3775. <td><INPUT NAME=GRABBER TYPE=Radio VALUE="grab8"><IMG SRC=$config{'grabber8'}></td>
  3776. </tr>
  3777. </table>
  3778. EOF
  3779.  
  3780.  if ($config{'backgroungmusic'} eq "yes") {
  3781.                 print <<"EOF";
  3782. <tr><td Valign=TOP><b>Auction Back Ground Music:<BR></b>Really make your auction stand out from the crowd with back ground music for only  <b>$config{'currencytype'}$config{'musicfee'}</b></font></td>
  3783. <td><table bgcolor=$config{'colortablebody'} border=2 CELLSPACING=0 CELLPADDING=3 COLS=7 width=\"350\" >
  3784. <INPUT NAME=MUSIC TYPE=Radio VALUE="NONE" checked><b>None</b>
  3785. <br>
  3786. <tr align=center Valign=center>
  3787. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music1">$config{'musictitle1'}</td>
  3788. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music2">$config{'musictitle2'}</td>
  3789. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music3">$config{'musictitle3'}</td>
  3790. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music4">$config{'musictitle4'}</td>
  3791. </tr>
  3792. <tr align=center Valign=center>
  3793. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music5">$config{'musictitle5'}</td>
  3794. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music6">$config{'musictitle6'}</td>
  3795. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music7">$config{'musictitle7'}</td>
  3796. <td><INPUT NAME=MUSIC TYPE=Radio VALUE="music8">$config{'musictitle8'}</td>
  3797. </tr>
  3798. </table>
  3799. EOF
  3800. }
  3801.  
  3802. print <<"EOF";
  3803. <tr><td Valign=TOP><b>Full Featured Gallery Listed On The Main Home Page (Must Have a image linked or uploaded):<BR></b>cost: <b>$config{'currencytype'}$config{'galleryfee'}</b><br>Will be viewed by anyone entering the auction website.<br></td>
  3804. <td><b>Select One</b><BR>
  3805. <INPUT NAME=GALLERY TYPE=Radio VALUE="No" checked>No<br>
  3806. <INPUT NAME=GALLERY TYPE=Radio VALUE="Yes">Yes
  3807. </td></tr>
  3808.  
  3809. <tr><td Valign=TOP><b>Item title highlighted in $config{'boldbackground'} background for better visibility:<BR></b>cost: <b>$config{'currencytype'}$config{'feat_green_fee'}</b><br>This is a real nice attention grabber.</td>
  3810. <td><b>Select One</b><BR>
  3811. <INPUT NAME=FEAT_YT TYPE=Radio VALUE="NO" checked>No<br>
  3812. <INPUT NAME=FEAT_YT TYPE=Radio VALUE="YES">Yes
  3813. </td></tr>
  3814. <tr><td Valign=TOP><b>Item title in bold for better visibility:<BR></b>cost: <b>$config{'currencytype'}$config{'feat_bold_fee'}</b><br>The famous<b> BOLD TITLE!</b> This is a real nice attention grabber.</td>
  3815. <td><b>Select One</b><BR>
  3816. <INPUT NAME=FEAT_BF TYPE=Radio VALUE="NO" checked>No<br>
  3817. <INPUT NAME=FEAT_BF TYPE=Radio VALUE="YES">Yes
  3818. </td></tr>
  3819. </table>
  3820. EOF
  3821.  
  3822. if ($config{'allowcounter'} eq "yes") {
  3823. print <<"EOF";
  3824. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3825. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2><b><font face=arial size=2>This is <font color=red>optional</font>, Will add a counter to your page to monitor your auction page visits.</font></b></TH></tr>
  3826.  
  3827. <tr><td Valign=TOP><b>Auction Item page view counter:</b><BR>
  3828. Counter Fee: <b>$config{'currencytype'}$config{'counterfee'}</b></font></td>
  3829. <td><INPUT NAME=USECOUNTER TYPE=Radio VALUE="No" checked>No<br>
  3830. <INPUT NAME=USECOUNTER TYPE=Radio VALUE="Yes">Yes</td>
  3831. </tr>
  3832. </table>
  3833. EOF
  3834. }
  3835.  
  3836. if ($config{'allowprivate'} eq "yes") {
  3837. print <<"EOF";
  3838. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3839. <tr><TH COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2><b>Private Auction</font></b></td></tr>
  3840. <tr><td Valign=TOP><b>Private Auction:</b><br>With this option you can list your item as a private auction meanning<br>none of the bidders info will be displayed!</td>
  3841. <td><b>Select One</b><BR>
  3842. <INPUT NAME=PRIVATE TYPE=Radio VALUE="no" checked>No<br>
  3843. <INPUT NAME=PRIVATE TYPE=Radio VALUE="yes">Yes
  3844. </td></tr>
  3845. </table>
  3846. EOF
  3847. }
  3848.  
  3849.         if ($config{'dutchauctions'} eq "yes") {
  3850. print <<"EOF";
  3851. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3852. <tr><td COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><font face=arial size=2><b>Auction Type Standard or Fixed Price Dutch Auction</b></font></td></tr>
  3853. <tr><td Valign=TOP><b>Dutch:<BR></b><br>Select this if you are selling one or more of the same item(s) for a set price.<br><font color="red"><b>This is only for setting a item(s) at the price you set  (no bidding).</b></font></td>
  3854. <td><b>Select One</b><BR>
  3855. <INPUT NAME=DUTCH TYPE=Radio VALUE="no" checked>No<br>
  3856. <INPUT NAME=DUTCH TYPE=Radio VALUE="yes">Yes
  3857. </td></tr>
  3858. <tr><td Valign=TOP>Enter how many item(s) you have if you selected Dutch "yes" above:</td>
  3859. <td>Quantity <INPUT NAME=QTY TYPE=TEXT size=7 MAXLENGTH=6 VALUE=1>
  3860. </td></tr>
  3861. </table>
  3862. EOF
  3863.           }          
  3864.        
  3865. print <<"EOF";
  3866. <table width=100% border=1 bgcolor=$config{'colortablebody'}>
  3867. <tr><td Valign=TOP><b>Currency type to use for this auction item:</b><br></td>
  3868. <td><b>Currency:</b><br>
  3869. <INPUT NAME=CURRENCY TYPE=Radio VALUE="\$" checked>\$<br>
  3870. <INPUT NAME=CURRENCY TYPE=Radio VALUE="A\$">A\$<br>
  3871. <INPUT NAME=CURRENCY TYPE=Radio VALUE="C">C<br>
  3872. <INPUT NAME=CURRENCY TYPE=Radio VALUE="£">£<br>
  3873. <INPUT NAME=CURRENCY TYPE=Radio VALUE="€">€<br>
  3874. <INPUT NAME=CURRENCY TYPE=Radio VALUE="¥">¥<br>
  3875. </td></tr>
  3876.  
  3877. <tr><td Valign=TOP><b>Your Starting Bid or if Dutch the fixed selling price:</b><br><b>do not include your countries currency sign or ,</b></td><td><INPUT NAME=BID TYPE=TEXT SIZE=9 VALUE=0.00>
  3878. <tr><td Valign=TOP><b>Your Reserve Price:<BR></b>You are not obligated to sell below this price. Leave 0.00 for no reserve.<br><b>do not include your countries currency sign</b><br><font color="red"><b>This has no effect on Dutch Auctions</b></font></td><td><INPUT NAME=RESERVE TYPE=TEXT SIZE=9 VALUE=0.00>
  3879. <tr><td Valign=TOP><b>Bid Increment:</b><br><b>do not include your countries currency sign</b><br><font color="red"><b>This has no effect on Dutch Auctions</b></font></td><td><INPUT NAME=INC TYPE=TEXT SIZE=9 VALUE=1.00></td></tr>
  3880. EOF
  3881.  
  3882. if ($config{'buyitnow'} eq 'yes') {
  3883. print <<"EOF";
  3884. <tr><td Valign=TOP><b>Buy It Price:</b><br><b>With this option a buyer can buy your item until the bidding starts for the price you set here</b><br><font color="red"><b>For No (Buy It) feature leave this 0.00</b><br><b>If DUTCH auction leave this 0.00</b></font></td><td>$currency<INPUT NAME=BUYIT TYPE=TEXT SIZE=9 VALUE=0.00></td></tr>
  3885. EOF
  3886. }
  3887.  
  3888. print <<"EOF";
  3889. <tr><td COLSPAN=2 Valign=TOP bgcolor=$config{'colortablehead'}><b>PLEASE NOTE:</b> By placing an item up for bid you are making a <b>CONTRACT</b> between you and the buyer. Once you place an item, you may not retract it and you must sell it for the highest bid. In other words, if you don't want to sell it, don't place it up for bid! <a HREF="$config{'scripturl'}?action=agree"> Registration</a> is required to sell an Item.</td></tr>
  3890. <tr><td Valign=TOP><b>Your Username:<BR></b>Used to track your item</td><td><INPUT NAME=ALIAS TYPE=TEXT size=30 MAXLENGTH=30 VALUE=$loginalias>
  3891. <tr><td Valign=TOP><b>Your Password:<BR></b>Must be valid</td><td><INPUT NAME=PASSWORD TYPE=PASSWORD size=30 MAXLENGTH=30 VALUE=$loginpassword>
  3892. </table>
  3893.  
  3894. <center><h3>Press the Preview Button Below to Continue.</h3>
  3895. <INPUT TYPE=SUBMIT VALUE=Preview><p></center>
  3896. </FORM>
  3897. EOF
  3898.  
  3899. }
  3900.  
  3901. #-#############################################
  3902. # Sub: Process New Item
  3903. # This processes new item to be put up for
  3904. # sale from a posted form
  3905.  
  3906. sub procnew {
  3907.  
  3908.         my ($password, @userbids, $bid);
  3909.         if ($config{'regdir'} ne "") {
  3910.                 &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'},
  3911. $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, $form{'PHONE'}, $form{'IP'}, $form{'REFERRAL'}, $form{'REFNAME'}, @userbids) = &read_reg_file($form{'ALIAS'});
  3912.                 $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'}));
  3913.                 &oops('Your password is incorrect.') unless ((lc $password) eq (lc $form{'PASSWORD'}));
  3914.         }  
  3915.  
  3916.         if ($config{'AccountStatus'} eq "on") {
  3917.         &Account_Status($form{'ALIAS'});
  3918.         }
  3919.        
  3920. ############################################################
  3921. ## Formatted bid, inc, reserve, buyit to = currency format.
  3922. ############################################################        
  3923.         $bid = &parsebid($form{'BID'}, $form{'CURRENCY'});
  3924.         $form{'BID'} = &parsebid($form{'BID'}, $form{'CURRENCY'});
  3925.         $form{'INC'} = &parsebid($form{'INC'}, $form{'CURRENCY'});
  3926.         $form{'RESERVE'} = &parsebid($form{'RESERVE'}, $form{'CURRENCY'});
  3927.         $form{'BUYIT'} = &parsebid($form{'BUYIT'}, $form{'CURRENCY'});
  3928.         $form{'SHIPPFEE1'} = &parsebid($form{'SHIPPFEE1'}, $form{'CURRENCY'});
  3929.         $form{'SHIPPFEE2'} = &parsebid($form{'SHIPPFEE2'}, $form{'CURRENCY'});
  3930.         $form{'INSURANCEFEE'} = &parsebid($form{'INSURANCEFEE'}, $form{'CURRENCY'});
  3931.  
  3932.         &oops('You must enter a title for this item, you left this blank.') unless ($form{'TITLE'} ne "");
  3933.         &oops('You must have an item title that is less than 56 characters.') unless (length($form{'TITLE'}) < 56);        
  3934.         &oops('You must select a valid category.') unless (-d "$config{'basepath'}$form{'CATEGORY'}" and $category{$form{'CATEGORY'}});
  3935.         &oops('You must enter the number of days your auction should run.') unless (($form{'DAYS'} > 0) and ($form{'DAYS'} < $config{'listingdays'} + 1));
  3936.         &oops('You must enter an item description.') unless ($form{'DESC'});
  3937.         &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'});
  3938.         &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/);
  3939.  
  3940.    if (($form{'CURRENCY'} eq "C") or ($form{'CURRENCY'} eq "£") or ($form{'CURRENCY'} eq "A\$") or ($form{'CURRENCY'} eq "€") or ($form{'CURRENCY'} eq "¥")) {
  3941.         &oops('You must enter a valid starting bid.') unless (($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/) and ($form{'BID'} >= 01));
  3942.         &oops('You must enter a valid bid increment.') unless (($form{'INC'} =~ /^(\d+\.?\d*|\.\d+)$/) and ($form{'INC'} >= 01) or ($form{'DUTCH'} eq "yes"));
  3943.         &oops('Your reserve price must be greater than your starting bid price or must be 0 for no reserve.') unless (($form{'RESERVE'} eq '0') or ($form{'RESERVE'} > $form{'BID'}) or ($form{'DUTCH'} eq "yes"));
  3944.         &oops('Your BuyItNow price must be equal or greater than your Reserve price or must be 0 for no BuyItNow.') unless (($form{'BUYIT'} eq '0') or ($form{'BUYIT'} >= $form{'RESERVE'}) or ($config{'buyitnow'} eq "no") or ($form{'DUTCH'} eq "yes"));
  3945.         &oops('Your BuyNow price must be greater than your Starting bid or must be 0 for no BuyItNow.') unless (($form{'BUYIT'} eq '0') or ($form{'BUYIT'} > $form{'BID'}) or ($config{'buyitnow'} eq "no") or ($form{'DUTCH'} eq "yes"));
  3946.         &oops('This is a dutch auction and may not contain a reserve price, the reserve field must be 0 for no reserve.') if (($form{'DUTCH'} eq "yes") && ($form{'RESERVE'} > "0"));
  3947.         &oops('This is a dutch auction and may not contain a BuyNow price, the BuyNow field must be 0 for no BuyNow price.') if (($form{'DUTCH'} eq "yes") && ($form{'BUYIT'} > '0'));
  3948.         }
  3949.     else {
  3950.         &oops('You must enter a valid starting bid.') unless (($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/) and ($form{'BID'} >= .01));
  3951.         &oops('You must enter a valid bid increment.') unless (($form{'INC'} =~ /^(\d+\.?\d*|\.\d+)$/) and ($form{'INC'} >= .01) or ($form{'DUTCH'} eq "yes"));      
  3952.         &oops('You must enter a valid reserver price.') unless (($form{'RESERVE'} =~ /^(\d+\.?\d*|\.\d+)$/));
  3953.         &oops('You must enter a valid buyitnow price.') unless (($form{'BUYIT'} =~ /^(\d+\.?\d*|\.\d+)$/) or ($config{'buyitnow'} eq "no"));
  3954.         &oops('Your reserve price must be greater than your starting bid price or must be 0.00 for no reserve.') unless (($form{'RESERVE'} eq '0.00') or ($form{'RESERVE'} > $form{'BID'}) or ($form{'DUTCH'} eq "yes"));
  3955.         &oops('Your BuyItNow price must be equal or greater than your Reserve price or must be 0.00 for no BuyItNow.') unless (($form{'BUYIT'} eq '0.00') or ($form{'BUYIT'} >= $form{'RESERVE'}) or ($config{'buyitnow'} eq "no") or ($form{'DUTCH'} eq "yes"));
  3956.         &oops('Your BuyNow price must be greater than your Starting bid or must be 0.00 for no BuyItNow.') unless (($form{'BUYIT'} eq '0.00') or ($form{'BUYIT'} > $form{'BID'}) or ($config{'buyitnow'} eq "no") or ($form{'DUTCH'} eq "yes"));
  3957.         &oops('This is a dutch auction and may not contain a reserve price, the reserve field must be 0.00 for no reserve.') if (($form{'DUTCH'} eq "yes") && ($form{'RESERVE'} > "0.00"));
  3958.         &oops('This is a dutch auction and may not contain a BuyNow price, the BuyNow field must be 0.00 for no BuyNow price.') if (($form{'DUTCH'} eq "yes") && ($form{'BUYIT'} > '0.00'));
  3959.         }
  3960.  
  3961.         &oops('You you have entered more that 1 item in the Quantity field to do so you must select yes to dutch.') if (($form{'DUTCH'} eq "no") && ($form{'QTY'} > "1"));
  3962.      
  3963.         ### Security Check and Remove possible violations  ###############
  3964.         $form{'TITLE'} =~ s/<!(?:--[\s\S]*?--\s*)?>\s*//g; # remove comment tags
  3965.         $form{'TITLE'} =~s/[\~\^]//g;
  3966.         $form{'TITLE'} =~ s/~!/ ~!/g;
  3967.         $form{'TITLE'} =~ s/<*(javascript)[^>]+>//gi;
  3968.         $form{'TITLE'} =~ s/<*(script)[^>]+>//gi;
  3969.         $form{'TITLE'} =~ s/<*(applet)[^>]+>//gi;
  3970.         $form{'TITLE'} =~ s/<*(embed)[^>]+>//gi;
  3971.         $form{'TITLE'} =~ s/system\(.+//g;
  3972.         $form{'TITLE'} =~ s/alert//g;
  3973.         $form{'TITLE'} =~ s/param//g;
  3974.         $form{'TITLE'} =~ s/hash//g;
  3975.         $form{'TITLE'} =~ s/exec//g;
  3976.         $form{'TITLE'} =~ s/grep//g;
  3977.         $form{'TITLE'} =~ s/eval//g;
  3978.  
  3979.         $form{'DESCTIT'} =~ s/<!(?:--[\s\S]*?--\s*)?>\s*//g; # remove comment tags
  3980.         $form{'DESCTIT'} =~s/[\~\^]//g;
  3981.         $form{'DESCTIT'} =~ s/~!/ ~!/g;
  3982.         $form{'DESCTIT'} =~ s/<*(javascript)[^>]+>//gi;
  3983.         $form{'DESCTIT'} =~ s/<*(script)[^>]+>//gi;
  3984.         $form{'DESCTIT'} =~ s/<*(applet)[^>]+>//gi;
  3985.         $form{'DESCTIT'} =~ s/<*(embed)[^>]+>//gi;
  3986.         $form{'DESCTIT'} =~ s/system\(.+//g;
  3987.         $form{'DESCTIT'} =~ s/alert//g;
  3988.         $form{'DESCTIT'} =~ s/param//g;
  3989.         $form{'DESCTIT'} =~ s/hash//g;
  3990.         $form{'DESCTIT'} =~ s/exec//g;
  3991.         $form{'DESCTIT'} =~ s/grep//g;
  3992.         $form{'DESCTIT'} =~ s/eval//g;
  3993.  
  3994.         $form{'DESC'} =~ s/<!(?:--[\s\S]*?--\s*)?>\s*//g; # remove comment tags
  3995.         $form{'DESC'} =~s/[\~\^]//g;
  3996.         $form{'DESC'} =~ s/~!/ ~!/g;
  3997.         $form{'DESC'} =~ s/<*(javascript)[^>]+>//gi;
  3998.         $form{'DESC'} =~ s/<*(script)[^>]+>//gi;
  3999.         $form{'DESC'} =~ s/<*(applet)[^>]+>//gi;
  4000.         $form{'DESC'} =~ s/<*(embed)[^>]+>//gi;
  4001.         $form{'DESC'} =~ s/system\(.+//g;
  4002.         $form{'DESC'} =~ s/alert//g;
  4003.         $form{'DESC'} =~ s/param//g;
  4004.         $form{'DESC'} =~ s/hash//g;
  4005.         $form{'DESC'} =~ s/exec//g;
  4006.         $form{'DESC'} =~ s/grep//g;
  4007.         $form{'DESC'} =~ s/eval//g;        
  4008.         ### END Security Check and Remove possible violations  ###############
  4009.  
  4010.         $form{'INCERMENT'} = 0.00 if ($form{'DUTCH'} eq 'yes');
  4011.         $form{'BUYIT'} = "0.00"  if ($config{'buyitnow'} eq "no");  
  4012.         $form{'DUTCH'} = "no"  if ($config{'dutchauctions'} eq "no");          
  4013.         $form{'QTY'} = "1"  if ($config{'dutchauctions'} eq "no");
  4014.         $form{'QTY'} = "1"  if ($form{'DUTCH'} eq "no");
  4015.         $form{'USECOUNTER'} = "no"  if ($config{'allowcounter'} eq "no");
  4016.         $form{'MUSIC'} = "NONE"  if ($config{'backgroungmusic'} eq "no");
  4017.   $form{'IMAGE1'} = "$config{'imageurl'}$form{'UPIMAGE1'}" if ($form{'UPIMAGE1'} ne "");
  4018.   $form{'IMAGE2'} = "$config{'imageurl'}$form{'UPIMAGE2'}" if ($form{'UPIMAGE2'} ne "");
  4019.   $form{'IMAGE3'} = "$config{'imageurl'}$form{'UPIMAGE3'}" if ($form{'UPIMAGE3'} ne "");
  4020.   $form{'IMAGE4'} = "$config{'imageurl'}$form{'UPIMAGE4'}" if ($form{'UPIMAGE4'} ne "");
  4021.   $form{'IMAGE5'} = "$config{'imageurl'}$form{'UPIMAGE5'}" if ($form{'UPIMAGE5'} ne "");
  4022.   $form{'IMAGE6'} = "$config{'imageurl'}$form{'UPIMAGE6'}" if ($form{'UPIMAGE6'} ne "");
  4023.   $form{'IMAGE7'} = "$config{'imageurl'}$form{'UPIMAGE7'}" if ($form{'UPIMAGE7'} ne "");
  4024.   $form{'IMAGE8'} = "$config{'imageurl'}$form{'UPIMAGE8'}" if ($form{'UPIMAGE8'} ne "");
  4025.  
  4026.   #$form{'IMAGE1'} =~ s/[\>\<\a\href\src\=\+]//g;
  4027.   #$form{'IMAGE2'} =~ s/[\>\<\a\href\src\=\+]//g;
  4028.   #$form{'IMAGE3'} =~ s/[\>\<\a\href\src\=\+]//g;
  4029.   #$form{'IMAGE4'} =~ s/[\>\<\a\href\src\=\+]//g;
  4030.   #$form{'IMAGE5'} =~ s/[\>\<\a\href\src\=\+]//g;
  4031.   #$form{'IMAGE6'} =~ s/[\>\<\a\href\src\=\+]//g;
  4032.   #$form{'IMAGE7'} =~ s/[\>\<\a\href\src\=\+]//g;
  4033.   #$form{'IMAGE8'} =~ s/[\>\<\a\href\src\=\+]//g;
  4034.  
  4035.         &oops('You must have a image to view to use the Main Page Featured Gallery') if (($form{'GALLERY'} eq "Yes") && ($form{'IMAGE1'} eq ""));
  4036.        
  4037.         $form{'RELISTCNT'} = "0";
  4038.         $form{'PAID'} = "no";
  4039.                
  4040.         $form{'SALESINFO'} = "None Listed by seller" if ($form{'SALESINFO'} eq "");
  4041.         $form{'RETURN'} = "None Listed by seller" if ($form{'RETURN'} eq "");
  4042.         $form{'PAYMENTINST'} = "None Listed by seller" if ($form{'PAYMENTINST'} eq "");
  4043.            
  4044.         $form{'SHIPPFEE1'} = "0.00" if (($form{'SHIPPFEE1'} eq "0.00") or ($form{'SHIPPFEE1'} eq "0") or ($form{'SHIPPFEE1'} eq ""));
  4045.         $form{'SHIPPFEE2'} = "0.00" if (($form{'SHIPPFEE2'} eq "0.00") or ($form{'SHIPPFEE2'} eq "0") or ($form{'SHIPPFEE2'} eq ""));
  4046.         $form{'INSURANCEFEE'} = "0.00" if (($form{'INSURANCEFEE'} eq "0.00") or ($form{'INSURANCEFEE'} eq "0") or ($form{'INSURANCEFEE'} eq ""));
  4047.         $form{'SALESTAX'} = "0.00" if (($form{'SALESTAXE'} eq "0.00") or ($form{'SALESTAX'} eq "0") or ($form{'SALESTAX'} eq ""));
  4048.            
  4049.         &oops('You must enter your user name.') unless ($form{'ADDRESS1'});
  4050.         &oops('You must enter your street address.') unless ($form{'ADDRESS2'});
  4051.         &oops('You must enter your city, state, and zip code.') unless ($form{'ADDRESS3'});
  4052.    
  4053.         my $item_number = ($form{'DAYS'} * 86400 + time);
  4054.         $item_number = ($form{'DAYS'} * 86400 + time) until (!(-f "$config{'basepath'}$form{'CATEGORY'}/$item_number.dat"));
  4055.  
  4056. #        my $item_number = ($form{'DAYS'} * 86400 + time);
  4057. #        my $key;
  4058. #        foreach $key (sort keys %category) {
  4059. #            opendir THEDIR, "$config{'basepath'}$key" or &oops("Category directory $key #could not be opened.");
  4060. #            $item_number = ($form{'DAYS'} * 86400 + time) until (!(-f #"$config{'basepath'}$key/$item_number.dat"));
  4061. #             }
  4062.  
  4063.         my $nowtime = strftime "%a %b %d, %I:%M %p", gmtime(time + ($config{'systemtime'}* 3600 ));
  4064.         my $closetime = strftime "%a %b %d, %I:%M %p", gmtime($item_number + ($config{'systemtime'}* 3600 ));      
  4065.         my $timeremain = time_remain($item_number);
  4066.  
  4067.         if ($config{postallflag}){sleep 1; return}
  4068.  
  4069. #        if ((my $i = &double_check(@userbids))) {
  4070. #           print "<B>You have already posted this item! You got this message if you hit your #browsers refreash or hit submit twice!<br><p><br>$form{'TITLE'} was posted under #$category{$form{'CATEGORY'}}...</B>.<BR>You may want to go to <A #HREF=\"$ENV{'SCRIPT_NAME'}\?category=$form{'CATEGORY'}\&item=$i\">the item</A> to confirm #placement.\n\n";
  4071. #       return;
  4072. #       }
  4073.  
  4074.         if ($form{'FROMPREVIEW'}) {
  4075.                 my $key;
  4076.                 foreach $key (keys %form) {
  4077.                         $form{$key} =~ s/\[greaterthansign\]/\>/gs;
  4078.                         $form{$key} =~ s/\[lessthansign\]/\</gs;
  4079.                         $form{$key} =~ s/\[quotes\]/\"/gs;
  4080.                 }      
  4081.  
  4082. #        umask(000);  # UNIX file permission junk                
  4083. #        mkdir("$config{'basepath'}newestitem", 0777) unless (-d #"$config{'basepath'}newestitem");
  4084.  
  4085. #        open(NEWESTITEM,">$config{'basepath'}newestitem/newestitem.dat");
  4086. #        print (NEWESTITEM "$nowtime");
  4087. #        close(NEWESTITEM);
  4088.          
  4089.                 ### Start Accounting Setup ###  
  4090.             #-####### For account ballance checker of before posting a new item ########
  4091.             if ($config{'PostAccountStatus'} eq "on") {
  4092.                 my $totalfees = 0.00;
  4093.                 if ($config{'listingfee'} > 0.00){                
  4094.                 $totalfees = &parsefees($totalfees + $config{'listingfee'});
  4095.                 }
  4096.                 if ($form{'FEAT_YT'} eq "YES"){                
  4097.                 $totalfees = &parsefees($totalfees + $config{'feat_green_fee'});
  4098.                 }
  4099.                 if ($form{'FEAT_BF'} eq "YES"){                
  4100.                 $totalfees = &parsefees($totalfees + $config{'feat_bold_fee'});
  4101.                 }
  4102.                 ##
  4103.                 if ($form{'GRABBER'} eq "grab1"){                
  4104.                 $totalfees = &parsefees($totalfees + $config{'grabberfee'});
  4105.                 }
  4106.                 if ($form{'GRABBER'} eq "grab2"){                
  4107.                 $totalfees = &parsefees($totalfees + $config{'grabberfee'});
  4108.                 }
  4109.                 if ($form{'GRABBER'} eq "grab3"){                
  4110.                 $totalfees = &parsefees($totalfees + $config{'grabberfee'});
  4111.                 }
  4112.                 if ($form{'GRABBER'} eq "grab4"){                
  4113.                 $totalfees = &parsefees($totalfees + $config{'grabberfee'});
  4114.                 }
  4115.                 if ($form{'GRABBER'} eq "grab5"){                
  4116.                 $totalfees = &parsefees($totalfees + $config{'grabberfee'});
  4117.                 }
  4118.                 if ($form{'GRABBER'} eq "grab6"){                
  4119.                 $totalfees = &parsefees($totalfees + $config{'grabberfee'});
  4120.                 }
  4121.                 if ($form{'GRABBER'} eq "grab7"){                
  4122.                 $totalfees = &parsefees($totalfees + $config{'grabberfee'});
  4123.                 }
  4124.                 if ($form{'GRABBER'} eq "grab8"){                
  4125.                 $totalfees = &parsefees($totalfees + $config{'grabberfee'});
  4126.                 }
  4127.                 ######
  4128.                 if ($form{'MUSIC'} eq "music1"){                
  4129.                 $totalfees = &parsefees($totalfees + $config{'musicfee'});
  4130.                 }
  4131.                 if ($form{'MUSIC'} eq "music2"){                
  4132.                 $totalfees = &parsefees($totalfees + $config{'musicfee'});
  4133.                 }
  4134.                 if ($form{'MUSIC'} eq "music3"){                
  4135.                 $totalfees = &parsefees($totalfees + $config{'musicfee'});
  4136.                 }
  4137.                 if ($form{'MUSIC'} eq "music4"){                
  4138.                 $totalfees = &parsefees($totalfees + $config{'musicfee'});
  4139.                 }
  4140.                 if ($form{'MUSIC'} eq "music5"){                
  4141.                 $totalfees = &parsefees($totalfees + $config{'musicfee'});
  4142.                 }
  4143.                 if ($form{'MUSIC'} eq "music6"){                
  4144.                 $totalfees = &parsefees($totalfees + $config{'musicfee'});
  4145.                 }
  4146.                 if ($form{'MUSIC'} eq "music7"){                
  4147.                 $totalfees = &parsefees($totalfees + $config{'musicfee'});
  4148.                 }
  4149.                 if ($form{'MUSIC'} eq "music8"){                
  4150.                 $totalfees = &parsefees($totalfees + $config{'musicfee'});
  4151.                 }
  4152.                 #######
  4153.                 if ($form{'GALLERY'} eq "Yes"){                
  4154.                 $totalfees = &parsefees($totalfees + $config{'galleryfee'});
  4155.                 }
  4156.                 ############
  4157.                 if ($form{'UPIMAGE1'} ne "") {                
  4158.                 $totalfees = &parsefees($totalfees + $config{'uploadimagefee1'});
  4159.                 }    
  4160.                 if ($form{'UPIMAGE2'} ne "") {                
  4161.                 $totalfees = &parsefees($totalfees + $config{'uploadimagefee2'});
  4162.                 }  
  4163.                 if ($form{'UPIMAGE3'} ne "") {                
  4164.                 $totalfees = &parsefees($totalfees + $config{'uploadimagefee3'});
  4165.                 }  
  4166.                 if ($form{'UPIMAGE4'} ne "") {                
  4167.                 $totalfees = &parsefees($totalfees + $config{'uploadimagefee4'});
  4168.                 }              
  4169.                 ##########
  4170.                 if ($form{'USECOUNTER'} eq "Yes"){                
  4171.                 $totalfees = &parsefees($totalfees + $config{'counterfee'});
  4172.                 }
  4173.                 &Account_Status2($form{'ALIAS'}, $totalfees);
  4174.                 }
  4175.                 #-####### End account ballance checker before posting a new item ########
  4176.                 ## Auction Start percentage rates ##
  4177.                 if ($config{'postpercentage'} eq "on") {
  4178.                 &transaction_percentage_postnew($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "$form{'BID'}", "$form{'RESERVE'}");
  4179.                 }            
  4180.                 if ($config{'listingfee'} > "0.00") {
  4181.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'listingfee'}", "New Auction Listing Fee");
  4182.                 }
  4183.                 if (($form{'FEAT_YT'} eq "YES") && ($config{'feat_green_fee'} > "0.00")) {
  4184.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'feat_green_fee'}", "Yellow Background Fee");
  4185.                 }
  4186.                 if (($form{'FEAT_BF'} eq "YES") && ($config{'feat_bold_fee'} > "0.00")) {
  4187.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'feat_bold_fee'}", "Bold Listing Fee");
  4188.                 }    
  4189.                 if (($form{'GRABBER'} eq "grab1" ) && ($config{'grabberfee'} > "0.00")) {
  4190.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'grabberfee'}", "Attention Grabber Fee");
  4191.                 }
  4192.                 if (($form{'GRABBER'} eq "grab2" ) && ($config{'grabberfee'} > "0.00")) {
  4193.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'grabberfee'}", "Attention Grabber Fee");
  4194.                 }
  4195.                 if (($form{'GRABBER'} eq "grab3" ) && ($config{'grabberfee'} > "0.00")) {
  4196.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'grabberfee'}", "Attention Grabber Fee");
  4197.                 }
  4198.                 if (($form{'GRABBER'} eq "grab4" ) && ($config{'grabberfee'} > "0.00")) {
  4199.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'grabberfee'}", "Attention Grabber Fee");
  4200.                 }
  4201.                 if (($form{'GRABBER'} eq "grab5" ) && ($config{'grabberfee'} > "0.00")) {
  4202.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'grabberfee'}", "Attention Grabber Fee");
  4203.                 }
  4204.                 if (($form{'GRABBER'} eq "grab6" ) && ($config{'grabberfee'} > "0.00")) {
  4205.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'grabberfee'}", "Attention Grabber Fee");
  4206.                 }
  4207.                 if (($form{'GRABBER'} eq "grab7" ) && ($config{'grabberfee'} > "0.00")) {
  4208.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'grabberfee'}", "Attention Grabber Fee");
  4209.                 }
  4210.                 if (($form{'GRABBER'} eq "grab8" ) && ($config{'grabberfee'} > "0.00")) {
  4211.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'grabberfee'}", "Attention Grabber Fee");
  4212.                 }    
  4213.                 if (($form{'MUSIC'} eq "music1" ) && ($config{'musicfee'} > "0.00")) {
  4214.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'musicfee'}", "Back Ground Music Fee");
  4215.                 }
  4216.                 if (($form{'MUSIC'} eq "music2" ) && ($config{'musicfee'} > "0.00")) {
  4217.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'musicfee'}", "Back Ground Music Fee");
  4218.                 }
  4219.                 if (($form{'MUSIC'} eq "music3" ) && ($config{'musicfee'} > "0.00")) {
  4220.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'musicfee'}", "Back Ground Music Fee");
  4221.                 }
  4222.                 if (($form{'MUSIC'} eq "music4" ) && ($config{'musicfee'} > "0.00")) {
  4223.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'musicfee'}", "Back Ground Music Fee");
  4224.                 }
  4225.                 if (($form{'MUSIC'} eq "music5" ) && ($config{'musicfee'} > "0.00")) {
  4226.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'musicfee'}", "Back Ground Music Fee");
  4227.                 }
  4228.                 if (($form{'MUSIC'} eq "music6" ) && ($config{'musicfee'} > "0.00")) {
  4229.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'musicfee'}", "Back Ground Music Fee");
  4230.                 }
  4231.                 if (($form{'MUSIC'} eq "music7" ) && ($config{'musicfee'} > "0.00")) {
  4232.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'musicfee'}", "Back Ground Music Fee");
  4233.                 }
  4234.                 if (($form{'MUSIC'} eq "music8" ) && ($config{'musicfee'} > "0.00")) {
  4235.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'musicfee'}", "Back Ground Music Fee");
  4236.                 }
  4237.                 if (($form{'GALLERY'} eq "Yes" ) && ($config{'galleryfee'} > "0.00")) {
  4238.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'galleryfee'}", "Full Featured Picture Gallery Fee");
  4239.                 }  
  4240.                 if (($form{'UPIMAGE1'} ne "") && ($config{'uploadimage1fee'} > "0.00")) {
  4241.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'uploadimagefee1'}", "Auction image 1 upload Fee");
  4242.                 }    
  4243.                 if (($form{'UPIMAGE2'} ne "") && ($config{'uploadimage2fee'} > "0.00")) {
  4244.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'uploadimagefee2'}", "Auction image 2 upload Fee");
  4245.                 }
  4246.                 if (($form{'UPIMAGE3'} ne "") && ($config{'uploadimage3fee'} > "0.00")) {
  4247.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'uploadimagefee3'}", "Auction image 3 upload Fee");
  4248.                 }
  4249.                 if (($form{'UPIMAGE4'} ne "") && ($config{'uploadimage4fee'} > "0.00")) {
  4250.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'uploadimagefee4'}", "Auction image 4 upload Fee");
  4251.                 }  
  4252.                 if (($form{'UPIMAGE5'} ne "") && ($config{'uploadimage5fee'} > "0.00")) {
  4253.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'uploadimagefee5'}", "Auction image 5 upload Fee");
  4254.                 }    
  4255.                 if (($form{'UPIMAGE6'} ne "") && ($config{'uploadimage6fee'} > "0.00")) {
  4256.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'uploadimagefee6'}", "Auction image 6 upload Fee");
  4257.                 }
  4258.                 if (($form{'UPIMAGE7'} ne "") && ($config{'uploadimage7fee'} > "0.00")) {
  4259.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'uploadimagefee7'}", "Auction image 7 upload Fee");
  4260.                 }
  4261.                 if (($form{'UPIMAGE8'} ne "") && ($config{'uploadimage8fee'} > "0.00")) {
  4262.                 &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'uploadimagefee8'}", "Auction image 8 upload Fee");
  4263.                 }    
  4264.                 if (($form{'USECOUNTER'} eq "Yes") && ($config{'counterfee'} > "0.00")) {
  4265.                     &apply_transaction($form{'ALIAS'}, "#$item_number $form{'TITLE'}", "-$config{'counterfee'}", "Auction Page Counter");
  4266.                 }                
  4267.                 ### End Accounting Setup ###
  4268.  
  4269. sleep 2;  # Wait x random seconds to make sure we don't get duplicate item numbers
  4270.  
  4271.               &oops('We are unable to post your item.  This could be a write permissions problem.') unless (open (NEW, ">$config{'basepath'}$form{'CATEGORY'}/$item_number.dat"));
  4272.              
  4273.               print NEW "$form{'TITLE'}\n$form{'RESERVE'}\n$form{'INC'}\n$form{'DESCTITCOLOR'}\n$form{'DESCTITSIZE'}\n$form{'DESCTIT'}\n$form{'DESCCOLOR'}\n$form{'DESCSIZE'}\n$form{'DESC'}\n$form{'IMAGE1'}\n$form{'IMAGE2'}\n$form{'IMAGE3'}\n$form{'IMAGE4'}\n$form{'IMAGE5'}\n$form{'IMAGE6'}\n$form{'IMAGE7'}\n$form{'IMAGE8'}\n$form{'FEAT_YT'}\n$form{'FEAT_BF'}\n$form{'GALLERY'}\n$form{'GRABBER'}\n$form{'DUTCH'}\n$form{'QTY'}\n$form{'BUYIT'}\n$form{'CONDITION'}\n$form{'PAYMENT'}\n$form{'PAYMENTINST'}\n$form{'PAYPALACC'}\n$form{'SHIPPING'}\n$form{'SHIPPFEE1'}\n$form{'SHIPPSERVICE1'}\n$form{'SHIPPFEE2'}\n$form{'SHIPPSERVICE2'}\n$form{'MULTISHIPPING'}\n$form{'SHIPSTO'}\n$form{'INSURANCEFEE'}\n$form{'SALESTAX'}\n$form{'SALESINFO'}\n$form{'RETURN'}\n$form{'RELIST'}\n$form{'RELISTCNT'}\n$form{'MUSIC'}\n$form{'USECOUNTER'}\n$form{'PRIVATE'}\n$form{'CURRENCY'}\n$form{'ADDON6'}\n$form{'ADDON5'}\n$form{'ADDON4'}\n$form{'ADDON3'}\n$form{'ADDON2'}\n$form{'ADDON1'}\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$form{'BID'}\[\]".time."\[\]$form{'ADDRESS1'}\[\]$form{'ADDRESS2'}\[\]$form{'ADDRESS3'}\[\]$form{'OQTY'}";
  4274.                 close NEW;
  4275.                 if ($config{'regdir'} ne "") {
  4276.                         &oops('We could not open the registration file.  This could be a server write issue.') unless (open(REGFILE, ">>$config{'regdir'}/$form{'ALIAS'}.dat"));
  4277.                         if ($config{'flock'}) {
  4278.                         flock(REGFILE, 2);
  4279.                         seek(REGFILE, 0, 2);
  4280.                         }
  4281.                         print REGFILE "\n$form{'CATEGORY'}$item_number";
  4282.                         close REGFILE;                        
  4283.                 }
  4284.  
  4285.                 unlink ("$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat") if ($form{'REPOST'});
  4286.  
  4287.                 if ($form{'UPIMAGE1'} ne "") {
  4288. File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE1'}", "$config{'imagebase'}/$form{'UPIMAGE1'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4289.            }
  4290.  
  4291. ### Thumb Image ###
  4292.                 if ($form{'UPIMAGE1'} ne "") {
  4293. File::Copy::move ("$config{'imagebase'}/thumb/temp/$form{'UPIMAGE1'}", "$config{'imagebase'}/thumb/$form{'UPIMAGE1'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4294.            }
  4295.  
  4296.            if ($form{'UPIMAGE2'} ne "") {
  4297. File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE2'}", "$config{'imagebase'}/$form{'UPIMAGE2'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4298.            }
  4299.  
  4300.            if ($form{'UPIMAGE3'} ne "") {
  4301. File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE3'}", "$config{'imagebase'}/$form{'UPIMAGE3'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4302.            }
  4303.  
  4304.            if ($form{'UPIMAGE4'} ne "") {
  4305. File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE4'}", "$config{'imagebase'}/$form{'UPIMAGE4'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4306.            }
  4307.  
  4308.            if ($form{'UPIMAGE5'} ne "") {
  4309. File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE5'}", "$config{'imagebase'}/$form{'UPIMAGE5'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4310.            }
  4311.  
  4312.            if ($form{'UPIMAGE6'} ne "") {
  4313. File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE6'}", "$config{'imagebase'}/$form{'UPIMAGE6'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4314.            }
  4315.  
  4316.            if ($form{'UPIMAGE7'} ne "") {
  4317. File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE7'}", "$config{'imagebase'}/$form{'UPIMAGE7'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4318.            }
  4319.  
  4320.            if ($form{'UPIMAGE8'} ne "") {
  4321. File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE8'}", "$config{'imagebase'}/$form{'UPIMAGE8'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
  4322.            }
  4323.            &deltempimage;
  4324.  
  4325.                 ###### Add for SUB Cats E-Mail Display ####          
  4326.                 my($disppath, $thispath);
  4327.                 foreach $key (keys %category) {
  4328.                         $disppath = '';
  4329.                         $thispath = $category{$form{'CATEGORY'}};
  4330.                         while($thispath =~ s/^<!--([^\>]*)-->//) {
  4331.                                 if($supercat{$1} ne '') {  
  4332.                                 $disppath .= "$supercat{$1} -> ";
  4333.                                 }                                
  4334.                         }
  4335.                 }
  4336.                 ###### END Add for SUB Cats E-Mail Display ####                
  4337.                 print "<b>Your item was posted under the category:</b> $disppath $thispath<br><b>Item Number:</b> $item_number<br><b>Title:</b> $form{'TITLE'}</b>
  4338. <P>
  4339. <a HREF=\"$config{'scripturl'}?category=$form{'CATEGORY'}\&item=$item_number\">Click Here</a> to confirm placement of your new item.
  4340. <P>
  4341. <center>
  4342. <FORM ACTION=$config{'scripturl'}?action=selectnew METHOD=POST>
  4343. <INPUT TYPE=SUBMIT VALUE=\"Post Another Item\">
  4344. </FORM>
  4345. </center>
  4346. <P>";
  4347.  
  4348. if ($form{'UPIMAGE1'} eq "") {
  4349. print "<FORM>
  4350. <INPUT TYPE=BUTTON VALUE=\"Post A Similar Item\" NAME=\"#TOP\" onClick=\"history.go(-2)\">
  4351. </FORM></center><P>";
  4352. }
  4353.  
  4354. #### Compute posting charges if any #######
  4355.                 my $newpostcost = 0.00;
  4356.                 if ($config{'listingfee'} > 0.00){
  4357.                 $newpostcost = &parsefees($newpostcost + $config{'listingfee'});
  4358.                 }            
  4359.                 my $gboldcost = 0.00;
  4360.                 if ($form{'FEAT_YT'} eq "YES"){                
  4361.                 $gboldcost = &parsefees($gboldcost + $config{'feat_green_fee'});
  4362.                 }                
  4363.                 my $boldcost = 0.00;
  4364.                 if ($form{'FEAT_BF'} eq "YES"){
  4365.                 $boldcost = &parsefees($boldcost + $config{'feat_bold_fee'});
  4366.                 }      
  4367.                 #####
  4368.                 my $grabbercost = 0.00;
  4369.                 if ($form{'GRABBER'} ne "NONE") {
  4370.                 $grabbercost = &parsefees($grabbercost + $config{'grabberfee'});
  4371.                 }
  4372.                 #####
  4373.                 my $musiccost = 0.00;
  4374.                 if ($form{'MUSIC'} ne "NONE") {
  4375.                 $musiccost = &parsefees($musiccost + $config{'musicfee'});
  4376.                 }
  4377.                 #####
  4378.                 my $gallerycost = 0.00;
  4379.                 if ($form{'GALLERY'} eq "Yes"){
  4380.                 $gallerycost = &parsefees($gallerycost + $config{'galleryfee'});
  4381.                 }
  4382.                 #####
  4383.                 my $uploadimagecost1 = 0.00;
  4384.                 if ($form{'UPIMAGE1'} ne "") {
  4385.                 $uploadimagecost1 = &parsefees($uploadimagecost1 + $config{'uploadimagefee1'});
  4386.                 }  
  4387.                 my $uploadimagecost2 = 0.00;
  4388.                 if ($form{'UPIMAGE2'} ne "") {
  4389.                 $uploadimagecost2 = &parsefees($uploadimagecost2 + $config{'uploadimagefee2'});
  4390.                 }  
  4391.                 my $uploadimagecost3 = 0.00;
  4392.                 if ($form{'UPIMAGE3'} ne "") {
  4393.                 $uploadimagecost3 = &parsefees($uploadimagecost3 + $config{'uploadimagefee3'});
  4394.                 }  
  4395.                 my $uploadimagecost4 = 0.00;
  4396.                 if ($form{'UPIMAGE4'} ne "") {
  4397.                 $uploadimagecost4 = &parsefees($uploadimagecost4 +
  4398. $config{'uploadimagefee4'});
  4399.                 }      
  4400.                 my $uploadimagecost5 = 0.00;
  4401.                 if ($form{'UPIMAGE5'} ne "") {
  4402.                 $uploadimagecost5 = &parsefees($uploadimagecost5 + $config{'uploadimagefee5'});
  4403.                 }  
  4404.                 my $uploadimagecost6 = 0.00;
  4405.                 if ($form{'UPIMAGE6'} ne "") {
  4406.                 $uploadimagecost6 = &parsefees($uploadimagecost6 + $config{'uploadimagefee6'});
  4407.                 }  
  4408.                 my $uploadimagecost7 = 0.00;
  4409.                 if ($form{'UPIMAGE7'} ne "") {
  4410.                 $uploadimagecost7 = &parsefees($uploadimagecost7 + $config{'uploadimagefee7'});
  4411.                 }  
  4412.                 my $uploadimagecost8 = 0.00;
  4413.                 if ($form{'UPIMAGE8'} ne "") {
  4414.                 $uploadimagecost8 = &parsefees($uploadimagecost8 +
  4415. $config{'uploadimagefee8'});
  4416.                 }      
  4417.                 ##########
  4418.                 my $counter = 0.00;
  4419.                 if ($form{'USECOUNTER'} eq "Yes") {
  4420.                 $counter = &parsefees($counter + $config{'counterfee'});
  4421.                 }      
  4422.                 ##################################
  4423.                 ######
  4424.                 ##################################
  4425.                 my $totalcost = 0.00;
  4426.                 if ($config{'listingfee'} > 0.00){                        
  4427.                 $totalcost = &parsefees($totalcost + $config{'listingfee'});
  4428.                 }                
  4429.                 if ($form{'FEAT_YT'} eq "YES"){                
  4430.                 $totalcost = &parsefees($totalcost + $config{'feat_green_fee'});
  4431.                 }
  4432.                 if ($form{'FEAT_BF'} eq "YES"){
  4433.                 $totalcost = &parsefees($totalcost + $config{'feat_bold_fee'});
  4434.                 }
  4435.                 ###
  4436.                 if ($form{'GRABBER'} eq "grab1"){
  4437.                 $totalcost = &parsefees($totalcost + $config{'grabberfee'});
  4438.                 }                
  4439.                 if ($form{'GRABBER'} eq "grab2"){
  4440.                 $totalcost = &parsefees($totalcost + $config{'grabberfee'});
  4441.                 }              
  4442.                 if ($form{'GRABBER'} eq "grab3"){
  4443.                 $totalcost = &parsefees($totalcost + $config{'grabberfee'});                
  4444.                 }              
  4445.                 if ($form{'GRABBER'} eq "grab4"){
  4446.                 $totalcost = &parsefees($totalcost + $config{'grabberfee'});
  4447.                 }                
  4448.                 if ($form{'GRABBER'} eq "grab5"){
  4449.                 $totalcost = &parsefees($totalcost + $config{'grabberfee'});
  4450.                 }                
  4451.                 if ($form{'GRABBER'} eq "grab6"){
  4452.                 $totalcost = &parsefees($totalcost + $config{'grabberfee'});
  4453.                 }              
  4454.                 if ($form{'GRABBER'} eq "grab7"){
  4455.                 $totalcost = &parsefees($totalcost + $config{'grabberfee'});
  4456.                 }                
  4457.                 if ($form{'GRABBER'} eq "grab8"){
  4458.                 $totalcost = &parsefees($totalcost + $config{'grabberfee'});
  4459.                 }
  4460.                 ###
  4461.                 if ($form{'MUSIC'} eq "music1"){
  4462.                 $totalcost = &parsefees($totalcost + $config{'musicfee'});
  4463.                 }                
  4464.                 if ($form{'MUSIC'} eq "music2"){
  4465.                 $totalcost = &parsefees($totalcost + $config{'musicfee'});
  4466.                 }
  4467.                 if ($form{'MUSIC'} eq "music3"){
  4468.                 $totalcost = &parsefees($totalcost + $config{'musicfee'});
  4469.                 }
  4470.                 if ($form{'MUSIC'} eq "music4"){
  4471.                 $totalcost = &parsefees($totalcost + $config{'musicfee'});
  4472.                 }
  4473.                 if ($form{'MUSIC'} eq "music5"){
  4474.                 $totalcost = &parsefees($totalcost + $config{'musicfee'});
  4475.                 }
  4476.                 if ($form{'MUSIC'} eq "music6"){
  4477.                 $totalcost = &parsefees($totalcost + $config{'musicfee'});
  4478.                 }
  4479.                 if ($form{'MUSIC'} eq "music7"){
  4480.                 $totalcost = &parsefees($totalcost + $config{'musicfee'});
  4481.                 }
  4482.                 if ($form{'MUSIC'} eq "music8"){
  4483.                 $totalcost = &parsefees($totalcost + $config{'musicfee'});
  4484.                 }
  4485.                 ######
  4486.                 if ($form{'GALLERY'} eq "Yes"){
  4487.                 $totalcost = &parsefees($totalcost + $config{'galleryfee'});
  4488.                 }
  4489.                 #########              
  4490.                 if ($form{'UPIMAGE1'} ne "") {
  4491.                 $totalcost = &parsefees($totalcost + $config{'uploadimagefee1'});
  4492.                 }  
  4493.                 if ($form{'UPIMAGE2'} ne "") {
  4494.                 $totalcost = &parsefees($totalcost + $config{'uploadimagefee2'});
  4495.                 }
  4496.                 if ($form{'UPIMAGE3'} ne "") {
  4497.                 $totalcost = &parsefees($totalcost + $config{'uploadimagefee3'});
  4498.                 }
  4499.                 if ($form{'UPIMAGE4'} ne "") {
  4500.                 $totalcost = &parsefees($totalcost + $config{'uploadimagefee4'});
  4501.                 }
  4502.                 if ($form{'UPIMAGE5'} ne "") {
  4503.                 $totalcost = &parsefees($totalcost + $config{'uploadimagefee5'});
  4504.                 }  
  4505.                 if ($form{'UPIMAGE6'} ne "") {
  4506.                 $totalcost = &parsefees($totalcost + $config{'uploadimagefee6'});
  4507.                 }
  4508.                 if ($form{'UPIMAGE7'} ne "") {
  4509.                 $totalcost = &parsefees($totalcost + $config{'uploadimagefee7'});
  4510.                 }
  4511.                 if ($form{'UPIMAGE8'} ne "") {
  4512.                 $totalcost = &parsefees($totalcost + $config{'uploadimagefee8'});
  4513.                 }      
  4514.                 if ($form{'USECOUNTER'} eq "Yes"){
  4515.                 $totalcost = &parsefees($totalcost + $config{'counterfee'});
  4516.                 }
  4517.                 if ($totalcost > 0.00) {
  4518. #### Sends the seller a E-Mail of charges if any #######
  4519. if ($config{'newpostbill'} eq "on") {
  4520. &sendemail($form{'EMAIL'}, $config{'admin_address'}, 'New Auction Listing Bill,',
  4521. "Dear $form{'ALIAS'}
  4522.  
  4523. This is your receipt of extra features you selected when you posted
  4524. your new auction item at $config{'sitename'}
  4525.  
  4526. Title: $form{'TITLE'} (Item #: $item_number)
  4527. Category: $disppath $thispath                                          
  4528. Your Email: $form{'EMAIL'}
  4529.  
  4530. New Auction Listing Fee $config{'currencytype'}$newpostcost
  4531. Your charges for extra listing feature(s):
  4532. Main Page Picture Gallery Featured $config{'currencytype'}$gallerycost
  4533. Back Ground Color Listing $config{'currencytype'}$gboldcost
  4534. Bold Font Listing $config{'currencytype'}$boldcost
  4535. Att Grabber Icon $config{'currencytype'}$grabbercost
  4536. BackGround Music $config{'currencytype'}$musiccost
  4537. Auction Image 1 Upload Fee $config{'currencytype'}$uploadimagecost1
  4538. Auction Image 2 Upload Fee $config{'currencytype'}$uploadimagecost2
  4539. Auction Image 3 Upload Fee $config{'currencytype'}$uploadimagecost3
  4540. Auction Image 4 Upload Fee $config{'currencytype'}$uploadimagecost4
  4541. Auction Image 5 Upload Fee $config{'currencytype'}$uploadimagecost5
  4542. Auction Image 6 Upload Fee $config{'currencytype'}$uploadimagecost6
  4543. Auction Image 7 Upload Fee $config{'currencytype'}$uploadimagecost7
  4544. Auction Image 8 Upload Fee $config{'currencytype'}$uploadimagecost8
  4545. Auction Item Counter $config{'currencytype'}$counter
  4546. Total Cost of special listings $config{'currencytype'}$totalcost
  4547.  
  4548. This is due and payable by the end of the month.
  4549. You can make a payment by using the mail in form below,
  4550. or pay online by loging into your account at: $config{'scripturl'}?action=accountlogin
  4551.  
  4552. Thanks for choosing $config{'sitename'}
  4553.  
  4554.  
  4555. ###################### Mail In Payment Form ##########################\n\n
  4556. Your Name:__________________________________________________________\n
  4557. Your user name:_____________________________________________________\n
  4558. Address: ___________________________________________________________\n
  4559. City and State: ____________________________________________________\n
  4560. Auction Item Number: _______________________________________________\n
  4561. amount of Payment: $config{'currencytype'}_______________\n\n
  4562. Make Checks payable to:
  4563. $config{'checkpayableto'}
  4564. and send to:
  4565. $config{'checkpayableto'}
  4566. $config{'mailingaddress'}
  4567. $config{'cityandstate'}");
  4568.             }
  4569. }
  4570. #### End compute charges and Sends the seller a E-Mail of charges if any #######
  4571.                              
  4572. #### Sends the seller a comfirmation E-Mail #######
  4573. &sendemail($form{'EMAIL'}, $config{'admin_address'}, 'Your New Auction Listing,',
  4574. "Dear $form{'ALIAS'}
  4575.  
  4576. This note is to confirm your new listing at $config{'sitename'}
  4577. Title: $form{'TITLE'} (Item #: $item_number)
  4578. Category: $disppath $thispath
  4579.  
  4580. Your Alias: $form{'ALIAS'}
  4581. Your Email: $form{'EMAIL'}
  4582.  
  4583. Started: $nowtime
  4584. Closes: $closetime
  4585.  
  4586. Starting Bid: $form{'CURRENCY'}$form{'BID'}
  4587. Increment: $form{'CURRENCY'}$form{'INC'}
  4588. Reserve: $form{'CURRENCY'}$form{'RESERVE'}
  4589. BuyItNow Price: $form{'CURRENCY'}$form{'BUYIT'}
  4590.  
  4591. View Your Item At:
  4592. $config{'scripturl'}?category=$form{'CATEGORY'}\&item=$item_number
  4593.  
  4594. Thanks for choosing $config{'sitename'}");
  4595. ########## End send the seller a Confirmation E-Mail ######  
  4596.  
  4597. #### Sends the site Admin a comfirmation E-Mail #######
  4598. if ($config{'newitemsendtoadmin'} eq "on") {
  4599. &sendemail($config{'admin_address'}, $config{'admin_address'}, 'Your New Auction Listing,',
  4600. "Dear $form{'ALIAS'}
  4601.  
  4602. This note is to confirm your new listing at $config{'sitename'}
  4603. Title: $form{'TITLE'} (Item #: $item_number)
  4604. Category: $thispath $disppath
  4605.  
  4606. Sellers Alias: $form{'ALIAS'}
  4607. Sellers Email: $form{'EMAIL'}
  4608.  
  4609. Item Started: $nowtime
  4610. Item Closes: $closetime
  4611.  
  4612. Starting Bid: $form{'CURRENCY'}$form{'BID'}
  4613. Increment: $form{'CURRENCY'}$form{'INC'}
  4614. Reserve: $form{'CURRENCY'}$form{'RESERVE'}
  4615. BuyItNow Price: $form{'ITEMCURRENCY'}$form{'BUYIT'}
  4616.  
  4617. View This Item At:
  4618. $config{'scripturl'}?category=$form{'CATEGORY'}\&item=$item_number");
  4619. ########## End send the site Admin a Confirmation E-Mail ######
  4620.     }                                        
  4621.  }  
  4622. ############### Preview New Post #####################################
  4623.         else {                
  4624.        
  4625.         my $bidhistory;
  4626.         if ($form{'PRIVATE'} eq 'no') {
  4627.         $bidhistory = "(bid history)</a>";
  4628.         }    
  4629.         if ($form{'PRIVATE'} eq 'yes') {
  4630.         $bidhistory = "<font COLOR=\"RED\">Private Bids Not Displayed</font>";      
  4631.         }
  4632.  
  4633.         my $sold;
  4634.         if ($form{'DUTCH'} eq 'yes') {
  4635.         $sold = "Number Sold: <b>None</b>";
  4636.         }
  4637.         if ($form{'DUTCH'} eq 'no') {
  4638.         $sold = "";
  4639.         }
  4640.  
  4641.         my $reservemsg = "";              
  4642.         $reservemsg = "<font FACE=\"Arial\" COLOR=\"#FFOOOO\" size=\"2\">(No Reserve)</font> " if (($form{'RESERVE'} <= 0)  && ($form{'DUTCH'} eq 'no'));
  4643.        $reservemsg = "<font FACE=\"Arial\" COLOR=\"#FFOOOO\" size=\"2\">(Reserve Not Met)</font> " if (($form{'RESERVE'} > 0)  && ($form{'DUTCH'} eq 'no'));
  4644.         $reservemsg = "<font FACE=\"Arial\" COLOR=\"#FFOOOO\" size=\"2\">(Dutch Fixed Price)</font> " if ($form{'DUTCH'} eq 'yes');
  4645.  
  4646.           my $bgmusic = "";
  4647.           $bgmusic = "$config{'music1'}" if ($form{'MUSIC'} eq "music1");
  4648.           $bgmusic = "$config{'music2'}" if ($form{'MUSIC'} eq "music2");
  4649.           $bgmusic = "$config{'music3'}" if ($form{'MUSIC'} eq "music3");
  4650.           $bgmusic = "$config{'music4'}" if ($form{'MUSIC'} eq "music4");
  4651.           $bgmusic = "$config{'music5'}" if ($form{'MUSIC'} eq "music5");
  4652.           $bgmusic = "$config{'music6'}" if ($form{'MUSIC'} eq "music6");
  4653.           $bgmusic = "$config{'music7'}" if ($form{'MUSIC'} eq "music7");
  4654.           $bgmusic = "$config{'music8'}" if ($form{'MUSIC'} eq "music8");
  4655.  
  4656.      my $imagedisp1 = "$form{'IMAGE1'}" if ($form{'IMAGE1'} ne "");
  4657.      my $imagedisp2 = "$form{'IMAGE2'}" if ($form{'IMAGE2'} ne "");
  4658.      my $imagedisp3 = "$form{'IMAGE3'}" if ($form{'IMAGE3'} ne "");
  4659.      my $imagedisp4 = "$form{'IMAGE4'}" if ($form{'IMAGE4'} ne "");
  4660.      my $imagedisp5 = "$form{'IMAGE5'}" if ($form{'IMAGE5'} ne "");
  4661.      my $imagedisp6 = "$form{'IMAGE6'}" if ($form{'IMAGE6'} ne "");
  4662.      my $imagedisp7 = "$form{'IMAGE7'}" if ($form{'IMAGE7'} ne "");
  4663.      my $imagedisp8 = "$form{'IMAGE8'}" if ($form{'IMAGE8'} ne "");
  4664.  
  4665.      $imagedisp1 = "$config{'imagetempurl'}$form{'UPIMAGE1'}" if ($form{'UPIMAGE1'} ne "");
  4666.      $imagedisp2 = "$config{'imagetempurl'}$form{'UPIMAGE2'}" if ($form{'UPIMAGE2'} ne "");
  4667.      $imagedisp3 = "$config{'imagetempurl'}$form{'UPIMAGE3'}" if ($form{'UPIMAGE3'} ne "");
  4668.      $imagedisp4 = "$config{'imagetempurl'}$form{'UPIMAGE4'}" if ($form{'UPIMAGE4'} ne "");
  4669.      $imagedisp5 = "$config{'imagetempurl'}$form{'UPIMAGE5'}" if ($form{'UPIMAGE5'} ne "");
  4670.      $imagedisp6 = "$config{'imagetempurl'}$form{'UPIMAGE6'}" if ($form{'UPIMAGE6'} ne "");
  4671.      $imagedisp7 = "$config{'imagetempurl'}$form{'UPIMAGE7'}" if ($form{'UPIMAGE7'} ne "");
  4672.      $imagedisp8 = "$config{'imagetempurl'}$form{'UPIMAGE8'}" if ($form{'UPIMAGE8'} ne "");
  4673.  
  4674.         my $pay;
  4675.         if ($form{'PAYPALACC'} ne "") {
  4676.         $pay = "PayPal.com ";
  4677.         }
  4678.         else {
  4679.         $pay = "";
  4680.         }
  4681.  
  4682. if ($config{'backgroungmusic'} eq 'yes') {
  4683.     print <<"EOF";
  4684. <embed src="$bgmusic" width="0" height="0" loop="true" autoplay="true" hidden="true">
  4685. EOF
  4686. }
  4687.  
  4688. print <<"EOF";
  4689. <div align="center">
  4690. <table border="0" cellspacing="0" width="100%" bgcolor="$config{'colortablehead'}">
  4691.   <tr>
  4692.     <td align="center" width="100%"></B></a><font size="4"><b>Title: $form{'TITLE'} - Preview</b></font></td>
  4693.   </tr>  
  4694. </table>
  4695. </div>
  4696.  
  4697. <p></p>
  4698.  
  4699. <p align="center">Current Time: $nowtime $config{'timezone'}</p>
  4700.  
  4701. <div align="center">
  4702. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  4703.   <tr>
  4704.     <td width="10%" rowspan="10" valign="top" align="left"><a href="#DESC"><img src=$config{'descicon'} alt="Show description"
  4705.     border="0" width="50" HEIGHT="50"></a><br>
  4706.     <a href="#BID"><img src=$config{'bidicon'} alt="Bid!"
  4707.     border="0" width="50" HEIGHT="50"></a><br>
  4708.     </td>
  4709.     <td width="30%">Current Bid: <b>$form{'CURRENCY'}$form{'BID'}</b> $reservemsg</td>
  4710.     <td width="1%"></td>
  4711.     <td width="30%">First bid: <b>$form{'CURRENCY'}$form{'BID'}</b> </td>    
  4712.   </tr>
  4713.   <tr>
  4714.     <td width="30%">Dutch Auction: <b>$form{'DUTCH'}</b></td>
  4715.     <td width="1%"></td>
  4716.     <td width="30%">Quantity: <b>$form{'QTY'}</b>  $sold</td>    
  4717.   </tr>
  4718.   <tr>
  4719.     <td width="30%">Time left: <b>$timeremain</b></td>
  4720.     <td width="1%"></td>
  4721.     <td width="30%">Number of bids: <b>0</b> $bidhistory</td>    
  4722.   </tr>
  4723.   <tr>
  4724.     <td width="30%">Started: <b>$nowtime</b></td>
  4725.     <td width="1%"></td>
  4726.     <td width="30%">Location: $form{'ADDRESS3'}<b></b></td>    
  4727.   </tr>
  4728.   <tr>
  4729.     <td width="30%">Ends: <b>$closetime</b></td>
  4730.     <td width="1%"></td>
  4731.     <td width="30%">Send To Friend:(mail this auction to a friend)</td>  
  4732.   </tr>
  4733.   <tr>
  4734.     <td width="30%">Track this item: (add to your list)</td>
  4735.     <td width="1%"></td>
  4736.     <td width="30%">Ask seller a Question: (ask or view Q&A)</td>  
  4737.   </tr>
  4738.  
  4739.   <tr>
  4740.     <td width="30%">Item Payment: $pay <a href="#PAYMENTACCEPTED">See Details</a></td>
  4741.     <td width="1%"></td>
  4742.     <td width="30%">Shipping: $form{'CURRENCY'}$form{'SHIPPFEE1'} <a href="#SHIPPINGINS">See Details</a></b></td>
  4743.   </tr>
  4744.  
  4745. </table>
  4746. </div>
  4747. </font>
  4748.  
  4749. <div align="center">
  4750. <table border="0" cellpadding="8" cellspacing="0" width="100%">    
  4751.   <tr>
  4752.     <td><p></td>  
  4753.   </tr>
  4754.  <tr>
  4755.     <td width="50%">Seller:(view seller's feedback)(view sellers other auctions)</td>  
  4756.   </tr>
  4757.   <tr>
  4758.     <td><p></td>  
  4759.   </tr>      
  4760.   <tr>
  4761.     <td width="50%">High bidder: No Bids</td>    
  4762.   </tr>  
  4763.   <tr>
  4764.     <td><p></td>  
  4765.   </tr>
  4766.   <tr>
  4767.     <td width="30%">Condition of Item: <b>$form{'CONDITION'}</b></td>  
  4768.   </tr>        
  4769.   <tr>
  4770.     <td><p></td>  
  4771.   </tr>
  4772.   <tr>      
  4773.     <td width="50%">Seller: You may update your item Description, change relist, or Delete this auction if there are no bids. if there are bids you can not delete it only add to your Description.
  4774.   </td>
  4775.   <tr>
  4776.     <td><p></td>  
  4777.   </tr>
  4778.   <tr>
  4779.     <td><p align="center"><font size=2 face="Arial"><center>Seller assumes all responsibility for listing this item.<br>
  4780.     You should contact the seller to resolve any questions before bidding.<br>
  4781.     Currency is $form{'CURRENCY'} unless otherwise noted.</center></font></td>
  4782.   </tr>
  4783. </table>
  4784. </div>
  4785.  
  4786. <div align="center">
  4787. <table border="0" style="border-bottom: 2px solid purple;" cellspacing="0" width="100%" bgcolor="$config{'colortablehead'}">
  4788.   <tr>
  4789.     <td align="center" width="100%"></B></a><font size="4"><b><a name="DESC"></a><center>Description</center></b></font></td>
  4790.   </tr>
  4791. </table>
  4792. </div>
  4793.  
  4794. <div align="center">
  4795. <table border="0" cellspacing="0" width=675>
  4796.   <tr>
  4797.     <td>
  4798. <blockquote>
  4799. <p>$form{'DESCTITCOLOR'}</p>
  4800. <p>$form{'DESCTITSIZE'}</p>
  4801. <p><center>$form{'DESCTIT'}</center></p>
  4802. </font></font></BOLD></b></I></U></H1></H2></H3></H4></H5></center></HTML></BODY></HEAD>
  4803. </blockquote>
  4804.    </td>
  4805.    </tr>
  4806. </table>
  4807. </div>
  4808.  
  4809. <div align="center">
  4810. <table border="0" cellspacing="0" width="675">
  4811.   <tr>
  4812.     <td>
  4813. <blockquote>
  4814. <p>$form{'DESCCOLOR'}</p>
  4815. <p>$form{'DESCSIZE'}</p>
  4816. <p>$form{'DESC'}</p>
  4817. </font></font></BOLD></b></I></U></H1></H2></H3></H4></H5></center></HTML></BODY></HEAD>
  4818. </blockquote>
  4819.    </td>
  4820.    </tr>
  4821. </table>
  4822. </div>
  4823.  
  4824. <div align="center">
  4825. <SCRIPT LANGUAGE="JavaScript">
  4826. function EnlargeImage(name) {
  4827. newsrc = name;
  4828. document.images.large.src = newsrc;
  4829. }
  4830. </SCRIPT>
  4831. EOF
  4832. if ($imagedisp1) {
  4833. print <<"EOF";
  4834. <table align="center" border="0" width="85%">
  4835. <tr>
  4836. <td><img name="large" SRC="$imagedisp1" border="0"><br><br><br></td>      
  4837. EOF
  4838. }
  4839. if ($imagedisp2) {
  4840. print <<"EOF";
  4841. <td>
  4842. <table border="0"><tr><td colspan="2" align="center"><b>Click Thumbnails For Larger Picture</b></td>
  4843. </tr>
  4844. EOF
  4845. }
  4846. if ($imagedisp2) {
  4847. print <<"EOF";
  4848. <tr>
  4849. <td><a href="javascript:EnlargeImage('$imagedisp1')"><img SRC="$imagedisp1" border="0" width="75"></a></td>
  4850. EOF
  4851. }
  4852. if ($imagedisp2) {
  4853. print <<"EOF";
  4854. <td><a href="javascript:EnlargeImage('$imagedisp2')"><img SRC="$imagedisp2" border="0" width="75"></a></td>
  4855. </tr>
  4856. EOF
  4857. }
  4858. if ($imagedisp3) {
  4859. print <<"EOF";
  4860. <tr>
  4861. <td><a href="javascript:EnlargeImage('$imagedisp3')"><img SRC="$imagedisp3" border="0" width="75"></a></td>
  4862. EOF
  4863. }
  4864. if ($imagedisp4) {
  4865. print <<"EOF";
  4866. <td><a href="javascript:EnlargeImage('$imagedisp4')"><img SRC="$imagedisp4" border="0" width="75"></a></td>
  4867. EOF
  4868. }
  4869. if ($imagedisp1) {
  4870. print <<"EOF";
  4871. </tr>
  4872. </table>
  4873. </tr>
  4874. </table>
  4875. </div>
  4876. EOF
  4877. }
  4878.  
  4879. print <<"EOF";
  4880. </table>
  4881. </div>
  4882.  
  4883. <div align="center">
  4884. <table border="0" cellspacing="0" width="100%" bgcolor="$config{'colortablehead'}">
  4885.   <tr>
  4886.     <td align="center" width="100%"></B></a><font size="4"><b><a name="SHIPPINGINS"></a>Sellers Shipping Methods</b></font></td>
  4887.   </tr>
  4888. </table>
  4889. </div>
  4890.  
  4891. <div align="center">
  4892. <table border="0" cellspacing="0" width=675>  
  4893.    <tr>
  4894.     <td><p><br></td>  
  4895.   </tr>
  4896.   <tr>
  4897.     <td width="20%"><b>Shipping Cost</b></td>
  4898.     <td width="1%"></td>
  4899.     <td width="20%"><b>Services Available</b></td>
  4900.     <td width="1%"></td>
  4901.     <td width="20%"><b>Available to</b></td>
  4902.  </tr>
  4903.  <tr>
  4904.     <td width="20%">Shipping: $form{'CURRENCY'}$form{'SHIPPFEE1'}</td>
  4905.     <td width="1%"></td>
  4906.     <td width="20%">$form{'SHIPPSERVICE1'}</td>
  4907.     <td width="1%"></td>
  4908.     <td width="20%">$form{'SHIPSTO'}</td>
  4909.  </tr>
  4910.  <tr>
  4911.     <td width="20%">Shipping: $form{'CURRENCY'}$form{'SHIPPFEE2'}</td>
  4912.     <td width="1%"></td>
  4913.     <td width="20%">$form{'SHIPPSERVICE2'}</td>
  4914.     <td width="1%"></td>
  4915.     <td width="20%"></td>
  4916.  </tr>
  4917.  <tr>
  4918.     <td width="20%">Insurance: $form{'CURRENCY'}$form{'INSURANCEFEE'}</td>
  4919.     <td width="1%"></td>
  4920.     <td width="20%"></td>
  4921.     <td width="1%"></td>
  4922.     <td width="20%"></td>
  4923.  </tr>
  4924. <tr>
  4925.     <td width="20%">Additional Item(s) Shipping fee: $form{'CURRENCY'}$form{'MULTISHIPPING'}</td>
  4926.     <td width="1%"></td>
  4927.     <td width="20%"></td>
  4928.     <td width="1%"></td>
  4929.     <td width="20%"></td>
  4930.  </tr>
  4931.   <tr>
  4932.     <td><p><br></td>  
  4933.   </tr>
  4934.  </table>
  4935. </div>
  4936.  
  4937. <div align="center">
  4938. <table border="0" cellspacing="0" width="100%" bgcolor="$config{'colortablehead'}">
  4939.   <tr>
  4940.     <td align="center" width="100%"></B></a><font size="4"><b><a name="SALESTAXINS"></a>Sales Tax Info</b></font></td>
  4941.   </tr>
  4942. </table>
  4943. </div>
  4944.  
  4945. <div align="center">
  4946. <table border="0" cellspacing="0" width=675>
  4947.   <tr>
  4948.     <td><p><br></td>  
  4949.   </tr>
  4950.  <tr>
  4951.     <td>Sales Tax: $form{'SALESTAX'}</td>
  4952.   </tr>
  4953.  <tr>
  4954.     <td><p><br></td>
  4955.   </tr>
  4956.  <tr>
  4957.     <td>Sales Tax Info: $form{'SALESINFO'}</td>
  4958.   </tr>
  4959.   <tr>
  4960.     <td><p><br></td>  
  4961.   </tr>
  4962. </table>
  4963. </div>
  4964.  
  4965. <div align="center">
  4966. <table border="0" cellspacing="0" width="100%" bgcolor="$config{'colortablehead'}">
  4967.   <tr>
  4968.     <td align="center" width="100%"></B></a><font size="4"><b><a name="RETURNINST"></a>Seller Return Policy:</b></font></td>
  4969.   </tr>
  4970. </table>
  4971. </div>
  4972.  
  4973. <div align="center">
  4974. <table border="0" cellspacing="0" width=675>  
  4975.   <tr>
  4976.     <td><p><br></td>  
  4977.   </tr>
  4978.   <tr>
  4979.     <td>$form{'RETURN'}</td>  
  4980.   </tr>
  4981.   <tr>
  4982.     <td><p><br></td>  
  4983.   </tr>
  4984. </table>
  4985. </div>
  4986.  
  4987. <div align="center">
  4988. <table border="0" cellspacing="0" width="100%" bgcolor="$config{'colortablehead'}">
  4989.   <tr>
  4990.     <td align="center" width="100%"></B></a><font size="4"><b><a name="PAYMENTINST"></a>Sellers Payment Instructions</b></font></td>
  4991.   </tr>
  4992. </table>
  4993. </div>
  4994.  
  4995. <div align="center">
  4996. <table border="0" cellspacing="0" width=675>  
  4997.   <tr>
  4998.     <td><p><br></td>  
  4999.   </tr>
  5000.   <tr>
  5001.     <td>$form{'PAYMENTINST'}</td>  
  5002.   </tr>
  5003.   <tr>
  5004.     <td><p><br></td>  
  5005.   </tr>
  5006. </table>
  5007. </div>
  5008. EOF
  5009.  
  5010. if ($form{'PAYPALACC'} ne "") {
  5011. print <<"EOF";
  5012. <div align="center">
  5013. <table border="0" cellspacing="0" width="100%" bgcolor="$config{'colortablehead'}">
  5014.   <tr>
  5015.     <td align="center" width="100%"></B></a><font size="4"><b><a name="PAYMENTACCEPTED"></a>Sellers Payment Methods Accepted</b></font></td>
  5016.   </tr>
  5017. </table>
  5018. </div>
  5019.  
  5020. <div align="center">
  5021. <table border="0" cellspacing="0" width=675>  
  5022.   <tr>
  5023.     <td><p><br></td>  
  5024.   </tr>
  5025.   <tr>
  5026.     <td><img src="$config{'imagedir'}/payusingpaypal.gif">
  5027.   </tr>
  5028.   <tr>
  5029.     <td><p><br></td>  
  5030.   </tr>
  5031. </table>
  5032. </div>
  5033. EOF
  5034. }
  5035. else {
  5036. print <<"EOF";
  5037. <div align="center">
  5038. <table border="0" cellspacing="0" width="100%" bgcolor="$config{'colortablehead'}">
  5039.   <tr>
  5040.     <td align="center" width="100%"></B></a><font size="4"><b><a name="PAYMENTACCEPTED"></a>Sellers Payment Methods Accepted</b></font></td>
  5041.   </tr>
  5042. </table>
  5043.  
  5044. <div align="center">
  5045. <table border="0" cellspacing="0" width=675>  
  5046.   <tr>
  5047.     <td><p><br></td>  
  5048.   </tr>
  5049. </div>
  5050.   <tr>
  5051.     <td>$form{'PAYMENT'}</td>  
  5052.   </tr>
  5053.   <tr>
  5054.     <td><p><br></td>  
  5055.   </tr>
  5056.   <tr>
  5057.     <td>PayPal not execpted</td>  
  5058.   </tr>
  5059.   <tr>
  5060.     <td><p><br></td>  
  5061.   </tr>
  5062. </table>
  5063. </div>
  5064. EOF
  5065. }
  5066.  
  5067.                 #-####### For billing of Featured addon extras ########
  5068.                 print "<table width=100%><tr><td bgcolor=$config{'colortablehead'}>";
  5069.                 print "<font size=+2><b><center>Auction Item Posting Charges</center></b></font></td</tr></table>";
  5070.                
  5071.                 my $totalcost2 = 0.00;
  5072.                 if ($config{'listingfee'} > 0.00){
  5073.                 print "New Auction Listing Fee: <b>$config{'listingfee'}</b><br>";
  5074.                 $totalcost2 = &parsefees($totalcost2 + $config{'listingfee'});
  5075.                 }
  5076.                 if ($form{'FEAT_YT'} eq "YES"){
  5077.                 print "Back Ground Highlighted Title: <b>$config{'feat_green_fee'}</b><br>";
  5078.                 $totalcost2 = &parsefees($totalcost2 + $config{'feat_green_fee'});
  5079.                 }
  5080.                 if ($form{'FEAT_BF'} eq "YES"){
  5081.                 print "Bold Faced Title: <b>$config{'feat_bold_fee'}</b><br>";
  5082.                 $totalcost2 = &parsefees($totalcost2 + $config{'feat_bold_fee'});
  5083.                 }
  5084.                 ##
  5085.                 if ($form{'GRABBER'} eq "grab1"){
  5086.                 print "Title Att Grabber: <b>$config{'grabberfee'}</b><br>";
  5087.                 $totalcost2 = &parsefees($totalcost2 + $config{'grabberfee'});
  5088.                 }
  5089.                 if ($form{'GRABBER'} eq "grab2"){
  5090.                 print "Title Att Grabber: <b>$config{'grabberfee'}</b><br>";
  5091.                 $totalcost2 = &parsefees($totalcost2 + $config{'grabberfee'});
  5092.                 }
  5093.                 if ($form{'GRABBER'} eq "grab3"){
  5094.                 print "Title Att Grabber: <b>$config{'grabberfee'}</b><br>";
  5095.                 $totalcost2 = &parsefees($totalcost2 + $config{'grabberfee'});
  5096.                 }
  5097.                 if ($form{'GRABBER'} eq "grab4"){
  5098.                 print "Title Att Grabber: <b>$config{'grabberfee'}</b><br>";
  5099.                 $totalcost2 = &parsefees($totalcost2 + $config{'grabberfee'});
  5100.                 }
  5101.                 if ($form{'GRABBER'} eq "grab5"){
  5102.                 print "Title Att Grabber: <b>$config{'grabberfee'}</b><br>";
  5103.                 $totalcost2 = &parsefees($totalcost2 + $config{'grabberfee'});
  5104.                 }
  5105.                 if ($form{'GRABBER'} eq "grab6"){
  5106.                 print "Title Att Grabber: <b>$config{'grabberfee'}</b><br>";
  5107.                 $totalcost2 = &parsefees($totalcost2 + $config{'grabberfee'});
  5108.                 }
  5109.                 if ($form{'GRABBER'} eq "grab7"){
  5110.                 print "Title Att Grabber: <b>$config{'grabberfee'}</b><br>";
  5111.                 $totalcost2 = &parsefees($totalcost2 + $config{'grabberfee'});
  5112.                 }
  5113.                 if ($form{'GRABBER'} eq "grab8"){
  5114.                 print "Title Att Grabber: <b>$config{'grabberfee'}</b><br>";
  5115.                 $totalcost2 = &parsefees($totalcost2 + $config{'grabberfee'});
  5116.                 }
  5117.                 ######
  5118.                 if ($form{'MUSIC'} eq "music1"){
  5119.                 print "Back Ground Music: <b>$config{'musicfee'}</b><br>";
  5120.                 $totalcost2 = &parsefees($totalcost2 + $config{'musicfee'});
  5121.                 }
  5122.                 if ($form{'MUSIC'} eq "music2"){
  5123.                 print "Back Ground Music: <b>$config{'musicfee'}</b><br>";
  5124.                 $totalcost2 = &parsefees($totalcost2 + $config{'musicfee'});
  5125.                 }
  5126.                 if ($form{'MUSIC'} eq "music3"){
  5127.                 print "Back Ground Music: <b>$config{'musicfee'}</b><br>";
  5128.                 $totalcost2 = &parsefees($totalcost2 + $config{'musicfee'});
  5129.                 }
  5130.                 if ($form{'MUSIC'} eq "music4"){
  5131.                 print "Back Ground Music: <b>$config{'musicfee'}</b><br>";
  5132.                 $totalcost2 = &parsefees($totalcost2 + $config{'musicfee'});
  5133.                 }
  5134.                 if ($form{'MUSIC'} eq "music5"){
  5135.                 print "Back Ground Music: <b>$config{'musicfee'}</b><br>";
  5136.                 $totalcost2 = &parsefees($totalcost2 + $config{'musicfee'});
  5137.                 }
  5138.                 if ($form{'MUSIC'} eq "music6"){
  5139.                 print "Back Ground Music: <b>$config{'musicfee'}</b><br>";
  5140.                 $totalcost2 = &parsefees($totalcost2 + $config{'musicfee'});
  5141.                 }
  5142.                 if ($form{'MUSIC'} eq "music7"){
  5143.                 print "Back Ground Music: <b>$config{'musicfee'}</b><br>";
  5144.                 $totalcost2 = &parsefees($totalcost2 + $config{'musicfee'});
  5145.                 }
  5146.                 if ($form{'MUSIC'} eq "music8"){
  5147.                 print "Back Ground Music: <b>$config{'musicfee'}</b><br>";
  5148.                 $totalcost2 = &parsefees($totalcost2 + $config{'musicfee'});
  5149.                 }
  5150.                 #######
  5151.                 if ($form{'GALLERY'} eq "Yes"){
  5152.                 print "Gallery Featured: <b>$config{'galleryfee'}</b><br>";
  5153.                 $totalcost2 = &parsefees($totalcost2 + $config{'galleryfee'});
  5154.                 }
  5155.                 ############
  5156.                 if ($form{'UPIMAGE1'} ne "") {
  5157.                 print "Image 1 upload fee: <b>$config{'uploadimagefee1'}</b><br>";
  5158.                 $totalcost2 = &parsefees($totalcost2 + $config{'uploadimagefee1'});
  5159.                 }    
  5160.                 if ($form{'UPIMAGE2'} ne "") {
  5161.                 print "Image 2 upload fee: <b>$config{'uploadimagefee2'}</b><br>";
  5162.                 $totalcost2 = &parsefees($totalcost2 + $config{'uploadimagefee2'});
  5163.                 }  
  5164.                 if ($form{'UPIMAGE3'} ne "") {
  5165.                 print "Image 3 upload fee: <b>$config{'uploadimagefee3'}</b><br>";
  5166.                 $totalcost2 = &parsefees($totalcost2 + $config{'uploadimagefee3'});
  5167.                 }  
  5168.                 if ($form{'UPIMAGE4'} ne "") {
  5169.                 print "Image 4 upload fee: <b>$config{'uploadimagefee4'}</b><br>";
  5170.                 $totalcost2 = &parsefees($totalcost2 + $config{'uploadimagefee4'});
  5171.                 }    
  5172.                 if ($form{'UPIMAGE5'} ne "") {
  5173.                 print "Image 5 upload fee: <b>$config{'uploadimagefee1'}</b><br>";
  5174.                 $totalcost2 = &parsefees($totalcost2 + $config{'uploadimagefee5'});
  5175.                 }    
  5176.                 if ($form{'UPIMAGE6'} ne "") {
  5177.                 print "Image 6 upload fee: <b>$config{'uploadimagefee6'}</b><br>";
  5178.                 $totalcost2 = &parsefees($totalcost2 + $config{'uploadimagefee6'});
  5179.                 }  
  5180.                 if ($form{'UPIMAGE7'} ne "") {
  5181.                 print "Image 7 upload fee: <b>$config{'uploadimagefee7'}</b><br>";
  5182.                 $totalcost2 = &parsefees($totalcost2 + $config{'uploadimagefee7'});
  5183.                 }  
  5184.                 if ($form{'UPIMAGE8'} ne "") {
  5185.                 print "Image 8 upload fee: <b>$config{'uploadimagefee8'}</b><br>";
  5186.                 $totalcost2 = &parsefees($totalcost2 + $config{'uploadimagefee8'});
  5187.                 }            
  5188.                 ##########
  5189.                 if ($form{'USECOUNTER'} eq "Yes") {
  5190.                 print "Auction Item Counter : <b>$config{'counterfee'}</b><br>";
  5191.                 $totalcost2 = &parsefees($totalcost2 + $config{'counterfee'});
  5192.                 }                
  5193.                 #############
  5194.                 if ($totalcost2 == 0.00){
  5195.                 print "You selected not to add any additional features!<br>";
  5196.                 }                    
  5197.                 print "<hr><b>Total Costs = $config{'currencytype'}$totalcost2</b><br>";
  5198.                 if (($totalcost2 > 0.00) & ($config{'newpostbill'} eq "on")) {
  5199.                 print "<b>This bill will be E-Mailed to you shortly, read and follow the instructions in the billing.</b></p>";
  5200.                 }
  5201.                 #-####### End For billing of Featured addon extras ########
  5202.                 print "<HR><b><FORM ACTION=$config{'scripturl'} METHOD=POST><center>If this looks good, hit</center><BR>";
  5203.                 print "<center><INPUT TYPE=SUBMIT VALUE=\"Sell It!\"></center><BR>";
  5204.                 print "<center>otherwise hit the back button on your browser to edit the item.<INPUT TYPE=HIDDEN NAME=FROMPREVIEW VALUE=1></center></b>\n";
  5205.  
  5206.                 my $key;
  5207.                 foreach $key (keys %form) {
  5208.                         $form{$key} =~ s/\>/\[greaterthansign\]/gs;
  5209.                         $form{$key} =~ s/\</\[lessthansign\]/gs;
  5210.                         $form{$key} =~ s/\"/\[quotes\]/gs;
  5211.                         print "<INPUT TYPE=hidden NAME=\"$key\" VALUE=\"$form{$key}\">\n";
  5212.                 }                
  5213.                 print "</FORM>\n";                
  5214.         }                                          
  5215. }
  5216.  
  5217. #-#########################################
  5218. # Double post eliminator
  5219. # prevent double posts
  5220.  
  5221. sub double_check {
  5222.              my $lastbid = pop;
  5223.              $lastbid =~ m/(.+)(\d{10})$/;
  5224.              my ($key,$file) = ($1,$2);
  5225.              return '' unless (-T "$config{'basepath'}$key/$file.dat");
  5226.              my @item = &read_item_file($key,$file);
  5227.              return $file unless (((((($form{'DAYS'} * 86400) + time) - $file)*-1) > 30) || ($item[0] ne $form{'TITLE'}));
  5228.              return '';
  5229.      }
  5230.  
  5231. #-#############################################
  5232. # Sub: Change User Registration Info
  5233. # This allows a user to submit VIA a E-mail Form
  5234. # to the sites webmaster updates needed to a
  5235. # users registration account
  5236.  
  5237. sub creg {
  5238.  
  5239.                 my $ip = $ENV{'REMOTE_ADDR'};
  5240.  
  5241.         print <<"EOF";
  5242. <FORM ACTION="$config{'scripturl'}" METHOD="POST">
  5243.  
  5244. <table align="center" width="80%" border="1" CELLPADDING="0" CELLSPACING="0" bgcolor="$config{'colortablehead'}">
  5245. <INPUT TYPE="HIDDEN" NAME="action" VALUE="proccreg">
  5246. <INPUT TYPE="HIDDEN" NAME="IP" VALUE="$ip">
  5247. <tr><td COLSPAN="2" Valign="TOP"><H3>This form will allow you to change your user registration, e-mail address, mailing address city, state.<br>You must enter accurate data, as a new password will be e-mailed to you. Please be patient after hitting the submit button. Registration changes may take a few minutes.<br><p>Your IP address is: $ip address is recorded for security!</H3></td></tr>
  5248.  
  5249. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>Your Username:<BR></b>Required for verification</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="ALIAS" TYPE="TEXT" size="30" MAXLENGTH="30"></center></td></tr>
  5250.  
  5251. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>Your Current Password:<BR></b>Required for verification</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="OLDPASS" TYPE="PASSWORD" size="30"></center></td></tr>
  5252.  
  5253. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>E-mail Address:<BR></b>Leave blank if unchanged</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="EMAIL" TYPE="TEXT" size="30"></center></td></tr>
  5254.  
  5255. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>Your Real Full Name:<BR></b>Leave blank if unchanged</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="ADDRESS1" TYPE="TEXT" size="30"></center></td></tr>
  5256.  
  5257. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>Street Address:<BR></b>Leave blank if unchanged</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="ADDRESS2" TYPE="TEXT" size="30"></center></td></tr>
  5258.  
  5259. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>City, State, ZIP:<BR></b>Leave blank if unchanged</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="ADDRESS3" TYPE="TEXT" size="30"></center></td></tr>
  5260.  
  5261. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>Phone Number:<BR></b>Leave blank if unchanged</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="PHONE" TYPE="TEXT" size="30"></center></td></tr>
  5262.  
  5263. <tr><td COLSPAN="2" bgcolor="$config{'colortablehead'}"><center><INPUT TYPE="SUBMIT" VALUE="Submit"></FORM></center></td></tr>
  5264.  
  5265. </table>
  5266.  
  5267. EOF
  5268. }
  5269.  
  5270. #-#############################################
  5271. # Sub: Process Changed Registration
  5272. # This modifies an account
  5273.  
  5274. sub proccreg {
  5275.  
  5276.                  $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'}));                
  5277.                  $form{'EMAIL'} = lc($form{'EMAIL'});
  5278.  
  5279.         if ($config{'regdir'}) {
  5280.                 &oops('You must enter your alias so we can validate your account.') unless ($form{'ALIAS'});
  5281.                 &oops('You must enter your old password so we can validate your account.') unless ($form{'OLDPASS'});
  5282.                                  
  5283.                 if (my ($password,$email,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@past_bids) = &read_reg_file($form{'ALIAS'})) {                        
  5284.                         &oops('Your old password does not match up.') unless ((lc $password) eq (lc $form{'OLDPASS'}));
  5285.  
  5286. ### Added for Banned-User by E-Mail ####
  5287. &banemail;                    
  5288. ### END - Added for Added for Banned-User by E-Mail ####
  5289.  
  5290. ### Added for Banned-User by E-Mail ####
  5291. &banfreeemail;
  5292. ### END Added for Banned-User by E-Mail ####
  5293.  
  5294. ### Added for Ban a User by IP Address ####
  5295. &banipaddress;
  5296. ### END Added for Ban a User by IP Address ####
  5297.  
  5298. ###Added for Multi-Alias ####
  5299. if ($form{'EMAIL'} ne "") {
  5300. &multalias;
  5301. }
  5302. ### END - Added for Multi-Alias ####
  5303.  
  5304.                         $form{'NEWPASS1'} = $password if !($form{'NEWPASS1'});
  5305.                         $form{'ADDRESS1'} = $add1 if !($form{'ADDRESS1'});
  5306.                         $form{'ADDRESS2'} = $add2 if !($form{'ADDRESS2'});
  5307.                         $form{'ADDRESS3'} = $add3 if !($form{'ADDRESS3'});
  5308.                         $form{'PHONE'} = $phone if !($form{'PHONE'});
  5309.                         $form{'IP'} = $ip if !($form{'IP'});
  5310.                         $form{'REFERRAL'} = $referral if !($form{'REFERRAL'});
  5311.                         $form{'REFNAME'} = $refname if !($form{'REFNAME'});
  5312.                         $form{'EMAIL'} = $email if !($form{'EMAIL'});
  5313.  
  5314.                         my $newpass = &randompass;
  5315.  
  5316.                         &oops('We cannot open your account.  This could be a server data write issue.') unless (open NEWREG, ">$config{'regdir'}/$form{'ALIAS'}.dat");
  5317.                         if ($config{'flock'}) {
  5318.                         flock(NEWREG, 2);
  5319.                         seek(NEWREG, 0, 2);
  5320.                         }                        
  5321.                         print NEWREG "$newpass\n$form{'EMAIL'}\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'}\n$form{'PHONE'}\n$form{'IP'}\n$form{'REFERRAL'}\n$form{'REFNAME'}";
  5322.                         my $bid;
  5323.                         foreach $bid (@past_bids) {
  5324.                                 print NEWREG "\n$bid";
  5325.                         }                        
  5326.                         close NEWREG;
  5327.  
  5328.                        print "$form{'ALIAS'}, you should receive an e-mail to $form{'EMAIL'} in a few minutes.  It will contain your new password needed to sell or bid. If you do not get an e-mail, please re-register.\n";
  5329.                         &sendemail($form{'EMAIL'}, $config{'admin_address'}, 'New Auction Password',
  5330. "PLEASE DO NOT REPLY TO THIS E-MAIL.\n\n
  5331. The changes to your user registration here at $config{'sitename'} has been made!\n
  5332. Your new password to access you account is: $newpass\n
  5333. Your user alias is: $form{'ALIAS'}\n\n
  5334. Thank you for visiting!");
  5335.  
  5336. ########## Send Webmaster a email when a user updates Registration ####
  5337.                         if ($config{'newregsendtoadmin'} eq "on") {
  5338.                         &sendemail($config{'admin_address'}, $config{'admin_address'}, 'User updated Registration',
  5339. "User: $form{'ALIAS'} has updated their registration here at $config{'sitename'}.\n
  5340. Contact info:
  5341. Old E-Mail: $email   New E-mail: $form{'EMAIL'}
  5342. User Real Name: $form{'ADDRESS1'}
  5343. Old Address: $add2   New Address: $form{'ADDRESS2'}
  5344. Old City and State: $add3   New City and State: $form{'ADDRESS3'}
  5345. Old Phone: $phone   New phone: $form{'PHONE'}
  5346. Old IP address: $ip   New Ip address: $form{'IP'}");
  5347. }
  5348. ##### END Send Webmaster a email when a user updates Registration ####
  5349.                 }
  5350.                 else {
  5351.                 print "Sorry...  That Username is not valid.\n";
  5352.                 }
  5353.         }
  5354.         else {
  5355.                 print "User Registration is Not Implemented on This Server!  The System Administrator Did Not Specify a Registration Directory...\n";
  5356.         }
  5357. }      
  5358.  
  5359. #-###############211911452031851209151419##############################
  5360. # Sub: Change User Password
  5361. # change users login password
  5362.  
  5363. sub change_password {
  5364.  
  5365.                 my $ip = $ENV{'REMOTE_ADDR'};
  5366.  
  5367.         print <<"EOF";
  5368. <FORM ACTION="$config{'scripturl'}" METHOD="POST">
  5369.  
  5370. <table align="center" width="80%" border="1" CELLPADDING="0" CELLSPACING="0" bgcolor="$config{'colortablehead'}">
  5371. <INPUT TYPE="HIDDEN" NAME="action" VALUE="proc_change_password">
  5372. <INPUT TYPE="HIDDEN" NAME="IP" VALUE="$ip">
  5373. <tr><td COLSPAN="2" Valign="TOP"><H3>This form will allow you to change your password.<br><p>Your IP address is: $ip address is recorded for security!</H3></td></tr>
  5374.  
  5375. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>Your Username:<BR></b>Required for verification</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="ALIAS" TYPE"=TEXT" size="30" MAXLENGTH="30"></center></td></tr>
  5376.  
  5377. <tr><td Valign=TOP bgcolor="$config{'colortablebody'}"><b>Your Current Password:<BR></b>Required for verification</td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="OLDPASS" TYPE="PASSWORD" size="30"></center></td></tr>
  5378.  
  5379. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>Your New Password:<BR></b></td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="NEWPASS1" TYPE="PASSWORD" size="30"></center></td></tr>
  5380.  
  5381. <tr><td Valign="TOP" bgcolor="$config{'colortablebody'}"><b>Your New Password Again for Verification:<BR></b></td><td bgcolor="$config{'colortablebody'}"><center><INPUT NAME="NEWPASS2" TYPE="PASSWORD" size="30"></center></td></tr>
  5382.  
  5383. <tr><td COLSPAN="2" bgcolor="$config{'colortablehead'}"><center><INPUT TYPE="SUBMIT" VALUE="Submit"></FORM></center></td></tr>
  5384.  
  5385. </table>
  5386.  
  5387. EOF
  5388. }
  5389.  
  5390. #-#############################################
  5391. # Sub: Process Changed Password
  5392. # This modifies the users password
  5393.  
  5394. sub proc_change_password {
  5395.  
  5396.                  $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'}));                
  5397.                  $form{'EMAIL'} = lc($form{'EMAIL'});
  5398.  
  5399.         if ($config{'regdir'}) {
  5400.                 &oops('You must enter your alias so we can validate your account.') unless ($form{'ALIAS'});
  5401.                 &oops('You must enter your old password so we can validate your account.') unless ($form{'OLDPASS'});                          
  5402.                 &oops('You must enter your new password so we can update your account.') unless ($form{'NEWPASS1'});
  5403.                 &oops('Your new passwords do not match.') unless ($form{'NEWPASS2'} eq $form{'NEWPASS1'});                        
  5404.                
  5405.                 my ($password,$email,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@past_bids );
  5406.                 if (($password,$email,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@past_bids) = &read_reg_file($form{'ALIAS'})) {        
  5407.                         &oops('Your old password does not match up.') unless ((lc $password) eq (lc $form{'OLDPASS'}));    
  5408.    
  5409.                         $form{'NEWPASS1'} = $password if !($form{'NEWPASS1'});
  5410.                
  5411.                         &oops('We cannot open your account.  This could be a server data write issue.') unless (open NEWREG, ">$config{'regdir'}/$form{'ALIAS'}.dat");
  5412.                         if ($config{'flock'}) {
  5413.                         flock(NEWREG, 2);
  5414.                         seek(NEWREG, 0, 2);
  5415.                         }  
  5416.                         print NEWREG "$form{'NEWPASS1'}\n$email\n$add1\n$add2\n$add3\n$phone\n$form{'IP'}\n$referral\n$refname";
  5417.                         my $bid;
  5418.                         foreach $bid (@past_bids) {
  5419.                                 print NEWREG "\n$bid";
  5420.                         }                        
  5421.                         close NEWREG;                  
  5422.                         print "$form{'ALIAS'}, your login password has been changed.\n";
  5423.                         &sendemail($email, $config{'admin_address'}, 'Auction Password Change',
  5424. "PLEASE DO NOT REPLY TO THIS E-MAIL.\n\n
  5425. Your user password has been changed\n\n
  5426. Your new password is: $form{'NEWPASS1'}\n
  5427. Your alias User is: $form{'ALIAS'}\n\n
  5428. Go to the auction site: $config{'scripturl'}\n\n
  5429. Thank you for visiting!\n
  5430. $config{'sitename'}");
  5431.                 }
  5432.                 else {                
  5433.                 print "Sorry...  That Username is not valid.\n";
  5434.                 }
  5435.         }
  5436.         else {
  5437.                 print "User Registration is Not Implemented on This Server!  The System Administrator Did Not Specify a Registration Directory...\n";
  5438.         }
  5439. }      
  5440.  
  5441. #-#############################################
  5442. # Sub: User Agreement
  5443. # User must read the and accept this agreement before
  5444. # being allowed to register
  5445.  
  5446. sub agree {
  5447. print "<FORM ACTION=\"$config{'scripturl'}\" METHOD=\"POST\">";
  5448. print "<table align=\"center\" width=\"85%\" border=\"0\">";
  5449. print "<INPUT TYPE=\"HIDDEN\" NAME=\"action\" VALUE=\"reg\">";
  5450. print "<tr><td width=\"100%\"><font Color=\"red\" size=\"+1\"><center><b>User Agreement between you and $config{'sitename'}</b></center></font></td></tr><tr><td>";
  5451. print "<center><b>The following is the user agreement as presented by $config{'sitename'} . you must agree to these terms before you will be able to sell items, or bid on them. if you do not accept these terms, please, do not use our services.</center></b><HR><P>";
  5452. print "<b>Article 1.</b> Eligibility of membership - This auction site is only available to people who are legally able to form binding contracts with you and the seller/buyer of an auction item. People who are of under age of 18 are not eligible for membership due to security precautions that can result as of those members. If you do not meet these requirements, you are not eligible to use these auction services.<P>";
  5453. print "<b>Article 2.</b> $config{'sitename'} is only providing auction services - We only provide services to people interested in selling and buying merchandise via internet auction. We do not have control over the items that are posted in the auction site, and cannot guarantee the authenticity and quality of a said product. We are not responsible for the actions the sellers takes, before, during, and after the auction, typographical errors, mis-prints, loss of merchandise/money, damage or failure of equipment, due to your visit to this auction site. Use of this site is at your own risk, and content is presented 'As-Is'.<P>";
  5454. print "<b>Article 3.</b> Bidding and Selling - As a user, you may bid and/or sell merchandise over $config{'sitename'}. As a bidder, you know that placing a bid is a binding contract with you and the seller, and the bid cannot be retracted unless due to fault by the seller of typographical error, or other error, due to human error on the seller's part. Once you place a bid, and if you win, you will be obligated to buy the product at the said price you indicated as your bid. Placing a bid on this auction site, and winning, then not paying for the product is illegal in most states, and prosecution can result to you. As a seller, the item that you place up for bids must be real. Once a bid has been placed for your item, you are being placed in a binding contract with the potential buyer of the product, if that bid shall be the highest bid. Once the auction is over, if over reserve price, you are obligated to sell to the potential buyer which is the highest bidder in your auction. If, reserve price was not met, you are not obligated in any way to sell this item at all. As a seller, you are not in any way to bid on your own items. If reported, your auction will be deleted.<P>";
  5455. print "<b>Article 4.</b> Selling Items - As a user, you are welcome to put items up for sale in the $config{'sitename'}. We do have restrictions on what items you may sell, and what you may not sell. You may not sell illegal merchandise, including pirated software and music, firearms, adult videos, anything that is affiliated with pornography, or anything dealing with the Occult, etc. Items that are up to bids are subject to review by the staff of $config{'sitename'}, and my be removed without prior notice, if in violation with the User Agreement.<P>";
  5456. print "<b>Article 5.</b> Privacy - We gather your information so that other people will have it on hand when they win your auction, or you win their auction. Personal information is not sold, rented, without your permission. Personal information sent to a user regarding a product bought or sold on the auction is not to be used for any other purpose, except for communication with the auction item.<P>";
  5457. print "<b>Article 6.</b> Warranty - $config{'sitename'} provide this website in an 'as-is' condition, without a warranty or condition. $config{'sitename'} is not liable for any damages resulting in an auction, or your visit to the site.<P>";
  5458. print "<b>By Pressing I Accept, You Agree to these terms listed above.</b>";
  5459. print "</td></tr></table><P>";
  5460. print "<center><INPUT TYPE=SUBMIT VALUE='I Accept'></FORM></center>";
  5461. }
  5462.  
  5463. #-#############################################
  5464. # Sub: New Registration
  5465. # This creates a form for registration
  5466.  
  5467. sub reg {
  5468.  
  5469.          my $ip = $ENV{'REMOTE_ADDR'};
  5470.  
  5471.         print <<"EOF";
  5472. <H2><table width="85%" style="border-bottom: 2px solid purple;" width="95%" align="center" border="0" cellspacing="0" cellpadding="5" bgcolor="#000000">
  5473.   <tr>
  5474.     <td>
  5475.       <div align="center"><font face="Georgia" color="#9900CC" size="5"><b>New User Registration</b></font></div>
  5476. <BR>
  5477. <div align="center"><font face="Georgia" color="#9900CC" size="3">Your IP address is: $ip and is recorded for security!</font></div>
  5478.     </td>
  5479.   </tr>
  5480. </table></H2>
  5481.  
  5482. <table width="85%" border="0" cellspacing="0" cellpadding="5" align="center">
  5483.   <tr>
  5484.     <td>
  5485.      
  5486.       <font face="Georgia" color="#9900CC"><b><font size="3">Become a registered
  5487.       user in just 3 easy steps:</font></b> <font size="3"><br>
  5488.       </font></font>
  5489.       <p> <font face="Georgia" color="#9900CC" size="3"><b>Step 1 - Complete registration
  5490.         form below.</b><br>
  5491.         Fill out the form below accurately. Be sure to include a valid e-mail address, since this is where your temporary password will be sent once you have completed step 1. Please be patient after hitting the submit
  5492.         button.<br>
  5493.         <br>
  5494.         </font>
  5495.       <p> <font face="Georgia" color="#9900CC" size="3"><b>Step 2 - Receive temporary
  5496.         password.</b><br>
  5497.         You will receive an e-mail from us with your temporary password usually
  5498.         within a few minutes. <br>
  5499.         <br>
  5500.         </font>
  5501.       <p> <font face="Georgia" color="#9900CC" size="3"><b>Step 3 - After receiving
  5502.         temporary password.</b><br>
  5503.         You may log-in to our Change User Information area and change the password
  5504.         to something easier to remember. <br>
  5505.         </font>
  5506.       <p><font face="Georgia" color="#9900CC" size="3"> That's it! You're ready
  5507.         to begin Bidding and/or Selling. Thank you for using our auction and Good
  5508.         Luck!</font><font face="Georgia" color="#9900CC"> </font><br>
  5509.         <br>
  5510.       <p> <b><font color="#FF0000" face="Georgia" size="3">AOL and CompuServe
  5511.         Members:</font></b><br><font face="Georgia" size="3" color="#9900CC">Make
  5512.         sure your Mail Controls are set to receive emails from para-auctions.com.
  5513.         If you have internet e-mail blocked, you will need to update your Mail
  5514.         Controls. To make this update, enter the Keyword "Mail Controls" on AOL
  5515.         or CompuServe. </font></table>
  5516.  
  5517. <hr WIDTH="85%">
  5518.  
  5519.  
  5520. <FORM ACTION="$config{'scripturl'}" METHOD="POST">
  5521.  
  5522. <table align="center" width="85%" border="1" CELLPADDING="0" CELLSPACING="0" bgcolor="$config{'colortablehead'}">
  5523. <INPUT TYPE="HIDDEN" NAME="action" VALUE="procreg">
  5524. <INPUT TYPE="HIDDEN" NAME="IP" VALUE="$ip">
  5525.  
  5526. <tr><td WIDTH="75%" bgcolor="$config{'colortablebody'}"><b>Enter A User Name For Your Account:</b><BR>Used to login to the auction site and to track your auctions and or bids.<BR><font COLOR=RED><b>NOTE: Your user name must consists of alphanumeric characters only and no spaces!!</b></font></td>
  5527. <td align="right" WIDTH="25%" bgcolor="$config{'colortablebody'}"><INPUT NAME="ALIAS" TYPE="TEXT" size="30" MAXLENGTH="30"></td></tr>
  5528.  
  5529. <tr><td WIDTH="75%" bgcolor="$config{'colortablebody'}"><b>Re Enter Your User Name For Verification:</b><BR>Must match your user name entered above</td>
  5530. <td align="right" WIDTH="25%" bgcolor="$config{'colortablebody'}"><INPUT NAME="ALIAS2" TYPE="TEXT" size="30" MAXLENGTH="30"></td></tr>
  5531.  
  5532. <tr><td WIDTH="75%" bgcolor="$config{'colortablebody'}"><b>Your E-Mail Address:</b><BR>Must be valid, This is also where you will recieve your password needed to login.</td>
  5533. <td align="right" WIDTH="25%" bgcolor="$config{'colortablebody'}"><INPUT NAME="EMAIL" TYPE="TEXT" size="30"></td></tr>
  5534.  
  5535. <tr><td WIDTH="75%" bgcolor="$config{'colortablebody'}"><b>Re Enter Your E-Mail Address For Verification:</b><BR>Must match your e-mail address entered above</td>
  5536. <td align="right" WIDTH="25%" bgcolor="$config{'colortablebody'}"><INPUT NAME="EMAIL2" TYPE="TEXT" size="30"></td></tr>
  5537.  
  5538. <tr><td WIDTH="75%" bgcolor="$config{'colortablebody'}"><b>Your First and Last Name:</b><BR>&nbsp;</td>
  5539. <td align="right" WIDTH="25%" bgcolor="$config{'colortablebody'}"><INPUT NAME="ADDRESS1" TYPE="TEXT" size="30"></td></tr>
  5540.  
  5541. <tr><td WIDTH="75%" bgcolor="$config{'colortablebody'}"><b>Your Mailing Address:</b><BR>&nbsp;</td>
  5542. <td align="right" WIDTH="25%" bgcolor="$config{'colortablebody'}"><INPUT NAME="ADDRESS2" TYPE="TEXT" size="30"></td></tr>
  5543.  
  5544. <tr><td WIDTH="75%" bgcolor="$config{'colortablebody'}"><b>Your City, State, ZIP and Country</b><BR>If not in the US enter your province and country</td>
  5545. <td align="right" WIDTH="25%" bgcolor="$config{'colortablebody'}"><INPUT NAME="ADDRESS3" TYPE="TEXT" size="30"></td></tr>
  5546.  
  5547. <tr><td WIDTH="75%" bgcolor="$config{'colortablebody'}"><b>Your Phone Number:</b><BR>&nbsp;</td>
  5548. <td align="right" WIDTH="25%" bgcolor="$config{'colortablebody'}"><INPUT NAME="PHONE" TYPE="TEXT" size="30"></td></tr>
  5549.  
  5550. <TR><TD WIDTH="75%" BGCOLOR="$config{'colortablebody'}"><B>How did you find us:</B><BR>Select One</TD>
  5551. <TD align="right" WIDTH="25%" BGCOLOR="$config{'colortablebody'}">
  5552. <SELECT NAME="REFERRAL">
  5553. <OPTION VALUE="registered user">Registered User</OPTION>
  5554. <OPTION VALUE="advertisement">Advertisement</OPTION>
  5555. <OPTION VALUE="search engine">Search Engine</OPTION>
  5556. <OPTION VALUE="friend">Friend</OPTION>
  5557. <OPTION VALUE="twitter">Twitter</OPTION>
  5558. <OPTION VALUE="other">Other</OPTION>
  5559. </SELECT>
  5560. </TD></TR>
  5561.  
  5562. <TR><TD WIDTH="65%" BGCOLOR="$config{'colortablebody'}"><B>If Referred by a registered user:</B><BR>If you were referred by one of our registered auction users enter their user alias here!!</TD>
  5563. <TD align="right" WIDTH="25%" BGCOLOR="$config{'colortablebody'}"><INPUT NAME="REFNAME" TYPE="TEXT" SIZE="30"></TD></TR>
  5564.  
  5565. EOF
  5566.  
  5567.  
  5568. if ($config{'humancheck'} eq "on") {
  5569. my ($human1,$human2) = &humanpass();
  5570. print <<"EOF";
  5571.  
  5572. <TR><TD WIDTH="75%" BGCOLOR="$config{'colortablebody'}"><B><FONT SIZE=4>Are you a Human Being or Computer Spammer?<font color="red"> TEST</B></font></TD>
  5573. <TD align="right"><B><font color="red" SIZE=4>$human1 + $human2 = </B></font><INPUT NAME=human3 TYPE="TEXT" SIZE="10"></TD></TR>
  5574. <INPUT TYPE=HIDDEN NAME=human1 VALUE=$human1>
  5575. <INPUT TYPE=HIDDEN NAME=human2 VALUE=$human2>
  5576. EOF
  5577.  
  5578. }
  5579. print <<"EOF";
  5580.  
  5581.   <TR bgcolor="#000000">
  5582.     <TD COLSPAN="2">
  5583.       <CENTER>
  5584.         <font face="Georgia" size="2" color="red"><b>
  5585.         NOTE: By submitting your registration, you are confirming that you are At Least 18 Years of age.</b></font>
  5586.         </font>
  5587.       </CENTER>
  5588.     </TD>
  5589.   </TR>
  5590.  
  5591.    <TR>
  5592.     <TD COLSPAN="2">
  5593.       <CENTER>
  5594.        
  5595.        
  5596.         <INPUT TYPE="SUBMIT" VALUE="Register Me">
  5597.         </font>
  5598.       </CENTER>
  5599.     </TD>
  5600.  
  5601. </TABLE>
  5602.  
  5603. EOF
  5604. }
  5605.  
  5606. #-#############################################
  5607. # Sub: Process Registration
  5608. # This adds new accounts to the database
  5609.  
  5610. sub procreg {
  5611.  
  5612.         if ($config{'humancheck'} eq "on") {
  5613.         &oops('Oh!!! Not A Human Being Or You Did Not Add Right.') unless ($form{'human1'} + $form{'human2'} == $form{'human3'});
  5614.         }
  5615.                
  5616. if ($config{'regdir'}) {
  5617.                 umask(000);  # UNIX file permission junk
  5618.                 mkdir("$config{'regdir'}", 0777) unless (-d "$config{'regdir'}");
  5619.      
  5620.                   open(HTACCESS, ">$config{'regdir'}/.htaccess");                
  5621.                   print HTACCESS "order deny,allow\ndeny from all" unless (-d "$config{'regdir'}/.htaccess");
  5622.                   close(HTACCESS);
  5623.                      
  5624.                $form{'ALIAS'} =~ s/\s*$//g;  # Clean trailing spaces
  5625.                $form{'ALIAS2'} =~ s/\s*$//g;  # Clean trailing spaces
  5626.  
  5627.                $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'}));
  5628.                $form{'ALIAS2'} = ucfirst(lc($form{'ALIAS2'}));
  5629.                $form{'EMAIL'} = lc($form{'EMAIL'});
  5630.                $form{'EMAIL2'} = lc($form{'EMAIL2'});
  5631.  
  5632.                &oops('The user/alias name you entered do not match.') if ($form{'ALIAS'} ne $form{'ALIAS2'});
  5633.                &oops('The E-Mail address you entered does not match.') if ($form{'EMAIL'} ne $form{'EMAIL2'});
  5634.  
  5635.                #&oops('You must enter an alias that consists of alphanumeric characters "word characters and or numbers only with no spaces"') if $form{'ALIAS'} =~ /\W/ or !($form{'ALIAS'});
  5636.                &oops('You must enter an alias that consists of alphanumeric characters "word characters and or numbers only with no spaces"') if ($form{'ALIAS'} =~ /([^A-Za-z0-9_])/);
  5637.                                  
  5638.                &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/);
  5639.                 &oops('You must enter your full name so buyers or sellers may contact you.') unless ($form{'ADDRESS1'});              
  5640.                 &oops('You must enter a valid street address so buyers or sellers can contact you.') unless ($form{'ADDRESS2'});
  5641.                 &oops('You must enter a valid city, state, and zip code so buyers or sellers can contact you.') unless ($form{'ADDRESS3'});
  5642.                 &oops('You must enter your home phone number.') unless ($form{'PHONE'});  
  5643.  
  5644. ### Added for Banned-User by E-Mail ####
  5645. &banemail;                    
  5646. ### END - Added for Added for Banned-User by E-Mail ####
  5647.  
  5648. ### Added for Banned-User by E-Mail ####
  5649. &banfreeemail;
  5650. ### END Added for Banned-User by E-Mail ####
  5651.  
  5652. ### Added for Ban a User by IP Address ####
  5653. &banipaddress;
  5654. ### END Added for Ban a User by IP Address ####
  5655.  
  5656. ###Added for Multi-Alias ####
  5657. &multalias;
  5658. ### END - Added for Multi-Alias ####                      
  5659.                          
  5660. ########### Referral Credit  ###################  
  5661.  
  5662.            $form{'REFNAME'} = "NONE"  if ($form{'REFNAME'} eq "");
  5663.            $form{'REFNAME'} = ucfirst(lc($form{'REFNAME'}));
  5664.            
  5665.            #&oops('The referring user you entered is not correct, This should be the users alias used at this site and not their real name') if $form{'REFNAME'} =~ /\W/ or !($form{'REFNAME'});    
  5666.                  
  5667.            my ($refpassword,$refemail,$refadd1,$refadd2,$refadd3,$refphone,$refip,$refreferral,$refrefname,@refpast_bids) = &read_reg_file($form{'REFNAME'});
  5668.    
  5669.   if (-T "$config{'regdir'}/$form{'REFNAME'}.dat") {  
  5670.   if ($config{'referralcredit'} > "0.00") {
  5671.           &apply_transaction($form{'REFNAME'}, "New User Referral Credit", "$config{'referralcredit'}", "New User: $form{'ALIAS'} E-mail: $form{'EMAIL'}");
  5672.         &sendemail($refemail, $config{'admin_address'}, 'Referral Credit',
  5673. "New User Referral Credit.\n\n
  5674. The new user $form{'ADDRESS1'} User alias: $form{'ALIAS'}\n
  5675. has registered using you as the referral giving you a creadit of $config{'referralcredit'}\n\n
  5676. Thank you for visiting!");
  5677.      }
  5678.      }
  5679. ########### END Referral Credit #############
  5680.  
  5681.                 if (!(-f "$config{'regdir'}/$form{'ALIAS'}.dat")) {
  5682.                         &oops('We were unable to write to the user directory.') unless (open NEWREG, ">$config{'regdir'}/$form{'ALIAS'}.dat");
  5683.                         my $newpass = &randompass;
  5684.                         if ($config{'flock'}) {
  5685.                         flock(NEWREG, 2);
  5686.                         seek(NEWREG, 0, 2);
  5687.                         }
  5688.                         print NEWREG "$newpass\n$form{'EMAIL'}\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'}\n$form{'PHONE'}\n$form{'IP'}\n$form{'REFERRAL'}\n$form{'REFNAME'}";
  5689.                         close NEWREG;
  5690.                         print "$form{'ALIAS'}, you should receive an e-mail to $form{'EMAIL'} in a few minutes.  It will contain your password needed to sell or bid. If you do not get an e-mail, please re-register.\n";
  5691.  
  5692.                         &sendemail($form{'EMAIL'}, $config{'admin_address'}, 'Auction Password',
  5693. "PLEASE DO NOT REPLY TO THIS E-MAIL.\n\n
  5694. Thank you for registering to use the online auctions at $config{'sitename'}!\n\n
  5695. Your new password is: $newpass\n
  5696. Your alias (as you entered it) is: $form{'ALIAS'}\n\n
  5697. Go to the auction site: $config{'scripturl'}\n\n
  5698. Thank you for visiting!\n
  5699. $config{'sitename'}");
  5700.  
  5701. ########## Send Webmaster a email when a new user registered ####
  5702.                         if ($config{'newregsendtoadmin'} eq "on") {
  5703.                         &sendemail($config{'admin_address'}, $config{'admin_address'}, 'New User Registered',
  5704. "New User : $form{'ALIAS'}\n
  5705. Contact info:
  5706. E-mail: $form{'EMAIL'}
  5707. Real Name: $form{'ADDRESS1'}
  5708. Address: $form{'ADDRESS2'}
  5709. City and State: $form{'ADDRESS3'}
  5710. Phone: $form{'PHONE'}
  5711. Referral Information: $form{'REFERRAL'}
  5712. Referred by Name/Alias: $form{'REFNAME'}");
  5713. }
  5714. ##### END Send Webmaster a email when a new user registered ####
  5715. ####### New Registration Credit ############
  5716.                 if ($config{'newregcredit'} => "0.00") {
  5717.                 &apply_transaction($form{'ALIAS'}, "New Registration Credit", "$config{'newregcredit'}", "New Registration Credit");
  5718.                 }
  5719. ####### New Registration Credit ############
  5720.                 }
  5721.                 else {
  5722.                         print "Sorry...  that alias is taken.  Hit back to try again!\n";
  5723.                 }
  5724.         }
  5725.         else {
  5726.                 print "User Registration is Not Implemented on This Server!  The System Administrator Did Not Specify a Registration Directory...\n";
  5727.         }
  5728. }      
  5729.  
  5730. ######################################
  5731. # Dont allow multiple users with the
  5732. # same email address or IP address
  5733.  
  5734. sub multalias {
  5735.  
  5736.      my $checkip = $ENV{'REMOTE_ADDR'};
  5737.  
  5738.      my $file;
  5739.      opendir THEDIR, "$config{'regdir'}" || die "Unable to open directory: $!";
  5740.      my @allfiles = readdir THEDIR;
  5741.      closedir THEDIR;
  5742.  
  5743.             foreach $file (@allfiles) {
  5744.               if ($file =~ /\.dat/){
  5745.                   open REGFILE, "$config{'regdir'}/$file";
  5746.                   my($password,$checkemail,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@junk) = <REGFILE>;
  5747.                   chomp($password,$checkemail,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@junk);
  5748.                   close REGFILE;
  5749.      
  5750.                        if ($form{'EMAIL'} =~ $checkemail) {
  5751.                           &oops("This e-mail address, <b>$form{'EMAIL'}</b>, has already been registered.");
  5752.                        }
  5753.                        if ($checkip eq $ip) {
  5754.                           #&oops("Sorry by your IP address we show that you have already registered using a different user name and email address.");
  5755.                        }
  5756.  
  5757.                 }
  5758.         }
  5759. }
  5760.  
  5761. #################################################################
  5762. # Ban a Users IP Address
  5763.  
  5764. sub banipaddress {
  5765.      
  5766.               my $ip = $ENV{'REMOTE_ADDR'};
  5767.  
  5768.                               umask(000);  # UNIX file permission junk
  5769.                               mkdir("$config{'basepath'}banipdir", 0777) unless (-d "$config{'basepath'}banipdir");
  5770.  
  5771.      opendir THEDIR, "$config{'basepath'}banipdir" || die "Unable to open directory: $!";
  5772.              my @allfiles = readdir THEDIR;
  5773.              closedir THEDIR;
  5774.              chomp(@allfiles);
  5775.  
  5776.                  my $file;
  5777.                  foreach $file (@allfiles) {
  5778.                  if($ip eq $file){
  5779.                      &oops('Sorry... Your IP address has been banned from our system.');                  
  5780.                         }                
  5781.            }
  5782.  }
  5783.  
  5784. #################################################################
  5785. # Ban Free E-mail Address
  5786.  
  5787. sub banfreeemail {
  5788.      
  5789.                               umask(000);  # UNIX file permission junk
  5790.                               mkdir("$config{'basepath'}banfreeemaildir", 0777) unless (-d "$config{'basepath'}banipdir");
  5791.  
  5792.      opendir THEDIR, "$config{'basepath'}banfreeemaildir" || die "Unable to open directory: $!";
  5793.              readdir THEDIR;
  5794.              readdir THEDIR;
  5795.              my @allfiles = readdir THEDIR;
  5796.              closedir THEDIR;
  5797.              chomp(@allfiles);
  5798.  
  5799.                 my ($emailaddress1, $emailaddress2, $emailaddress3);
  5800.                 $emailaddress1 = $form{'EMAIL'};                
  5801.                 ($emailaddress2, $emailaddress3) = split /\@/, $emailaddress1;
  5802.  
  5803.                  my $file;
  5804.                  foreach $file (@allfiles) {                                
  5805.                  if($emailaddress3 eq $file){
  5806.                      &oops('This auction does not accept free e-mail accounts for registration. Please enter a different e-mail address.');                  
  5807.                         }                
  5808.            }
  5809.  }
  5810.  
  5811. ################################################
  5812. # Sub Ban-Email
  5813. # Allows administrator to ban certain email addresses from registering.
  5814.  
  5815. sub banemail {  
  5816.      
  5817.                               umask(000);  # UNIX file permission junk
  5818.                               mkdir("$config{'basepath'}bannedfile", 0777) unless (-d "$config{'basepath'}banipdir");  
  5819.  
  5820.      opendir THEDIR, "$config{'basepath'}bannedfile" || die "Unable to open directory: $!";
  5821.           my @allfiles = readdir THEDIR;
  5822.              closedir THEDIR;
  5823.              chomp(@allfiles);
  5824.  
  5825.                  my $file;
  5826.                  foreach $file (@allfiles) {
  5827.                  if($form{'EMAIL'} eq $file){
  5828.                    &oops("Sorry... that email address has been banned from our system.");
  5829.                         }                
  5830.            }
  5831.  }
  5832.  
  5833. ################################################
  5834. # Sub checksuspendeduser
  5835. # Allows administrator to suspend certain registed user.
  5836.  
  5837. sub checksuspendeduser {
  5838.              
  5839.                  umask(000);  # UNIX file permission junk
  5840.                  mkdir("$config{'basepath'}suspendeddir", 0777) unless (-d "$config{'basepath'}suspendeddir");
  5841.                            
  5842.         my $Alias = $_[0];
  5843.  
  5844.         $Alias =~ s/\W//g;
  5845.         $Alias = lc($Alias);
  5846.         $Alias = ucfirst($Alias);
  5847.  
  5848.      opendir THEDIR, "$config{'basepath'}suspendeddir" || die "Unable to open directory: $!";
  5849.              my @allfiles = readdir THEDIR;
  5850.              closedir THEDIR;
  5851.              chomp(@allfiles);
  5852.  
  5853.                  my $file;
  5854.                  foreach $file (@allfiles) {    
  5855.                  $file =~ s/\.dat//;  
  5856.            
  5857.                  if($Alias eq $file) {
  5858.                     &oops('<font size=-1 face=verdana><b>  Sorry... You registered user account has been suspended by the site administration!</b></font>');                  
  5859.                         }                
  5860.            }
  5861.  }
  5862.  
  5863. #################################################
  5864. # Checks auction items and closes the ones
  5865. # whose ran out of time, and repost them
  5866. # at user requiest and send seller a
  5867. # relist confirmation email.
  5868.  
  5869. sub chkclose {      
  5870.         my $cat;
  5871.         foreach $cat (keys %category) {
  5872.                 opendir THEDIR, "$config{'basepath'}$cat" or next;
  5873.                 my @allfiles = grep -T, map "$config{'basepath'}$cat/$_", (readdir THEDIR);
  5874.                 closedir THEDIR;
  5875.                 my $file;
  5876.                 FILE: foreach $file (@allfiles) {
  5877.                         $file =~ s/^$config{'basepath'}$cat\///;
  5878.                         $file =~ s/\.dat$//;                                      
  5879.                        
  5880.                         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = &read_item_file($cat,$file);  
  5881.          
  5882.               my @lastbid = &read_bid($bids[$#bids]);
  5883.               my @firstbid =  &read_bid($bids[0]);  
  5884.  
  5885.               my $closed = int($file);
  5886.               my $start = $firstbid[3];
  5887.               my $runtime = ($closed - $start);            
  5888.              
  5889.               my $qtyleft;
  5890.               $qtyleft = $qty - $lastbid[8];
  5891.  
  5892.               my $new = ($runtime + time);
  5893.               $new = ($runtime + time) until (!(-e "$config{'basepath'}$cat/$new.dat"));
  5894.            
  5895.          if ((time > int($file)) && (time > (60 * $config{'aftermin'} + $lastbid[3]))) {
  5896.                      
  5897. #--Relist Section--------------------------------------#    
  5898.  
  5899.          ######## Relist normal auction items with bids but less than reserve ######  
  5900.          
  5901.          if (($#bids) && ($dutch eq 'no') && ($relist > $relistcnt) && ($lastbid[2] < $reserve) && ($reserve > '0.00')) {  
  5902.    
  5903. sleep 1;  # Wait 1 seconds to make sure we don't get duplicate item numbers
  5904.  
  5905. open REGFILE, ">>$config{'regdir'}/$firstbid[0].dat";
  5906. if ($config{'flock'}) {
  5907. flock(REGFILE, 2);
  5908. seek(REGFILE, 0, 2);
  5909. }
  5910. print REGFILE "\n$cat$new";
  5911. close REGFILE;
  5912.  
  5913. ++$relistcnt;
  5914. open THEFILE, ">$config{'basepath'}$cat/$new.dat";
  5915. print THEFILE
  5916. "$title\n$reserve\n$inc\n$desctitcolor\n$desctitsize\n$desctit\n$desccolor\n$descsize\n$desc\n$image1\n$image2\n$image3\n$image4\n$image5\n$image6\n$image7\n$image8\n$feat_yt\n$feat_bf\n$gallery\n$grabber\n$dutch\n$qty\n$buyit\n$condition\n$payment\n$paymentinst\n$paypalacc\n$shipping\n$shippfee1\n$shippservice1\n$shippfee2\n$shippservice2\n$multishipping\n$shipsto\n$insurancefee\n$salestax\n$salesinfo\n$return\n$relist\n$relistcnt\n$music\n$usecounter\n$private\n$currency\n$addon6\n$addon5\n$addon4\n$addon3\n$addon2\n$addon1";
  5917.  
  5918. print THEFILE "\n$firstbid[0]\[\]$firstbid[1]\[\]$firstbid[2]\[\]".time."\[\]$firstbid[4]\[\]$firstbid[5]\[\]$firstbid[6]\[\]$firstbid[7]\[\]$firstbid[8]\[\]$firstbid[9]\[\]$firstbid[10]";
  5919. close THEFILE;                
  5920.  
  5921.               if ($config{'relistemail'} eq "on") {
  5922.               &sendemail($firstbid[1], $config{'admin_address'}, "Your Auction Item Relisted",
  5923. "Your auction titled: $title
  5924. Item number: $file has been relisted.
  5925. The new auction item number is: $new
  5926. Reason: Reserve not met, highest bid was $currency$lastbid[2]
  5927.  
  5928. Click here to view your new relisted auction item:
  5929. $config{'scripturl'}?category=$cat&item=$new
  5930.  
  5931. Once again, thank you and please tell a friend about us!
  5932.  
  5933. Sincerely,
  5934. $config{'sitename'}");
  5935.   }  
  5936.                
  5937.        &sendemail($lastbid[1], $config{'admin_address'}, "Auction Ended: Item #$file \($title\)",
  5938. "$lastbid[4]
  5939.  
  5940. You were the high bidder on auction number $file \($title\) Unfortunately, your bid did not meet the seller\'s reserve price...
  5941.  
  5942. Seller User ID: $firstbid[0]
  5943. Seller E-mail: $firstbid[1]
  5944.  
  5945. Your bid was in the amount of $currency$lastbid[2].
  5946. Unfortunately, your bid did not meet the seller\'s reserve price...
  5947. This auction item was relisted and the new auction listing is:
  5948. $config{'scripturl'}?category=$cat&item=$new
  5949. if you wont to try agin!
  5950.  
  5951. We hope you have enjoyed using the $config{'sitename'} and will come back often!
  5952.  
  5953. Remember: $config{'sitename'} will not ask you for sensitive personal information
  5954. such as your password, credit card and bank account numbers,
  5955. Social Security numbers, etc. in an email.
  5956.  
  5957. All Rights Reserved. Designated trademarks
  5958. and brands are the property of their respective owners.");
  5959.  
  5960. unlink("$config{'basepath'}$cat/$file.dat");
  5961. unlink("$config{'basepath'}$config{'countdir'}/$file.dat");
  5962. unlink ("$config{'basepath'}askseller/$file.dat");
  5963.  
  5964. }  
  5965. ##### Relist auction items with no bids ######
  5966.  
  5967.            elsif (($#bids eq 0) && ($dutch eq 'no') && ($relist > $relistcnt)) {    
  5968.  
  5969. sleep 1;  # Wait 1 seconds to make sure we don't get duplicate item numbers
  5970.            
  5971. open REGFILE, ">>$config{'regdir'}/$firstbid[0].dat";
  5972. if ($config{'flock'}) {
  5973. flock(REGFILE, 2);
  5974. seek(REGFILE, 0, 2);
  5975. }
  5976. print REGFILE "\n$cat$new";
  5977. close REGFILE;
  5978.  
  5979. ++$relistcnt;
  5980. open THEFILE, ">$config{'basepath'}$cat/$new.dat";
  5981. print THEFILE
  5982. "$title\n$reserve\n$inc\n$desctitcolor\n$desctitsize\n$desctit\n$desccolor\n$descsize\n$desc\n$image1\n$image2\n$image3\n$image4\n$image5\n$image6\n$image7\n$image8\n$feat_yt\n$feat_bf\n$gallery\n$grabber\n$dutch\n$qty\n$buyit\n$condition\n$payment\n$paymentinst\n$paypalacc\n$shipping\n$shippfee1\n$shippservice1\n$shippfee2\n$shippservice2\n$multishipping\n$shipsto\n$insurancefee\n$salestax\n$salesinfo\n$return\n$relist\n$relistcnt\n$music\n$usecounter\n$private\n$currency\n$addon6\n$addon5\n$addon4\n$addon3\n$addon2\n$addon1";
  5983.  
  5984. print THEFILE "\n$firstbid[0]\[\]$firstbid[1]\[\]$firstbid[2]\[\]".time."\[\]$firstbid[4]\[\]$firstbid[5]\[\]$firstbid[6]\[\]$firstbid[7]\[\]$firstbid[8]\[\]$firstbid[9]\[\]$firstbid[10]";
  5985. close THEFILE;
  5986.                
  5987.            if ($config{'relistemail'} eq "on") {
  5988.            &sendemail($firstbid[1], $config{'admin_address'}, "Your Auction Item Relisted",
  5989. "Your auction titled: $title
  5990. Item number: $file has been relisted.
  5991. The new auction item number is: $new
  5992. Reason: No bids were placed
  5993.  
  5994. Click here to view your new relisted auction item:
  5995. $config{'scripturl'}?category=$cat&item=$new
  5996.  
  5997. Once again, thank you and please tell a friend about us!
  5998.  
  5999. Sincerely,
  6000. $config{'sitename'}");              
  6001.   }  
  6002.  
  6003. unlink("$config{'basepath'}$cat/$file.dat");
  6004. unlink("$config{'basepath'}$config{'countdir'}/$file.dat");
  6005. unlink ("$config{'basepath'}askseller/$file.dat");
  6006.  
  6007. }  
  6008. ######## Relist dutch auction items with some sold items but with items left ######
  6009.  
  6010.             elsif (($#bids) && ($dutch eq 'yes') && ($relist > $relistcnt) && ($qty > $lastbid[8])) {
  6011.  
  6012. sleep 1;  # Wait 1 seconds to make sure we don't get duplicate item numbers
  6013.  
  6014. open REGFILE, ">>$config{'regdir'}/$firstbid[0].dat";
  6015. if ($config{'flock'}) {
  6016. flock(REGFILE, 2);
  6017. seek(REGFILE, 0, 2);
  6018. }
  6019. print REGFILE "\n$cat$new";
  6020. close REGFILE;
  6021.                              
  6022. $qty = $qty -$lastbid[8];
  6023.  
  6024. ++$relistcnt;
  6025. open THEFILE, ">$config{'basepath'}$cat/$new.dat";
  6026. print THEFILE
  6027. "$title\n$reserve\n$inc\n$desctitcolor\n$desctitsize\n$desctit\n$desccolor\n$descsize\n$desc\n$image1\n$image2\n$image3\n$image4\n$image5\n$image6\n$image7\n$image8\n$feat_yt\n$feat_bf\n$gallery\n$grabber\n$dutch\n$qty\n$buyit\n$condition\n$payment\n$paymentinst\n$paypalacc\n$shipping\n$shippfee1\n$shippservice1\n$shippfee2\n$shippservice2\n$multishipping\n$shipsto\n$insurancefee\n$salestax\n$salesinfo\n$return\n$relist\n$relistcnt\n$music\n$usecounter\n$private\n$currency\n$addon6\n$addon5\n$addon4\n$addon3\n$addon2\n$addon1";
  6028.  
  6029. print THEFILE "\n$firstbid[0]\[\]$firstbid[1]\[\]$firstbid[2]\[\]".time."\[\]$firstbid[4]\[\]$firstbid[5]\[\]$firstbid[6]\[\]$firstbid[7]\[\]$firstbid[8]\[\]$firstbid[9]\[\]$firstbid[10]";
  6030. close THEFILE;
  6031.                
  6032.               if ($config{'relistemail'} eq "on") {                            
  6033.               &sendemail($firstbid[1], $config{'admin_address'}, "Your Auction Item Relisted",
  6034. "Your auction titled: $title
  6035. Item number: $file has been relisted.
  6036. The new auction item number is: $new
  6037. Reason: This is a dutch auction and you still have $qtyleft items left!
  6038.  
  6039. Starting Quantity: $qty
  6040. Sold Quantity: $lastbid[8]
  6041. Items Left: $qtyleft
  6042.  
  6043. Click here to view your new relisted auction item:
  6044. $config{'scripturl'}?category=$cat&item=$new
  6045.  
  6046. Once again, thank you and please tell a friend about us!
  6047.  
  6048. Sincerely,
  6049. $config{'sitename'}");
  6050.   }
  6051.  
  6052. &closeit($cat,$file);  
  6053.  
  6054. }
  6055. ###### Relist dutch auction items with no items sold, no bids ############      
  6056.  
  6057.             elsif (($#bids eq 0) && ($dutch eq 'yes') && ($relist > $relistcnt)) {
  6058.  
  6059. sleep 1;  # Wait 1 seconds to make sure we don't get duplicate item numbers
  6060.                          
  6061. open REGFILE, ">>$config{'regdir'}/$firstbid[0].dat";
  6062. if ($config{'flock'}) {
  6063. flock(REGFILE, 2);
  6064. seek(REGFILE, 0, 2);
  6065. }
  6066. print REGFILE "\n$cat$new";
  6067. close REGFILE;
  6068.  
  6069. ++$relistcnt;
  6070. open THEFILE, ">$config{'basepath'}$cat/$new.dat";
  6071. print THEFILE
  6072. "$title\n$reserve\n$inc\n$desctitcolor\n$desctitsize\n$desctit\n$desccolor\n$descsize\n$desc\n$image1\n$image2\n$image3\n$image4\n$image5\n$image6\n$image7\n$image8\n$feat_yt\n$feat_bf\n$gallery\n$grabber\n$dutch\n$qty\n$buyit\n$condition\n$payment\n$paymentinst\n$paypalacc\n$shipping\n$shippfee1\n$shippservice1\n$shippfee2\n$shippservice2\n$multishipping\n$shipsto\n$insurancefee\n$salestax\n$salesinfo\n$return\n$relist\n$relistcnt\n$music\n$usecounter\n$private\n$currency\n$addon6\n$addon5\n$addon4\n$addon3\n$addon2\n$addon1";
  6073.  
  6074. print THEFILE "\n$firstbid[0]\[\]$firstbid[1]\[\]$firstbid[2]\[\]".time."\[\]$firstbid[4]\[\]$firstbid[5]\[\]$firstbid[6]\[\]$firstbid[7]\[\]$firstbid[8]\[\]$firstbid[9]\[\]$firstbid[10]";
  6075. close THEFILE;
  6076.  
  6077.               if ($config{'relistemail'} eq "on") {
  6078.               &sendemail($firstbid[1], $config{'admin_address'}, "Your Auction Item Relisted",
  6079. "Your auction titled: $title
  6080. Item number: $file has been relisted.
  6081. The new auction item number is: $new
  6082. Reason: This is a dutch auction and there were no bids
  6083.  
  6084. Starting Quantity: $qty
  6085. Sold Quantity: 0
  6086.  
  6087. Click here to view your new relisted auction item:
  6088. $config{'scripturl'}?category=$cat&item=$new
  6089.  
  6090. Once again, thank you and please tell a friend about us!
  6091.  
  6092. Sincerely,
  6093. $config{'sitename'}");
  6094.   }  
  6095.  
  6096. unlink("$config{'basepath'}$cat/$file.dat");
  6097. unlink("$config{'basepath'}$config{'countdir'}/$file.dat");
  6098. unlink ("$config{'basepath'}askseller/$file.dat");
  6099.  
  6100. }
  6101. #--End Relist------------------------------------------#                                  
  6102.         else {        
  6103.         &closeit($cat,$file);                      
  6104.         }
  6105.                         }
  6106.                 }
  6107.         }
  6108.        
  6109. }
  6110.  
  6111. #-#############################################
  6112. # Close Auction items and send seller and buyer
  6113. # an email, This sets an item's status to closed.
  6114. # and moves them to the closed dir
  6115.  
  6116. sub closeit {
  6117.         my ($cat,$item) = @_;
  6118.        
  6119.         if ($cat ne $config{'closedir'}) {
  6120.                 my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = &read_item_file($cat,$item);
  6121.                
  6122.                 my @lastbid = &read_bid($bids[$#bids]);
  6123.                 my @firstbid =  &read_bid($bids[0]);  
  6124.                 my $numauct;                  
  6125.                    $numauct = $item;
  6126.                    $numauct =~ s/\.dat//;                                    
  6127.                             my $qtyleft;
  6128.                             $qtyleft = $qty - $lastbid[8];                                  
  6129.        
  6130.             my $salestax = &parsebid($lastbid[2] * $salestax, $currency);
  6131.             $salestax = &parsebid($salestax / 100, $currency);
  6132.             $salestax = &parsebid($salestax + 0.00, $currency);            
  6133.            
  6134.             my $total = &parsebid($lastbid[2] + $salestax + $shippfee1 + $insurancefee);
  6135.  
  6136.           if (($#bids) && ($lastbid[2] >= $reserve) && ($dutch eq 'no')) {
  6137.  
  6138. #--Accounting Closed Item Percentage---------#
  6139.                
  6140.          if ($config{'percentageclose'} eq "on") {
  6141.               &transaction_percentage_closed($firstbid[0], "#$numauct ($title)", "$firstbid[2]", "$lastbid[2]", "$reserve");
  6142.  
  6143. }        
  6144. #--End-------------------------------------------------#                  
  6145.                        
  6146.                         &sendemail($lastbid[1], $config{'admin_address'}, "Auction closed and you WON: Item #$numauct \($title\)",
  6147. "$lastbid[4]
  6148.  
  6149. Congratulations! This auction has successfully ended with you as the winning bidder.
  6150. Item #$numauct \($title\)
  6151.  
  6152. Information:
  6153. Total bids: $#bids
  6154. Final Price: $lastbid[2]
  6155. Sales Tax: $salestax
  6156. Shipping Fee: $shippfee1
  6157. Insurance: $insurancefee
  6158. Total: $total
  6159.  
  6160. Seller User ID: $firstbid[0]
  6161. Seller E-mail: $firstbid[1]
  6162.  
  6163. Click the link below to review and pay for this auction item:
  6164. $config{'scripturl'}?action=viewcloseddisp&ALIAS=$lastbid[0]&BIDTOVIEW=$cat$numauct
  6165.  
  6166. Leave FeedBack on seller: $firstbid[0]
  6167. $config{'scripturl'}?action=getform&ALIAS=$firstbid[0]&ITEM=$cat$numauct
  6168.  
  6169. Click the link below to review, enter feedback, or check the paid statis for all the auction items you sold or won:
  6170. $config{'scripturl'}?action=closed
  6171.  
  6172. Now What?
  6173. The buyer and seller should contact each other within three business days to complete the sale. Not getting in touch leaves the contract open and can earn you negative feedback.
  6174.  
  6175. We are glad this auction was successful.
  6176.  
  6177. We hope you have enjoyed using the $config{'sitename'} and will come back often!
  6178.  
  6179. Remember: $config{'sitename'} will not ask you for sensitive personal information
  6180. such as your password, credit card and bank account numbers,
  6181. Social Security numbers, etc. in an email.
  6182.  
  6183. All Rights Reserved. Designated trademarks
  6184. and brands are the property of their respective owners.");
  6185.                         }            
  6186.                         if (($#bids) && ($lastbid[2] >= $reserve) && ($dutch eq 'no')) {
  6187.                         &sendemail($firstbid[1], $config{'admin_address'}, "Auction closed and you SOLD: Item #$numauct \($title\)",
  6188. "$firstbid[4]
  6189.  
  6190. Congratulations! This auction has successfully ended with a winning bidder.
  6191. Item #$numauct \($title\)
  6192.  
  6193. Information:
  6194. Total bids: $#bids
  6195. Final Price: $lastbid[2]
  6196. Sales Tax: $salestax
  6197. Shipping Fee: $shippfee1
  6198. Insurance: $insurancefee
  6199. Total: $total
  6200.  
  6201.  
  6202. Buyer User ID: $lastbid[0]
  6203. Buyer E-mail: $lastbid[1]
  6204.  
  6205. Click the link below to review this auction item:
  6206. $config{'scripturl'}?action=viewcloseddisp&ALIAS=$firstbid[0]&BIDTOVIEW=$cat$numauct
  6207.  
  6208. Leave FeedBack on the winning bidder: $lastbid[0]
  6209. $config{'scripturl'}?action=getform&ALIAS=$lastbid[0]&ITEM=$cat$numauct
  6210.  
  6211. Click the link below to review, enter feedback, or check the paid statis for all the auction items you sold or won:
  6212. $config{'scripturl'}?action=closed
  6213.  
  6214. Now What?
  6215. The buyer and seller should contact each other within three business days to complete the sale. Not getting in touch leaves the contract open and can earn you negative feedback.
  6216.  
  6217. We are glad this auction was successful.
  6218.  
  6219. We hope you have enjoyed using the $config{'sitename'} and will come back often!
  6220.  
  6221. Remember: $config{'sitename'} will not ask you for sensitive personal information
  6222. such as your password, credit card and bank account numbers,
  6223. Social Security numbers, etc. in an email.
  6224.  
  6225. All Rights Reserved. Designated trademarks
  6226. and brands are the property of their respective owners.");
  6227.                         }                                              
  6228.                         if (($#bids) && ($lastbid[2] < $reserve) && ($dutch eq 'no')) {
  6229.                         &sendemail($firstbid[1], $config{'admin_address'}, "Auction Ended: Item #$numauct \($title\)",
  6230. "$firstbid[4]
  6231.  
  6232. Auction #$numauct \($title\) is now closed.
  6233.  
  6234. Unfortunately, You reserve price was not met. and your auto relist times has ran out or you did not select auto relist feature if not sold you may repost your item by using the closed auction manager at:
  6235. $config{'scripturl'}?action=closed.
  6236.  
  6237. Good Luck on the next time around. Thank you for using $config{'sitename'} and will come back often!
  6238.  
  6239. Remember: $config{'sitename'} will not ask you for sensitive personal information
  6240. such as your password, credit card and bank account numbers,
  6241. Social Security numbers, etc. in an email.
  6242.  
  6243. All Rights Reserved. Designated trademarks
  6244. and brands are the property of their respective owners.");
  6245.                         }              
  6246.                         if (($#bids) && ($lastbid[2] < $reserve) && ($dutch eq 'no')) {
  6247.                         &sendemail($lastbid[1], $config{'admin_address'}, "Auction Ended: Item #$numauct \($title\)",
  6248. "$lastbid[4]
  6249.  
  6250. You were the high bidder on auction number $item \($title\) Unfortunately, your bid did not meet the seller\'s reserve price...
  6251.  
  6252. Seller User ID: $firstbid[0]
  6253. Seller E-mail: $firstbid[1]
  6254.  
  6255. Your bid was in the amount of $currency$lastbid[2].
  6256. Unfortunately, your bid did not meet the seller\'s reserve price...
  6257. You may still wish to contact the seller to negotiate a fair price.  This does not mean that they have to reply as they are not required to sell to anyone if their reserve price was not met.
  6258. If you do wish to contact them, you may do so at the following e-mail address.
  6259. $firstbid[1]
  6260.  
  6261. We hope you have enjoyed using the $config{'sitename'} and will come back often!
  6262.  
  6263. Remember: $config{'sitename'} will not ask you for sensitive personal information
  6264. such as your password, credit card and bank account numbers,
  6265. Social Security numbers, etc. in an email.
  6266.  
  6267. All Rights Reserved. Designated trademarks
  6268. and brands are the property of their respective owners.");                      
  6269.                         }            
  6270.                         if (($#bids eq 0) && ($dutch eq 'no')) {
  6271.                         &sendemail($firstbid[1], $config{'admin_address'}, "Auction Ended: Item #$numauct \($title\)",
  6272. "$firstbid[4]
  6273.  
  6274. Auction #$numauct \($title\) is now closed.
  6275.  
  6276. Unfortunately, there were no bids on your item. and your auto relist times has ran out or you did not select auto the relist feature if not sold, you may repost your item by using the closed auction manager at:
  6277. $config{'scripturl'}?action=closed
  6278.  
  6279. Good Luck on the next time around. Thank you for using $config{'sitename'} and will come back often!
  6280.  
  6281. Remember: $config{'sitename'} will not ask you for sensitive personal information
  6282. such as your password, credit card and bank account numbers,
  6283. Social Security numbers, etc. in an email.
  6284.  
  6285. All Rights Reserved. Designated trademarks
  6286. and brands are the property of their respective owners.");
  6287.                         }                  
  6288.                         ## Start Closing dutch auction items and send the e-mail ##
  6289.                         if (($#bids) && ($dutch eq 'yes') && ($lastbid[8] eq $qty)) {
  6290.                         &sendemail($firstbid[1], $config{'admin_address'}, "Auction Close: Item #$numauct \($title\)",
  6291. "$firstbid[4]
  6292.  
  6293. Congratulations! This auction has successfully ended and all $qty dutch items were sold.
  6294. Item #$numauct \($title\)
  6295. Starting Quantity: $qty
  6296. Sold Quantity: $lastbid[8]
  6297. Items Left: $qtyleft
  6298. Item Title: $title
  6299.  
  6300. Now What?
  6301. The buyer and seller should have received contact info and with Quantity ordered at at the time dutch bids were placed to be able to contact each other within three business days to complete the sale. Not getting in touch leaves the contract open and can earn you negative feedback.
  6302.  
  6303. We hope you have enjoyed using the $config{'sitename'} and will come back often!
  6304.  
  6305. Remember: $config{'sitename'} will not ask you for sensitive personal information
  6306. such as your password, credit card and bank account numbers,
  6307. Social Security numbers, etc. in an email.
  6308.  
  6309. All Rights Reserved. Designated trademarks
  6310. and brands are the property of their respective owners.");                      
  6311.                       }  
  6312.                       if (($#bids) && ($dutch eq 'yes') && ($qty > $lastbid[8]) && ($relist eq $relistcnt)) {
  6313.                       &sendemail($firstbid[1], $config{'admin_address'}, "Auction Close: Item #$numauct \($title\)",
  6314. "$firstbid[4]
  6315.  
  6316. Congratulations! Your dutch auction has ended but you still have $qtyleft items left!
  6317. Item #$numauct \($title\)
  6318. Starting Quantity: $qty
  6319. Sold Quantity: $lastbid[8]
  6320. Items Left: $qtyleft
  6321. Item Title: $title
  6322.  
  6323.  You still have $qtyleft items left. and your auto relist times has ran out or you did not select auto the relist feature if not sold, you may repost your item by using the closed auction manager at:
  6324. $config{'scripturl'}\?action=closed
  6325.  
  6326. Now What?
  6327. The buyer and seller should have received contact info a the time dutch bids were placed to be able to contact each other within three business days to complete the sale. Not getting in touch leaves the contract open and can earn you negative feedback.
  6328.  
  6329. We hope you have enjoyed using the $config{'sitename'} and will come back often!
  6330.  
  6331. Remember: $config{'sitename'} will not ask you for sensitive personal information
  6332. such as your password, credit card and bank account numbers,
  6333. Social Security numbers, etc. in an email.
  6334.  
  6335. All Rights Reserved. Designated trademarks
  6336. and brands are the property of their respective owners.");                    
  6337.                       }                      
  6338.                       if (($#bids eq 0) && ($dutch eq 'yes')) {
  6339.                       &sendemail($firstbid[1], $config{'admin_address'}, "Auction Close: Item #$numauct \($title\)",
  6340. "$firstbid[4]
  6341.  
  6342. Your dutch auction has ended, but were no bids on your items.
  6343. Item #$numauct \($title\)
  6344. Quantity: $qty
  6345. Item Title: $title
  6346.  
  6347. Unfortunately, there were no bids on your item. and your auto relist times has ran out or you did not select the auto relist feature if not sold, you may repost your item by using the closed auction manager at:
  6348. $config{'scripturl'}?action=closed
  6349.  
  6350. We hope you have enjoyed using the $config{'sitename'} and will come back often!
  6351.  
  6352. Remember: $config{'sitename'} will not ask you for sensitive personal information
  6353. such as your password, credit card and bank account numbers,
  6354. Social Security numbers, etc. in an email.
  6355.  
  6356. All Rights Reserved. Designated trademarks
  6357. and brands are the property of their respective owners.");
  6358.                       }                      
  6359.                      
  6360.                       if ($config{'closedir'}) {
  6361.                       umask(000);  # UNIX file permission junk
  6362.                       mkdir("$config{'basepath'}$config{'closedir'}", 0777) unless (-d "$config{'basepath'}$config{'closedir'}");            
  6363.                         print "Please notify the site admin that this item cannot be copied to the closed directory even though it is closed.\n" unless &movefile("$config{'basepath'}$cat/$item.dat", "$config{'basepath'}$config{'closedir'}/$cat$item.dat");                  
  6364.                 }          
  6365.                 else {
  6366.                         print "Please notify the site admin that this item cannot be removed even though it is closed.\n" unless unlink("$config{'basepath'}$cat/$item.dat");
  6367.                 }                
  6368.         }
  6369.  
  6370. }
  6371.  
  6372. #########################################################################
  6373. # This subroutine will delete closed auctions in the closed dir
  6374. # and item uploaded images older than X days old that you set
  6375. # up in your config.cgi file under $config{'closedays'}
  6376.  
  6377. sub delclosed {
  6378.  
  6379.             umask(000);  # UNIX file permission junk
  6380.             mkdir("$config{'basepath'}$config{'closedir'}", 0777) unless (-d "$config{'basepath'}$config{'closedir'}");
  6381.  
  6382.      opendir THEDIR, "$config{'basepath'}$config{'closedir'}" or oops("Unable to open the closed directory");
  6383.      my @allfiles = readdir THEDIR;
  6384.      closedir THEDIR;
  6385.         my $file;
  6386.         foreach $file ( @allfiles ) {                
  6387.               my $filetime;
  6388.               $filetime = $file;
  6389.               $filetime =~ s/\.dat//;  
  6390.               $filetime =~ /(\d{10})$/;
  6391.               #$filetime =~ s/\.dat$//;
  6392.               #$filetime =~ s/(.+)(\d{10})$//;
  6393.               $filetime = $1;
  6394.                              
  6395.                  if ((time - $filetime) > ($config{'closedays'} * 86400)) {
  6396.                      unlink ("$config{'basepath'}$config{'closedir'}/$file");
  6397.                      unlink ("$config{'basepath'}askseller/$file");
  6398.                      unlink("$config{'basepath'}$config{'countdir'}/$file");
  6399.                          
  6400.                  }
  6401.         }
  6402. }
  6403.  
  6404. #-#############################################
  6405. # Sub: when a user post a auction item and or bids
  6406. # on a auction item that item number is recorded to
  6407. # that users registration data file so after X days
  6408. # delete the item number recorded to the user
  6409. # registration data file.  
  6410.  
  6411. sub delete_sell_bid_history {
  6412.  
  6413.                     $form{'ALIAS'} = lc($form{'ALIAS'});
  6414.                     $form{'ALIAS'} = ucfirst($form{'ALIAS'});  
  6415.  
  6416.                     open REGFILE, "$config{'regdir'}/$form{'ALIAS'}.dat";
  6417. my($password,$email,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@bids) = <REGFILE>;
  6418.                     close REGFILE;
  6419. chomp($password,$email,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@bids);
  6420.                  
  6421.                     open REGFILE, ">$config{'regdir'}/$form{'ALIAS'}.dat";
  6422.                     if ($config{'flock'}) {
  6423.                     flock(REGFILE, 2);
  6424.                     seek(REGFILE, 0, 2);
  6425.                     }
  6426.                     print REGFILE "$password\n$email\n$add1\n$add2\n$add3\n$phone\n$ip\n$referral\n$refname";
  6427.                         my $bid;
  6428.                         foreach $bid (@bids) {                            
  6429.                             my $bidrecord = $bid;
  6430.                             $bidrecord =~ /(\d{10})$/;  
  6431.                             $bidrecord = $1;  
  6432.                             if (($bidrecord + ($config{'closedays'} * 86400)) > time) {
  6433.                             print REGFILE "\n$bid";
  6434.                             }
  6435.                             }      
  6436.                             close REGFILE;
  6437.                            
  6438. }
  6439.  
  6440. ###############################################
  6441. # Sub Image Delete
  6442. # Automatically deletes images from your server
  6443.  
  6444. sub delimage {
  6445.  
  6446. umask(000);  # UNIX file permission junk
  6447. mkdir("$config{'imagebase'}", 0777) unless (-d "$config{'imagebase'}");
  6448. mkdir("$config{'imagebase'}/temp/", 0777) unless (-d "$config{'imagebase'}/temp/");
  6449.  
  6450.     opendir THEDIR, "$config{'imagebase'}" or &oops("Image directory could not be opened.");
  6451.     my @allfiles = readdir THEDIR;
  6452.     closedir THEDIR;
  6453.         my $file;        
  6454.         foreach $file ( @allfiles ) {            
  6455.                 my $ext = (split(/\./,$file))[-1];                    
  6456.                 my $tempfile = $file;
  6457.                 $tempfile =~ s/\.$ext$//;      
  6458.                 #$tempfile =~ /(\d{10})$/;    
  6459.  
  6460.                 my $current_time = time;
  6461.        #if ($current_time > int($tempfile)          
  6462.        if ($current_time > $tempfile) {      
  6463.            unlink ("$config{'imagebase'}/$file");  
  6464.            #unlink ("$config{'imagebase'}/thumb/$file");    
  6465.            }
  6466.         }
  6467. &deltempimage;
  6468. }
  6469.  
  6470. ###############################################
  6471. # Sub Temp Image Delete
  6472. # Automatically deletes temp images from your server
  6473.  
  6474. sub deltempimage {
  6475.      
  6476.          #######################################
  6477.          # Set the time to delete image from temp dir
  6478.          # 60 = 1 min, 900 = 15 min
  6479.          $config{'updel'} = 900;
  6480.          #######################################
  6481.  
  6482.     opendir THEDIR, "$config{'imagebase'}/temp" or &oops("Image directory could not be opened.");
  6483.     my @allfiles = readdir THEDIR;
  6484.     closedir THEDIR;
  6485.         my $file;        
  6486.         foreach $file ( @allfiles ) {            
  6487.                 my $ext = (split(/\./,$file))[-1];                    
  6488.                 my $tempfile = $file;
  6489.                 $tempfile =~ s/\.$ext$//;  
  6490.                 #$tempfile =~ /(\d{10})$/;                    
  6491.                      my $uptime = ($config{'delimagedays'} * 86400 + time);
  6492.                      my $comparetime = ($uptime - $tempfile);
  6493.  
  6494.            if ($comparetime > $config{'updel'}) {
  6495.            unlink ("$config{'imagebase'}/temp/$file");
  6496.            #unlink ("$config{'imagebase'}/thumb/temp/$file");    
  6497.            }
  6498.         }
  6499. }
  6500.  
  6501. #-#############################################
  6502. # Send E-mail
  6503. # This is a real quick mailer that
  6504. # should work on any platform.
  6505. # Takes:
  6506. # (To, From, Subject, Message)
  6507.  
  6508. sub sendemail {        
  6509.        
  6510.     my ($to,$from,$subject,$message) = @_;        
  6511.     if ($config{'smtp_addr'}) {
  6512.     if (!$to) { return -8; }
  6513.     my ($proto, $port, $smtpaddr);
  6514.     my ($AF_INET)     =  2;
  6515.     my ($SOCK_STREAM) =  1;
  6516.     $proto = (getprotobyname('tcp'))[2];
  6517.     $port  = 25;
  6518.     $smtpaddr = ($config{'smtp_addr'} =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/)
  6519.                     ? pack('C4',$1,$2,$3,$4)
  6520.                     : (gethostbyname($config{'smtp_addr'}))[4];
  6521.     if (!defined($smtpaddr)) { return -1; }
  6522.     if (!socket(S, $AF_INET, $SOCK_STREAM, $proto))             { return -2; }
  6523.     if (!connect(S, pack('Sna4x8', $AF_INET, $port, $smtpaddr))) { return -3; }
  6524.     # my($oldfh) = select(S); $| = 1; select($oldfh);
  6525.     select(S);
  6526.     $| = 1;
  6527.     select(STDOUT);
  6528.     $_ = <S>; if (/^[45]/) { close S; return -4; }
  6529.     print S "Helo localhost\r\n";
  6530.     $_ = <S>; if (/^[45]/) { close S; return -5; }
  6531.     print S "Mail from: $from\r\n";
  6532.     $_ = <S>; if (/^[45]/) { close S; return -5; }  
  6533.     print S "Rcpt to: $to\r\n";
  6534.     $_ = <S>; if (/^[45]/) { close S; return -6; }    
  6535.     print S "data\r\n";
  6536.     $_ = <S>; if (/^[45]/) { close S; return -5; }
  6537.     print S "Content-Type: text/plain; charset=us-ascii\r\n";
  6538.     print S "To: $to\r\n";
  6539.     print S "From: $from\r\n";
  6540.     print S "Reply-to: $from\r\n";
  6541.     print S "Subject: $subject\r\n\r\n";
  6542.     print S "$message";
  6543.     print S "\r\n.\r\n";
  6544.     $_ = <S>; if (/^[45]/) { close S; return -7; }
  6545.     print S "quit\r\n";
  6546.     $_ = <S>;
  6547.     close S;
  6548.     return 1;
  6549.     }
  6550.     else {
  6551.           open MAIL, "|$config{'mailprog'} -t";
  6552.           print MAIL "To: $to\n";
  6553.           print MAIL "From: $from\n";
  6554.           print MAIL "Reply-To: $from\n";
  6555.           print MAIL "Subject: $subject\n\n";    
  6556.           print MAIL "$message\n\n";
  6557.           close MAIL;  
  6558.  
  6559.           ### - Use this one if you have problems with AOL not getting e-mails - ###
  6560.           #open MAIL, "|$config{'mailprog'} -i -t";
  6561.           #print MAIL "To: $to\nFrom: $from\nSubject: $subject\n\n$message\n\n";
  6562.           #close MAIL;      
  6563.           }
  6564. }
  6565.  
  6566. #-#############################################
  6567. # Sub: Random Password
  6568. # This generates psudo-random 8-letter
  6569. # passwords
  6570.  
  6571. sub randompass {
  6572.         # Your Words Here:
  6573.         my @passset = qw/Money Venus Peach Oak Space Lucky Moon Typo Radio Match Clock Ping Tech/;
  6574.         srand(time ^ $$);
  6575.         my $digits;
  6576.         for (1..3){ $digits .= (0..9)[int(rand(10))] }
  6577.         my $randpass = $passset[int(rand($#passset + 1))];
  6578.         $randpass .= '-' if($randpass =~ /[iloILO\d]$/ || $digits =~ /^[01]/);
  6579.         $randpass .= $digits;
  6580.         return $randpass;
  6581. }
  6582.  
  6583. #-#############################################
  6584. # Sub: parse bid
  6585. # This formats a bid amount to look good...
  6586. # ie. $###.##
  6587.  
  6588. sub parsebid {
  6589.  
  6590.         #&parsebid($bid, $currency);                        
  6591.          
  6592.         $_[0] =~ s/\,//g;        
  6593.         my @bid = split(/\./, $_[0]);
  6594.         $bid[0] = "0" if (!($bid[0]));
  6595.         $bid[0] = int($bid[0]);
  6596.         $bid[1] = substr($bid[1], 0, 2);
  6597.         $bid[1] = "00" if (length($bid[1]) == 0);
  6598.         $bid[1] = "$bid[1]0" if (length($bid[1]) == 1);
  6599.  
  6600. #        my $currency = $_[1];
  6601. #        if (($currency eq "C") or ($currency eq "£") or ($currency eq "A\$") or
  6602. #($currency eq "€") or ($currency eq "¥")) {
  6603. #        return "$bid[0]";
  6604. #        }
  6605. #        else {
  6606.         return "$bid[0].$bid[1]";
  6607. #        }
  6608.  
  6609. }
  6610.  
  6611. #-#############################################
  6612. # Sub: parse Fees
  6613. # This formats a posting fee amount to look good...
  6614. # ie. $###.##
  6615.  
  6616. sub parsefees {
  6617.         $_[0] =~ s/\,//g;
  6618.         my @fee = split(/\./, $_[0]);
  6619.         $fee[0] = "0" if (!($fee[0]));
  6620.         $fee[0] = int($fee[0]);
  6621.         $fee[1] = substr($fee[1], 0, 2);
  6622.         $fee[1] = "00" if (length($fee[1]) == 0);
  6623.         $fee[1] = "$fee[1]0" if (length($fee[1]) == 1);
  6624.         if ($config{'currencylayout'} eq 'no') {
  6625.         return "$fee[0]";
  6626.         }
  6627.         else {
  6628.         return "$fee[0].$fee[1]";
  6629.         }
  6630.  
  6631. }
  6632.  
  6633. #-#############################################
  6634. # Sub: Oops!
  6635. # This generates an error message and dies.
  6636.  
  6637. sub oops {
  6638.  
  6639.         print "<table align=\"center\" border=\"0\" width=\"90%\" cellspacing=0 cellpadding=0>";
  6640.         print "<tr><td width=\"90%\" bgcolor=\"$config{'colortablehead'}\">";
  6641.         print "<center><h2>User Error</center></h2>";
  6642.         print "</td></td>";
  6643.         print "<tr><td width=\"90%\" bgcolor=\"$config{'colortablebody'}\">";
  6644.         print "<p><font color=\"#FF0000\"><h3>Error:</font><br>$_[0]</h3><P>Please hit the back browser on your browser to try again or contact <a href=\"mailto:$config{'admin_address'}\">the auction administrator</a> if you believe this to be a server problem.<p>\n";
  6645.         print "</td></tr>";
  6646.         print "</table>";
  6647.         print "$config{'footer'}";
  6648.        
  6649.         exit;
  6650.  
  6651. }
  6652.  
  6653. #-#############################################
  6654. # Sub: movefile(file1, file2)
  6655. # This moves a file.  Quick and dirty!
  6656.  
  6657. sub movefile {
  6658.         my ($firstfile, $secondfile) = @_;
  6659.         return 0 unless open(FIRSTFILE,$firstfile);
  6660.         my @lines=<FIRSTFILE>;
  6661.         close FIRSTFILE;
  6662.         return 0 unless open(SECONDFILE,">$secondfile");
  6663.         my $line;
  6664.         foreach $line (@lines) {
  6665.                 print SECONDFILE $line;
  6666.         }
  6667.         close SECONDFILE;
  6668.         return 0 unless unlink($firstfile);
  6669.         return 1;
  6670. }
  6671.  
  6672. #-#############################################
  6673. # Sub: copyfile(file1, file2)
  6674. # This moves a file.  Quick and dirty!
  6675.  
  6676. sub copyfile {
  6677.         my ($firstfile, $secondfile) = @_;
  6678.         return 0 unless open(FIRSTFILE,$firstfile);
  6679.         my @lines=<FIRSTFILE>;
  6680.         close FIRSTFILE;
  6681.         return 0 unless open(SECONDFILE,">$secondfile");
  6682.         my $line;
  6683.         foreach $line (@lines) {
  6684.                 print SECONDFILE $line;
  6685.         }
  6686.         close SECONDFILE;
  6687.         return 1;
  6688. }
  6689.  
  6690. #-#############################################
  6691. # Sub: Read Reg File (alias)
  6692. # Reads a registration file
  6693.  
  6694. sub read_reg_file {
  6695.         my $alias = shift;
  6696.         return '' unless $alias;
  6697.         # verify the user exists
  6698.         &oops('Your alias may not contain any non-word characters.') if $alias =~ /\W/;
  6699.         $alias = ucfirst(lc($alias));
  6700.         return '' unless -r "$config{'regdir'}/$alias.dat" and -T "$config{'regdir'}/$alias.dat";
  6701.         open FILE, "$config{'regdir'}/$alias.dat";
  6702.         my ($password,$email,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@past_bids) = <FILE>;
  6703.         close FILE;
  6704.         chomp ($password,$email,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@past_bids);
  6705.         return ($password,$email,$add1,$add2,$add3,$phone,$ip,$referral,$refname,@past_bids);
  6706. }
  6707.  
  6708. #-#############################################
  6709. # Sub: Read Item File (cat, item)
  6710. # Reads an item file
  6711.  
  6712. sub read_item_file {
  6713.         my ($cat, $item) = @_;
  6714.         # verify the category exists
  6715.         return '' unless ($cat) and ($item);
  6716.         &oops('The category may not contain any non-word characters.') if $cat =~ /\W/;
  6717.         return '' unless $category{$cat};
  6718.         # verify the item exists
  6719.         &oops('The item number may not contain any non-numeric characters.') if $item =~ /\D/;        
  6720.        
  6721.         return '' unless (-T "$config{'basepath'}$cat/$item.dat") and (-R "$config{'basepath'}$cat/$item.dat");
  6722.  
  6723.         #return '' unless 0||#1>>noconfuse(ea;-)
  6724.  
  6725.         open FILE, "$config{'basepath'}$cat/$item.dat";
  6726.         my ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids) = <FILE>;
  6727.         close FILE;
  6728.         chomp ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  6729.         return ($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @bids);
  6730. }
  6731.  
  6732. #-#############################################
  6733. # Sub: Read Bid Information (bid_string)
  6734. # Reads an item file
  6735.  
  6736. sub read_bid {
  6737.         my $bid_string = shift;
  6738.         my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime) = split(/\[\]/,$bid_string);
  6739.         return ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $soldqty, $paid, $paidtime);
  6740. }
  6741.  
  6742. #-#############################################
  6743. # Sub: Time Remain
  6744. # Displays Time, uh, Remain.
  6745.  
  6746. sub time_remain($) {
  6747.  
  6748.     my $diff = $_[0] - time;
  6749.  
  6750.     if($diff < 0){
  6751.     return "<font color=red>Closed</font>"
  6752.     }
  6753.  
  6754.     my $days  = int ( $diff                                  / 86400);
  6755.     my $hours = int (($diff - $days * 86400)                 / 3600 );
  6756.     my $mins  = int (($diff - $days * 86400 - $hours * 3600) / 60   );
  6757.     my $secs = int ($diff-($days*86400)-($hours*3600)-($mins*60));
  6758.  
  6759.     if($days > 1) {
  6760.         return "<nobr>$days Days $hours Hrs</nobr>";
  6761.         }
  6762.         elsif($days == 1) {
  6763.         return "<nobr>1 Day $hours Hrs</nobr>";
  6764.         }
  6765.         elsif($hours > 12) {
  6766.         return "<nobr>$hours Hrs $mins Mins</nobr>";
  6767.         }
  6768.         elsif($hours > 0) {
  6769.         return "<nobr><font color=\"red\">$hours Hrs $mins Mins</font></nobr>";
  6770.         }
  6771.         else {
  6772.         return "<nobr><font color=\"red\">$mins Mins $secs Secs</font></nobr>";
  6773.         }
  6774.  
  6775. }
  6776.  
  6777. #-#############################################
  6778. # Checks the last time the chkclose, delclosed and delimage
  6779. # subs has run, and if longer thsn X time runs it agin
  6780. # this is to speed up the closing runtimes and reduce server load
  6781.  
  6782. sub checkstarttime {                                    
  6783.  
  6784. #########################################
  6785. # How many minutes past last run
  6786. # to start run agin. To run every time
  6787. # auction is called set to zero BUT NOT RECOMMENDED!!
  6788.  
  6789. $config{'nextchkclosed'} = 5; # 5 = every 5 minutes
  6790.  
  6791. $config{'nextdelclosed'} = 2880; # 2880 = every 48 hrs
  6792.  
  6793. $config{'nextdelimages'} = 2880; # 2880 = every 48 hrs
  6794.  
  6795. ######### check for closing items ###############
  6796.  
  6797.         open(CHKCLOSED, "$config{'basepath'}chkclosed.txt");
  6798.         my($chkclosed) = <CHKCLOSED>;        
  6799.         chomp($chkclosed);  
  6800.         close(CHKCLOSED);    
  6801.  
  6802.           if (($chkclosed + (60 * $config{'nextchkclosed'})) < time) {
  6803.                  open(CHKCLOSED, ">$config{'basepath'}chkclosed.txt");                
  6804.                  print CHKCLOSED time;
  6805.                  close(CHKCLOSED);
  6806.                       ### Run These if time has expired sence last run ####
  6807.                       &chkclose;                      
  6808.                       ### END Run These if time has expired sence last run ####  
  6809.                       }
  6810.  
  6811. ######## delete expired closed items ##########
  6812.  
  6813.         open(DELCLOSED, "$config{'basepath'}delclosed.txt");
  6814.         my($delclosed) = <DELCLOSED>;        
  6815.         chomp($delclosed);  
  6816.         close(DELCLOSED);    
  6817.  
  6818.           if (($delclosed + (60 * $config{'nextdelclosed'})) < time) {
  6819.                  open(DELCLOSED, ">$config{'basepath'}delclosed.txt");                
  6820.                  print DELCLOSED time;
  6821.                  close(DELCLOSED);
  6822.                       ### Run These if time has expired sence last run ####
  6823.                       &delclosed;
  6824.                       ### END Run These if time has expired sence last run ####  
  6825.                       }    
  6826.  
  6827. ######## delete expired closed uploaded images ##########
  6828.  
  6829.         open(DELIMAGES, "$config{'basepath'}delimages.txt");
  6830.         my($delimages) = <DELIMAGES>;        
  6831.         chomp($delimages);  
  6832.         close(DELIMAGES);    
  6833.  
  6834.           if (($delimages + (60 * $config{'nextdelimages'})) < time) {
  6835.                  open(DELIMAGES, ">$config{'basepath'}delimages.txt");                
  6836.                  print DELIMAGES time;
  6837.                  close(DELIMAGES);
  6838.                       ### Run These if time has expired sence last run ####
  6839.                       &delimage;
  6840.                       ### END Run These if time has expired sence last run ####  
  6841.                       }        
  6842.                
  6843. }
  6844.  
  6845. #-##########################################################
  6846. # Limit user bidding if feedback is less than X
  6847. # amount set up in the config.pl file
  6848.  
  6849. sub limitbidding {
  6850.          
  6851.               umask(000);  # UNIX file permission junk              
  6852.               mkdir("$config{'feeddir'}", 0777) unless (-d "$config{'feeddir'}");
  6853.          
  6854.               my ($ItemCat, $ItemNumber, $Alias, @BidsParam) = @_;
  6855.  
  6856.               my ($current_bids, $BidUpdate, $ItemBids, $bid, $User_bid, $j, $tempstring, $itemnum, $Category, @ParsedBid, @Bid_History, @ItemBids, @bids);
  6857.  
  6858.    if (!(-e "$config{'feeddir'}/$Alias.dat")){
  6859.       open(FEEDFILE, ">$config{'feeddir'}/$Alias.dat");
  6860.       print FEEDFILE "0\n0\n0\n";
  6861.       close FEEDFILE;
  6862.       }
  6863.       open(FEEDFILE, "$config{'feeddir'}/$Alias.dat");                
  6864.       my ($positive, $neutral, $negative, @userfeeds) = <FEEDFILE>;
  6865.       close FEEDFILE;
  6866.       chomp($positive, $neutral, $negative, @userfeeds);
  6867.            
  6868.             $current_bids = 0;
  6869.             $BidUpdate = 0;
  6870.  
  6871.             if (! @BidsParam) {
  6872.             my($password, $email, $add1, $add2, $add3, $phone, $ip, $referral, $refname, @bids) = &read_reg_file($Alias);
  6873.             }
  6874.             else {
  6875.             @bids = @BidsParam;
  6876.             }
  6877.  
  6878.         foreach $bid (@bids) {
  6879.                 $itemnum = $bid;
  6880.                 $itemnum =~ s/\D+//g;
  6881.                 $itemnum =~ /(\d{10})$/;        
  6882.                 $itemnum = $1;                  
  6883.                 next if ($itemnum < time);
  6884.                 $tempstring = substr($bid, 0, -9);  
  6885.                 $tempstring = substr($bid, -10, -9);  
  6886.  
  6887.                         if ($tempstring =~ /[A-Za-z]/) {  
  6888.                         $tempstring = substr($bid, -9);  
  6889.                         $Category = substr($bid, 0, -9);  
  6890.                         }  
  6891.                         elsif ($tempstring =~ /[0-9]/) {  
  6892.                         $tempstring = substr($bid, -10);  
  6893.                         $Category = substr($bid, 0, -10);  
  6894.                         }  
  6895.  
  6896.               my($title, $reserve, $inc, $desctitcolor, $desctitsize, $desctit, $desccolor, $descsize, $desc, $image1, $image2, $image3, $image4, $image5, $image6, $image7, $image8, $feat_yt, $feat_bf, $gallery, $grabber, $dutch, $qty, $buyit, $condition, $payment, $paymentinst, $paypalacc, $shipping, $shippfee1, $shippservice1, $shippfee2, $shippservice2, $multishipping, $shipsto, $insurancefee, $salestax, $salesinfo, $return, $relist, $relistcnt, $music, $usecounter, $private, $currency, $addon6, $addon5, $addon4, $addon3, $addon2, $addon1, @ItemBids) = &read_item_file($Category, $itemnum);              
  6897.                    
  6898.               foreach $ItemBids (@ItemBids) {
  6899.                       if ($j == 0) {
  6900.                       $j++; # Skip the first bid as its the sellers start bid
  6901.                       next;
  6902.                       }
  6903.                       @ParsedBid = split(/\[\]/,$ItemBids);
  6904.                       $User_bid = 1 if ($ParsedBid[0] eq $Alias);
  6905.                       $j++;
  6906.                       }
  6907.                       if ($User_bid == 1) {
  6908.                       $Bid_History[$current_bids++] = $itemnum;
  6909.                       next;
  6910.                       }
  6911.               }
  6912.               foreach $bid (@Bid_History) {
  6913.               $BidUpdate = 1 if ($bid eq $ItemNumber);
  6914.               }  
  6915.        
  6916.               if (($current_bids > $config{'bidsallowed'}) && ($BidUpdate eq 0)) {
  6917.                   &oops("$Alias, you may not bid on more items at the current time since you have reached the maximum allowed bid limit of ($config{'bidsallowed'}). <b>Till you have $config{'feedbackpoints'} positive feedback ratings you're only allowed to place bids on $config{'bidsallowed'} auction items or you have ($config{'bidsallowed'}) auction items posted that is counted as a bid as well.</b>") unless($positive > $config{'feedbackpoints'});
  6918.         }
  6919.              
  6920. }
  6921. ##################################
  6922. sub humanpass {
  6923.  
  6924.         my $digits;
  6925.         my $digits2;
  6926.         for (1..2){ $digits .= (0..9)[int(rand(10))] }
  6927.         for (1..2){ $digits2 .= (0..9)[int(rand(10))] }
  6928.        my $randpass .= $digits;
  6929.        my $randpass2 .= $digits2;
  6930.         return $randpass,$randpass2;
  6931.  
  6932. }
  6933. #########################################
  6934. 1;