if (!$user->isuser($_REQUEST['device'])) { header("location: newuser.php?device=".$_REQUEST['device']); exit(); } $con= new connection(); $con->execute("update users set time='" . time() . "' where iduser='******'"); $chat= new chat(); $chat->closedeadrooms(); if(!$chatid=$_GET['idchat']) { if ($chatid=$chat->findchat($user->id)) { //echo "found chat"; $chat->joinchat($chatid,$user->id); }else{ $chatid=$chat->createchat($user->id); //echo "created chat"; } //echo $chatid; } $count=$user->getusercount(); ?> <meta name = "viewport" content = "width=device-width, minimum-scale=1, maximum-scale=1 ">