get($careerId); if (empty($careerInfo)) { api_not_allowed(true); } // setting breadcrumbs $interbreadcrumb[] = array( 'url' => 'index.php', 'name' => get_lang('PlatformAdmin'), ); $interbreadcrumb[] = array( 'url' => 'career_dashboard.php', 'name' => get_lang('CareersAndPromotions'), ); $interbreadcrumb[] = array( 'url' => 'careers.php', 'name' => get_lang('Careers'), ); $action = isset($_GET['action']) ? $_GET['action'] : null; $check = Security::check_token('request'); $token = Security::get_token(); if ($action == 'add') { $interbreadcrumb[] = array('url' => 'careers.php', 'name' => get_lang('Careers')); $toolName = get_lang('Add'); } elseif ($action == 'edit') { $interbreadcrumb[] = array('url' => 'careers.php', 'name' => get_lang('Careers')); $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit')); $toolName = get_lang('Edit'); } else { $toolName = get_lang('Careers'); } $extraFieldValue = new ExtraFieldValue('career'); $item = $extraFieldValue->get_values_by_handler_and_field_variable( $careerId, 'career_diagram', false, false, false ); if (!empty($item) && isset($item['value']) && !empty($item['value'])) { $graph = unserialize($item['value']); $tpl = new Template(get_lang('Diagram')); $html = Display::page_subheader2($careerInfo['name']); $html .= Career::renderDiagram($careerInfo, $graph); $tpl->assign('content', $html); $tpl->display_one_col_template(); }