PDA

View Full Version : Image Thumbnail Viewer II script issue



rkz
11-29-2007, 10:33 AM
hello, how to make default picture:
Im using this way:
echo "<div id=\"loadarea\" style=\"background-color:#ABCAFF; min-height:300px;border:2px solid red; margin:0; padding:0;\">Images goes there.. </div>";
echo "<div style=\"float:left\">";
$n=1;
for($i=1;$i<6;$i++){
if (!empty($myrow['image'.$i.''])) {$img=$myrow['image'.$i.''];
echo "[<a href=\"http://www.myweb.de/images/$img\" rel=\"enlargeimage::click\" rev=\"loadarea\">".$n; $n++; echo "</a>]";}
}

I can check if there is image1 in mysql, and how to load it first?

rkz
11-29-2007, 01:02 PM
1) Script Title: Image Thumbnail Viewer II script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem: I need to display default first image,

Im using such code:

echo "<div id=\"loadarea\" style=\"background-color:#ABCAFF; min-height:300px;border:2px solid red; margin:0; padding:0;\">Nuotraukos </div>";
echo "<div style=\"float:left\">";
$n=1;
for($i=1;$i<6;$i++){
if (!empty($myrow['image'.$i.''])) {$img=$myrow['image'.$i.''];
echo "[<a href=\"http://www.tipsas.lt/skelbimai/images/$img\" rel=\"enlargeimage::click\" rev=\"loadarea\">".$n; $n++; echo "</a>]";}
}

I need $myrow['image1'] to be loaded automatically first, or if there is now such image, then display onother default image default.jpg.

jscheuer1
11-29-2007, 01:35 PM
. . . px solid red; margin:0; padding:0;\">Images goes there.. </div>";
echo "<div style=\"floa . . .

Put whatever code you like in place of the red part.