<?php
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
	// Подключаем конфигурацию
	require('../flowap/system.php');
	$onl = DB::$dbs->querySingle('SELECT COUNT(id) FROM `online` WHERE `time` > ?',[time() - 360]);
	if($onl > 0):?>
		<div class="flowap3">
			<?php $sql = DB::$dbs->query("SELECT `cool`,`usera`,`time`,`id`,`color`,`bote`,`url` FROM `online` WHERE `time` > ? ORDER BY `time` DESC LIMIT 6",[time() - 360])->fetchAll(PDO::FETCH_BOTH);
	        foreach ($sql as $online): ?>
			<div class="linskso">
	            <?php echo $online['bote']==1?'<i class="fas fa-user-secret" style="margin-right:3px;"></i>':'<i class="fad fa-user-alt" style="margin-right:3px;"></i>'?> <span style="cursor: not-allowed;color:<?php echo $online['color'];?>;font-weight: 700;text-shadow: 0 0 4px <?php echo $online['color'];?>;"> Гость #<?php echo $online['id'];?>
	    	</div>
		<?php endforeach; ?>
		<a href="/online/" class="prrco2 linkr" style="border-bottom: 0;">Посмотреть все</a>
		</div>
	<?php endif; 
}else{
	exit('NO2');
}
?>