Esempio n. 1
0
 public static function recivenews($list = array())
 {
     global $infra_session_time;
     if (!$infra_session_time) {
         $infra_session_time = 1;
     }
     $data = array('time' => $infra_session_time, 'list' => Load::json_encode($list));
     global $infra_session_lasttime;
     $infra_session_lasttime = true;
     //Метка что вызов из php
     $oldPOST = $_POST;
     $oldREQ = $_REQUEST;
     $_POST = $data;
     $_REQUEST = $data;
     $src = '-session/sync.php';
     Load::unload($src);
     $ans = Load::loadJSON($src);
     if (isset($ans['time'])) {
         $infra_session_time = $ans['time'];
     } else {
         $infra_session_time = null;
     }
     $_POST = $oldPOST;
     $_REQUEST = $oldREQ;
     return $ans;
 }