<div class="tower tower-bg">
<?php 

$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM tower WHERE height > '9'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];

$q = mysql_query("SELECT * FROM tower WHERE height > '9' ORDER BY height DESC LIMIT $start, $set[p_str]");

$num = $start + 1; 

while($post = mysql_fetch_assoc($q)) {
    echo '<div class="tower-row tower-rating">';
    echo '<div class="tower-row-item tower-rating-num">';
    echo $num++;
    echo '</div>';
    echo '<div class="tower-row-item tower-rating-avatar">';
    echo '<a href="/info.php?id=' . $post['userId'] . '">' . user::avatar($post['userId'], 1) . '</a>';
    echo '</div>';
    echo '<div class="tower-row-item">';
    echo '<a href="?uid=' . $post['userId'] . '">';
    echo '<span class="pull-right" style="font-size: 10px; color: #6a656e; "><img src="components/img/protection@2x.png" style="width: 14px;" />' . $post['height'] . 'м</span>';
    echo '<b>' . user::nick($post['userId'], 0, 1, 1) .'</b><br />';
    echo star2galaxy($post['height'] * 5);
    echo '</a>';
    echo '</div>';
    echo '</div>';
}

echo '</div>';

if ($k_page > 1)str('index.php?act=rating&', $k_page, $page);
?>
<div class="foot"><a href="?"><img src="/style/icons/str2.gif" /> My Tower</a></div>
