 |
 |
|
|
 |
 |
|
|
 |
 |
include("config.php");
require("class.thumbs.php");
$opc = $_GET["opc"];
if(!empty($opc)) { $opcx = "$opc/"; $opc = "$opc\\"; } else { $opc = ""; $opcx = ""; }
$thumbs = new thumbs("photos/$opcx", 0, "thumbs/", false, 0, 100, false, 120, 120);
$thumbs->creates_thumbs();
$s = 0;
if ($handle = opendir("$dir\\photos\\".$opc."thumbs")) {
/* Esta é a forma correta de varrer o diretório */
while (false !== ($file = readdir($handle))) {
if ($s >= 4) {
echo " \n";
}
if ((!is_dir("$dir\\photos\\".$opc."thumbs\\$file")) && ($file != ".") && ($file != "..") && ($file != "thumbs")) {
$file_tx = substr($file, 0, strpos($file, ".")).".gif";
echo "  $file_tx | \n";
$s++;
}
if ($s >= 4) {
echo " \n";
$s = 0;
}
flush();
}
closedir($handle);
}
?>
$arq = "$dir\\trabalhos.dat";
if (file_exists($arq)) {
$lines = file($arq);
$clines = count($lines);
for($x=0;$x<$clines; $x++) {
echo trocastr($lines[$x]);
flush();
}
}
?>
|
|
 |
 |
 |
|