-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
73 lines (57 loc) · 2.17 KB
/
single.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php header("Content-type:text/html; charset=utf-8"); include("config.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo $title ?></title>
<link href="<?php echo $root_dir?>style.css" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=<?php echo $google_font_name?>" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" href="favicon.png">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<h1><?php echo $title ?></h1>
<?php
$sketch = $_GET[sketch];
$index = $_GET[index];
$color = $_GET[color];
$title = basename($sketch, ".png");
$folder = "big/";
if ($color) {
$folder = "color_big/";
}
if ($nice_urls) {
$im_url = "images/".$folder.$sketch.".png";
$link_normal = $root_dir.$index."/".$sketch;
$link_color = $root_dir.$index."/color/".$sketch;
$color_filename = "color_big/".$sketch.".png";
} else {
$folder = "big/";
if ($color) {
$folder = "color_big/";
}
$im_url = "watermark.php?img=".$folder.$sketch;
$link_normal = $root_dir."/single.php?sketch=".$sketch."&index=".$index;
$link_color = $root_dir."/single.php?color=true&sketch=".$sketch."&index=".$index;
$color_filename = "color_big/".$sketch;
}
echo "
<p>
<h2>".$title."</h2>
<a href=\"".$root_dir.$im_url."\"><img class=\"big\" src=\"".$root_dir.$im_url."\"></a>
</p>";
if (isset($color)) {
echo "
<p class=\"colorlink\"><a href=\"".$link_normal."\">Bleistift-Skizze</a></p>
";
} else {
if (file_exists($color_filename)) {
echo "
<p class=\"colorlink\"><a href=\"".$link_color."\">Coloriert</a></p>
";
}
}
?>
<h3><a href="<?php echo $root_dir?>#<?php echo $index?>"><< Zurück</a></h3>
© <?php echo strftime("%Y").", ".$author ?>, <a href="<?php echo $URL ?>"><?php echo $URL ?></a>
</body>
</html>