slitaz-forge rev 378

Update mirror/dir-generator.php
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 21 12:59:37 2013 +0000 (2013-10-21)
parents 9fb4e50abf5a
children f53863f3e839
files mirror/root/dir-generator.php
line diff
     1.1 --- a/mirror/root/dir-generator.php	Tue Sep 24 10:18:22 2013 +0000
     1.2 +++ b/mirror/root/dir-generator.php	Mon Oct 21 12:59:37 2013 +0000
     1.3 @@ -195,8 +195,9 @@
     1.4  	<div id="block_nav">
     1.5  		<h4>Online Tools</h4>
     1.6  		<ul>
     1.7 -			<li><a href="http://pizza.slitaz.org/">Live Builder</a></li>
     1.8 -			<li><a href="http://tiny.slitaz.org/">Tiny Builder</a></li>
     1.9 +			<li><a href="http://pizza.slitaz.me/">Live ISO Builder</a></li>
    1.10 +			<li><a href="http://pizza.slitaz.org/">Live flavor Builder</a></li>
    1.11 +			<li><a href="http://tiny.slitaz.org/">Tiny SliTaz Builder</a></li>
    1.12  			<li><a href="http://boot.slitaz.org/">Web Boot</a></li>
    1.13  		</ul>
    1.14  	</div>
    1.15 @@ -320,6 +321,7 @@
    1.16  }
    1.17  else {
    1.18  
    1.19 +proc_nice(10);
    1.20  // Get all of the folders and files. 
    1.21  $folderlist = array();
    1.22  $filelist = array();
    1.23 @@ -436,24 +438,24 @@
    1.24  
    1.25  // Print file information
    1.26  foreach($filelist as $file) {
    1.27 -	print "<tr><td class='n'><a href='" . addslashes($file['name']). "'>" .htmlentities($file['name']). "</a></td>";
    1.28 -	print "<td class='m'>" . $file['modtimeasc'] . "</td>";
    1.29 -	print "<td class='s'><u><img src=\"/static/qr.png\" alt=\"" .
    1.30 -		format_bytes($file['size']) . "\" onmouseover=" .
    1.31 +	$url = addslashes($file['name']);
    1.32 +	print "<tr><td class='n'><a href='$url'>" .htmlentities($file['name']). "</a></td>";
    1.33 +	print "<td class='m'>" . $file['modtimeasc'] .
    1.34 +		" <img src=\"/static/qr.png\" alt=\"@\" onmouseover=" .
    1.35  		"\"this.title = location.href+'$url'\" onclick=" .
    1.36  		"\"this.src = QRCode.generatePNG(location.href+'$url', " .
    1.37 -		"{ecclevel: 'H'}) \"/></u></td>";
    1.38 -	print "<td class='t'>" . $file['file_type']                      . "</td></tr>\n";
    1.39 +		"{ecclevel: 'H'}) \"/>" .
    1.40 +		"</td>";
    1.41 +	print "<td class='s'>" . format_bytes($file['size']) . "</td>";
    1.42 +	print "<td class='t'>" . $file['file_type'] . "</td></tr>\n";
    1.43  }
    1.44  
    1.45  // Print ending stuff
    1.46  $soft = explode('/',$_SERVER["SERVER_SOFTWARE"]);
    1.47  $tag = get_conf('server.tag','"','"',$soft[0].' &lt;'.$soft[1].'&gt;');
    1.48 -$filenum = exec("cat $path/.filelist | sed 's|^a:||g' | sed 's|:{.*||g'");
    1.49 -$foldernum = exec("cat $path/.folderlist | sed 's|^a:||g' | sed 's|:{.*||g'");
    1.50  print "</tbody>
    1.51  	</table>
    1.52 -	".$foldernum." folders and ".$filenum." files.</div>";
    1.53 +	".count($folderlist)." folders and ".count($filelist)." files.</div>";
    1.54  if ($slitaz_style) { ?>
    1.55  
    1.56  <!-- End of content -->
    1.57 @@ -468,10 +470,11 @@
    1.58  	<a href="http://forum.slitaz.org/">Forum</a>
    1.59  	<a href="http://pkgs.slitaz.org/">Packages</a>
    1.60  	<a href="http://bugs.slitaz.org">Bugs</a>
    1.61 -	<a href="http://hg.slitaz.org/">Hg</a>
    1.62 +	<a href="http://hg.slitaz.org/?sort=lastchange">Hg</a>
    1.63  	<p>
    1.64 -		<img src="/static/qr.png" alt="SliTaz @" onmouseover="this.title = location.href"
    1.65 +		<img src="/static/qr.png" alt="#" onmouseover="this.title = location.href"
    1.66  		 onclick="this.src = QRCode.generatePNG(location.href, {ecclevel: 'H'})" />
    1.67 +		SliTaz @	 
    1.68  		<a href="http://twitter.com/slitaz">Twitter</a>
    1.69  		<a href="http://www.facebook.com/slitaz">Facebook</a>
    1.70  		<a href="http://distrowatch.com/slitaz">Distrowatch</a>