コード例 #1
0
    $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
 */
$PHP_5_STABLE = array();
$PHP_5_RC = array();
$rel = $rc = "";
$SHOW_COUNT = 2;
for ($i = 1; $i <= $SHOW_COUNT; ++$i) {
コード例 #2
0
ファイル: mirror.php プロジェクト: learningendless/web-php
?>
 an official PHP.net mirror site</li>
 <li>The mirror site's address is <?php 
print_link($MYSITE);
?>
</li>
</ul>

<?php 
if (is_official_mirror()) {
    ?>
<h2>Mirror Provider</h2>
<ul>
 <li>
  <p>The provider of this mirror is <?php 
    print_link(mirror_provider_url(), mirror_provider());
    ?>
</p>
  <?php 
    if ($MIRROR_IMAGE) {
        ?>
  <p><?php 
        echo $MIRROR_IMAGE;
        ?>
</p>
  <?php 
    }
    ?>
 </li>
</ul>
<?php