示例#1
0
 $reject_text .= "ask questions, report bugs or suggest new features; please\n";
 $reject_text .= "use the resources listed in <http://gtk.php.net/resources.php>\n";
 $reject_text .= "for those purposes. This was clearly stated in the page\n";
 $reject_text .= "you used to submit your note, please carefully re-read\n";
 $reject_text .= "those instructions before submitting future contributions.\n\n";
 $reject_text .= "Bug Submissions should be entered at <http://bugs.php.net/>\n";
 $reject_text .= "Feature Requests should also be entered at <http://bugs.php.net/>\n";
 $reject_text .= "Support and ways to find answers to your guestions can be found\n";
 $reject_text .= "at <http://gtk.php.net/resources.php>\n\n";
 $reject_text .= "Your note has been removed from the on-line manual.\n\n";
 $query = 'SELECT *,UNIX_TIMESTAMP(ts) AS xwhen FROM note WHERE id=' . $id;
 if ($result = mysql_query($query)) {
     $row = mysql_fetch_array($result);
     // email the submitter if the address looks reasonable
     // uses functions in include/email-validation.inc
     $submitter = clean_AntiSPAM($row['user']);
     echo "<p>Note " . $row['id'] . " by: " . $row['user'] . " ({$submitter}) ";
     if (is_emailable_address($submitter)) {
         mail($submitter, "note " . $row['id'] . " rejected and deleted from " . $row['sect'] . " by notes editor {$user}", $reject_text . "----- Copy of your note below -----\n\n" . stripslashes($row['note']), "From: " . $user . "@php.net");
     }
     // email to the list
     mail($mailto, "note " . $row['id'] . " rejected and deleted from " . $row['sect'] . " by {$user}", stripslashes($row['note']), "From: " . $user . "@php.net");
     $query = 'DELETE FROM note WHERE id=' . $id;
     if (mysql_query($query)) {
         echo '<b>rejected and deleted.</b></p>';
     }
     if ($popup) {
         echo '<script language="javascript">window.close();</script>';
     }
 }
 break;
<html>
<head><title>email validation test</title></head>
<body>
<?php 
require getcwd() . "/email-validation.inc";
$test_add = array("*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**", "wrong-address-with@@@@-remove_me-and-some-i-hate_SPAM-stuff");
while (list(, $v) = each($test_add)) {
    echo "The address: {$v} (" . clean_AntiSpam($v) . ") is";
    if (!is_emailable_address(clean_AntiSPAM($v))) {
        echo " not";
    }
    echo " valid\n<br>";
}
?>
<hr>
The jesusmc@scripps.edu, jmcastagnetto@yahoo.com and jcastagnetto@yahoo.com 
should validate OK as of 2001-02-28 --- JMC
</body>
</html>
示例#3
0
     }
     print "<script language='JavaScript'> alert('{$msg}'); document.location.href = 'admin-apps.php';</script>";
     break;
 case 'reject':
     $reject_text = "If you are receiving this email it is because your application\n";
     $reject_text .= "posted to the on-line PHP-GTK application database has been\n";
     $reject_text .= "rejected by one of the editors.\n\n";
     $reject_text .= "This is most likely due to the fact that your submission does\n";
     $reject_text .= "not appear to be a geniune PHP-GTK application.\n\n";
     $res = mysql_query("DELETE FROM app WHERE id = {$app_id}");
     if ($res) {
         @unlink(APP_SCREENSHOT_DIR . "/{$app_id}-thumb.jpg");
         @unlink(APP_SCREENSHOT_DIR . "/{$app_id}.jpg");
         // email the submitter if the address looks reasonable
         // uses functions in include/email-validation.inc
         $submitter = clean_AntiSPAM($app->submitter);
         if (is_emailable_address($submitter)) {
             mail($submitter, "app '{$app->name}' rejected by app editor {$user}", $reject_text . "----- Copy of your submission below -----\n\n" . "Name       : {$app->name}\n" . "Category   : " . $appCats[$app->cat_id]->name . "\n" . "Description: {$app->blurb}\n", "From: {$user}@php.net");
         }
         // email to the list
         mail($mailto, "app '{$app->name}' rejected by app editor {$user}", "The following application was rejected from the system:\n\n" . "Name       : {$app->name}\n" . "Category   : " . $appCats[$app->cat_id]->name . "\n" . "Description: {$app->blurb}\n", "From: {$user}@php.net");
         $msg = "Application #{$app_id} rejected.";
     } else {
         $msg = "Unable to reject application #{$app_id}.";
     }
     print "<script language='JavaScript'> alert('{$msg}'); document.location.href = 'admin-apps.php';</script>";
     break;
 case 'edit':
     $form_app = $app;
     $form_url = "admin-apps.php";
     $form_action = "modify";