|
{$lang['user_list']} ({$all_count_news}) |
{$lang['user_name']} |
{$lang['user_reg']} |
|
{$lang['user_last']} |
|
{$lang['user_news']} |
{$lang['user_coms']} |
{$lang['user_acc']} |
{$lang['user_action']} |
|
|
HTML;
$news_per_page = 50;
$start_from = intval( $start_from );
$i = $start_from;
// ------ Запрос к базе
$db->query( "SELECT user_id, name, user_group, reg_date, lastdate, news_num, comm_num, banned, r_freeze FROM " . USERPREFIX . "_users WHERE {$where} ORDER BY {$order_by} LIMIT {$start_from},{$news_per_page}" );
while ( $row = $db->get_row() ) {
$i ++;
$last_login = langdate( 'd/m/Y - H:i', $row['lastdate'] );
$user_name = "" . $row[name] . "";
if( $row[news_num] == 0 ) {
$news_link = "$row[news_num]";
} else {
$news_link = "[" . $row[news_num] . "]";
}
if( $row[comm_num] == 0 ) {
$comms_link = $row['comm_num'];
} else {
$comms_link = "[" . $row[comm_num] . "]";
}
$user_delete = "[" . $lang[user_del] . "]";
if( $row['banned'] == 'yes' ) $user_level = "" . $lang['user_ban'] . "";
else $user_level = $user_group[$row['user_group']]['group_name'];
if( $row['user_group'] == 1 ) $user_delete = "";
echo "
$user_name |
";
echo (langdate( "d/m/Y - H:i", $row['reg_date'] ));
echo " | |
$last_login | |
$news_link |
$comms_link |
$user_level |
[$lang[user_edit]] $user_delete [$lang[bb_b_mail]] [$lang[nl_pm]]
| |
| ";
}
$db->free();
$npp_nav = "";
if( $start_from > 0 ) {
$previous = $start_from - $news_per_page;
$npp_nav .= "<< $lang[edit_prev]";
}
// pagination
if( $all_count_news > $news_per_page ) {
$npp_nav .= " [ ";
$enpages_count = @ceil( $all_count_news / $news_per_page );
$enpages_start_from = 0;
$enpages = "";
for($j = 1; $j <= $enpages_count; $j ++) {
if( $enpages_start_from != $start_from ) {
$enpages .= "$j ";
} else {
$enpages .= " $j ";
}
$enpages_start_from += $news_per_page;
}
$npp_nav .= $enpages;
$npp_nav .= " ] ";
}
// pagination
if( $all_count_news > $i ) {
$how_next = $all_count_news - $i;
if( $how_next > $news_per_page ) {
$how_next = $news_per_page;
}
$npp_nav .= "$lang[edit_next] $how_next >>";
}
echo <<{$npp_nav} |
|
|
|