{ $GROUP_DEFAULT_RIGHT = COption::GetOptionString($module_id, "GROUP_DEFAULT_RIGHT", "D"); $GROUP_DEFAULT_TASK = CTask::GetIdByLetter($GROUP_DEFAULT_RIGHT,$module_id,'module'); if ($GROUP_DEFAULT_TASK) COption::SetOptionString($module_id, "GROUP_DEFAULT_TASK", $GROUP_DEFAULT_TASK); } ?> <tr> <td width="50%"><b><?php echo GetMessage("MAIN_BY_DEFAULT"); ?> </b></td> <td width="50%"> <script>var arSubordTasks = [];</script> <? $arTasksInModule = CTask::GetTasksInModules(true,$module_id,'module'); $nID = COperation::GetIDByName('edit_subordinate_users'); $arTasks = $arTasksInModule['main']; echo SelectBoxFromArray("GROUP_DEFAULT_TASK", $arTasks, htmlspecialcharsbx($GROUP_DEFAULT_TASK)); $show_subord = false; $arTaskIds = $arTasks['reference_id']; $arSubordTasks = Array(); $l = count($arTaskIds); for ($i=0;$i<$l;$i++) { $arOpInTask = CTask::GetOperations($arTaskIds[$i]); if (in_array($nID,$arOpInTask)) { $arSubordTasks[] = $arTaskIds[$i]; ?><script>
<?php if (intval($ID) != 1 || $COPY_ID > 0 || COption::GetOptionString("main", "controller_member", "N") == "Y" && COption::GetOptionString("main", "~controller_limited_admin", "N") == "Y") { ?> <?php $tabControl->BeginNextTab(); ?> <tr> <td width="40%"><?php echo GetMessage("KERNEL"); ?> </td> <td width="60%"> <script>var arSubordTasks = [];</script> <?php $arTasksModules = CTask::GetTasksInModules(true, false, 'module'); $arTasks = CGroup::GetTasks($ID, true); $nID = COperation::GetIDByName('edit_subordinate_users'); $nID2 = COperation::GetIDByName('view_subordinate_users'); if ($strError != '') { $v = $_REQUEST["TASKS_main"]; } else { $v = isset($arTasks['main']) ? $arTasks['main'] : false; } echo SelectBoxFromArray("TASKS_main", $arTasksModules['main'], $v, GetMessage("DEFAULT")); $show_subord = false; $arTaskIds = $arTasksModules['main']['reference_id']; $l = count($arTaskIds); for ($i = 0; $i < $l; $i++) { $arOpInTask = CTask::GetOperations($arTaskIds[$i]); if (in_array($nID, $arOpInTask) || in_array($nID2, $arOpInTask)) {