Mam mały problem, trochę kombinowałem, żeby zdjęcia pokazywały się w konkretnej kolejności. I musiałem coś przekombinować bo nie ma teraz możliwości przejścia na kolejną stronę z następnymi zdjęciami. Czy można to jakoś przywrócić?
Z góry dziękuję za wskazówki
Link do strony:
http://chwalipiet...llery2.php
plik photogallery2.php
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."photogallery.php";
define("SAFEMODE", @ini_get("safe_mode") ? true : false);
echo "<table width='100%'><tr><td class='capmain' align='center'>Ostatnio pochwalono sie...</td></tr>";
$result = dbquery(
"SELECT tp.*, tu.user_id,user_name, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes
FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."photo_albums ta USING (album_id)
LEFT JOIN ".$db_prefix."users tu ON tp.photo_user=tu.user_id
LEFT JOIN ".$db_prefix."ratings tr ON tr.rating_item_id = tp.photo_id AND tr.rating_type='P' GROUP BY photo_id ORDER BY photo_id DESC LIMIT 0,12"
);
$counter = 0;
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $settings['thumbs_per_row'] == 0)) echo "</tr>\n<tr>\n";
echo "<td width='300' align='left' valign='top' class='tbl'>\n
<table width='246' cellspacing='0' cellpadding='0'>\n
<tr>\n
<td background='".THEME."images/tytul.gif' width='246' height='24' colspan='4' align='center' border='0'>\n";
echo "<b>".trimlink($data['photo_title'],40)."</b><br>\n</td>\n
</tr>\n
<tr>\n
<td width='3' class='border_left1'><img src='".THEME."images/blank.gif' width='3' height='1' alt='' style='display:block'></td>\n
<td width='100' height='100' valign='top' align='left' style='padding: 1px;'>\n<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>";
if(dbrows($result)>0){
$photodir = PHOTOS.(!@ini_get("safe_mode") ? "album_".$data['album_id']."/" : "");
echo "<img src='".$photodir.$data['photo_thumb1']."' alt='".$data['photo_thumb1']."' title='".$locale['431']."' border='0'></td>\n
<td width='132' height='100' valign='top'>\n";
} else {
echo $locale['432'];
}
echo "</a><span class='small'>\n";
echo $locale['433'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";
$nazwa_cat = dbarray(dbquery("SELECT album_title FROM ".$db_prefix."photo_albums WHERE album_id='".$data['album_id']."'"));
echo"Kategoria: <a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."'>".$nazwa_cat['album_title']."</a><br>";
echo $locale['434']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>\n";
echo $locale['436'].dbcount("(comment_id)", "comments", "comment_type='P' AND comment_item_id='".$data['photo_id']."'")."<br>\n";
echo $locale['437'].($data['count_votes'] > 0 ? str_repeat("<img src='".THEME."images/star.gif' alt='*' style='vertical-align:middle'>", ceil($data['sum_rating'] / $data['count_votes'])) : $locale['438'])."<br>\n";
echo $locale['435'].$data['photo_views']."<br>\n";
echo "<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>Zobacz wiecej >>></a></td>\n
<td width='5' class='border_right1'><img src='".THEME."images/blank.gif' width='5' height='1' alt='' style='display:block'></td>\n
</tr>\n
<tr>\n
<td width='3' class='border_left1'><img src='".THEME."images/blank.gif' width='3' height='1' alt='' style='display:block'></td>\n
<td colspan='2' width='238' height='100' valign='top' style='padding: 2px;'>\n";
echo "<b><u>Opis:</u></b><br>\n";
echo nl2br(parseubb($data['photo_description']));
echo "</span></td>\n
<td width='5' class='border_right1'><img src='".THEME."images/blank.gif' width='5' height='1' alt='' style='display:block'></td>\n
</tr>\n
<tr>\n
<td height='13' colspan='4' background='".THEME."images/tlo_wizytowki_bottom.gif' border='0'></td>\n
</tr>\n
</table>\n</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
require "side_right.php";
require "footer.php";
?>
|