include("config.php"); include("$header"); if (!$action) { ?>
Fill out the form below to join this fanlisting. If you wish to update your member info, please use the Update Form.
Oops, it appears you forgot to enter either your email address, your name or your country. Please press the BACK button in your browser and try again.
"; } else { $query="SELECT id FROM $table WHERE email='$email'"; $result=mysql_query($query); $num=mysql_numrows($result); if ($num == "0"){ if ($emailnotify == 'Y'){ $msg = "Name:\t$_POST[name]\n"; $msg .= "E-Mail:\t$_POST[email]\n"; $msg .= "Hide E-Mail:\t$_POST[hideemail]\n"; $msg .= "URL:\t$_POST[url]\n"; $msg .= "Country:\t$_POST[country]\n"; if ($enablefave == 'Y'){ $msg .= "Fave:\t$_POST[fave]\n"; } $msg .= "Comments:\t$_POST[comments]\n"; $msg .= "Sender IP:\t$REMOTE_ADDR\n"; $msg .= "\nLogin to your Admin Panel: $siteurl/admin.php\n"; $recipient = "$adminemail"; $subject = "Member - $sitename"; $mailheaders = "From: $_POST[email]\n"; $mailheaders .= "Reply-To: $_POST[email]\n\n"; mail($recipient, $subject, $msg, $mailheaders); } if ($enablefave == 'Y'){ $query = "INSERT INTO $table VALUES ('','$name','$email','$url','$country','$comments','$hideemail','$apr','$fave')"; mysql_query($query); } else { $query = "INSERT INTO $table VALUES ('','$name','$email','$url','$country','$comments','$hideemail','$apr')"; mysql_query($query); } echo "Thank you, $_POST[name]! You will be added to the members list with the next update. :)
"; } else { ?>Sorry, but this email address is already listed in the database. This means that you're already listed as a member. If you wish to update your member information, please use the Update Form. If you want to see your listing as a member, please click here.
} } } elseif ($action == "update"){ ?>Please use the form below to update your member information. If you wish to join this fanlisting, please use the Join Form.
} elseif ($action == "sendupdate"){ if (!isset($_POST[name]) || !isset($_POST[email]) || !isset($_POST[country])) { header( "$siteurl/join.php?update" ); } elseif (empty($_POST[name]) || empty($_POST[email]) || empty($_POST[country])) { echo "Oops, it appears you forgot to enter either your old email address, your name or your country. Please press the BACK button in your browser and try again.
"; } else { $msg = "Name:\t$_POST[name]\n"; $msg .= "Old E-Mail:\t$_POST[email]\n"; $msg .= "Old URL:\t$_POST[url]\n"; $msg .= "Country:\t$_POST[country]\n"; $msg .= "New E-Mail:\t$_POST[newemail]\n"; $msg .= "New URL:\t$_POST[newurl]\n"; $msg .= "Other Changes:\t$_POST[comments]\n"; $msg .= "Sender IP:\t$REMOTE_ADDR\n"; $msg .= "\nLogin to your Admin Panel: $siteurl/admin.php\n"; $recipient = "$adminemail"; $subject = "Update Info - $sitename"; $mailheaders = "From: $_POST[email]\n"; $mailheaders .= "Reply-To: $_POST[email]\n\n"; mail($recipient, $subject, $msg, $mailheaders); echo "Thanks, your Update has been sent. I will change your information as soon as possible!
"; ?> } } include("$footer"); ?>