#!/usr/bin/perl 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 = 1; # Disable uploads eval { ($0 =~ m,(.*)/[^/]+,) and unshift (@INC, "$1"); ($0 =~ m,(.*)\\[^\\]+,) and unshift (@INC, "$1"); require "ikon.lib"; # Require ikonboard () require "ikonadmin.lib"; # Require Admin func() require "data/progs.cgi"; # Require prog names require "data/boardinfo.cgi";# Require board info require "data/styles.cgi"; # Require styles info }; if ($@) { print header(); print start_html(-title=>"Ikonboard Error!"); print "Could not find these files: $@\nIf you are running NT you may need to enter the full path in each require statement in each script"; print end_html; exit; } $|++; # Unbuffer the output #################--- Begin the program ---################### $thisprog = "setbademail.cgi"; $query = new CGI; &checkVALIDITY; $cookiepath = $query->url(-absolute=>1); $cookiepath =~ s/$thisprog//sg; $mailarray = $query -> param('mailarray'); $action = $query -> param("action"); $action = &cleaninput("$action"); $inmembername = cookie("adminname"); $inpassword = cookie("adminpass"); print header(); &admintitle; if ($action eq "process") { &getmember("$inmembername"); if (($membercode eq "ad") && ($inpassword eq $password) && ($inmembername eq $membername)) { $mailarray =~ s/\n\n//g; @savedmailarray = split(/\&/,$mailarray); $filetomake = "$ikondir" . "data/badmails.cgi"; open (FILE, ">$filetomake"); print FILE $mailarray; close (FILE); if (-e $filetomake && -w $filetomake) { print qq( Welcome your ikon board Administration Center
All information saved


You have the following saved bad E-Mail Addresses

); foreach $bad (@savedmailarray) { chomp $_; # ($bad, $good) = split(/\=/,$_); print qq($bad will not be accepted
); } print qq(


Add more E-Mail Addresses
); } else { print qq( Welcome your ikon board Administration Center All information NOT saved
The file, or directory is not writable. ); } } } else { &getmember("$inmembername"); if (($membercode eq "ad") && ($inpassword eq $password) && ($inmembername eq $membername)) { # Open the badmail file $filetoopen = "$ikondir" . "data/badmails.cgi"; open (FILE, "$filetoopen") or $badmails = "\@hotmail.com"; $badmails = if (!$badmails); close (FILE); $inmembername =~ s/\_/ /g; print qq( Welcome to your ikon board Administration Center / Bad E-Mail Address filter Bad mail filter
Please note: This bad e-mail filter is designed to stop certain e-mails from being registered.
You can choose which mails are stopped.
This stop is done at the time of registering and at change profile
If someone registers with an filtered e-mail he/she gets an error and can't register

Instructions: Simply enter the bad e-mail 'addition' (i.e. \@hotmail.com).
Please make sure that the e-mail addresses are split by a &

); } else { &adminlogin; } } print qq~~; exit;