slitaz-forge rev 353

mirror: add qrcode on size field
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 25 18:04:52 2013 +0100 (2013-03-25)
parents a0f508b59d34
children 57d3af1446c3
files mirror/root/dir-generator.php
line diff
     1.1 --- a/mirror/root/dir-generator.php	Mon Mar 25 17:43:07 2013 +0100
     1.2 +++ b/mirror/root/dir-generator.php	Mon Mar 25 18:04:52 2013 +0100
     1.3 @@ -218,6 +218,7 @@
     1.4  	</div>
     1.5  </div>
     1.6  
     1.7 +<script type="text/javascript" src="/static/qrcode.js"></script>
     1.8  <div id="lang">
     1.9  Path: /${vpath}
    1.10  </div>
    1.11 @@ -437,7 +438,11 @@
    1.12  foreach($filelist as $file) {
    1.13  	print "<tr><td class='n'><a href='" . addslashes($file['name']). "'>" .htmlentities($file['name']). "</a></td>";
    1.14  	print "<td class='m'>" . $file['modtimeasc'] . "</td>";
    1.15 -	print "<td class='s'>" . format_bytes($file['size'])           . "</td>";
    1.16 +	print "<td class='s'><u><img src=\"#\" alt=\"" .
    1.17 +		format_bytes($file['size']) . "\" onmouseover=" .
    1.18 +		"\"this.title = location.href+'$url'\" onclick=" .
    1.19 +		"\"this.src = QRCode.generatePNG(location.href+'$url', " .
    1.20 +		"{ecclevel: 'H'}) \"/></u></td>";
    1.21  	print "<td class='t'>" . $file['file_type']                      . "</td></tr>\n";
    1.22  }
    1.23  
    1.24 @@ -465,7 +470,8 @@
    1.25  	<a href="http://bugs.slitaz.org">Bugs</a>
    1.26  	<a href="http://hg.slitaz.org/">Hg</a>
    1.27  	<p>
    1.28 -		SliTaz @
    1.29 +		<img src="#" alt="SliTaz @" onmouseover="this.title = location.href"
    1.30 +		 onclick="this.src = QRCode.generatePNG(location.href, {ecclevel: 'H'})" />
    1.31  		<a href="http://twitter.com/slitaz">Twitter</a>
    1.32  		<a href="http://www.facebook.com/slitaz">Facebook</a>
    1.33  		<a href="http://distrowatch.com/slitaz">Distrowatch</a>
    1.34 @@ -478,16 +484,6 @@
    1.35  			     alt="Valid XHTML 1.0" title="Code validé XHTML 1.0"
    1.36  			     style="width: 80px; height: 15px;" /></a>
    1.37  	</p>
    1.38 -	<p>
    1.39 -		<img src="#" id="qrcodeimg" alt="#" width="60" height="60"
    1.40 -		     onmouseover= "this.title = location.href"
    1.41 -		     onclick= "this.width = this.height = 300" />
    1.42 -		<script type="text/javascript" src="/static/qrcode.js"></script>
    1.43 -		<script type="text/javascript">
    1.44 -			document.getElementById('qrcodeimg').src =
    1.45 -				QRCode.generatePNG(location.href, {ecclevel: 'H'});
    1.46 -		</script>
    1.47 -	</p>
    1.48  </div>
    1.49  
    1.50  <?php }