Возникла такая ситуация, использую foreach код отображается 2 раза
<?php
R::selectDatabase('default');
$server = R::getAll( 'SELECT * FROM user WHERE server = 1' );
foreach ($server as $servers):
?>
<div class="box">
<?php
R::selectDatabase('db1');
$server = 'Phoenix';
$admin = R::count( 'accounts' );
$admin = R::count( 'accounts', "online >= 0 AND admin >= 1" );
$online = R::count( 'accounts' );
$online = R::count( 'accounts', 'online >= 0');
?>
<div class="boxtitle"><?php echo $server?> Online: <?=$online?> | Админов: <?=$admin?></div>
<ol>
<?php
R::selectDatabase('db1');
$users = R::getAll( 'SELECT * FROM accounts WHERE `online` >=0 AND `admin` >= 1' );
foreach ($users as $user)
{
$id = $user['id'];
$user = R::load('accounts', $id);
echo('<a href="nickname.php?iddb='.$user['id'].'">');
echo('<li type="1">[LVL '.$user['admin'].'] '.$user['Name'].'(ONLINE: '.$user['online'].')</li>');
echo('</a>');
}
?>
</ol>
<ol>
<?php
R::selectDatabase('default');
$users = R::getAll( 'SELECT * FROM user WHERE cont = 1 AND server = 1' );
foreach ($users as $user)
{
$id = $user['id'];
$user = R::load('user', $id);
if(''.$user['server1'].'' == '0' ) $server = '';
else $server = 'Phoenix';
echo('<a href="user.php?id='.$user[id].'">');
echo('<li type="1">'.$user[username].' ('.$server.') '.$user[lastdate].'</li>');
echo('</a>');
}
?>
</ol>
</div>
<?php endforeach; ?>