} } if (isset($_GET["option"]) && $_GET["option"] == "invalidemail") { #include dirname(__FILE__).'/actions/listinvalid.php'; print '<div id="listinvalid">LISTING</div>'; } elseif (isset($_GET["option"]) && $_GET["option"] == "fixinvalidemail") { Info($GLOBALS['I18N']->get("Trying to fix subscribers with an invalid email")); flush(); $req = Sql_Query("select id,email from {$tables["user"]}"); $c = 0; while ($row = Sql_Fetch_Array($req)) { set_time_limit(60); # if (checkMemoryAvail()) if (!is_email($row["email"])) { $c++; $fixemail = fixEmail($row["email"]); if (is_email($fixemail)) { Sql_Query(sprintf('update %s set email = "%s" where id = %d', $tables["user"], $fixemail, $row["id"]), 0); $list .= PageLink2("user&id=" . $row["id"] . "&returnpage=reconcileusers&returnoption=fixinvalidemail", $GLOBALS['I18N']->get('User') . " " . $row["id"]) . " [" . $row["email"] . '] => fixed to ' . $fixemail . '<br/>'; $fixed++; } else { $notfixed++; $list .= PageLink2("user&id=" . $row["id"] . "&returnpage=reconcileusers&returnoption=fixinvalidemail", $GLOBALS['I18N']->get('User') . " " . $row["id"]) . " [" . $row["email"] . ']<br/>'; } } } print $fixed . " " . $GLOBALS['I18N']->get('subscribers fixed') . "<br/>" . $notfixed . " " . $GLOBALS['I18N']->get("subscribers could not be fixed") . "<br/>" . $list . "\n"; } elseif (isset($_GET["option"]) && $_GET["option"] == "deleteinvalidemail") { Info($GLOBALS['I18N']->get("Deleting subscribers with an invalid email")); flush(); $req = Sql_Query("select id,email from {$tables["user"]}");
} } if (isset($_GET['option']) && $_GET['option'] == 'invalidemail') { #include dirname(__FILE__).'/actions/listinvalid.php'; print '<div id="listinvalid">LISTING</div>'; } elseif (isset($_GET['option']) && $_GET['option'] == 'fixinvalidemail') { Info($GLOBALS['I18N']->get('Trying to fix subscribers with an invalid email')); flush(); $req = Sql_Query("select id,email from {$tables['user']}"); $c = 0; while ($row = Sql_Fetch_Array($req)) { set_time_limit(60); # if (checkMemoryAvail()) if (!is_email($row['email'])) { ++$c; $fixemail = fixEmail($row['email']); if (is_email($fixemail)) { Sql_Query(sprintf('update %s set email = "%s" where id = %d', $tables['user'], $fixemail, $row['id']), 0); $list .= PageLink2('user&id=' . $row['id'] . '&returnpage=reconcileusers&returnoption=fixinvalidemail', $GLOBALS['I18N']->get('User') . ' ' . $row['id']) . ' [' . $row['email'] . '] => fixed to ' . $fixemail . '<br/>'; ++$fixed; } else { ++$notfixed; $list .= PageLink2('user&id=' . $row['id'] . '&returnpage=reconcileusers&returnoption=fixinvalidemail', $GLOBALS['I18N']->get('User') . ' ' . $row['id']) . ' [' . $row['email'] . ']<br/>'; } } } print $fixed . ' ' . $GLOBALS['I18N']->get('subscribers fixed') . '<br/>' . $notfixed . ' ' . $GLOBALS['I18N']->get('subscribers could not be fixed') . '<br/>' . $list . "\n"; } elseif (isset($_GET['option']) && $_GET['option'] == 'deleteinvalidemail') { include 'actions/reconcileusers.php'; } elseif (isset($_GET['option']) && $_GET['option'] == 'markinvalidunconfirmed') { Info($GLOBALS['I18N']->get('Marking subscribers with an invalid email as unconfirmed'));
function checkContactUs($email, $name, $subject, $comments) { $email = fixEmail($email); if (!isValidEmail($email)) { return INVALID_EMAIL_ERR; } $name = fixName($name); if (!isValidName($name)) { return INVALID_NAME_ERR; } $subject = fixTitleCase($subject); global $CONTACT_US_SUBJECTS; if (!in_array($subject, $CONTACT_US_SUBJECTS)) { return INVALID_CONTACT_US_SUBJECT; } $comments = trim($comments); if ($comments === "") { return INVALID_COMMENTS_ERR; } return sendContactUsEmail($email, $name, $subject, $comments); }
} ?> <table style="width: 100%;"> <tr> <th>Name</th> <th>E-mail</th> <th>Website</th> <th>Country</th> <?php if (isset($favefield) && $favefield == "yes") { echo "<th>{$favetext}</th>"; } ?> </tr> <?php while ($i < $end) { list($name, $email, $dispemail, $url, $country, $fave) = preg_split("/,(?! )/", $members[$i]); $fave = trim($fave, "\".."); if ($dispemail == "yes") { // this bit of javascript prevents the email address being picked up by bots $email = "\n\t\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t <!--//\n\t\t\t\t\t\tdocument.write('<a href=\"mailto:" . fixEmail($email) . "\">e-mail<\\/a>');\n\t\t\t\t\t\t //-->\n\t\t\t\t\t\t</script>\n\t\t\t\t"; } else { $email = "<del>e-mail</del>"; } if (empty($url) || $url == "http://") { $url = "<del>www</del>"; } else { $url = "<a href=\"{$url}\" title=\"{$name}'s website\">www</a>"; } echo "\n\t\t\t\t<tr> <td>{$name}</td> \n\t\t\t\t<td>{$email}</td>\n\t\t\t\t<td>{$url}</td> <td>{$country}</td>\n\t\t\t"; if (isset($favefield) && $favefield == "yes") { echo "<td>" . str_replace('|', ',', stripslashes($fave)) . "</td>"; } echo "</tr>"; $i++; }
function getUserByEmail($email) { $conn = DBManager::getConn(); $stmt = $conn->prepare("SELECT `first_name`, `last_name`, `email`, `phone_number`, `gender` FROM `user` WHERE `email` = :email"); $stmt->bindValue(":email", fixEmail($email)); $stmt->execute(); if ($stmt->rowCount() === 1) { return $stmt->fetch(); } elseif ($stmt->rowCount() === 0) { return null; } }
$message .= "Name: {$clean['name']} \n"; $message .= "Email: " . fixEmail($clean['email']) . " \n"; $message .= "URL: {$clean['url']} \n"; $message .= "Country: {$clean['country']} \n"; if (isset($favefield) && $favefield == "yes") { $message .= "{$favetext}: {$clean['fave']} \n"; } $message .= "Comments: {$clean['comments']} \n"; $message .= "IP: {$_SERVER['REMOTE_ADDR']} \n\n"; $message .= "Manage members: {$FLurl}/admin.php?ap=manage_members&s=newbies"; if (!strstr($_SERVER['SERVER_SOFTWARE'], "Win")) { $headers = "From: {$admin_email} \n"; $headers .= "Reply-To: " . fixEmail($clean['email']) . ""; } else { $headers = "From: {$title} <{$admin_email}> \n"; $headers .= "Reply-To: <" . fixEmail($clean['email']) . ">"; } mail($admin_email, $subject, $message, $headers); } // add the member to the newbies txt file if (addmember("{$clean['name']},{$clean['email']},{$clean['dispemail']},{$clean['url']},{$clean['country']},{$clean['fave']}\n")) { echo "<h1>Thank You</h1> \n <p>Thank you for joining {$title}, the fanlisting for {$FLsubject}!</p>"; } else { echo "<h1>Oh Dear!</h1> \n <p>Your application could not be added at this time. Please contact the owner of the fanlisting for help.</p>"; } } } if (!isset($_POST['submit']) || $show_form == true) { require_once 'prefs.php'; include_once 'header.php'; ?>
?> <p>Search results:</p> <table> <tr> <th>Name</th> <th>E-mail</th> <th>Website</th> <th>Country</th> <?php if (isset($favefield) && $favefield == "yes") { echo "<th>Fave</th>"; } ?> <th>Admin</th></tr> <tr> <td><?php echo $name; ?> </td> <td><?php echo "<a href='mailto:" . fixEmail($email) . "'>email</a>"; ?> </td> <td><?php echo $url; ?> </td> <td><?php echo $country; ?> </td> <?php if (isset($favefield) && $favefield == "yes") { ?> <td><?php echo $fave;