Radau keturias atsitiktines foto panele tačiau jos pritaikytos centrinei panelei gal galit paredaguot, kad būtu jos i apačia foto o ne į šoną.
čia kodas: openside('Atsitiktinės nuotraukos');
echo "<table width='100%'><tr><td width='25%'><center>";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
}
echo "</td><td width='25%'>";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
}
echo "</td><td width='25%'>";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
}
echo "</td><td width='25%'>";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' width='100' height='100' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
}
echo "</center> </td></tr></table>";
closeside('');
?>
Dar norėčiau paklausti gal turite tokias paneles?
Top foto
Ir naujausios foto?
Iš anksto ačiū
|
Dar norėčiau paklausti gal turite tokias paneles?
Top foto
Ir naujausios foto?
Iš anksto ačiū
Forume yra turbūt...
openside('Atsitiktinės nuotraukos');
echo "";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
}
echo "";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
}
echo "";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
}
echo "";
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' width='100' height='100' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
}
echo "";
closeside('');
?>
|