INSERT INTO `troubleticket_type` (`id`, `name`, `description`, `myorder`, `enabled`, `enabled_public`, `is_billing_type`, `target_dept`, `target_staff`) VALUES (-1, /*T*/'All ticket types'/*~T*/, '', 0, 1, 1, 0, 0, 0);
INSERT INTO `troubleticket_type` (`id`, `name`, `description`, `myorder`, `enabled`, `enabled_public`, `is_billing_type`, `target_dept`, `target_staff`) VALUES (1, /*T*/'Software'/*~T*/, '', 0, 1, 1, 0, 0, 0);
INSERT INTO `troubleticket_type` (`id`, `name`, `description`, `myorder`, `enabled`, `enabled_public`, `is_billing_type`, `target_dept`, `target_staff`) VALUES (2, /*T*/'Billing Issues'/*~T*/, '', 1, 1, 1, 1, 0, 0);
INSERT INTO `troubleticket_type` (`id`, `name`, `description`, `myorder`, `enabled`, `enabled_public`, `is_billing_type`, `target_dept`, `target_staff`) VALUES (3, /*T*/'Control Panel'/*~T*/, '', 2, 1, 1, 0, 0, 0);
INSERT INTO `troubleticket_type` (`id`, `name`, `description`, `myorder`, `enabled`, `enabled_public`, `is_billing_type`, `target_dept`, `target_staff`) VALUES (4, /*T*/'E-mail Problems'/*~T*/, '', 3, 1, 1, 0, 0, 0);
INSERT INTO `troubleticket_type` (`id`, `name`, `description`, `myorder`, `enabled`, `enabled_public`, `is_billing_type`, `target_dept`, `target_staff`) VALUES (5, /*T*/'Upgrades'/*~T*/, '', 4, 1, 1, 0, 0, 0);
INSERT INTO `troubleticket_type` (`id`, `name`, `description`, `myorder`, `enabled`, `enabled_public`, `is_billing_type`, `target_dept`, `target_staff`) VALUES (6, /*T*/'Other'/*~T*/, '', 5, 1, 1, 0, 0, 0);

INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (-1, 1, 'support_view', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (-1, 1, 'support_submit_ticket', 0);

INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (1, 1, 'support_reopen_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (1, 1, 'support_submit_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (1, 1, 'support_view', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (1, 1, 'support_view_eventlog', 0);

INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_close_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_delete_trouble_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_assign_tickets_from_unassigned', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_edit_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_reopen_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_submit_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_view', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_view_all_closed_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_view_eventlog', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_view_assigned_department_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_reassign_tickets_from_inside_dept', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_reassign_tickets_to_own_depts', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (3, 1, 'support_reassign_tickets_to_other_depts', 0);

INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_view', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_view_assigned_department_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_view_all_closed_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_reopen_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_edit_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_delete_trouble_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_reassign_tickets_from_inside_dept', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_reassign_tickets_to_own_depts', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_reassign_tickets_to_other_depts', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (4, 1, 'support_close_tickets', 0);

INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_view', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_view_assigned_department_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_view_assigned_otherdepartment_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_reply_any_open_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_view_all_closed_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_submit_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_reopen_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_edit_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_delete_trouble_ticket', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_assign_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_assign_tickets_from_unassigned', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_reassign_tickets_from_inside_dept', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_reassign_tickets_from_other_depts', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_reassign_tickets_to_own_depts', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_reassign_tickets_to_other_depts', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_reassign_tickets_from_others_to_others', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_close_tickets', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_view_rates', 0);
INSERT INTO `permissions` (`subject_id`, `is_group`, `permission`, `target_id`) VALUES (5, 1, 'support_view_eventlog', 0);

INSERT INTO `departments` (`id`, `name`, `is_generaldep`, `lead_id`, `assign_to_lead`, `notify_lead`, `sendclosed`, `sendfeedback`, `sendresolution`, `notification_list`) VALUES (1, 'General', 1, 100, 0, 1, 1, 1, 1, '');
INSERT INTO `departments` (`id`, `name`, `is_generaldep`, `lead_id`, `assign_to_lead`, `notify_lead`, `sendclosed`, `sendfeedback`, `sendresolution`, `notification_list`) VALUES (2, 'Billing', 0, 100, 0, 1, 1, 1, 1, '');

INSERT INTO `departments_members` (`department_id`, `member_id`, `is_group`) VALUES (1, 100, 0);
INSERT INTO `departments_members` (`department_id`, `member_id`, `is_group`) VALUES (1, 2, 1);
INSERT INTO `departments_members` (`department_id`, `member_id`, `is_group`) VALUES (1, 3, 1);
INSERT INTO `departments_members` (`department_id`, `member_id`, `is_group`) VALUES (1, 4, 1);
INSERT INTO `departments_members` (`department_id`, `member_id`, `is_group`) VALUES (1, 5, 1);
INSERT INTO `departments_members` (`department_id`, `member_id`, `is_group`) VALUES (2, 100, 0);
INSERT INTO `departments_members` (`department_id`, `member_id`, `is_group`) VALUES (2, 4, 1);

INSERT INTO `routingrules` (`id`, `name`, `order`, `emails`, `user_type`, `autoresponder_template`, `openticket`, `target_type`, `target_priority`, `target_dept`, `target_staff`, `copy_destinataries`, `routing_type`, `filter_out`, `pop3_hostname`, `pop3_port`, `pop3_username`, `pop3_password`, `pop3_delete_emails`) VALUES(1, 'Default autoresponder for E-mails from registered users', 0, '*', 1, 1, 1, 6, 2, -1, -1, '', 1, 'Subject: ***SPAM***\r\nX-Spam-Status: Yes', '', '110', '', '', 0);
INSERT INTO `routingrules` (`id`, `name`, `order`, `emails`, `user_type`, `autoresponder_template`, `openticket`, `target_type`, `target_priority`, `target_dept`, `target_staff`, `copy_destinataries`, `routing_type`, `filter_out`, `pop3_hostname`, `pop3_port`, `pop3_username`, `pop3_password`, `pop3_delete_emails`) VALUES (2, 'Default autoresponder for E-mails from unregistered users', 1, '*', 2, 2, 0, 0, 0, 0, 0, '', 1, 'Subject: ***SPAM***\r\nX-Spam-Status: Yes', '', 110, '', '', 0);

INSERT INTO `autoresponders` (`id`, `name`, `subject`, `contents`, `contents_html`) VALUES (1, 'Default', 'A new Support ticket has been added', '[CLIENTNAME],\r\n\r\nThank you for submitting a ticket with [COMPANYNAME].  Your request has been assigned the ticket number [TICKETNUMBER].  A technician will respond to your request shortly.\r\n\r\nMember Center:\r\n[CLIENTAPPLICATIONURL]\r\n\r\nThank you,\r\n[COMPANYNAME]', '[CLIENTNAME],<br />\r\n<br />\r\nThank you for submitting a ticket with [COMPANYNAME].  Your request has been assigned the ticket number [TICKETNUMBER].  A technician will respond to your request shortly.<br />\r\n<br />\r\nMember Center:<br />\r\n[CLIENTAPPLICATIONURL]<br />\r\n<br />\r\nThank you,<br />\r\n[COMPANYNAME]');
INSERT INTO `autoresponders` (`id`, `name`, `subject`, `contents`, `contents_html`) VALUES (2, 'Bounce back', 'Support request failure', 'Your support E-mail cannot be processed at this time because our support center did not recognize your E-mail as one belonging to one of our customers.\r\nIf you need assistance please E-mail using your E-mail of record or submit a support ticket.\r\n\r\nSupport Team', 'Your support E-mail cannot be processed at this time because our support center did not recognize your E-mail as one belonging to one of our customers.<br />\r\nIf you need assistance please E-mail using your E-mail of record or submit a support ticket.<br />\r\n<br />\r\nSupport Team');
