-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
62 lines (48 loc) · 2.07 KB
/
index.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
<?php header("Content-type:text/html; charset=utf-8"); include("config.php"); include("functions.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<?php
setup();
?>
<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
$files = getPngFiles("big");
// show all files
foreach ($files as $file) {
$title = basename($file, ".png");
$im_small = "small/".$file;
$im_big = "big/".$file;
$index = count($files)-array_search($file, $files);
if (!file_exists($im_small)) {
createResizedImage($im_big, $image_small_width, $im_small);
}
$im_url = "";
$single_ref = "";
if ($nice_urls) {
$im_url = "images/".$im_small;
$single_ref = $index."/".basename($file, ".png");
} else {
$im_url = "watermark.php?&img=".$im_small;
$single_ref = "single.php?&sketch=".$file."&index=".$index;
}
echo "
<p>
<h2>".$title."</h2>
<a id=\"".$index."\"></a>
<a href=\"".$single_ref."\">
<img src=\"".$im_url."\"/>
</a>
</p>";
}
?>
© <?php echo strftime("%Y").", ".$author ?>, <a href="<?php echo $URL ?>"><?php echo $URL ?></a>
</body>
</html>