-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
executable file
·79 lines (78 loc) · 2.63 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?
if($_GET["folder"] && (substr($_GET["folder"],0,1) == "." || preg_match("/.+\.\..+/", $_GET["folder"])))
{
echo "no no no.";
return;
}
?>
<? include 'includes/thumbnailgen.php'; ?>
<html>
<head>
<title>Simple PHP Gallery</title>
<link rel="stylesheet" href="includes/js/fancybox/jquery.fancybox-1.2.6.css" type="text/css" media="screen">
<style type='text/css' media='screen'>@import "includes/js/fancybox/jquery.fancybox-1.2.6.css";</style>
<link rel="stylesheet" href="includes/main.css" type="text/css" media="screen">
<style type='text/css' media='screen'>@import "includes/main.css";</style>
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("jquery", "1");</script>
<script type="text/javascript" src="includes/js/fancybox/jquery.fancybox-1.2.6.js"></script>
<script type="text/javascript" src="includes/js/jquery.url.min.js"></script>
<script type="text/javascript" src="includes/js/gallery.js"></script>
<script language="javascript">
$(document).ready(function() {
$("a.fancybox").fancybox({
'hideOnContentClick': false,
'frameWidth': 660,
'frameHeight':480,
'imageScale':true,
'callbackOnClose':function()
{
$("#output").empty();
$("#output").append("<p style=\"text-align:center;\"><img src=\"includes/spinner.gif\"><br/>Please Wait...</p>");
if($.url.param("folder") != "")
{
$.ajax({
type: "GET",
url: "includes/thumbnailgen.php?folder=" + $.url.param("folder"),
success: function(){$("#output").empty();loadAllData();}
});
}
else
{
$.ajax({
type: "GET",
url: "includes/thumbnailgen.php",
success: function(){$("#output").empty();loadAllData();}
});
}
}
});
});
</script>
</head>
<body>
<h1><a href="upload/?iframe" class="fancybox">upload an image »</a></h1>
<?
if($_GET["folder"] != "")
{
echo "<div id=\"folderHeader\">current folder: <span id=\"folderName\">".$_GET["folder"]."</span></div>";
}
else
{
echo "<div id=\"folderHeader\">current folder: <span id=\"folderName\">root folder</span></div>";
}
?>
<?
if($_GET["folder"] != "" && dirname($_GET["folder"]) != ".")
{
echo "<div class='gallery_folder'><a href='index.php?folder=" . dirname($_GET["folder"]) . "/'><img src='/includes/folder.jpg'>^up one folder</a></div>";
}
else if($_GET["folder"] != "")
{
echo "<div class='gallery_folder'><a href='index.php'><img src='/includes/folder.jpg'>^up one folder</a></div>";
}
?>
<div id="output">
</div>
<div id="footer">Get your own: <a href="http://github.com/jimmy0x52/simple-php-gallery">GitHub: Simple PHP Gallery</a></div>
</body>
</html>