и правдачто
делаецо так
<!--c1--><div class='codetop'>Код</div><div class='codemain'><!--ec1--><?php
if (file_exists(INFUSIONS."random_photo_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."random_photo_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."random_photo_panel/locale/English.php";
}
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 3"); // <------ здесь ставишь сколько
if (dbrows($result) != 0)
{
@openside($locale['FOT_001']);
while ($data = dbarray($result))
{ if ($data['photo_thumb1'] && file_exists(PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1'])){
$rphoto = PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1'];
} else {
$rphoto = IMAGES."imagenotfound.jpg";
}
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".$rphoto."' alt='".$data['photo_title']."' title='".$data['photo_title']."' border='0'>
</a><br />".$data['photo_title']."
<br />
<a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."'>".$data['album_title']."</a>
</div><br />";
}
@closeside();
}
?><!--c2--></div><!--ec2-->