<?php

/*
* @package BANANA WARS
* @copyright: (c) 2017 G.P. aka Mvcshka (mvcshka@yandex.ru)
* @license: GNU General Public License version 2; see LICENSE.txt
* @files: /process/chat_online.php
*
*/

ob_start();
session_start();
header('Content-type: application/json');
Header("Content-Type: text/html;charset=UTF-8");
if($_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest' ) { exit();}
include($_SERVER['DOCUMENT_ROOT'].'/lib/connect.php');
include($_SERVER['DOCUMENT_ROOT'].'/lib/func.php');
//include($_SERVER['DOCUMENT_ROOT'].'/lib/libmail.php');

$s = $mysql->query("SELECT * FROM db_chat_online");
while($w = $s->fetch())
{
	$online .= '<div class="messege">
 <span class="login orange" onclick="treatment(\''.$w['Login'].'\')">'.$w['Login'].'</span>
 </div>';
}

echo json_encode($result = array("online" => $online));
