raster pushed a commit to branch master. http://git.enlightenment.org/website/www.git/commit/?id=55e6bffbb852c2a1e154655610ce0e9d0f39d52e
commit 55e6bffbb852c2a1e154655610ce0e9d0f39d52e Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com> Date: Tue Apr 7 20:50:17 2015 +0900 www ss - add back display.php --- public_html/ss/display.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/public_html/ss/display.php b/public_html/ss/display.php new file mode 100644 index 0000000..7bc3f21 --- /dev/null +++ b/public_html/ss/display.php @@ -0,0 +1,50 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" +"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<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 + function get_ip() + { + if (getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR"); + else $ip = "UNKNOWN"; + return $ip; + } + + $img = ""; + if (isset($_GET['image'])) + $img = $_GET['image']; + + $auth_file = $_SERVER["DOCUMENT_ROOT"] . "/ss/ip-" . $img; + $auth_expire = 60 * 60; // You have one hour to remove your content + + if (file_exists($auth_file) && + time() - filemtime($auth_file) < $auth_expire) + { + $auth = md5($img . get_ip()); + + $fh = fopen($auth_file, "r"); + $head = fgets($fh); + fclose($fh); + } + else + { + $auth = false; + $head = true; + } + + if ($head == $auth || get_ip() == "140.211.167.168") + { + print "<span><a href=remove.php?image=" . $img . ">Remove content</a></span>\n"; + } + print "<span><a href=ban.php?image=" . $img . ">Alert content</a></span>\n"; + + print "<a href=http://www.enlightenment.org/ss/" . $img . ">"; + print "<img src=" . $img . " border=1>"; + print "</a>\n"; + ?> + </body> +</html> --