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:
80:
81:
82:
83:
84:
85:
86: | <html>
<center>
<?php
error_reporting(0);
$handle=opendir(".");
while ($file = readdir($handle))
{
if ($file != "." && $file != "..")
{
$picinfo = @getimagesize($file);
if ($picinfo !== false)
{
if(file_exists("tnails/$file"))
{
$lol = 1;
}
else
{
$size=getimagesize("$file");
$breite=$size[0];
$hoehe=$size[1];
$neueBreite=120;
$neueHoehe=intval($hoehe*$neueBreite/$breite);
$altesBild=ImageCreateFromJPEG("$file");
if ($altesBild == "")
{
$altesBild=ImageCreateFromGif("$file");
}
if ($altesBild == "")
{
$altesBild=ImageCreateFromPng("$file");
}
if ($altesBild == "")
{
$altesBild=ImageCreateFromwbmp("$file");
}
$neuesBild=ImageCreateTrueColor($neueBreite,$neueHoehe);
ImageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe,$breite,$hoehe);
$wechseln=chdir("tnails");
ImageJPEG($neuesBild,"$file");
$wechseln=chdir("..");
}
$img_x = 500;
$img_y = 500;
echo "<a href=# ONCLICK=window.open('$file','buddy','width=$img_x,height=$img_y,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0')><img width=110 height=83 src=tnails/$file></a> ";
}
}
}
closedir($handle);
$wechseln=chdir("fotos/tnails");
$handle=opendir("fotos/.");
while ($file = readdir($handle))
{
if ($file != "." && $file != "..")
{
$picinfo = @getimagesize($file);
if ($picinfo !== false)
{
$wechseln=chdir("..");
if(file_exists("$file"))
{
$wechseln=chdir("tnails");
}
else
{
$wechseln=chdir("tnails");
unlink($file);
}
}
}
}
closedir($handle);
?>
</center>
</html> |