示例#1
0
<?php

// $Id$
/*
 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 the primary php.net box.
*/
$_SERVER['BASE_PAGE'] = 'mod.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
site_header("Email confirmation", array("current" => "community"));
// Only run on main php.net box.
if (!is_primary_site()) {
    echo <<<ERROR
<h1>Email confirmation failed</h1>

<p class="formerror">
 This server is not capable of handling email confirmations.
</p>
ERROR;
    site_footer();
    exit;
}
// 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 <<<ERROR
<h1>Email confirmation failed</h1>
示例#2
0
 You can grab our news as an <a href="/feed.atom">Atom feed</a>.
</p>';
$MIRROR_IMAGE = '';
// Try to find a sponsor image in case this is an official mirror
if (is_official_mirror()) {
    // Iterate through possible mirror provider logo types in priority order
    $types = array("gif", "jpg", "png");
    while (list(, $ext) = each($types)) {
        // Check if file exists for this type
        if (file_exists("backend/mirror." . $ext)) {
            // Add text to rigth sidebar
            $MIRROR_IMAGE = "<div align=\"center\"><h3>This mirror sponsored by:</h3>\n";
            // Create image HTML code
            $img = make_image('mirror.' . $ext, htmlspecialchars(mirror_provider()), FALSE, FALSE, 'backend', 0);
            // Add size information depending on mirror type
            if (is_primary_site() || is_backup_primary()) {
                $img = resize_image($img, 125, 125);
            } else {
                $img = resize_image($img, 120, 60);
            }
            // End mirror specific part
            $MIRROR_IMAGE .= '<a href="' . mirror_provider_url() . '">' . $img . "</a></div><br /><hr />\n";
            // We have found an image
            break;
        }
    }
}
/* {{{ Generate latest release info */
/* NOTE: You are editing the wrong file, you should be in include/version.inc
 *  For RC: See the $PHP_x_RC variable
 *  For STABLE: See the $PHP_x_VERSION/_DATE/_MD5 variables