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

$current = '6.1';
$cauldron = '7';

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);

foreach ($ini as $section => $values) {
$release = explode("-", $section);
$release = $release[1];
$name = $values['name'];
$torrent = $values['torrent'];
$magnet = $values['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 >iso</th><th>torrent</th><th>magnet</th><th>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">Current Release</a>
            <?php if($tableCauldron){;
                echo '<a class="nav-link" href="#Cauldron">Unstable Release</a>';
            }; ?>
                <a class="nav-link" href="#Archives">Archives</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', 'Current Release', $tableCurrent);
        $tableCauldron ? allDiv('Cauldron', 'Unstable Release', $tableCauldron) : '' ;
        allDiv('Archives', 'Archives', $tableArchives);
    ?>
    </div>

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