Файл: galery/inc/all_gallery.php
Строк: 37
<?
$set['title']='Фотоальбомы';
include_once '../sys/includes/header.php';
title();
auter();
err();
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery`"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if ($k_post==0)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'>";
echo "Фотоальбомы отсуствуют!";
echo "</td>";
echo "</tr></table>";
}
$q=mysql_query("SELECT * FROM `gallery` ORDER BY `time` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q))
{
$ank=get_user($post['id_user']);
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='icon14'>";
$foto=mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id_gallery` = '".$post['id']."' ORDER BY RAND()"));
if ($foto==null)
{
echo "<img src='/s-klub/images/no_photo_".$ank['pol'].".png' width='50'>";
}else{
if ($foto['ero']==1)
{
echo "<img src='/s-klub/images/ero.png' width='50'>";
}else{
echo "<img src='/galery/foto48/".$foto['id'].".".$foto['ras']."' alt='Фото_".$foto['id']."' width='50'>";
}
}
echo "</td>";
echo "<td class='p_t'>";
echo "<img src='/s-klub/img/cam.png'> ";
echo "<b><a href='/galery/".$ank['id']."/".$post['id']."/'>".$post['name']."</a> (".mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_gallery` = '".$post['id']."'"),0)." фото)</b>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td class='p_m' colspan='2'>";
echo "<img src='/s-klub/img/opis.png'> <b>Описние:</b> ";
if ($post['opis']==null)
{
echo "Отсуствует!<br />";
}else{
echo esc(trim(br(bbcode(smiles(links(stripcslashes(htmlspecialchars($post['opis']))))))))."<br />";
}
echo "<img src='/s-klub/img/time.png'> <b>Создан:</b> ".vremja($post['time_create'])."<br />";
echo "<img src='/s-klub/img/who.png'> <b>Автор:</b> <a href='/info.php?id=$ank[id]'>";
echo GradientText("$ank[nick]", "$ank[ncolor]", "$ank[ncolor2]");
echo "</a><br />";
echo "</td>";
echo "</tr></table>";
}
if ($k_page>1)
{
str('?',$k_page,$page);
}
if (isset($user))
{
echo "<a href='/galery/".$user['id']."/'><div class='foot'>";
echo "<img src='/s-klub/img/cam-go.png'> Мои альбомы";
echo "</div></a>";
}
include_once '../sys/includes/footer.php';
exit;
?>