ho provato così ma non va
Codice PHP:
<images>
<?
$sql = "select * from photos where ptid = ". $_REQUEST['id'] . " order by porder asc";
$photo = mysql_query($sql,$myconn) or die(mysql_error());
// start php to load javascript slide show
$n = " ";
$count = 0;
while ($row_photo = mysql_fetch_assoc($photo)) {
if ($count == 1) {
$captions .=$n;
$dir .=$n;
}
else
$count = $count + 1;
$captions .= "'".$row_photo['caption']."'" ;
$dir = "admin/photos/uploads/thumbs/tn_". $row_photo['location']."/";
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
$filetype = substr($file,-3);
$filetype = strtolower($filetype);
if ($filetype == "jpg" || $filetype == "gif") { ?>
<pic>
<image>admin/photos/uploads/thumbs/tn_<? echo $row_photo['location']; ?>/<? echo $file;?></image>
<caption><? echo $file;?></caption>
</pic>
<?
}else
print '<center>[img]admin/photos/uploads/thumbs/tn_noimage.jpg[/img]
';
?>
<?
}
}
closedir($dh);
}
}
?>
</images>
strano...cosa manca?