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