$bytes = substr($_SERVER["HTTP_RANGE"], $p + 1); $p = strpos($bytes, "-"); if ($p !== false) { $cur_pos = intval(substr($bytes, 0, $p)); } } include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; if (CModule::IncludeModule("statistic")) { if ($cur_pos <= 0) { if (strlen($event1) <= 0 && strlen($event2) <= 0) { $event1 = "download"; $event2 = $file; } $e = $event1 . "/" . $event2 . "/" . $event3; if (!in_array($e, $_SESSION["DOWNLOAD_EVENTS"])) { $w = CStatEvent::GetByEvents($event1, $event2); $wr = $w->Fetch(); $z = CStatEvent::GetEventsByGuest($_SESSION["SESS_GUEST_ID"], $wr["EVENT_ID"], $event3, $DOWNLOAD_EVENT_INTERVAL); if (!($zr = $z->Fetch())) { CStatistic::Set_Event($event1, $event2, $event3); $_SESSION["DOWNLOAD_EVENTS"][] = $e; } } } } ob_end_clean(); session_write_close(); while (list($key, $value) = each($arrHOSTS)) { $max_weight += intval($key); } mt_srand((double) microtime() * 1000000);