diff --git a/.env b/.env
index 3c457365c..4a8b4e0e4 100644
--- a/.env
+++ b/.env
@@ -1,9 +1,9 @@
APP_ENV=local
APP_DEBUG=false
APP_KEY=SomeRandomString
-DB_HOST=
-DB_DATABASE=
-DB_USERNAME=
+DB_HOST=localhost
+DB_DATABASE=faveocombine
+DB_USERNAME=root
DB_PASSWORD=
CACHE_DRIVER=file
SESSION_DRIVER=file
@@ -13,5 +13,5 @@ MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
-DB_TYPE=
+DB_TYPE=mysql
DB_PORT=
diff --git a/DB/demodatabase.sql b/DB/demodatabase.sql
index 2918a5569..a7c106303 100644
--- a/DB/demodatabase.sql
+++ b/DB/demodatabase.sql
@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
--- Generation Time: Dec 29, 2015 at 11:02 AM
+-- Generation Time: Feb 18, 2016 at 08:11 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
@@ -23,39 +23,648 @@ SET time_zone = "+00:00";
-- --------------------------------------------------------
--
--- Table structure for table `access`
+-- Table structure for table `banlist`
--
-CREATE TABLE IF NOT EXISTS `access` (
+CREATE TABLE IF NOT EXISTS `banlist` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `password_expire` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `reg_method` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `user_session` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `agent_session` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `reset_ticket_expire` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `password_reset` tinyint(1) NOT NULL,
- `bind_agent_ip` tinyint(1) NOT NULL,
- `reg_require` tinyint(1) NOT NULL,
- `quick_access` tinyint(1) NOT NULL,
+ `ban_status` tinyint(1) NOT NULL,
+ `email_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `canned_response`
+--
+
+CREATE TABLE IF NOT EXISTS `canned_response` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `user_id` int(10) unsigned NOT NULL,
+ `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `message` text COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `user_id` (`user_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `custom_forms`
+--
+
+CREATE TABLE IF NOT EXISTS `custom_forms` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `formname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `custom_form_fields`
+--
+
+CREATE TABLE IF NOT EXISTS `custom_form_fields` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `forms_id` int(11) NOT NULL,
+ `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `required` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `date_format`
+--
+
+CREATE TABLE IF NOT EXISTS `date_format` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ;
+
+--
+-- Dumping data for table `date_format`
+--
+
+INSERT INTO `date_format` (`id`, `format`) VALUES
+(1, 'dd/mm/yyyy'),
+(2, 'dd-mm-yyyy'),
+(3, 'dd.mm.yyyy'),
+(4, 'mm/dd/yyyy'),
+(5, 'mm:dd:yyyy'),
+(6, 'mm-dd-yyyy'),
+(7, 'yyyy/mm/dd'),
+(8, 'yyyy.mm.dd'),
+(9, 'yyyy-mm-dd');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `date_time_format`
+--
+
+CREATE TABLE IF NOT EXISTS `date_time_format` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ;
+
+--
+-- Dumping data for table `date_time_format`
+--
+
+INSERT INTO `date_time_format` (`id`, `format`) VALUES
+(1, 'd/m/Y H:i:s'),
+(2, 'd.m.Y H:i:s'),
+(3, 'd-m-Y H:i:s'),
+(4, 'm/d/Y H:i:s'),
+(5, 'm.d.Y H:i:s'),
+(6, 'm-d-Y H:i:s'),
+(7, 'Y/m/d H:i:s'),
+(8, 'Y.m.d H:i:s'),
+(9, 'Y-m-d H:i:s');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `department`
+--
+
+CREATE TABLE IF NOT EXISTS `department` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `sla` int(10) unsigned DEFAULT NULL,
+ `manager` int(10) unsigned DEFAULT NULL,
+ `ticket_assignment` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `outgoing_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `template_set` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `auto_ticket_response` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `auto_message_response` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `auto_response_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `recipient` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `group_access` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `department_sign` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `sla` (`sla`),
+ KEY `manager_2` (`manager`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
+
+--
+-- Dumping data for table `department`
+--
+
+INSERT INTO `department` (`id`, `name`, `type`, `sla`, `manager`, `ticket_assignment`, `outgoing_email`, `template_set`, `auto_ticket_response`, `auto_message_response`, `auto_response_email`, `recipient`, `group_access`, `department_sign`, `created_at`, `updated_at`) VALUES
+(1, 'Support', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(2, 'Sales', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(3, 'Operation', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `emails`
+--
+
+CREATE TABLE IF NOT EXISTS `emails` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `email_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `email_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `department` int(10) unsigned DEFAULT NULL,
+ `priority` int(10) unsigned DEFAULT NULL,
+ `help_topic` int(10) unsigned DEFAULT NULL,
+ `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `fetching_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `fetching_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `mailbox_protocol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `imap_config` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `folder` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `sending_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `sending_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `sending_encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `auto_response` tinyint(1) NOT NULL,
+ `fetching_status` tinyint(1) NOT NULL,
+ `move_to_folder` tinyint(1) NOT NULL,
+ `delete_email` tinyint(1) NOT NULL,
+ `do_nothing` tinyint(1) NOT NULL,
+ `sending_status` tinyint(1) NOT NULL,
+ `authentication` tinyint(1) NOT NULL,
+ `header_spoofing` tinyint(1) NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `department` (`department`,`priority`,`help_topic`),
+ KEY `department_2` (`department`,`priority`,`help_topic`),
+ KEY `priority` (`priority`),
+ KEY `help_topic` (`help_topic`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `groups`
+--
+
+CREATE TABLE IF NOT EXISTS `groups` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `group_status` tinyint(1) NOT NULL,
+ `can_create_ticket` tinyint(1) NOT NULL,
+ `can_edit_ticket` tinyint(1) NOT NULL,
+ `can_post_ticket` tinyint(1) NOT NULL,
+ `can_close_ticket` tinyint(1) NOT NULL,
+ `can_assign_ticket` tinyint(1) NOT NULL,
+ `can_transfer_ticket` tinyint(1) NOT NULL,
+ `can_delete_ticket` tinyint(1) NOT NULL,
+ `can_ban_email` tinyint(1) NOT NULL,
+ `can_manage_canned` tinyint(1) NOT NULL,
+ `can_manage_faq` tinyint(1) NOT NULL,
+ `can_view_agent_stats` tinyint(1) NOT NULL,
+ `department_access` tinyint(1) NOT NULL,
+ `admin_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
+
+--
+-- Dumping data for table `groups`
+--
+
+INSERT INTO `groups` (`id`, `name`, `group_status`, `can_create_ticket`, `can_edit_ticket`, `can_post_ticket`, `can_close_ticket`, `can_assign_ticket`, `can_transfer_ticket`, `can_delete_ticket`, `can_ban_email`, `can_manage_canned`, `can_manage_faq`, `can_view_agent_stats`, `department_access`, `admin_notes`, `created_at`, `updated_at`) VALUES
+(1, 'Group A', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(2, 'Group B', 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(3, 'Group C', 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '2016-02-18 08:41:11', '2016-02-18 08:41:11');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `group_assign_department`
+--
+
+CREATE TABLE IF NOT EXISTS `group_assign_department` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `group_id` int(10) unsigned NOT NULL,
+ `department_id` int(10) unsigned NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `group_id` (`group_id`),
+ KEY `department_id` (`department_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `help_topic`
+--
+
+CREATE TABLE IF NOT EXISTS `help_topic` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `parent_topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `custom_form` int(10) unsigned DEFAULT NULL,
+ `department` int(10) unsigned DEFAULT NULL,
+ `ticket_status` int(10) unsigned DEFAULT NULL,
+ `priority` int(10) unsigned DEFAULT NULL,
+ `sla_plan` int(10) unsigned DEFAULT NULL,
+ `thank_page` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `ticket_num_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `status` tinyint(1) NOT NULL,
+ `type` tinyint(1) NOT NULL,
+ `auto_assign` int(10) unsigned DEFAULT NULL,
+ `auto_response` tinyint(1) NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `custom_form` (`custom_form`),
+ KEY `department` (`department`),
+ KEY `ticket_status` (`ticket_status`),
+ KEY `priority` (`priority`),
+ KEY `sla_plan` (`sla_plan`),
+ KEY `auto_assign_2` (`auto_assign`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
+
+--
+-- Dumping data for table `help_topic`
+--
+
+INSERT INTO `help_topic` (`id`, `topic`, `parent_topic`, `custom_form`, `department`, `ticket_status`, `priority`, `sla_plan`, `thank_page`, `ticket_num_format`, `internal_notes`, `status`, `type`, `auto_assign`, `auto_response`, `created_at`, `updated_at`) VALUES
+(1, 'Support query', '', NULL, 1, 1, 2, 1, '', '1', '', 1, 1, NULL, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(2, 'Sales query', '', NULL, 2, 1, 2, 1, '', '1', '', 0, 1, NULL, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(3, 'Operational query', '', NULL, 3, 1, 2, 1, '', '1', '', 0, 1, NULL, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `kb_article`
+--
+
+CREATE TABLE IF NOT EXISTS `kb_article` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `description` text COLLATE utf8_unicode_ci NOT NULL,
+ `status` tinyint(1) NOT NULL,
+ `type` tinyint(1) NOT NULL,
+ `publish_time` datetime DEFAULT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `kb_article_relationship`
+--
+
+CREATE TABLE IF NOT EXISTS `kb_article_relationship` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `article_id` int(10) unsigned NOT NULL,
+ `category_id` int(10) unsigned NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `article_relationship_article_id_foreign` (`article_id`),
+ KEY `article_relationship_category_id_foreign` (`category_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `kb_category`
+--
+
+CREATE TABLE IF NOT EXISTS `kb_category` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `description` text COLLATE utf8_unicode_ci NOT NULL,
+ `status` tinyint(1) NOT NULL,
+ `parent` int(11) NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `kb_comment`
+--
+
+CREATE TABLE IF NOT EXISTS `kb_comment` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `article_id` int(10) unsigned NOT NULL,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `comment` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `status` tinyint(1) NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `comment_article_id_foreign` (`article_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `kb_pages`
+--
+
+CREATE TABLE IF NOT EXISTS `kb_pages` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `status` tinyint(1) NOT NULL,
+ `visibility` tinyint(1) NOT NULL,
+ `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `description` text COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `kb_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `kb_settings` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `pagination` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
--
--- Dumping data for table `access`
+-- Dumping data for table `kb_settings`
--
-INSERT INTO `access` (`id`, `password_expire`, `reg_method`, `user_session`, `agent_session`, `reset_ticket_expire`, `password_reset`, `bind_agent_ip`, `reg_require`, `quick_access`, `created_at`, `updated_at`) VALUES
-(1, '', '', '', '', '', 0, 0, 0, 0, '2015-12-28 22:43:03', '2015-12-28 22:43:03');
+INSERT INTO `kb_settings` (`id`, `pagination`, `created_at`, `updated_at`) VALUES
+(1, 10, '2016-02-18 08:41:12', '2016-02-18 08:41:12');
-- --------------------------------------------------------
--
--- Table structure for table `alert_notice`
+-- Table structure for table `languages`
--
-CREATE TABLE IF NOT EXISTS `alert_notice` (
+CREATE TABLE IF NOT EXISTS `languages` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ;
+
+--
+-- Dumping data for table `languages`
+--
+
+INSERT INTO `languages` (`id`, `name`, `locale`) VALUES
+(1, 'English', 'en'),
+(2, 'Italian', 'it'),
+(3, 'German', 'de'),
+(4, 'French', 'fr'),
+(5, 'Brazilian Portuguese', 'pt_BR'),
+(6, 'Dutch', 'nl'),
+(7, 'Spanish', 'es'),
+(8, 'Norwegian', 'nb_NO'),
+(9, 'Danish', 'da');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `log_notification`
+--
+
+CREATE TABLE IF NOT EXISTS `log_notification` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `log` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
+
+--
+-- Dumping data for table `log_notification`
+--
+
+INSERT INTO `log_notification` (`id`, `log`, `created_at`, `updated_at`) VALUES
+(1, 'NOT-1', '2016-02-18 08:41:11', '2016-02-18 08:41:11');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `mailbox_protocol`
+--
+
+CREATE TABLE IF NOT EXISTS `mailbox_protocol` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `value` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ;
+
+--
+-- Dumping data for table `mailbox_protocol`
+--
+
+INSERT INTO `mailbox_protocol` (`id`, `name`, `value`) VALUES
+(1, 'IMAP', '/imap'),
+(2, 'IMAP+SSL', '/imap/ssl'),
+(3, 'IMAP+TLS', '/imap/tls'),
+(4, 'IMAP+SSL/No-validate', '/imap/ssl/novalidate-cert');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `migrations`
+--
+
+CREATE TABLE IF NOT EXISTS `migrations` (
+ `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `batch` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+--
+-- Dumping data for table `migrations`
+--
+
+INSERT INTO `migrations` (`migration`, `batch`) VALUES
+('2016_02_16_140450_create_banlist_table', 1),
+('2016_02_16_140450_create_canned_response_table', 1),
+('2016_02_16_140450_create_custom_form_fields_table', 1),
+('2016_02_16_140450_create_custom_forms_table', 1),
+('2016_02_16_140450_create_date_format_table', 1),
+('2016_02_16_140450_create_date_time_format_table', 1),
+('2016_02_16_140450_create_department_table', 1),
+('2016_02_16_140450_create_emails_table', 1),
+('2016_02_16_140450_create_group_assign_department_table', 1),
+('2016_02_16_140450_create_groups_table', 1),
+('2016_02_16_140450_create_help_topic_table', 1),
+('2016_02_16_140450_create_kb_article_relationship_table', 1),
+('2016_02_16_140450_create_kb_article_table', 1),
+('2016_02_16_140450_create_kb_category_table', 1),
+('2016_02_16_140450_create_kb_comment_table', 1),
+('2016_02_16_140450_create_kb_pages_table', 1),
+('2016_02_16_140450_create_kb_settings_table', 1),
+('2016_02_16_140450_create_languages_table', 1),
+('2016_02_16_140450_create_log_notification_table', 1),
+('2016_02_16_140450_create_mailbox_protocol_table', 1),
+('2016_02_16_140450_create_organization_table', 1),
+('2016_02_16_140450_create_password_resets_table', 1),
+('2016_02_16_140450_create_plugins_table', 1),
+('2016_02_16_140450_create_send_mail_table', 1),
+('2016_02_16_140450_create_settings_alert_notice_table', 1),
+('2016_02_16_140450_create_settings_auto_response_table', 1),
+('2016_02_16_140450_create_settings_company_table', 1),
+('2016_02_16_140450_create_settings_email_table', 1),
+('2016_02_16_140450_create_settings_ratings_table', 1),
+('2016_02_16_140450_create_settings_system_table', 1),
+('2016_02_16_140450_create_settings_ticket_table', 1),
+('2016_02_16_140450_create_sla_plan_table', 1),
+('2016_02_16_140450_create_team_assign_agent_table', 1),
+('2016_02_16_140450_create_teams_table', 1),
+('2016_02_16_140450_create_template_table', 1),
+('2016_02_16_140450_create_ticket_attachment_table', 1),
+('2016_02_16_140450_create_ticket_collaborator_table', 1),
+('2016_02_16_140450_create_ticket_form_data_table', 1),
+('2016_02_16_140450_create_ticket_priority_table', 1),
+('2016_02_16_140450_create_ticket_source_table', 1),
+('2016_02_16_140450_create_ticket_status_table', 1),
+('2016_02_16_140450_create_ticket_thread_table', 1),
+('2016_02_16_140450_create_tickets_table', 1),
+('2016_02_16_140450_create_time_format_table', 1),
+('2016_02_16_140450_create_timezone_table', 1),
+('2016_02_16_140450_create_user_assign_organization_table', 1),
+('2016_02_16_140450_create_users_table', 1),
+('2016_02_16_140450_create_version_check_table', 1),
+('2016_02_16_140450_create_widgets_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_canned_response_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_department_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_emails_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_group_assign_department_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_help_topic_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_kb_article_relationship_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_kb_comment_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_organization_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_settings_system_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_team_assign_agent_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_teams_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_ticket_attachment_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_ticket_collaborator_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_ticket_form_data_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_ticket_thread_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_tickets_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_user_assign_organization_table', 1),
+('2016_02_16_140454_add_foreign_keys_to_users_table', 1);
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `organization`
+--
+
+CREATE TABLE IF NOT EXISTS `organization` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `head` int(10) unsigned DEFAULT NULL,
+ `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `head` (`head`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `password_resets`
+--
+
+CREATE TABLE IF NOT EXISTS `password_resets` (
+ `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `created_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ KEY `password_resets_email_index` (`email`),
+ KEY `password_resets_token_index` (`token`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `plugins`
+--
+
+CREATE TABLE IF NOT EXISTS `plugins` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `status` int(11) NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `send_mail`
+--
+
+CREATE TABLE IF NOT EXISTS `send_mail` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `driver` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
+
+--
+-- Dumping data for table `send_mail`
+--
+
+INSERT INTO `send_mail` (`id`, `driver`, `host`, `port`, `encryption`, `name`, `email`, `password`) VALUES
+(1, '', '', '', '', '', '', '');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `settings_alert_notice`
+--
+
+CREATE TABLE IF NOT EXISTS `settings_alert_notice` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ticket_status` tinyint(1) NOT NULL,
`ticket_admin_email` tinyint(1) NOT NULL,
@@ -92,54 +701,19 @@ CREATE TABLE IF NOT EXISTS `alert_notice` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
--
--- Dumping data for table `alert_notice`
+-- Dumping data for table `settings_alert_notice`
--
-INSERT INTO `alert_notice` (`id`, `ticket_status`, `ticket_admin_email`, `ticket_department_manager`, `ticket_department_member`, `ticket_organization_accmanager`, `message_status`, `message_last_responder`, `message_assigned_agent`, `message_department_manager`, `message_organization_accmanager`, `internal_status`, `internal_last_responder`, `internal_assigned_agent`, `internal_department_manager`, `assignment_status`, `assignment_assigned_agent`, `assignment_team_leader`, `assignment_team_member`, `transfer_status`, `transfer_assigned_agent`, `transfer_department_manager`, `transfer_department_member`, `overdue_status`, `overdue_assigned_agent`, `overdue_department_manager`, `overdue_department_member`, `system_error`, `sql_error`, `excessive_failure`, `created_at`, `updated_at`) VALUES
-(1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2015-12-28 22:43:03', '2015-12-28 23:11:22');
+INSERT INTO `settings_alert_notice` (`id`, `ticket_status`, `ticket_admin_email`, `ticket_department_manager`, `ticket_department_member`, `ticket_organization_accmanager`, `message_status`, `message_last_responder`, `message_assigned_agent`, `message_department_manager`, `message_organization_accmanager`, `internal_status`, `internal_last_responder`, `internal_assigned_agent`, `internal_department_manager`, `assignment_status`, `assignment_assigned_agent`, `assignment_team_leader`, `assignment_team_member`, `transfer_status`, `transfer_assigned_agent`, `transfer_department_manager`, `transfer_department_member`, `overdue_status`, `overdue_assigned_agent`, `overdue_department_manager`, `overdue_department_member`, `system_error`, `sql_error`, `excessive_failure`, `created_at`, `updated_at`) VALUES
+(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11');
-- --------------------------------------------------------
--
--- Table structure for table `article`
+-- Table structure for table `settings_auto_response`
--
-CREATE TABLE IF NOT EXISTS `article` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `description` longtext COLLATE utf8_unicode_ci NOT NULL,
- `status` tinyint(1) NOT NULL,
- `type` tinyint(1) NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `article_relationship`
---
-
-CREATE TABLE IF NOT EXISTS `article_relationship` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `article_id` int(10) unsigned NOT NULL,
- `category_id` int(10) unsigned NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `article_relationship_category_id_foreign` (`category_id`),
- KEY `article_relationship_article_id_foreign` (`article_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `auto_response`
---
-
-CREATE TABLE IF NOT EXISTS `auto_response` (
+CREATE TABLE IF NOT EXISTS `settings_auto_response` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`new_ticket` tinyint(1) NOT NULL,
`agent_new_ticket` tinyint(1) NOT NULL,
@@ -152,89 +726,19 @@ CREATE TABLE IF NOT EXISTS `auto_response` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
--
--- Dumping data for table `auto_response`
+-- Dumping data for table `settings_auto_response`
--
-INSERT INTO `auto_response` (`id`, `new_ticket`, `agent_new_ticket`, `submitter`, `participants`, `overlimit`, `created_at`, `updated_at`) VALUES
-(1, 1, 1, 0, 0, 0, '2015-12-28 22:43:03', '2015-12-28 23:11:04');
+INSERT INTO `settings_auto_response` (`id`, `new_ticket`, `agent_new_ticket`, `submitter`, `participants`, `overlimit`, `created_at`, `updated_at`) VALUES
+(1, 1, 1, 0, 0, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11');
-- --------------------------------------------------------
--
--- Table structure for table `banlist`
+-- Table structure for table `settings_company`
--
-CREATE TABLE IF NOT EXISTS `banlist` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `ban_status` tinyint(1) NOT NULL,
- `email_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `canned_response`
---
-
-CREATE TABLE IF NOT EXISTS `canned_response` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL,
- `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `message` longtext COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `category`
---
-
-CREATE TABLE IF NOT EXISTS `category` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
- `status` tinyint(1) NOT NULL,
- `parent` int(11) NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `comment`
---
-
-CREATE TABLE IF NOT EXISTS `comment` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `article_id` int(10) unsigned NOT NULL,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `comment` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `status` tinyint(1) NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `comment_article_id_foreign` (`article_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `company`
---
-
-CREATE TABLE IF NOT EXISTS `company` (
+CREATE TABLE IF NOT EXISTS `settings_company` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`company_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`website` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -251,129 +755,22 @@ CREATE TABLE IF NOT EXISTS `company` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
--
--- Dumping data for table `company`
+-- Dumping data for table `settings_company`
--
-INSERT INTO `company` (`id`, `company_name`, `website`, `phone`, `address`, `landing_page`, `offline_page`, `thank_page`, `logo`, `use_logo`, `created_at`, `updated_at`) VALUES
-(1, 'DEMO COMPANY', 'https://www.demo.com', '', '', '', '', '', '', '0', '2015-12-28 22:43:03', '2015-12-28 23:10:04');
+INSERT INTO `settings_company` (`id`, `company_name`, `website`, `phone`, `address`, `landing_page`, `offline_page`, `thank_page`, `logo`, `use_logo`, `created_at`, `updated_at`) VALUES
+(1, '', '', '', '', '', '', '', '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11');
-- --------------------------------------------------------
--
--- Table structure for table `contact`
+-- Table structure for table `settings_email`
--
-CREATE TABLE IF NOT EXISTS `contact` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `date_format`
---
-
-CREATE TABLE IF NOT EXISTS `date_format` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=11 ;
-
---
--- Dumping data for table `date_format`
---
-
-INSERT INTO `date_format` (`id`, `format`) VALUES
-(1, 'dd/mm/yyyy'),
-(2, 'dd-mm-yyyy'),
-(3, 'dd.mm.yyyy'),
-(4, 'mm/dd/yyyy'),
-(5, 'mm:dd:yyyy'),
-(6, 'mm-dd-yyyy'),
-(7, 'dd-mm-yyyy'),
-(8, 'yyyy/mm/dd'),
-(9, 'yyyy.mm.dd'),
-(10, 'yyyy-mm-dd');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `date_time_format`
---
-
-CREATE TABLE IF NOT EXISTS `date_time_format` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ;
-
---
--- Dumping data for table `date_time_format`
---
-
-INSERT INTO `date_time_format` (`id`, `format`) VALUES
-(1, 'd/m/Y H:i:s'),
-(2, 'd.m.Y H:i:s'),
-(3, 'd-m-Y H:i:s'),
-(4, 'm/d/Y H:i:s'),
-(5, 'm.d.Y H:i:s'),
-(6, 'm-d-Y H:i:s'),
-(7, 'Y/m/d H:i:s'),
-(8, 'Y.m.d H:i:s'),
-(9, 'Y-m-d H:i:s');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `department`
---
-
-CREATE TABLE IF NOT EXISTS `department` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `sla` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `manager` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `ticket_assignment` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `outgoing_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `template_set` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `auto_ticket_response` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `auto_message_response` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `auto_response_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `recipient` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `group_access` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `department_sign` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
-
---
--- Dumping data for table `department`
---
-
-INSERT INTO `department` (`id`, `name`, `type`, `sla`, `manager`, `ticket_assignment`, `outgoing_email`, `template_set`, `auto_ticket_response`, `auto_message_response`, `auto_response_email`, `recipient`, `group_access`, `department_sign`, `created_at`, `updated_at`) VALUES
-(1, 'Support', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'),
-(2, 'Sales', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'),
-(3, 'Operation', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-28 22:43:02', '2015-12-28 22:43:02');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `email`
---
-
-CREATE TABLE IF NOT EXISTS `email` (
+CREATE TABLE IF NOT EXISTS `settings_email` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `sys_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `sys_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`alert_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`admin_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`mta` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -390,756 +787,105 @@ CREATE TABLE IF NOT EXISTS `email` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
--
--- Dumping data for table `email`
+-- Dumping data for table `settings_email`
--
-INSERT INTO `email` (`id`, `template`, `sys_email`, `alert_email`, `admin_email`, `mta`, `email_fetching`, `notification_cron`, `strip`, `separator`, `all_emails`, `email_collaborator`, `attachment`, `created_at`, `updated_at`) VALUES
-(1, '', '', '', '', '', 1, 1, 0, 0, 1, 1, 1, '2015-12-28 22:43:03', '2015-12-28 23:10:52');
+INSERT INTO `settings_email` (`id`, `template`, `sys_email`, `alert_email`, `admin_email`, `mta`, `email_fetching`, `notification_cron`, `strip`, `separator`, `all_emails`, `email_collaborator`, `attachment`, `created_at`, `updated_at`) VALUES
+(1, 'default', NULL, '', '', '', 1, 0, 0, 0, 1, 1, 1, '2016-02-18 08:41:11', '2016-02-18 08:47:51');
-- --------------------------------------------------------
--
--- Table structure for table `emails`
+-- Table structure for table `settings_ratings`
--
-CREATE TABLE IF NOT EXISTS `emails` (
+CREATE TABLE IF NOT EXISTS `settings_ratings` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `email_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `email_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `department` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `priority` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `help_topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `fetching_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `fetching_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `mailbox_protocol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `imap_config` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `folder` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `sending_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `sending_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `auto_response` tinyint(1) NOT NULL,
- `fetching_status` tinyint(1) NOT NULL,
- `move_to_folder` tinyint(1) NOT NULL,
- `delete_email` tinyint(1) NOT NULL,
- `do_nothing` tinyint(1) NOT NULL,
- `sending_status` tinyint(1) NOT NULL,
- `authentication` tinyint(1) NOT NULL,
- `header_spoofing` tinyint(1) NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `faqs`
---
-
-CREATE TABLE IF NOT EXISTS `faqs` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `fields`
---
-
-CREATE TABLE IF NOT EXISTS `fields` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `forms_id` int(11) NOT NULL,
- `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `required` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `footer`
---
-
-CREATE TABLE IF NOT EXISTS `footer` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `footer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `footer`
---
-
-INSERT INTO `footer` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES
-(1, '', '', '2015-12-28 22:43:03', '2015-12-28 22:43:03');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `footer2`
---
-
-CREATE TABLE IF NOT EXISTS `footer2` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `footer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `footer2`
---
-
-INSERT INTO `footer2` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES
-(1, '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `footer3`
---
-
-CREATE TABLE IF NOT EXISTS `footer3` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `footer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `footer3`
---
-
-INSERT INTO `footer3` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES
-(1, '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `footer4`
---
-
-CREATE TABLE IF NOT EXISTS `footer4` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `footer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `footer4`
---
-
-INSERT INTO `footer4` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES
-(1, '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `forms`
---
-
-CREATE TABLE IF NOT EXISTS `forms` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `formname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `form_details`
---
-
-CREATE TABLE IF NOT EXISTS `form_details` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `form_name_id` int(11) NOT NULL,
- `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ;
-
---
--- Dumping data for table `form_details`
---
-
-INSERT INTO `form_details` (`id`, `form_name_id`, `label`, `type`, `created_at`, `updated_at`) VALUES
-(1, 1, 'Name', 'text', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
-(2, 1, 'Phone', 'number', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
-(3, 1, 'Email', 'text', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
-(4, 1, 'Subject', 'text', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
-(5, 1, 'Details', 'textarea', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `form_name`
---
-
-CREATE TABLE IF NOT EXISTS `form_name` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `no_of_fields` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `form_name`
---
-
-INSERT INTO `form_name` (`id`, `name`, `status`, `no_of_fields`, `created_at`, `updated_at`) VALUES
-(1, 'form', '1', '5', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `form_value`
---
-
-CREATE TABLE IF NOT EXISTS `form_value` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `form_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `values` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `groups`
---
-
-CREATE TABLE IF NOT EXISTS `groups` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `group_status` tinyint(1) NOT NULL,
- `can_create_ticket` tinyint(1) NOT NULL,
- `can_edit_ticket` tinyint(1) NOT NULL,
- `can_post_ticket` tinyint(1) NOT NULL,
- `can_close_ticket` tinyint(1) NOT NULL,
- `can_assign_ticket` tinyint(1) NOT NULL,
- `can_trasfer_ticket` tinyint(1) NOT NULL,
- `can_delete_ticket` tinyint(1) NOT NULL,
- `can_ban_email` tinyint(1) NOT NULL,
- `can_manage_canned` tinyint(1) NOT NULL,
- `can_manage_faq` tinyint(1) NOT NULL,
- `can_view_agent_stats` tinyint(1) NOT NULL,
- `department_access` tinyint(1) NOT NULL,
- `admin_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
-
---
--- Dumping data for table `groups`
---
-
-INSERT INTO `groups` (`id`, `name`, `group_status`, `can_create_ticket`, `can_edit_ticket`, `can_post_ticket`, `can_close_ticket`, `can_assign_ticket`, `can_trasfer_ticket`, `can_delete_ticket`, `can_ban_email`, `can_manage_canned`, `can_manage_faq`, `can_view_agent_stats`, `department_access`, `admin_notes`, `created_at`, `updated_at`) VALUES
-(1, 'Group A', 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'),
-(2, 'Group B', 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'),
-(3, 'Group C', 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `group_assign_department`
---
-
-CREATE TABLE IF NOT EXISTS `group_assign_department` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `group_id` int(11) NOT NULL,
- `department_id` int(11) NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `guest_note`
---
-
-CREATE TABLE IF NOT EXISTS `guest_note` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `heading` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `content` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `guest_note`
---
-
-INSERT INTO `guest_note` (`id`, `heading`, `content`) VALUES
-(1, 'Welcome to the Support Center', 'Hello this is a new helpdesk support system ans it is in the development phase.');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `help_topic`
---
-
-CREATE TABLE IF NOT EXISTS `help_topic` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `parent_topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `custom_form` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `department` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `ticket_status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `priority` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `sla_plan` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `thank_page` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `ticket_num_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `status` tinyint(1) NOT NULL,
- `type` tinyint(1) NOT NULL,
- `auto_assign` tinyint(1) NOT NULL,
- `auto_response` tinyint(1) NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
-
---
--- Dumping data for table `help_topic`
---
-
-INSERT INTO `help_topic` (`id`, `topic`, `parent_topic`, `custom_form`, `department`, `ticket_status`, `priority`, `sla_plan`, `thank_page`, `ticket_num_format`, `internal_notes`, `status`, `type`, `auto_assign`, `auto_response`, `created_at`, `updated_at`) VALUES
-(1, 'Support query', 'Support query', '1', '1', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-28 22:43:03', '2015-12-28 22:43:03'),
-(2, 'Sales query', 'Sale query', '1', '2', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-28 22:43:03', '2015-12-28 22:43:03'),
-(3, 'Operational query', 'Operational query', '1', '3', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-28 22:43:03', '2015-12-28 22:43:03');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `languages`
---
-
-CREATE TABLE IF NOT EXISTS `languages` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ;
-
---
--- Dumping data for table `languages`
---
-
-INSERT INTO `languages` (`id`, `name`, `locale`) VALUES
-(1, 'English', 'en'),
-(2, 'Italian', 'it'),
-(3, 'German', 'de'),
-(4, 'French', 'fr'),
-(5, 'Brazilian Portuguese', 'pt_BR'),
-(6, 'Dutch', 'nl'),
-(7, 'Spanish', 'es'),
-(8, 'Norwegian', 'nb_NO'),
-(9, 'Danish', 'da');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `logs`
---
-
-CREATE TABLE IF NOT EXISTS `logs` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `level` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
-
---
--- Dumping data for table `logs`
---
-
-INSERT INTO `logs` (`id`, `level`) VALUES
-(1, 'WARN'),
-(2, 'DEBUG'),
-(3, 'ERROR');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `log_notification`
---
-
-CREATE TABLE IF NOT EXISTS `log_notification` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `log` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `log_notification`
---
-
-INSERT INTO `log_notification` (`id`, `log`, `created_at`, `updated_at`) VALUES
-(1, 'NOT-1', '2015-12-28 22:43:03', '2015-12-28 22:43:03');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `mailbox_protocol`
---
-
-CREATE TABLE IF NOT EXISTS `mailbox_protocol` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ;
-
---
--- Dumping data for table `mailbox_protocol`
---
-
-INSERT INTO `mailbox_protocol` (`id`, `name`) VALUES
-(1, 'IMAP+SSl'),
-(2, 'IMAP'),
-(3, 'POP+SSL'),
-(4, 'POP');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `migrations`
---
-
-CREATE TABLE IF NOT EXISTS `migrations` (
- `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `batch` int(11) NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
---
--- Dumping data for table `migrations`
---
-
-INSERT INTO `migrations` (`migration`, `batch`) VALUES
-('2000_08_22_110830_create_forms_table', 1),
-('2000_08_23_110830_create_fields_table', 1),
-('2014_10_12_000000_create_users_table', 1),
-('2014_10_12_100000_create_password_resets_table', 1),
-('2015_05_01_100249_create_categories_table', 1),
-('2015_05_01_114710_create_articles_table', 1),
-('2015_05_04_113843_create_settings_table', 1),
-('2015_05_05_062244_create_article_relationships_table', 1),
-('2015_05_05_112525_create_faqs_table', 1),
-('2015_05_06_060231_create_contacts_table', 1),
-('2015_05_06_073651_create_footers_table', 1),
-('2015_05_06_082026_create_footer2s_table', 1),
-('2015_05_06_092125_create_footer3s_table', 1),
-('2015_05_06_092132_create_footer4s_table', 1),
-('2015_05_06_103949_create_timezone_table', 1),
-('2015_05_06_105005_create_ticket_thread_table', 1),
-('2015_05_06_110518_create_ticket_status_table', 1),
-('2015_05_06_112140_create_ticket_settings_table', 1),
-('2015_05_06_114327_create_ticket_priority_table', 1),
-('2015_05_06_115133_create_ticket_collaborator_table', 1),
-('2015_05_06_115733_create_ticket_attachment_table', 1),
-('2015_05_06_120651_create_ticket_table', 1),
-('2015_05_06_122431_create_template_table', 1),
-('2015_05_06_122830_create_team_assign_agent_table', 1),
-('2015_05_06_123154_create_team_table', 1),
-('2015_05_06_123624_create_system_table', 1),
-('2015_05_06_123928_create_sla_table', 1),
-('2015_05_06_125328_create_organization_table', 1),
-('2015_05_06_125817_create_mailbox_protocol_table', 1),
-('2015_05_06_130627_create_log_table', 1),
-('2015_05_06_131238_create_languages_table', 1),
-('2015_05_06_132844_create_help_topic_table', 1),
-('2015_05_06_133346_create_guest_note_table', 1),
-('2015_05_07_040647_create_group_assign_department_table', 1),
-('2015_05_07_040934_create_groups_table', 1),
-('2015_05_07_041448_create_form_value_table', 1),
-('2015_05_07_041459_create_form_name_table', 1),
-('2015_05_07_041509_create_form_details_table', 1),
-('2015_05_07_043529_create_emails_table', 1),
-('2015_05_07_043904_create_email_table', 1),
-('2015_05_07_044229_create_department_table', 1),
-('2015_05_07_044521_create_date_time_format_table', 1),
-('2015_05_07_045158_create_date_format_table', 1),
-('2015_05_07_045611_create_company_table', 1),
-('2015_05_07_052638_create_banlist_table', 1),
-('2015_05_07_052924_create_auto_response_table', 1),
-('2015_05_07_053318_create_alert_notice_table', 1),
-('2015_05_07_053704_create_access_table', 1),
-('2015_05_07_063628_create_time_format_table', 1),
-('2015_05_07_102116_create_comments_table', 1),
-('2015_05_14_072226_create_pages_table', 1),
-('2015_05_15_080512_create_options_table', 1),
-('2015_05_15_080512_create_socials_table', 1),
-('2015_06_09_062121_create_priority_table', 1),
-('2015_07_10_061107_create_ticketsource_table', 1),
-('2015_08_10_114142_create_smtp_table', 1),
-('2015_09_14_101844_create_users_organization_table', 1),
-('2015_09_17_050549_create_version_check_table', 1),
-('2015_10_09_105525_create_canned_response_table', 1),
-('2015_10_20_154640_create_ticket_form_data_table', 1),
-('2015_11_02_063848_create_side_table', 1),
-('2015_12_14_072307_create_plugins_table', 1),
-('2015_12_23_074831_create_notification_log_table', 1);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `options`
---
-
-CREATE TABLE IF NOT EXISTS `options` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `option_name` text COLLATE utf8_unicode_ci NOT NULL,
- `option_value` text COLLATE utf8_unicode_ci NOT NULL,
- `autoload` text COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=23 ;
-
---
--- Dumping data for table `options`
---
-
-INSERT INTO `options` (`id`, `option_name`, `option_value`, `autoload`, `created_at`, `updated_at`) VALUES
-(1, 'gmt_offset', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'),
-(2, 'date_format', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'),
-(3, 'time_format', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'),
-(4, 'date_time_format', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'),
-(5, 'sitename', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'),
-(6, 'sitedescription', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'),
-(7, 'admin_email', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(8, 'template', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(9, 'upload_url_path', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(10, 'timezone_string', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(11, 'siteurl', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(12, 'home', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(13, 'start_of_week', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(14, 'language', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(15, 'port', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(16, 'host', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(17, 'encryption', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(18, 'username', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(19, 'password', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(20, 'footer', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(21, 'uselogo', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'),
-(22, 'logo', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `organization`
---
-
-CREATE TABLE IF NOT EXISTS `organization` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `head` int(11) NOT NULL,
- `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `pages`
---
-
-CREATE TABLE IF NOT EXISTS `pages` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `status` tinyint(1) NOT NULL,
- `visibility` tinyint(1) NOT NULL,
+ `rating_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `publish` int(11) NOT NULL,
+ `modify` int(11) NOT NULL,
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `description` longtext COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `settings_ratings_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
--- Table structure for table `password_resets`
+-- Table structure for table `settings_system`
--
-CREATE TABLE IF NOT EXISTS `password_resets` (
- `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- KEY `password_resets_email_index` (`email`),
- KEY `password_resets_token_index` (`token`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `plugins`
---
-
-CREATE TABLE IF NOT EXISTS `plugins` (
+CREATE TABLE IF NOT EXISTS `settings_system` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `status` tinyint(1) NOT NULL,
+ `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `status` int(11) NOT NULL,
+ `department` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `page_size` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `log_level` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `purge_log` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `api_enable` int(11) NOT NULL,
+ `api_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `name_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `time_farmat` int(10) unsigned DEFAULT NULL,
+ `date_format` int(10) unsigned DEFAULT NULL,
+ `date_time_format` int(10) unsigned DEFAULT NULL,
+ `day_date_time` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `time_zone` int(10) unsigned DEFAULT NULL,
+ `content` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `priority`
---
-
-CREATE TABLE IF NOT EXISTS `priority` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
-
---
--- Dumping data for table `priority`
---
-
-INSERT INTO `priority` (`id`, `name`) VALUES
-(1, 'low'),
-(2, 'high');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `send_mail`
---
-
-CREATE TABLE IF NOT EXISTS `send_mail` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `driver` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `time_farmat` (`time_farmat`),
+ KEY `date_format` (`date_format`),
+ KEY `date_time_format` (`date_time_format`),
+ KEY `time_zone` (`time_zone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
+--
+-- Dumping data for table `settings_system`
+--
+
+INSERT INTO `settings_system` (`id`, `status`, `url`, `name`, `department`, `page_size`, `log_level`, `purge_log`, `api_enable`, `api_key`, `name_format`, `time_farmat`, `date_format`, `date_time_format`, `day_date_time`, `time_zone`, `content`, `created_at`, `updated_at`) VALUES
+(1, 1, '', '', '1', '', '', '', 0, '', '', NULL, NULL, 1, '', 79, '', '2016-02-18 08:41:12', '2016-02-18 08:41:12');
+
-- --------------------------------------------------------
--
--- Table structure for table `settings`
+-- Table structure for table `settings_ticket`
--
-CREATE TABLE IF NOT EXISTS `settings` (
+CREATE TABLE IF NOT EXISTS `settings_ticket` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `company_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `logo` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `background` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `pagination` int(11) NOT NULL,
- `timezone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `dateformat` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `num_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `num_sequence` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `priority` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `sla` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `help_topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `max_open_ticket` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `collision_avoid` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `captcha` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `status` tinyint(1) NOT NULL,
+ `claim_response` tinyint(1) NOT NULL,
+ `assigned_ticket` tinyint(1) NOT NULL,
+ `answered_ticket` tinyint(1) NOT NULL,
+ `agent_mask` tinyint(1) NOT NULL,
+ `html` tinyint(1) NOT NULL,
+ `client_update` tinyint(1) NOT NULL,
+ `max_file_size` tinyint(1) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
--
--- Dumping data for table `settings`
+-- Dumping data for table `settings_ticket`
--
-INSERT INTO `settings` (`id`, `company_name`, `phone`, `website`, `address`, `logo`, `background`, `version`, `port`, `host`, `encryption`, `email`, `password`, `pagination`, `timezone`, `dateformat`, `created_at`, `updated_at`) VALUES
-(1, '', '', '', '', '', '', '', '', '', '', '', '', 0, '', '', '2015-12-28 22:43:06', '2015-12-28 22:43:06');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `side1`
---
-
-CREATE TABLE IF NOT EXISTS `side1` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `content` mediumtext COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `side1`
---
-
-INSERT INTO `side1` (`id`, `title`, `content`, `created_at`, `updated_at`) VALUES
-(1, '', '', '2015-12-28 22:43:06', '2015-12-28 22:43:06');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `side2`
---
-
-CREATE TABLE IF NOT EXISTS `side2` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `content` mediumtext COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `side2`
---
-
-INSERT INTO `side2` (`id`, `title`, `content`, `created_at`, `updated_at`) VALUES
-(1, '', '', '2015-12-28 22:43:06', '2015-12-28 22:43:06');
+INSERT INTO `settings_ticket` (`id`, `num_format`, `num_sequence`, `priority`, `sla`, `help_topic`, `max_open_ticket`, `collision_avoid`, `captcha`, `status`, `claim_response`, `assigned_ticket`, `answered_ticket`, `agent_mask`, `html`, `client_update`, `max_file_size`, `created_at`, `updated_at`) VALUES
+(1, '#ABCD 1234 1234567', '0', '1', '2', '1', '', '2', '', 1, 0, 0, 0, 0, 0, 0, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11');
-- --------------------------------------------------------
@@ -1165,77 +911,9 @@ CREATE TABLE IF NOT EXISTS `sla_plan` (
--
INSERT INTO `sla_plan` (`id`, `name`, `grace_period`, `admin_note`, `status`, `transient`, `ticket_overdue`, `created_at`, `updated_at`) VALUES
-(1, 'Sla 1', '6 Hours', '', 1, 0, 0, '2015-12-28 22:43:00', '2015-12-28 22:43:00'),
-(2, 'Sla 2', '12 Hours', '', 1, 0, 0, '2015-12-28 22:43:00', '2015-12-28 22:43:00'),
-(3, 'Sla 3', '24 Hours', '', 1, 0, 0, '2015-12-28 22:43:00', '2015-12-28 22:43:00');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `social`
---
-
-CREATE TABLE IF NOT EXISTS `social` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `linkedin` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `stumble` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `google` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `deviantart` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `flickr` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `skype` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `rss` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `twitter` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `facebook` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `youtube` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `vimeo` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `pinterest` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `dribbble` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `instagram` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `social`
---
-
-INSERT INTO `social` (`id`, `linkedin`, `stumble`, `google`, `deviantart`, `flickr`, `skype`, `rss`, `twitter`, `facebook`, `youtube`, `vimeo`, `pinterest`, `dribbble`, `instagram`, `created_at`, `updated_at`) VALUES
-(1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-28 22:43:06', '2015-12-28 22:43:06');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `system`
---
-
-CREATE TABLE IF NOT EXISTS `system` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `status` tinyint(1) NOT NULL,
- `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `department` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `page_size` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `log_level` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `purge_log` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `name_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `time_farmat` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `date_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `date_time_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `day_date_time` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `time_zone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `content` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `system`
---
-
-INSERT INTO `system` (`id`, `status`, `url`, `name`, `department`, `page_size`, `log_level`, `purge_log`, `name_format`, `time_farmat`, `date_format`, `date_time_format`, `day_date_time`, `time_zone`, `content`, `created_at`, `updated_at`) VALUES
-(1, 1, '', 'SUPPORT CENTER', '1', '', '', '', '', '', '', 'd/m/Y H:i:s', '', 'Asia/Kolkata', '', '2015-12-28 22:43:03', '2015-12-28 23:10:44');
+(1, 'Sla 1', '6 Hours', '', 1, 0, 0, '2016-02-18 08:41:10', '2016-02-18 08:41:10'),
+(2, 'Sla 2', '12 Hours', '', 1, 0, 0, '2016-02-18 08:41:10', '2016-02-18 08:41:10'),
+(3, 'Sla 3', '24 Hours', '', 1, 0, 0, '2016-02-18 08:41:10', '2016-02-18 08:41:10');
-- --------------------------------------------------------
@@ -1247,12 +925,13 @@ CREATE TABLE IF NOT EXISTS `teams` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`status` tinyint(1) NOT NULL,
- `team_lead` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `team_lead` int(10) unsigned DEFAULT NULL,
`assign_alert` tinyint(1) NOT NULL,
`admin_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `team_lead` (`team_lead`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;
--
@@ -1260,9 +939,9 @@ CREATE TABLE IF NOT EXISTS `teams` (
--
INSERT INTO `teams` (`id`, `name`, `status`, `team_lead`, `assign_alert`, `admin_notes`, `created_at`, `updated_at`) VALUES
-(1, 'Level 1 Support', 0, '', 0, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'),
-(2, 'Level 2 Support', 0, '', 0, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'),
-(3, 'Developer', 0, '', 0, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02');
+(1, 'Level 1 Support', 1, NULL, 0, '', '2016-02-18 08:41:10', '2016-02-18 08:41:10'),
+(2, 'Level 2 Support', 0, NULL, 0, '', '2016-02-18 08:41:10', '2016-02-18 08:41:10'),
+(3, 'Developer', 0, NULL, 0, '', '2016-02-18 08:41:10', '2016-02-18 08:41:10');
-- --------------------------------------------------------
@@ -1272,11 +951,13 @@ INSERT INTO `teams` (`id`, `name`, `status`, `team_lead`, `assign_alert`, `admin
CREATE TABLE IF NOT EXISTS `team_assign_agent` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `team_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `agent_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `team_id` int(10) unsigned DEFAULT NULL,
+ `agent_id` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `team_id` (`team_id`),
+ KEY `agent_id` (`agent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -1306,25 +987,29 @@ CREATE TABLE IF NOT EXISTS `template` (
CREATE TABLE IF NOT EXISTS `tickets` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ticket_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `user_id` int(11) NOT NULL,
- `dept_id` int(11) NOT NULL,
- `team_id` int(11) NOT NULL,
- `priority_id` int(11) NOT NULL,
- `sla` int(11) NOT NULL,
- `help_topic_id` int(11) NOT NULL,
- `status` int(11) NOT NULL,
+ `user_id` int(10) unsigned DEFAULT NULL,
+ `dept_id` int(10) unsigned DEFAULT NULL,
+ `team_id` int(10) unsigned DEFAULT NULL,
+ `priority_id` int(10) unsigned DEFAULT NULL,
+ `sla` int(10) unsigned DEFAULT NULL,
+ `help_topic_id` int(10) unsigned DEFAULT NULL,
+ `status` int(10) unsigned DEFAULT NULL,
+ `rating` tinyint(1) NOT NULL,
+ `ratingreply` tinyint(1) NOT NULL,
`flags` int(11) NOT NULL,
`ip_address` int(11) NOT NULL,
- `assigned_to` int(11) NOT NULL,
+ `assigned_to` int(10) unsigned DEFAULT NULL,
`lock_by` int(11) NOT NULL,
- `lock_at` int(11) NOT NULL,
- `source` int(11) NOT NULL,
+ `lock_at` datetime DEFAULT NULL,
+ `source` int(10) unsigned DEFAULT NULL,
`isoverdue` int(11) NOT NULL,
`reopened` int(11) NOT NULL,
`isanswered` int(11) NOT NULL,
`html` int(11) NOT NULL,
`is_deleted` int(11) NOT NULL,
`closed` int(11) NOT NULL,
+ `is_transferred` tinyint(1) NOT NULL,
+ `transferred_at` datetime NOT NULL,
`reopened_at` datetime DEFAULT NULL,
`duedate` datetime DEFAULT NULL,
`closed_at` datetime DEFAULT NULL,
@@ -1332,8 +1017,17 @@ CREATE TABLE IF NOT EXISTS `tickets` (
`last_response_at` datetime DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
+ PRIMARY KEY (`id`),
+ KEY `user_id` (`user_id`),
+ KEY `dept_id` (`dept_id`),
+ KEY `team_id` (`team_id`),
+ KEY `priority_id` (`priority_id`),
+ KEY `sla` (`sla`),
+ KEY `help_topic_id` (`help_topic_id`),
+ KEY `status` (`status`),
+ KEY `assigned_to` (`assigned_to`),
+ KEY `source` (`source`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
@@ -1344,15 +1038,16 @@ CREATE TABLE IF NOT EXISTS `tickets` (
CREATE TABLE IF NOT EXISTS `ticket_attachment` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `thread_id` int(11) NOT NULL,
+ `thread_id` int(10) unsigned DEFAULT NULL,
`size` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`poster` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `file` mediumblob,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+ `file` blob,
+ PRIMARY KEY (`id`),
+ KEY `thread_id` (`thread_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
@@ -1363,12 +1058,14 @@ CREATE TABLE IF NOT EXISTS `ticket_attachment` (
CREATE TABLE IF NOT EXISTS `ticket_collaborator` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`isactive` tinyint(1) NOT NULL,
- `ticket_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
+ `ticket_id` int(10) unsigned DEFAULT NULL,
+ `user_id` int(10) unsigned DEFAULT NULL,
`role` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `ticket_id` (`ticket_id`),
+ KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -1379,12 +1076,13 @@ CREATE TABLE IF NOT EXISTS `ticket_collaborator` (
CREATE TABLE IF NOT EXISTS `ticket_form_data` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `ticket_id` int(11) NOT NULL,
+ `ticket_id` int(10) unsigned DEFAULT NULL,
`title` text COLLATE utf8_unicode_ci NOT NULL,
- `content` mediumtext COLLATE utf8_unicode_ci NOT NULL,
+ `content` text COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `ticket_id` (`ticket_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -1415,42 +1113,6 @@ INSERT INTO `ticket_priority` (`priority_id`, `priority`, `priority_desc`, `prio
-- --------------------------------------------------------
---
--- Table structure for table `ticket_settings`
---
-
-CREATE TABLE IF NOT EXISTS `ticket_settings` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `num_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `num_sequence` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `priority` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `sla` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `help_topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `max_open_ticket` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `collision_avoid` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `captcha` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `status` tinyint(1) NOT NULL,
- `claim_response` tinyint(1) NOT NULL,
- `assigned_ticket` tinyint(1) NOT NULL,
- `answered_ticket` tinyint(1) NOT NULL,
- `agent_mask` tinyint(1) NOT NULL,
- `html` tinyint(1) NOT NULL,
- `client_update` tinyint(1) NOT NULL,
- `max_file_size` tinyint(1) NOT NULL,
- `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `ticket_settings`
---
-
-INSERT INTO `ticket_settings` (`id`, `num_format`, `num_sequence`, `priority`, `sla`, `help_topic`, `max_open_ticket`, `collision_avoid`, `captcha`, `status`, `claim_response`, `assigned_ticket`, `answered_ticket`, `agent_mask`, `html`, `client_update`, `max_file_size`, `created_at`, `updated_at`) VALUES
-(1, '#ABCD 1234 1234567', '0', '1', '1', '1', '', '', '', 1, 0, 0, 0, 0, 0, 0, 0, '2015-12-28 22:43:00', '2015-12-28 23:10:58');
-
--- --------------------------------------------------------
-
--
-- Table structure for table `ticket_source`
--
@@ -1496,11 +1158,11 @@ CREATE TABLE IF NOT EXISTS `ticket_status` (
--
INSERT INTO `ticket_status` (`id`, `name`, `state`, `mode`, `message`, `flags`, `sort`, `properties`, `created_at`, `updated_at`) VALUES
-(1, 'Open', 'open', 3, 'Ticket have been Reopened by', 0, 1, 'Open tickets.', '2015-12-28 22:42:59', '2015-12-28 22:42:59'),
-(2, 'Resolved', 'closed', 1, 'Ticket have been Resolved by', 0, 2, 'Resolved tickets.', '2015-12-28 22:42:59', '2015-12-28 22:42:59'),
-(3, 'Closed', 'closed', 3, 'Ticket have been Closed by', 0, 3, 'Closed tickets. Tickets will still be accessible on client and staff panels.', '2015-12-28 22:42:59', '2015-12-28 22:42:59'),
-(4, 'Archived', 'archived', 3, 'Ticket have been Archived by', 0, 4, 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.', '2015-12-28 22:42:59', '2015-12-28 22:42:59'),
-(5, 'Deleted', 'deleted', 3, 'Ticket have been Deleted by', 0, 5, 'Tickets queued for deletion. Not accessible on ticket queues.', '2015-12-28 22:43:00', '2015-12-28 22:43:00');
+(1, 'Open', 'open', 3, 'Ticket have been Reopened by', 0, 1, 'Open tickets.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'),
+(2, 'Resolved', 'closed', 1, 'Ticket have been Resolved by', 0, 2, 'Resolved tickets.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'),
+(3, 'Closed', 'closed', 3, 'Ticket have been Closed by', 0, 3, 'Closed tickets. Tickets will still be accessible on client and staff panels.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'),
+(4, 'Archived', 'archived', 3, 'Ticket have been Archived by', 0, 4, 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'),
+(5, 'Deleted', 'deleted', 3, 'Ticket have been Deleted by', 0, 5, 'Tickets queued for deletion. Not accessible on ticket queues.', '2016-02-18 08:41:09', '2016-02-18 08:41:09');
-- --------------------------------------------------------
@@ -1510,20 +1172,21 @@ INSERT INTO `ticket_status` (`id`, `name`, `state`, `mode`, `message`, `flags`,
CREATE TABLE IF NOT EXISTS `ticket_thread` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `pid` int(11) NOT NULL,
- `ticket_id` int(11) NOT NULL,
- `staff_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
+ `ticket_id` int(10) unsigned DEFAULT NULL,
+ `user_id` int(10) unsigned DEFAULT NULL,
`poster` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `source` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `source` int(10) unsigned DEFAULT NULL,
`is_internal` tinyint(1) NOT NULL,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `body` mediumtext COLLATE utf8_unicode_ci NOT NULL,
+ `body` text COLLATE utf8_unicode_ci NOT NULL,
`format` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`ip_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `ticket_id_2` (`ticket_id`),
+ KEY `user_id` (`user_id`),
+ KEY `source` (`source`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=8 ;
-- --------------------------------------------------------
@@ -1697,16 +1360,16 @@ CREATE TABLE IF NOT EXISTS `users` (
`ext` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`phone_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`mobile` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `agent_sign` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `agent_sign` text COLLATE utf8_unicode_ci NOT NULL,
`account_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`account_status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `assign_group` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `primary_dpt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `assign_group` int(10) unsigned DEFAULT NULL,
+ `primary_dpt` int(10) unsigned DEFAULT NULL,
`agent_tzone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`daylight_save` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`limit_access` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`directory_listing` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `vocation_mode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `vacation_mode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`company` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`role` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`internal_note` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -1715,15 +1378,17 @@ CREATE TABLE IF NOT EXISTS `users` (
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
- UNIQUE KEY `users_email_unique` (`email`)
+ UNIQUE KEY `users_email_unique` (`email`),
+ KEY `assign_group_3` (`assign_group`),
+ KEY `primary_dpt_2` (`primary_dpt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
--
-- Dumping data for table `users`
--
-INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `ext`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vocation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`) VALUES
-(1, 'demo@demo.com', 'demo', 'demo', 0, 'demo@demo.com', 0, '$2y$10$lejFGejiVlooHhCmqIo16uB7M0bxCV07BbJN8liMe9mrbSLGc8Y7C', 1, '', '', '', '', '', '', 'group A', 'support', '', '', '', '', '', '', 'admin', '', '', NULL, '2015-12-28 22:43:07', '2015-12-28 22:43:07');
+INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `ext`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vacation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`) VALUES
+(1, 'demo.admin', 'demo', 'admin', 0, 'demo@admin.com', 0, '$2y$10$whmtHDap2LVeCcMy4gjYk.nOWKx45M7loy8TsVjWozLLfQbDRswUe', 1, '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', 'admin', '', '', 'mzJmeXU43vOHGxFvFcnwQTAKa3HEqOjUu7quW9hPxR211S3uAJDZCGJ5PXXj', '2016-02-18 08:41:12', '2016-02-18 08:55:17');
-- --------------------------------------------------------
@@ -1733,11 +1398,13 @@ INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `em
CREATE TABLE IF NOT EXISTS `user_assign_organization` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `org_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `user_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `org_id` int(10) unsigned DEFAULT NULL,
+ `user_id` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `org_id` (`org_id`),
+ KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -1760,24 +1427,188 @@ CREATE TABLE IF NOT EXISTS `version_check` (
--
INSERT INTO `version_check` (`id`, `current_version`, `new_version`, `created_at`, `updated_at`) VALUES
-(1, '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04');
+(1, '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `widgets`
+--
+
+CREATE TABLE IF NOT EXISTS `widgets` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `title` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `value` text COLLATE utf8_unicode_ci,
+ `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=21 ;
+
+--
+-- Dumping data for table `widgets`
+--
+
+INSERT INTO `widgets` (`id`, `name`, `title`, `value`, `created_at`, `updated_at`) VALUES
+(1, 'footer1', NULL, NULL, '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(2, 'footer2', NULL, NULL, '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(3, 'footer3', NULL, NULL, '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(4, 'footer4', NULL, NULL, '2016-02-18 08:41:11', '2016-02-18 08:41:11'),
+(5, 'side1', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(6, 'side2', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(7, 'linkedin', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(8, 'stumble', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(9, 'google', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(10, 'deviantart', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(11, 'flickr', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(12, 'skype', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(13, 'rss', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(14, 'twitter', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(15, 'facebook', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(16, 'youtube', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(17, 'vimeo', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(18, 'pinterest', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(19, 'dribbble', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'),
+(20, 'instagram', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12');
--
-- Constraints for dumped tables
--
--
--- Constraints for table `article_relationship`
+-- Constraints for table `canned_response`
--
-ALTER TABLE `article_relationship`
- ADD CONSTRAINT `article_relationship_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`),
- ADD CONSTRAINT `article_relationship_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `article` (`id`);
+ALTER TABLE `canned_response`
+ ADD CONSTRAINT `canned_response_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
--- Constraints for table `comment`
+-- Constraints for table `department`
--
-ALTER TABLE `comment`
- ADD CONSTRAINT `comment_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `article` (`id`);
+ALTER TABLE `department`
+ ADD CONSTRAINT `department_ibfk_2` FOREIGN KEY (`manager`) REFERENCES `users` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `department_ibfk_1` FOREIGN KEY (`sla`) REFERENCES `sla_plan` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `emails`
+--
+ALTER TABLE `emails`
+ ADD CONSTRAINT `emails_ibfk_3` FOREIGN KEY (`help_topic`) REFERENCES `help_topic` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `emails_ibfk_1` FOREIGN KEY (`department`) REFERENCES `department` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `emails_ibfk_2` FOREIGN KEY (`priority`) REFERENCES `ticket_priority` (`priority_id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `group_assign_department`
+--
+ALTER TABLE `group_assign_department`
+ ADD CONSTRAINT `group_assign_department_ibfk_2` FOREIGN KEY (`department_id`) REFERENCES `department` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `group_assign_department_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `help_topic`
+--
+ALTER TABLE `help_topic`
+ ADD CONSTRAINT `help_topic_ibfk_6` FOREIGN KEY (`auto_assign`) REFERENCES `users` (`id`) ON DELETE SET NULL,
+ ADD CONSTRAINT `help_topic_ibfk_1` FOREIGN KEY (`custom_form`) REFERENCES `custom_forms` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `help_topic_ibfk_2` FOREIGN KEY (`department`) REFERENCES `department` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `help_topic_ibfk_3` FOREIGN KEY (`ticket_status`) REFERENCES `ticket_status` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `help_topic_ibfk_4` FOREIGN KEY (`priority`) REFERENCES `ticket_priority` (`priority_id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `help_topic_ibfk_5` FOREIGN KEY (`sla_plan`) REFERENCES `sla_plan` (`id`);
+
+--
+-- Constraints for table `kb_article_relationship`
+--
+ALTER TABLE `kb_article_relationship`
+ ADD CONSTRAINT `article_relationship_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `kb_category` (`id`),
+ ADD CONSTRAINT `article_relationship_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `kb_article` (`id`);
+
+--
+-- Constraints for table `kb_comment`
+--
+ALTER TABLE `kb_comment`
+ ADD CONSTRAINT `comment_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `kb_article` (`id`);
+
+--
+-- Constraints for table `organization`
+--
+ALTER TABLE `organization`
+ ADD CONSTRAINT `organization_ibfk_1` FOREIGN KEY (`head`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `settings_system`
+--
+ALTER TABLE `settings_system`
+ ADD CONSTRAINT `settings_system_ibfk_4` FOREIGN KEY (`date_time_format`) REFERENCES `date_time_format` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `settings_system_ibfk_1` FOREIGN KEY (`time_zone`) REFERENCES `timezone` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `settings_system_ibfk_2` FOREIGN KEY (`time_farmat`) REFERENCES `time_format` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `settings_system_ibfk_3` FOREIGN KEY (`date_format`) REFERENCES `date_format` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `teams`
+--
+ALTER TABLE `teams`
+ ADD CONSTRAINT `teams_ibfk_1` FOREIGN KEY (`team_lead`) REFERENCES `users` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `team_assign_agent`
+--
+ALTER TABLE `team_assign_agent`
+ ADD CONSTRAINT `team_assign_agent_ibfk_2` FOREIGN KEY (`agent_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `team_assign_agent_ibfk_1` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `tickets`
+--
+ALTER TABLE `tickets`
+ ADD CONSTRAINT `tickets_ibfk_9` FOREIGN KEY (`assigned_to`) REFERENCES `users` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `tickets_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `tickets_ibfk_2` FOREIGN KEY (`dept_id`) REFERENCES `department` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `tickets_ibfk_3` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `tickets_ibfk_4` FOREIGN KEY (`priority_id`) REFERENCES `ticket_priority` (`priority_id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `tickets_ibfk_5` FOREIGN KEY (`sla`) REFERENCES `sla_plan` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `tickets_ibfk_6` FOREIGN KEY (`help_topic_id`) REFERENCES `help_topic` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `tickets_ibfk_7` FOREIGN KEY (`status`) REFERENCES `ticket_status` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `tickets_ibfk_8` FOREIGN KEY (`source`) REFERENCES `ticket_source` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `ticket_attachment`
+--
+ALTER TABLE `ticket_attachment`
+ ADD CONSTRAINT `ticket_attachment_ibfk_1` FOREIGN KEY (`thread_id`) REFERENCES `ticket_thread` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `ticket_collaborator`
+--
+ALTER TABLE `ticket_collaborator`
+ ADD CONSTRAINT `ticket_collaborator_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `ticket_collaborator_ibfk_1` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `ticket_form_data`
+--
+ALTER TABLE `ticket_form_data`
+ ADD CONSTRAINT `ticket_form_data_ibfk_1` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `ticket_thread`
+--
+ALTER TABLE `ticket_thread`
+ ADD CONSTRAINT `ticket_thread_ibfk_3` FOREIGN KEY (`source`) REFERENCES `ticket_source` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `ticket_thread_ibfk_1` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `ticket_thread_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `users`
+--
+ALTER TABLE `users`
+ ADD CONSTRAINT `users_ibfk_2` FOREIGN KEY (`primary_dpt`) REFERENCES `department` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`assign_group`) REFERENCES `groups` (`id`) ON UPDATE NO ACTION;
+
+--
+-- Constraints for table `user_assign_organization`
+--
+ALTER TABLE `user_assign_organization`
+ ADD CONSTRAINT `user_assign_organization_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION,
+ ADD CONSTRAINT `user_assign_organization_ibfk_1` FOREIGN KEY (`org_id`) REFERENCES `organization` (`id`) ON UPDATE NO ACTION;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
diff --git a/README.md b/README.md
index 5227c3de9..0c7ba6150 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
About Faveo
-
+
About Faveo
+
Headquartered in Bangalore, Faveo HELPDESK provides Businesses with an automated Helpdesk system to manage customer support.
The word Faveo comes from Latin which means to be favourable. Which truly highlights vision and the scope as well as the functionality of the product that Faveo is. It is specifically designed to cater the needs of startups and SME’s empowering them with state of art, ticket based support system. In today’s competitive startup scenario customer retention is one of the major challenges. Handling client query diligently is all the difference between retaining or losing a long lasting relationship. The company is driven with passion of providing tools for managing consumer queries for strategic insights and helping companies take those decisive decisions.
diff --git a/app/Commands/Command.php b/app/Commands/Command.php
index 018bc2192..c9b0a33a6 100644
--- a/app/Commands/Command.php
+++ b/app/Commands/Command.php
@@ -1,7 +1,8 @@
-comment(PHP_EOL.Inspiring::quote().PHP_EOL);
- }
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = 'Display an inspiring quote';
+ /**
+ * Execute the console command.
+ *
+ * @return mixed
+ */
+ public function handle()
+ {
+ $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
+ }
}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index cb183d946..bce2f0715 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -1,37 +1,38 @@
-command('inspire')
+ ->hourly();
- /**
- * Define the application's command schedule.
- *
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- * @return void
- */
- protected function schedule(Schedule $schedule)
- {
- $schedule->command('inspire')
- ->hourly();
-
- $schedule->call(function () {
-
- $user = new User;
- $user->save();
-
- })->everyFiveMinutes();
+ $schedule->call(function () {
- }
+ $user = new User();
+ $user->save();
+ })->everyFiveMinutes();
+ }
}
diff --git a/app/Events/ClientTicketForm.php b/app/Events/ClientTicketForm.php
index ab534034e..4288c16c4 100644
--- a/app/Events/ClientTicketForm.php
+++ b/app/Events/ClientTicketForm.php
@@ -1,27 +1,25 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
-
- }
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/ClientTicketFormPost.php b/app/Events/ClientTicketFormPost.php
index ae045d75a..f242c5f5d 100644
--- a/app/Events/ClientTicketFormPost.php
+++ b/app/Events/ClientTicketFormPost.php
@@ -1,28 +1,25 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
-
- }
+class ClientTicketFormPost extends Event
+{
+ use SerializesModels;
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/Event.php b/app/Events/Event.php
index d59f7690f..ba2f88838 100644
--- a/app/Events/Event.php
+++ b/app/Events/Event.php
@@ -1,7 +1,8 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
-
+class FaveoAfterReply extends Event
+{
+ use SerializesModels;
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/FormRegisterEvent.php b/app/Events/FormRegisterEvent.php
index fe0bc0f51..c5398916f 100644
--- a/app/Events/FormRegisterEvent.php
+++ b/app/Events/FormRegisterEvent.php
@@ -1,31 +1,30 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/LoginEvent.php b/app/Events/LoginEvent.php
index 899084513..486a8f8c8 100644
--- a/app/Events/LoginEvent.php
+++ b/app/Events/LoginEvent.php
@@ -1,31 +1,29 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
-
+class LoginEvent extends Event
+{
+ use SerializesModels;
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/PostRegisterEvent.php b/app/Events/PostRegisterEvent.php
index 1d116ace7..e75f90c7d 100644
--- a/app/Events/PostRegisterEvent.php
+++ b/app/Events/PostRegisterEvent.php
@@ -1,30 +1,29 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
+class PostRegisterEvent extends Event
+{
+ use SerializesModels;
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/ReadMailEvent.php b/app/Events/ReadMailEvent.php
index f3c6b7cbd..9ecaf66ae 100644
--- a/app/Events/ReadMailEvent.php
+++ b/app/Events/ReadMailEvent.php
@@ -1,31 +1,29 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
-
+class ReadMailEvent extends Event
+{
+ use SerializesModels;
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/TicketBoxHeader.php b/app/Events/TicketBoxHeader.php
index 05c78ae48..4a2d4a4b1 100644
--- a/app/Events/TicketBoxHeader.php
+++ b/app/Events/TicketBoxHeader.php
@@ -1,30 +1,29 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
+class TicketBoxHeader extends Event
+{
+ use SerializesModels;
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/TicketDetailTable.php b/app/Events/TicketDetailTable.php
index b5f05a84a..e630efd07 100644
--- a/app/Events/TicketDetailTable.php
+++ b/app/Events/TicketDetailTable.php
@@ -1,30 +1,29 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
+class TicketDetailTable extends Event
+{
+ use SerializesModels;
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/TimeLineFormEvent.php b/app/Events/TimeLineFormEvent.php
index 3417a1773..b795dd585 100644
--- a/app/Events/TimeLineFormEvent.php
+++ b/app/Events/TimeLineFormEvent.php
@@ -1,30 +1,29 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
+class TimeLineFormEvent extends Event
+{
+ use SerializesModels;
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/Timeline.php b/app/Events/Timeline.php
index 52cb947ba..e8ba8c913 100644
--- a/app/Events/Timeline.php
+++ b/app/Events/Timeline.php
@@ -1,31 +1,30 @@
-para1 = $para1;
- $this->para2 = $para2;
- $this->para3 = $para3;
- $this->para4 = $para4;
- $this->para5 = $para5;
- }
+ public $para1;
+ public $para2;
+ public $para3;
+ public $para4;
+ public $para5;
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
+ {
+ $this->para1 = $para1;
+ $this->para2 = $para2;
+ $this->para3 = $para3;
+ $this->para4 = $para4;
+ $this->para5 = $para5;
+ }
}
diff --git a/app/Events/TopNavEvent.php b/app/Events/TopNavEvent.php
index 74c56f7e5..019681f79 100644
--- a/app/Events/TopNavEvent.php
+++ b/app/Events/TopNavEvent.php
@@ -1,21 +1,20 @@
-json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
//dd($e);
- } else if ($e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException) {
+ } elseif ($e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException) {
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
}
@@ -81,13 +85,13 @@ class Handler extends ExceptionHandler {
return parent::render($request, $e);
}
- protected function renderExceptionWithWhoops(Exception $e) {
- $whoops = new \Whoops\Run;
+ protected function renderExceptionWithWhoops(Exception $e)
+ {
+ $whoops = new \Whoops\Run();
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
return new \Illuminate\Http\Response(
$whoops->handleException($e), $e->getStatusCode(), $e->getHeaders()
);
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/AgentController.php b/app/Http/Controllers/Admin/helpdesk/AgentController.php
index d2158967a..b8ca005af 100644
--- a/app/Http/Controllers/Admin/helpdesk/AgentController.php
+++ b/app/Http/Controllers/Admin/helpdesk/AgentController.php
@@ -3,47 +3,47 @@
namespace App\Http\Controllers\Admin\helpdesk;
// controller
-use App\Http\Controllers\Controller;
-use App\Http\Controllers\Common\SettingsController;
use App\Http\Controllers\Common\PhpMailController;
+use App\Http\Controllers\Common\SettingsController;
+use App\Http\Controllers\Controller;
// request
use App\Http\Requests\helpdesk\AgentRequest;
use App\Http\Requests\helpdesk\AgentUpdate;
// model
-use App\User;
use App\Model\helpdesk\Agent\Assign_team_agent;
use App\Model\helpdesk\Agent\Department;
use App\Model\helpdesk\Agent\Groups;
use App\Model\helpdesk\Agent\Teams;
-use App\Model\helpdesk\Utility\Timezones;
+use App\Model\helpdesk\Email\Emails;
use App\Model\helpdesk\Settings\Company;
use App\Model\helpdesk\Settings\Email;
-use App\Model\helpdesk\Email\Emails;
+use App\Model\helpdesk\Utility\Timezones;
+use App\User;
// classes
use DB;
-use Mail;
-use Hash;
use Exception;
+use Hash;
+use Mail;
/**
* AgentController
- * This controller is used to CRUD category
+ * This controller is used to CRUD category.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class AgentController extends Controller {
-
+class AgentController extends Controller
+{
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
- * 3. roles must be agent
+ * 3. roles must be agent.
+ *
* @return void
*/
- public function __construct(PhpMailController $PhpMailController) {
+ public function __construct(PhpMailController $PhpMailController)
+ {
$this->PhpMailController = $PhpMailController;
SettingsController::smtp();
// checking authentication
@@ -53,11 +53,14 @@ class AgentController extends Controller {
}
/**
- * Get all agent list page
+ * Get all agent list page.
+ *
* @param type User $user
+ *
* @return type Response
*/
- public function index() {
+ public function index()
+ {
try {
return view('themes.default1.admin.helpdesk.agent.agents.index');
} catch (Exception $e) {
@@ -66,21 +69,25 @@ class AgentController extends Controller {
}
/**
- * creating a new agent
+ * creating a new agent.
+ *
* @param type Assign_team_agent $team_assign_agent
- * @param type Timezones $timezone
- * @param type Groups $group
- * @param type Department $department
- * @param type Teams $team
+ * @param type Timezones $timezone
+ * @param type Groups $group
+ * @param type Department $department
+ * @param type Teams $team
+ *
* @return type view
*/
- public function create(Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team) {
+ public function create(Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team)
+ {
try {
$team = $team->get();
$timezones = $timezone->get();
$groups = $group->get();
$departments = $department->get();
$teams = $team->lists('id', 'name');
+
return view('themes.default1.admin.helpdesk.agent.agents.create', compact('assign', 'teams', 'agents', 'timezones', 'groups', 'departments', 'team'));
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->errorInfo[2]);
@@ -88,13 +95,16 @@ class AgentController extends Controller {
}
/**
- * store a new agent
- * @param type User $user
- * @param type AgentRequest $request
+ * store a new agent.
+ *
+ * @param type User $user
+ * @param type AgentRequest $request
* @param type Assign_team_agent $team_assign_agent
+ *
* @return type Response
*/
- public function store(User $user, AgentRequest $request, Assign_team_agent $team_assign_agent) {
+ public function store(User $user, AgentRequest $request, Assign_team_agent $team_assign_agent)
+ {
// dd($this->system_mail());
@@ -120,6 +130,7 @@ class AgentController extends Controller {
} catch (Exception $e) {
return redirect('agents')->with('fails', 'Some error occured while sending mail to the agent. Please check email settings and try again');
}
+
return redirect('agents')->with('success', 'Agent Created sucessfully');
} else {
return redirect('agents')->with('fails', 'Agent can not Create');
@@ -127,17 +138,20 @@ class AgentController extends Controller {
}
/**
- * Editing a selected agent
- * @param type int $id
- * @param type User $user
+ * Editing a selected agent.
+ *
+ * @param type int $id
+ * @param type User $user
* @param type Assign_team_agent $team_assign_agent
- * @param type Timezones $timezone
- * @param type Groups $group
- * @param type Department $department
- * @param type Teams $team
+ * @param type Timezones $timezone
+ * @param type Groups $group
+ * @param type Department $department
+ * @param type Teams $team
+ *
* @return type Response
*/
- public function edit($id, User $user, Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team) {
+ public function edit($id, User $user, Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team)
+ {
try {
$user = $user->whereId($id)->first();
$team = $team->get();
@@ -148,6 +162,7 @@ class AgentController extends Controller {
$table = $team_assign_agent->where('agent_id', $id)->first();
$teams = $team->lists('id', 'name');
$assign = $team_assign_agent->where('agent_id', $id)->lists('team_id');
+
return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'selectedTeams', 'user', 'timezones', 'groups', 'departments', 'team', 'exp', 'counted'));
} catch (Exception $e) {
return redirect('agents')->with('fail', 'No such file');
@@ -156,13 +171,16 @@ class AgentController extends Controller {
/**
* Update the specified agent in storage.
- * @param type int $id
- * @param type User $user
- * @param type AgentUpdate $request
+ *
+ * @param type int $id
+ * @param type User $user
+ * @param type AgentUpdate $request
* @param type Assign_team_agent $team_assign_agent
+ *
* @return type Response
*/
- public function update($id, User $user, AgentUpdate $request, Assign_team_agent $team_assign_agent) {
+ public function update($id, User $user, AgentUpdate $request, Assign_team_agent $team_assign_agent)
+ {
// storing all the details
$user = $user->whereId($id)->first();
@@ -181,20 +199,24 @@ class AgentController extends Controller {
//Todo For success and failure conditions
try {
$user->fill($request->except('daylight_save', 'limit_access', 'directory_listing', 'vocation_mode', 'assign_team'))->save();
+
return redirect('agents')->with('success', 'Agent Updated sucessfully');
} catch (Exception $e) {
- return redirect('agents')->with('fails', 'Agent did not update' . '
' . $e->errorInfo[2] . '
');
+ return redirect('agents')->with('fails', 'Agent did not update'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Remove the specified agent from storage.
- * @param type int $id
- * @param type User $user
+ *
+ * @param type int $id
+ * @param type User $user
* @param type Assign_team_agent $team_assign_agent
+ *
* @return type Response
*/
- public function destroy($id, User $user, Assign_team_agent $team_assign_agent) {
+ public function destroy($id, User $user, Assign_team_agent $team_assign_agent)
+ {
/* Becouse of foreign key we delete team_assign_agent first */
error_reporting(E_ALL & ~E_NOTICE);
$team_assign_agent = $team_assign_agent->where('agent_id', $id);
@@ -205,43 +227,52 @@ class AgentController extends Controller {
$user->id;
$user->delete();
throw new \Exception($error);
+
return redirect('agents')->with('success', 'Agent Deleted sucessfully');
} catch (\Exception $e) {
dd($e->errorInfo);
+
return redirect('agents')->with('fails', $error);
}
}
/**
- * Generate a random string for password
+ * Generate a random string for password.
+ *
* @param type $length
+ *
* @return type string
*/
- public function generateRandomString($length = 10) {
+ public function generateRandomString($length = 10)
+ {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
+
return $randomString;
}
/**
- * Fetching comapny name to send mail
+ * Fetching comapny name to send mail.
+ *
* @return type
*/
- public function company() {
+ public function company()
+ {
$company = Company::Where('id', '=', '1')->first();
if ($company->company_name == null) {
- $company = "Support Center";
+ $company = 'Support Center';
} else {
$company = $company->company_name;
}
+
return $company;
}
- /**
+ /*
* System default email
*/
// public function system_mail() {
diff --git a/app/Http/Controllers/Admin/helpdesk/BanlistController.php b/app/Http/Controllers/Admin/helpdesk/BanlistController.php
index ae7c32730..29b05d4a7 100644
--- a/app/Http/Controllers/Admin/helpdesk/BanlistController.php
+++ b/app/Http/Controllers/Admin/helpdesk/BanlistController.php
@@ -8,29 +8,30 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\helpdesk\BanlistRequest;
use App\Http\Requests\helpdesk\BanRequest;
// model
-use App\User;
use App\Model\helpdesk\Email\Banlist;
+use App\User;
//classes
use Exception;
/**
* BanlistController
- * In this controller in the CRUD function for all the banned emails
- * @package Controllers
- * @subpackage Controller
+ * In this controller in the CRUD function for all the banned emails.
+ *
* @author Ladybird
*/
-class BanlistController extends Controller {
-
+class BanlistController extends Controller
+{
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
- * 3. roles must be agent
+ * 3. roles must be agent.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
// checking authentication
$this->middleware('auth');
// checking admin roles
@@ -39,12 +40,16 @@ class BanlistController extends Controller {
/**
* Display a listing of the resource.
+ *
* @param type Banlist $ban
+ *
* @return type Response
*/
- public function index() {
+ public function index()
+ {
try {
$bans = User::where('ban', '=', 1)->get();
+
return view('themes.default1.admin.helpdesk.emails.banlist.index', compact('bans'));
} catch (Exception $e) {
return view('404');
@@ -53,9 +58,11 @@ class BanlistController extends Controller {
/**
* Show the form for creating a new resource.
+ *
* @return type Response
*/
- public function create() {
+ public function create()
+ {
try {
return view('themes.default1.admin.helpdesk.emails.banlist.create');
} catch (Exception $e) {
@@ -65,12 +72,15 @@ class BanlistController extends Controller {
/**
* Store a newly created resource in storage.
- * @param type banlist $ban
+ *
+ * @param type banlist $ban
* @param type BanRequest $request
- * @param type User $user
+ * @param type User $user
+ *
* @return type Response
*/
- public function store(BanRequest $request, User $user) {
+ public function store(BanRequest $request, User $user)
+ {
// dd($request);
try {
//adding field to user whether it is banned or not
@@ -83,11 +93,12 @@ class BanlistController extends Controller {
// $user->create($request->input())->save();
return redirect('banlist')->with('success', 'Email Banned sucessfully');
} else {
- $user = new User;
+ $user = new User();
$user->email = $adban;
$user->ban = $request->input('ban');
$user->internal_note = $request->input('internal_note');
$user->save();
+
return redirect('banlist')->with('success', 'Email Banned sucessfully');
}
} catch (Exception $e) {
@@ -98,22 +109,28 @@ class BanlistController extends Controller {
/**
* Display the specified resource.
*
- * @param int $id
+ * @param int $id
+ *
* @return Response
*/
- public function show($id) {
+ public function show($id)
+ {
//
}
/**
* Show the form for editing the specified resource.
- * @param type int $id
+ *
+ * @param type int $id
* @param type Banlist $ban
+ *
* @return type Response
*/
- public function edit($id, User $ban) {
+ public function edit($id, User $ban)
+ {
try {
$bans = $ban->whereId($id)->first();
+
return view('themes.default1.admin.helpdesk.emails.banlist.edit', compact('bans'));
} catch (Exception $e) {
return view('404');
@@ -122,12 +139,15 @@ class BanlistController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type Banlist $ban
+ *
+ * @param type int $id
+ * @param type Banlist $ban
* @param type BanlistRequest $request
+ *
* @return type Response
*/
- public function update($id, User $ban, BanlistRequest $request) {
+ public function update($id, User $ban, BanlistRequest $request)
+ {
try {
$bans = $ban->whereId($id)->first();
$bans->internal_note = $request->input('internal_note');
@@ -143,7 +163,7 @@ class BanlistController extends Controller {
}
}
- /**
+ /*
* Remove the specified resource from storage.
* @param type int $id
* @param type Banlist $ban
diff --git a/app/Http/Controllers/Admin/helpdesk/DepartmentController.php b/app/Http/Controllers/Admin/helpdesk/DepartmentController.php
index b6122cb21..749eb942f 100644
--- a/app/Http/Controllers/Admin/helpdesk/DepartmentController.php
+++ b/app/Http/Controllers/Admin/helpdesk/DepartmentController.php
@@ -9,46 +9,50 @@ use App\Http\Requests\helpdesk\DepartmentRequest;
use App\Http\Requests\helpdesk\DepartmentUpdate;
// model
use App\Model\helpdesk\Agent\Department;
-use App\Model\helpdesk\Agent\Groups;
use App\Model\helpdesk\Agent\Group_assign_department;
+use App\Model\helpdesk\Agent\Groups;
use App\Model\helpdesk\Agent\Teams;
use App\Model\helpdesk\Email\Emails;
use App\Model\helpdesk\Email\Template;
+use App\Model\helpdesk\Manage\Help_topic;
use App\Model\helpdesk\Manage\Sla_plan;
use App\Model\helpdesk\Settings\System;
use App\Model\helpdesk\Ticket\Tickets;
-use App\Model\helpdesk\Manage\Help_topic;
use App\User;
// classes
use DB;
use Exception;
/**
- * DepartmentController
+ * DepartmentController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class DepartmentController extends Controller {
-
+class DepartmentController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
$this->middleware('auth');
$this->middleware('roles');
}
/**
- * Get index page
+ * Get index page.
+ *
* @param type Department $department
+ *
* @return type Response
*/
- public function index(Department $department) {
+ public function index(Department $department)
+ {
try {
$departments = $department->get();
+
return view('themes.default1.admin.helpdesk.agent.departments.index', compact('departments'));
} catch (Exception $e) {
return view('404');
@@ -57,16 +61,19 @@ class DepartmentController extends Controller {
/**
* Show the form for creating a new resource.
- * @param type User $user
+ *
+ * @param type User $user
* @param type Group_assign_department $group_assign_department
- * @param type Department $department
- * @param type Sla_plan $sla
- * @param type Template $template
- * @param type Emails $email
- * @param type Groups $group
+ * @param type Department $department
+ * @param type Sla_plan $sla
+ * @param type Template $template
+ * @param type Emails $email
+ * @param type Groups $group
+ *
* @return type Response
*/
- public function create(User $user, Group_assign_department $group_assign_department, Department $department, Sla_plan $sla, Template $template, Emails $email, Groups $group) {
+ public function create(User $user, Group_assign_department $group_assign_department, Department $department, Sla_plan $sla, Template $template, Emails $email, Groups $group)
+ {
try {
$slas = $sla->get();
$user = $user->where('role', 'agent')->get();
@@ -74,6 +81,7 @@ class DepartmentController extends Controller {
$templates = $template->get();
$department = $department->get();
$groups = $group->lists('id', 'name');
+
return view('themes.default1.admin.helpdesk.agent.departments.create', compact('department', 'templates', 'slas', 'user', 'emails', 'groups'));
} catch (Exception $e) {
return view('404');
@@ -82,11 +90,14 @@ class DepartmentController extends Controller {
/**
* Store a newly created resource in storage.
- * @param type Department $department
+ *
+ * @param type Department $department
* @param type DepartmentRequest $request
+ *
* @return type Response
*/
- public function store(Department $department, DepartmentRequest $request) {
+ public function store(Department $department, DepartmentRequest $request)
+ {
try {
$department->fill($request->except('group_id', 'manager'))->save();
$requests = $request->input('group_id');
@@ -113,18 +124,21 @@ class DepartmentController extends Controller {
/**
* Show the form for editing the specified resource.
- * @param type int $id
- * @param type User $user
+ *
+ * @param type int $id
+ * @param type User $user
* @param type Group_assign_department $group_assign_department
- * @param type Template $template
- * @param type Teams $team
- * @param type Department $department
- * @param type Sla_plan $sla
- * @param type Emails $email
- * @param type Groups $group
+ * @param type Template $template
+ * @param type Teams $team
+ * @param type Department $department
+ * @param type Sla_plan $sla
+ * @param type Emails $email
+ * @param type Groups $group
+ *
* @return type Response
*/
- public function edit($id, User $user, Group_assign_department $group_assign_department, Template $template, Teams $team, Department $department, Sla_plan $sla, Emails $email, Groups $group) {
+ public function edit($id, User $user, Group_assign_department $group_assign_department, Template $template, Teams $team, Department $department, Sla_plan $sla, Emails $email, Groups $group)
+ {
try {
$slas = $sla->get();
$user = $user->where('role', 'agent')->get();
@@ -133,6 +147,7 @@ class DepartmentController extends Controller {
$departments = $department->whereId($id)->first();
$groups = $group->lists('id', 'name');
$assign = $group_assign_department->where('department_id', $id)->lists('group_id');
+
return view('themes.default1.admin.helpdesk.agent.departments.edit', compact('assign', 'team', 'templates', 'departments', 'slas', 'user', 'emails', 'groups'));
} catch (Exception $e) {
return view('404');
@@ -141,13 +156,16 @@ class DepartmentController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
+ *
+ * @param type int $id
* @param type Group_assign_department $group_assign_department
- * @param type Department $department
- * @param type DepartmentUpdate $request
+ * @param type Department $department
+ * @param type DepartmentUpdate $request
+ *
* @return type Response
*/
- public function update($id, Group_assign_department $group_assign_department, Department $department, DepartmentUpdate $request) {
+ public function update($id, Group_assign_department $group_assign_department, Department $department, DepartmentUpdate $request)
+ {
// dd($id);
try {
$table = $group_assign_department->where('department_id', $id);
@@ -177,12 +195,15 @@ class DepartmentController extends Controller {
/**
* Remove the specified resource from storage.
- * @param type int $id
- * @param type Department $department
+ *
+ * @param type int $id
+ * @param type Department $department
* @param type Group_assign_department $group_assign_department
+ *
* @return type Response
*/
- public function destroy($id, Department $department, Group_assign_department $group_assign_department, System $system, Tickets $tickets) {
+ public function destroy($id, Department $department, Group_assign_department $group_assign_department, System $system, Tickets $tickets)
+ {
// try {
$system = $system->where('id', '=', '1')->first();
if ($system->department == $id) {
@@ -191,54 +212,53 @@ class DepartmentController extends Controller {
$tickets = DB::table('tickets')->where('dept_id', '=', $id)->update(['dept_id' => $system->department]);
if ($tickets > 0) {
if ($tickets > 1) {
- $text_tickets = "Tickets";
+ $text_tickets = 'Tickets';
} else {
- $text_tickets = "Ticket";
+ $text_tickets = 'Ticket';
}
- $ticket = '
' . $tickets . ' ' . $text_tickets . ' have been moved to default department
';
+ $ticket = '
'.$tickets.' '.$text_tickets.' have been moved to default department
';
} else {
- $helptopic = "";
+ $helptopic = '';
}
- $message = $ticket . $user . $email . $helptopic;
+ $message = $ticket.$user.$email.$helptopic;
/* Becouse of foreign key we delete group_assign_department first */
$group_assign_department = $group_assign_department->where('department_id', $id);
$group_assign_department->delete();
$departments = $department->whereId($id)->first();
/* Check the function is Success or Fail */
if ($departments->delete() == true) {
- return redirect('departments')->with('success', 'Department Deleted sucessfully' . $message);
+ return redirect('departments')->with('success', 'Department Deleted sucessfully'.$message);
} else {
return redirect('departments')->with('fails', 'Department can not Delete');
}
}
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/EmailsController.php b/app/Http/Controllers/Admin/helpdesk/EmailsController.php
index c8259403c..a4a10f8ab 100644
--- a/app/Http/Controllers/Admin/helpdesk/EmailsController.php
+++ b/app/Http/Controllers/Admin/helpdesk/EmailsController.php
@@ -11,39 +11,43 @@ use App\Http\Requests\helpdesk\EmailsRequest;
use App\Model\helpdesk\Agent\Department;
use App\Model\helpdesk\Email\Emails;
use App\Model\helpdesk\Manage\Help_topic;
-use App\Model\helpdesk\Utility\MailboxProtocol;
-use App\Model\helpdesk\Ticket\Ticket_Priority;
use App\Model\helpdesk\Settings\Email;
+use App\Model\helpdesk\Ticket\Ticket_Priority;
+use App\Model\helpdesk\Utility\MailboxProtocol;
// classes
use Crypt;
use Exception;
/**
- * EmailsController
+ * EmailsController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class EmailsController extends Controller {
-
+class EmailsController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return type
*/
- public function __construct() {
+ public function __construct()
+ {
$this->middleware('auth');
$this->middleware('roles');
}
/**
* Display a listing of the resource.
+ *
* @param type Emails $emails
+ *
* @return type Response
*/
- public function index(Emails $emails) {
+ public function index(Emails $emails)
+ {
try {
$emails = $emails->get();
+
return view('themes.default1.admin.helpdesk.emails.emails.index', compact('emails'));
} catch (Exception $e) {
return view('404');
@@ -52,18 +56,22 @@ class EmailsController extends Controller {
/**
* Show the form for creating a new resource.
- * @param type Department $department
- * @param type Help_topic $help
- * @param type Priority $priority
+ *
+ * @param type Department $department
+ * @param type Help_topic $help
+ * @param type Priority $priority
* @param type MailboxProtocol $mailbox_protocol
+ *
* @return type Response
*/
- public function create(Department $department, Help_topic $help, Ticket_Priority $priority, MailboxProtocol $mailbox_protocol) {
+ public function create(Department $department, Help_topic $help, Ticket_Priority $priority, MailboxProtocol $mailbox_protocol)
+ {
try {
$departments = $department->get();
$helps = $help->get();
$priority = $priority->get();
$mailbox_protocols = $mailbox_protocol->get();
+
return view('themes.default1.admin.helpdesk.emails.emails.create', compact('mailbox_protocols', 'priority', 'departments', 'helps'));
} catch (Exception $e) {
return view('404');
@@ -72,11 +80,14 @@ class EmailsController extends Controller {
/**
* Store a newly created resource in storage.
- * @param type Emails $email
+ *
+ * @param type Emails $email
* @param type EmailsRequest $request
+ *
* @return type Response
*/
- public function store(Emails $email, EmailsRequest $request) {
+ public function store(Emails $email, EmailsRequest $request)
+ {
try {
$password = $request->input('password');
$encrypted = Crypt::encrypt($password);
@@ -115,30 +126,36 @@ class EmailsController extends Controller {
/**
* Display the specified resource.
*
- * @param int $id
+ * @param int $id
+ *
* @return Response
*/
- public function show($id) {
+ public function show($id)
+ {
//
}
/**
* Show the form for editing the specified resource.
- * @param type int $id
- * @param type Department $department
- * @param type Help_topic $help
- * @param type Emails $email
- * @param type Priority $priority
+ *
+ * @param type int $id
+ * @param type Department $department
+ * @param type Help_topic $help
+ * @param type Emails $email
+ * @param type Priority $priority
* @param type MailboxProtocol $mailbox_protocol
+ *
* @return type Response
*/
- public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $priority, MailboxProtocol $mailbox_protocol) {
+ public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $priority, MailboxProtocol $mailbox_protocol)
+ {
try {
$emails = $email->whereId($id)->first();
$departments = $department->get();
$helps = $help->get();
$priority = $priority->get();
$mailbox_protocols = $mailbox_protocol->get();
+
return view('themes.default1.admin.helpdesk.emails.emails.edit', compact('mailbox_protocols', 'priority', 'departments', 'helps', 'emails'));
} catch (Exception $e) {
return view('404');
@@ -147,12 +164,15 @@ class EmailsController extends Controller {
/**
* Update the specified resource in storage.
- * @param type $id
- * @param type Emails $email
+ *
+ * @param type $id
+ * @param type Emails $email
* @param type EmailsEditRequest $request
+ *
* @return type Response
*/
- public function update($id, Emails $email, EmailsEditRequest $request) {
+ public function update($id, Emails $email, EmailsEditRequest $request)
+ {
$password = $request->input('password');
$encrypted = Crypt::encrypt($password);
//echo $encrypted;
@@ -179,6 +199,7 @@ class EmailsController extends Controller {
}
$emails->password = $encrypted;
$emails->save();
+
return redirect('emails')->with('success', 'Email Updated sucessfully');
} catch (Exception $e) {
return redirect('emails')->with('fails', 'Email not updated');
@@ -187,11 +208,14 @@ class EmailsController extends Controller {
/**
* Remove the specified resource from storage.
- * @param type int $id
+ *
+ * @param type int $id
* @param type Emails $email
+ *
* @return type Response
*/
- public function destroy($id, Emails $email) {
+ public function destroy($id, Emails $email)
+ {
$default_system_email = Email::where('id', '=', '1')->first();
if ($default_system_email->id) {
if ($id == $default_system_email->id) {
@@ -209,5 +233,4 @@ class EmailsController extends Controller {
return redirect('emails')->with('fails', 'Email can not Delete ');
}
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/FormController.php b/app/Http/Controllers/Admin/helpdesk/FormController.php
index 4aa013c55..786c87546 100644
--- a/app/Http/Controllers/Admin/helpdesk/FormController.php
+++ b/app/Http/Controllers/Admin/helpdesk/FormController.php
@@ -13,58 +13,66 @@ use Illuminate\Http\Request;
// Class
use Input;
use Redirect;
-use Exception;
/**
* FormController
- * This controller is used to CRUD Custom Forms
+ * This controller is used to CRUD Custom Forms.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class FormController extends Controller {
-
+class FormController extends Controller
+{
private $fields;
private $forms;
- public function __construct(Fields $fields, Forms $forms) {
+ public function __construct(Fields $fields, Forms $forms)
+ {
$this->fields = $fields;
$this->forms = $forms;
// $this->middleware('auth');
}
/**
- * home
+ * home.
+ *
* @return type
*/
- public function home() {
+ public function home()
+ {
return view('forms.home');
}
/**
- * list of forms
- * @param type Forms $forms
+ * list of forms.
+ *
+ * @param type Forms $forms
+ *
* @return Response
*/
- public function index(Forms $forms) {
+ public function index(Forms $forms)
+ {
return view('themes.default1.admin.helpdesk.manage.form.index', compact('forms'));
}
/**
* Show the form for creating a new resource.
+ *
* @return Response
*/
- public function create() {
+ public function create()
+ {
return view('themes.default1.admin.helpdesk.manage.form.form');
}
/**
* Display the specified resource.
- * @param int $id
+ *
+ * @param int $id
+ *
* @return Response
*/
- public function show($id) {
+ public function show($id)
+ {
return view('themes.default1.admin.helpdesk.manage.form.preview', compact('id'));
}
@@ -73,13 +81,14 @@ class FormController extends Controller {
*
* @return Response
*/
- public function store(Forms $forms) {
+ public function store(Forms $forms)
+ {
if (!Input::get('formname')) {
return Redirect::back()->with('fails', 'Please fill Form name');
}
$required = Input::get('required');
$count = count($required);
- $require = array();
+ $require = [];
for ($i = 2; $i < $count + 2; $i++) {
for ($j = 0; $j < 1; $j++) {
array_push($require, $required[$i][$j]);
@@ -88,24 +97,26 @@ class FormController extends Controller {
$forms->formname = Input::get('formname');
$forms->save();
$count = count(Input::get('name'));
- $fields = array();
+ $fields = [];
for ($i = 0; $i <= $count; $i++) {
if (!empty(Input::get('name')[$i])) {
- array_push($fields, array(
+ array_push($fields, [
'forms_id' => $forms->id,
- 'label' => Input::get('label')[$i],
- 'name' => Input::get('name')[$i],
- 'type' => Input::get('type')[$i],
- 'value' => Input::get('value')[$i],
+ 'label' => Input::get('label')[$i],
+ 'name' => Input::get('name')[$i],
+ 'type' => Input::get('type')[$i],
+ 'value' => Input::get('value')[$i],
'required' => $require[$i],
- ));
+ ]);
}
}
Fields::insert($fields);
+
return Redirect::back()->with('success', 'Successfully created Form');
}
- public function delete($id, Forms $forms, Fields $field, Help_topic $help_topic) {
+ public function delete($id, Forms $forms, Fields $field, Help_topic $help_topic)
+ {
$fields = $field->where('forms_id', $id)->get();
$help_topics = $help_topic->where('custom_form', '=', $id)->get();
foreach ($help_topics as $help_topic) {
@@ -117,7 +128,7 @@ class FormController extends Controller {
}
$forms = $forms->where('id', $id)->first();
$forms->delete();
+
return redirect()->back()->with('success', 'Deleted Successfully');
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/GroupController.php b/app/Http/Controllers/Admin/helpdesk/GroupController.php
index 139b55b54..9e8392cc7 100644
--- a/app/Http/Controllers/Admin/helpdesk/GroupController.php
+++ b/app/Http/Controllers/Admin/helpdesk/GroupController.php
@@ -6,45 +6,49 @@ namespace App\Http\Controllers\Admin\helpdesk;
use App\Http\Controllers\Controller;
// requests
use App\Http\Requests\helpdesk\GroupRequest;
-use Illuminate\Http\Request;
-// models
use App\Model\helpdesk\Agent\Department;
-use App\Model\helpdesk\Agent\Groups;
+// models
use App\Model\helpdesk\Agent\Group_assign_department;
+use App\Model\helpdesk\Agent\Groups;
use App\User;
-// classes
-use Illuminate\Support\Facades\Input;
use Exception;
+// classes
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Input;
/**
- * GroupController
+ * GroupController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class GroupController extends Controller {
-
+class GroupController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return type void
*/
- public function __construct() {
+ public function __construct()
+ {
$this->middleware('auth');
$this->middleware('roles');
}
/**
* Display a listing of the resource.
- * @param type Groups $group
- * @param type Department $department
+ *
+ * @param type Groups $group
+ * @param type Department $department
* @param type Group_assign_department $group_assign_department
+ *
* @return type Response
*/
- public function index(Groups $group, Department $department, Group_assign_department $group_assign_department) {
+ public function index(Groups $group, Department $department, Group_assign_department $group_assign_department)
+ {
try {
$groups = $group->get();
$departments = $department->lists('id');
+
return view('themes.default1.admin.helpdesk.agent.groups.index', compact('departments', 'group_assign_department', 'groups'));
} catch (Exception $e) {
return view('404');
@@ -53,9 +57,11 @@ class GroupController extends Controller {
/**
* Show the form for creating a new resource.
+ *
* @return type Response
*/
- public function create() {
+ public function create()
+ {
try {
return view('themes.default1.admin.helpdesk.agent.groups.create');
} catch (Exception $e) {
@@ -65,44 +71,55 @@ class GroupController extends Controller {
/**
* Store a newly created resource in storage.
- * @param type Groups $group
+ *
+ * @param type Groups $group
* @param type GroupRequest $request
+ *
* @return type Response
*/
- public function store(Groups $group, GroupRequest $request) {
+ public function store(Groups $group, GroupRequest $request)
+ {
try {
/* Check Whether function success or not */
$group->fill($request->input())->save();
+
return redirect('groups')->with('success', 'Group Created Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('groups')->with('fails', 'Groups can not Create' . '
' . $e->errorInfo[2] . '
');
+ return redirect('groups')->with('fails', 'Groups can not Create'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Show the form for editing the specified resource.
- * @param type int $id
+ *
+ * @param type int $id
* @param type Groups $group
+ *
* @return type Response
*/
- public function edit($id, Groups $group) {
+ public function edit($id, Groups $group)
+ {
try {
$groups = $group->whereId($id)->first();
+
return view('themes.default1.admin.helpdesk.agent.groups.edit', compact('groups'));
} catch (Exception $e) {
- return redirect('groups')->with('fails', 'Groups can not Create' . '
' . $e->errorInfo[2] . '
');
+ return redirect('groups')->with('fails', 'Groups can not Create'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type Groups $group
+ *
+ * @param type int $id
+ * @param type Groups $group
* @param type Request $request
+ *
* @return type Response
*/
- public function update($id, Groups $group, Request $request) {
+ public function update($id, Groups $group, Request $request)
+ {
$var = $group->whereId($id)->first();
//Updating Status
$status = $request->Input('group_status');
@@ -153,22 +170,26 @@ class GroupController extends Controller {
return redirect('groups')->with('success', 'Group Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('groups')->with('fails', 'Groups can not Create' . '
' . $e->errorInfo[2] . '
');
+ return redirect('groups')->with('fails', 'Groups can not Create'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Remove the specified resource from storage.
- * @param type int $id
- * @param type Groups $group
+ *
+ * @param type int $id
+ * @param type Groups $group
* @param type Group_assign_department $group_assign_department
+ *
* @return type Response
*/
- public function destroy($id, Groups $group, Group_assign_department $group_assign_department) {
+ public function destroy($id, Groups $group, Group_assign_department $group_assign_department)
+ {
$users = User::where('assign_group', '=', $id)->first();
if ($users) {
$user = '
There are agents assigned to this group. Please unassign them from this group to delete
' . $emails . ' System ' . $text_emails . ' have been moved to default Help Topic
';
+ $email = '
'.$emails.' System '.$text_emails.' have been moved to default Help Topic
';
} else {
- $email = "";
+ $email = '';
}
- $message = $ticket . $email;
+ $message = $ticket.$email;
$topics = $topic->whereId($id)->first();
/* Check whether function success or not */
try {
$topics->delete();
/* redirect to Index page with Success Message */
- return redirect('helptopic')->with('success', 'Helptopic Deleted Successfully' . $message);
+ return redirect('helptopic')->with('success', 'Helptopic Deleted Successfully'.$message);
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('helptopic')->with('fails', 'Helptopic can not Delete' . '
' . $e->errorInfo[2] . '
');
+ return redirect('helptopic')->with('fails', 'Helptopic can not Delete'.'
'.$e->errorInfo[2].'
');
}
}
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/HomeController.php b/app/Http/Controllers/Admin/helpdesk/HomeController.php
index 7a2744c8d..c9e942bb4 100644
--- a/app/Http/Controllers/Admin/helpdesk/HomeController.php
+++ b/app/Http/Controllers/Admin/helpdesk/HomeController.php
@@ -10,17 +10,17 @@ namespace App\Http\Controllers\Admin\helpdesk;
* are authenticated. Of course, you are free to change or remove the
* controller as you wish. It is just here to get your app started!
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class HomeController extends Controller {
-
+class HomeController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
$this->middleware('auth');
}
@@ -29,8 +29,8 @@ class HomeController extends Controller {
*
* @return Response
*/
- public function index() {
+ public function index()
+ {
return view('themes/default1/admin/dashboard');
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/LanguageController.php b/app/Http/Controllers/Admin/helpdesk/LanguageController.php
index c7a178bdd..5bf526f4d 100644
--- a/app/Http/Controllers/Admin/helpdesk/LanguageController.php
+++ b/app/Http/Controllers/Admin/helpdesk/LanguageController.php
@@ -3,55 +3,55 @@
namespace App\Http\Controllers\Admin\helpdesk;
// controllers
-use App\Http\Controllers\Controller;
+use App;
// requests
-use App\Http\Requests;
-use Illuminate\Http\Request;
+use App\Http\Controllers\Controller;
//supports
+use App\Http\Requests;
+use Cache;
+use Config;
+//classes
+use File;
+use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Session;
-use Illuminate\Support\Collection;
-//classes
use Input;
-use Config;
-use Validator;
-use Zipper;
-use App;
use Lang;
-use Cache;
-use File;
-use Exception;
+use Validator;
/**
- * SlaController
+ * SlaController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class LanguageController extends Controller {
-
+class LanguageController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return type void
*/
- public function __construct() {
+ public function __construct()
+ {
$this->middleware('auth');
$this->middleware('roles');
}
/**
- * Switch language at runtime
+ * Switch language at runtime.
+ *
* @param type "" $lang
+ *
* @return type response
*/
- public function switchLanguage($lang) {
+ public function switchLanguage($lang)
+ {
//if(Cache::has('language'))
//{
// return Cache::get('language');
//} else return 'false';
// Cache::put('language',$)
- $path = '../resources/lang'; // Path to check available language packages
+ $path = base_path('resources/lang'); // Path to check available language packages
if (array_key_exists($lang, Config::get('languages')) && in_array($lang, scandir($path))) {
// dd(array_key_exists($lang, Config::get('languages')));
// app()->setLocale($lang);
@@ -60,55 +60,63 @@ class LanguageController extends Controller {
// dd(Cache::get('language'));
// dd()
} else {
- return Redirect::back()->with('fails', Lang::get("lang.language-error"));
+ return Redirect::back()->with('fails', Lang::get('lang.language-error'));
}
+
return Redirect::back();
}
/**
- * Shows language page
+ * Shows language page.
+ *
* @return type response
*/
- public function index() {
+ public function index()
+ {
return view('themes.default1.admin.helpdesk.language.index');
}
/**
- * Shows Language upload form
+ * Shows Language upload form.
+ *
* @return type response
*/
- public function getForm() {
+ public function getForm()
+ {
return view('themes.default1.admin.helpdesk.language.create');
}
/**
- * Provide language datatable to language page
- * @return type
+ * Provide language datatable to language page.
+ *
+ * @return type
*/
- public function getLanguages() {
- $path = '../resources/lang';
+ public function getLanguages()
+ {
+ $path = base_path('resources/lang');
$values = scandir($path); //Extracts names of directories present in lang directory
- $values = array_slice($values, 2); // skips array element $value[0] = '.' & $value[1] = '..'
+ $values = array_slice($values, 2); // skips array element $value[0] = '.' & $value[1] = '..'
return \Datatable::collection(new Collection($values))
- ->addColumn('language', function($model) {
- return Config::get('languages.' . $model);
+ ->addColumn('language', function ($model) {
+ return Config::get('languages.'.$model);
})
- ->addColumn('id', function($model) {
+ ->addColumn('id', function ($model) {
return $model;
})
- ->addColumn('status', function($model) {
+ ->addColumn('status', function ($model) {
if (Lang::getLocale() === $model) {
- return "" . Lang::trans("lang.active") . "";
- } else
- return "" . Lang::trans("lang.inactive") . "";
- })
- ->addColumn('Action', function($model) {
- if (Lang::getLocale() === $model) {
- return "
- " . Lang::trans("lang.delete") . "";
+ return "".Lang::trans('lang.active').'';
} else {
- return "
- " . Lang::trans("lang.delete") . "";
+ return "".Lang::trans('lang.inactive').'';
+ }
+ })
+ ->addColumn('Action', function ($model) {
+ if (Lang::getLocale() === $model) {
+ return "
+ ".Lang::trans('lang.delete').'';
+ } else {
+ return "
+ ".Lang::trans('lang.delete').'';
}
})
->searchColumns('language', 'id')
@@ -116,23 +124,25 @@ class LanguageController extends Controller {
}
/**
- * handle language file uploading
- * @return response
+ * handle language file uploading.
+ *
+ * @return response
*/
- public function postForm() {
+ public function postForm()
+ {
// getting all of the post data
- $file = array(
- 'File' => Input::file('File'),
+ $file = [
+ 'File' => Input::file('File'),
'language-name' => Input::input('language-name'),
- 'iso-code' => Input::input('iso-code')
- );
+ 'iso-code' => Input::input('iso-code'),
+ ];
// setting up rules
- $rules = array(
- 'File' => 'required|mimes:zip|max:30000',
+ $rules = [
+ 'File' => 'required|mimes:zip|max:30000',
'language-name' => 'required',
- 'iso-code' => 'required|max:2'
- ); // and for max size
+ 'iso-code' => 'required|max:2',
+ ]; // and for max size
// doing the validation, passing post data, rules and the messages
$validator = Validator::make($file, $rules);
if ($validator->fails()) {
@@ -141,18 +151,19 @@ class LanguageController extends Controller {
return Redirect::back()->withInput()->withErrors($validator);
} else {
-
//Checking if package already exists or not in lang folder
- $path = '../resources/lang';
+ $path = base_path('resources/lang');
if (in_array(strtolower(Input::get('iso-code')), scandir($path))) {
//sending back with error message
Session::flash('fails', Lang::get('lang.package_exist'));
- Session::flash('link', "change-language/" . strtolower(Input::get('iso-code')));
+ Session::flash('link', 'change-language/'.strtolower(Input::get('iso-code')));
+
return Redirect::back()->withInput();
- } elseif (!array_key_exists(strtolower(Input::get('iso-code')), Config::get('languages'))) {//Checking Valid ISO code form Languages.php
+ } elseif (!array_key_exists(strtolower(Input::get('iso-code')), Config::get('languages'))) {//Checking Valid ISO code form Languages.php
//sending back with error message
Session::flash('fails', Lang::get('lang.iso-code-error'));
+
return Redirect::back()->withInput();
} else {
@@ -160,11 +171,11 @@ class LanguageController extends Controller {
if (Input::file('File')->isValid()) {
$name = Input::file('File')->getClientOriginalName(); //uploaded file's original name
$destinationPath = '../public/uploads/'; // defining uploading path
- $extractpath = '../resources/lang/' . strtolower(Input::get('iso-code')); //defining extracting path
+ $extractpath = '../resources/lang/'.strtolower(Input::get('iso-code')); //defining extracting path
mkdir($extractpath); //creating directroy for extracting uploadd file
//mkdir($destinationPath);
Input::file('File')->move($destinationPath, $name); // uploading file to given path
- \Zipper::make($destinationPath . '/' . $name)->extractTo($extractpath); //extracting file to give path
+ \Zipper::make($destinationPath.'/'.$name)->extractTo($extractpath); //extracting file to give path
//check if Zip extract foldercontains any subfolder
$directories = File::directories($extractpath);
//$directories = glob($extractpath. '/*' , GLOB_ONLYDIR);
@@ -174,18 +185,21 @@ class LanguageController extends Controller {
if ($success) {
//sending back with error message
Session::flash('fails', Lang::get('lang.zipp-error'));
- Session::flash('link2', "http://www.ladybirdweb.com/support/show/how-to-translate-faveo-into-multiple-languages");
+ Session::flash('link2', 'http://www.ladybirdweb.com/support/show/how-to-translate-faveo-into-multiple-languages');
+
return Redirect::back()->withInput();
}
} else {
// sending back with success message
- Session::flash('success', Lang::get("lang.upload-success"));
- Session::flash('link', "change-language/" . strtolower(Input::get('iso-code')));
+ Session::flash('success', Lang::get('lang.upload-success'));
+ Session::flash('link', 'change-language/'.strtolower(Input::get('iso-code')));
+
return Redirect::route('LanguageController');
}
} else {
// sending back with error message.
- Session::flash('fails', Lang::get("lang.file-error"));
+ Session::flash('fails', Lang::get('lang.file-error'));
+
return Redirect::route('form');
}
}
@@ -193,36 +207,43 @@ class LanguageController extends Controller {
}
/**
- * allow user to download language template file
+ * allow user to download language template file.
+ *
* @return type
*/
- Public function download() {
+ public function download()
+ {
return response()->download('../public/downloads/en.zip');
}
/**
- * This function is used to delete languages
- * @param type $lang
+ * This function is used to delete languages.
+ *
+ * @param type $lang
+ *
* @return type response
*/
- public function deleteLanguage($lang) {
+ public function deleteLanguage($lang)
+ {
if ($lang !== App::getLocale()) {
- $deletePath = '../resources/lang/' . $lang; //define file path to delete
+ $deletePath = base_path('resources/lang').$lang; //define file path to delete
$success = File::deleteDirectory($deletePath); //remove extracted folder and it's subfolder from lang
if ($success) {
//sending back with success message
Session::flash('success', Lang::get('lang.delete-success'));
+
return Redirect::back();
} else {
//sending back with error message
Session::flash('fails', Lang::get('lang.lang-doesnot-exist'));
+
return Redirect::back();
}
} else {
//sending back with error message
Session::flash('fails', Lang::get('lang.active-lang-error'));
+
return redirect('languages');
}
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/ProfileController.php b/app/Http/Controllers/Admin/helpdesk/ProfileController.php
index cb34fb0eb..9be3cbdf6 100644
--- a/app/Http/Controllers/Admin/helpdesk/ProfileController.php
+++ b/app/Http/Controllers/Admin/helpdesk/ProfileController.php
@@ -11,33 +11,35 @@ use App\Http\Requests\ProfileRequest;
use App\User;
// classes
use Auth;
+use Exception;
use Hash;
use Input;
-use Exception;
/**
- * ProfileController
+ * ProfileController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class ProfileController extends Controller {
-
+class ProfileController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return type void
*/
- public function __construct() {
+ public function __construct()
+ {
$this->middleware('auth');
$this->middleware('roles');
}
/**
- * Get profile page
+ * Get profile page.
+ *
* @return type Response
*/
- public function getProfile() {
+ public function getProfile()
+ {
try {
$user = Auth::user();
if ($user) {
@@ -51,10 +53,12 @@ class ProfileController extends Controller {
}
/**
- * Get profile Edit page
+ * Get profile Edit page.
+ *
* @return type Response
*/
- public function getProfileedit() {
+ public function getProfileedit()
+ {
try {
$user = Auth::user();
if ($user) {
@@ -68,12 +72,15 @@ class ProfileController extends Controller {
}
/**
- * Post profile page
- * @param type int $id
+ * Post profile page.
+ *
+ * @param type int $id
* @param type ProfileRequest $request
+ *
* @return type Response
*/
- public function postProfile($id, ProfileRequest $request) {
+ public function postProfile($id, ProfileRequest $request)
+ {
$user = Auth::user();
$user->gender = $request->input('gender');
$user->save();
@@ -92,12 +99,13 @@ class ProfileController extends Controller {
//$extension = Input::file('profile_pic')->getClientOriginalExtension();
$name = Input::file('profile_pic')->getClientOriginalName();
$destinationPath = 'lb-faveo/profilepic';
- $fileName = rand(0000, 9999) . '.' . $name;
+ $fileName = rand(0000, 9999).'.'.$name;
//echo $fileName;
Input::file('profile_pic')->move($destinationPath, $fileName);
$user->profile_pic = $fileName;
} else {
$user->fill($request->except('profile_pic', 'gender'))->save();
+
return redirect('guest')->with('success', 'Profile Updated sucessfully');
}
if ($user->fill($request->except('profile_pic'))->save()) {
@@ -106,22 +114,25 @@ class ProfileController extends Controller {
}
/**
- * Post Profile password page
- * @param type int $id
- * @param type User $user
+ * Post Profile password page.
+ *
+ * @param type int $id
+ * @param type User $user
* @param type ProfilePassword $request
+ *
* @return type Response
*/
- public function postProfilePassword($id, User $user, ProfilePassword $request) {
+ public function postProfilePassword($id, User $user, ProfilePassword $request)
+ {
$user = Auth::user();
//echo $user->password;
if (Hash::check($request->input('old_password'), $user->getAuthPassword())) {
$user->password = Hash::make($request->input('new_password'));
$user->save();
+
return redirect('guest')->with('success', 'Password Updated sucessfully');
} else {
return redirect('guest')->with('fails', 'Password was not Updated');
}
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/SettingsController.php b/app/Http/Controllers/Admin/helpdesk/SettingsController.php
index 1c9b1c49f..674d27f78 100644
--- a/app/Http/Controllers/Admin/helpdesk/SettingsController.php
+++ b/app/Http/Controllers/Admin/helpdesk/SettingsController.php
@@ -21,51 +21,55 @@ use App\Model\helpdesk\Settings\Email;
use App\Model\helpdesk\Settings\Responder;
use App\Model\helpdesk\Settings\System;
use App\Model\helpdesk\Settings\Ticket;
+use App\Model\helpdesk\Ticket\Ticket_Priority;
use App\Model\helpdesk\Utility\Date_format;
use App\Model\helpdesk\Utility\Date_time_format;
-use App\Model\helpdesk\Ticket\Ticket_Priority;
-use App\Model\helpdesk\Utility\Timezones;
use App\Model\helpdesk\Utility\Time_format;
+use App\Model\helpdesk\Utility\Timezones;
// classes
+use Exception;
use Illuminate\Http\Request;
use Input;
-use Exception;
/**
- * SettingsController
+ * SettingsController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class SettingsController extends Controller {
-
+class SettingsController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
// $this->smtp();
$this->middleware('auth');
$this->middleware('roles');
}
/**
- * Main Settings Page
+ * Main Settings Page.
+ *
* @return type view
*/
- public function settings() {
+ public function settings()
+ {
return view('themes.default1.admin.helpdesk.setting');
}
/**
* @param int $id
- * @return Response
* @param $compant instance of company table
*
* get the form for company setting page
+ *
+ * @return Response
*/
- public function getcompany(Company $company) {
+ public function getcompany(Company $company)
+ {
try {
/* fetch the values of company from company table */
$companys = $company->whereId('1')->first();
@@ -78,18 +82,21 @@ class SettingsController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type Company $company
- * @param type CompanyRequest $request
+ *
+ * @param type int $id
+ * @param type Company $company
+ * @param type CompanyRequest $request
+ *
* @return Response
*/
- public function postcompany($id, Company $company, CompanyRequest $request) {
+ public function postcompany($id, Company $company, CompanyRequest $request)
+ {
/* fetch the values of company request */
$companys = $company->whereId('1')->first();
if (Input::file('logo')) {
$name = Input::file('logo')->getClientOriginalName();
$destinationPath = 'lb-faveo/media/company/';
- $fileName = rand(0000, 9999) . '.' . $name;
+ $fileName = rand(0000, 9999).'.'.$name;
Input::file('logo')->move($destinationPath, $fileName);
$companys->logo = $fileName;
}
@@ -103,21 +110,24 @@ class SettingsController extends Controller {
return redirect('getcompany')->with('success', 'Company Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('getcompany')->with('fails', 'Company can not Updated' . '
' . $e->errorInfo[2] . '
');
+ return redirect('getcompany')->with('fails', 'Company can not Updated'.'
'.$e->errorInfo[2].'
');
}
}
/**
- * get the form for System setting page
- * @param type System $system
- * @param type Department $department
- * @param type Timezones $timezone
- * @param type Date_format $date
+ * get the form for System setting page.
+ *
+ * @param type System $system
+ * @param type Department $department
+ * @param type Timezones $timezone
+ * @param type Date_format $date
* @param type Date_time_format $date_time
- * @param type Time_format $time
+ * @param type Time_format $time
+ *
* @return type Response
*/
- public function getsystem(System $system, Department $department, Timezones $timezone, Date_format $date, Date_time_format $date_time, Time_format $time) {
+ public function getsystem(System $system, Department $department, Timezones $timezone, Date_format $date, Date_time_format $date_time, Time_format $time)
+ {
try {
/* fetch the values of system from system table */
$systems = $system->whereId('1')->first();
@@ -134,12 +144,15 @@ class SettingsController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type System $system
+ *
+ * @param type int $id
+ * @param type System $system
* @param type SystemRequest $request
+ *
* @return type Response
*/
- public function postsystem($id, System $system, SystemRequest $request) {
+ public function postsystem($id, System $system, SystemRequest $request)
+ {
try {
// dd($request);
/* fetch the values of system request */
@@ -151,19 +164,22 @@ class SettingsController extends Controller {
return redirect('getsystem')->with('success', 'System Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('getsystem')->with('fails', 'System can not Updated' . '
' . $e->errorInfo[2] . '
');
+ return redirect('getsystem')->with('fails', 'System can not Updated'.'
'.$e->errorInfo[2].'
');
}
}
/**
- * get the form for Ticket setting page
- * @param type Ticket $ticket
- * @param type Sla_plan $sla
+ * get the form for Ticket setting page.
+ *
+ * @param type Ticket $ticket
+ * @param type Sla_plan $sla
* @param type Help_topic $topic
- * @param type Priority $priority
+ * @param type Priority $priority
+ *
* @return type Response
*/
- public function getticket(Ticket $ticket, Sla_plan $sla, Help_topic $topic, Ticket_Priority $priority) {
+ public function getticket(Ticket $ticket, Sla_plan $sla, Help_topic $topic, Ticket_Priority $priority)
+ {
try {
/* fetch the values of ticket from ticket table */
$tickets = $ticket->whereId('1')->first();
@@ -180,12 +196,15 @@ class SettingsController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type Ticket $ticket
+ *
+ * @param type int $id
+ * @param type Ticket $ticket
* @param type Request $request
+ *
* @return type Response
*/
- public function postticket($id, Ticket $ticket, Request $request) {
+ public function postticket($id, Ticket $ticket, Request $request)
+ {
try {
/* fetch the values of ticket request */
$tickets = $ticket->whereId('1')->first();
@@ -206,18 +225,21 @@ class SettingsController extends Controller {
return redirect('getticket')->with('success', 'Ticket Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('getticket')->with('fails', 'Ticket can not Updated' . '
' . $e->errorInfo[2] . '
');
+ return redirect('getticket')->with('fails', 'Ticket can not Updated'.'
'.$e->errorInfo[2].'
');
}
}
/**
- * get the form for Email setting page
- * @param type Email $email
+ * get the form for Email setting page.
+ *
+ * @param type Email $email
* @param type Template $template
- * @param type Emails $email1
+ * @param type Emails $email1
+ *
* @return type Response
*/
- public function getemail(Email $email, Template $template, Emails $email1) {
+ public function getemail(Email $email, Template $template, Emails $email1)
+ {
try {
/* fetch the values of email from Email table */
$emails = $email->whereId('1')->first();
@@ -234,12 +256,15 @@ class SettingsController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type Email $email
+ *
+ * @param type int $id
+ * @param type Email $email
* @param type EmailRequest $request
+ *
* @return type Response
*/
- public function postemail($id, Email $email, EmailRequest $request) {
+ public function postemail($id, Email $email, EmailRequest $request)
+ {
try {
/* fetch the values of email request */
$emails = $email->whereId('1')->first();
@@ -258,20 +283,22 @@ class SettingsController extends Controller {
return redirect('getemail')->with('success', 'Email Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('getemail')->with('fails', 'Email can not Updated' . '
' . $e->errorInfo[2] . '
');
+ return redirect('getemail')->with('fails', 'Email can not Updated'.'
'.$e->errorInfo[2].'
');
}
}
/**
- * get the form for Access setting page
+ * get the form for Access setting page.
+ *
* @param type Access $access
+ *
* @return type Response
*/
// public function getaccess(Access $access) {
// try {
// /* fetch the values of access from access table */
// $accesses = $access->whereId('1')->first();
-// // Direct to Access Settings Page
+// // Direct to Access Settings Page
// return view('themes.default1.admin.helpdesk.settings.access', compact('accesses'));
// } catch (Exception $e) {
// return view('404');
@@ -280,8 +307,10 @@ class SettingsController extends Controller {
/**
* Update the specified resource in storage.
- * @param type Access $access
+ *
+ * @param type Access $access
* @param type Request $request
+ *
* @return type Response
*/
// public function postaccess(Access $access, Request $request) {
@@ -310,11 +339,14 @@ class SettingsController extends Controller {
// }
/**
- * get the form for Responder setting page
+ * get the form for Responder setting page.
+ *
* @param type Responder $responder
+ *
* @return type Response
*/
- public function getresponder(Responder $responder) {
+ public function getresponder(Responder $responder)
+ {
try {
/* fetch the values of responder from responder table */
$responders = $responder->whereId('1')->first();
@@ -327,11 +359,14 @@ class SettingsController extends Controller {
/**
* Update the specified resource in storage.
+ *
* @param type Responder $responder
- * @param type Request $request
+ * @param type Request $request
+ *
* @return type
*/
- public function postresponder(Responder $responder, Request $request) {
+ public function postresponder(Responder $responder, Request $request)
+ {
try {
/* fetch the values of responder request */
$responders = $responder->whereId('1')->first();
@@ -348,16 +383,19 @@ class SettingsController extends Controller {
return redirect('getresponder')->with('success', 'Responder Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('getresponder')->with('fails', 'Responder can not Updated' . '
' . $e->errorInfo[2] . '
');
+ return redirect('getresponder')->with('fails', 'Responder can not Updated'.'
'.$e->errorInfo[2].'
');
}
}
/**
- * get the form for Alert setting page
+ * get the form for Alert setting page.
+ *
* @param type Alert $alert
+ *
* @return type Response
*/
- public function getalert(Alert $alert) {
+ public function getalert(Alert $alert)
+ {
try {
/* fetch the values of alert from alert table */
$alerts = $alert->whereId('1')->first();
@@ -370,12 +408,15 @@ class SettingsController extends Controller {
/**
* Update the specified resource in storage.
- * @param type $id
- * @param type Alert $alert
+ *
+ * @param type $id
+ * @param type Alert $alert
* @param type Request $request
+ *
* @return type Response
*/
- public function postalert($id, Alert $alert, Request $request) {
+ public function postalert($id, Alert $alert, Request $request)
+ {
try {
/* fetch the values of alert request */
$alerts = $alert->whereId('1')->first();
@@ -430,38 +471,46 @@ class SettingsController extends Controller {
return redirect('getalert')->with('success', 'Alert Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('getalert')->with('fails', 'Alert can not Updated' . '
' . $e->errorInfo[2] . '
');
+ return redirect('getalert')->with('fails', 'Alert can not Updated'.'
'.$e->errorInfo[2].'
');
}
}
/**
- * To display the list of ratings in the system
+ * To display the list of ratings in the system.
+ *
* @return type View
*/
- public function RatingSettings() {
+ public function RatingSettings()
+ {
$ratings = DB::table('settings_ratings')->get();
+
return view('themes.default1.admin.helpdesk.settings.ratings', compact('ratings'));
}
/**
- * To store rating data
+ * To store rating data.
+ *
* @return type Redirect
*/
- public function PostRatingSettings($slug) {
+ public function PostRatingSettings($slug)
+ {
$name = Input::get('rating_name');
$publish = Input::get('publish');
$modify = Input::get('modify');
- DB::table('settings_ratings')->whereSlug($slug)->update(array('rating_name' => $name, 'publish' => $publish, 'modify' => $modify));
+ DB::table('settings_ratings')->whereSlug($slug)->update(['rating_name' => $name, 'publish' => $publish, 'modify' => $modify]);
+
return redirect()->back()->with('success', 'Successfully updated');
}
/**
- * To delete a type of rating
+ * To delete a type of rating.
+ *
* @return type Redirect
*/
- public function RatingDelete($slug) {
+ public function RatingDelete($slug)
+ {
DB::table('settings_ratings')->whereSlug($slug)->delete();
+
return redirect()->back()->with('success', 'Successfully Deleted');
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/SlaController.php b/app/Http/Controllers/Admin/helpdesk/SlaController.php
index 2dd8c69c5..7dee75a9c 100644
--- a/app/Http/Controllers/Admin/helpdesk/SlaController.php
+++ b/app/Http/Controllers/Admin/helpdesk/SlaController.php
@@ -15,29 +15,32 @@ use DB;
use Exception;
/**
- * SlaController
+ * SlaController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class SlaController extends Controller {
-
+class SlaController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return type void
*/
- public function __construct() {
+ public function __construct()
+ {
$this->middleware('auth');
$this->middleware('roles');
}
/**
* Display a listing of the resource.
+ *
* @param type Sla_plan $sla
+ *
* @return type Response
*/
- public function index(Sla_plan $sla) {
+ public function index(Sla_plan $sla)
+ {
try {
/* Declare a Variable $slas to store all Values From Sla_plan Table */
$slas = $sla->get();
@@ -50,9 +53,11 @@ class SlaController extends Controller {
/**
* Show the form for creating a new resource.
+ *
* @return type Response
*/
- public function create() {
+ public function create()
+ {
try {
/* Direct to Create Page */
return view('themes.default1.admin.helpdesk.manage.sla.create');
@@ -63,11 +68,14 @@ class SlaController extends Controller {
/**
* Store a newly created resource in storage.
- * @param type Sla_plan $sla
+ *
+ * @param type Sla_plan $sla
* @param type SlaRequest $request
+ *
* @return type Response
*/
- public function store(Sla_plan $sla, SlaRequest $request) {
+ public function store(Sla_plan $sla, SlaRequest $request)
+ {
try {
/* Fill the request values to Sla_plan Table */
/* Check whether function success or not */
@@ -76,21 +84,25 @@ class SlaController extends Controller {
return redirect('sla')->with('success', 'SLA Plan Created Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('sla')->with('fails', 'SLA Plan can not Create' . '
' . $e->errorInfo[2] . '
');
+ return redirect('sla')->with('fails', 'SLA Plan can not Create'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Show the form for editing the specified resource.
- * @param type int $id
+ *
+ * @param type int $id
* @param type Sla_plan $sla
+ *
* @return type Response
*/
- public function edit($id, Sla_plan $sla) {
+ public function edit($id, Sla_plan $sla)
+ {
try {
/* Direct to edit page along values of perticular field using Id */
$slas = $sla->whereId($id)->first();
$slas->get();
+
return view('themes.default1.admin.helpdesk.manage.sla.edit', compact('slas'));
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->errorInfo[2]);
@@ -99,12 +111,15 @@ class SlaController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type Sla_plan $sla
+ *
+ * @param type int $id
+ * @param type Sla_plan $sla
* @param type SlaUpdate $request
+ *
* @return type Response
*/
- public function update($id, Sla_plan $sla, SlaUpdate $request) {
+ public function update($id, Sla_plan $sla, SlaUpdate $request)
+ {
try {
/* Fill values to selected field using Id except Check box */
$slas = $sla->whereId($id)->first();
@@ -119,17 +134,20 @@ class SlaController extends Controller {
return redirect('sla')->with('success', 'SLA Plan Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('sla')->with('fails', 'SLA Plan can not Update' . '
' . $e->errorInfo[2] . '
');
+ return redirect('sla')->with('fails', 'SLA Plan can not Update'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Remove the specified resource from storage.
- * @param type int $id
+ *
+ * @param type int $id
* @param type Sla_plan $sla
+ *
* @return type Response
*/
- public function destroy($id, Sla_plan $sla) {
+ public function destroy($id, Sla_plan $sla)
+ {
$default_sla = Ticket::where('id', '=', '1')->first();
if ($default_sla->sla == $id) {
return redirect('departments')->with('fails', 'You cannot delete default department');
@@ -137,49 +155,48 @@ class SlaController extends Controller {
$tickets = DB::table('tickets')->where('sla', '=', $id)->update(['sla' => $default_sla->sla]);
if ($tickets > 0) {
if ($tickets > 1) {
- $text_tickets = "Tickets";
+ $text_tickets = 'Tickets';
} else {
- $text_tickets = "Ticket";
+ $text_tickets = 'Ticket';
}
- $ticket = '
' . $tickets . ' ' . $text_tickets . ' have been moved to default SLA
';
+ $ticket = '
'.$tickets.' '.$text_tickets.' have been moved to default SLA
Associated Help Topic have been moved to default SLA
';
} else {
- $topic = "";
+ $topic = '';
}
- $message = $ticket . $dept . $topic;
+ $message = $ticket.$dept.$topic;
/* Delete a perticular field from the database by delete() using Id */
$slas = $sla->whereId($id)->first();
/* Check whether function success or not */
try {
$slas->delete();
/* redirect to Index page with Success Message */
- return redirect('sla')->with('success', 'SLA Plan Deleted Successfully' . $message);
+ return redirect('sla')->with('success', 'SLA Plan Deleted Successfully'.$message);
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('sla')->with('fails', 'SLA Plan can not Delete' . '
' . $e->errorInfo[2] . '
');
+ return redirect('sla')->with('fails', 'SLA Plan can not Delete'.'
'.$e->errorInfo[2].'
');
}
}
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/TeamController.php b/app/Http/Controllers/Admin/helpdesk/TeamController.php
index 396c996d7..0af3a5d77 100644
--- a/app/Http/Controllers/Admin/helpdesk/TeamController.php
+++ b/app/Http/Controllers/Admin/helpdesk/TeamController.php
@@ -16,35 +16,39 @@ use DB;
use Exception;
/**
- * TeamController
+ * TeamController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class TeamController extends Controller {
-
+class TeamController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return type void
*/
- public function __construct() {
+ public function __construct()
+ {
$this->middleware('auth');
$this->middleware('roles');
}
/**
- * get Index page
- * @param type Teams $team
+ * get Index page.
+ *
+ * @param type Teams $team
* @param type Assign_team_agent $assign_team_agent
+ *
* @return type Response
*/
- public function index(Teams $team, Assign_team_agent $assign_team_agent) {
+ public function index(Teams $team, Assign_team_agent $assign_team_agent)
+ {
try {
$teams = $team->get();
/* find out the Number of Members in the Team */
$id = $teams->lists('id');
$assign_team_agent = $assign_team_agent->get();
+
return view('themes.default1.admin.helpdesk.agent.teams.index', compact('assign_team_agent', 'teams'));
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->errorInfo[2]);
@@ -53,12 +57,16 @@ class TeamController extends Controller {
/**
* Show the form for creating a new resource.
+ *
* @param type User $user
+ *
* @return type Response
*/
- public function create(User $user) {
+ public function create(User $user)
+ {
try {
$user = $user->get();
+
return view('themes.default1.admin.helpdesk.agent.teams.create', compact('user'));
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->errorInfo[2]);
@@ -67,12 +75,14 @@ class TeamController extends Controller {
/**
* Store a newly created resource in storage.
- * @param type Teams $team
+ *
+ * @param type Teams $team
* @param type TeamRequest $request
+ *
* @return type Response
*/
- public function store(Teams $team, TeamRequest $request) {
-
+ public function store(Teams $team, TeamRequest $request)
+ {
if ($request->team_lead) {
$team_lead = $request->team_lead;
} else {
@@ -86,24 +96,28 @@ class TeamController extends Controller {
return redirect('teams')->with('success', 'Teams Created Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('teams')->with('fails', 'Teams can not Create' . '
' . $e->errorInfo[2] . '
');
+ return redirect('teams')->with('fails', 'Teams can not Create'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Show the form for editing the specified resource.
- * @param type $id
- * @param type User $user
+ *
+ * @param type $id
+ * @param type User $user
* @param type Assign_team_agent $assign_team_agent
- * @param type Teams $team
+ * @param type Teams $team
+ *
* @return type Response
*/
- public function edit($id, User $user, Assign_team_agent $assign_team_agent, Teams $team) {
+ public function edit($id, User $user, Assign_team_agent $assign_team_agent, Teams $team)
+ {
try {
$user = $user->whereId($id)->first();
$teams = $team->whereId($id)->first();
$agent_team = $assign_team_agent->where('team_id', $id)->get();
$agent_id = $agent_team->lists('agent_id', 'agent_id');
+
return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams', 'allagents'));
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->errorInfo[2]);
@@ -112,13 +126,15 @@ class TeamController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type Teams $team
+ *
+ * @param type int $id
+ * @param type Teams $team
* @param type TeamUpdate $request
+ *
* @return type Response
*/
- public function update($id, Teams $team, TeamUpdate $request) {
-
+ public function update($id, Teams $team, TeamUpdate $request)
+ {
$teams = $team->whereId($id)->first();
//updating check box
if ($request->team_lead) {
@@ -140,18 +156,21 @@ class TeamController extends Controller {
return redirect('teams')->with('success', 'Teams Updated Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('teams')->with('fails', 'Teams can not Update' . '
' . $e->errorInfo[2] . '
');
+ return redirect('teams')->with('fails', 'Teams can not Update'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Remove the specified resource from storage.
- * @param type int $id
- * @param type Teams $team
+ *
+ * @param type int $id
+ * @param type Teams $team
* @param type Assign_team_agent $assign_team_agent
+ *
* @return type Response
*/
- public function destroy($id, Teams $team, Assign_team_agent $assign_team_agent) {
+ public function destroy($id, Teams $team, Assign_team_agent $assign_team_agent)
+ {
try {
$assign_team_agent->where('team_id', $id)->delete();
$teams = $team->whereId($id)->first();
@@ -162,8 +181,7 @@ class TeamController extends Controller {
return redirect('teams')->with('success', 'Teams Deleted Successfully');
} catch (Exception $e) {
/* redirect to Index page with Fails Message */
- return redirect('teams')->with('fails', 'Teams can not Delete' . '
' . $e->errorInfo[2] . '
');
+ return redirect('teams')->with('fails', 'Teams can not Delete'.'
'.$e->errorInfo[2].'
');
}
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/TemplateController.php b/app/Http/Controllers/Admin/helpdesk/TemplateController.php
index 9e55e240d..02c639377 100644
--- a/app/Http/Controllers/Admin/helpdesk/TemplateController.php
+++ b/app/Http/Controllers/Admin/helpdesk/TemplateController.php
@@ -3,9 +3,9 @@
namespace App\Http\Controllers\Admin\helpdesk;
// controllers
-use App\Http\Controllers\Controller;
-use App\Http\Controllers\Common\SettingsController;
use App\Http\Controllers\Common\PhpMailController;
+use App\Http\Controllers\Common\SettingsController;
+use App\Http\Controllers\Controller;
// requests
use App\Http\Requests\helpdesk\TemplateRequest;
use App\Http\Requests\helpdesk\TemplateUdate;
@@ -14,25 +14,25 @@ use App\Model\helpdesk\Email\Emails;
use App\Model\helpdesk\Email\Template;
use App\Model\helpdesk\Utility\Languages;
// classes
-use Illuminate\Http\Request;
-use Mail;
use Exception;
+use Illuminate\Http\Request;
use Input;
+use Mail;
/**
- * TemplateController
+ * TemplateController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class TemplateController extends Controller {
-
+class TemplateController extends Controller
+{
/**
* Create a new controller instance.
+ *
* @return type void
*/
- public function __construct(PhpMailController $PhpMailController) {
+ public function __construct(PhpMailController $PhpMailController)
+ {
$this->PhpMailController = $PhpMailController;
SettingsController::smtp();
$this->middleware('auth');
@@ -41,12 +41,16 @@ class TemplateController extends Controller {
/**
* Display a listing of the resource.
+ *
* @param type Template $template
+ *
* @return type Response
*/
- public function index(Template $template) {
+ public function index(Template $template)
+ {
try {
$templates = $template->get();
+
return view('themes.default1.admin.helpdesk.emails.template.index', compact('templates'));
} catch (Exception $e) {
return view('404');
@@ -55,14 +59,18 @@ class TemplateController extends Controller {
/**
* Show the form for creating a new resource.
+ *
* @param type Languages $language
- * @param type Template $template
+ * @param type Template $template
+ *
* @return type Response
*/
- public function create(Languages $language, Template $template) {
+ public function create(Languages $language, Template $template)
+ {
try {
$templates = $template->get();
$languages = $language->get();
+
return view('themes.default1.admin.helpdesk.emails.template.create', compact('languages', 'templates'));
} catch (Exception $e) {
return view('404');
@@ -71,11 +79,14 @@ class TemplateController extends Controller {
/**
* Store a newly created resource in storage.
- * @param type Template $template
+ *
+ * @param type Template $template
* @param type TemplateRequest $request
+ *
* @return type Response
*/
- public function store(Template $template, TemplateRequest $request) {
+ public function store(Template $template, TemplateRequest $request)
+ {
try {
/* Check whether function success or not */
if ($template->fill($request->input())->save() == true) {
@@ -93,49 +104,60 @@ class TemplateController extends Controller {
/**
* Display the specified resource.
- * @param int $id
+ *
+ * @param int $id
+ *
* @return Response
*/
- public function show($id) {
+ public function show($id)
+ {
//
}
/**
* Show the form for editing the specified resource.
- * @param type $id
- * @param type Template $template
+ *
+ * @param type $id
+ * @param type Template $template
* @param type Languages $language
+ *
* @return type Response
*/
- public function listdirectories() {
+ public function listdirectories()
+ {
$path = '../resources/views/emails/';
$directories = scandir($path);
$directory = str_replace('/', '-', $path);
+
return view('themes.default1.admin.helpdesk.emails.template.listdirectories', compact('directories', 'directory'));
}
- public function listtemplates($template, $path) {
+ public function listtemplates($template, $path)
+ {
$paths = str_replace('-', '/', $path);
- $directory2 = $paths . $template;
+ $directory2 = $paths.$template;
$templates = scandir($directory2);
- $directory = str_replace('/', '-', $directory2 . '/');
+ $directory = str_replace('/', '-', $directory2.'/');
+
return view('themes.default1.admin.helpdesk.emails.template.listtemplates', compact('templates', 'directory'));
}
- public function readtemplate($template, $path) {
+ public function readtemplate($template, $path)
+ {
$directory = str_replace('-', '/', $path);
- $handle = fopen($directory . $template, "r");
- $contents = fread($handle, filesize($directory . $template));
+ $handle = fopen($directory.$template, 'r');
+ $contents = fread($handle, filesize($directory.$template));
fclose($handle);
return view('themes.default1.admin.helpdesk.emails.template.readtemplates', compact('contents', 'template', 'path'));
}
- public function createtemplate() {
+ public function createtemplate()
+ {
$directory = '../resources/views/emails/';
$fname = Input::get('folder_name');
- $filename = $directory . $fname;
+ $filename = $directory.$fname;
// images folder creation using php
// $mydir = dirname( __FILE__ )."/html/images";
@@ -147,32 +169,37 @@ class TemplateController extends Controller {
if (!file_exists($filename)) {
mkdir($filename, 0777);
}
- $files = array_filter(scandir($directory . 'default'));
+ $files = array_filter(scandir($directory.'default'));
foreach ($files as $file) {
- if ($file === '.' or $file === '..')
+ if ($file === '.' or $file === '..') {
continue;
+ }
if (!is_dir($file)) {
// $file_to_go = str_replace("code/resources/views/emails/",'code/resources/views/emails/'.$fname,$file);
- $destination = $directory . $fname . '/';
+ $destination = $directory.$fname.'/';
- copy($directory . 'default/' . $file, $destination . $file);
+ copy($directory.'default/'.$file, $destination.$file);
}
}
+
return \Redirect::back()->with('success', 'Successfully copied');
}
- public function writetemplate($template, $path) {
+ public function writetemplate($template, $path)
+ {
$directory = str_replace('-', '/', $path);
$b = Input::get('templatedata');
- file_put_contents($directory . $template, print_r($b, true));
+ file_put_contents($directory.$template, print_r($b, true));
+
return \Redirect::back()->with('success', 'Successfully updated');
}
- public function deletetemplate($template, $path) {
+ public function deletetemplate($template, $path)
+ {
$directory = str_replace('-', '/', $path);
- $dir = $directory . $template;
+ $dir = $directory.$template;
$status = \DB::table('settings_email')->first();
if ($template == 'default' or $template == $status->template) {
return \Redirect::back()->with('fails', 'You cannot delete a default or active directory!');
@@ -180,26 +207,31 @@ class TemplateController extends Controller {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
- if ($object != "." && $object != "..") {
- unlink($dir . "/" . $object);
+ if ($object != '.' && $object != '..') {
+ unlink($dir.'/'.$object);
}
}
rmdir($dir);
} else {
rmdir($dir);
}
+
return \Redirect::back()->with('success', 'Successfully Deleted');
}
- public function activateset($setname) {
- \DB::table('settings_email')->update(array('template' => $setname));
+ public function activateset($setname)
+ {
+ \DB::table('settings_email')->update(['template' => $setname]);
+
return \Redirect::back()->with('success', 'You have Successfully Activated this Set');
}
- public function edit($id, Template $template, Languages $language) {
+ public function edit($id, Template $template, Languages $language)
+ {
try {
$templates = $template->whereId($id)->first();
$languages = $language->get();
+
return view('themes.default1.admin.helpdesk.emails.template.edit', compact('templates', 'languages'));
} catch (Exception $e) {
return view('404');
@@ -208,12 +240,15 @@ class TemplateController extends Controller {
/**
* Update the specified resource in storage.
- * @param type int $id
- * @param type Template $template
+ *
+ * @param type int $id
+ * @param type Template $template
* @param type TemplateUdate $request
+ *
* @return type Response
*/
- public function update($id, Template $template, TemplateUdate $request) {
+ public function update($id, Template $template, TemplateUdate $request)
+ {
try {
//TODO validation
$templates = $template->whereId($id)->first();
@@ -233,11 +268,14 @@ class TemplateController extends Controller {
/**
* Remove the specified resource from storage.
- * @param type int $id
+ *
+ * @param type int $id
* @param type Template $template
+ *
* @return type Response
*/
- public function destroy($id, Template $template) {
+ public function destroy($id, Template $template)
+ {
try {
$templates = $template->whereId($id)->first();
/* Check whether function success or not */
@@ -256,12 +294,16 @@ class TemplateController extends Controller {
/**
* Form for Email connection checking.
+ *
* @param type Emails $email
+ *
* @return type Response
*/
- public function formDiagno(Emails $email) {
+ public function formDiagno(Emails $email)
+ {
try {
$emails = $email->get();
+
return view('themes.default1.admin.helpdesk.emails.template.formDiagno', compact('emails'));
} catch (Exception $e) {
return view('404');
@@ -269,11 +311,14 @@ class TemplateController extends Controller {
}
/**
- * function to send emails
+ * function to send emails.
+ *
* @param type Request $request
+ *
* @return type
*/
- public function postDiagno(Request $request) {
+ public function postDiagno(Request $request)
+ {
$email = $request->input('to');
if ($email == null) {
return redirect('getdiagno')->with('fails', 'Please provide E-mail address !');
@@ -283,5 +328,4 @@ class TemplateController extends Controller {
return redirect('getdiagno')->with('success', 'Please check your mail. An E-mail has been sent to your E-mail address');
}
-
}
diff --git a/app/Http/Controllers/Admin/helpdesk/ThreadController.php b/app/Http/Controllers/Admin/helpdesk/ThreadController.php
index f9653d36e..9306834be 100644
--- a/app/Http/Controllers/Admin/helpdesk/ThreadController.php
+++ b/app/Http/Controllers/Admin/helpdesk/ThreadController.php
@@ -11,21 +11,22 @@ use App\Model\helpdesk\Ticket_thread;
use Exception;
/**
- * ThreadController
+ * ThreadController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class ThreadController extends Controller {
-
+class ThreadController extends Controller
+{
/**
- * get the values from ticket_thread Table and direct to view page
+ * get the values from ticket_thread Table and direct to view page.
+ *
* @param type Ticket_thread $thread
- * @param type Priority $priority
- * @return type Response
+ * @param type Priority $priority
+ *
+ * @return type Response
*/
- public function getTickets(Ticket_thread $thread, Priority $priority) {
+ public function getTickets(Ticket_thread $thread, Priority $priority)
+ {
try {
/* get the values of Ticket_thread from Ticket_thread Table */
$threads = $thread->get();
@@ -37,5 +38,4 @@ class ThreadController extends Controller {
return view('404');
}
}
-
}
diff --git a/app/Http/Controllers/Agent/helpdesk/CannedController.php b/app/Http/Controllers/Agent/helpdesk/CannedController.php
index 1b61bdeb6..771a426a5 100644
--- a/app/Http/Controllers/Agent/helpdesk/CannedController.php
+++ b/app/Http/Controllers/Agent/helpdesk/CannedController.php
@@ -14,25 +14,25 @@ use App\User;
use Exception;
/**
- * CannedController
+ * CannedController.
*
* This controller is for all the functionalities of Canned response for Agents in the Agent Panel
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class CannedController extends Controller {
-
+class CannedController extends Controller
+{
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
- * 3. roles must be agent
+ * 3. roles must be agent.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
// checking authentication
$this->middleware('auth');
// checking if role is agent
@@ -41,27 +41,34 @@ class CannedController extends Controller {
/**
* Display a listing of the Canned Responses.
+ *
* @return type View
*/
- public function index() {
+ public function index()
+ {
return view('themes.default1.agent.helpdesk.canned.index');
}
/**
- * Show the form for creating a new Canned Response
+ * Show the form for creating a new Canned Response.
+ *
* @return type View
*/
- public function create() {
+ public function create()
+ {
return view('themes.default1.agent.helpdesk.canned.create');
}
/**
* Store a newly created Canned Response.
- * @param type CannedRequest $request
- * @param type Canned $canned
+ *
+ * @param type CannedRequest $request
+ * @param type Canned $canned
+ *
* @return type Redirect
*/
- public function store(CannedRequest $request, Canned $canned) {
+ public function store(CannedRequest $request, Canned $canned)
+ {
// fetching all the requested inputs
$canned->user_id = \Auth::user()->id;
$canned->title = $request->input('title');
@@ -69,6 +76,7 @@ class CannedController extends Controller {
try {
// saving inputs
$canned->save();
+
return redirect()->route('canned.list')->with('success', 'Added Successfully');
} catch (Exception $e) {
return redirect()->route('canned.list')->with('fails', $e->errorInfo[2]);
@@ -77,24 +85,31 @@ class CannedController extends Controller {
/**
* Show the form for editing the Canned Response.
- * @param type $id
- * @param type Canned $canned
+ *
+ * @param type $id
+ * @param type Canned $canned
+ *
* @return type View
*/
- public function edit($id, Canned $canned) {
+ public function edit($id, Canned $canned)
+ {
// fetching requested canned response
$canned = $canned->where('user_id', '=', \Auth::user()->id)->where('id', '=', $id)->first();
+
return view('themes.default1.agent.helpdesk.canned.edit', compact('canned'));
}
/**
* Update the Canned Response in database.
- * @param type $id
- * @param type CannedUpdateRequest $request
- * @param type Canned $canned
+ *
+ * @param type $id
+ * @param type CannedUpdateRequest $request
+ * @param type Canned $canned
+ *
* @return type Redirect
*/
- public function update($id, CannedUpdateRequest $request, Canned $canned) {
+ public function update($id, CannedUpdateRequest $request, Canned $canned)
+ {
/* select the field where id = $id(request Id) */
$canned = $canned->where('id', '=', $id)->where('user_id', '=', \Auth::user()->id)->first();
// fetching all the requested inputs
@@ -104,6 +119,7 @@ class CannedController extends Controller {
try {
// saving inputs
$canned->save();
+
return redirect()->route('canned.list')->with('success', 'Updated Successfully');
} catch (Exception $e) {
return redirect()->route('canned.list')->with('fails', $e->errorInfo[2]);
@@ -112,11 +128,14 @@ class CannedController extends Controller {
/**
* Delete the Canned Response from storage.
- * @param type $id
- * @param type Canned $canned
+ *
+ * @param type $id
+ * @param type Canned $canned
+ *
* @return type Redirect
*/
- public function destroy($id, Canned $canned) {
+ public function destroy($id, Canned $canned)
+ {
/* select the field where id = $id(request Id) */
$canned = $canned->whereId($id)->first();
/* delete the selected field */
@@ -133,20 +152,22 @@ class CannedController extends Controller {
/**
* Fetch Canned Response in the ticket detail page.
- * @param type $id
+ *
+ * @param type $id
+ *
* @return type json
*/
- public function get_canned($id) {
+ public function get_canned($id)
+ {
// checking for the canned response with requested value
- if ($id != "zzz") {
+ if ($id != 'zzz') {
// fetching canned response
$canned = Canned::where('id', '=', $id)->where('user_id', '=', \Auth::user()->id)->first();
$msg = $canned->message;
} else {
- $msg = "";
+ $msg = '';
}
// returning the canned response in JSON format
return \Response::json($msg);
}
-
}
diff --git a/app/Http/Controllers/Agent/helpdesk/DashboardController.php b/app/Http/Controllers/Agent/helpdesk/DashboardController.php
index cf7a4dda2..4a09419d2 100644
--- a/app/Http/Controllers/Agent/helpdesk/DashboardController.php
+++ b/app/Http/Controllers/Agent/helpdesk/DashboardController.php
@@ -5,35 +5,32 @@ namespace App\Http\Controllers\Agent\helpdesk;
// controllers
use App\Http\Controllers\Controller;
// models
-use App\Model\helpdesk\Settings\Company;
-use App\Model\helpdesk\Ticket\Ticket_Collaborator;
-use App\Model\helpdesk\Email\Emails;
use App\User;
// classes
-use DB;
-use View;
use Auth;
+use DB;
use Exception;
+use View;
/**
* DashboardController
- * This controlleris used to fetch dashboard in the agent panel
+ * This controlleris used to fetch dashboard in the agent panel.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class DashboardController extends Controller {
-
+class DashboardController extends Controller
+{
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
- * 3. roles must be agent
+ * 3. roles must be agent.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
// checking for authentication
$this->middleware('auth');
// checking if the role is agent
@@ -41,12 +38,14 @@ class DashboardController extends Controller {
}
/**
- * Get the dashboard page
+ * Get the dashboard page.
+ *
* @return type view
*/
- public function index() {
+ public function index()
+ {
// if(Auth::user()->role == "user"){
- // return \Redirect::route('home');
+ // return \Redirect::route('home');
// }
try {
return View::make('themes.default1.agent.helpdesk.dashboard.dashboard');
@@ -56,10 +55,12 @@ class DashboardController extends Controller {
}
/**
- * Fetching dashboard graph data to implement graph
+ * Fetching dashboard graph data to implement graph.
+ *
* @return type Json
*/
- public function ChartData($date111 = "", $date122 = "") {
+ public function ChartData($date111 = '', $date122 = '')
+ {
$date11 = strtotime($date122);
$date12 = strtotime($date111);
if ($date11 && $date12) {
@@ -67,29 +68,29 @@ class DashboardController extends Controller {
$date1 = $date11;
} else {
// generating current date
- $date2 = strtotime(Date('Y-m-d'));
- $date3 = Date('Y-m-d');
+ $date2 = strtotime(date('Y-m-d'));
+ $date3 = date('Y-m-d');
$format = 'Y-m-d';
// generating a date range of 1 month
- $date1 = strtotime(Date($format, strtotime('-1 month' . $date3)));
+ $date1 = strtotime(date($format, strtotime('-1 month'.$date3)));
}
- $return = "";
- $last = "";
+ $return = '';
+ $last = '';
for ($i = $date1; $i <= $date2; $i = $i + 86400) {
$thisDate = date('Y-m-d', $i);
- $created = \DB::table('tickets')->select('created_at')->where('created_at', 'LIKE', '%' . $thisDate . '%')->count();
- $closed = \DB::table('tickets')->select('closed_at')->where('closed_at', 'LIKE', '%' . $thisDate . '%')->count();
- $reopened = \DB::table('tickets')->select('reopened_at')->where('reopened_at', 'LIKE', '%' . $thisDate . '%')->count();
+ $created = \DB::table('tickets')->select('created_at')->where('created_at', 'LIKE', '%'.$thisDate.'%')->count();
+ $closed = \DB::table('tickets')->select('closed_at')->where('closed_at', 'LIKE', '%'.$thisDate.'%')->count();
+ $reopened = \DB::table('tickets')->select('reopened_at')->where('reopened_at', 'LIKE', '%'.$thisDate.'%')->count();
$value = ['date' => $thisDate, 'open' => $created, 'closed' => $closed, 'reopened' => $reopened];
$array = array_map('htmlentities', $value);
$json = html_entity_decode(json_encode($array));
- $return .= $json . ',';
+ $return .= $json.',';
}
$last = rtrim($return, ',');
- return '[' . $last . ']';
+ return '['.$last.']';
// $ticketlist = DB::table('tickets')
// ->select(DB::raw('MONTH(updated_at) as month'),DB::raw('SUM(CASE WHEN status = 3 THEN 1 ELSE 0 END) as closed'),DB::raw('SUM(CASE WHEN status = 2 THEN 1 ELSE 0 END) as reopened'),DB::raw('SUM(CASE WHEN status = 1 THEN 1 ELSE 0 END) as open'),DB::raw('SUM(CASE WHEN status = 5 THEN 1 ELSE 0 END) as deleted'),
@@ -99,5 +100,4 @@ class DashboardController extends Controller {
// ->get();
// return $ticketlist;
}
-
}
diff --git a/app/Http/Controllers/Agent/helpdesk/MailController.php b/app/Http/Controllers/Agent/helpdesk/MailController.php
index 1cb90eedd..d0901da4c 100644
--- a/app/Http/Controllers/Agent/helpdesk/MailController.php
+++ b/app/Http/Controllers/Agent/helpdesk/MailController.php
@@ -3,57 +3,50 @@
namespace App\Http\Controllers\Agent\helpdesk;
// controllers
-use App\Http\Controllers\Controller;
-use App\Http\Controllers\Agent\helpdesk\TicketController;
+use App;
// models
-use App\User;
+use App\Http\Controllers\Controller;
use App\Model\helpdesk\Email\Emails;
+use App\Model\helpdesk\Manage\Help_topic;
use App\Model\helpdesk\Settings\Email;
-use App\Model\helpdesk\Ticket\Ticket_attachments;
-use App\Model\helpdesk\Ticket\Ticket_Thread;
use App\Model\helpdesk\Settings\System;
use App\Model\helpdesk\Settings\Ticket;
-use App\Model\helpdesk\Manage\Help_topic;
-use App\Model\helpdesk\Utility\MailboxProtocol;
+use App\Model\helpdesk\Ticket\Ticket_attachments;
use App\Model\helpdesk\Ticket\Ticket_source;
-use App\Model\helpdesk\Ticket\Ticket_Priority;
+use App\Model\helpdesk\Ticket\Ticket_Thread;
use App\Model\helpdesk\Ticket\Tickets;
// classes
-use PhpImap\Mailbox as ImapMailbox;
-use PhpImap\IncomingMail;
-use PhpImap\IncomingMailAttachment;
-use \ForceUTF8\Encoding;
-use App;
-use DB;
+use App\Model\helpdesk\Utility\MailboxProtocol;
use Crypt;
-use Schedule;
use File;
-use Artisan;
-use Exception;
+use ForceUTF8\Encoding;
+use PhpImap\Mailbox as ImapMailbox;
/**
- * MailController
+ * MailController.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class MailController extends Controller {
-
+class MailController extends Controller
+{
/**
* constructor
* Create a new controller instance.
+ *
* @param type TicketController $TicketController
*/
- public function __construct(TicketController $TicketController) {
+ public function __construct(TicketController $TicketController)
+ {
$this->TicketController = $TicketController;
}
/**
- * Reademails
+ * Reademails.
+ *
* @return type
*/
- public function readmails(Emails $emails, Email $settings_email, System $system, Ticket $ticket) {
+ public function readmails(Emails $emails, Email $settings_email, System $system, Ticket $ticket)
+ {
// $path_url = $system->first()->url;
if ($settings_email->first()->email_fetching == 1) {
if ($settings_email->first()->all_emails == 1) {
@@ -86,11 +79,11 @@ class MailController extends Controller {
$protocol = $e_mail->mailbox_protocol;
$get_mailboxprotocol = MailboxProtocol::where('id', '=', $protocol)->first();
$protocol = $get_mailboxprotocol->value;
- $imap_config = '{' . $host . ':' . $port . $protocol . '}INBOX';
+ $imap_config = '{'.$host.':'.$port.$protocol.'}INBOX';
$password = Crypt::decrypt($e_mail->password);
$mailbox = new ImapMailbox($imap_config, $e_mail->email_address, $password, __DIR__);
- $mails = array();
- $mailsIds = $mailbox->searchMailBox('SINCE ' . date('d-M-Y', strtotime("-1 day")));
+ $mails = [];
+ $mailsIds = $mailbox->searchMailBox('SINCE '.date('d-M-Y', strtotime('-1 day')));
if (!$mailsIds) {
die('Mailbox is empty');
}
@@ -112,15 +105,15 @@ class MailController extends Controller {
}
$date = $mail->date;
$datetime = $overview[0]->date;
- $date_time = explode(" ", $datetime);
- $date = $date_time[1] . "-" . $date_time[2] . "-" . $date_time[3] . " " . $date_time[4];
+ $date_time = explode(' ', $datetime);
+ $date = $date_time[1].'-'.$date_time[2].'-'.$date_time[3].' '.$date_time[4];
$date = date('Y-m-d H:i:s', strtotime($date));
// dd($date);
if (isset($mail->subject)) {
$subject = $mail->subject;
} else {
- $subject = "No Subject";
+ $subject = 'No Subject';
}
// dd($subject);
@@ -128,7 +121,7 @@ class MailController extends Controller {
$fromaddress = $mail->fromAddress;
$ticket_source = Ticket_source::where('name', '=', 'email')->first();
$source = $ticket_source->id;
- $phone = "";
+ $phone = '';
$assign = $get_helptopic->auto_assign;
$form_data = null;
@@ -141,7 +134,7 @@ class MailController extends Controller {
$thread_id = $thread_id;
foreach ($mail->getAttachments() as $attachment) {
- $support = "support";
+ $support = 'support';
// echo $_SERVER['DOCUMENT_ROOT'];
$dir_img_paths = __DIR__;
$dir_img_path = explode('/code', $dir_img_paths);
@@ -150,7 +143,7 @@ class MailController extends Controller {
// var_dump($attachment->filePath);
// dd($filepath);
// $path = $dir_img_path[0]."/code/public/".$filepath[1];
- $path = public_path() . $filepath[1];
+ $path = public_path().$filepath[1];
// dd($path);
$filesize = filesize($path);
$file_data = file_get_contents($path);
@@ -159,28 +152,28 @@ class MailController extends Controller {
$string = str_replace('-', '', $attachment->name);
$filename = explode('src', $attachment->filePath);
$filename = str_replace('\\', '', $filename);
- $body = str_replace("cid:" . $imageid, $filepath[1], $body);
+ $body = str_replace('cid:'.$imageid, $filepath[1], $body);
$pos = strpos($body, $filepath[1]);
if ($pos == false) {
if ($settings_email->first()->attachment == 1) {
- $upload = new Ticket_attachments;
+ $upload = new Ticket_attachments();
$upload->file = $file_data;
$upload->thread_id = $thread_id;
$upload->name = $filepath[1];
$upload->type = $ext;
$upload->size = $filesize;
- $upload->poster = "ATTACHMENT";
+ $upload->poster = 'ATTACHMENT';
$upload->save();
}
} else {
- $upload = new Ticket_attachments;
+ $upload = new Ticket_attachments();
$upload->file = $file_data;
$upload->thread_id = $thread_id;
$upload->name = $filepath[1];
$upload->type = $ext;
$upload->size = $filesize;
- $upload->poster = "INLINE";
+ $upload->poster = 'INLINE';
$upload->save();
}
unlink($path);
@@ -198,35 +191,45 @@ class MailController extends Controller {
}
/**
- * separate reply
- * @param type $body
+ * separate reply.
+ *
+ * @param type $body
+ *
* @return type string
*/
- public function separate_reply($body) {
+ public function separate_reply($body)
+ {
$body2 = explode('---Reply above this line---', $body);
$body3 = $body2[0];
+
return $body3;
}
/**
- * Decode Imap text
+ * Decode Imap text.
+ *
* @param type $str
+ *
* @return type string
*/
- public function decode_imap_text($str) {
+ public function decode_imap_text($str)
+ {
$result = '';
$decode_header = imap_mime_header_decode($str);
- foreach ($decode_header AS $obj) {
+ foreach ($decode_header as $obj) {
$result .= htmlspecialchars(rtrim($obj->text, "\t"));
}
+
return $result;
}
/**
- * fetch_attachments
+ * fetch_attachments.
+ *
* @return type
*/
- public function fetch_attachments() {
+ public function fetch_attachments()
+ {
$uploads = Upload::all();
foreach ($uploads as $attachment) {
$image = @imagecreatefromstring($attachment->file);
@@ -234,24 +237,26 @@ class MailController extends Controller {
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
- $var = '';
- echo ' ' . $var . '';
+ $var = '';
+ echo ' '.$var.'';
}
}
/**
- * function to load data
- * @param type $id
+ * function to load data.
+ *
+ * @param type $id
+ *
* @return type file
*/
- public function get_data($id) {
+ public function get_data($id)
+ {
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('id', '=', $id)->get();
foreach ($attachments as $attachment) {
- header('Content-type: application/' . $attachment->type . '');
- header('Content-Disposition: inline; filename=' . $attachment->name . '');
+ header('Content-type: application/'.$attachment->type.'');
+ header('Content-Disposition: inline; filename='.$attachment->name.'');
header('Content-Transfer-Encoding: binary');
echo $attachment->file;
}
}
-
}
diff --git a/app/Http/Controllers/Agent/helpdesk/NotificationController.php b/app/Http/Controllers/Agent/helpdesk/NotificationController.php
index 278c1ac94..37aea1162 100644
--- a/app/Http/Controllers/Agent/helpdesk/NotificationController.php
+++ b/app/Http/Controllers/Agent/helpdesk/NotificationController.php
@@ -5,38 +5,35 @@ namespace App\Http\Controllers\Agent\helpdesk;
// controllers
use App\Http\Controllers\Controller;
// Model
-use App\User;
-use App\Model\helpdesk\Settings\Company;
-use App\Model\helpdesk\Agent\Teams;
use App\Model\helpdesk\Agent\Department;
-use App\Model\helpdesk\Utility\Log_notification;
+use App\Model\helpdesk\Agent\Teams;
+use App\Model\helpdesk\Settings\Company;
use App\Model\helpdesk\settings\Email;
+use App\Model\helpdesk\Utility\Log_notification;
+use App\User;
// classes
-use Exception;
/**
* NotificationController
- * This controller is used to send daily notifications
+ * This controller is used to send daily notifications.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class NotificationController extends Controller {
-
+class NotificationController extends Controller
+{
/**
- * This function is for sending daily report/notification about the system
+ * This function is for sending daily report/notification about the system.
* */
- public function send_notification() {
+ public function send_notification()
+ {
//fetching email settings
$email = Email::where('id', '=', '1')->first();
// checking if the daily notification is enabled or not
if ($email->notification_cron == 1) {
// checking if current date is equal to the last entered daily notification log
$notification = Log_notification::where('log', '=', 'NOT-1')->orderBy('id', 'DESC')->first();
- $date = explode(" ", $notification->created_at);
- if (Date('Y-m-d') == $date[0]) {
-
+ $date = explode(' ', $notification->created_at);
+ if (date('Y-m-d') == $date[0]) {
} else {
// creating a daily notification log
Log_notification::create(['log' => 'NOT-1']);
@@ -54,28 +51,33 @@ class NotificationController extends Controller {
}
/**
- * Admin Notification/Report
+ * Admin Notification/Report.
+ *
* @param company
+ *
* @return mail
* */
- public function send_notification_to_admin($company) {
+ public function send_notification_to_admin($company)
+ {
// get all admin users
$users = User::where('role', '=', 'admin')->get();
foreach ($users as $user) {
// Send notification details to admin
$email = $user->email;
- $user_name = $user->first_name . " " . $user->last_name;
- \Mail::send('emails.notifications.admin', ['company' => $company, 'name' => $user_name], function ($message)use ($email, $user_name, $company) {
- $message->to($email, $user_name)->subject($company . ' Daily Report ');
+ $user_name = $user->first_name.' '.$user->last_name;
+ \Mail::send('emails.notifications.admin', ['company' => $company, 'name' => $user_name], function ($message) use ($email, $user_name, $company) {
+ $message->to($email, $user_name)->subject($company.' Daily Report ');
});
}
}
/**
- * Department Manager Notification/Report
+ * Department Manager Notification/Report.
+ *
* @return mail
* */
- public function send_notification_to_manager($company) {
+ public function send_notification_to_manager($company)
+ {
// get all department managers
$depts = Department::all();
foreach ($depts as $dept) {
@@ -85,9 +87,9 @@ class NotificationController extends Controller {
foreach ($users as $user) {
// Send notification details to manager of a department
$email = $user->email;
- $user_name = $user->first_name . " " . $user->last_name;
- \Mail::send('emails.notifications.manager', ['company' => $company, 'name' => $user_name, 'dept_id' => $dept->id, 'dept_name' => $dept->name], function ($message)use ($email, $user_name, $company, $dept_name) {
- $message->to($email, $user_name)->subject($company . ' Daily Report for department manager of ' . $dept_name . ' department.');
+ $user_name = $user->first_name.' '.$user->last_name;
+ \Mail::send('emails.notifications.manager', ['company' => $company, 'name' => $user_name, 'dept_id' => $dept->id, 'dept_name' => $dept->name], function ($message) use ($email, $user_name, $company, $dept_name) {
+ $message->to($email, $user_name)->subject($company.' Daily Report for department manager of '.$dept_name.' department.');
});
}
}
@@ -95,10 +97,12 @@ class NotificationController extends Controller {
}
/**
- * Team Lead Notification/Report
+ * Team Lead Notification/Report.
+ *
* @return mail
* */
- public function send_notification_to_team_lead($company) {
+ public function send_notification_to_team_lead($company)
+ {
// get all Team leads
$teams = Teams::all();
foreach ($teams as $team) {
@@ -108,9 +112,9 @@ class NotificationController extends Controller {
foreach ($users as $user) {
// Send notification details to team lead
$email = $user->email;
- $user_name = $user->first_name . " " . $user->last_name;
- \Mail::send('emails.notifications.lead', ['company' => $company, 'name' => $user_name, 'team_id' => $team->id], function ($message)use ($email, $user_name, $company, $team_name) {
- $message->to($email, $user_name)->subject($company . ' Daily Report for Team Lead of team ' . $team_name);
+ $user_name = $user->first_name.' '.$user->last_name;
+ \Mail::send('emails.notifications.lead', ['company' => $company, 'name' => $user_name, 'team_id' => $team->id], function ($message) use ($email, $user_name, $company, $team_name) {
+ $message->to($email, $user_name)->subject($company.' Daily Report for Team Lead of team '.$team_name);
});
}
}
@@ -118,35 +122,40 @@ class NotificationController extends Controller {
}
/**
- * Agent Notification/Report
+ * Agent Notification/Report.
+ *
* @return mail
* */
- public function send_notification_to_agent($company) {
+ public function send_notification_to_agent($company)
+ {
// get all agents users
$users = User::where('role', '=', 'agent')->get();
foreach ($users as $user) {
// Send notification details to all the agents
$email = $user->email;
- $user_name = $user->first_name . " " . $user->last_name;
- \Mail::send('emails.notifications.agent', ['company' => $company, 'name' => $user_name, 'user_id' => 1], function ($message)use ($email, $user_name, $company) {
- $message->to($email, $user_name)->subject($company . ' Daily Report for Agents');
+ $user_name = $user->first_name.' '.$user->last_name;
+ \Mail::send('emails.notifications.agent', ['company' => $company, 'name' => $user_name, 'user_id' => 1], function ($message) use ($email, $user_name, $company) {
+ $message->to($email, $user_name)->subject($company.' Daily Report for Agents');
});
}
}
/**
- * Fetching company name
+ * Fetching company name.
+ *
* @return type variable
*/
- public function company() {
+ public function company()
+ {
// fetching comapny model
$company = Company::Where('id', '=', '1')->first();
// fetching company name
if ($company->company_name == null) {
- $company = "Support Center";
+ $company = 'Support Center';
} else {
$company = $company->company_name;
}
+
return $company;
}
diff --git a/app/Http/Controllers/Agent/helpdesk/OrganizationController.php b/app/Http/Controllers/Agent/helpdesk/OrganizationController.php
index a2d4d71e9..bfb5a1c98 100644
--- a/app/Http/Controllers/Agent/helpdesk/OrganizationController.php
+++ b/app/Http/Controllers/Agent/helpdesk/OrganizationController.php
@@ -6,13 +6,11 @@ namespace App\Http\Controllers\Agent\helpdesk;
use App\Http\Controllers\Controller;
// requests
use App\Http\Requests\helpdesk\OrganizationRequest;
-
/* include organization model */
use App\Http\Requests\helpdesk\OrganizationUpdate;
// models
/* Define OrganizationRequest to validate the create form */
use App\Model\helpdesk\Agent_panel\Organization;
-
/* Define OrganizationUpdate to validate the create form */
use App\Model\helpdesk\Agent_panel\User_org;
// classes
@@ -22,21 +20,21 @@ use Exception;
* OrganizationController
* This controller is used to CRUD organization detail.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class OrganizationController extends Controller {
-
+class OrganizationController extends Controller
+{
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
- * 3. roles must be agent
+ * 3. roles must be agent.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
// checking for authentication
$this->middleware('auth');
// checking if the role is agent
@@ -45,10 +43,13 @@ class OrganizationController extends Controller {
/**
* Display a listing of the resource.
+ *
* @param type Organization $org
+ *
* @return type Response
*/
- public function index() {
+ public function index()
+ {
try {
/* get all values of table organization */
return view('themes.default1.agent.helpdesk.organization.index');
@@ -58,10 +59,12 @@ class OrganizationController extends Controller {
}
/**
- * This function is used to display the list of Organizations
+ * This function is used to display the list of Organizations.
+ *
* @return datatable
*/
- public function org_list() {
+ public function org_list()
+ {
// chumper datable package call to display Advance datatable
return \Datatable::collection(Organization::all())
/* searchable name */
@@ -73,28 +76,31 @@ class OrganizationController extends Controller {
// return $model->name;
if (strlen($model->name) > 20) {
$orgname = substr($model->name, 0, 25);
- $orgname = substr($orgname, 0, strrpos($orgname, ' ')) . ' ...';
+ $orgname = substr($orgname, 0, strrpos($orgname, ' ')).' ...';
} else {
$orgname = $model->name;
}
+
return $orgname;
})
/* column website */
->addColumn('website', function ($model) {
$website = $model->website;
+
return $website;
})
/* column phone number */
->addColumn('phone', function ($model) {
$phone = $model->phone;
+
return $phone;
})
/* column action buttons */
->addColumn('Actions', function ($model) {
- // displaying action buttons
+ // displaying action buttons
// modal popup to delete data
- return ' ' . \Lang::get('lang.delete') . ' ' . \Lang::get('lang.edit') . '' . \Lang::get('lang.view') . '
-
';
+ }
}
diff --git a/app/Http/Controllers/Agent/helpdesk/UserController.php b/app/Http/Controllers/Agent/helpdesk/UserController.php
index f9c9116d1..b8376c49e 100644
--- a/app/Http/Controllers/Agent/helpdesk/UserController.php
+++ b/app/Http/Controllers/Agent/helpdesk/UserController.php
@@ -19,30 +19,30 @@ use App\Model\helpdesk\Agent_panel\User_org;
use App\User;
// classes
use Auth;
+use Exception;
use Hash;
use Input;
use Redirect;
-use Exception;
/**
* UserController
- * This controller is used to CRUD an User details, and proile management of an agent
+ * This controller is used to CRUD an User details, and proile management of an agent.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class UserController extends Controller {
-
+class UserController extends Controller
+{
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
- * 3. roles must be agent
+ * 3. roles must be agent.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
// checking authentication
$this->middleware('auth');
// checking if role is agent
@@ -51,10 +51,13 @@ class UserController extends Controller {
/**
* Display all list of the users.
+ *
* @param type User $user
+ *
* @return type view
*/
- public function index() {
+ public function index()
+ {
try {
/* get all values in Sys_user */
return view('themes.default1.agent.helpdesk.user.index');
@@ -64,10 +67,12 @@ class UserController extends Controller {
}
/**
- * This function is used to display the list of users using chumper datatables
+ * This function is used to display the list of users using chumper datatables.
+ *
* @return datatable
*/
- public function user_list() {
+ public function user_list()
+ {
// displaying list of users with chumper datatables
return \Datatable::collection(User::where('role', '!=', 'admin')->where('role', '!=', 'agent')->get())
/* searchable column username */
@@ -78,28 +83,31 @@ class UserController extends Controller {
->addColumn('user_name', function ($model) {
if (strlen($model->user_name) > 20) {
$username = substr($model->user_name, 0, 30);
- $username = substr($username, 0, strrpos($username, ' ')) . ' ...';
+ $username = substr($username, 0, strrpos($username, ' ')).' ...';
} else {
$username = $model->user_name;
}
+
return $username;
})
/* column email */
->addColumn('email', function ($model) {
$email = $model->email;
+
return $email;
})
/* column phone */
->addColumn('phone', function ($model) {
- $phone = "";
+ $phone = '';
if ($model->phone_number) {
- $phone = $model->ext . ' ' . $model->phone_number;
+ $phone = $model->ext.' '.$model->phone_number;
}
- $mobile = "";
+ $mobile = '';
if ($model->mobile) {
$mobile = $model->mobile;
}
- $phone = $phone . " " . $mobile;
+ $phone = $phone.' '.$mobile;
+
return $phone;
})
/* column account status */
@@ -110,6 +118,7 @@ class UserController extends Controller {
} else {
$stat = '';
}
+
return $stat;
})
/* column ban status */
@@ -120,25 +129,29 @@ class UserController extends Controller {
} else {
$stat = '';
}
+
return $stat;
})
/* column last login date */
->addColumn('lastlogin', function ($model) {
$t = $model->updated_at;
+
return TicketController::usertimezone($t);
})
/* column actions */
->addColumn('Actions', function ($model) {
- return '' . \Lang::get('lang.edit') . '' . \Lang::get('lang.view') . '';
+ return ''.\Lang::get('lang.edit').''.\Lang::get('lang.view').'';
})
->make();
}
/**
* Show the form for creating a new users.
+ *
* @return type view
*/
- public function create() {
+ public function create()
+ {
try {
return view('themes.default1.agent.helpdesk.user.create');
} catch (Exception $e) {
@@ -148,11 +161,14 @@ class UserController extends Controller {
/**
* Store a newly created users in storage.
- * @param type User $user
+ *
+ * @param type User $user
* @param type Sys_userRequest $request
+ *
* @return type redirect
*/
- public function store(User $user, Sys_userRequest $request) {
+ public function store(User $user, Sys_userRequest $request)
+ {
/* insert the input request to sys_user table */
/* Check whether function success or not */
$user->email = $request->input('email');
@@ -175,14 +191,18 @@ class UserController extends Controller {
/**
* Display the specified users.
+ *
* @param type int $id
* @param type User $user
+ *
* @return type view
*/
- public function show($id, User $user) {
+ public function show($id, User $user)
+ {
try {
/* select the field where id = $id(request Id) */
$users = $user->whereId($id)->first();
+
return view('themes.default1.agent.helpdesk.user.show', compact('users'));
} catch (Exception $e) {
return view('404');
@@ -191,14 +211,18 @@ class UserController extends Controller {
/**
* Show the form for editing the specified resource.
- * @param type int $id
+ *
+ * @param type int $id
* @param type User $user
+ *
* @return type Response
*/
- public function edit($id, User $user) {
+ public function edit($id, User $user)
+ {
try {
/* select the field where id = $id(request Id) */
$users = $user->whereId($id)->first();
+
return view('themes.default1.agent.helpdesk.user.edit', compact('users'));
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->errorInfo[2]);
@@ -207,12 +231,15 @@ class UserController extends Controller {
/**
* Update the specified user in storage.
- * @param type int $id
- * @param type User $user
+ *
+ * @param type int $id
+ * @param type User $user
* @param type Sys_userUpdate $request
+ *
* @return type Response
*/
- public function update($id, User $user, Sys_userUpdate $request) {
+ public function update($id, User $user, Sys_userUpdate $request)
+ {
/* select the field where id = $id(request Id) */
$users = $user->whereId($id)->first();
@@ -229,10 +256,12 @@ class UserController extends Controller {
}
/**
- * get agent profile page
+ * get agent profile page.
+ *
* @return type view
*/
- public function getProfile() {
+ public function getProfile()
+ {
$user = Auth::user();
try {
return view('themes.default1.agent.helpdesk.user.profile', compact('user'));
@@ -242,10 +271,12 @@ class UserController extends Controller {
}
/**
- * get profile edit page
+ * get profile edit page.
+ *
* @return type view
*/
- public function getProfileedit() {
+ public function getProfileedit()
+ {
$user = Auth::user();
try {
return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user'));
@@ -255,12 +286,15 @@ class UserController extends Controller {
}
/**
- * post profile edit
- * @param type int $id
+ * post profile edit.
+ *
+ * @param type int $id
* @param type ProfileRequest $request
+ *
* @return type Redirect
*/
- public function postProfileedit(ProfileRequest $request) {
+ public function postProfileedit(ProfileRequest $request)
+ {
// geet authenticated user details
$user = Auth::user();
$user->gender = $request->input('gender');
@@ -284,7 +318,7 @@ class UserController extends Controller {
// fetching upload destination path
$destinationPath = 'lb-faveo/media/profilepic';
// adding a random value to profile picture filename
- $fileName = rand(0000, 9999) . '.' . $name;
+ $fileName = rand(0000, 9999).'.'.$name;
// moving the picture to a destination folder
Input::file('profile_pic')->move($destinationPath, $fileName);
// saving filename to database
@@ -292,6 +326,7 @@ class UserController extends Controller {
} else {
try {
$user->fill($request->except('profile_pic', 'gender'))->save();
+
return Redirect::route('profile')->with('success', 'Profile Updated sucessfully');
} catch (Exception $e) {
return Redirect::route('profile')->with('success', $e->errorInfo[2]);
@@ -303,19 +338,23 @@ class UserController extends Controller {
}
/**
- * Post profile password
- * @param type int $id
+ * Post profile password.
+ *
+ * @param type int $id
* @param type ProfilePassword $request
+ *
* @return type Redirect
*/
- public function postProfilePassword($id, ProfilePassword $request) {
- // get authenticated user
+ public function postProfilePassword($id, ProfilePassword $request)
+ {
+ // get authenticated user
$user = Auth::user();
// checking if the old password matches the new password
if (Hash::check($request->input('old_password'), $user->getAuthPassword())) {
$user->password = Hash::make($request->input('new_password'));
try {
$user->save();
+
return redirect('profile-edit')->with('success1', 'Password Updated sucessfully');
} catch (Exception $e) {
return redirect('profile-edit')->with('fails', $e->errorInfo[2]);
@@ -326,25 +365,32 @@ class UserController extends Controller {
}
/**
- * Assigning an user to an organization
- * @param type $id
+ * Assigning an user to an organization.
+ *
+ * @param type $id
+ *
* @return type boolean
*/
- public function UserAssignOrg($id) {
+ public function UserAssignOrg($id)
+ {
$org = Input::get('org');
- $user_org = new User_org;
+ $user_org = new User_org();
$user_org->org_id = $org;
$user_org->user_id = $id;
$user_org->save();
+
return 1;
}
/**
- * creating an organization in user profile page via modal popup
- * @param type $id
+ * creating an organization in user profile page via modal popup.
+ *
+ * @param type $id
+ *
* @return type
*/
- public function User_Create_Org($id) {
+ public function User_Create_Org($id)
+ {
// checking if the entered value for website is available in database
if (Input::get('website') != null) {
// checking website
@@ -356,14 +402,14 @@ class UserController extends Controller {
$check2 = Organization::where('name', '=', Input::get('name'))->first();
// if any of the fields is not available then return false
if (\Input::get('name') == null) {
- return "Name is required";
+ return 'Name is required';
} elseif ($check2 != null) {
- return "Name should be Unique";
+ return 'Name should be Unique';
} elseif ($check != null) {
- return "Website should be Unique";
+ return 'Website should be Unique';
} else {
// storing organization details and assigning the current user to that organization
- $org = new Organization;
+ $org = new Organization();
$org->name = Input::get('name');
$org->phone = Input::get('phone');
$org->website = Input::get('website');
@@ -371,7 +417,7 @@ class UserController extends Controller {
$org->internal_notes = Input::get('internal');
$org->save();
- $user_org = new User_org;
+ $user_org = new User_org();
$user_org->org_id = $org->id;
$user_org->user_id = $id;
$user_org->save();
@@ -379,5 +425,4 @@ class UserController extends Controller {
return 0;
}
}
-
}
diff --git a/app/Http/Controllers/Agent/kb/ArticleController.php b/app/Http/Controllers/Agent/kb/ArticleController.php
index 2d090a481..337bbe430 100644
--- a/app/Http/Controllers/Agent/kb/ArticleController.php
+++ b/app/Http/Controllers/Agent/kb/ArticleController.php
@@ -3,47 +3,46 @@
namespace App\Http\Controllers\Agent\kb;
// Controllers
-use App\Http\Controllers\Controller;
-use App\Http\Controllers\Agent\kb\SettingsController;
-use App\Http\Controllers\Client\kb\UserController;
use App\Http\Controllers\Agent\helpdesk\TicketController;
+
+use App\Http\Controllers\Controller;
// Requests
use App\Http\Requests\kb\ArticleRequest;
use App\Http\Requests\kb\ArticleUpdate;
// Models
use App\Model\kb\Article;
use App\Model\kb\Category;
+use App\Model\kb\Comment;
use App\Model\kb\Relationship;
use App\Model\kb\Settings;
-use App\Model\kb\Comment;
// Classes
use Auth;
use Chumper\Datatable\Table;
use Datatable;
use DB;
+use Exception;
use Illuminate\Http\Request;
use Redirect;
-use Exception;
/**
* ArticleController
- * This controller is used to CRUD Articles
+ * This controller is used to CRUD Articles.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class ArticleController extends Controller {
-
+class ArticleController extends Controller
+{
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
- * 3. roles must be agent
+ * 3. roles must be agent.
+ *
* @return void
*/
- public function __construct() {
+ public function __construct()
+ {
// checking authentication
$this->middleware('auth');
// checking roles
@@ -51,16 +50,19 @@ class ArticleController extends Controller {
SettingsController::language();
}
- public function test() {
+ public function test()
+ {
//$table = $this->setDatatable();
return view('themes.default1.agent.kb.article.test');
}
/**
- * Fetching all the list of articles in a chumper datatable format
+ * Fetching all the list of articles in a chumper datatable format.
+ *
* @return type void
*/
- public function getData() {
+ public function getData()
+ {
// returns chumper datatable
return Datatable::collection(Article::All())
/* searcable column name */
@@ -74,13 +76,14 @@ class ArticleController extends Controller {
/* add column Created */
->addColumn('Created', function ($model) {
$t = $model->created_at;
+
return TicketController::usertimezone($t);
})
/* add column action */
->addColumn('Actions', function ($model) {
/* here are all the action buttons and modal popup to delete articles with confirmations */
- return ' ' . \Lang::get('lang.delete') . ' id . '/edit class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . 'slug . ' class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '
-
@@ -92,11 +95,11 @@ class CategoryController extends Controller {
Are You Sure ?
- ' . $model->name . '
+ '.$model->name.'
@@ -106,11 +109,14 @@ class CategoryController extends Controller {
}
/**
- * Create a Category
+ * Create a Category.
+ *
* @param type Category $category
+ *
* @return type view
*/
- public function create(Category $category) {
+ public function create(Category $category)
+ {
/* Get the all attributes in the category model */
$category = $category->get();
/* get the view page to create new category with all attributes
@@ -123,32 +129,39 @@ class CategoryController extends Controller {
}
/**
- * To store the selected category
- * @param type Category $category
- * @param type CategoryRequest $request
+ * To store the selected category.
+ *
+ * @param type Category $category
+ * @param type CategoryRequest $request
+ *
* @return type Redirect
*/
- public function store(Category $category, CategoryRequest $request) {
+ public function store(Category $category, CategoryRequest $request)
+ {
/* Get the whole request from the form and insert into table via model */
$sl = $request->input('slug');
- $slug = str_slug($sl, "-");
+ $slug = str_slug($sl, '-');
$category->slug = $slug;
// send success message to index page
try {
$category->fill($request->except('slug'))->save();
+
return Redirect::back()->with('success', 'Category Inserted Successfully');
} catch (Exception $e) {
- return Redirect::back()->with('fails', 'Category Not Inserted' . '
' . $e->errorInfo[2] . '
');
+ return Redirect::back()->with('fails', 'Category Not Inserted'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Show the form for editing the specified category.
- * @param type $slug
- * @param type Category $category
+ *
+ * @param type $slug
+ * @param type Category $category
+ *
* @return type view
*/
- public function edit($slug, Category $category) {
+ public function edit($slug, Category $category)
+ {
// fetch the category
$cid = $category->where('id', $slug)->first();
$id = $cid->id;
@@ -160,17 +173,20 @@ class CategoryController extends Controller {
/**
* Update the specified Category in storage.
- * @param type $slug
- * @param type Category $category
- * @param type CategoryUpdate $request
+ *
+ * @param type $slug
+ * @param type Category $category
+ * @param type CategoryUpdate $request
+ *
* @return type redirect
*/
- public function update($slug, Category $category, CategoryUpdate $request) {
+ public function update($slug, Category $category, CategoryUpdate $request)
+ {
/* Edit the selected category via id */
$category = $category->where('id', $slug)->first();
$sl = $request->input('slug');
- $slug = str_slug($sl, "-");
+ $slug = str_slug($sl, '-');
// dd($slug);
$category->slug = $slug;
/* update the values at the table via model according with the request */
@@ -179,22 +195,25 @@ class CategoryController extends Controller {
$category->fill($request->all())->save();
$category->slug = $slug;
$category->save();
+
return redirect('category')->with('success', 'Category Updated Successfully');
} catch (Exception $e) {
//redirect to index with fails message
- return redirect('category')->with('fails', 'Category Not Updated' . '
' . $e->errorInfo[2] . '
');
+ return redirect('category')->with('fails', 'Category Not Updated'.'
'.$e->errorInfo[2].'
');
}
}
/**
* Remove the specified category from storage.
- * @param type $id
- * @param type Category $category
- * @param type Relationship $relation
+ *
+ * @param type $id
+ * @param type Category $category
+ * @param type Relationship $relation
+ *
* @return type Redirect
*/
- public function destroy($id, Category $category, Relationship $relation) {
-
+ public function destroy($id, Category $category, Relationship $relation)
+ {
$relation = $relation->where('category_id', $id)->first();
if ($relation != null) {
return Redirect::back()->with('fails', 'Category Not Deleted');
@@ -204,11 +223,11 @@ class CategoryController extends Controller {
// redirect to index with success message
try {
$category->delete();
+
return Redirect::back()->with('success', 'Category Deleted Successfully');
} catch (Exception $e) {
- return Redirect::back()->with('fails', 'Category Not Deleted' . '
' . $e->errorInfo[2] . '
');
+ return Redirect::back()->with('fails', 'Category Not Deleted'.'
'.$e->errorInfo[2].'
');
}
}
}
-
}
diff --git a/app/Http/Controllers/Agent/kb/PageController.php b/app/Http/Controllers/Agent/kb/PageController.php
index 1860938c4..45ca6b11e 100644
--- a/app/Http/Controllers/Agent/kb/PageController.php
+++ b/app/Http/Controllers/Agent/kb/PageController.php
@@ -2,41 +2,37 @@
namespace App\Http\Controllers\Agent\kb;
-// controllers
-use App\Http\Controllers\client\kb\UserController;
-use App\Http\Controllers\Agent\kb\ArticleController;
+// controllersuse App\Http\Controllers\Agent\helpdesk\TicketController;
use App\Http\Controllers\Controller;
-use App\Http\Controllers\Agent\kb\SettingsController;
-use App\Http\Controllers\Agent\helpdesk\TicketController;
// request
use App\Http\Requests\kb\PageRequest;
use App\Http\Requests\kb\PageUpdate;
-use Illuminate\Http\Request;
-// Model
use App\Model\kb\Page;
-// classes
+// Model
use Datatable;
+// classes
use Exception;
+use Illuminate\Http\Request;
/**
* PageController
- * This controller is used to CRUD Pages
+ * This controller is used to CRUD Pages.
*
- * @package Controllers
- * @subpackage Controller
* @author Ladybird
*/
-class PageController extends Controller {
-
+class PageController extends Controller
+{
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
- * 3. roles must be agent
+ * 3. roles must be agent.
+ *
* @return void
*/
- public function __construct(Page $page) {
+ public function __construct(Page $page)
+ {
// checking authentication
$this->middleware('auth');
// checking roles
@@ -46,10 +42,12 @@ class PageController extends Controller {
}
/**
- * Display the list of pages
+ * Display the list of pages.
+ *
* @return type
*/
- public function index() {
+ public function index()
+ {
$pages = $this->page->paginate(3);
$pages->setPath('page');
try {
@@ -60,10 +58,12 @@ class PageController extends Controller {
}
/**
- * fetching pages list in chumper datatables
+ * fetching pages list in chumper datatables.
+ *
* @return type
*/
- public function getData() {
+ public function getData()
+ {
/* fetching chumper datatables */
return Datatable::collection(Page::All())
/* search column name */
@@ -77,13 +77,14 @@ class PageController extends Controller {
/* add column Created */
->addColumn('Created', function ($model) {
$t = $model->created_at;
+
return TicketController::usertimezone($t);
})
/* add column Actions */
/* there are action buttons and modal popup to delete a data column */
->addColumn('Actions', function ($model) {
- return ' ' . \Lang::get('lang.delete') . 'slug . '/edit class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . 'slug . ' class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/views/themes/default1/installer/helpdesk/view1.blade.php b/resources/views/themes/default1/installer/helpdesk/view1.blade.php
index daa2b128e..f6bd62040 100644
--- a/resources/views/themes/default1/installer/helpdesk/view1.blade.php
+++ b/resources/views/themes/default1/installer/helpdesk/view1.blade.php
@@ -13,31 +13,30 @@ active
- This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
- Licensed under the Open Software License version 3.0
- 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
- 1. to reproduce the Original Work in copies, either alone or as part of a collective work;
- 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
- 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
- 4. to perform the Original Work publicly; and
- 5. to display the Original Work publicly.
- 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
- 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
- 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
- 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
- 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
- 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
- 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
- 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
- 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
- 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
- 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
- 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
- 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
- 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
- 16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
+
Open Software License v. 3.0 (OSL-3.0)
+
This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
+
Licensed under the Open Software License version 3.0
+
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
+
a) to reproduce the Original Work in copies, either alone or as part of a collective work;
+
b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
+
c) to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
+
d) to perform the Original Work publicly; and
+
e) to display the Original Work publicly.
+
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
+
3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
+
4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
+
5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
+
6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
+
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
+
8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
+
9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
+
10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
+
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
+
12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
+
13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
+
14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
Close
@@ -56,6 +55,7 @@ active
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/installer/helpdesk/view4.blade.php b/resources/views/themes/default1/installer/helpdesk/view4.blade.php
index b9dd3064a..777d21119 100644
--- a/resources/views/themes/default1/installer/helpdesk/view4.blade.php
+++ b/resources/views/themes/default1/installer/helpdesk/view4.blade.php
@@ -12,10 +12,10 @@ done
active
@stop
-@section('content')
+@section('content')
Database Setup
- Test/Probe Prerequisites required to be installed Probe
+ This test will check prerequisites required to install Faveo
FaveoHELPDESK 1.0 and Newer');
-
+define('PROBE_FOR', 'Faveo HELPDESK 1.0 and Newer');
define('STATUS_OK', 'Ok');
define('STATUS_WARNING', 'Warning');
define('STATUS_ERROR', 'Error');
-
class TestResult {
-
var $message;
var $status;
-
function TestResult($message, $status = STATUS_OK) {
$this->message = $message;
$this->status = $status;
}
-
} // TestResult
-
if (DB_HOST && DB_USER && DB_NAME) {
?>
MySQL said: ' . mysqli_error(), STATUS_ERROR);
+ $results[] = new TestResult('Failed to select database. ' . mysqli_error(), STATUS_ERROR);
$mysqli_ok = false;
} // if
} else {
- $results[] = new TestResult('Failed to connect to database. MySQL said: ' . mysqli_error(), STATUS_ERROR);
+ $results[] = new TestResult('Failed to connect to database. ' . mysqli_error(), STATUS_ERROR);
$mysqli_ok = false;
} // if
}
@@ -101,12 +91,12 @@ if (DB_HOST && DB_USER && DB_NAME) {
// Validators
// ---------------------------------------------------
// dd($results);
-
+ ?>
Database test is turned off. To turn it On, please open probe.php in your favorite text editor and set DB_XXXX connection parameters in database section at the beginning of the file:
--}}
- Ok — All OK
- Warning — Not a deal breaker, but it's recommended to have this installed for some features to work
- Error — FaveoHELPDESK require this feature and can't work without it
+
+ Ok — All Ok
+ Warning — Not a deal breaker, but it's recommended to have this installed for some features to work
+ Error — Faveo HELPDESK require this feature and can't work without it
+
{{--
--}}
-@stop
+@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/installer/helpdesk/view4b.blade.php b/resources/views/themes/default1/installer/helpdesk/view4b.blade.php
deleted file mode 100644
index 08f0e0a31..000000000
--- a/resources/views/themes/default1/installer/helpdesk/view4b.blade.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
- Faveo HELPDESK
-
-
-
-
-
-
-
-
-
-
-
-
Licence Agreement
-
Environment Test
-
-
Database Setup
-
Locale Information
-
Ready
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/views/themes/default1/installer/helpdesk/view5.blade.php b/resources/views/themes/default1/installer/helpdesk/view5.blade.php
index 43b79b0ce..07e03d519 100644
--- a/resources/views/themes/default1/installer/helpdesk/view5.blade.php
+++ b/resources/views/themes/default1/installer/helpdesk/view5.blade.php
@@ -17,258 +17,283 @@ active
@stop
@section('content')
+
+
Database test is turned off. To turn it On, please open probe.php in your favorite text editor and set DB_XXXX connection parameters in database section at the beginning of the file:
-
-
DB_HOST — Address of your MySQL server (usually localhost)
-
DB_USER — Username that is used to connect to the server
-
DB_PASS — User's password
-
DB_NAME — Name of the database you are connecting to
-
-
Once these settings are set, probe.php will check if your database meets the system requirements.
-
-
-
-
-
-
OK, this system can run FaveoHELPDESK
-
-
Database connection successfull
-
-Please wait this may take a minute......
-{{-- --}}
-
-{{--
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
This system does not meet FaveoHELPDESK system requirements
-
-
-
Legend
-
-
-
ok — All OK
-
warning — Not a deal breaker, but it's recommended to have this installed for some features to work
-
error — FaveoHELPDESK require this feature and can't work without it
-
-
-
-
-
-@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/installer - Copy/helpdesk/view6.blade.php b/resources/views/themes/default1/installer - Copy/helpdesk/view6.blade.php
deleted file mode 100644
index 348875ec4..000000000
--- a/resources/views/themes/default1/installer - Copy/helpdesk/view6.blade.php
+++ /dev/null
@@ -1,198 +0,0 @@
-@extends('themes.default1.installer.layout.installer')
-
-@section('content')
-