// delete all old datasets from the etchat_useronline table (session table)
$this->dbObj->sqlSet("DELETE FROM {$this->_prefix}etchat_useronline WHERE etchat_onlinetimestamp < ".(date('U')-(((int)$_REQUEST['reloadsequenz']/1000)*4)));
// Get all Session from the etchat_useronline with all user sessions
* Send a JSON Message at chat.js, and close db connect
*
* @param array $feld Dataset from etchat_useronline Tab
* @param array $roomarray dataset from etchat_rooms Tab contains just all empty room.
* @uses RoomAllowed
* @uses RoomAllowed::$room_status if the room is open/closed/pw-protected
* @return void
*/
private function makeJsonOutput($feld,$roomarray){
// creating the JSON output vor userOnline
echo"{ \"userOnline\" : [\n";
// turn for creating every user data
for ($a=0;$a < count($feld);$a++){
// strikethrough the user name if this user ist blocked by you
if (is_array ($_SESSION['etchat_v3_block_all']) && in_array($feld[$a][3],$_SESSION['etchat_v3_block_all']))$feld[$a][0]="<strike>".$feld[$a][0]."</strike>";
if (is_array ($_SESSION['etchat_v3_block_priv']) && in_array($feld[$a][3],$_SESSION['etchat_v3_block_priv']))$feld[$a][0]="<strike>".$feld[$a][0]."</strike>";
// who ist allowed to visit this room
$room_allowed = new RoomAllowed($feld[$a][6],$feld[$a][2]);
// Put the chat status in yourSession
if ($_SESSION['etchat_v3_user_id']==$feld[$a][3])$_SESSION['etchat_v3_userstatus'] = $feld[$a][8];