diff options
Diffstat (limited to 'en/downloads/alternative/index.php')
-rwxr-xr-x | en/downloads/alternative/index.php | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/en/downloads/alternative/index.php b/en/downloads/alternative/index.php new file mode 100755 index 000000000..6c3127126 --- /dev/null +++ b/en/downloads/alternative/index.php @@ -0,0 +1,113 @@ +<?php + +$current = '6.1'; +$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); + +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){ + $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&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> |