#======================================================# # EveryAuction Addon # JustMe Personal Page Add-On v1.04a #======================================================# # PiTA - Park In The Alley Software (Auction-Script.com) #======================================================# # Author: Splatt 07/19/99 # justguns.com auction-script.com compalley.com #------------------------------------------------------# # Unauthorized redistribution is prohibited!!! # The latest version of my addons can be found at: # www.auction-script.com/addons #======================================================# #------------------------------------------------------# # Begin documentation #------------------------------------------------------# #------------------------------------------------------# # Rename this file to justme.pl and put in your CGI-BIN # directory where auction.cgi is located. #------------------------------------------------------# #------------------------------------------------------# # Changes needed to auction.cgi #------------------------------------------------------# # # ADD this statement below the FIRST line # in auction.cgi: # # require "justme.pl"; # #------------------------------------------------------# # Find this section in the beginning of the main code: # # &get_form_data; # parse arguments from post # @ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'}); # $ARGV[0] =~ s/\W//g; # $ARGV[1] =~ s/\D//g; # #------------------------------------------------------# # # REM out the last line so it looks like this: # # &get_form_data; # parse arguments from post # @ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'}); # $ARGV[0] =~ s/\W//g; # #$ARGV[1] =~ s/\D//g; # #------------------------------------------------------# # # Add the following lines to your auction.cgi script # AFTER this line: "elsif ($form{'searchstring'}) { &procsearch; }" # # #------------------------------------------------------# # # JustMe Add-on # #------------------------------------------------------# # elsif ($form{'action'} eq 'justmedone') { &justmesave; } # elsif ($form{'action'} eq 'justedit') { &justmeedit; } # elsif ($form{'action'} eq 'justmepre') { &justmepre; } # elsif ($ARGV[0] eq 'justedit') { &justmelogon; } # elsif ($ARGV[0] eq 'justme') { &justmecreate; } # elsif ($ARGV[0] eq 'justdisp') { &disppage; } # #------------------------------------------------------# # # End Add-on # #------------------------------------------------------# # #------------------------------------------------------# # # To display a users page, call: auction.cgi?justdisp&username # To edit a users page, call: auction.cgi?justedit&username # To create a new users page, call: auction.cgi?justme # #------------------------------------------------------# #------------------------------------------------------# # # To display the icon and link will depend upon your configuration # Here are a couple of examples: # # If USING dustin's feeder add-on: # In the dispitem sub, add the following: # # #-Feedback Addon---------------------------------------# # $usersfeed = &feeder($firstbid[0],2); # $bidderfeed = &feeder($lastbid[0],2); # #-End Feedback Addon-----------------------------------# # #-JustMe Addon-----------------------------------------# # if (-f "$basepath$pagedir/$firstbid[0].page") { # $usersfeed = ($usersfeed . "" . $justmeicon . ""); } # if (-f "$basepath$pagedir/$lastbid[0].page") { # $bidderfeed = ($bidderfeed . "" . $justmeicon . ""); } # if ($usersfeed eq $bidderfeed) { $bidderfeed = '' ; } # #-End JustMe Addon-------------------------------------# # # If NOT using dustin's feeder add-on: # In the dispitem sub, add the following: # # #-JustMe Addon-----------------------------------------# # $usersfeed = $firstbid[0],2; # $bidderfeed = $lastbid[0],2; # if (-f "$basepath$pagedir/$firstbid[0].page") { # $usersfeed = ($usersfeed . "" . $justmeicon . ""); } # if (-f "$basepath$pagedir/$lastbid[0].page") { # $bidderfeed = ($bidderfeed . "" . $justmeicon . ""); } # if ($firstbid[0] eq $lastbid[0]) { $bidderfeed = 'No bids yet' ; } # #-End JustMe Addon-------------------------------------# # # Then when I want to display it I use $usersfeed for the seller and $bidderfeed for the current high bidder. # Similar to this: # Seller: $usersfeed # High Bidder: $bidderfeed # #------------------------------------------------------# #------------------------------------------------------# # End Documentation #------------------------------------------------------# #------------------------------------------------------# # Configuration Section # $feederon: set 1 if using Dustins Feeder Add-On, 0 if not # $pagedir: directory to place the JustMe pages in # $justmeicon: JustMe icon path #------------------------------------------------------# $feederon = 1; $pagedir = 'user_page'; $justmeicon = ""; #------------------------------------------------------# # Add-On Sub: JustMeLogon # Form input of Username and Password to edit page #------------------------------------------------------# sub justmelogon { $ARGV[1] = lc($ARGV[1]); $ARGV[1] = ucfirst($ARGV[1]); print << "EOF";

