$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int) $id . '"'); $category_edit_data = (include_once dirname(__FILE__) . '/lib/formfields/admin/tickets/formfield.category_edit.php'); $category_edit_form = htmlform::genHTMLForm($category_edit_data); $title = $category_edit_data['category_edit']['title']; $image = $category_edit_data['category_edit']['image']; eval("echo \"" . getTemplate("tickets/tickets_editcategory") . "\";"); } } elseif ($action == 'deletecategory' && $id != 0) { if (isset($_POST['send']) && $_POST['send'] == 'send') { if (ticket::deleteCategory($db, $id) == false) { standard_error('categoryhastickets'); } $log->logAction(ADM_ACTION, LOG_INFO, "deleted ticket-category #" . $id); redirectTo($filename, array('page' => $page, 's' => $s)); } else { $name = ticket::getCategoryName($db, $id); ask_yesno('ticket_reallydeletecat', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $name); } } } elseif ($page == 'archive' && $userinfo['customers'] != '0') { if ($action == '') { $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::archive"); if (isset($_POST['send']) && $_POST['send'] == 'send') { $priority = array(); $categories = array(); $subject = validate($_POST['subject'], 'subject'); $priority[0] = isset($_POST['priority1']) ? $_POST['priority1'] : ''; $priority[1] = isset($_POST['priority2']) ? $_POST['priority2'] : ''; $priority[2] = isset($_POST['priority3']) ? $_POST['priority3'] : ''; $fromdate = validate($_POST['fromdate'], 'fromdate'); $todate = validate($_POST['todate'], 'todate');