diff --git a/admin/manage_categories.php b/admin/manage_categories.php index 9b8a9dc0..aaf9df54 100644 --- a/admin/manage_categories.php +++ b/admin/manage_categories.php @@ -37,6 +37,7 @@ define('PAGE_TITLE', 'ADMIN_CATEGORIES'); require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/admin_functions.inc.php'); +require(HESK_PATH . 'inc/mail_functions.inc.php'); hesk_load_database_functions(); hesk_session_start(); @@ -49,9 +50,9 @@ hesk_checkPermission('can_man_cat'); // Possible priorities $priorities = array( 3 => array('value' => 3, 'text' => $hesklang['low'], 'formatted' => $hesklang['low']), - 2 => array('value' => 2, 'text' => $hesklang['medium'], 'formatted' => '' . $hesklang['medium'] . ''), - 1 => array('value' => 1, 'text' => $hesklang['high'], 'formatted' => '' . $hesklang['high'] . ''), - 0 => array('value' => 0, 'text' => $hesklang['critical'], 'formatted' => '' . $hesklang['critical'] . ''), + 2 => array('value' => 2, 'text' => $hesklang['medium'], 'formatted' => '' . $hesklang['medium'] . ''), + 1 => array('value' => 1, 'text' => $hesklang['high'], 'formatted' => '' . $hesklang['high'] . ''), + 0 => array('value' => 0, 'text' => $hesklang['critical'], 'formatted' => '' . $hesklang['critical'] . ''), ); /* What should we do? */ @@ -106,221 +107,232 @@ while ($mycat = hesk_dbFetchAssoc($res)) { $options .= '>' . $mycat['name'] . ''; } ?> -
-
-
-
+
+
+
+

+

+
+
-
-
-
-

- ()

- -
- - data-error="" - required> -
-
+
+
+ +
+

+ ()

+ +
+ + data-error="" + required> +
-
- - -
-

+
+
+ + +
+ -
-
- -
- -
+
+
+ +
+
-
- -
- -
+
+
+ +
+
-
- +
+
+ -
- -
-
-
- +
- + } ?> />
+ +
+
-
- - - -
- -
+
+
+ + + +
+
-
-
-
+
+
+

+

+
+
-
- +
+ + + + + + + + + + + + + + -
- - - - - - - - - - - - ' + $usage = array( + 0 => '', - 1 => '', - 2 => ' ' - ); - - while ($mycat = hesk_dbFetchAssoc($res)) { - $j++; - - if (isset($_SESSION['selcat2']) && $mycat['id'] == $_SESSION['selcat2']) { - $color = 'admin_green'; - unset($_SESSION['selcat2']); - } else { - $color = $i ? 'admin_white' : 'admin_gray'; - } + 1 => '', + 2 => ' ' + ); + + while ($mycat = hesk_dbFetchAssoc($res)) { + $j++; + + if (isset($_SESSION['selcat2']) && $mycat['id'] == $_SESSION['selcat2']) { + $color = 'admin_green'; + unset($_SESSION['selcat2']); + } else { + $color = $i ? 'admin_white' : 'admin_gray'; + } - $tmp = $i ? 'White' : 'Blue'; - $style = ''; - if ($mycat['color'] == null) { - $style .= 'color: black; border: solid 1px #000'; - } else { - $style .= 'background: ' . $mycat['color']; - } - $i = $i ? 0 : 1; + $tmp = $i ? 'White' : 'Blue'; + $style = ''; + if ($mycat['color'] == null) { + $style .= 'color: black; border: solid 1px #000'; + } else { + $style .= 'background: ' . $mycat['color']; + } + $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); - } + /* 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); + } - /* Deleting category with ID 1 (default category) is not allowed */ - if ($mycat['id'] == 1) { - $remove_code = ' '; - } else { - $remove_code = ' '; - } + /* Deleting category with ID 1 (default category) is not allowed */ + if ($mycat['id'] == 1) { + $remove_code = ' '; + } else { + $remove_code = ' '; + } - /* Is category private or public? */ - if ($mycat['type']) { - $type_code = ''; - } else { - $type_code = ''; - } + /* Is category private or public? */ + if ($mycat['type']) { + $type_code = ''; + } else { + $type_code = ''; + } - /* Is auto assign enabled? */ - if ($hesk_settings['autoassign']) { - if ($mycat['autoassign']) { - $autoassign_code = ''; - } else { - $autoassign_code = ''; - } + /* Is auto assign enabled? */ + if ($hesk_settings['autoassign']) { + if ($mycat['autoassign']) { + $autoassign_code = ''; } else { - $autoassign_code = ''; + $autoassign_code = ''; } + } else { + $autoassign_code = ''; + } - echo ' + echo ' @@ -342,31 +354,30 @@ while ($mycat = hesk_dbFetchAssoc($res)) { ' . $autoassign_code . ' ' . $type_code . ' '; - if ($orderBy != 'name' && $num > 1) { - if ($j == 1) { - echo ' '; - } elseif ($j == $num) { - echo ''; - } else { - echo ' + if ($orderBy != 'name' && $num > 1) { + if ($j == 1) { + echo ' '; + } elseif ($j == $num) { + echo ''; + } else { + echo '   '; - } } - echo ''; - echo $remove_code . ' + } + echo ''; + echo $remove_code . ' '; - } // End while + } // End while - ?> -
-
+ ?> +
-
+