static function Listen() { OperatorRequest::Process(); if (!SERVERSETUP && !LOGIN && Server::$Operators[CALLER_SYSTEM_ID]->Status == USER_STATUS_OFFLINE) { return; } Server::$Response->XML = "<listen disabled=\"" . base64_encode(Server::IsAvailable(false) ? "0" : "1") . "\" h=\"<!--gl_all-->\" " . (isset($_POST[POST_INTERN_XMLCLIP_HASH_EXECUTION_TIME]) ? "ex_time=\"<!--execution_time-->\"" : "") . ">\r\n"; Server::$Response->Typing = ""; if (Server::$Response->Login != null) { Server::$Response->XML .= Server::$Response->Login; } OperatorRequest::Build(); processPosts(); if (($hash = substr(md5(Server::$Response->Typing), 0, 5)) != @$_POST["p_gl_t"] && strlen(Server::$Response->Typing) > 0) { Server::$Response->XML .= "<gl_typ h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Typing . "</gl_typ>\r\n"; } Server::$Response->XML .= Server::$Response->Events . "\r\n"; if (($hash = substr(md5(Server::$Response->Exceptions), 0, 5)) != @$_POST["p_gl_e"] && strlen(Server::$Response->Exceptions) > 0) { Server::$Response->XML .= "<gl_e h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Exceptions . "</gl_e>\r\n"; } if (($hash = substr(md5(Server::$Response->Internals), 0, 5)) != @$_POST["p_int_r"] && strlen(Server::$Response->Internals) > 0) { Server::$Response->XML .= "<int_r h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Internals . "</int_r>\r\n"; } if (($hash = substr(md5(Server::$Response->Groups), 0, 5)) != @$_POST["p_int_d"] && strlen(Server::$Response->Groups) > 0) { Server::$Response->XML .= "<int_d h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Groups . "</int_d>\r\n"; } if (($hash = substr(md5(Server::$Response->Actions), 0, 5)) != @$_POST["p_int_ev"]) { Server::$Response->XML .= "<int_ac h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Actions . "</int_ac>\r\n"; } if (($hash = substr(md5(Server::$Response->InternalVcards), 0, 5)) != @$_POST["p_int_v"]) { Server::$Response->XML .= "<int_v h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->InternalVcards . "</int_v>\r\n"; } if (($hash = substr(md5(Server::$Response->InternalWebcamPictures), 0, 5)) != @$_POST["p_int_wp"]) { Server::$Response->XML .= "<int_wp h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->InternalWebcamPictures . "</int_wp>\r\n"; } if (!empty(Server::$Response->Tracking) && ($hash = substr(md5(Server::$Response->Tracking), 0, 5)) != @$_POST["p_ext_u"]) { Server::$Response->XML .= "<ext_u h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Tracking . "</ext_u>\r\n"; } if (($hash = substr(md5(Server::$Response->Forwards), 0, 5)) != @$_POST["p_ext_f"]) { Server::$Response->XML .= "<ext_f h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Forwards . "</ext_f>\r\n"; } if (($hash = substr(md5(Server::$Response->ChatVouchers), 0, 5)) != @$_POST["p_ext_ct"]) { Server::$Response->XML .= "<ext_ct h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->ChatVouchers . "</ext_ct>\r\n"; } if (Server::$Response->Archive != null) { Server::$Response->XML .= "<ext_c>\r\n" . Server::$Response->Archive . "</ext_c>\r\n"; } if (Server::$Response->Resources != null) { Server::$Response->XML .= "<ext_res>\r\n" . Server::$Response->Resources . "</ext_res>\r\n"; } if (Server::$Response->Feedbacks != null) { Server::$Response->XML .= "<ext_fb>\r\n" . Server::$Response->Feedbacks . "</ext_fb>\r\n"; } if (Server::$Response->Filters != null) { Server::$Response->XML .= "<ext_b h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Filters . "</ext_b>\r\n"; } if (!empty(Server::$Response->Reports)) { Server::$Response->XML .= Server::$Response->Reports; } Server::$Response->XML .= Server::$Response->Messages . "\r\n"; if (strlen(Server::$Response->Authentications) > 0) { Server::$Response->XML .= "<gl_auths>\r\n" . Server::$Response->Authentications . "\r\n</gl_auths>\r\n"; } if (strlen(Server::$Response->Posts) > 0) { Server::$Response->XML .= "<usr_p>\r\n" . Server::$Response->Posts . "</usr_p>\r\n"; } if (isset($_POST[POST_INTERN_ACCESSTEST])) { Server::$Response->XML .= "<permission>" . base64_encode(OperatorRequest::GetPermissions()) . "</permission>"; } if (SERVERSETUP || LOGIN || Server::$Operators[CALLER_SYSTEM_ID]->LastActive <= @filemtime(FILE_CONFIG)) { Server::$Response->XML .= OperatorRequest::GetConfig(); } Server::$Response->XML .= "</listen>"; }