some styling
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2017-03-03 14:06
|
||||||
|
|
||||||
|
* [r30] COPYING, ChangeLog, INSTALL, html/index.php:
|
||||||
|
fix typo
|
||||||
|
|
||||||
|
2017-03-02 17:29
|
||||||
|
|
||||||
|
* [r29] html/index.php:
|
||||||
|
fix base path behind proxy
|
||||||
|
|
||||||
2017-03-01 19:37
|
2017-03-01 19:37
|
||||||
|
|
||||||
* [r28] ChangeLog, etc/authentication.php, html/index.php:
|
* [r28] ChangeLog, etc/authentication.php, html/index.php:
|
||||||
|
@@ -158,7 +158,7 @@ function linkorselect($link, $img, $filename) {
|
|||||||
echo '<input type="checkbox" id="'.htmlentities($filename).'" name="elements[]" value="'.htmlentities($filename).'" />';
|
echo '<input type="checkbox" id="'.htmlentities($filename).'" name="elements[]" value="'.htmlentities($filename).'" />';
|
||||||
echo '<label for="'.htmlentities($filename).'"><img src="'.$img.'" alt="'.htmlentities($filename).'"/></label>';
|
echo '<label for="'.htmlentities($filename).'"><img src="'.$img.'" alt="'.htmlentities($filename).'"/></label>';
|
||||||
} else {
|
} else {
|
||||||
makelink($link, $img, $filename);
|
makelink($link, $img, $filename, 'class="thumbnail"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isset($_REQUEST['secret'])) {
|
if (!isset($_REQUEST['secret'])) {
|
||||||
@@ -234,6 +234,8 @@ if (!isset($_REQUEST['secret'])) {
|
|||||||
<html>
|
<html>
|
||||||
<header>
|
<header>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
</header>
|
</header>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
@@ -269,7 +271,7 @@ if (!isset($_REQUEST['secret'])) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<h1>Gallery: <?php echo htmlentities($username).' @ '.htmlentities($subpath) ?></h1>
|
<h1>Gallery: <?php echo htmlentities($username).($subpath?'@'.htmlentities($subpath):'') ?></h1>
|
||||||
<?php
|
<?php
|
||||||
if (isset($_REQUEST['share'])) {
|
if (isset($_REQUEST['share'])) {
|
||||||
echo '<a href="?path='.urlencode($subpath).'"><img src="?folder=←" alt="←"/></a><br/>';
|
echo '<a href="?path='.urlencode($subpath).'"><img src="?folder=←" alt="←"/></a><br/>';
|
||||||
@@ -327,45 +329,45 @@ if (!isset($_REQUEST['secret'])) {
|
|||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
foreach ($key['elements'] as $f)
|
foreach ($key['elements'] as $f)
|
||||||
makelink('?path='.urlencode($subpath).'&file='.urlencode($f).'&view', '?path='.urlencode($subpath).'&file='.urlencode($f).'&thumb', $f);
|
makelink('?path='.urlencode($subpath).'&file='.urlencode($f).'&view', '?path='.urlencode($subpath).'&file='.urlencode($f).'&thumb', $f, 'class="thumbnail"');
|
||||||
} else {
|
} else {
|
||||||
if (isset($_REQUEST['view'])) { // view single image
|
if (isset($_REQUEST['view'])) { // view single image
|
||||||
$objects = extractDir($imagepath);
|
$objects = extractDir($imagepath);
|
||||||
$pos = array_search($imgfile, $objects['files']);
|
$pos = array_search($imgfile, $objects['files']);
|
||||||
if ($pos>0)
|
if ($pos>0)
|
||||||
echo '<a href="?path='.urlencode($subpath).'&file='.urlencode($objects['files'][$pos-1]).'&view"><img src="?folder=←" alt="previous"/></a>';
|
echo '<a href="?path='.urlencode($subpath).'&file='.urlencode($objects['files'][$pos-1]).'&view"><img src="?folder=←" alt="previous"/></a>';
|
||||||
echo '<a href="?path='.urlencode($subpath).'"><img src="?folder=↑" alt="↑"/></a>';
|
echo '<a href="?path='.urlencode($subpath).'"><img src="?folder=↑" alt="up"/></a>';
|
||||||
if ($pos<count($objects['files'])-1)
|
if ($pos<count($objects['files'])-1)
|
||||||
echo '<a href="?path='.urlencode($subpath).'&file='.urlencode($objects['files'][$pos+1]).'&view"><img src="?folder=→" alt="next"/></a>';
|
echo '<a href="?path='.urlencode($subpath).'&file='.urlencode($objects['files'][$pos+1]).'&view"><img src="?folder=→" alt="next"/></a>';
|
||||||
echo '<div class="image"><img style="width: 100%" src="?path='.urlencode($subpath).'&file='.urlencode($imgfile).'" alt="'.urlencode($imgfile).'"/></div>';
|
echo '<img class="image" src="?path='.urlencode($subpath).'&file='.urlencode($imgfile).'" alt="'.urlencode($imgfile).'"/>';
|
||||||
if ($pos!==NULL) {
|
if ($pos!==NULL) {
|
||||||
$lower = max(0, $pos-floor(((int)$preview_num)/2));
|
$lower = max(0, $pos-floor(((int)$preview_num)/2));
|
||||||
$higher = min(count($objects['files']), $lower+((int)$preview_num));
|
$higher = min(count($objects['files']), $lower+((int)$preview_num));
|
||||||
for ($i=$lower; $i<$higher; ++$i)
|
for ($i=$lower; $i<$higher; ++$i)
|
||||||
makelink('?path='.urlencode($subpath).'&file='.urlencode($objects['files'][$i]).'&view', '?path='.urlencode($subpath).'&file='.urlencode($objects['files'][$i]).'&thumb', $objects['files'][$i], 'style="width: '.round(100/($higher-$lower), 3).'%"');
|
makelink('?path='.urlencode($subpath).'&file='.urlencode($objects['files'][$i]).'&view', '?path='.urlencode($subpath).'&file='.urlencode($objects['files'][$i]).'&thumb', $objects['files'][$i], 'style="width: '.round(100/($higher-$lower), 3).'%" class="thumbnail"');
|
||||||
}
|
}
|
||||||
} else { // gallery view
|
} else { // gallery view
|
||||||
if (isset($_REQUEST['select'])) {
|
if (isset($_REQUEST['select'])) {
|
||||||
echo '<a href="?path='.urlencode($subpath).'">Normal-Modus</a>';
|
echo '<a href="?path='.urlencode($subpath).'">Normal-Modus</a>';
|
||||||
echo '<form method="POST">';
|
echo '<form method="POST">';
|
||||||
echo '<input type="hidden" name="path" value="'.htmlentities($subpath).'">';
|
echo '<input type="hidden" name="path" value="'.htmlentities($subpath).'">';
|
||||||
echo '<label for="password">Passwort:</label>';
|
echo '<label for="password">Passwort:</label>';
|
||||||
echo '<input type="text" size="5" name="password" value="'.substr(str_shuffle(strtolower(sha1(rand().time()."SeAG6"))),0,4).'">';
|
echo '<input type="text" size="5" name="password" value="'.substr(str_shuffle(strtolower(sha1(rand().time()."SeAG6"))),0,4).'">';
|
||||||
echo '<label for="valid-until">Gültig bis:</label>';
|
echo '<label for="valid-until">Gültig bis:</label>';
|
||||||
echo '<input type="date" size="10" name="valid-until" max="'.date('Y-m-d', time()+((int)$max_validity_days)*86400).'" value="'.date('Y-m-d', time()+14*86400).'"/>';
|
echo '<input type="date" size="10" name="valid-until" max="'.date('Y-m-d', time()+((int)$max_validity_days)*86400).'" value="'.date('Y-m-d', time()+14*86400).'"/>';
|
||||||
echo '<input type="submit" name="share" value="Teilen"/>';
|
echo '<input type="submit" name="share" value="Teilen"/>';
|
||||||
} else {
|
} else {
|
||||||
echo '<a href="?path='.urlencode($subpath).'&select">Auswahl-Modus</a>';
|
echo '<a href="?path='.urlencode($subpath).'&select">Auswahl-Modus</a>';
|
||||||
}
|
}
|
||||||
echo '<div class="dirs">';
|
echo '<div class="dirs">';
|
||||||
if (preg_match('/\//', $subpath)) {
|
if (preg_match('/\//', $subpath)) {
|
||||||
echo '<a href="?path='.urlencode(preg_replace('/\/[^\/]+$/', '', $subpath)).'"><img src="?folder=↑" alt="↑"/></a>';
|
echo '<a href="?path='.urlencode(preg_replace('/\/[^\/]+$/', '', $subpath)).'"><img src="?folder=↑" alt="↑"/></a>';
|
||||||
} elseif ($subpath!="") {
|
} elseif ($subpath!="") {
|
||||||
echo '<a href="?"><img src="?folder=↑" alt="↑"/></a>';
|
echo '<a href="?"><img src="?folder=↑" alt="↑"/></a>';
|
||||||
}
|
}
|
||||||
$objects = extractDir($imagepath);
|
$objects = extractDir($imagepath);
|
||||||
foreach ($objects['dirs'] as $f)
|
foreach ($objects['dirs'] as $f)
|
||||||
makelink('?path='.urlencode($subpath.($subpath!=""?'/':'').$f), '?path='.urlencode($subpath).'&folder='.urlencode($f), $f);
|
makelink('?path='.urlencode($subpath.($subpath!=""?'/':'').$f), '?path='.urlencode($subpath).'&folder='.urlencode($f), $f, 'class="folder"');
|
||||||
echo '</div><div class="images">';
|
echo '</div><div class="images">';
|
||||||
foreach ($objects['files'] as $f)
|
foreach ($objects['files'] as $f)
|
||||||
linkorselect('?path='.urlencode($subpath).'&file='.urlencode($f).'&view', '?path='.urlencode($subpath).'&file='.urlencode($f).'&thumb', $f);
|
linkorselect('?path='.urlencode($subpath).'&file='.urlencode($f).'&view', '?path='.urlencode($subpath).'&file='.urlencode($f).'&thumb', $f);
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
EXTRA_DIST = configuration.php.in
|
EXTRA_DIST = configuration.php.in
|
||||||
|
|
||||||
wwwdir = ${pkgdatadir}/html
|
wwwdir = ${pkgdatadir}/html
|
||||||
dist_www_DATA = folder.png .htaccess index.php
|
dist_www_DATA = folder.png .htaccess index.php style.css
|
||||||
www_DATA = configuration.php
|
www_DATA = configuration.php
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = makefile.in
|
MAINTAINERCLEANFILES = makefile.in
|
||||||
|
Reference in New Issue
Block a user