xref: /web-php/mirror.php (revision c093fb53)
1<?php
2$_SERVER['BASE_PAGE'] = 'mirror.php';
3include_once __DIR__ . '/include/prepend.inc';
4$SIDEBAR_DATA = '
5<h3>More mirror sites</h3>
6<p>
7 Find more available mirrors on our <a href="/mirrors.php">mirror
8 sites page</a>.
9</p>
10
11<h3>Mirroring PHP.net</h3>
12<p>
13 If you are interested in mirroring our website, you can
14 find more information and setup details on <a href="/mirroring.php">our
15 mirroring page</a>.
16</p>
17';
18
19$MIRROR_IMAGE = '';
20
21// Try to find a sponsor image in case this is an official mirror
22if (is_official_mirror()) {
23
24    // Iterate through possible mirror provider logo types in priority order
25    $types = ["gif", "jpg", "png"];
26    foreach ($types as $ext) {
27        // Check if file exists for this type
28        if (file_exists("backend/mirror." . $ext)) {
29
30            // Create image HTML code
31            $MIRROR_IMAGE = make_image(
32                'mirror.' . $ext,
33                htmlspecialchars(mirror_provider()),
34                false,
35                false,
36                'backend',
37            );
38
39            // Add size information depending on mirror type
40            if (is_primary_site()) {
41                $MIRROR_IMAGE = resize_image($MIRROR_IMAGE, 125, 125);
42            } else {
43                $MIRROR_IMAGE = resize_image($MIRROR_IMAGE, 120, 60);
44            }
45
46            // We have found an image
47            break;
48        }
49    }
50}
51site_header("Information About This PHP Mirror Site", ["current" => "community"]);
52?>
53
54<h1>Information About This PHP Mirror Site</h1>
55
56<p>
57 Here you can get more information about this PHP Mirror site, as
58 well as some details about the provider. The information you find
59 here may be helpful in choosing your preferred mirror site for your
60 everyday work. Note that the PHP.net webmaster team is only capable
61 of tracking official mirror sites, and trying to ensure that those
62 provide the best service possible.
63</p>
64
65<h2>General Information</h2>
66
67<ul>
68 <li>This site is <?php echo is_official_mirror() ? "" : "not"; ?> an official PHP.net mirror site</li>
69 <li>The mirror site's address is <?= make_link($MYSITE)?></li>
70</ul>
71
72<?php if (is_official_mirror()) { ?>
73<h2>Mirror Provider</h2>
74<ul>
75 <li>
76  <p>The provider of this mirror is <?= make_link(mirror_provider_url(), mirror_provider())?></p>
77  <?php if ($MIRROR_IMAGE) { ?>
78  <p><?php echo $MIRROR_IMAGE; ?></p>
79  <?php } ?>
80 </li>
81</ul>
82<?php } ?>
83
84<h2>Mirror Services</h2>
85
86<ul>
87 <li>Default language is <?php echo $LANGUAGES[default_language()]; ?></li>
88</ul>
89
90<h2>Mirror Status</h2>
91
92<ul>
93 <li>The site was last updated at <?php echo date('r', $LAST_UPDATED); ?></li>
94</ul>
95
96<?php site_footer(); ?>
97