Edit your JustMe page.

To edit your $justmeicon page, enter your Username and password below.

You MUST be REGISTERED to use this feature!!

Username
Password
(must be valid)
EOF } #------------------------------------------------------# # Add-On Sub: JustMeEdit # Allows user to edit page #------------------------------------------------------# sub justmeedit { $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); &oops('not a registered user') unless (open(REGFILE, "$basepath$regdir/$form{'ALIAS'}.dat")); ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids) = ; close REGFILE; chomp($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids); &oops('incorrect password') unless ((lc $password) eq (lc $form{'PASSWORD'})); if (!(-f "$basepath$pagedir/$form{'ALIAS'}.page")) { print "To create your very own $justmeicon page click here"; die; } &oops('User has no JustMe Page') unless (open THEPAGE, "$basepath$pagedir/$form{'ALIAS'}.page"); ($pagetitle,$welcomehead,$welcomemsg,$txthead,$txtmsg,$piccaption,$picurl,$feednum,$itemlist,$itemnum,$favname1,$favname2,$favname3,$favlink1,$favlink2,$favlink3) = ; close THEPAGE; chomp($pagetitle,$welcomehead,$welcomemsg,$txthead,$txtmsg,$piccaption,$picurl,$feednum,$itemlist,$itemnum,$favname1,$favname2,$favname3,$favlink1,$favlink2,$favlink3); if ($picurl eq '') { $picurl = 'http://'; } if ($favlink1 eq '') { $favlink1 = 'http://'; } if ($favlink2 eq '') { $favlink2 = 'http://'; } if ($favlink3 eq '') { $favlink3 = 'http://'; } print << "EOF";

Edit your JustMe page.

Once you've edited and saved your $justmeicon page, your page will be ready to share with others. You will receive a URL for your page that you can give to friends and associates so they can view your page.

To edit your $justmeicon page, fill in the information you want to include and click \"Preview Your Page\". Please keep this area clean, no pornography, vulgarities, obscenities or flaming of others.

Personalize Your Page (HTML coding is allowed in all these fields)

Page Title
Create a title for your page.
Title:
Welcome Message
Create a short paragraph to welcome visitors to your page.
Heading:
Text:
Another Paragraph
Anything else you want to share?
Heading:
Text:
Picture
Link to a picture that you've posted on the internet.
Caption:
URL:


Show Your $sitename Activity

EOF print << "EOF" if ($feederon == 1); EOF print << "EOF";
Feedback
Display your feedback comments.
Items for Sale
Select the number of your current items for sale which you want to appear.
Caption:


Share Some of Your Favorite Links

Favorite Links
A listing of you favorite links.
Name:
URL:
Name:
URL:
Name:
URL:

 


EOF } #------------------------------------------------------# #------------------------------------------------------# # Add-On Sub: JustMeCreate # Form input of the JustMe page #------------------------------------------------------# sub justmecreate { print << "EOF";

Create your JustMe page.

Now you can create your own personal page at $sitename. This page is called $justmeicon. Tell the other users who you are! Show others what you collect! Display your auction items up for bid and create a storefront for yourself! You decide what you want to share with the other world.

