Файл: modules/foto/include.php
Строк: 18
<?php
$set['p_str'] = 5;
$k_rxn = mysql_num_rows(mysql_query("SELECT `id` FROM `gallery_foto` WHERE `rating` > '0'"));
$k_page = k_page($k_rxn, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
$r_xn = mysql_query("SELECT * FROM `gallery_foto` WHERE `rating` > '0' ORDER BY `rating` DESC LIMIT $start, $set[p_str]");
echo "<table><tr>";
while ($ank = mysql_fetch_array($r_xn)) {
echo "<td>";
$f = $ank['id'];
$foto = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '" . $f . "' LIMIT 1"));
$gallery = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id`='" . $foto['id_gallery'] . "' LIMIT 1"));
$ank_p = get_user($gallery['id_user']);
echo "<div class='photos'>";
echo "<div class='photos_blok'><center><i class='fa fa-star fa-fw'></i> <b>" . $ank['rating'] . "</b></center></div>";
echo "<a href='/modules/foto/$ank_p[id]/$gallery[id]/$ank[id]/'>";
echo "<img style='width:100px;height:100px;' src='/modules/foto/foto150/$foto[id].$foto[ras]' alt='Фото_$foto[id]'/>";
echo "</a></div>";
echo "</td>";
}
echo '</tr></table>';