array('id' => 3, 'value' => 'low', 'text' => $hesklang['low'], 'formatted' => $hesklang['low']), 2 => array('id' => 2, 'value' => 'medium', 'text' => $hesklang['medium'], 'formatted' => $hesklang['medium']), 1 => array('id' => 1, 'value' => 'high', 'text' => $hesklang['high'], 'formatted' => $hesklang['high']), 0 => array('id' => 0, 'value' => 'critical', 'text' => $hesklang['critical'], 'formatted' => $hesklang['critical']), ); /* What should we do? */ if ( $action = hesk_REQUEST('a') ) { if ( defined('HESK_DEMO') ) {hesk_process_messages($hesklang['ddemo'], 'manage_categories.php', 'NOTICE');} elseif ($action == 'remove') {remove();} elseif ($action == 'order') {order_cat();} elseif ($action == 'type') {toggle_type();} elseif ($action == 'priority') {change_priority();} elseif ($action == 'due-date') {change_default_due_date();} } /* Print header */ require_once(HESK_PATH . 'inc/header.inc.php'); /* Print main manage users page */ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); /* This will handle error, success and notice messages */ if (!hesk_SESSION('error')) { hesk_handle_messages(); } ?>

$mycat) { $j++; $table_row = ''; if (isset($_SESSION['selcat2']) && $mycat['id'] == $_SESSION['selcat2']) { $table_row = 'class="ticket-new"'; unset($_SESSION['selcat2']); } else { $color = $i ? 'admin_white' : 'admin_gray'; } $tmp = $i ? 'White' : 'Blue'; $style = 'class="option'.$tmp.'OFF" onmouseover="this.className=\'option'.$tmp.'ON\'" onmouseout="this.className=\'option'.$tmp.'OFF\'"'; $i = $i ? 0 : 1; /* Number of tickets and graph width */ $all = isset($tickets_all[$mycat['id']]) ? $tickets_all[$mycat['id']] : 0; $width_all = 0; if ($tickets_total && $all) { $width_all = round(($all / $tickets_total) * 100); } $options .= ' data-category-id="" data-autoassign-enabled="" data-autoassign-config="">
' . $hesklang['cpri'] . ''; ?>
(%)
()
data-action="generate-link" data-link=""> 1) { if ($j == 1) { ?> 0) { //-- $j - 2 because $j is 1-indexed and the first category can't be deleted $modal_body .= '

'. '
'.sprintf($hesklang['select_new_category'], $all).'
'. ''; } $modal_id = hesk_generate_delete_modal($hesklang['confirm_deletion'], $modal_body, 'manage_categories.php?a=remove&catid='. $mycat['id'] .'&token='. hesk_token_echo(0).'&targetCategory=1'); ?>