Комментарии:
HaUser 29 Июля 2014
RuSInet (28 Июля 2014):
<?
$q = mysql_query("SELECT * FROM `gallery_foto` ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q)){
echo '<img src="/style/themes/' . $set['set_them'] . '/loads/14/jpg.png" alt="*"/>';
echo '<a href="/foto/' . $ank['id'] . '/' . $gallery['id'] . '/' . $post['id'] . '/">' . text($post['name']);
if ($post['metka'] == 1)echo ' <font color=red>(18+)</font>';
echo '<br /><img src="/foto/foto128/' . $post['id'] . '.' . $post['ras'] . '" alt="Photo Screen" /></a><br />';
if ($post['opis'] == null)
echo 'Без описания<br />';
else
echo '<div class="text">' . output_text($post['opis']) . '</div>';
echo 'Комментариев (' . mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_komm` WHERE `id_foto` = '$post[id]'"),0) . ')';
}
if ($k_page > 1)str('?', $k_page, $page);
?>
RuSInet, $start, $set[p_str] убури а 1 поставь<?
$q = mysql_query("SELECT * FROM `gallery_foto` ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q)){
echo '<img src="/style/themes/' . $set['set_them'] . '/loads/14/jpg.png" alt="*"/>';
echo '<a href="/foto/' . $ank['id'] . '/' . $gallery['id'] . '/' . $post['id'] . '/">' . text($post['name']);
if ($post['metka'] == 1)echo ' <font color=red>(18+)</font>';
echo '<br /><img src="/foto/foto128/' . $post['id'] . '.' . $post['ras'] . '" alt="Photo Screen" /></a><br />';
if ($post['opis'] == null)
echo 'Без описания<br />';
else
echo '<div class="text">' . output_text($post['opis']) . '</div>';
echo 'Комментариев (' . mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_komm` WHERE `id_foto` = '$post[id]'"),0) . ')';
}
if ($k_page > 1)str('?', $k_page, $page);
?>
HaUser 29 Июля 2014
$sql = mysql_query("SELECT * FROM `gallery_foto` WHERE `id_user` = '$ank[id]' ORDER BY `id` DESC LIMIT 1");
$coll=mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]' ORDER BY `id` DESC"),0);if ($coll>0){
while ($photo = mysql_fetch_assoc($sql)){
echo "<a href='/foto/$ank[id]/$photo[id_gallery]/$photo[id]/'><img src='/foto/foto50/$photo[id].$photo[ras]' alt='' width='40'/></a>";
}
}
$sql = mysql_query("SELECT * FROM `gallery_foto` WHERE `id_user` = '$ank[id]' ORDER BY `id` DESC LIMIT 1");
$coll=mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]' ORDER BY `id` DESC"),0);if ($coll>0){
while ($photo = mysql_fetch_assoc($sql)){
echo "<a href='/foto/$ank[id]/$photo[id_gallery]/$photo[id]/'><img src='/foto/foto50/$photo[id].$photo[ras]' alt='' width='40'/></a>";
}
}