affected_rows > 0) : $rightsLogString .= "DELETED_RIGHTS=YES"; else : $rightsLogString .= "DELETED_RIGHTS=NO"; endif; // Insert new rigths if (is_array($emp_csc_access)) : $emp_csc_access_len = count($emp_csc_access); if ($emp_csc_access_len > 0) : for ($i = 0; $i < $emp_csc_access_len; $i++) : $res = insertStmt("employeecostcenter", array("emp_id", $emp_id_act, "csc_id", $emp_csc_access[$i])); if ($db->affected_rows > 0) : $rightsLogString .= "|" . $emp_id_act . "_" . $emp_csc_access[$i]; endif; endfor; endif; endif; TA("C"); TA("E"); // Write logdata into log database // writeToLogDB("115",$hq_id,"",$usr_id,"","","",$rightsLogString,"","",$emp_id_act); $statusMessage = getLngt("Die Rechte wurden gesetzt!"); endif; endif; // Get associative array of all costcenters of the customer except root costcenter ($retArray[$row[csc_id]]= csc_name) $cscVector = getColVectorFromDB2ArrayByClause("costcenter AS csc", "csc.csc_name", "csc.cs_id = '" . $customerId . "' AND (NOT ISNULL(csc.csc_pre_id)) AND csc.csc_pre_id != ''", "csc.csc_id", "csc.csc_name", ""); $cscVectorKeys = array_keys($cscVector); $cscVectorKeysLen = count($cscVectorKeys); // Get associative array of costcenters of the current employee LOGGED IN having access to $empCscVector = getColVectorFromDB2ArrayByClause("employeecostcenter AS empcsc", "empcsc.csc_id", "empcsc.emp_id = '" . $emp_id . "'", "", "", ""); // Get associative array of costcenters of the current employee TO BE MODIFIED having access to $empActCscVector = getColVectorFromDB2ArrayByClause("employeecostcenter AS empcsc", "empcsc.csc_id", "empcsc.emp_id = '" . $emp_id_act . "'", "", "", ""); // Create csc-vector $output = ""; $output .= ""; $output .= ""; // Left top corner $output .= ""; for ($j = 0; $j < $cscVectorKeysLen; $j++) : $cscId = $cscVectorKeys[$j]; $cscName = $cscVector[$cscId]; $output .= ""; $output .= ""; $output .= ""; $output .= ""; endfor; $output .= "
" . defineButtonType10(getLngt("Zuweisen"), "action_set_csc_access", "finishPage('setCscAccess');", "100", "left") . "
" . getLngt($cscName) . ""; $tmpChecked = ""; if (in_array($cscId, $empActCscVector)) : $tmpChecked = "checked"; endif; $tmpDisabled = "disabled"; if ($emp_id == $empIdRootAdmin || in_array($cscId, $empCscVector)) : $tmpDisabled = ""; endif; $output .= ""; $output .= "
"; ?> <?php echo $pageTitel ?>