Beispiel #1
0
     $navResult->NavRecordCount = $item_count;
     $navResult->NavPageCount = $page_count;
     $navResult->NavPageNomer = $page;
     ob_start();
     $APPLICATION->IncludeComponent('bitrix:system.pagenavigation', 'js', array('NAV_RESULT' => $navResult, 'HANDLER' => 'window.BXTMREPORT.Page'));
     $res['NAV'] = ob_get_contents();
     ob_end_clean();
     break;
 case 'admin_data_settings':
     $bReturnRes = true;
     $arNeededSettings = array('UF_TIMEMAN', 'UF_TM_MAX_START', 'UF_TM_MIN_FINISH', 'UF_TM_MIN_DURATION', 'UF_TM_REPORT_REQ', 'UF_TM_FREE', 'UF_TM_ALLOWED_DELTA');
     if (isset($_REQUEST['ID'])) {
         $ID = $_REQUEST['ID'];
         $source = $_REQUEST['source'];
         if ($source == 'department') {
             if (!CTimeMan::IsAdmin()) {
                 $arSubordination = CIntranetUtils::GetSubordinateDepartments($USER->GetID(), true);
                 if (!in_array($ID, $arSubordination)) {
                     echo "{error: 'access denied', type: 'fatal'}";
                     die;
                 }
             }
         } else {
             $arAccessUsers = CTimeMan::GetAccess();
             $bCanEditAll = in_array('*', $arAccessUsers['WRITE']);
             $bCanReadAll = in_array('*', $arAccessUsers['READ']);
             if (!$bCanReadAll && !in_array($ID, $arAccessUsers["READ"])) {
                 echo "{error: 'access denied', type: 'fatal'}";
                 die;
             }
         }