26 lines
796 B
PHP
26 lines
796 B
PHP
<?php
|
|
include 'include/db.php';
|
|
include 'include/templates.php';
|
|
|
|
if (!isset($_GET['id'])) {
|
|
die("<meta http-equiv=\"refresh\" content=\"0; url=/\">");
|
|
}
|
|
|
|
showHeader();
|
|
$imgs = getImage($_GET['id']);
|
|
if ($imgs == NULL) {
|
|
die("<meta http-equiv=\"refresh\" content=\"0; url=/\">");
|
|
}
|
|
$tags = explode(",", $imgs[0]["tags"]);
|
|
|
|
echo '<center><img src="' . $imgs[0]["location"] . '" /></center>';
|
|
echo '<strong>Uploader:</strong> ' . uuidToUsername($imgs[0]["uploader"]);
|
|
echo '<br/><strong>Tags:</strong>';
|
|
for($x = 0; $x < count($tags); $x++) {
|
|
printTag($tags[$x], true);
|
|
}
|
|
if (isAdmin(tokenToUuid($_COOKIE["meowboardSession"])) == 1) {
|
|
echo '<form action="delete.php?id=' . $_GET['id'] . '" method="get"><input type="text" id="id" name="id"><br/><button>Delete</button>';
|
|
}
|
|
echo $footer;
|
|
?>
|