aboutsummaryrefslogtreecommitdiffstats
path: root/en/downloads/dl.php
blob: 4ede811cac3bdc01b1da418e6094b9ac3e7a1c68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
/**
*/

$product = isset($_GET['product']) ? trim(strtolower($_GET['product'])) : null;
$torrent = isset($_GET['torrent']) ? true : false;
$mirror  = isset($_GET['mirror']) ? trim(strtolower($_GET['mirror'])) : null;

include '../../mirrors2.php';
include '../../downloads.php';
include '../../lib/Downloads.php';

session_start();

if (!is_null($product)) {
    $found = false;
    foreach ($prods as $k => $p) {
        if ($product == sprintf('%s-%s', $glob['prefix'], $k)) {
            $found = true;
            break;
        }
    }
}

if (!$found) {
    header('Location: /downloads/');
    die;
}

$product_iso = $product . '.iso';

$wsd = new Downloads('en', null);
$a = $wsd->prepare_download(null, true);

if (isset($p['path']))
    $dl_link = sprintf('%s/%s', $a['mirror_url'], $p['path']);
else
    $dl_link =  sprintf('%s/%s/%s', $a['mirror_url'], 'iso/cauldron', $product_iso);

$relocation = '';

// @fixme (rda) actually, http-equiv="refresh" is deprecated behaviour now.
// @fixme (rda) see http://www.w3.org/TR/WCAG10-HTML-TECHS/#meta-element
// @fixme (rda) possible alternative: post-load setTimeOut("document.location=url;", 5000); but requires JS

if (!is_null($relocation))
    $relocation = sprintf('<meta http-equiv="refresh" value="5;%s">', $relocation);

$title = 'Mageia 1 beta1';

$dl_alt_mirrors_table = '';
foreach ($g_mirrors as $country => $cities):
    foreach ($cities as $city => $mirrors) {
        $mirs = array();
        foreach ($mirrors as $m) {
            $pm = parse_url($m);
            $alt_dl_link = sprintf('%s/%s/%s', $m, 'iso/cauldron', $product_iso);
            $mirs[] = sprintf('%s://<a href="%s" rel="nofollow">%s</a>',
                $pm['scheme'], $alt_dl_link, $pm['host']);
        }
        $dl_alt_mirrors_table .= sprintf('<tr><td>%s</td><td>%s</td><td>%s</td></tr>', $country, $city, implode(', ', $mirs));
    }
endforeach;

$dl2_mirror_alt = sprintf($_t['dl_mirror_loc'],
        $a['mirror_url'], $a['mirror_host'], $countries[$a['country']], $a['country'])
    . ' ' . $_t['dl_alt_mirrors'];

?><!DOCTYPE html>
<html lang="<?php echo $locale; ?>">
<head>
    <meta charset="utf-8" />
    <title><?php echo $title; ?> | Mageia Downloads</title>
    <meta name="robots" content="noindex,nofollow,nosnippet">
    <link rel="stylesheet" type="text/css" href="/g/style/all.css" >
    <?php include '../../analytics.php'; ?>
</head>
<body>
    <?php include '../../langs.php'; ?>
    
    <div id="doc" class="yui-t7">
        <div id="hd" role="banner"><h1><a id="logo" href="/"><span>Mageia</span></a> <span class="lsep">&nbsp;</span> <span class="subh"><?php echo $_t['page_h1']; ?></span></h1></div>
        <div id="bd" role="main">
            <div class="yui-g"><div class="para">
                <h2><?php echo $_t['page_title']; ?></h2>
                <p><?php
                    echo
                        sprintf($_t['dl_shld_start'], 'Mageia 1 beta1 ' . $p['name']),
                        ' ', sprintf($_t['dl_size'], $p['size']),
                        ' ', sprintf($_t['alt_download'], $dl_link, $dl_link);
                ?></p>

                <div class="dlinfo">
                    <?php if (isset($p['md5'])): ?>
                <p><?php echo $_t['signs_check_1']; ?></p>
                <pre class="term">
$ md5sum <?php echo $product_iso, "\n", $p['md5'], "\n"; ?>

$ sha1 <?php echo $product_iso, "\n", $p['sha1'], "\n"; ?>
</pre>
                <p><?php echo $_t['signs_check_2']; ?></p>
                    <?php endif; ?>
                <p><?php echo $dl2_mirror_alt; ?></p>
                </div>
                <table class="dlt2 dlinfo" id="other_mirrors" style="display: none;">
                    <thead><tr><th>Country</th><th>City</th><th>Download mirrors</th></tr></thead>
                    <tbody><?php echo $dl_alt_mirrors_table; ?></tbody>
                </table>

                <hr />
        </div></div>
        <div class="yui-g">
            <div class="yui-u first"><div class="para"
                <h2><?php echo $_t['whatdouthink?']; ?></h2>
                <p><?php echo $_t['give_feedback']; ?></p>
                <p><?php echo $_t['report_bug'];  ?></p>
                <p><?php echo $_t['notify_web']; ?></p>

                <hr />
            </div></div>
            <div class="yui-u"><div class="para">
                <h2><?php echo sprintf($_t['wanttohelp?'], '<a href="http://mageia.org/wiki/doku.php?id=contribute">', '</a>'); ?></h2>
                <p><?php echo $_t['ucanhelp']; ?></p>
                <div class="qsidesummary testday">
                    <p><strong>Test days &rArr; April 8 &amp; 9!</strong></p>
                    <p>To speed up fixes &amp; improvements for beta2, we organize
                        two test days for beta1 in the coming days.</p>
                    <p><a href="">Learn more!</a></p>
                </div>

                <p>There is a lot of areas where one can contribute to the project.
                    Be it for advocacy,
                    prototyping,
                    <a href="http://mageia.org/wiki/doku.php?id=marketing">communication</a>,
                    <a href="http://mageia.org/wiki/doku.php?id=web">Web design &amp; development</a>,
                    for software design,
                    development,
                    <a href="http://mageia.org/wiki/doku.php?id=translators">localization</a>,
                    <a href="http://mageia.org/wiki/doku.php?id=packaging">packaging</a>,
                    <a href="http://mageia.org/wiki/doku.php?id=qateam">QA &amp; testing</a>,
                    delivery,
                    for community support &amp; animation,
                    for <a href="http://mageia.org/donate/">donating money</a>,
                    hardware, hosting, time, for sharing the fun.</p>
            </div></div>
        </div>
    </div>
<script>
document.getElementById("other_mirrors_btn").onclick = function () {
    var el = document.getElementById("other_mirrors");
    el.style.display = (el.style.display != 'none' ? 'none' : '' );
};
</script>
</body>
</html>