aboutsummaryrefslogtreecommitdiffstats
path: root/en/downloads/alternative/index.php
blob: ac8000a9a624f83cee7188445169fbc133c9d163 (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
<?php

$current = '7';
$cauldron = 'Cauldron';

define('HLANG', true);

require '../../../langs.php';
$dictionary = read_translation_file($locale, array('cauldron', 'common_footer'));

?>
<!DOCTYPE html>
<html dir="ltr" lang="<?php echo $locale; ?>">
<head>
    <meta charset="utf-8">
    <title><?php echo sprintf(_g('Download').' '. ' Mageia')?></title>
    <meta name="robots" content="index,nofollow,nosnippet">
    <?php echo common_header(); ?>
    <?php include '../../../analytics.php'; ?>
</head>
<body class="release downloads">
    <?php echo $hsnav; ?>

    <h1 id="mgnavt"><?php echo sprintf(_g('Download') . ' Mageia');?></h1>


<div id="doc">

<div class="para">
    <p>
    <?php _g('Mageia is provided as ISO image files that have to be written to blank <a href="%s">CD or DVD discs</a>.', array(_r('https://wiki.mageia.org/en/Writing_CD_and_DVD_images')), ' '); ?>
    <br>
    <?php _g('All ISOs can also be launched from a <a %s>USB drive</a>.', array('href="' . _r('https://wiki.mageia.org/en/Installation_Media#Dump_Mageia_ISO_on_a_USB_flash_drive') . '"'));
    echo '</p>';
    _g('To <a %s>dump</a> a Mageia installation ISO on a USB stick, you may try one of several tools:', array(''),'p');
    echo '<ul><li>';
    _g('For Linux, IsoDumper, available inside repo. Or any tools based on %sdd%s.', array('<span class="italic" >', '</span>'), ' ');
    _g('Unetbootin is not supported.', null, 'span class="warn"'); ?>
    </li>
    <?php _g('For Windows please have a look on our <a href="%s">wiki</a> for your options.', array(_r('https://wiki.mageia.org/en/Dump_Mageia_ISO_on_a_USB_flash_drive_-_Alternative_tools')), 'li'); ?>
    </ul>
    <div id="iso2usbEx" class="popover-content"><p>
    <?php _g('"Dumping" an image onto a flash device destroys any prior file-system in the partition; access to any data not destroyed will be lost, and partition capacity will be reduced to the image size. In other words, all prior data on the device is at risk.'); ?>
    </p></div>
    <p>
    <?php _g('If you have <a href="%s">UEFI</a>, a procedure is available in the <a href="%s">wiki</a>.', array(_r('http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface'),_r('https://wiki.mageia.org/en/Installing_on_systems_with_UEFI_firmware' /*this will be changed to tooltip, so no more url*/))) ;?>
    </p>
</div>

<?php 

$ini = parse_ini_file('../get/definitions.ini', true);
$ini = array_reverse($ini);
$tableCurrent = "";
$tableCauldron = "";
$tableArchives = "";

foreach ($ini as $section => $values) {
    $release = explode("-", $section);
    if (isset($release[1])) {
        $release = $release[1];
    } else {
        $release = "";
    }
    $name = $values['name'];
    if (isset($values['torrent'])) {
        $torrent = $values['torrent'];
    } else {
        $torrent = "";
    }
    if (isset($values['magnet'])) {
        $magnet = $values['magnet'];
    } else {
        $magnet = "";
    }
    $size = $values['size'];

    if ($release == $current) {
         $tableCurrent .= TableContent($section, $name, $torrent, $magnet, $size);
    } elseif ($release == $cauldron || $release == "Cauldron") {
         $tableCauldron .= TableContent($section, $name, $torrent, $magnet, $size);
    } else {
         $tableArchives .= TableContent($section, $name, $torrent, $magnet, $size);
    }
};

function TableContent($url, $name, $torrent, $magnet, $size){
    $table = sprintf('<tr><td><a rel="nofollow" href="../get/?q=%s">%s</a></td>',$url, $name);
    $table .= $torrent ? sprintf('<td><a rel="nofollow" href="../get/?q=%s&amp;torrent=1">torrent</a></td>', $url) : '<td></td>';
    $table .= $magnet ? sprintf('<td><a href="%s">magnet</a></td>', $magnet) : '<td></td>';
    $table .= sprintf('<td>%s</td></tr>'. PHP_EOL, $size);
    return $table;
};

function allDiv($release, $Trelease, $table){
    $div = sprintf("<div id=\"%s\">\n\t<h3>%s</h3>" . PHP_EOL, $release,$Trelease);
    $div .= '<table class="table table-hover table-sm">';
    $div .= sprintf('<thead><tr><th >' . _r("iso image") . '</th><th>' . _r("torrent link") . '</th><th>' . _r("magnet link") . '</th><th>' . _r("size") . '</th></tr></thead>' . PHP_EOL);
    echo $div .= sprintf('<tbody>%s</tbody></table></div>' . PHP_EOL, $table);
} ?>


<div class="row pt-3">
    <div class="col-sm-3">
        <nav id="nav-release" class="navbar navbar-light bg-light">
            <nav class="nav nav-pills flex-column">
                <a class="nav-link" href="#Current"><?php _g('Latest stable release'); echo '</a>';?>
            <?php if($tableCauldron){;
                echo '<a class="nav-link" href="#Cauldron">'; _g('Test release'); echo '</a>';
            }; ?>
                <a class="nav-link" href="#Archives"><?php _g('Previous releases'); echo '</a>';?>
            </nav>
        </nav>
    </div>

    <div class="col-sm-9" data-spy="scroll" data-target="#nav-release" data-offset="1" style="height:400px; overflow-y: scroll">
    <?php
        allDiv('Current', _r('Latest stable release') . '</a>', $tableCurrent);
        $tableCauldron ? allDiv('Cauldron', _r('Test release'), $tableCauldron) : '' ;
        allDiv('Archives', _r('Previous releases') . '</a>', $tableArchives);
    ?>
    </div>

</div>
</div>
<?php echo common_footer($locale); ?>
</body>
</html>