Ejemplo n.º 1
0
<h3>Syndication</h3>
<p>
 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
Ejemplo n.º 2
0
?>
 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