Home
List Sites
Join Ring
HTML Code
Ring Graphics
RingMistress
#!/usr/bin/perl
$ringselect = qq~~;
#################--- Begin the program ---###################
use CGI::Carp "fatalsToBrowser"; # Output errors to browser
use CGI qw(:standard); # Saves loads of work
$CGI::POST_MAX=1024 * 150; # limit post data
$CGI::DISABLE_UPLOADS = 0; # Disable uploads
$CGI::HEADERS_ONCE = 1; # Kill redundant headers
eval {
($0 =~ m,(.*)/[^/]+,) and unshift (@INC, "$1");
($0 =~ m,(.*)\\[^\\]+,) and unshift (@INC, "$1");
};
$|++; # Unbuffer the output
# Get the input #
$query = new CGI;
# Convert the variables #
$action = $query->param('action');
$password = $query->param('pw');
$siteid = $query->param('siteid');
$sitemail = $query->param('sitemail');
$siteowner = $query->param('siteowner');
$ringprog = $query->param('ringprog');
if ($action eq "code") {
if ($ringprog =~ /webring/) {
# direct user to the webring system
$redirect = qq~http://f.webring.com/mbr?p=mu~;
print "Location: $redirect\n\n";
exit;
}
&get_code;
}
elsif ($action eq "join") {
if ($ringprog =~ /webring/) {
$redirect = qq~http://f.webring.com/wrman?ring=pureback&addsite~;
print "Location: $redirect\n\n";
exit;
}
else { &printjoinform; }
}
elsif ($action eq "edit") {
if ($ringprog =~ /webring/) {
$redirect = qq~http://f.webring.com/wrman?ring=pureback&id=$siteid&edit~;
print "Location: $redirect\n\n";
exit;
}
else { &printeditform; }
}
else { &printhomepage; }
&printpage;
exit;
sub switchrings {
print "$ENV{'HTTP_REFERER'}\n";
}
sub printpage {
$output = qq~
Purely Backgrounds
$pagecode