Once you've created and saved your $justmeicon page, your page will be ready to share with others. You will receive a URL for your page that you can give to friends and associates so they can view your page.

To create your $justmeicon page, enter your Username and password below, fill in the information you want to include and click \"Preview Your Page\". Please keep this area clean, no pornography, vulgarities, obscenities or flaming of others.

You MUST be REGISTERED to use this feature!!

Username
Password
(must be valid)

Personalize Your Page (HTML coding is allowed in all these fields)

Page Title
Create a title for your page.
Title:
Welcome Message
Create a short paragraph to welcome visitors to your page.
Heading:
Text:
Another Paragraph
Anything else you want to share?
Heading:
Text:
Picture
Link to a picture that you've posted on the internet.
Caption:
URL:


Show Your $sitename Activity

EOF print << "EOF" if ($feederon == 1); EOF print << "EOF";
Feedback
Display your feedback comments.
Items for Sale
Select the number of your current items for sale which you want to appear.
Caption:


Share Some of Your Favorite Links

Favorite Links
A listing of you favorite links.
Name:
URL:
Name:
URL:
Name:
URL:

 


EOF } #------------------------------------------------------# #------------------------------------------------------# # Add-On Sub: JustMePreview # Previews the page before commiting #------------------------------------------------------# sub justmepre { $form{'ALIAS'} =~ s/\W//g; $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); &oops('not a registered user') unless (open(REGFILE, "$basepath$regdir/$form{'ALIAS'}.dat")); ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids) = ; close REGFILE; chomp($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids); &oops('incorrect password') unless ((lc $password) eq (lc $form{'PASSWORD'})); $pagetitle = $form{'pagetitle'}; $welcomehead = $form{'welcomehead'}; $welcomemsg = $form{'welcomemsg'}; $txthead = $form{'txthead'}; $txtmsg = $form{'txtmsg'}; $piccaption = $form{'piccaption'}; if ($form{'picurl'} eq 'http://') { $form{'picurl'} = ''; } $picurl = $form{'picurl'}; if ($feederon == 1) { $feednum = $form{'feednum'}; $feedtxt = $feednum; if ($feednum == 999999) { $feedtxt = "ALL" ;} } $itemlist = $form{'itemlist'}; $itemnum = $form{'itemnum'}; $favname1 = $form{'favname1'}; $favname2 = $form{'favname2'}; $favname3 = $form{'favname3'}; $favlink1 = $form{'favlink1'}; $favlink2 = $form{'favlink2'}; $favlink3 = $form{'favlink3'}; $tempalias = $form{'ALIAS'}; print << "EOF";

JustMe Page For: $form{'ALIAS'}


$pagetitle


$welcomehead
$welcomemsg

$txthead
$txtmsg

$piccaption
EOF print "

