# HG changeset patch # User Pascal Bellard # Date 1385638450 0 # Node ID f53863f3e8394ed8b3903b614f7a108c428d7275 # Parent fc273fd269083c9ef2b6653c2d599f277538cb46 mirror/dir-generator.php: load qrcode.js on demand diff -r fc273fd26908 -r f53863f3e839 mirror/root/dir-generator.php --- a/mirror/root/dir-generator.php Mon Oct 21 12:59:37 2013 +0000 +++ b/mirror/root/dir-generator.php Thu Nov 28 11:34:10 2013 +0000 @@ -146,8 +146,17 @@ //$slitaz_style = ($_SERVER["SERVER_NAME"] == "mirror.slitaz.org"); $slitaz_style = preg_match("/mirror\.slitaz\./",$_SERVER["SERVER_NAME"]); if ($slitaz_style) { + $modified = gmdate("D, d M Y H:i:s e", strtotime("-1 hour")); + $expires = gmdate("D, d M Y H:i:s e", strtotime("+1 hour")); $fvalue = ""; if (isset($_GET['f'])) $fvalue = 'value="'.$_GET['f'].'"'; + header("Expires: ".$expires); + header("Last-Modified: " . $modified); + header("Pragma: cache"); +// header("Cache-Control: public"); +// +// +// print << @@ -219,7 +228,23 @@ - + +
Path: /${vpath}
@@ -443,9 +468,7 @@ print "" . $file['modtimeasc'] . " \"@\"" . - ""; + "\"this.src = QRCodePNG(location.href+'$url', this) \"/>"; print "" . format_bytes($file['size']) . ""; print "" . $file['file_type'] . "\n"; } @@ -473,7 +496,7 @@ Hg

# + onclick="this.src = QRCodePNG(location.href, this)" /> SliTaz @ Twitter Facebook