metanohi-misc-subsites/subsites/pictures/show.php

38 lines
1.2 KiB
PHP
Raw Normal View History

2011-08-02 19:57:57 +02:00
<?php
include('get_info.php');
header('Content-type: text/html; charset=UTF-8');
$u = $_SERVER['REQUEST_URI'];
if (strpos($u, 'show.php?') == 1)
$img = $_SERVER['QUERY_STRING'];
else
$img = substr($u, 1);
$suf = explode('.', $img);
$suf = $suf[sizeof($suf)-1];
$suf = strtolower($suf);
if ($suf == 'xcf')
$img_file = 'xcf.png';
else
$img_file = $img;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta name='description' content='Pictures.' />
<meta name='keywords' content='pictures of varying quality, stuff' />
<meta http-equiv='content-language' content='en' />
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
<title><?php echo $img; ?></title>
</head>
<body>
<a href='http://pictures.metanohi.org/'>Index</a>
<h1><?php echo $img; ?></h1>
<p><a href='img/<?php echo $img; ?>'><img alt='<?php echo $img; ?>' title='<?php echo $img; ?>' style='max-width: 590px;' src='img/<?php echo $img_file; ?>' /></a></p>
<h2>Information</h2>
<pre>
<?php echo get_info($img); ?>
</pre>
<a href='/edit/?i=<?php echo $img; ?>'>Edit</a>
</body>
</html>