#-############################################# # Sub: Add New Item # This allows a new item to be put up for sale sub new { ########################################################################################### print "
", my $catinfo="";$catinfo=~s/\:/-->//g; umask(000); my($key, %numfiles, %mycategory, %caticon); foreach $key (keys %category) { next if $category{$key}!~/^\Q$catinfo\E/; opendir(THEDIR, "$config{'basepath'}$key") || mkdir("$config{'basepath'}$key", 0777) || &oops("Category directory $key could not be opened."); readdir THEDIR;readdir THEDIR; my @allfiles = readdir THEDIR; closedir THEDIR; if($category{$key} =~ /^\Q$catinfo\E/ && $supercat{$1} ne ''){ $mycategory{"$form{category}:$1"} = $supercat{$1}; $numfiles{"$form{category}:$1"} += @allfiles; $caticon{"$form{category}:$1"} = $config{supercaticon}; }else{ $mycategory{$key} = $category{$key}; $numfiles{$key} += @allfiles; $caticon{$key} = $config{regularcaticon}; } } my $cols = $config{maincatcols} || 2; my $pc = int(100/$cols); print "", "", "", ); ########################################################################################### my ($title, $reserve, $inc, $desc, $image, $buyit, @bids); my $inc = '1.00'; # default increment if ($form{'REPOST'}) { $form{'REPOST'} =~ s/\W//g; if (-T "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat") { open THEFILE, "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat"; ($title, $reserve, $inc, $desc, $image, $buyit, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $image, $buyit, @bids); } } print <<"EOF"; ##################### # Post new Item Form

Post A New Item

"; my $j = $i; for(1..$cols){ my $key=$keys[$j]; if($key ne ''){ print "", }else{ print( # Print Padding (Empty Cells) "", ); } $j+=$cmove; } } print "", print "", #print "", print <<"EOF"; print "", #########################
Title/Item Name:
No HTML
Category:
Select One
##################### # Select Main Cat pulldown EOF my $catinfo="";$catinfo=~s/\:/-->//g; umask(000); my($key, %numfiles, %mycategory, %caticon); foreach $key (keys %category) { next if $category{$key}!~/^\Q$catinfo\E/; opendir(THEDIR, "$config{'basepath'}$key") || mkdir("$config{'basepath'}$key", 0777) || &oops("Category directory $key could not be opened."); readdir THEDIR;readdir THEDIR; my @allfiles = readdir THEDIR; closedir THEDIR; if($category{$key} =~ /^\Q$catinfo\E/ && $supercat{$1} ne ''){ $mycategory{"$form{category}:$1"} = $supercat{$1}; $numfiles{"$form{category}:$1"} += @allfiles; $caticon{"$form{category}:$1"} = $config{supercaticon}; }else{ $mycategory{$key} = $category{$key}; $numfiles{$key} += @allfiles; $caticon{$key} = $config{regularcaticon}; } } my $cols = $config{maincatcols} || 2; my $pc = int(100/$cols); print "
 
Image URL:
Optional, should be no larger than 200x200
Days Until Close:
1-30
Description:
May include HTML - This should include the condition of the item, payment and shipping information, and any other information the buyer should know.
Please note that by placing an item up for bid you are making a contract 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! EOF if ($config{'regdir'}) { print <<"EOF";

Registration is required to post or bid!

Your Handle/Alias:
Used to track your post
Your Password:
Must be valid
Your Starting Bid:\$
Your Reserve Price:
You are not obligated to sell below this price. Leave blank if none.
\$
Bid Increment:\$
Buy-it Now:
Optional, this feature allows the first bidder to win the auction with a bid at this set price.
\$
EOF } else { print <<"EOF"; Your Handle/Alias:
Used to track your post Your E-Mail Address:
Must be valid Your Starting Bid:\$ Your Reserve Price:
You are not obligated to sell below this price. Leave blank if none.\$ Bid Increment:\$ Buy-it Now:
Optional, this feature allows the first bidder to win the auction with a bid at this set price.\$ Contact Information:
Will be given out only to the buyer Full Name:

Street Address:

City, State, ZIP:
EOF } print <<"EOF";
Adult Content IS NOT Allowed!!!
EOF }