File size: 1.87Kb
<?php
Defined('INDEX_S_S') or die ('Доступ запрещен!!!');
$st_r = $cgf_ind_user;
// столько выводим
if (is_file($cms.'user/user.txt')) $post = @file($cms.'user/user.txt'); else echo 'Ошибка';
$count_post = count($post);
if (empty($_POST['fapages'])) {
$pages = 1;
} else {
$pages = (int) $_POST['fapages'];
}
$j = ($count_post-1)-(($pages-1)*$st_r);
$i = $j-$st_r;
for(; $i<$j && $j>=0; $j--)
{
include($cms.'user/'.trim($post[$j]).'/profile.php');
echo '
<table
style="width: 100%; text-align: left; margin-left: auto; margin-right: auto;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="text-align: left; vertical-align: top;"><span class="mess1"><div class="user_name" align="left">'.$post[$j].'';
if (is_file('onl/user/'.trim($post[$j]).'.txt'))
{
echo ' - <font style="color:#FFFFFF; background-color:#008040;">на сайте</font>';
}
echo '</div><div align="right">'.$user_name.'';
echo '</div></span> <span class="mess2">'.$user_info.'</span> </td>
<td style="width: 10px; text-align: right; vertical-align: top;"><a class="knopka" href="/?page=anketa&log_in='.trim($post[$j]).'"> Далее </a></td>
</tr>
</tbody>
</table>
<br>
';
}
$all = ceil($count_post/$st_r);
echo '<table><tr>';
for ($i=1;$i<=$all;$i++)
{
if ($pages==$i) {
echo '<td><b class="knopka">'.$i.'</b></td>';
}
else
{
echo '<td>
<form name="" action="" method="post">
<input type="submit" class="knopka" value="'.$i.'">
<input name="fapages" type="hidden" value="'.$i.'">
</form>
</td>';
}
}
echo '</tr></table>';
?>