-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-listpgallery.php
executable file
·72 lines (62 loc) · 2.18 KB
/
page-listpgallery.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
<?php
if ($album = opendir('/home/.ornice/tadpole/tadpole.tk/gallerys/Public/'))
{
$filescount = 0;
$albumscount = 0;
while (false !== ($alb = readdir($album)))
{
if((stristr($alb,".")) || (stristr($alb,".."))){ continue; }
$albumscount++;
$albdir = "/home/.ornice/tadpole/tadpole.tk/gallerys/Public/$alb/";
if ($files = opendir($albdir))
{
while (false !== ($file = readdir($files)))
{
$filescount++;
}
}
closedir($files);
}
}
closedir($album);
$filescount = round($filescount / 2);
print "<h3>$albumscount Albums / $filescount pictures</h3>";
$catdir = "/home/.ornice/tadpole/tadpole.tk/gallerys/Public/";
print "<table cellpadding=3 cellspacing=0 border=0 width=800><tr>\n";
if ($album = opendir($catdir))
{
$break = 0;
while (false !== ($alb = readdir($album)))
{
if((stristr($alb,".")) || (stristr($alb,".."))){ continue; }
$albumscount++;
$albdir = "/home/.ornice/tadpole/tadpole.tk/gallerys/Public/$alb/";
$onlyonethumb = 0;
if ($files = opendir($albdir))
{
while (false !== ($file = readdir($files)))
{
if((stristr($file,"tn_")) && ($onlyonethumb<1)){
$name = substr($alb,0,20);
print "<td><div class='album' align=left><a href='http://www.tadpole.tk/gallerys.php?page=$alb&url=Public/$alb'><img src='gallerys/Public/$alb/$file' title='Click to browse this gallery' width=100 border=0></a><br>$name ...</div></td>\n";
$onlyonethumb++;
}
$filescount++;
}
}
$break++;
if($break>5){
print "</tr></table><table cellpadding=3 cellspacing=0 border=0 width=600><tr>\n";
$break = 0;
}
closedir($files);
}
}
if($break<6){
for ($u=5;$u>=$break;$u--){
print "<td><div class='album'> </div></td>\n";
}
}
print "</tr></table></div>\n";
closedir($album);
?>