slitaz-forge diff mirror/floppies/download.php @ rev 662

tank: include sup-demo package on up-scn
author Christophe Lincoln <pankso@slitaz.org>
date Fri Feb 24 08:53:29 2017 +0100 (2017-02-24)
parents a37f4ff3d549
children 2f42ab2912be
line diff
     1.1 --- a/mirror/floppies/download.php	Fri Jul 31 18:40:18 2015 +0200
     1.2 +++ b/mirror/floppies/download.php	Fri Feb 24 08:53:29 2017 +0100
     1.3 @@ -36,107 +36,93 @@
     1.4  		download(sprintf("fdiso%02d.img",$_GET['file']), $fdsz, $cmd);
     1.5  	}
     1.6  }
     1.7 -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     1.8 -	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1.9 -<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
    1.10 +?><!DOCTYPE html>
    1.11 +<html lang="en">
    1.12  <head>
    1.13 +	<meta charset="UTF-8">
    1.14  	<title>SliTaz Boot Floppies</title>
    1.15 -	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    1.16 -	<meta name="description" content="slitaz boot floppies" />
    1.17 -	<meta name="robots" content="index, nofollow" />
    1.18 -	<meta name="author" content="SliTaz Contributors" />
    1.19 -	<link rel="shortcut icon" href="static/favicon.ico" />
    1.20 -	<link rel="stylesheet" type="text/css" href="static/slitaz.css" />
    1.21 +	<meta name="description" content="slitaz boot floppies">
    1.22 +	<meta name="robots" content="index, nofollow">
    1.23 +	<meta name="author" content="SliTaz Contributors">
    1.24 +	<link rel="shortcut icon" href="static/favicon.ico">
    1.25 +	<link rel="stylesheet" href="static/slitaz.min.css">
    1.26  	<style type="text/css">
    1.27 -table {
    1.28 -	background-color: inherit;
    1.29 -	margin: 10px 0px 0px 0px;
    1.30 -}
    1.31 -#copy {
    1.32 -	text-align: center;
    1.33 -}
    1.34 -
    1.35 -#bottom {
    1.36 -	text-align: center;
    1.37 -}
    1.38 -
    1.39 -#block_nav {
    1.40 -	padding: 10px 10px 10px;
    1.41 -}
    1.42 +.block_info { width: 40%; }
    1.43 +nav table { margin: 6px 0 0 0; }
    1.44 +nav table a { color: #215090; }
    1.45 +nav header::before { content: url(pics/floppy.png); vertical-align: middle; padding: 0 6px 0 0; }
    1.46 +pre, tt, code { font-size: 0.9rem; }
    1.47  	</style>
    1.48  </head>
    1.49 -<body bgcolor="#ffffff">
    1.50 -<!-- Header -->
    1.51 -<div id="header">
    1.52 -    <a name="top"></a>
    1.53 -	<div id="logo"></div>
    1.54 -	<div id="network">
    1.55 -		<a href="http://www.slitaz.org/">
    1.56 -		<img src="static/home.png" alt="[ home ]" /></a>
    1.57 +<body>
    1.58 +
    1.59 +<script>de=document.documentElement;de.className+=(("ontouchstart" in de)?' touch':' no-touch');</script>
    1.60 +
    1.61 +<header>
    1.62 +	<h1 id="top"><a href="http://www.slitaz.org/">Boot floppies</a></h1>
    1.63 +
    1.64 +	<div class="network">
    1.65 +		<a href="http://www.slitaz.org/" class="home"></a>
    1.66  		<a href="floppy-grub4dos" title="Boot tools">Generic boot floppy</a>
    1.67  		<a href="http://tiny.slitaz.org/" title="SliTaz in one floppy !">Tiny SliTaz</a>
    1.68  		<a href="builder/index.php" title="Build floppies with your own kernel and initramfs">Floppy set web builder</a>
    1.69  		<a href="builder/bootloader" title="Build your floppy sets without Internet">Shell builder</a>
    1.70  	</div>
    1.71 -	<h1><a href="http://www.slitaz.org/">Boot floppies</a></h1>
    1.72 -</div>   
    1.73 +</header>
    1.74  
    1.75  <!-- Block -->
    1.76 -<div id="block">
    1.77 -	<!-- Navigation -->
    1.78 -	<div id="block_nav">
    1.79 -		<h4><img src="pics/floppy.png" alt="@" />Download 1.44Mb images for <?php $dir = explode('/',$_POST["iso"]); echo $dir[1]; ?></h4>
    1.80 -<table width="100%">
    1.81 -<?php
    1.82 -$max = floor((my_filesize("../".$_POST["iso"]) + $fdsz - 1 + $cpiopad) / $fdsz);
    1.83 -for ($i = 1; $i <= $max ; $i++) {
    1.84 -	if ($i % 6 == 1) echo "<tr>\n";
    1.85 -	echo "	<td> <a href=\"download.php?file=$i&amp;iso=".
    1.86 -		urlencode($_POST["iso"])."\">fdiso".sprintf("%02d",$i);
    1.87 -	echo "</a> </td>\n";
    1.88 -	if ($i % 6 == 0) echo "</tr>\n";
    1.89 -}
    1.90 -if ($max % 6 != 0) {
    1.91 -	while ($max % 6 != 5) { echo "<td></td>"; $max++; }
    1.92 -}
    1.93 -else echo "<tr>\n";
    1.94 -echo "	<td><a href=\"download.php?file=md5sum&amp;iso=".
    1.95 -	urlencode($_POST["iso"])."\">md5</a></td>\n</tr>";
    1.96 -?>
    1.97 -</table>
    1.98 -	</div>
    1.99 +<div class="block"><div>
   1.100 +
   1.101  	<!-- Information/image -->
   1.102 -	<div id="block_info">
   1.103 -		<h4>Available boot floppies</h4>
   1.104 +	<div class="block_info">
   1.105 +		<header>Available boot floppies</header>
   1.106  		<ul>
   1.107  <?php
   1.108  for ($i = 1; file_exists("index-$i.0.html") ; $i++);
   1.109  while (--$i > 0) {
   1.110 -	echo "	<li><a href=\"index-$i.0.html\">SliTaz $i.0</a>";
   1.111 +	echo "			<li><a href=\"index-$i.0.html\">SliTaz $i.0</a>";
   1.112  	if (file_exists("index-loram-".$i.".0.html"))
   1.113 -		echo " - <a href=\"index-loram-$i.0.html\">loram</a>";
   1.114 -	echo "</li>\n";
   1.115 +		echo "				· <a href=\"index-loram-$i.0.html\">loram</a>";
   1.116 +	echo "			</li>\n";
   1.117  }
   1.118  ?>
   1.119  		</ul>
   1.120  	</div>
   1.121 -</div>
   1.122  
   1.123 -<!-- Content top. -->
   1.124 -<div id="content_top">
   1.125 -<div class="top_left"></div>
   1.126 -<div class="top_right"></div>
   1.127 -</div>
   1.128 +
   1.129 +	<!-- Navigation -->
   1.130 +	<nav>
   1.131 +		<header>Download 1.44MB images for <?php $dir = explode('/',$_POST["iso"]); echo $dir[1]; ?></header>
   1.132 +		<table>
   1.133 +<?php
   1.134 +$max = floor((my_filesize("../".$_POST["iso"]) + $fdsz - 1 + $cpiopad) / $fdsz);
   1.135 +for ($i = 1; $i <= $max ; $i++) {
   1.136 +	if ($i % 6 == 1) echo "			<tr>\n";
   1.137 +	echo "				<td><a href=\"download.php?file=$i&amp;iso=".
   1.138 +		urlencode($_POST["iso"])."\">fdiso".sprintf("%02d",$i);
   1.139 +	echo "</a></td>\n";
   1.140 +	if ($i % 6 == 0) echo "			</tr>\n";
   1.141 +}
   1.142 +if ($max % 6 != 0) {
   1.143 +	while ($max % 6 != 5) { echo "				<td> </td>"; $max++; }
   1.144 +}
   1.145 +else echo "			<tr>\n";
   1.146 +echo "				<td><a href=\"download.php?file=md5sum&amp;iso=".
   1.147 +	urlencode($_POST["iso"])."\">md5</a></td>\n			</tr>";
   1.148 +?>
   1.149 +		</table>
   1.150 +	</nav>
   1.151 +</div></div>
   1.152 +
   1.153  
   1.154  <!-- Content -->
   1.155 -<div id="content">
   1.156 +<main>
   1.157  
   1.158  <h2>ISO image floppy set</h2>
   1.159  
   1.160 -<p>
   1.161 -You can restore the <a href="../<?php echo $_POST['iso'].
   1.162 -'">'.basename($_POST['iso']); ?></a> ISO image on your hard disk using :
   1.163 -</p>
   1.164 +<p>You can restore the <a href="../<?php echo $_POST['iso'].
   1.165 +'">'.basename($_POST['iso']); ?></a> ISO image on your hard disk using:</p>
   1.166 +
   1.167  <pre>
   1.168  # dd if=/dev/fd0 of=fdiso01.img
   1.169  # dd if=/dev/fd0 of=fdiso02.img
   1.170 @@ -144,38 +130,54 @@
   1.171  # cat fdiso*.img | cpio -i
   1.172  </pre>
   1.173  
   1.174 -<!-- End of content with round corner -->
   1.175 -</div>
   1.176 -<div id="content_bottom">
   1.177 -<div class="bottom_left"></div>
   1.178 -<div class="bottom_right"></div>
   1.179 -</div>
   1.180  
   1.181 -<!-- Start of footer and copy notice -->
   1.182 -<div id="copy">
   1.183 -<p>
   1.184 -Copyright &copy; <?php echo date('Y'); ?> <a href="http://www.slitaz.org/">SliTaz</a> -
   1.185 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   1.186 -</p>
   1.187 -<!-- End of copy -->
   1.188 -</div>
   1.189 +<!-- End of content -->
   1.190 +</main>
   1.191  
   1.192 -<!-- Bottom and logo's -->
   1.193 -<div id="bottom">
   1.194 -<p>
   1.195 -<a href="http://validator.w3.org/check?uri=referer"><img src="static/xhtml10.png" alt="Valid XHTML 1.0" title="Code validé XHTML 1.0" style="width: 80px; height: 15px;" /></a>
   1.196 -</p>
   1.197 -<p>
   1.198 -	<script type="text/javascript" src="static/qrcode.js"></script>
   1.199 -	<img src="#" id="qrcodeimg" alt="#" width="60" height="60"
   1.200 -	     onmouseover="this.title = location.href" 
   1.201 -	     onclick="this.width = this.height += 100;" />
   1.202 -	<script type="text/javascript">
   1.203 -		document.getElementById('qrcodeimg').src =
   1.204 -			QRCode.generatePNG(location.href, {ecclevel: 'H'});
   1.205 -	</script>
   1.206 -</p>
   1.207 -</div>
   1.208 +
   1.209 +<script>
   1.210 +	function QRCodePNG(str, obj) {
   1.211 +		try {
   1.212 +			obj.height = obj.width += 300;
   1.213 +			return QRCode.generatePNG(str, {ecclevel: 'H'});
   1.214 +		}
   1.215 +		catch (any) {
   1.216 +			var element = document.createElement("script");
   1.217 +			element.src = "/static/qrcode.min.js";
   1.218 +			element.type = "text/javascript";
   1.219 +			element.onload = function() {
   1.220 +				obj.src = QRCode.generatePNG(str, {ecclevel: 'H'});
   1.221 +			};
   1.222 +			document.body.appendChild(element);
   1.223 +		}
   1.224 +	}
   1.225 +</script>
   1.226 +
   1.227 +<footer>
   1.228 +	<div>
   1.229 +		Copyright © <span class="year"></span>
   1.230 +		<a href="http://www.slitaz.org/">SliTaz</a>
   1.231 +	</div>
   1.232 +	<div>
   1.233 +		Network:
   1.234 +		<a href="http://scn.slitaz.org/">Community</a> ·
   1.235 +		<a href="http://doc.slitaz.org/">Doc</a> ·
   1.236 +		<a href="http://forum.slitaz.org/">Forum</a> ·
   1.237 +		<a href="http://pkgs.slitaz.org/">Packages</a> ·
   1.238 +		<a href="http://bugs.slitaz.org">Bugs</a> ·
   1.239 +		<a href="http://hg.slitaz.org/?sort=lastchange">Hg</a>
   1.240 +	</div>
   1.241 +	<div>
   1.242 +		SliTaz @
   1.243 +		<a href="http://twitter.com/slitaz">Twitter</a> ·
   1.244 +		<a href="http://www.facebook.com/slitaz">Facebook</a> ·
   1.245 +		<a href="http://distrowatch.com/slitaz">Distrowatch</a> ·
   1.246 +		<a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a> ·
   1.247 +		<a href="http://flattr.com/profile/slitaz">Flattr</a>
   1.248 +	</div>
   1.249 +	<img src="/static/qr.png" alt="#" onmouseover="this.title = location.href"
   1.250 +	onclick="this.src = QRCodePNG(location.href, this)"/>
   1.251 +</footer>
   1.252  
   1.253  </body>
   1.254  </html>