\n"; print "


\n$header\n"; } if ($cg eq "post_ad" || $cg eq "do_delete_ad" || $cg eq "add_to_categories" || $cg eq "do_delete_cat" || $cg eq "do_email" || $cg eq "search_ads" || $cg eq "email_ad_friend" || $cg eq "admin_access" ) { read(STDIN, $input, $ENV{'CONTENT_LENGTH'}); # split the input @pairs = split(/&/, $input); # split the name/value pairs foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; # change value to allow Returns. if ($cg eq "do_email" || $cg eq "add_to_categories" ) { $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; } else { $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/<([^>]|\n)*>//g; $value =~ s/(\s+|\n)?,(\s+|\n)?/,/g; $value =~ s/(\s+)?\n+(\s+)?//g; } $FORM{$name} = $value; } } $modify=0; $multisearch=0; #display ads $did=0; if ($cg eq "display_ads") { &displayads; $did=1; } if ($cg eq "place_ads") { if ($spamable ne "yes") { &check_url; } &place_ads; $did=1; } if ($cg eq "post_ad") { if ($spamable ne "yes") { &check_url; } &post_ad; $did=1; } if ($cg eq "delete_ad") { &delete_ad; $did=1; } if ($cg eq "do_delete_ad") { &do_delete_ad; $did=1; } if ($cg eq "add_category") { &add_category; $did=1; } if ($cg eq "add_to_categories") { &add_to_categories; $did=1; } if ($cg eq "delete_cat") { &delete_cat; $did=1; } if ($cg eq "do_delete_cat") { &do_delete_cat; $did=1; } if ($cg eq "admin_access") { &check_url; &admin_access; $did=1; } if ($cg eq "do_email") { &check_url; &do_email; $did=1; } if ($cg eq "friend") { &check_url; &friend; $did=1; } if ($cg eq "frames") { &frames; $did=1; } if ($cg eq "frames1") { &frames1; $did=1; } if ($cg eq "email_ad_friend") { &check_url; &email_ad_friend; $did=1; } if ($cg eq "search_ads") { @keywords = split(/,/,$FORM{'keywords'}); &check_url; @keywords = split(/,/,$FORM{'keywords'}); $sear=1; if ($FORM{'submit'} eq 'Search All Topics [will take longer]') { $multisearch=1; for ($data=1;$data<@cats;$data++) { &displayads; } } else { &displayads; } $did=1; } if ($did eq "0") { &showcategories; } if ($cg ne "frames1") { print "$footer



\n"; } exit; # # End main # sub showcategories { $c=int(@cats / 2)+1; print qq~
\n~; $c=0; for ($a = 1; $a < @cats; $a++) { @words = split(/\|/,$cats[$a]); if (@words[0] ne '' ) { &newdatabasecreate("@words[0]"); } print qq~\n~; $c++; if ($c eq "2") { $c=0; print "\n"; } } print qq~
Features:

Ad Readers: [Info]
* Fast Ad Viewing
* Keyword Search
* Keyword Notify
* Global Keyword Notify
* Global "New Ad" Notify
* "Send Email to Friend"
Advertisers: [Info]
* Free, Global & Paid Ads
* Exclusive 'last view' of Ad
* Email on Expiry of Ad
* Anti email "harvesting"
* Hourly Ads Rotation
* "Send Email to Friend"
* Modify/Delete By Password
* Many Ad Expiry periods
Webmasters: [Info]
* Fully Automated
* Online Interface
* Fast 1 File Install
* Revenue Source
* Unlimited Categories
* Unlimited Ads
* Anti Spam/Duplicates
* "Send Email to Friend"
* Free, Paid, Banner Ads
* Auto Email Advertisers
* It's Free! Click Here

  Your Classifieds 
  for getting Results!
$img
@words[1] - View/Post Ads
@words[2]

Search All
Keywords [separate by commas]:

A "Global Search" will allow you to search all sites in the network of
ISELL Networked Sites worldwide plus access other FREE options too.

Admin ONLY Settings
Password:

\n~; } sub newdatabasecreate { local ($x) = @_; if (-e "$x") { } else { open(HTML, ">$x") || print "I can't create that file\n"; print HTML ""; close(HTML); chmod 0644, '$x'; } } sub displayads { ($fl,$nm,$dec) = split(/\|/,@cats[$data]); open(HTML,$fl) || print "I can't access that file\n"; @count = ; close(HTML); $c=@count; $results=0; $ct=$c * ($hour/$hourly); $ct=int($ct); $adnum=0; if ($sear ne "1") { print "
$nm {$c ads }
$dec

$img

\n"; } if ($showads eq "0" ){ $showads= @count;} if ($singlead ne "") { $adnum=$singlead; } else {$adnum=$adnum+$ct;} if ($adnum>= @count) {$adnum=0;} if ($sear eq "1") { $showads=@count; $adnum=0; print "

$nm {$c listings }
$dec

\n"; print "Search Results [maximum 25] for:
@keywords

\n"; } $dodelete=0; $rlv=0; $keepad=$adnum; $ttads=0; if (@count eq 0) {print "

No Ads in this category.\n"; $showads=-1;} for ($a = 0; $a < $showads; $a++) { @words = split(/\|/,@count[$adnum]); $show=1; if ($sear eq "1") { $show=0; for ($i = 0; $i < @keywords; $i++) { if (index(@count[$adnum],@keywords[$i])>=0){$show++;} } if ($show eq @keywords) {$show=1; $results++;} else {$show=0; } } $adnum++; $ttads++; if ($ttads > @count ) {last;} $x=@words; $xx2=""; if (substr(@words[$x-1],0,6) eq "?never") { $dt="Never Expiry
Premium Ad
"; $xx2="bgcolor=green border=5";} else { $dt=localtime(@words[$x-1]); if (substr(@words[$x-1],0,1) eq "?") { @words[$x-1]=substr(@words[$x-1],1); $dt=localtime(@words[$x-1]) . "
Premium Ad"; $xx2="bgcolor=green border=5"; } if (time>@words[$x-1] && @words[$x-1] !="") { $dodelete=1; $dt="!! Now - Last Viewing"; } } if ($show eq "1") { print qq~
Posted By: @words[0]
@words[3], @words[5]

Ad $adnum Expires:
$dt

@words[7]

@words[8]

| Email this ad to a Friend | Go to Website | Send An Email |


\n~; } if ($adnum >= @count ) {$adnum=0; } if ($results>25 ) { $a=$showads; $ttads=$a; last;} } if ($ttads < @count ) { print "

[--- Next Ads ----]\n"; } if ($dodelete eq "1") { &purge_data; } if (($multisearch eq "1" && $data eq (@cats-1) ) || $multisearch eq "0") { print qq~


Search All Ads in $nm:
Keywords [separate by commas]:


A "Global Search" will allow you to search all sites in the network of
ISELL Networked Sites worldwide plus access other FREE options too.

[Post Ad in This Category] [Modify / Delete Ad in This Category]

$ret

\n~; } } sub place_ads { ($fl,$nm,$dec) = split(/\|/,@cats[$data]); if ($modify eq "1") { ($fl,$nm,$dec) = split(/\|/,@cats[$FORM{'cat'}]); open(HTML,$fl) || print "I can't access that file\n"; @count = ; close(HTML); @modad=split(/\|/,@count[$FORM{'number'}]); $data=$FORM{'cat'}; $ex2="
Only Admin can modify expiry date."; } $ex1="\n"; print qq~

$nm

$dec

Post Your FREE Ad:

* All Fields are required.
* Only name, email, url, headline and ad copy will appear online.
* If you want to have more contact info included, add it to your ad copy only.
* HTML is not allowed.
* If there is an error you will get a pop up notice.
* If you do not have a website, leave the website field BLANK.

\n~; $sc=" Ad To Last: $ex1
$ex2

* Upon submissions you will have the option to make your ad GLOBALLY accessible FREE worldwide.

By submitting your FREE AD, you agree to accept:

---> 1 AUTOMATED email confirming submissions of your ad,
---> 1 AUTOMATED email confirming expiration of your ad
---> An occasional email direct from the operator of this site.

-----> Which you will NOT consider SPAM under ANY circumstances.

Admin Only:

Enter your Password for "ADMIN" Time periods ,"NEVER" expiry, "Modify" Expiry and "duplicate override".]

Admin Password:

[Click Here To Return to $nm ] $ret \n~; } sub post_ad { ($fl,$nm,$dec) = split(/\|/,@cats[$FORM{'cat'}]); $d=""; if (-e "$block") { } else { open(HTML, ">$block") || print "I can't create that file\n"; print FILE ""; close(FILE); chmod 0644, '$block'; } open(HTML,$block) || print "I can't access that file\n"; @badwords =; close(HTML); $f=0; $f=@badwords; if ($f>10) { $f=10; } for ($i=0;$i<$f;$i++) { chomp(@badwords[$i]); if (index(lc($FORM{'Website Address'}),lc(@badwords[$i]) )> -1) { print "

SORRY!

$FORM{'Website Address'} has been Banned by webmaster by this site...

"; exit; } } for ($b = 0; $b < @items; $b++) { ($i1,$i2,$ty,$req) = split(/\|/,@items[$b]); $d=$d . $FORM{$i1} . "|"; } $ex=$FORM{'exp'}; if ($FORM{'pass-admin'} eq $adminpassword ) { if ($ex ne '?never' && index($ex,'?')> -1 ) { $ex="?" . (time+(substr($ex,1)*86400)); } if ( $FORM{'pass-admin'} eq $adminpassword && index($ex,'?')< 0 ) { $ex=time+($ex*86400); } if ( $FORM{'exp'} eq "" ) { $ex=$FORM{'expmod'}; } } else { if ( $FORM{'expmod'} ne "" ) { $ex=$FORM{'expmod'}; } else { if ( index($ex,"?") eq 0 ) { print "

Admin Only - Invalid Password - you can not choose these time periods.

$ret\n"; exit; } else { $ex=time+($ex*86400); } } } $d=$d . $ex; open(HTML,$fl) || print "I can't access that file\n"; @count = ; close(HTML); $dup="0"; ($xx1,$ty2,$ty,$req) = split(/\|/,@items[9]); ($xx2,$ty,$ty2,$req) = split(/\|/,@items[10]); for ($a=0; $a<@count; $a++) { @words=split(/\|/,@count[$a]); if (@words[9] eq $FORM{$xx1} ) { $dup="1"; last;} } if ($FORM{'expmod'} ne "") { if (index($d,'\n') < 0 ) { $d=$d . "\n"; } @ReturnArray = splice(@count,$FORM{'mod'},1,$d ); &get_file_lock("$fl.lock"); open(FILE, ">$fl") || print "I can't create that file\n"; print FILE @count ; close(FILE); &release_file_lock("$fl.lock"); print "

Ad Updated

$ret \n"; } if ( ($dup ne "1" || $FORM{'pass-admin'} eq $adminpassword) && $FORM{'expmod'} eq "" ) { if (@count>$maxads) { &purge_data; } &get_file_lock("$fl.lock"); open(FILE, ">>$fl") || print "I can't create that file\n"; print FILE "$d\n"; close(FILE); &release_file_lock("$fl.lock"); if ($ex ne "never") { $ex=localtime($ex); } if ($FORM{'Password'} eq $adminpassword) { $FORM{'Password'}="Admin Password"; } open(FILE, $topslogan1 ) || print "I can't open that file\n"; @ads = ; close(FILE); open(FILE, $topslogan2 ) || print "I can't open that file\n"; @ads2 = ; close(FILE); $sender="text/plain \n"; if ($adsendhtml eq 'html') { $sender="text/html \n

";}


if ($emcopy ne "" ) {
	$emcopy="TO: $FORM{'Name'}<$FORM{'Email Address'}>\n" . 'BCC: ' . $emcopy ;
	}
else {
$emcopy="TO: $FORM{'Name'}<$FORM{'Email Address'}>";
}


open (MAIL1, "|$sendmail -t ");

print MAIL1 qq~$emcopy
FROM: "Classifieds at $home" <$email>
SUBJECT: $FORM{'Name'} Thank you!
Content-Type: $sender

@ads


Thank you $FORM{'Name'} for your ad posting:

Headline: $FORM{'Headline'}

Ad Copy: $FORM{'Ad Copy'}

E-Mail: $FORM{'Email Address'}
Name: $FORM{'Name'} 
URL: $FORM{'Website Address'}

Your Ad will expire on: $ex
Your Ad Delete is : 

Password: $FORM{'Password'}

in :

Category: $nm
Detailed: $dec

Posted at Classifieds website:

Site: $home

Please visit us again to re-post your ad.
You will get an expiry notice as well.

Thanks.
Webmaster at $home
$opname

@ads2

\n~;
close (MAIL1);

if ($paidlink ne "") {
	
print qq~