Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Rondom photo panel

Parašė Lietuvos_pilietis· 2008 Geg. 5 11:05:37
#8

Gal galit idėti kodą į lentelę?
Į šita lentelę

<table>\\pradedam lentele
<tr>\\atidarom eilute

\\stulpeliai
<td>1eilute, 1 stulpelis</td>
<td>1eilute, 2 stulpelis</td>
<td>1eilute, 3 stulpelis</td>
</tr>\\uzdarom eilute

<tr>\\atidarom nauja eilute
\\stulpeliai
<td>2 eilute, 1 stulpelis</td>
<td>2 eilute, 2 stulpelis</td>
<td>2 eilute, 3 stulpelis</td>
</tr>\\uzdarom eilyute
</table>\\uzdarom lentele




Šita kodą

<?
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";
}

@openside($locale['FOT_001']);
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']."'
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']."'
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']."'
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('');
?>





Redagavo Lietuvos_pilietis· 2008 Geg. 5 11:05:10