" if $picurl; if (($feednum != 0) && ($feederon == 1)) { if ($feedtxt ne 'ALL') { $feedtxt = 'up to ' . $feedtxt; } print << "EOF";
Feedback ratings provided by Dustin's Feeder Add-On
Displaying $feedtxt ratings
EOF &feedpage; } if ($itemnum != 0 ) { print "
$itemlist\n"; print "\n"; print "\n"; $itemtrak=1; $i=0; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($title, $reserve, $inc, $desc, $image, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $image, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; # Add-ons ######################## @firstbid=split(/\[\]/,$bids[0]); $hoticon=""; $hoticon=$hoticonpath if ($hotitemnum <= $#bids); $newicon=""; $newicon=$newiconpath if (time<($newdays * 86400 + $firstbid[3])); $timediff=($file - time); $endicon=""; $endicon=$endiconpath if ($timediff < ($endhours * 3600)); # End Add-on ######################## $camera=""; $camera =$piciconpath if ($image); $flag=0; # foreach $bid(@bids) { # if ($i % 2 == 1) { # $colortablebody=$odd_row_color; } # else { $colortablebody=$even_row_color; } # if (($firstbid[0] =~/$form{'ALIAS'}\b/i) && ($flag==0) && ($itemtraknum <= $itemnum)) { # print "\n"; } # else { # print "$closetime[1] \n"; } # $flag=1; # $itemtraknum++; # $i++; # } #} if (($firstbid[0] =~/$form{'ALIAS'}\b/i) && ($flag==0) && ($itemtraknum <= $itemnum)) { if ($i % 2 == 1) { $colortablebody=$odd_row_color; } else { $colortablebody=$even_row_color; } print "\n"; } else { print "$closetime[1] \n"; } $flag=1; $itemtraknum++; $i++; } } } } } print "
ItemClosesBidsHigh Bid
$hoticon$newicon $title$camera$endicon$closetime[4]/$closetime[3] $closetime[2]\:"; # if ($closetime[1] < 10) { # print "0$closetime[1] $#bids\$$lastbid[2]
$#bids\$$lastbid[2]
$hoticon$newicon $title$camera$endicon$closetime[4]/$closetime[3] $closetime[2]\:"; if ($closetime[1] < 10) { print "0$closetime[1] $#bids\$$lastbid[2]
$#bids\$$lastbid[2]
\n"; print << "EOF";
Favorite Links:
$favname1
$favname2
$favname3

If you are not happy with this page hit your back button
EOF } #------------------------------------------------------# # Add-On Sub: JustMeSave # Saves the page to disk #------------------------------------------------------# sub justmesave { $form{'ALIAS'} =~ s/\W//g; $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); $pagetitle = $form{'PAGETITLE'}; $welcomehead = $form{'WELCOMEHEAD'}; $welcomemsg = $form{'WELCOMEMSG'}; $txthead = $form{'TXTHEAD'}; $txtmsg = $form{'TXTMSG'}; $piccaption = $form{'PICCAPTION'}; $picurl = $form{'PICURL'}; $feednum = $form{'FEEDNUM'}; $itemlist = $form{'ITEMLIST'}; $itemnum = $form{'ITEMNUM'}; $favname1 = $form{'FAVNAME1'}; $favname2 = $form{'FAVNAME2'}; $favname3 = $form{'FAVNAME3'}; $favlink1 = $form{'FAVLINK1'}; $favlink2 = $form{'FAVLINK2'}; $favlink3 = $form{'FAVLINK3'}; umask(000); mkdir("$basepath$pagedir", 0777) unless (-d "$basepath$pagedir"); &oops('NEWMEFILE') unless (open(NEWMEFILE,">$basepath$pagedir/$form{'ALIAS'}.page")); print NEWMEFILE "$pagetitle\n$welcomehead\n$welcomemsg\n$txthead\n$txtmsg\n$piccaption\n$picurl\n$feednum\n$itemlist\n$itemnum\n$favname1\n$favname2\n$favname3\n$favlink1\n$favlink2\n$favlink3"; close(NEWMEFILE); if (-f "$basepath$pagedir/$form{'ALIAS'}.page") { print "
Page URL is http://$scripturl$ENV{'SCRIPT_NAME'}\?justdisp\&$form{'ALIAS'}\n"; print "
You can now give this url to friends.


"; } if (!(-f "$basepath$pagedir/$form{'ALIAS'}.page")) { print "
Your page could not be created. Please advise the auction administrator."; print "

"; } } #------------------------------------------------------# #------------------------------------------------------# # Add-On Sub: DispPage # Displays a users JustMe Page. Called via: ?justdisp&username #------------------------------------------------------# sub disppage { $i=0; $ARGV[1] = lc($ARGV[1]); $ARGV[1] = ucfirst($ARGV[1]); &oops('User has no JustMe page') unless (open THEPAGE, "$basepath$pagedir/$ARGV[1].page"); ($pagetitle,$welcomehead,$welcomemsg,$txthead,$txtmsg,$piccaption,$picurl,$feednum,$itemlist,$itemnum,$favname1,$favname2,$favname3,$favlink1,$favlink2,$favlink3) = ; close THEPAGE; chomp($pagetitle,$welcomehead,$welcomemsg,$txthead,$txtmsg,$piccaption,$picurl,$feednum,$itemlist,$itemnum,$favname1,$favname2,$favname3,$favlink1,$favlink2,$favlink3); if ($picurl eq 'http://') { $picurl = ''; } if ($feederon == 1) { $feedtxt = $feednum; if ($feednum == 999999) { $feedtxt = "ALL" ;} } print << "EOF"; To create your very own $justmeicon page click here

