Use short tags for php echo
This commit is contained in:
parent
4e42aa333d
commit
6b66fbdda7
4 changed files with 25 additions and 25 deletions
|
@ -1 +1 @@
|
|||
<div id="thumbsize" style="visibility:hidden"><?php echo THUMB_SIZE ?></div>
|
||||
<div id="thumbsize" style="visibility:hidden"><?= THUMB_SIZE ?></div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php if ($GLOBALS['imageFiles'] or $GLOBALS['otherFiles']) { ?>
|
||||
<div style="text-align: center; font-size: 0.25cm;">
|
||||
<a href="<?php echo $GLOBALS['rootUrl']."plugins/tar/tar.php".$GLOBALS['simplePath'] ?>">Download all files in this directory</a>
|
||||
<a href="<?= $GLOBALS['rootUrl']."plugins/tar/tar.php".$GLOBALS['simplePath'] ?>">Download all files in this directory</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<head>
|
||||
<title> <?php echo IMAGES_DIR.$simpleImagePath ?> </title>
|
||||
<title> <?= IMAGES_DIR.$simpleImagePath ?> </title>
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
height: 100%;
|
||||
|
@ -45,28 +45,28 @@ img {
|
|||
</style>
|
||||
|
||||
<?php if ($nextImageUrl !== '' and $firefox) { ?>
|
||||
<link rel="prefetch" href="<?php echo $nextImageUrl ?>" />
|
||||
<link rel="prefetch" href="<?php echo $nextPageUrl ?>" />
|
||||
<link rel="prefetch" href="<?= $nextImageUrl ?>" />
|
||||
<link rel="prefetch" href="<?= $nextPageUrl ?>" />
|
||||
<?php } ?>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a href="<?php echo $imageUrl ?>"><img src="<?php echo $imageUrl ?>" id="theimage" /></a>
|
||||
<a href="<?= $imageUrl ?>"><img src="<?= $imageUrl ?>" id="theimage" /></a>
|
||||
|
||||
<div id="up">
|
||||
<a href="<?php echo $directoryUrl ?>" title="Back to directory">^</a>
|
||||
<a href="<?= $directoryUrl ?>" title="Back to directory">^</a>
|
||||
</div>
|
||||
|
||||
<?php if ($nextPageUrl !== '') { ?>
|
||||
<div id="next">
|
||||
<a href="<?php echo $nextPageUrl ?>" title="Next image">></a>
|
||||
<a href="<?= $nextPageUrl ?>" title="Next image">></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($prevPageUrl !== '') { ?>
|
||||
<div id="previous">
|
||||
<a href="<?php echo $prevPageUrl ?>" title="Previous image"><</a>
|
||||
<a href="<?= $prevPageUrl ?>" title="Previous image"><</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
@ -75,9 +75,9 @@ img {
|
|||
<?php if ($nextImageUrl !== '' and ! $firefox) { ?>
|
||||
window.onload = function() { // for browsers not supporting link rel=prefetch
|
||||
var im = new Image();
|
||||
im.src = '<?php echo $nextImageUrl ?>';
|
||||
im.src = '<?= $nextImageUrl ?>';
|
||||
var req = new XMLHttpRequest();
|
||||
req.open('GET', '<?php echo $nextPageUrl ?>', false);
|
||||
req.open('GET', '<?= $nextPageUrl ?>', false);
|
||||
req.send(null);
|
||||
};
|
||||
<?php } ?>
|
||||
|
@ -87,17 +87,17 @@ function keyup(e)
|
|||
{
|
||||
switch (e.keyCode) {
|
||||
case 37: // left
|
||||
window.location = "<?php echo $prevPageUrl ?>";
|
||||
window.location = "<?= $prevPageUrl ?>";
|
||||
break;
|
||||
case 39: // right
|
||||
case 32: // space
|
||||
window.location = "<?php echo $nextPageUrl ?>";
|
||||
window.location = "<?= $nextPageUrl ?>";
|
||||
break;
|
||||
case 38: // up (down is 40)
|
||||
window.location = "<?php echo $directoryUrl ?>";
|
||||
window.location = "<?= $directoryUrl ?>";
|
||||
break;
|
||||
case 13: // enter
|
||||
window.location = "<?php echo $imageUrl ?>";
|
||||
window.location = "<?= $imageUrl ?>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
20
template.php
20
template.php
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title> <?php echo $realDir ?> </title>
|
||||
<title> <?= $realDir ?> </title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin-top: 0;
|
||||
|
@ -21,11 +21,11 @@ a {
|
|||
vertical-align: middle;
|
||||
}
|
||||
.image, .image_nopreview {
|
||||
width: <?php echo THUMB_SIZE ?>px;
|
||||
width: <?= THUMB_SIZE ?>px;
|
||||
text-align: center;
|
||||
}
|
||||
.image, .foldername {
|
||||
height: <?php echo THUMB_SIZE ?>px;
|
||||
height: <?= THUMB_SIZE ?>px;
|
||||
}
|
||||
.foldername, .foldername_nopreview {
|
||||
padding-left: 1ex;
|
||||
|
@ -42,13 +42,13 @@ a {
|
|||
}
|
||||
</style>
|
||||
<?php foreach ($plugins as $p) if (is_file("plugins/$p/style.css")) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $rootUrl."plugins/$p/style.css" ?>" />
|
||||
<link rel="stylesheet" type="text/css" href="<?= $rootUrl."plugins/$p/style.css" ?>" />
|
||||
<?php } ?>
|
||||
<?php plugins_include("head.php") ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="parentfolder"><a href="<?php echo $parentLink ?>">
|
||||
<div id="parentfolder"><a href="<?= $parentLink ?>">
|
||||
<?php if ($parentLink !== '') { ?>
|
||||
^
|
||||
<?php } ?>
|
||||
|
@ -61,10 +61,10 @@ a {
|
|||
<div class="folder">
|
||||
<?php if ($preview === "") { ?>
|
||||
<div class="square"><div class="image_nopreview"> - </div></div>
|
||||
<div class="square"><div class="foldername_nopreview"> <a href="<?php echo $folder["link"] ?>"><?php echo $folder["name"] ?></a> </div></div>
|
||||
<div class="square"><div class="foldername_nopreview"> <a href="<?= $folder["link"] ?>"><?= $folder["name"] ?></a> </div></div>
|
||||
<?php } else { ?>
|
||||
<div class="square"><div class="image"> <a href="<?php echo $folder["link"] ?>"><img src="<?php echo $rootUrl.$preview ?>" /></a> </div></div>
|
||||
<div class="square"><div class="foldername"> <a href="<?php echo $folder["link"] ?>"><?php echo $folder["name"] ?></a> </div></div>
|
||||
<div class="square"><div class="image"> <a href="<?= $folder["link"] ?>"><img src="<?= $rootUrl.$preview ?>" /></a> </div></div>
|
||||
<div class="square"><div class="foldername"> <a href="<?= $folder["link"] ?>"><?= $folder["name"] ?></a> </div></div>
|
||||
<?php if (isset($generating)) { ob_flush(); flush(); } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
@ -73,14 +73,14 @@ a {
|
|||
|
||||
<div id="images">
|
||||
<?php foreach ($imageFiles as $file) { ?>
|
||||
<div class="square"><div class="image"><a href="<?php echo $file["link"] ?>"><img src="<?php echo $rootUrl.getPreview($file["file"]) ?>" alt="<?php echo $file["name"] ?>" /></a></div></div>
|
||||
<div class="square"><div class="image"><a href="<?= $file["link"] ?>"><img src="<?= $rootUrl.getPreview($file["file"]) ?>" alt="<?= $file["name"] ?>" /></a></div></div>
|
||||
<?php if (isset($generating)) { ob_flush(); flush(); } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div id="miscfiles">
|
||||
<?php foreach ($otherFiles as $file) { ?>
|
||||
<div class="miscfile"><a href="<?php echo $file["link"] ?>"><?php echo $file["name"] ?></a></div>
|
||||
<div class="miscfile"><a href="<?= $file["link"] ?>"><?= $file["name"] ?></a></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue