} if (!empty($clean['url']) && !preg_match('/^(http|https):\\/\\/(([A-Z0-9][A-Z0-9_-]*)(\\.[A-Z0-9][A-Z0-9_-]*)+)(:(\\d+))?\\/?/i', $clean['url'])) { $error_msg .= "The website url you provided is not valid. Please remove and try again or fix the URL.\r\n"; } if ($clean['country'] == "null" || filesize(COUNTRIES) > 0 && checkTXTfile(COUNTRIES, $clean['country'], "country") === false) { $error_msg .= "Please select a valid country. \r\n"; } if (filesize(IPBLOCKLST) > 0 && checkTXTfile(IPBLOCKLST, $_SERVER['REMOTE_ADDR'], "ip") === true) { echo "<p>Your IP is in the block list, that means you're not allowed to join at this time. \r\n</p>"; exit(include 'footer.php'); } if (filesize(NEWBIES) > 0 && checkTXTfile(NEWBIES, breakEmail($clean['email']), "email") === true) { echo "<p>You're already in the pending queue, you can't join twice!</p> \n"; exit(include 'footer.php'); } if (filesize(MEMBERS) > 0 && checkTXTfile(MEMBERS, breakEmail($clean['email']), "email") === true) { echo "<p>You're already a member of the fanlisting, you can't join twice!</p> \n"; exit(include 'footer.php'); } if ($error_msg == NULL) { $show_form = false; // attempt to break email to piss off spammers :p $clean['email'] = breakEmail(strtolower($clean['email'])); // send off some emails if ($emailnewbies == "yes") { $subject = "Thank you for joining {$title}"; $message = $thanksjoinMsg; $message .= "Name: {$clean['name']} \n"; $message .= "Email: " . fixEmail($clean['email']) . " \n"; $message .= "URL: {$clean['url']} \n"; $message .= "Country: {$clean['country']} \n";
if ($clean['dispemail'] != "yes" && $clean['dispemail'] != "no") { $error_msg .= "You didn't choose whether or not you'd like to show your e-mail address on the member list. \r\n"; } if ($clean['fave'] != "" && (!preg_match("/^[a-zA-Z0-9-'\\s]*\$/", $clean['fave']) || strlen($clean['fave']) > 20)) { $error_msg .= "Your chosen \"favourite\" is not valid. It must contain letters and numbers only, and must be less than 20 characters. \r\n"; } if (!preg_match('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+' . '(\\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', strtolower($clean['email']))) { $error_msg .= "The email address you have used is not valid. \r\n"; } if (!empty($clean['newemail']) && !preg_match('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+' . '(\\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', strtolower($clean['newemail']))) { $error_msg .= "The new email address you have used is not valid. \r\n"; } if (!empty($clean['url']) && !preg_match('/^(http|https):\\/\\/(([A-Z0-9][A-Z0-9_-]*)(\\.[A-Z0-9][A-Z0-9_-]*)+)(:(\\d+))?\\/?/i', $clean['url'])) { $error_msg .= "The website url you provided is not valid. Please remove and try again or fix the URL.\r\n"; } if ($clean['country'] == "null" || filesize(COUNTRIES) > 0 && checkTXTfile(COUNTRIES, $clean['country'], "country") === false) { $error_msg .= "Please select a valid country. \r\n"; } if ($error_msg == NULL) { $show_form = false; $subject = "Update member at {$title}"; $message = "A member at your {$FLsubject} fanlisting wants updating with following details: \n\n"; $message .= "Name: {$clean['name']} \n"; $message .= "Email: " . strtolower($clean['email']) . " \n"; $message .= "New Email: {$clean['newemail']} \n"; $message .= "New URL: {$clean['newurl']} \n"; $message .= "Country: {$clean['country']} \n"; $message .= "Comments: {$clean['comments']} \n"; $message .= "IP: {$_SERVER['REMOTE_ADDR']} \n\n"; $message .= "Manage members: {$FLurl}/admin.php"; if (!strstr($_SERVER['SERVER_SOFTWARE'], "Win")) {
<input type="submit" id="submit" name="submit" value="send" /> </p></form> <?php echo "<p><a href='admin.php'>Back to admin panel?</a></p>"; break; case "search": if (isset($_GET['p']) && $_GET['p'] == "process") { if (!ereg("^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,6})\$", strtolower($_POST['email']))) { echo "<p>That is not a valid e-mail address.</p>"; echo "<p><a href='admin.php'>Back to admin panel?</a></p>"; include 'footer.php'; exit; } if (filesize(MEMBERS) > 0 && checkTXTfile(MEMBERS, breakEmail($_POST['email']), "email") === true) { $file = MEMBERS; } elseif (filesize(NEWBIES) > 0 && checkTXTfile(NEWBIES, breakEmail($_POST['email']), "email") === true) { $file = NEWBIES; } if (!isset($file)) { echo "<p>Something went horribly, drastically wrong! Run for your life!</p>"; echo "<p>...</p>"; echo "<p>Just kidding — that member does <strong>not</strong> exist.</p>"; echo "<p><a href='admin.php'>Back to admin panel?</a></p>"; include 'footer.php'; exit; } $members = file($file); foreach ($members as $key => $value) { if (preg_match("/(" . breakEmail($_POST['email']) . ")/i", $value)) { list($name, $email, $dispemail, $url, $country, $fave) = preg_split("/,(?! )/", $value); if (empty($url) || $url == "http://" || $url == "") {