#======================================================#
# 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.
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.
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);
Feedback
Display your feedback comments.
EOF
print << "EOF";
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.