www - add back index.php/css for ss

This commit is contained in:
Carsten Haitzler 2015-04-07 20:24:42 +09:00
parent 291a02cad3
commit 31d79fe99e
2 changed files with 186 additions and 0 deletions

80
public_html/ss/index.css Normal file
View File

@ -0,0 +1,80 @@
/*
* index.css
*
* Written By: Nicholas "mekius" Hughart
* Date: 2012-08-28
*/
body,html
{
background-color:#ffffff;
padding:0;
margin:0;
font-family:"DejaVu Sans Mono","Bitstream Vera Sans Mono","monospace";
}
a:link
{
color:#000000;
}
a:active
{
color:#88bbff;
}
a:visited
{
color:#000000;
}
#PagesWrapper
{
position:fixed;
bottom:0;
left:0;
background-color:#e0e0e0;
box-shadow: 0 0 3px 2px #808080;
width:100%;
border-bottom:#404040;
}
#Pages
{
word-spacing:0.6em;
text-align:center;
padding:5px;
margin:0 5px 0 5px;
}
#Pages a
{
text-decoration:none;
font-size:1em;
color:#404040;
}
#Pages a.highlight
{
font-weight:bold;
font-size:1.6em;
color:#000000;
}
#Pages span
{
color:#c0c0c0;
}
#Pages span.PreviousArrows
{
float:left;
font-size:1.6em;
}
#Pages span.PreviousArrows:first-child
{
font-size:1.8em;
}
#Pages span.NextArrows
{
float:right;
font-size:1.6em;
}
#Pages span.NextArrows:last-child
{
font-size:1.8em;
}
#Images
{
margin-bottom:3em;
}

106
public_html/ss/index.php Normal file
View File

@ -0,0 +1,106 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!--
-- index.php
--
-- Modified By: Nicholas "mekius" Hughart
-- Added: Pagination Support
-- Date: 2012-08-28
-->
<html>
<head>
<title>Enlightenment Screenshots</title>
<link href="index.css" rel="stylesheet" type="text/css"></link>
</head>
<body bgcolor=#ffffff alink=#88bbff link=#000000 vlink=#888888>
<?php
define('IMAGES_PER_PAGE', 24);
define('MAX_PAGE_LINKS', 9);
$page = 0;
if (isset($_GET['page']))
$page = (int)($_GET['page']);
$files = glob("e-*");
array_multisort(
array_map( 'filemtime', $files ),
SORT_NUMERIC,
SORT_DESC,
$files
);
$pages = (int)(count($files) / IMAGES_PER_PAGE);
if (count($files) % IMAGES_PER_PAGE)
$pages++;
?>
<div id="PagesWrapper">
<div id="Pages">
<?php
echo '<span class="PreviousArrows">';
if ($page != 0)
echo "<span><a href='?page=0'>&laquo;</a></span>";
else
echo "<span>&laquo;</span>";
if ($page > 0)
echo "<span><a href='?page=".($page-1)."' accesskey='p'>&lt;</a></span>";
else
echo "<span>&lt;</span>";
echo '</span>';
$i = 0;
if (
($pages > MAX_PAGE_LINKS) &&
($page > (MAX_PAGE_LINKS/2))
)
{
if ($page > ($pages - (MAX_PAGE_LINKS/2)))
$i = $pages - MAX_PAGE_LINKS;
else
$i = $page - (int)(MAX_PAGE_LINKS/2);
}
for ($j = 0; ($i < $pages) && ($j < MAX_PAGE_LINKS); ++$i, ++$j)
{
if ($i == $page)
echo "<a href=\"?page=$i\" class='highlight'>".sprintf("%02u", $i+1)."</a>\n";
else
echo "<a href=\"?page=$i\">".sprintf("%02u", $i+1)."</a>\n";
}
echo '<span class="NextArrows">';
if ($page < ($pages-1))
echo "<span><a href='?page=".($page+1)."' accesskey='n'>&gt;</a></span>";
else
echo "<span>&gt;</span>";
if ($page != ($pages-1))
echo "<span><a href='?page=".($pages-1)."' >&raquo;</a></span>";
else
echo "<span>&raquo;</span>";
echo '</span>';
?>
</div>
</div>
<div id="Images">
<?php
$skip = $page * IMAGES_PER_PAGE;
foreach ($files as &$f) {
if ($skip-- > 0)
continue;
if ($skip < -IMAGES_PER_PAGE)
break;
$thumb = "th-" . $f;
if (!file_exists($thumb)) {
continue;
}
print "<a href=display.php?image=" . urlencode($f) . "><img src=" . $thumb . " border=1 hspace=10 vspace=10></a>\n";
}
?>
</div>
</body>
</html>