cvs: phpweb / mod.php
| From: | Gabor Hojtsy | Date: | Sat, 23 Aug 2003 10:56:44 +0000 |
| Subject: | cvs: phpweb / mod.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-20556@lists.php.net to get a copy of this message | ||
goba Sat Aug 23 06:56:44 2003 EDT
Modified files:
/phpweb mod.php
Log:
Add general PHP.net soup around this page
Index: phpweb/mod.php
diff -u phpweb/mod.php:1.1 phpweb/mod.php:1.2
--- phpweb/mod.php:1.1 Thu Aug 21 21:31:15 2003
+++ phpweb/mod.php Sat Aug 23 06:56:44 2003
@@ -1,14 +1,56 @@
<?php
+// $Id: mod.php,v 1.2 2003/08/23 10:56:44 goba Exp $
+/*
+ This page supports the PHP.net automoderation system
+ with enabling users to confirm their emails via the web.
+ This script only need to run on www.php.net.
+*/
+
+$_SERVER['BASE_PAGE'] = 'mod.php';
+include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
+
+// Only run on www.php.net
+if ($MYSITE != "http://www.php.net/") { exit; }
+
+site_header("Email confirmation");
+
+// These sites are handled by automoderation
$sites = array("php.net", "lists.php.net");
+// Get data from the URL
list($none, $site, $token, $sender) = explode("/", $_SERVER["PATH_INFO"]);
+// Error in input data
if ($sender == "" || strlen($token) < 32 || !isset($sites[$site])) {
- echo "Sorry, the URL is incomplete. Please verify that you used the complete URL even if it
spans multiple lines.";
- exit;
+ echo <<<ERROR
+<h1>Email confirmation failed</h1>
+
+<p class="formerror">
+ Sorry, the URL is incomplete. Please verify that you used the
+ complete URL even if it spans multiple lines.
+</p>
+ERROR;
}
-mail("confirm@".$sites[$site], "confirm", "[confirm: $token
$sender]", "From: $sender");
+// Data OK, send confirmation mail
+else {
+ mail(
+ "confirm@" . $sites[$site],
+ "confirm",
+ "[confirm: $token $sender]",
+ "From: $sender"
+ );
+
+ echo <<<THANKS
+<h1>Email confirmation successful</h1>
+
+<p>
+ Thanks for confirming your email address. No further
+ action is required on your part.
+</p>
+THANKS;
+
+}
-echo "Thanks for confirming your email address. No further action is required on your
part.";
+site_footer();