JustMe Page For: $ARGV[1]


$pagetitle


$welcomehead
$welcomemsg

$txthead
$txtmsg

$piccaption
EOF print "

" if $picurl; if (($feednum != 0) && ($feederon == 1)) { $form{'ALIAS'} = $ARGV[1]; if ($feedtxt ne 'ALL') { $feedtxt = 'up to ' . $feedtxt; } print << "EOF";
Feedback ratings provided by Dustin's Feeder Add-On
Displaying $feedtxt ratings
EOF &feedpage; } if ($itemnum != 0 ) { $itemtrak=1; print "
$itemlist\n"; print "\n"; print "\n"; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($title, $reserve, $inc, $desc, $image, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $image, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; # Add-ons ######################## @firstbid=split(/\[\]/,$bids[0]); $hoticon=""; $hoticon=$hoticonpath if ($hotitemnum <= $#bids); $newicon=""; $newicon=$newiconpath if (time<($newdays * 86400 + $firstbid[3])); $timediff=($file - time); $endicon=""; $endicon=$endiconpath if ($timediff < ($endhours * 3600)); # End Add-on ######################## $camera=""; $camera =$piciconpath if ($image); $flag=0; # foreach $bid(@bids) { # if ($i % 2 == 1) { # $colortablebody=$odd_row_color; } # else { $colortablebody=$even_row_color; } # if (($firstbid[0] =~/$ARGV[1]\b/i) && ($flag==0) && ($itemtraknum <= $itemnum)) { # print "\n"; } # else { # print "$closetime[1] \n"; } # $flag=1; # $itemtraknum++; # $i++; # } #} if (($firstbid[0] =~/$ARGV[1]\b/i) && ($flag==0) && ($itemtraknum <= $itemnum)) { if ($i % 2 == 1) { $colortablebody=$odd_row_color; } else { $colortablebody=$even_row_color; } print "\n"; } else { print "$closetime[1] \n"; } $flag=1; $itemtraknum++; $i++; } } } } } print "
ItemClosesBidsHigh Bid
$hoticon$newicon $title$camera$endicon$closetime[4]/$closetime[3] $closetime[2]\:"; # if ($closetime[1] < 10) { # print "0$closetime[1] $#bids\$$lastbid[2]
$#bids\$$lastbid[2]
$hoticon$newicon $title$camera$endicon$closetime[4]/$closetime[3] $closetime[2]\:"; if ($closetime[1] < 10) { print "0$closetime[1] $#bids\$$lastbid[2]
$#bids\$$lastbid[2]
\n"; print << "EOF";
Favorite Links:
$favname1
$favname2
$favname3

EOF } #------------------------------------------------------# #------------------------------------------------------# # Following section borrowed from Dustins Feeder Add-on daddons.cgi # Thanks dustin for the GREAT add-on #------------------------------------------------------# sub feedpage { $ind = ""; $amount = 0; $overall = 0; $plus = 0; $neutral = 0; $negative = 0; $ccc = $form{'ALIAS'}; $ddd = $2; $usernam = "$ccc"; $usernam = lc($usernam); if($allowcase == 1) {$usernam = ucfirst($usernam);} if ($ddd) { $chkext = $basepath . $feeddir . "/" . $ccc . ".feed"; if ( -e $chkext ) { open (CNT, $chkext); while () { @ccu = ; } close (CNT); $chk = 0; foreach $bb (@ccu) { ($bb1, $bb2, $bb3) = split /:::/, $bb; if ($bb3 == 1) {$chk++;} elsif ($bb3 == 3) {$chk--;} } } else { $chk = 0; } if ($ddd != 2) {$r1 = "$ccc";} else { $realu = $basepath . $regdir . "/" . $ccc . ".dat"; open (REGFILE, $realu); ($pass, $a1) = ; close REGFILE; chomp($pass, $a1); $r1 = "$ccc"; } $r2 = "\($chk\)"; if ($chk >= 10 && $chk < 51) {$r3 = "";} if ($chk >= 51 && $chk < 101) {$r3 = "";} if ($chk >= 101) {$r3 = "";} return "$r1 $r2 $r3"; } else{ $pathu = $basepath . $feeddir . "/" . $usernam . ".feed"; $realu = $basepath . $regdir . "/" . $usernam . ".dat"; $makefeed = $basepath . $feeddir; mkdir $makefeed, 0777 unless -d $makefeed; if ($usernam eq "") { &oops('no supplied username') } elsif (! -e $realu ) { &oops('not a registered username') } else { if ($iscentered == 1) {print "
";} if ( -e $pathu ) { open (CFEED, $pathu); @readf = ; close(CFEED); $amount = @readf; if ($feednum == 999999){$feednum = 9999;} $iii = 0; foreach $ww (reverse @readf) { if ($iii != $feednum) { ($user, $date, $stat, $comment) = split /:::/, $ww; if ($user ne "0") { if ($stat eq "1") { $stater = "PRAISE"; $overall = $overall + 1; $plus = $plus + 1;} elsif ($stat eq "2") { $stater = "NEUTRAL"; $neutral = $neutral + 1;} elsif ($stat eq "3") { $stater = "NEGATIVE"; $overall = $overall - 1; $negative = $negative + 1;} $date = $date + 0; $currdat = localtime($date); $leftbyu = $basepath . $feeddir . "/" . $user . ".feed"; if ( -e $leftbyu ) { open (CHILD, $leftbyu); while () { @rowc = ; } close (CHILD); $fed = 0; foreach $aa (@rowc) { ($aa1, $aa2, $aa3) = split /:::/, $aa; if ($aa3 == 1) {$fed++;} elsif ($aa3 == 3) {$fed--;} } } else { $fed = 0; } $ind = $ind . "\n \n"; $ind = $ind . " \n \n
\n"; $ind = $ind . " \n"; $ind = $ind . " \n \n\n"; $ind = $ind . " \n
$tdfont \n"; if ($linkemail != 2) {$ind = $ind . " $user";} else { $realu = $basepath . $regdir . "/" . $user . ".dat"; open (REGFILE, $realu); ($pass, $a1) = ; close REGFILE; chomp($pass, $a1); $ind = $ind . " $user"; } $ind = $ind . " ($fed) \ \;"; if ($fed >= 10 && $fed < 51) {$ind = $ind . "\"10-50\"";} if ($fed >= 51 && $fed < 101) {$ind = $ind . "\"51-100\"";} if ($fed >= 101) {$ind = $ind . "\"101-up\"";} $ind = $ind . " \ \; $currdat
"; $ind = $ind . " $tdfont ($stater) \ \; $comment
\n"; $ind = $ind . "

\n\n\n"; $iii++; } } } } else { open (NFEED, ">$pathu"); &filelock if ($flock); print NFEED "0:::0:::0:::0" . "\n"; close (NFEED); chmod 0777, "$pathu"; &feeder_row(1); $fl = 1; } if (! $fl) {&feeder_row($amount,$overall,$plus,$neutral,$negative,$ind);} if ($iscentered == 1) {print "
";} } } } #------------------------------------------------------# # Previous section borrowed from Dustins Feeder Add-on daddons.cgi # Thanks dustin for the GREAT add-on #------------------------------------------------------# 1;