slitaz-dev-tools diff mirror-tools/slitaz/mirror/floppies/download.php @ rev 302

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