update v1.0.7.5
This commit is contained in:
41
DB/Read Me.txt
Normal file
41
DB/Read Me.txt
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
|======================================
|
||||||
|
|Updating from 1.0.7.4 to 1.0.7.5
|
||||||
|
|======================================
|
||||||
|
|
||||||
|
|------------------------
|
||||||
|
|Database Update
|
||||||
|
|------------------------
|
||||||
|
|
||||||
|
To update copy Updatedatabase.sql from Github Project folder /DB/update from 1.0.7.4 to 1.0.7.5/Updatedatabase.sql
|
||||||
|
|
||||||
|
Please take a backup of your database before following this step. Import this file to your existing Faveo database.
|
||||||
|
|
||||||
|
|
||||||
|
|======================================
|
||||||
|
|Updating from 1.0.6.10 to 1.0.7
|
||||||
|
|======================================
|
||||||
|
|
||||||
|
|------------------------
|
||||||
|
|Database Update
|
||||||
|
|------------------------
|
||||||
|
|
||||||
|
To update copy Updatedatabase.sql from Github Project folder /DB/update from 1.0.6.10 to 1.0.7/Updatedatabase.sql
|
||||||
|
|
||||||
|
Please take a backup of your database before following this step. Import this file to your existing Faveo database.
|
||||||
|
|
||||||
|
|
||||||
|
|=======================================
|
||||||
|
|General Update Instructions
|
||||||
|
|=======================================
|
||||||
|
|
||||||
|
File System update
|
||||||
|
|
||||||
|
Please take a backup of your existing Faveo files before following this step. Download latest release files from Github and replace into existing Faveo folder.
|
||||||
|
|
||||||
|
Don’t replace these files/folder:
|
||||||
|
|
||||||
|
.env file in the root directory.
|
||||||
|
config/database.php file.
|
||||||
|
config/lfm.php file.
|
||||||
|
public/lb-faveo/media.
|
||||||
|
public/photos.
|
576
DB/update from 1.0.7.4 to 1.0.7.5/Updatedatabase.sql
Normal file
576
DB/update from 1.0.7.4 to 1.0.7.5/Updatedatabase.sql
Normal file
@@ -0,0 +1,576 @@
|
|||||||
|
--
|
||||||
|
-- Table structure for table `api_settings`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `api_settings` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `api_settings`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `api_settings` (`id`, `key`, `value`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'ticket_detail', '', '2016-05-26 06:48:39', '2016-05-26 06:48:39');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `bar_notifications`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `bar_notifications` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=24 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `bar_notifications`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `bar_notifications` (`id`, `key`, `value`, `created_at`, `updated_at`) VALUES
|
||||||
|
(23, 'new-version', '', '2016-06-12 23:13:46', '2016-06-12 23:13:46');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `common_settings`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `common_settings` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`option_name` varchar(255) NOT NULL,
|
||||||
|
`option_value` varchar(500) NOT NULL,
|
||||||
|
`status` varchar(255) NOT NULL,
|
||||||
|
`optional_field` varchar(500) NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL,
|
||||||
|
`updated_at` timestamp NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `common_settings`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `common_settings` (`id`, `option_name`, `option_value`, `status`, `optional_field`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'ticket_token_time_duration', '1', '', '', '2016-06-01 14:26:36', '2016-06-01 14:26:36');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `country_code`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `country_code` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`iso` char(2) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`nicename` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`iso3` char(3) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`numcode` smallint(6) NOT NULL,
|
||||||
|
`phonecode` 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=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=240 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `country_code`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `country_code` (`id`, `iso`, `name`, `nicename`, `iso3`, `numcode`, `phonecode`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'AF', 'AFGHANISTAN', 'Afghanistan', 'AFG', 4, 93, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(2, 'AL', 'ALBANIA', 'Albania', 'ALB', 8, 355, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(3, 'DZ', 'ALGERIA', 'Algeria', 'DZA', 12, 213, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(4, 'AS', 'AMERICAN SAMOA', 'American Samoa', 'ASM', 16, 1684, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(5, 'AD', 'ANDORRA', 'Andorra', 'AND', 20, 376, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(6, 'AO', 'ANGOLA', 'Angola', 'AGO', 24, 244, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(7, 'AI', 'ANGUILLA', 'Anguilla', 'AIA', 660, 1264, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(8, 'AQ', 'ANTARCTICA', 'Antarctica', 'NUL', 0, 0, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(9, 'AG', 'ANTIGUA AND BARBUDA', 'Antigua and Barbuda', 'ATG', 28, 1268, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(10, 'AR', 'ARGENTINA', 'Argentina', 'ARG', 32, 54, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(11, 'AM', 'ARMENIA', 'Armenia', 'ARM', 51, 374, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(12, 'AW', 'ARUBA', 'Aruba', 'ABW', 533, 297, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(13, 'AU', 'AUSTRALIA', 'Australia', 'AUS', 36, 61, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(14, 'AT', 'AUSTRIA', 'Austria', 'AUT', 40, 43, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(15, 'AZ', 'AZERBAIJAN', 'Azerbaijan', 'AZE', 31, 994, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(16, 'BS', 'BAHAMAS', 'Bahamas', 'BHS', 44, 1242, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(17, 'BH', 'BAHRAIN', 'Bahrain', 'BHR', 48, 973, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(18, 'BD', 'BANGLADESH', 'Bangladesh', 'BGD', 50, 880, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(19, 'BB', 'BARBADOS', 'Barbados', 'BRB', 52, 1246, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(20, 'BY', 'BELARUS', 'Belarus', 'BLR', 112, 375, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(21, 'BE', 'BELGIUM', 'Belgium', 'BEL', 56, 32, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(22, 'BZ', 'BELIZE', 'Belize', 'BLZ', 84, 501, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(23, 'BJ', 'BENIN', 'Benin', 'BEN', 204, 229, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(24, 'BM', 'BERMUDA', 'Bermuda', 'BMU', 60, 1441, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(25, 'BT', 'BHUTAN', 'Bhutan', 'BTN', 64, 975, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(26, 'BO', 'BOLIVIA', 'Bolivia', 'BOL', 68, 591, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(27, 'BA', 'BOSNIA AND HERZEGOVINA', 'Bosnia and Herzegovina', 'BIH', 70, 387, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(28, 'BW', 'BOTSWANA', 'Botswana', 'BWA', 72, 267, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(29, 'BV', 'BOUVET ISLAND', 'Bouvet Island', 'NUL', 0, 0, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(30, 'BR', 'BRAZIL', 'Brazil', 'BRA', 76, 55, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(31, 'IO', 'BRITISH INDIAN OCEAN TERRITORY', 'British Indian Ocean Territory', 'NUL', 0, 246, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(32, 'BN', 'BRUNEI DARUSSALAM', 'Brunei Darussalam', 'BRN', 96, 673, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(33, 'BG', 'BULGARIA', 'Bulgaria', 'BGR', 100, 359, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(34, 'BF', 'BURKINA FASO', 'Burkina Faso', 'BFA', 854, 226, '2016-05-11 07:08:05', '2016-05-11 07:08:05'),
|
||||||
|
(35, 'BI', 'BURUNDI', 'Burundi', 'BDI', 108, 257, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(36, 'KH', 'CAMBODIA', 'Cambodia', 'KHM', 116, 855, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(37, 'CM', 'CAMEROON', 'Cameroon', 'CMR', 120, 237, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(38, 'CA', 'CANADA', 'Canada', 'CAN', 124, 1, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(39, 'CV', 'CAPE VERDE', 'Cape Verde', 'CPV', 132, 238, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(40, 'KY', 'CAYMAN ISLANDS', 'Cayman Islands', 'CYM', 136, 1345, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(41, 'CF', 'CENTRAL AFRICAN REPUBLIC', 'Central African Republic', 'CAF', 140, 236, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(42, 'TD', 'CHAD', 'Chad', 'TCD', 148, 235, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(43, 'CL', 'CHILE', 'Chile', 'CHL', 152, 56, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(44, 'CN', 'CHINA', 'China', 'CHN', 156, 86, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(45, 'CX', 'CHRISTMAS ISLAND', 'Christmas Island', 'NUL', 0, 61, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(46, 'CC', 'COCOS (KEELING) ISLANDS', 'Cocos (Keeling) Islands', 'NUL', 0, 672, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(47, 'CO', 'COLOMBIA', 'Colombia', 'COL', 170, 57, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(48, 'KM', 'COMOROS', 'Comoros', 'COM', 174, 269, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(49, 'CG', 'CONGO', 'Congo', 'COG', 178, 242, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(50, 'CD', 'CONGO, THE DEMOCRATIC REPUBLIC OF THE', 'Congo, the Democratic Republic of the', 'COD', 180, 242, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(51, 'CK', 'COOK ISLANDS', 'Cook Islands', 'COK', 184, 682, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(52, 'CR', 'COSTA RICA', 'Costa Rica', 'CRI', 188, 506, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(53, 'CI', 'COTE DIVOIRE', 'Cote DIvoire', 'CIV', 384, 225, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(54, 'HR', 'CROATIA', 'Croatia', 'HRV', 191, 385, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(55, 'CU', 'CUBA', 'Cuba', 'CUB', 192, 53, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(56, 'CY', 'CYPRUS', 'Cyprus', 'CYP', 196, 357, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(57, 'CZ', 'CZECH REPUBLIC', 'Czech Republic', 'CZE', 203, 420, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(58, 'DK', 'DENMARK', 'Denmark', 'DNK', 208, 45, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(59, 'DJ', 'DJIBOUTI', 'Djibouti', 'DJI', 262, 253, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(60, 'DM', 'DOMINICA', 'Dominica', 'DMA', 212, 1767, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(61, 'DO', 'DOMINICAN REPUBLIC', 'Dominican Republic', 'DOM', 214, 1809, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(62, 'EC', 'ECUADOR', 'Ecuador', 'ECU', 218, 593, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(63, 'EG', 'EGYPT', 'Egypt', 'EGY', 818, 20, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(64, 'SV', 'EL SALVADOR', 'El Salvador', 'SLV', 222, 503, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(65, 'GQ', 'EQUATORIAL GUINEA', 'Equatorial Guinea', 'GNQ', 226, 240, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(66, 'ER', 'ERITREA', 'Eritrea', 'ERI', 232, 291, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(67, 'EE', 'ESTONIA', 'Estonia', 'EST', 233, 372, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(68, 'ET', 'ETHIOPIA', 'Ethiopia', 'ETH', 231, 251, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(69, 'FK', 'FALKLAND ISLANDS (MALVINAS)', 'Falkland Islands (Malvinas)', 'FLK', 238, 500, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(70, 'FO', 'FAROE ISLANDS', 'Faroe Islands', 'FRO', 234, 298, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(71, 'FJ', 'FIJI', 'Fiji', 'FJI', 242, 679, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(72, 'FI', 'FINLAND', 'Finland', 'FIN', 246, 358, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(73, 'FR', 'FRANCE', 'France', 'FRA', 250, 33, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(74, 'GF', 'FRENCH GUIANA', 'French Guiana', 'GUF', 254, 594, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(75, 'PF', 'FRENCH POLYNESIA', 'French Polynesia', 'PYF', 258, 689, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(76, 'TF', 'FRENCH SOUTHERN TERRITORIES', 'French Southern Territories', 'NUL', 0, 0, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(77, 'GA', 'GABON', 'Gabon', 'GAB', 266, 241, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(78, 'GM', 'GAMBIA', 'Gambia', 'GMB', 270, 220, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(79, 'GE', 'GEORGIA', 'Georgia', 'GEO', 268, 995, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(80, 'DE', 'GERMANY', 'Germany', 'DEU', 276, 49, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(81, 'GH', 'GHANA', 'Ghana', 'GHA', 288, 233, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(82, 'GI', 'GIBRALTAR', 'Gibraltar', 'GIB', 292, 350, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(83, 'GR', 'GREECE', 'Greece', 'GRC', 300, 30, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(84, 'GL', 'GREENLAND', 'Greenland', 'GRL', 304, 299, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(85, 'GD', 'GRENADA', 'Grenada', 'GRD', 308, 1473, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(86, 'GP', 'GUADELOUPE', 'Guadeloupe', 'GLP', 312, 590, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(87, 'GU', 'GUAM', 'Guam', 'GUM', 316, 1671, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(88, 'GT', 'GUATEMALA', 'Guatemala', 'GTM', 320, 502, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(89, 'GN', 'GUINEA', 'Guinea', 'GIN', 324, 224, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(90, 'GW', 'GUINEA-BISSAU', 'Guinea-Bissau', 'GNB', 624, 245, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(91, 'GY', 'GUYANA', 'Guyana', 'GUY', 328, 592, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(92, 'HT', 'HAITI', 'Haiti', 'HTI', 332, 509, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(93, 'HM', 'HEARD ISLAND AND MCDONALD ISLANDS', 'Heard Island and Mcdonald Islands', 'NUL', 0, 0, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(94, 'VA', 'HOLY SEE (VATICAN CITY STATE)', 'Holy See (Vatican City State)', 'VAT', 336, 39, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(95, 'HN', 'HONDURAS', 'Honduras', 'HND', 340, 504, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(96, 'HK', 'HONG KONG', 'Hong Kong', 'HKG', 344, 852, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(97, 'HU', 'HUNGARY', 'Hungary', 'HUN', 348, 36, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(98, 'IS', 'ICELAND', 'Iceland', 'ISL', 352, 354, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(99, 'IN', 'INDIA', 'India', 'IND', 356, 91, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(100, 'ID', 'INDONESIA', 'Indonesia', 'IDN', 360, 62, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(101, 'IR', 'IRAN, ISLAMIC REPUBLIC OF', 'Iran, Islamic Republic of', 'IRN', 364, 98, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(102, 'IQ', 'IRAQ', 'Iraq', 'IRQ', 368, 964, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(103, 'IE', 'IRELAND', 'Ireland', 'IRL', 372, 353, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(104, 'IL', 'ISRAEL', 'Israel', 'ISR', 376, 972, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(105, 'IT', 'ITALY', 'Italy', 'ITA', 380, 39, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(106, 'JM', 'JAMAICA', 'Jamaica', 'JAM', 388, 1876, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(107, 'JP', 'JAPAN', 'Japan', 'JPN', 392, 81, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(108, 'JO', 'JORDAN', 'Jordan', 'JOR', 400, 962, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(109, 'KZ', 'KAZAKHSTAN', 'Kazakhstan', 'KAZ', 398, 7, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(110, 'KE', 'KENYA', 'Kenya', 'KEN', 404, 254, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(111, 'KI', 'KIRIBATI', 'Kiribati', 'KIR', 296, 686, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(112, 'KP', 'KOREA, DEMOCRATIC PEOPLES REPUBLIC OF', 'Korea, Democratic Peoples Republic of', 'PRK', 408, 850, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(113, 'KR', 'KOREA, REPUBLIC OF', 'Korea, Republic of', 'KOR', 410, 82, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(114, 'KW', 'KUWAIT', 'Kuwait', 'KWT', 414, 965, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(115, 'KG', 'KYRGYZSTAN', 'Kyrgyzstan', 'KGZ', 417, 996, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(116, 'LA', 'LAO PEOPLES DEMOCRATIC REPUBLIC', 'Lao Peoples Democratic Republic', 'LAO', 418, 856, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(117, 'LV', 'LATVIA', 'Latvia', 'LVA', 428, 371, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(118, 'LB', 'LEBANON', 'Lebanon', 'LBN', 422, 961, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(119, 'LS', 'LESOTHO', 'Lesotho', 'LSO', 426, 266, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(120, 'LR', 'LIBERIA', 'Liberia', 'LBR', 430, 231, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(121, 'LY', 'LIBYAN ARAB JAMAHIRIYA', 'Libyan Arab Jamahiriya', 'LBY', 434, 218, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(122, 'LI', 'LIECHTENSTEIN', 'Liechtenstein', 'LIE', 438, 423, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(123, 'LT', 'LITHUANIA', 'Lithuania', 'LTU', 440, 370, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(124, 'LU', 'LUXEMBOURG', 'Luxembourg', 'LUX', 442, 352, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(125, 'MO', 'MACAO', 'Macao', 'MAC', 446, 853, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(126, 'MK', 'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF', 'Macedonia, the Former Yugoslav Republic of', 'MKD', 807, 389, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(127, 'MG', 'MADAGASCAR', 'Madagascar', 'MDG', 450, 261, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(128, 'MW', 'MALAWI', 'Malawi', 'MWI', 454, 265, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(129, 'MY', 'MALAYSIA', 'Malaysia', 'MYS', 458, 60, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(130, 'MV', 'MALDIVES', 'Maldives', 'MDV', 462, 960, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(131, 'ML', 'MALI', 'Mali', 'MLI', 466, 223, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(132, 'MT', 'MALTA', 'Malta', 'MLT', 470, 356, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(133, 'MH', 'MARSHALL ISLANDS', 'Marshall Islands', 'MHL', 584, 692, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(134, 'MQ', 'MARTINIQUE', 'Martinique', 'MTQ', 474, 596, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(135, 'MR', 'MAURITANIA', 'Mauritania', 'MRT', 478, 222, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(136, 'MU', 'MAURITIUS', 'Mauritius', 'MUS', 480, 230, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(137, 'YT', 'MAYOTTE', 'Mayotte', 'NUL', 0, 269, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(138, 'MX', 'MEXICO', 'Mexico', 'MEX', 484, 52, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(139, 'FM', 'MICRONESIA, FEDERATED STATES OF', 'Micronesia, Federated States of', 'FSM', 583, 691, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(140, 'MD', 'MOLDOVA, REPUBLIC OF', 'Moldova, Republic of', 'MDA', 498, 373, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(141, 'MC', 'MONACO', 'Monaco', 'MCO', 492, 377, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(142, 'MN', 'MONGOLIA', 'Mongolia', 'MNG', 496, 976, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(143, 'MS', 'MONTSERRAT', 'Montserrat', 'MSR', 500, 1664, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(144, 'MA', 'MOROCCO', 'Morocco', 'MAR', 504, 212, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(145, 'MZ', 'MOZAMBIQUE', 'Mozambique', 'MOZ', 508, 258, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(146, 'MM', 'MYANMAR', 'Myanmar', 'MMR', 104, 95, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(147, 'NA', 'NAMIBIA', 'Namibia', 'NAM', 516, 264, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(148, 'NR', 'NAURU', 'Nauru', 'NRU', 520, 674, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(149, 'NP', 'NEPAL', 'Nepal', 'NPL', 524, 977, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(150, 'NL', 'NETHERLANDS', 'Netherlands', 'NLD', 528, 31, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(151, 'AN', 'NETHERLANDS ANTILLES', 'Netherlands Antilles', 'ANT', 530, 599, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(152, 'NC', 'NEW CALEDONIA', 'New Caledonia', 'NCL', 540, 687, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(153, 'NZ', 'NEW ZEALAND', 'New Zealand', 'NZL', 554, 64, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(154, 'NI', 'NICARAGUA', 'Nicaragua', 'NIC', 558, 505, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(155, 'NE', 'NIGER', 'Niger', 'NER', 562, 227, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(156, 'NG', 'NIGERIA', 'Nigeria', 'NGA', 566, 234, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(157, 'NU', 'NIUE', 'Niue', 'NIU', 570, 683, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(158, 'NF', 'NORFOLK ISLAND', 'Norfolk Island', 'NFK', 574, 672, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(159, 'MP', 'NORTHERN MARIANA ISLANDS', 'Northern Mariana Islands', 'MNP', 580, 1670, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(160, 'NO', 'NORWAY', 'Norway', 'NOR', 578, 47, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(161, 'OM', 'OMAN', 'Oman', 'OMN', 512, 968, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(162, 'PK', 'PAKISTAN', 'Pakistan', 'PAK', 586, 92, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(163, 'PW', 'PALAU', 'Palau', 'PLW', 585, 680, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(164, 'PS', 'PALESTINIAN TERRITORY, OCCUPIED', 'Palestinian Territory, Occupied', 'NUL', 0, 970, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(165, 'PA', 'PANAMA', 'Panama', 'PAN', 591, 507, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(166, 'PG', 'PAPUA NEW GUINEA', 'Papua New Guinea', 'PNG', 598, 675, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(167, 'PY', 'PARAGUAY', 'Paraguay', 'PRY', 600, 595, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(168, 'PE', 'PERU', 'Peru', 'PER', 604, 51, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(169, 'PH', 'PHILIPPINES', 'Philippines', 'PHL', 608, 63, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(170, 'PN', 'PITCAIRN', 'Pitcairn', 'PCN', 612, 0, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(171, 'PL', 'POLAND', 'Poland', 'POL', 616, 48, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(172, 'PT', 'PORTUGAL', 'Portugal', 'PRT', 620, 351, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(173, 'PR', 'PUERTO RICO', 'Puerto Rico', 'PRI', 630, 1787, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(174, 'QA', 'QATAR', 'Qatar', 'QAT', 634, 974, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(175, 'RE', 'REUNION', 'Reunion', 'REU', 638, 262, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(176, 'RO', 'ROMANIA', 'Romania', 'ROM', 642, 40, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(177, 'RU', 'RUSSIAN FEDERATION', 'Russian Federation', 'RUS', 643, 70, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(178, 'RW', 'RWANDA', 'Rwanda', 'RWA', 646, 250, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(179, 'SH', 'SAINT HELENA', 'Saint Helena', 'SHN', 654, 290, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(180, 'KN', 'SAINT KITTS AND NEVIS', 'Saint Kitts and Nevis', 'KNA', 659, 1869, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(181, 'LC', 'SAINT LUCIA', 'Saint Lucia', 'LCA', 662, 1758, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(182, 'PM', 'SAINT PIERRE AND MIQUELON', 'Saint Pierre and Miquelon', 'SPM', 666, 508, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(183, 'VC', 'SAINT VINCENT AND THE GRENADINES', 'Saint Vincent and the Grenadines', 'VCT', 670, 1784, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(184, 'WS', 'SAMOA', 'Samoa', 'WSM', 882, 684, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(185, 'SM', 'SAN MARINO', 'San Marino', 'SMR', 674, 378, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(186, 'ST', 'SAO TOME AND PRINCIPE', 'Sao Tome and Principe', 'STP', 678, 239, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(187, 'SA', 'SAUDI ARABIA', 'Saudi Arabia', 'SAU', 682, 966, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(188, 'SN', 'SENEGAL', 'Senegal', 'SEN', 686, 221, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(189, 'CS', 'SERBIA AND MONTENEGRO', 'Serbia and Montenegro', 'NUL', 0, 381, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(190, 'SC', 'SEYCHELLES', 'Seychelles', 'SYC', 690, 248, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(191, 'SL', 'SIERRA LEONE', 'Sierra Leone', 'SLE', 694, 232, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(192, 'SG', 'SINGAPORE', 'Singapore', 'SGP', 702, 65, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(193, 'SK', 'SLOVAKIA', 'Slovakia', 'SVK', 703, 421, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(194, 'SI', 'SLOVENIA', 'Slovenia', 'SVN', 705, 386, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(195, 'SB', 'SOLOMON ISLANDS', 'Solomon Islands', 'SLB', 90, 677, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(196, 'SO', 'SOMALIA', 'Somalia', 'SOM', 706, 252, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(197, 'ZA', 'SOUTH AFRICA', 'South Africa', 'ZAF', 710, 27, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(198, 'GS', 'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS', 'South Georgia and the South Sandwich Islands', 'NUL', 0, 0, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(199, 'ES', 'SPAIN', 'Spain', 'ESP', 724, 34, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(200, 'LK', 'SRI LANKA', 'Sri Lanka', 'LKA', 144, 94, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(201, 'SD', 'SUDAN', 'Sudan', 'SDN', 736, 249, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(202, 'SR', 'SURINAME', 'Suriname', 'SUR', 740, 597, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(203, 'SJ', 'SVALBARD AND JAN MAYEN', 'Svalbard and Jan Mayen', 'SJM', 744, 47, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(204, 'SZ', 'SWAZILAND', 'Swaziland', 'SWZ', 748, 268, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(205, 'SE', 'SWEDEN', 'Sweden', 'SWE', 752, 46, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(206, 'CH', 'SWITZERLAND', 'Switzerland', 'CHE', 756, 41, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(207, 'SY', 'SYRIAN ARAB REPUBLIC', 'Syrian Arab Republic', 'SYR', 760, 963, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(208, 'TW', 'TAIWAN, PROVINCE OF CHINA', 'Taiwan, Province of China', 'TWN', 158, 886, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(209, 'TJ', 'TAJIKISTAN', 'Tajikistan', 'TJK', 762, 992, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(210, 'TZ', 'TANZANIA, UNITED REPUBLIC OF', 'Tanzania, United Republic of', 'TZA', 834, 255, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(211, 'TH', 'THAILAND', 'Thailand', 'THA', 764, 66, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(212, 'TL', 'TIMOR-LESTE', 'Timor-Leste', 'NUL', 0, 670, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(213, 'TG', 'TOGO', 'Togo', 'TGO', 768, 228, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(214, 'TK', 'TOKELAU', 'Tokelau', 'TKL', 772, 690, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(215, 'TO', 'TONGA', 'Tonga', 'TON', 776, 676, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(216, 'TT', 'TRINIDAD AND TOBAGO', 'Trinidad and Tobago', 'TTO', 780, 1868, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(217, 'TN', 'TUNISIA', 'Tunisia', 'TUN', 788, 216, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(218, 'TR', 'TURKEY', 'Turkey', 'TUR', 792, 90, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(219, 'TM', 'TURKMENISTAN', 'Turkmenistan', 'TKM', 795, 7370, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(220, 'TC', 'TURKS AND CAICOS ISLANDS', 'Turks and Caicos Islands', 'TCA', 796, 1649, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(221, 'TV', 'TUVALU', 'Tuvalu', 'TUV', 798, 688, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(222, 'UG', 'UGANDA', 'Uganda', 'UGA', 800, 256, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(223, 'UA', 'UKRAINE', 'Ukraine', 'UKR', 804, 380, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(224, 'AE', 'UNITED ARAB EMIRATES', 'United Arab Emirates', 'ARE', 784, 971, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(225, 'GB', 'UNITED KINGDOM', 'United Kingdom', 'GBR', 826, 44, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(226, 'US', 'UNITED STATES', 'United States', 'USA', 840, 1, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(227, 'UM', 'UNITED STATES MINOR OUTLYING ISLANDS', 'United States Minor Outlying Islands', 'NUL', 0, 1, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(228, 'UY', 'URUGUAY', 'Uruguay', 'URY', 858, 598, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(229, 'UZ', 'UZBEKISTAN', 'Uzbekistan', 'UZB', 860, 998, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(230, 'VU', 'VANUATU', 'Vanuatu', 'VUT', 548, 678, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(231, 'VE', 'VENEZUELA', 'Venezuela', 'VEN', 862, 58, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(232, 'VN', 'VIET NAM', 'Viet Nam', 'VNM', 704, 84, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(233, 'VG', 'VIRGIN ISLANDS, BRITISH', 'Virgin Islands, British', 'VGB', 92, 1284, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(234, 'VI', 'VIRGIN ISLANDS, U.S.', 'Virgin Islands, U.s.', 'VIR', 850, 1340, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(235, 'WF', 'WALLIS AND FUTUNA', 'Wallis and Futuna', 'WLF', 876, 681, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(236, 'EH', 'WESTERN SAHARA', 'Western Sahara', 'ESH', 732, 212, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(237, 'YE', 'YEMEN', 'Yemen', 'YEM', 887, 967, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(238, 'ZM', 'ZAMBIA', 'Zambia', 'ZMB', 894, 260, '2016-05-11 07:08:06', '2016-05-11 07:08:06'),
|
||||||
|
(239, 'ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716, 263, '2016-05-11 07:08:06', '2016-05-11 07:08:06');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `emails`
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE `emails`
|
||||||
|
ADD `smtp_validate` varchar(222) NOT NULL AFTER `sending_encryption`,
|
||||||
|
ADD `smtp_authentication` varchar(222) NOT NULL AFTER `smtp_validate`;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `login_attempts`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `login_attempts` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`User` varchar(255) NOT NULL,
|
||||||
|
`IP` varchar(20) NOT NULL,
|
||||||
|
`Attempts` int(11) NOT NULL,
|
||||||
|
`LastLogin` datetime NOT NULL,
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `ratings`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `ratings` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(255) NOT NULL,
|
||||||
|
`display_order` int(11) NOT NULL,
|
||||||
|
`allow_modification` int(11) NOT NULL,
|
||||||
|
`rating_scale` int(11) NOT NULL,
|
||||||
|
`rating_area` varchar(255) NOT NULL,
|
||||||
|
`restrict` varchar(255) NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `ratings`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `ratings` (`id`, `name`, `display_order`, `allow_modification`, `rating_scale`, `rating_area`, `restrict`, `created_at`, `updated_at`) VALUES
|
||||||
|
(15, 'OverAll Satisfaction', 1, 1, 5, 'Helpdesk Area', 'General', '2016-06-01 06:42:57', '2016-06-01 06:42:57'),
|
||||||
|
(16, 'Reply Rating', 1, 1, 5, 'Comment Area', 'General', '2016-06-01 06:44:09', '2016-06-01 06:45:21');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `rating_ref`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `rating_ref` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`rating_id` int(11) NOT NULL,
|
||||||
|
`ticket_id` int(11) NOT NULL,
|
||||||
|
`thread_id` int(11) NOT NULL,
|
||||||
|
`rating_value` int(11) NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=53 ;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `settings_security`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `settings_security` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`lockout_message` varchar(255) NOT NULL,
|
||||||
|
`backlist_offender` int(11) NOT NULL,
|
||||||
|
`backlist_threshold` int(11) NOT NULL,
|
||||||
|
`lockout_period` int(11) NOT NULL,
|
||||||
|
`days_to_keep_logs` int(11) NOT NULL,
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `settings_security`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `settings_security` (`id`, `lockout_message`, `backlist_offender`, `backlist_threshold`, `lockout_period`, `days_to_keep_logs`, `updated_at`, `created_at`) VALUES
|
||||||
|
(1, 'You have been locked out of application due to too many failed login attempts.', 0, 344, 15, 0, '2016-06-02 04:44:50', '2016-04-22 07:56:09');
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `template_sets`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `template_sets` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(255) NOT NULL,
|
||||||
|
`active` int(11) NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `template_sets`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `template_sets` (`id`, `name`, `active`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'default', 1, '2016-05-11 03:40:19', '2016-05-11 05:43:32');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `template_types`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `template_types` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=13 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `template_types`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `template_types` (`id`, `name`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'assign-ticket', NULL, NULL),
|
||||||
|
(2, 'check-ticket', NULL, NULL),
|
||||||
|
(3, 'close-ticket', NULL, NULL),
|
||||||
|
(4, 'create-ticket', NULL, NULL),
|
||||||
|
(5, 'create-ticket-agent', NULL, NULL),
|
||||||
|
(6, 'create-ticket-by-agent', NULL, NULL),
|
||||||
|
(7, 'error-report', NULL, NULL),
|
||||||
|
(8, 'registration-notification', NULL, NULL),
|
||||||
|
(9, 'reset-password', NULL, NULL),
|
||||||
|
(10, 'ticket-reply', NULL, NULL),
|
||||||
|
(11, 'ticket-reply-agent', NULL, NULL),
|
||||||
|
(12, 'registration', NULL, NULL);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `templates`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `templates` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`variable` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`type` int(10) unsigned NOT NULL,
|
||||||
|
`subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`set_id` int(11) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `templates_type_foreign` (`type`),
|
||||||
|
KEY `set_id` (`set_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=79 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `templates`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `templates` (`id`, `name`, `variable`, `type`, `subject`, `message`, `description`, `created_at`, `updated_at`, `set_id`) VALUES
|
||||||
|
(1, 'assign-ticket', '', 1, '', '<div>Hello {!!$ticket_agent_name!!},<br><br>Ticket No: {!!$ticket_number!!}<br>Has been assigned to you by {!!$ticket_assigner!!} <br><br>Thank You<br>Kind Regards,<br>{!!$system_from!!}</div>', '', NULL, NULL, 1),
|
||||||
|
(2, 'check-ticket', '', 2, '', '<div>Hello {!!$user!!},<br><br>Click the link below to view your Requested ticket<br>{!!$ticket_link_with_number!!}<br><br>Kind Regards,<br>{!!$system_from!!} </div>', '', NULL, NULL, 1),
|
||||||
|
(3, 'close-ticket', '', 3, '', '<div>Hello,<br><br>This message is regarding your ticket ID {!!$ticket_number!!}. We are changing the status of this ticket to ''Closed'' as the issue appears to be resolved.<br><br>Thank you<br>Kind regards,<br> {!!$system_from!!} <br><br></div>', '', NULL, NULL, 1),
|
||||||
|
(4, 'create-ticket', '', 4, '', '<div><span>Hello {!!$user!!}<br><br></span><span>Thank you for contacting us. This is an automated response confirming the receipt of your ticket. Our team will get back to you as soon as possible. When replying, please make sure that the ticket ID is kept in the subject so that we can track your replies.<br><br></span><span>Ticket ID: {!!$ticket_number!!} <br></span><span>{!!$department_sign!!}<br></span>You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', NULL, NULL, 1),
|
||||||
|
(5, 'create-ticket-agent', '', 5, 'create-ticket-agent', '<div>Hello {!!$ticket_agent_name!!}, <br><br>New ticket {!!$ticket_number!!} created <br>From<br>Name :- {!!$ticket_client_name!!} <br>E-mail :- {!!$ticket_client_email!!} <br><br>{!!$content!!} <br><br>Kind Regards,<br>{!!$system_from!!}</div><br>', '', NULL, '2016-05-17 05:38:37', 1),
|
||||||
|
(6, 'create-ticket-by-agent', '', 6, '', '<div>{!!$content!!}<br><br>{!!$agent_sign!!}<br><br>You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', NULL, NULL, 1),
|
||||||
|
(7, 'error-report', '', 7, '', ' {!!$system_error!!} ', '', NULL, NULL, 1),
|
||||||
|
(8, 'registration-notification', '', 8, '', '<span><p>Hello {!!$user!!} , </p><p>This email is confirmation that you are now registered at our helpdesk.</p><p>Registered Email: {!!$email_address!!}</p><p>Password: {!!$user_password!!}</p><p>You can visit the helpdesk to browse articles and contact us at any time: {!!$system_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p>{!!$system_from!!} </p></span>', '', NULL, NULL, 1),
|
||||||
|
(9, 'reset-password', '', 9, '', 'Hello {!!$user!!}<br/><br/>You asked to reset your password. To do so, please click this link:<br/><br/>{!!$password_reset_link!!}</a><br/><br/><br/>This will let you change your password to something new. If you didn''t ask for this, don''t worry, we''ll keep your password safe.<br/><br/>Thank You.<br/><br/>Kind Regards,<br/><br/> {!!$system_from!!}', '', NULL, NULL, 1),
|
||||||
|
(10, 'ticket-reply', '', 10, '', '<span><div><span><p>{!!$content!!} <br></p><p>{!!$agent_sign!!} </p><p>Ticket Details</p><p>Ticket ID: {!!$ticket_number!!} </p><div><br></div></span><br></div><div><br></div></span>', '', NULL, NULL, 1),
|
||||||
|
(11, 'ticket-reply-agent', '', 11, '', '<div>Hello {!!$ticket_agent_name!!},<b><br></b>A reply been made to ticket {!!$ticket_number!!}<b><br></b>From<br>Name: {!!$ticket_client_name!!}<br>E-mail: {!!$ticket_client_email!!}<b><br></b>{!!$content!!}<b><br></b>Kind Regards,<br>{!!$system_from!!}</div>', '', NULL, NULL, 1),
|
||||||
|
(78, 'registration', '', 12, '', '<span><p>Hello {!!$user!!} , </p><p>This email is confirmation that you are now registered at our helpdesk.</p><p>Registered Email: {!!$email_address!!}</p><p>Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p>{!!$system_from!!} </p></span>', '', NULL, NULL, 1);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table alter for table `ticket_status`
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE `ticket_status`
|
||||||
|
ADD `email_user` int(11) NOT NULL AFTER `sort`,
|
||||||
|
ADD `icon_class` varchar(222) NOT NULL AFTER `email_user`;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `ticket_token`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `ticket_token` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`ticket_id` int(11) NOT NULL,
|
||||||
|
`token` varchar(255) NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',,
|
||||||
|
`updated_at` timestamp NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `users`
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE `users`
|
||||||
|
ADD `country_code` int(11) NOT NULL AFTER `profile_pic`;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `workflow_close`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `workflow_close` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`days` int(11) NOT NULL,
|
||||||
|
`condition` int(11) NOT NULL,
|
||||||
|
`send_email` int(11) 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=latin1 AUTO_INCREMENT=2 ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `workflow_close`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `workflow_close` (`id`, `days`, `condition`, `send_email`, `status`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 3, 1, 1, 3, '2016-05-25 07:52:22', '2016-05-25 02:22:22');
|
@@ -3,19 +3,20 @@
|
|||||||
namespace App\Exceptions;
|
namespace App\Exceptions;
|
||||||
|
|
||||||
// controller
|
// controller
|
||||||
use Bugsnag;
|
|
||||||
//use Illuminate\Validation\ValidationException;
|
|
||||||
use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
//use Illuminate\Validation\ValidationException;
|
||||||
|
use Illuminate\Foundation\Validation\ValidationException;
|
||||||
use Illuminate\Auth\Access\AuthorizationException;
|
use Illuminate\Auth\Access\AuthorizationException;
|
||||||
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||||
// use Symfony\Component\HttpKernel\Exception\HttpException;
|
// use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
// use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
// use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
|
||||||
use Illuminate\Foundation\Validation\ValidationException;
|
use Bugsnag;
|
||||||
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* A list of the exception types that should not be reported.
|
* A list of the exception types that should not be reported.
|
||||||
*
|
*
|
||||||
@@ -52,8 +53,7 @@ class Handler extends ExceptionHandler
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function report(Exception $e)
|
public function report(Exception $e) {
|
||||||
{
|
|
||||||
$debug = \Config::get('app.bugsnag_reporting');
|
$debug = \Config::get('app.bugsnag_reporting');
|
||||||
$debug = ($debug) ? 'true' : 'false';
|
$debug = ($debug) ? 'true' : 'false';
|
||||||
if ($debug == 'false') {
|
if ($debug == 'false') {
|
||||||
@@ -61,7 +61,6 @@ class Handler extends ExceptionHandler
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::report($e);
|
return parent::report($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +88,7 @@ class Handler extends ExceptionHandler
|
|||||||
// if (\Config::get('database.install') == 1) {
|
// if (\Config::get('database.install') == 1) {
|
||||||
// // checking if the error log send to Ladybirdweb is enabled or not
|
// // checking if the error log send to Ladybirdweb is enabled or not
|
||||||
// if (\Config::get('app.ErrorLog') == '1') {
|
// if (\Config::get('app.ErrorLog') == '1') {
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// return response()->view('errors.500', []);
|
// return response()->view('errors.500', []);
|
||||||
@@ -129,79 +128,66 @@ class Handler extends ExceptionHandler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Render an exception into an HTTP response.
|
* Render an exception into an HTTP response.
|
||||||
*
|
* @param type $request
|
||||||
* @param type $request
|
|
||||||
* @param Exception $e
|
* @param Exception $e
|
||||||
*
|
|
||||||
* @return type mixed
|
* @return type mixed
|
||||||
*/
|
*/
|
||||||
public function render($request, Exception $e)
|
public function render($request, Exception $e) {
|
||||||
{
|
|
||||||
switch ($e) {
|
switch ($e) {
|
||||||
case $e instanceof \Illuminate\Http\Exception\HttpResponseException:
|
case $e instanceof \Illuminate\Http\Exception\HttpResponseException :
|
||||||
return parent::render($request, $e);
|
return parent::render($request, $e);
|
||||||
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException:
|
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException :
|
||||||
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
||||||
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException:
|
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException :
|
||||||
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
||||||
default:
|
default :
|
||||||
return $this->common($request, $e);
|
return $this->common($request, $e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to render 500 error page.
|
* Function to render 500 error page
|
||||||
*
|
|
||||||
* @param type $request
|
* @param type $request
|
||||||
* @param type $e
|
* @param type $e
|
||||||
*
|
|
||||||
* @return type mixed
|
* @return type mixed
|
||||||
*/
|
*/
|
||||||
public function render500($request, $e)
|
public function render500($request, $e) {
|
||||||
{
|
|
||||||
if (config('app.debug') == true) {
|
if (config('app.debug') == true) {
|
||||||
return parent::render($request, $e);
|
return parent::render($request, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->route('error500', []);
|
return redirect()->route('error500', []);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to render 404 error page.
|
* Function to render 404 error page
|
||||||
*
|
|
||||||
* @param type $request
|
* @param type $request
|
||||||
* @param type $e
|
* @param type $e
|
||||||
*
|
|
||||||
* @return type mixed
|
* @return type mixed
|
||||||
*/
|
*/
|
||||||
public function render404($request, $e)
|
public function render404($request, $e) {
|
||||||
{
|
|
||||||
if (config('app.debug') == true) {
|
if (config('app.debug') == true) {
|
||||||
return parent::render($request, $e);
|
return parent::render($request, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->route('error404', []);
|
return redirect()->route('error404', []);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common finction to render both types of codes.
|
* Common finction to render both types of codes
|
||||||
*
|
|
||||||
* @param type $request
|
* @param type $request
|
||||||
* @param type $e
|
* @param type $e
|
||||||
*
|
|
||||||
* @return type mixed
|
* @return type mixed
|
||||||
*/
|
*/
|
||||||
public function common($request, $e)
|
public function common($request, $e) {
|
||||||
{
|
|
||||||
switch ($e) {
|
switch ($e) {
|
||||||
case $e instanceof HttpException:
|
case $e instanceof HttpException :
|
||||||
return $this->render404($request, $e);
|
return $this->render404($request, $e);
|
||||||
case $e instanceof NotFoundHttpException:
|
case $e instanceof NotFoundHttpException :
|
||||||
return $this->render404($request, $e);
|
return $this->render404($request, $e);
|
||||||
default:
|
default :
|
||||||
return $this->render500($request, $e);
|
return $this->render500($request, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::render($request, $e);
|
return parent::render($request, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -143,7 +143,7 @@ class DepartmentController extends Controller
|
|||||||
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 {
|
try {
|
||||||
$sys_department = \DB::table('settings_system')
|
$sys_department = \DB::table('settings_system')
|
||||||
->select('department')
|
->select('department')
|
||||||
->where('id', '=', 1)
|
->where('id', '=', 1)
|
||||||
->first();
|
->first();
|
||||||
@@ -175,6 +175,7 @@ class DepartmentController extends Controller
|
|||||||
{
|
{
|
||||||
// dd($id);
|
// dd($id);
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$table = $group_assign_department->where('department_id', $id);
|
$table = $group_assign_department->where('department_id', $id);
|
||||||
$table->delete();
|
$table->delete();
|
||||||
$requests = $request->input('group_id');
|
$requests = $request->input('group_id');
|
||||||
|
@@ -28,15 +28,14 @@ use Lang;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class EmailsController extends Controller
|
class EmailsController extends Controller {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Defining constructor variables.
|
* Defining constructor variables.
|
||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct() {
|
||||||
{
|
|
||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
$this->middleware('roles');
|
$this->middleware('roles');
|
||||||
}
|
}
|
||||||
@@ -48,8 +47,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function index(Emails $email)
|
public function index(Emails $email) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
// fetch all the emails from emails table
|
// fetch all the emails from emails table
|
||||||
$emails = $email->get();
|
$emails = $email->get();
|
||||||
@@ -70,8 +68,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function create(Department $department, Help_topic $help, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol)
|
public function create(Department $department, Help_topic $help, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
// fetch all the departments from the department table
|
// fetch all the departments from the department table
|
||||||
$departments = $department->get();
|
$departments = $department->get();
|
||||||
@@ -96,17 +93,16 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function validatingEmailSettings(Request $request)
|
public function validatingEmailSettings(Request $request) {
|
||||||
{
|
|
||||||
$validator = \Validator::make(
|
$validator = \Validator::make(
|
||||||
[
|
[
|
||||||
'email_address' => $request->input('email_address'),
|
'email_address' => $request->input('email_address'),
|
||||||
'email_name' => $request->input('email_name'),
|
'email_name' => $request->input('email_name'),
|
||||||
'password' => $request->input('password'),
|
'password' => $request->input('password'),
|
||||||
], [
|
], [
|
||||||
'email_address' => 'required|email|unique:emails',
|
'email_address' => 'required|email|unique:emails',
|
||||||
'email_name' => 'required',
|
'email_name' => 'required',
|
||||||
'password' => 'required',
|
'password' => 'required',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
@@ -177,8 +173,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Redirect
|
* @return type Redirect
|
||||||
*/
|
*/
|
||||||
public function store($request, $imap_check)
|
public function store($request, $imap_check) {
|
||||||
{
|
|
||||||
$email = new Emails();
|
$email = new Emails();
|
||||||
try {
|
try {
|
||||||
// saving all the fields to the database
|
// saving all the fields to the database
|
||||||
@@ -260,8 +255,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol)
|
public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
$sys_email = \DB::table('settings_email')->select('sys_email')->where('id', '=', 1)->first();
|
$sys_email = \DB::table('settings_email')->select('sys_email')->where('id', '=', 1)->first();
|
||||||
// dd($sys_email);
|
// dd($sys_email);
|
||||||
@@ -292,17 +286,16 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function validatingEmailSettingsUpdate($id, Request $request)
|
public function validatingEmailSettingsUpdate($id, Request $request) {
|
||||||
{
|
|
||||||
$validator = \Validator::make(
|
$validator = \Validator::make(
|
||||||
[
|
[
|
||||||
'email_address' => $request->input('email_address'),
|
'email_address' => $request->input('email_address'),
|
||||||
'email_name' => $request->input('email_name'),
|
'email_name' => $request->input('email_name'),
|
||||||
'password' => $request->input('password'),
|
'password' => $request->input('password'),
|
||||||
], [
|
], [
|
||||||
'email_address' => 'email',
|
'email_address' => 'email',
|
||||||
'email_name' => 'required',
|
'email_name' => 'required',
|
||||||
'password' => 'required',
|
'password' => 'required',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
@@ -375,8 +368,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function update($id, $request, $imap_check)
|
public function update($id, $request, $imap_check) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
// fetch the selected emails
|
// fetch the selected emails
|
||||||
$emails = Emails::whereId($id)->first();
|
$emails = Emails::whereId($id)->first();
|
||||||
@@ -426,12 +418,12 @@ class EmailsController extends Controller
|
|||||||
// $emails->password = Crypt::encrypt($request->input('password'));
|
// $emails->password = Crypt::encrypt($request->input('password'));
|
||||||
$emails->save();
|
$emails->save();
|
||||||
//dd($request->sys_email);
|
//dd($request->sys_email);
|
||||||
if ($request->sys_email == 'on') {
|
if($request->sys_email == 'on') {
|
||||||
$system = \DB::table('settings_email')
|
$system = \DB::table('settings_email')
|
||||||
->where('id', '=', 1)
|
->where('id', '=', 1)
|
||||||
->update(['sys_email' => $id]);
|
->update(['sys_email' => $id]);
|
||||||
} elseif ($request->input('count') <= 1 && $request->sys_email == null) {
|
} elseif ($request->input('count') <= 1 && $request->sys_email == null) {
|
||||||
$system = \DB::table('settings_email')
|
$system = \DB::table('settings_email')
|
||||||
->where('id', '=', 1)
|
->where('id', '=', 1)
|
||||||
->update(['sys_email' => null]);
|
->update(['sys_email' => null]);
|
||||||
}
|
}
|
||||||
@@ -453,8 +445,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Redirect
|
* @return type Redirect
|
||||||
*/
|
*/
|
||||||
public function destroy($id, Emails $email)
|
public function destroy($id, Emails $email) {
|
||||||
{
|
|
||||||
// fetching the details on the basis of the $id passed to the function
|
// fetching the details on the basis of the $id passed to the function
|
||||||
$default_system_email = Email::where('id', '=', '1')->first();
|
$default_system_email = Email::where('id', '=', '1')->first();
|
||||||
if ($default_system_email->sys_email) {
|
if ($default_system_email->sys_email) {
|
||||||
@@ -485,26 +476,25 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type int
|
* @return type int
|
||||||
*/
|
*/
|
||||||
public function getImapStream($request, $validate)
|
public function getImapStream($request, $validate) {
|
||||||
{
|
|
||||||
$fetching_status = $request->input('fetching_status');
|
$fetching_status = $request->input('fetching_status');
|
||||||
$username = $request->input('email_address');
|
$username = $request->input('email_address');
|
||||||
$password = $request->input('password');
|
$password = $request->input('password');
|
||||||
$protocol_id = $request->input('mailbox_protocol');
|
$protocol_id = $request->input('mailbox_protocol');
|
||||||
$fetching_protocol = '/'.$request->input('fetching_protocol');
|
$fetching_protocol = '/' . $request->input('fetching_protocol');
|
||||||
$fetching_encryption = '/'.$request->input('fetching_encryption');
|
$fetching_encryption = '/' . $request->input('fetching_encryption');
|
||||||
if ($fetching_encryption == '/none') {
|
if ($fetching_encryption == '/none') {
|
||||||
$fetching_encryption2 = '/novalidate-cert';
|
$fetching_encryption2 = '/novalidate-cert';
|
||||||
$mailbox_protocol = $fetching_encryption2;
|
$mailbox_protocol = $fetching_encryption2;
|
||||||
$host = $request->input('fetching_host');
|
$host = $request->input('fetching_host');
|
||||||
$port = $request->input('fetching_port');
|
$port = $request->input('fetching_port');
|
||||||
$mailbox = '{'.$host.':'.$port.$mailbox_protocol.'}INBOX';
|
$mailbox = '{' . $host . ':' . $port . $mailbox_protocol . '}INBOX';
|
||||||
} else {
|
} else {
|
||||||
$mailbox_protocol = $fetching_protocol.$fetching_encryption;
|
$mailbox_protocol = $fetching_protocol . $fetching_encryption;
|
||||||
$host = $request->input('fetching_host');
|
$host = $request->input('fetching_host');
|
||||||
$port = $request->input('fetching_port');
|
$port = $request->input('fetching_port');
|
||||||
$mailbox = '{'.$host.':'.$port.$mailbox_protocol.$validate.'}INBOX';
|
$mailbox = '{' . $host . ':' . $port . $mailbox_protocol . $validate . '}INBOX';
|
||||||
$mailbox_protocol = $fetching_encryption.$validate;
|
$mailbox_protocol = $fetching_encryption . $validate;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$imap_stream = imap_open($mailbox, $username, $password);
|
$imap_stream = imap_open($mailbox, $username, $password);
|
||||||
@@ -528,8 +518,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type int
|
* @return type int
|
||||||
*/
|
*/
|
||||||
public function checkImapStream($imap_stream)
|
public function checkImapStream($imap_stream) {
|
||||||
{
|
|
||||||
$check_imap_stream = imap_check($imap_stream);
|
$check_imap_stream = imap_check($imap_stream);
|
||||||
if ($check_imap_stream) {
|
if ($check_imap_stream) {
|
||||||
$imap_stream = 1;
|
$imap_stream = 1;
|
||||||
@@ -547,8 +536,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getSmtp($request)
|
public function getSmtp($request) {
|
||||||
{
|
|
||||||
$sending_status = $request->input('sending_status');
|
$sending_status = $request->input('sending_status');
|
||||||
// cheking for the sending protocol
|
// cheking for the sending protocol
|
||||||
if ($request->input('sending_protocol') == 'smtp') {
|
if ($request->input('sending_protocol') == 'smtp') {
|
||||||
@@ -564,8 +552,8 @@ class EmailsController extends Controller
|
|||||||
$mail->SMTPAuth = true; // Enable SMTP authentication
|
$mail->SMTPAuth = true; // Enable SMTP authentication
|
||||||
$mail->SMTPOptions = [
|
$mail->SMTPOptions = [
|
||||||
'ssl' => [
|
'ssl' => [
|
||||||
'verify_peer' => false,
|
'verify_peer' => false,
|
||||||
'verify_peer_name' => false,
|
'verify_peer_name' => false,
|
||||||
'allow_self_signed' => true,
|
'allow_self_signed' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
@@ -597,8 +585,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type string or null
|
* @return type string or null
|
||||||
*/
|
*/
|
||||||
public function departmentValue($dept)
|
public function departmentValue($dept) {
|
||||||
{
|
|
||||||
if ($dept) {
|
if ($dept) {
|
||||||
$email_department = $dept;
|
$email_department = $dept;
|
||||||
} else {
|
} else {
|
||||||
@@ -615,8 +602,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type string or null
|
* @return type string or null
|
||||||
*/
|
*/
|
||||||
public function priorityValue($priority)
|
public function priorityValue($priority) {
|
||||||
{
|
|
||||||
if ($priority) {
|
if ($priority) {
|
||||||
$email_priority = $priority;
|
$email_priority = $priority;
|
||||||
} else {
|
} else {
|
||||||
@@ -633,8 +619,7 @@ class EmailsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type string or null
|
* @return type string or null
|
||||||
*/
|
*/
|
||||||
public function helpTopicValue($help_topic)
|
public function helpTopicValue($help_topic) {
|
||||||
{
|
|
||||||
if ($help_topic) {
|
if ($help_topic) {
|
||||||
$email_help_topic = $help_topic;
|
$email_help_topic = $help_topic;
|
||||||
} else {
|
} else {
|
||||||
@@ -643,4 +628,5 @@ class EmailsController extends Controller
|
|||||||
|
|
||||||
return $email_help_topic;
|
return $email_help_topic;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,21 +3,22 @@
|
|||||||
namespace App\Http\Controllers\Admin\helpdesk;
|
namespace App\Http\Controllers\Admin\helpdesk;
|
||||||
|
|
||||||
// controller
|
// controller
|
||||||
|
use App\Http\Controllers\Common\PhpMailController;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
// request
|
// request
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use File;
|
|
||||||
use Lang;
|
use Lang;
|
||||||
|
use File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ErrorAndDebuggingController.
|
* ErrorAndDebuggingController
|
||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class ErrorAndDebuggingController extends Controller
|
class ErrorAndDebuggingController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
@@ -30,76 +31,68 @@ class ErrorAndDebuggingController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function to show error and debugging setting page.
|
* function to show error and debugging setting page
|
||||||
*
|
|
||||||
* @param void
|
* @param void
|
||||||
*
|
* @return response
|
||||||
* @return response
|
|
||||||
*/
|
*/
|
||||||
public function showSettings()
|
public function showSettings()
|
||||||
{
|
{
|
||||||
$debug = \Config::get('app.debug');
|
$debug = \Config::get('app.debug');
|
||||||
$bugsnag = \Config::get('app.bugsnag_reporting');
|
$bugsnag = \Config::get('app.bugsnag_reporting');
|
||||||
|
return view('themes.default1.admin.helpdesk.settings.error-and-logs.error-debug')->with(['debug'=> $debug, 'bugsnag' => $bugsnag]);
|
||||||
|
}
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.settings.error-and-logs.error-debug')->with(['debug' => $debug, 'bugsnag' => $bugsnag]);
|
/**
|
||||||
}
|
* funtion to update error and debugging settings
|
||||||
|
* @param void
|
||||||
/**
|
* @return
|
||||||
* funtion to update error and debugging settings.
|
*/
|
||||||
*
|
public function postSettings()
|
||||||
* @param void
|
{
|
||||||
*
|
try{
|
||||||
* @return
|
$debug = \Config::get('app.debug');
|
||||||
*/
|
$debug = ($debug) ? 'true' : 'false';
|
||||||
public function postSettings()
|
$bugsnag_debug = \Config::get('app.bugsnag_reporting');
|
||||||
{
|
$bugsnag_debug = ($bugsnag_debug) ? 'true' : 'false';
|
||||||
try {
|
if ($debug != \Input::get('debug') || $bugsnag_debug != \Input::get('bugsnag')) {
|
||||||
$debug = \Config::get('app.debug');
|
// dd($request->input());
|
||||||
$debug = ($debug) ? 'true' : 'false';
|
$debug_new = base_path()
|
||||||
$bugsnag_debug = \Config::get('app.bugsnag_reporting');
|
.DIRECTORY_SEPARATOR.
|
||||||
$bugsnag_debug = ($bugsnag_debug) ? 'true' : 'false';
|
'config'
|
||||||
if ($debug != \Input::get('debug') || $bugsnag_debug != \Input::get('bugsnag')) {
|
.DIRECTORY_SEPARATOR.
|
||||||
// dd($request->input());
|
'app.php';
|
||||||
$debug_new = base_path()
|
$datacontent = File::get($debug_new);
|
||||||
.DIRECTORY_SEPARATOR.
|
$datacontent = str_replace("'debug' => ".$debug,
|
||||||
'config'
|
"'debug' => ".\Input::get('debug'),
|
||||||
.DIRECTORY_SEPARATOR.
|
$datacontent);
|
||||||
'app.php';
|
File::put($debug_new, $datacontent);
|
||||||
$datacontent = File::get($debug_new);
|
|
||||||
$datacontent = str_replace("'debug' => ".$debug,
|
// dd($request->input());
|
||||||
"'debug' => ".\Input::get('debug'),
|
$bugsnag_debug_new = base_path()
|
||||||
$datacontent);
|
.DIRECTORY_SEPARATOR.
|
||||||
File::put($debug_new, $datacontent);
|
'config'
|
||||||
|
.DIRECTORY_SEPARATOR.
|
||||||
// dd($request->input());
|
'app.php';
|
||||||
$bugsnag_debug_new = base_path()
|
$datacontent2 = File::get($bugsnag_debug_new);
|
||||||
.DIRECTORY_SEPARATOR.
|
$datacontent2 = str_replace("'bugsnag_reporting' => ".$bugsnag_debug,
|
||||||
'config'
|
"'bugsnag_reporting' => ".\Input::get('bugsnag'),
|
||||||
.DIRECTORY_SEPARATOR.
|
$datacontent2);
|
||||||
'app.php';
|
File::put($bugsnag_debug_new, $datacontent2);
|
||||||
$datacontent2 = File::get($bugsnag_debug_new);
|
return redirect()->back()->with('success',
|
||||||
$datacontent2 = str_replace("'bugsnag_reporting' => ".$bugsnag_debug,
|
Lang::get('lang.error-debug-settings-saved-message'));
|
||||||
"'bugsnag_reporting' => ".\Input::get('bugsnag'),
|
} else {
|
||||||
$datacontent2);
|
return redirect()->back()->with('fails',
|
||||||
File::put($bugsnag_debug_new, $datacontent2);
|
Lang::get('lang.error-debug-settings-error-message'));
|
||||||
|
}
|
||||||
return redirect()->back()->with('success',
|
|
||||||
Lang::get('lang.error-debug-settings-saved-message'));
|
|
||||||
} else {
|
|
||||||
return redirect()->back()->with('fails',
|
|
||||||
Lang::get('lang.error-debug-settings-error-message'));
|
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
/* redirect to Index page with Fails Message */
|
/* redirect to Index page with Fails Message */
|
||||||
return redirect()->back()->with('fails', $e->getMessage());
|
return redirect()->back()->with('fails', $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function to show error log table page.
|
* function to show error log table page
|
||||||
*
|
|
||||||
* @param void
|
* @param void
|
||||||
*
|
|
||||||
* @return response view
|
* @return response view
|
||||||
*/
|
*/
|
||||||
public function showErrorLogs()
|
public function showErrorLogs()
|
||||||
|
@@ -152,7 +152,7 @@ class HelptopicController extends Controller
|
|||||||
$sys_help_topic = \DB::table('settings_ticket')
|
$sys_help_topic = \DB::table('settings_ticket')
|
||||||
->select('help_topic')
|
->select('help_topic')
|
||||||
->where('id', '=', 1)->first();
|
->where('id', '=', 1)->first();
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.manage.helptopic.edit', compact('priority', 'departments', 'topics', 'forms', 'agents', 'slas', 'sys_help_topic'));
|
return view('themes.default1.admin.helpdesk.manage.helptopic.edit', compact('priority', 'departments', 'topics', 'forms', 'agents', 'slas', 'sys_help_topic'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return redirect('helptopic')->with('fails', '<li>'.$e->getMessage().'</li>');
|
return redirect('helptopic')->with('fails', '<li>'.$e->getMessage().'</li>');
|
||||||
|
@@ -182,7 +182,7 @@ class SettingsController extends Controller
|
|||||||
/* Check whether function success or not */
|
/* Check whether function success or not */
|
||||||
$systems->fill($request->input())->save();
|
$systems->fill($request->input())->save();
|
||||||
/* redirect to Index page with Success Message */
|
/* redirect to Index page with Success Message */
|
||||||
|
|
||||||
// dd($datacontent);
|
// dd($datacontent);
|
||||||
//\Config::set('app.debug', $request->input('debug'));
|
//\Config::set('app.debug', $request->input('debug'));
|
||||||
return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully'));
|
return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully'));
|
||||||
|
@@ -104,8 +104,7 @@ class SlaController extends Controller
|
|||||||
$slas = Sla_plan::whereId($id)->first();
|
$slas = Sla_plan::whereId($id)->first();
|
||||||
$slas->get();
|
$slas->get();
|
||||||
$sla = \DB::table('settings_ticket')->select('sla')->where('id', '=', 1)->first();
|
$sla = \DB::table('settings_ticket')->select('sla')->where('id', '=', 1)->first();
|
||||||
|
return view('themes.default1.admin.helpdesk.manage.sla.edit', compact('slas','sla'));
|
||||||
return view('themes.default1.admin.helpdesk.manage.sla.edit', compact('slas', 'sla'));
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return redirect()->back()->with('fails', $e->getMessage());
|
return redirect()->back()->with('fails', $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -138,7 +137,6 @@ class SlaController extends Controller
|
|||||||
->where('id', '=', 1)
|
->where('id', '=', 1)
|
||||||
->update(['sla' => $id]);
|
->update(['sla' => $id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect('sla')->with('success', Lang::get('lang.sla_plan_updated_successfully'));
|
return redirect('sla')->with('success', Lang::get('lang.sla_plan_updated_successfully'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
/* redirect to Index page with Fails Message */
|
/* redirect to Index page with Fails Message */
|
||||||
|
@@ -24,15 +24,14 @@ use Lang;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class TemplateController extends Controller
|
class TemplateController extends Controller {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public function __construct(PhpMailController $PhpMailController)
|
public function __construct(PhpMailController $PhpMailController) {
|
||||||
{
|
|
||||||
$this->PhpMailController = $PhpMailController;
|
$this->PhpMailController = $PhpMailController;
|
||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
$this->middleware('roles');
|
$this->middleware('roles');
|
||||||
@@ -45,8 +44,7 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function index(Template $template)
|
public function index(Template $template) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
$templates = $template->get();
|
$templates = $template->get();
|
||||||
|
|
||||||
@@ -64,8 +62,7 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function create(Languages $language, Template $template)
|
public function create(Languages $language, Template $template) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
$templates = $template->get();
|
$templates = $template->get();
|
||||||
$languages = $language->get();
|
$languages = $language->get();
|
||||||
@@ -84,8 +81,7 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function store(Template $template, TemplateRequest $request)
|
public function store(Template $template, TemplateRequest $request) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
/* Check whether function success or not */
|
/* Check whether function success or not */
|
||||||
if ($template->fill($request->input())->save() == true) {
|
if ($template->fill($request->input())->save() == true) {
|
||||||
@@ -108,8 +104,7 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function show($id)
|
public function show($id) {
|
||||||
{
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,41 +117,37 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function listdirectories()
|
public function listdirectories() {
|
||||||
{
|
$path = \Config::get('view.paths')[0] . '/emails/';
|
||||||
$path = \Config::get('view.paths')[0].'/emails/';
|
|
||||||
$directories = scandir($path);
|
$directories = scandir($path);
|
||||||
$directory = str_replace('/', '-', $path);
|
$directory = str_replace('/', '-', $path);
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.emails.template.listdirectories', compact('directories', 'directory'));
|
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);
|
$paths = str_replace('-', '/', $path);
|
||||||
$directory2 = $paths.$template;
|
$directory2 = $paths . $template;
|
||||||
|
|
||||||
$templates = scandir($directory2);
|
$templates = scandir($directory2);
|
||||||
$directory = str_replace('/', '-', $directory2.'/');
|
$directory = str_replace('/', '-', $directory2 . '/');
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.emails.template.listtemplates', compact('templates', 'directory'));
|
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);
|
$directory = str_replace('-', '/', $path);
|
||||||
$handle = fopen($directory.$template, 'r');
|
$handle = fopen($directory . $template, 'r');
|
||||||
$contents = fread($handle, filesize($directory.$template));
|
$contents = fread($handle, filesize($directory . $template));
|
||||||
fclose($handle);
|
fclose($handle);
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.emails.template.readtemplates', compact('contents', 'template', 'path'));
|
return view('themes.default1.admin.helpdesk.emails.template.readtemplates', compact('contents', 'template', 'path'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createtemplate()
|
public function createtemplate() {
|
||||||
{
|
|
||||||
$directory = '../resources/views/emails/';
|
$directory = '../resources/views/emails/';
|
||||||
$fname = Input::get('folder_name');
|
$fname = Input::get('folder_name');
|
||||||
$filename = $directory.$fname;
|
$filename = $directory . $fname;
|
||||||
|
|
||||||
// images folder creation using php
|
// images folder creation using php
|
||||||
// $mydir = dirname( __FILE__ )."/html/images";
|
// $mydir = dirname( __FILE__ )."/html/images";
|
||||||
@@ -168,7 +159,7 @@ class TemplateController extends Controller
|
|||||||
if (!file_exists($filename)) {
|
if (!file_exists($filename)) {
|
||||||
mkdir($filename, 0777);
|
mkdir($filename, 0777);
|
||||||
}
|
}
|
||||||
$files = array_filter(scandir($directory.'default'));
|
$files = array_filter(scandir($directory . 'default'));
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if ($file === '.' or $file === '..') {
|
if ($file === '.' or $file === '..') {
|
||||||
@@ -176,29 +167,27 @@ class TemplateController extends Controller
|
|||||||
}
|
}
|
||||||
if (!is_dir($file)) {
|
if (!is_dir($file)) {
|
||||||
// $file_to_go = str_replace("code/resources/views/emails/",'code/resources/views/emails/'.$fname,$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');
|
return \Redirect::back()->with('success', 'Successfully copied');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function writetemplate($template, $path)
|
public function writetemplate($template, $path) {
|
||||||
{
|
|
||||||
$directory = str_replace('-', '/', $path);
|
$directory = str_replace('-', '/', $path);
|
||||||
$b = Input::get('templatedata');
|
$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');
|
return \Redirect::back()->with('success', 'Successfully updated');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deletetemplate($template, $path)
|
public function deletetemplate($template, $path) {
|
||||||
{
|
|
||||||
$directory = str_replace('-', '/', $path);
|
$directory = str_replace('-', '/', $path);
|
||||||
$dir = $directory.$template;
|
$dir = $directory . $template;
|
||||||
$status = \DB::table('settings_email')->first();
|
$status = \DB::table('settings_email')->first();
|
||||||
if ($template == 'default' or $template == $status->template) {
|
if ($template == 'default' or $template == $status->template) {
|
||||||
return \Redirect::back()->with('fails', 'You cannot delete a default or active directory!');
|
return \Redirect::back()->with('fails', 'You cannot delete a default or active directory!');
|
||||||
@@ -207,7 +196,7 @@ class TemplateController extends Controller
|
|||||||
$objects = scandir($dir);
|
$objects = scandir($dir);
|
||||||
foreach ($objects as $object) {
|
foreach ($objects as $object) {
|
||||||
if ($object != '.' && $object != '..') {
|
if ($object != '.' && $object != '..') {
|
||||||
unlink($dir.'/'.$object);
|
unlink($dir . '/' . $object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rmdir($dir);
|
rmdir($dir);
|
||||||
@@ -218,15 +207,13 @@ class TemplateController extends Controller
|
|||||||
return \Redirect::back()->with('success', 'Successfully Deleted');
|
return \Redirect::back()->with('success', 'Successfully Deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function activateset($setname)
|
public function activateset($setname) {
|
||||||
{
|
|
||||||
\DB::table('settings_email')->update(['template' => $setname]);
|
\DB::table('settings_email')->update(['template' => $setname]);
|
||||||
|
|
||||||
return \Redirect::back()->with('success', 'You have Successfully Activated this Set');
|
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 {
|
try {
|
||||||
$templates = $template->whereId($id)->first();
|
$templates = $template->whereId($id)->first();
|
||||||
$languages = $language->get();
|
$languages = $language->get();
|
||||||
@@ -246,8 +233,7 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function update($id, Template $template, TemplateUdate $request)
|
public function update($id, Template $template, TemplateUdate $request) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
//TODO validation
|
//TODO validation
|
||||||
$templates = $template->whereId($id)->first();
|
$templates = $template->whereId($id)->first();
|
||||||
@@ -273,8 +259,7 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function destroy($id, Template $template)
|
public function destroy($id, Template $template) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
$templates = $template->whereId($id)->first();
|
$templates = $template->whereId($id)->first();
|
||||||
/* Check whether function success or not */
|
/* Check whether function success or not */
|
||||||
@@ -298,8 +283,7 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function formDiagno(Emails $email)
|
public function formDiagno(Emails $email) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
$emails = $email->get();
|
$emails = $email->get();
|
||||||
|
|
||||||
@@ -316,8 +300,7 @@ class TemplateController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function postDiagno(DiagnosRequest $request)
|
public function postDiagno(DiagnosRequest $request) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
$email_details = Emails::where('id', '=', $request->from)->first();
|
$email_details = Emails::where('id', '=', $request->from)->first();
|
||||||
if ($email_details->sending_protocol == 'mail') {
|
if ($email_details->sending_protocol == 'mail') {
|
||||||
@@ -325,12 +308,12 @@ class TemplateController extends Controller
|
|||||||
$mail->IsSendmail(); // telling the class to use SendMail transport
|
$mail->IsSendmail(); // telling the class to use SendMail transport
|
||||||
$mail->SetFrom($email_details->email_address, $email_details->email_name); // sender details
|
$mail->SetFrom($email_details->email_address, $email_details->email_name); // sender details
|
||||||
$address = $request->to; // receiver email
|
$address = $request->to; // receiver email
|
||||||
$mail->AddAddress($address);
|
$mail->AddAddress($address);
|
||||||
$mail->Subject = $request->subject; // subject of the email
|
$mail->Subject = $request->subject; // subject of the email
|
||||||
$body = $request->message; // body of the email
|
$body = $request->message; // body of the email
|
||||||
$mail->MsgHTML($body);
|
$mail->MsgHTML($body);
|
||||||
if (!$mail->Send()) {
|
if (!$mail->Send()) {
|
||||||
$return = Lang::get('lang.mailer_error').': '.$mail->ErrorInfo;
|
$return = Lang::get('lang.mailer_error') . ': ' . $mail->ErrorInfo;
|
||||||
} else {
|
} else {
|
||||||
$return = Lang::get('lang.message_has_been_sent');
|
$return = Lang::get('lang.message_has_been_sent');
|
||||||
}
|
}
|
||||||
@@ -340,8 +323,8 @@ class TemplateController extends Controller
|
|||||||
if ($email_details->smtp_validate == '1') {
|
if ($email_details->smtp_validate == '1') {
|
||||||
$mail->SMTPOptions = [
|
$mail->SMTPOptions = [
|
||||||
'ssl' => [
|
'ssl' => [
|
||||||
'verify_peer' => false,
|
'verify_peer' => false,
|
||||||
'verify_peer_name' => false,
|
'verify_peer_name' => false,
|
||||||
'allow_self_signed' => true,
|
'allow_self_signed' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
@@ -358,15 +341,15 @@ class TemplateController extends Controller
|
|||||||
$mail->Subject = $request->subject;
|
$mail->Subject = $request->subject;
|
||||||
$mail->Body = utf8_decode($request->message);
|
$mail->Body = utf8_decode($request->message);
|
||||||
if (!$mail->send()) {
|
if (!$mail->send()) {
|
||||||
$return = Lang::get('lang.mailer_error').': '.$mail->ErrorInfo;
|
$return = Lang::get('lang.mailer_error') . ': ' . $mail->ErrorInfo;
|
||||||
} else {
|
} else {
|
||||||
$return = Lang::get('lang.message_has_been_sent');
|
$return = Lang::get('lang.message_has_been_sent');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->back()->with('success', $return);
|
return redirect()->back()->with('success', $return);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return redirect()->back()->with('fails', $e->getMessage());
|
return redirect()->back()->with('fails', $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -166,7 +166,7 @@ class WorkflowController extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
// store a new workflow credentials in to the system
|
// store a new workflow credentials in to the system
|
||||||
$workflow_name = new WorkflowName();
|
$workflow_name = new WorkflowName;
|
||||||
$workflow_name->name = $request->name;
|
$workflow_name->name = $request->name;
|
||||||
$workflow_name->status = $request->status;
|
$workflow_name->status = $request->status;
|
||||||
$workflow_name->order = $request->execution_order;
|
$workflow_name->order = $request->execution_order;
|
||||||
|
@@ -27,16 +27,15 @@ use PhpImap\Mailbox as ImapMailbox;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class MailController extends Controller
|
class MailController extends Controller {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* constructor
|
* constructor
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
*
|
*
|
||||||
* @param type TicketController $TicketController
|
* @param type TicketController $TicketController
|
||||||
*/
|
*/
|
||||||
public function __construct(TicketWorkflowController $TicketWorkflowController)
|
public function __construct(TicketWorkflowController $TicketWorkflowController) {
|
||||||
{
|
|
||||||
$this->middleware('board');
|
$this->middleware('board');
|
||||||
$this->TicketWorkflowController = $TicketWorkflowController;
|
$this->TicketWorkflowController = $TicketWorkflowController;
|
||||||
}
|
}
|
||||||
@@ -46,8 +45,7 @@ class MailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @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;
|
// $path_url = $system->first()->url;
|
||||||
if ($settings_email->first()->email_fetching == 1) {
|
if ($settings_email->first()->email_fetching == 1) {
|
||||||
if ($settings_email->first()->all_emails == 1) {
|
if ($settings_email->first()->all_emails == 1) {
|
||||||
@@ -82,7 +80,7 @@ class MailController extends Controller
|
|||||||
$protocol = $fetching_encryption2;
|
$protocol = $fetching_encryption2;
|
||||||
} else {
|
} else {
|
||||||
if ($e_mail->fetching_protocol) {
|
if ($e_mail->fetching_protocol) {
|
||||||
$fetching_protocol = '/'.$e_mail->fetching_protocol;
|
$fetching_protocol = '/' . $e_mail->fetching_protocol;
|
||||||
} else {
|
} else {
|
||||||
$fetching_protocol = '';
|
$fetching_protocol = '';
|
||||||
}
|
}
|
||||||
@@ -91,13 +89,13 @@ class MailController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$fetching_encryption = '';
|
$fetching_encryption = '';
|
||||||
}
|
}
|
||||||
$protocol = $fetching_protocol.$fetching_encryption;
|
$protocol = $fetching_protocol . $fetching_encryption;
|
||||||
}
|
}
|
||||||
$imap_config = '{'.$host.':'.$port.$protocol.'}INBOX';
|
$imap_config = '{' . $host . ':' . $port . $protocol . '}INBOX';
|
||||||
$password = Crypt::decrypt($e_mail->password);
|
$password = Crypt::decrypt($e_mail->password);
|
||||||
$mailbox = new ImapMailbox($imap_config, $e_mail->email_address, $password, __DIR__);
|
$mailbox = new ImapMailbox($imap_config, $e_mail->email_address, $password, __DIR__);
|
||||||
$mails = [];
|
$mails = [];
|
||||||
$mailsIds = $mailbox->searchMailBox('SINCE '.date('d-M-Y', strtotime('-1 day')));
|
$mailsIds = $mailbox->searchMailBox('SINCE ' . date('d-M-Y', strtotime('-1 day')));
|
||||||
if (!$mailsIds) {
|
if (!$mailsIds) {
|
||||||
die('Mailbox is empty');
|
die('Mailbox is empty');
|
||||||
}
|
}
|
||||||
@@ -137,7 +135,7 @@ class MailController extends Controller
|
|||||||
$date = $mail->date;
|
$date = $mail->date;
|
||||||
$datetime = $overview[0]->date;
|
$datetime = $overview[0]->date;
|
||||||
$date_time = explode(' ', $datetime);
|
$date_time = explode(' ', $datetime);
|
||||||
$date = $date_time[1].'-'.$date_time[2].'-'.$date_time[3].' '.$date_time[4];
|
$date = $date_time[1] . '-' . $date_time[2] . '-' . $date_time[3] . ' ' . $date_time[4];
|
||||||
$date = date('Y-m-d H:i:s', strtotime($date));
|
$date = date('Y-m-d H:i:s', strtotime($date));
|
||||||
if (isset($mail->subject)) {
|
if (isset($mail->subject)) {
|
||||||
$subject = $mail->subject;
|
$subject = $mail->subject;
|
||||||
@@ -172,7 +170,7 @@ class MailController extends Controller
|
|||||||
// var_dump($attachment->filePath);
|
// var_dump($attachment->filePath);
|
||||||
// dd($filepath);
|
// dd($filepath);
|
||||||
// $path = $dir_img_path[0]."/code/public/".$filepath[1];
|
// $path = $dir_img_path[0]."/code/public/".$filepath[1];
|
||||||
$path = public_path().$filepath[1];
|
$path = public_path() . $filepath[1];
|
||||||
// dd($path);
|
// dd($path);
|
||||||
$filesize = filesize($path);
|
$filesize = filesize($path);
|
||||||
$file_data = file_get_contents($path);
|
$file_data = file_get_contents($path);
|
||||||
@@ -181,7 +179,7 @@ class MailController extends Controller
|
|||||||
$string = str_replace('-', '', $attachment->name);
|
$string = str_replace('-', '', $attachment->name);
|
||||||
$filename = explode('src', $attachment->filePath);
|
$filename = explode('src', $attachment->filePath);
|
||||||
$filename = str_replace('\\', '', $filename);
|
$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]);
|
$pos = strpos($body, $filepath[1]);
|
||||||
if ($pos == false) {
|
if ($pos == false) {
|
||||||
if ($settings_email->first()->attachment == 1) {
|
if ($settings_email->first()->attachment == 1) {
|
||||||
@@ -226,8 +224,7 @@ class MailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type string
|
* @return type string
|
||||||
*/
|
*/
|
||||||
public function separate_reply($body)
|
public function separate_reply($body) {
|
||||||
{
|
|
||||||
$body2 = explode('---Reply above this line---', $body);
|
$body2 = explode('---Reply above this line---', $body);
|
||||||
$body3 = $body2[0];
|
$body3 = $body2[0];
|
||||||
|
|
||||||
@@ -241,8 +238,7 @@ class MailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type string
|
* @return type string
|
||||||
*/
|
*/
|
||||||
public function decode_imap_text($str)
|
public function decode_imap_text($str) {
|
||||||
{
|
|
||||||
$result = '';
|
$result = '';
|
||||||
$decode_header = imap_mime_header_decode($str);
|
$decode_header = imap_mime_header_decode($str);
|
||||||
foreach ($decode_header as $obj) {
|
foreach ($decode_header as $obj) {
|
||||||
@@ -257,8 +253,7 @@ class MailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function fetch_attachments()
|
public function fetch_attachments() {
|
||||||
{
|
|
||||||
$uploads = Upload::all();
|
$uploads = Upload::all();
|
||||||
foreach ($uploads as $attachment) {
|
foreach ($uploads as $attachment) {
|
||||||
$image = @imagecreatefromstring($attachment->file);
|
$image = @imagecreatefromstring($attachment->file);
|
||||||
@@ -266,8 +261,8 @@ class MailController extends Controller
|
|||||||
imagejpeg($image, null, 80);
|
imagejpeg($image, null, 80);
|
||||||
$data = ob_get_contents();
|
$data = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$var = '<a href="" target="_blank"><img src="data:image/jpg;base64,'.base64_encode($data).'"/></a>';
|
$var = '<a href="" target="_blank"><img src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
||||||
echo '<br/><span class="mailbox-attachment-icon has-img">'.$var.'</span>';
|
echo '<br/><span class="mailbox-attachment-icon has-img">' . $var . '</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,19 +273,17 @@ class MailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type file
|
* @return type file
|
||||||
*/
|
*/
|
||||||
public function get_data($id)
|
public function get_data($id) {
|
||||||
{
|
|
||||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('id', '=', $id)->get();
|
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('id', '=', $id)->get();
|
||||||
foreach ($attachments as $attachment) {
|
foreach ($attachments as $attachment) {
|
||||||
header('Content-type: application/'.$attachment->type.'');
|
header('Content-type: application/' . $attachment->type . '');
|
||||||
header('Content-Disposition: inline; filename='.$attachment->name.'');
|
header('Content-Disposition: inline; filename=' . $attachment->name . '');
|
||||||
header('Content-Transfer-Encoding: binary');
|
header('Content-Transfer-Encoding: binary');
|
||||||
echo $attachment->file;
|
echo $attachment->file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function trimTableTag($html)
|
public static function trimTableTag($html) {
|
||||||
{
|
|
||||||
if (strpos('<table>', $html) != false) {
|
if (strpos('<table>', $html) != false) {
|
||||||
$first_pos = strpos($html, '<table');
|
$first_pos = strpos($html, '<table');
|
||||||
$fist_string = substr_replace($html, '', 0, $first_pos);
|
$fist_string = substr_replace($html, '', 0, $first_pos);
|
||||||
@@ -299,28 +292,23 @@ class MailController extends Controller
|
|||||||
$diff = $total - $last_pos;
|
$diff = $total - $last_pos;
|
||||||
$str = substr_replace($fist_string, '', $last_pos, -1);
|
$str = substr_replace($fist_string, '', $last_pos, -1);
|
||||||
$final_str = str_finish($str, '</table>');
|
$final_str = str_finish($str, '</table>');
|
||||||
|
|
||||||
return $final_str;
|
return $final_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function trim3D($html)
|
public static function trim3D($html) {
|
||||||
{
|
|
||||||
$body = str_replace('=3D', '', $html);
|
$body = str_replace('=3D', '', $html);
|
||||||
|
|
||||||
return $body;
|
return $body;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function trimInjections($html, $tags = ['<script>', '</script>', '<style>', '</style>', '<?php', '?>'])
|
public static function trimInjections($html, $tags = ['<script>', '</script>', '<style>', '</style>', '<?php', '?>']) {
|
||||||
{
|
|
||||||
$replace = [];
|
$replace = [];
|
||||||
foreach ($tags as $key => $tag) {
|
foreach ($tags as $key => $tag) {
|
||||||
$replace[$key] = htmlspecialchars($tag);
|
$replace[$key] = htmlspecialchars($tag);
|
||||||
}
|
}
|
||||||
$body = str_replace($tags, $replace, $html);
|
$body = str_replace($tags, $replace, $html);
|
||||||
|
|
||||||
return $body;
|
return $body;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -31,6 +31,8 @@ use App\Model\helpdesk\Ticket\Tickets;
|
|||||||
use App\Model\helpdesk\Utility\CountryCode;
|
use App\Model\helpdesk\Utility\CountryCode;
|
||||||
use App\Model\helpdesk\Utility\Date_time_format;
|
use App\Model\helpdesk\Utility\Date_time_format;
|
||||||
use App\Model\helpdesk\Utility\Timezones;
|
use App\Model\helpdesk\Utility\Timezones;
|
||||||
|
use App\Model\helpdesk\Notification\Notification;
|
||||||
|
use App\Model\helpdesk\Notification\UserNotification;
|
||||||
use App\User;
|
use App\User;
|
||||||
use Auth;
|
use Auth;
|
||||||
use DB;
|
use DB;
|
||||||
@@ -1533,6 +1535,14 @@ class TicketController extends Controller
|
|||||||
$ticket->closed_at = null;
|
$ticket->closed_at = null;
|
||||||
$ticket->save();
|
$ticket->save();
|
||||||
} elseif ($value == 'Delete forever') {
|
} elseif ($value == 'Delete forever') {
|
||||||
|
$notification = Notification::select('id')->where('model_id', '=', $ticket->id)->get();
|
||||||
|
foreach ($notification as $id) {
|
||||||
|
$user_notification = UserNotification::where(
|
||||||
|
'notification_id', '=', $id->id);
|
||||||
|
$user_notification->delete();
|
||||||
|
}
|
||||||
|
$notification = Notification::select('id')->where('model_id', '=', $ticket->id);
|
||||||
|
$notification->delete();
|
||||||
$thread = Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
$thread = Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||||
foreach ($thread as $th_id) {
|
foreach ($thread as $th_id) {
|
||||||
// echo $th_id->id." ";
|
// echo $th_id->id." ";
|
||||||
@@ -1562,11 +1572,11 @@ class TicketController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($value == 'Delete') {
|
if ($value == 'Delete') {
|
||||||
return redirect()->back()->with('success', 'Moved to trash');
|
return redirect()->back()->with('success', lang::get('lang.moved_to_trash'));
|
||||||
} elseif ($value == 'Close') {
|
} elseif ($value == 'Close') {
|
||||||
return redirect()->back()->with('success', 'Tickets has been Closed');
|
return redirect()->back()->with('success', Lang::get('lang.tickets_have_been_closed'));
|
||||||
} elseif ($value == 'Open') {
|
} elseif ($value == 'Open') {
|
||||||
return redirect()->back()->with('success', 'Ticket has been Opened');
|
return redirect()->back()->with('success', Lang::get('lang.tickets_have_been_opened'));
|
||||||
} else {
|
} else {
|
||||||
return redirect()->back()->with('success', Lang::get('lang.hard-delete-success-message'));
|
return redirect()->back()->with('success', Lang::get('lang.hard-delete-success-message'));
|
||||||
}
|
}
|
||||||
|
@@ -91,7 +91,6 @@ class UserController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$stringCut = $model->user_name;
|
$stringCut = $model->user_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $stringCut;
|
return $stringCut;
|
||||||
})
|
})
|
||||||
/* column email */
|
/* column email */
|
||||||
|
@@ -29,8 +29,8 @@ use Redirect;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class ArticleController extends Controller
|
class ArticleController extends Controller {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
* constructor to check
|
* constructor to check
|
||||||
@@ -40,8 +40,7 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct() {
|
||||||
{
|
|
||||||
// checking authentication
|
// checking authentication
|
||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
// checking roles
|
// checking roles
|
||||||
@@ -49,8 +48,7 @@ class ArticleController extends Controller
|
|||||||
SettingsController::language();
|
SettingsController::language();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test()
|
public function test() {
|
||||||
{
|
|
||||||
//$table = $this->setDatatable();
|
//$table = $this->setDatatable();
|
||||||
return view('themes.default1.agent.kb.article.test');
|
return view('themes.default1.agent.kb.article.test');
|
||||||
}
|
}
|
||||||
@@ -60,8 +58,7 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public function getData()
|
public function getData() {
|
||||||
{
|
|
||||||
$article = new Article();
|
$article = new Article();
|
||||||
// returns chumper datatable
|
// returns chumper datatable
|
||||||
return Datatable::query($article)
|
return Datatable::query($article)
|
||||||
@@ -71,6 +68,7 @@ class ArticleController extends Controller
|
|||||||
->orderColumns('name', 'description')
|
->orderColumns('name', 'description')
|
||||||
/* add column name */
|
/* add column name */
|
||||||
->addColumn('name', function ($model) {
|
->addColumn('name', function ($model) {
|
||||||
|
|
||||||
$string = strip_tags($model->name);
|
$string = strip_tags($model->name);
|
||||||
if (strlen($string) > 40) {
|
if (strlen($string) > 40) {
|
||||||
// truncate string
|
// truncate string
|
||||||
@@ -78,8 +76,7 @@ class ArticleController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$stringCut = $model->name;
|
$stringCut = $model->name;
|
||||||
}
|
}
|
||||||
|
return $stringCut . '...';
|
||||||
return $stringCut.'...';
|
|
||||||
})
|
})
|
||||||
/* add column Created */
|
/* add column Created */
|
||||||
->addColumn('publish_time', function ($model) {
|
->addColumn('publish_time', function ($model) {
|
||||||
@@ -90,8 +87,8 @@ class ArticleController extends Controller
|
|||||||
/* add column action */
|
/* add column action */
|
||||||
->addColumn('Actions', function ($model) {
|
->addColumn('Actions', function ($model) {
|
||||||
/* here are all the action buttons and modal popup to delete articles with confirmations */
|
/* here are all the action buttons and modal popup to delete articles with confirmations */
|
||||||
return '<span data-toggle="modal" data-target="#deletearticle'.$model->id.'"><a href="#" ><button class="btn btn-danger btn-xs"></a> '.\Lang::get('lang.delete').' </button></span> <a href=article/'.$model->id.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a> <a href=show/'.$model->slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
|
return '<span data-toggle="modal" data-target="#deletearticle' . $model->id . '"><a href="#" ><button class="btn btn-danger btn-xs"></a> ' . \Lang::get('lang.delete') . ' </button></span> <a href=article/' . $model->id . '/edit class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a> <a href=show/' . $model->slug . ' class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>
|
||||||
<div class="modal fade" id="deletearticle'.$model->id.'">
|
<div class="modal fade" id="deletearticle' . $model->id . '">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -99,11 +96,11 @@ class ArticleController extends Controller
|
|||||||
<h4 class="modal-title">Are You Sure ?</h4>
|
<h4 class="modal-title">Are You Sure ?</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
'.$model->name.'
|
' . $model->name . '
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">Close</button>
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">Close</button>
|
||||||
<a href="article/delete/'.$model->slug.'"><button class="btn btn-danger">delete</button></a>
|
<a href="article/delete/' . $model->slug . '"><button class="btn btn-danger">delete</button></a>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.modal-content -->
|
</div><!-- /.modal-content -->
|
||||||
</div><!-- /.modal-dialog -->
|
</div><!-- /.modal-dialog -->
|
||||||
@@ -117,8 +114,7 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index() {
|
||||||
{
|
|
||||||
/* show article list */
|
/* show article list */
|
||||||
try {
|
try {
|
||||||
return view('themes.default1.agent.kb.article.index');
|
return view('themes.default1.agent.kb.article.index');
|
||||||
@@ -134,8 +130,7 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function create(Category $category)
|
public function create(Category $category) {
|
||||||
{
|
|
||||||
/* get the attributes of the category */
|
/* get the attributes of the category */
|
||||||
$category = $category->lists('id', 'name');
|
$category = $category->lists('id', 'name');
|
||||||
/* get the create page */
|
/* get the create page */
|
||||||
@@ -154,10 +149,9 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type redirect
|
* @return type redirect
|
||||||
*/
|
*/
|
||||||
public function store(Article $article, ArticleRequest $request)
|
public function store(Article $article, ArticleRequest $request) {
|
||||||
{
|
|
||||||
// requesting the values to store article data
|
// requesting the values to store article data
|
||||||
$publishTime = $request->input('year').'-'.$request->input('month').'-'.$request->input('day').' '.$request->input('hour').':'.$request->input('minute').':00';
|
$publishTime = $request->input('year') . '-' . $request->input('month') . '-' . $request->input('day') . ' ' . $request->input('hour') . ':' . $request->input('minute') . ':00';
|
||||||
|
|
||||||
$sl = $request->input('name');
|
$sl = $request->input('name');
|
||||||
$slug = str_slug($sl, '-');
|
$slug = str_slug($sl, '-');
|
||||||
@@ -177,7 +171,7 @@ class ArticleController extends Controller
|
|||||||
|
|
||||||
return redirect('article')->with('success', Lang::get('lang.article_inserted_successfully'));
|
return redirect('article')->with('success', Lang::get('lang.article_inserted_successfully'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return redirect('article')->with('fails', Lang::get('lang.article_not_inserted').'<li>'.$e->getMessage().'</li>');
|
return redirect('article')->with('fails', Lang::get('lang.article_not_inserted') . '<li>' . $e->getMessage() . '</li>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,8 +185,7 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return view
|
* @return view
|
||||||
*/
|
*/
|
||||||
public function edit($slug)
|
public function edit($slug) {
|
||||||
{
|
|
||||||
$article = new Article();
|
$article = new Article();
|
||||||
$relation = new Relationship();
|
$relation = new Relationship();
|
||||||
$category = new Category();
|
$category = new Category();
|
||||||
@@ -223,12 +216,11 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function update($slug, ArticleUpdate $request)
|
public function update($slug, ArticleUpdate $request) {
|
||||||
{
|
|
||||||
$article = new Article();
|
$article = new Article();
|
||||||
$relation = new Relationship();
|
$relation = new Relationship();
|
||||||
$aid = $article->where('id', $slug)->first();
|
$aid = $article->where('id', $slug)->first();
|
||||||
$publishTime = $request->input('year').'-'.$request->input('month').'-'.$request->input('day').' '.$request->input('hour').':'.$request->input('minute').':00';
|
$publishTime = $request->input('year') . '-' . $request->input('month') . '-' . $request->input('day') . ' ' . $request->input('hour') . ':' . $request->input('minute') . ':00';
|
||||||
|
|
||||||
$id = $aid->id;
|
$id = $aid->id;
|
||||||
$sl = $request->input('slug');
|
$sl = $request->input('slug');
|
||||||
@@ -255,7 +247,7 @@ class ArticleController extends Controller
|
|||||||
|
|
||||||
return redirect('article')->with('success', Lang::get('lang.article_updated_successfully'));
|
return redirect('article')->with('success', Lang::get('lang.article_updated_successfully'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return redirect('article')->with('fails', Lang::get('lang.article_not_updated').'<li>'.$e->getMessage().'</li>');
|
return redirect('article')->with('fails', Lang::get('lang.article_not_updated') . '<li>' . $e->getMessage() . '</li>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,8 +259,7 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function destroy($slug, Article $article, Relationship $relation, Comment $comment)
|
public function destroy($slug, Article $article, Relationship $relation, Comment $comment) {
|
||||||
{
|
|
||||||
/* delete the selected article from the table */
|
/* delete the selected article from the table */
|
||||||
$article = $article->where('slug', $slug)->first(); //get the selected article via id
|
$article = $article->where('slug', $slug)->first(); //get the selected article via id
|
||||||
$id = $article->id;
|
$id = $article->id;
|
||||||
@@ -302,8 +293,7 @@ class ArticleController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public static function usertimezone($utc)
|
public static function usertimezone($utc) {
|
||||||
{
|
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$tz = $user->timezone;
|
$tz = $user->timezone;
|
||||||
$set = Settings::whereId('1')->first();
|
$set = Settings::whereId('1')->first();
|
||||||
@@ -314,4 +304,5 @@ class ArticleController extends Controller
|
|||||||
$date = date($format, strtotime($utc) + $offset);
|
$date = date($format, strtotime($utc) + $offset);
|
||||||
echo $date;
|
echo $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -23,8 +23,8 @@ use Redirect;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class CategoryController extends Controller
|
class CategoryController extends Controller {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
* constructor to check
|
* constructor to check
|
||||||
@@ -34,8 +34,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct() {
|
||||||
{
|
|
||||||
// checking authentication
|
// checking authentication
|
||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
// checking roles
|
// checking roles
|
||||||
@@ -50,8 +49,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index() {
|
||||||
{
|
|
||||||
/* get the view of index of the catogorys with all attributes
|
/* get the view of index of the catogorys with all attributes
|
||||||
of category model */
|
of category model */
|
||||||
try {
|
try {
|
||||||
@@ -66,8 +64,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type chumper datatable
|
* @return type chumper datatable
|
||||||
*/
|
*/
|
||||||
public function getData()
|
public function getData() {
|
||||||
{
|
|
||||||
/* fetching chumper datatables */
|
/* fetching chumper datatables */
|
||||||
return Datatable::collection(Category::All())
|
return Datatable::collection(Category::All())
|
||||||
/* search column name */
|
/* search column name */
|
||||||
@@ -76,6 +73,7 @@ class CategoryController extends Controller
|
|||||||
->orderColumns('name', 'description')
|
->orderColumns('name', 'description')
|
||||||
/* add column name */
|
/* add column name */
|
||||||
->addColumn('name', function ($model) {
|
->addColumn('name', function ($model) {
|
||||||
|
|
||||||
$string = strip_tags($model->name);
|
$string = strip_tags($model->name);
|
||||||
if (strlen($string) > 40) {
|
if (strlen($string) > 40) {
|
||||||
// truncate string
|
// truncate string
|
||||||
@@ -83,7 +81,6 @@ class CategoryController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$stringCut = $model->name;
|
$stringCut = $model->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $stringCut.'...';
|
return $stringCut.'...';
|
||||||
})
|
})
|
||||||
/* add column Created */
|
/* add column Created */
|
||||||
@@ -95,20 +92,20 @@ class CategoryController extends Controller
|
|||||||
/* add column Actions */
|
/* add column Actions */
|
||||||
/* there are action buttons and modal popup to delete a data column */
|
/* there are action buttons and modal popup to delete a data column */
|
||||||
->addColumn('Actions', function ($model) {
|
->addColumn('Actions', function ($model) {
|
||||||
return '<span data-toggle="modal" data-target="#deletecategory'.$model->slug.'"><a href="#" ><button class="btn btn-danger btn-xs"></a>'.\Lang::get('lang.delete').'</button></span> <a href=category/'.$model->id.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a> <a href=article-list class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
|
return '<span data-toggle="modal" data-target="#deletecategory' . $model->slug . '"><a href="#" ><button class="btn btn-danger btn-xs"></a>' . \Lang::get('lang.delete') . '</button></span> <a href=category/' . $model->id . '/edit class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a> <a href=article-list class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>
|
||||||
<div class="modal fade" id="deletecategory'.$model->slug.'">
|
<div class="modal fade" id="deletecategory' . $model->slug . '">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h4 class="modal-title">'.Lang::get('lang.are_you_sure_you_want_to_delete').'</h4>
|
<h4 class="modal-title">' . Lang::get('lang.are_you_sure_you_want_to_delete') . '</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
'.$model->name.'
|
' . $model->name . '
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">'.Lang::get('lang.close').'</button>
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">' . Lang::get('lang.close') . '</button>
|
||||||
<a href="category/delete/'.$model->id.'"><button class="btn btn-danger">'.Lang::get('lang.delete').'</button></a>
|
<a href="category/delete/' . $model->id . '"><button class="btn btn-danger">' . Lang::get('lang.delete') . '</button></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,8 +121,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function create(Category $category)
|
public function create(Category $category) {
|
||||||
{
|
|
||||||
/* Get the all attributes in the category model */
|
/* Get the all attributes in the category model */
|
||||||
$category = $category->get();
|
$category = $category->get();
|
||||||
/* get the view page to create new category with all attributes
|
/* get the view page to create new category with all attributes
|
||||||
@@ -145,8 +141,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Redirect
|
* @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 */
|
/* Get the whole request from the form and insert into table via model */
|
||||||
$sl = $request->input('slug');
|
$sl = $request->input('slug');
|
||||||
$slug = str_slug($sl, '-');
|
$slug = str_slug($sl, '-');
|
||||||
@@ -157,7 +152,7 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
return Redirect::back()->with('success', Lang::get('lang.category_inserted_successfully'));
|
return Redirect::back()->with('success', Lang::get('lang.category_inserted_successfully'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return Redirect::back()->with('fails', Lang::get('lang.category_not_inserted').'<li>'.$e->getMessage().'</li>');
|
return Redirect::back()->with('fails', Lang::get('lang.category_not_inserted') . '<li>' . $e->getMessage() . '</li>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,8 +164,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function edit($slug)
|
public function edit($slug) {
|
||||||
{
|
|
||||||
// fetch the category
|
// fetch the category
|
||||||
$cid = Category::where('id', $slug)->first();
|
$cid = Category::where('id', $slug)->first();
|
||||||
$id = $cid->id;
|
$id = $cid->id;
|
||||||
@@ -189,8 +183,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type redirect
|
* @return type redirect
|
||||||
*/
|
*/
|
||||||
public function update($slug, CategoryUpdate $request)
|
public function update($slug, CategoryUpdate $request) {
|
||||||
{
|
|
||||||
|
|
||||||
/* Edit the selected category via id */
|
/* Edit the selected category via id */
|
||||||
$category = Category::where('id', $slug)->first();
|
$category = Category::where('id', $slug)->first();
|
||||||
@@ -204,11 +197,10 @@ class CategoryController extends Controller
|
|||||||
$category->fill($request->all())->save();
|
$category->fill($request->all())->save();
|
||||||
$category->slug = $slug;
|
$category->slug = $slug;
|
||||||
$category->save();
|
$category->save();
|
||||||
|
|
||||||
return redirect('category')->with('success', Lang::get('lang.category_updated_successfully'));
|
return redirect('category')->with('success', Lang::get('lang.category_updated_successfully'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
//redirect to index with fails message
|
//redirect to index with fails message
|
||||||
return redirect('category')->with('fails', Lang::get('lang.category_not_updated').'<li>'.$e->getMessage().'</li>');
|
return redirect('category')->with('fails', Lang::get('lang.category_not_updated') . '<li>' . $e->getMessage() . '</li>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,8 +213,7 @@ class CategoryController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Redirect
|
* @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();
|
$relation = $relation->where('category_id', $id)->first();
|
||||||
if ($relation != null) {
|
if ($relation != null) {
|
||||||
return Redirect::back()->with('fails', Lang::get('lang.category_not_deleted'));
|
return Redirect::back()->with('fails', Lang::get('lang.category_not_deleted'));
|
||||||
@@ -235,8 +226,9 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
return Redirect::back()->with('success', Lang::get('lang.category_deleted_successfully'));
|
return Redirect::back()->with('success', Lang::get('lang.category_deleted_successfully'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return Redirect::back()->with('fails', Lang::get('lang.category_not_deleted').'<li>'.$e->getMessage().'</li>');
|
return Redirect::back()->with('fails', Lang::get('lang.category_not_deleted') . '<li>' . $e->getMessage() . '</li>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -21,8 +21,8 @@ use Lang;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class PageController extends Controller
|
class PageController extends Controller {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
* constructor to check
|
* constructor to check
|
||||||
@@ -32,8 +32,7 @@ class PageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(Page $page)
|
public function __construct(Page $page) {
|
||||||
{
|
|
||||||
// checking authentication
|
// checking authentication
|
||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
// checking roles
|
// checking roles
|
||||||
@@ -47,8 +46,7 @@ class PageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index() {
|
||||||
{
|
|
||||||
$pages = $this->page->paginate(3);
|
$pages = $this->page->paginate(3);
|
||||||
$pages->setPath('page');
|
$pages->setPath('page');
|
||||||
try {
|
try {
|
||||||
@@ -63,8 +61,7 @@ class PageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function getData()
|
public function getData() {
|
||||||
{
|
|
||||||
/* fetching chumper datatables */
|
/* fetching chumper datatables */
|
||||||
return Datatable::collection(Page::All())
|
return Datatable::collection(Page::All())
|
||||||
/* search column name */
|
/* search column name */
|
||||||
@@ -84,8 +81,8 @@ class PageController extends Controller
|
|||||||
/* add column Actions */
|
/* add column Actions */
|
||||||
/* there are action buttons and modal popup to delete a data column */
|
/* there are action buttons and modal popup to delete a data column */
|
||||||
->addColumn('Actions', function ($model) {
|
->addColumn('Actions', function ($model) {
|
||||||
return '<span data-toggle="modal" data-target="#deletepage'.$model->id.'"><a href="#" ><button class="btn btn-danger btn-xs"></a> '.\Lang::get('lang.delete').'</button></span> <a href=page/'.$model->slug.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a> <a href=pages/'.$model->slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
|
return '<span data-toggle="modal" data-target="#deletepage' . $model->id . '"><a href="#" ><button class="btn btn-danger btn-xs"></a> ' . \Lang::get('lang.delete') . '</button></span> <a href=page/' . $model->slug . '/edit class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a> <a href=pages/' . $model->slug . ' class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>
|
||||||
<div class="modal fade" id="deletepage'.$model->id.'">
|
<div class="modal fade" id="deletepage' . $model->id . '">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -93,11 +90,11 @@ class PageController extends Controller
|
|||||||
<h4 class="modal-title">Are You Sure ?</h4>
|
<h4 class="modal-title">Are You Sure ?</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
'.$model->name.'
|
' . $model->name . '
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">Close</button>
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">Close</button>
|
||||||
<a href="page/delete/'.$model->id.'"><button class="btn btn-danger">delete</button></a>
|
<a href="page/delete/' . $model->id . '"><button class="btn btn-danger">delete</button></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -111,8 +108,7 @@ class PageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create() {
|
||||||
{
|
|
||||||
return view('themes.default1.agent.kb.pages.create');
|
return view('themes.default1.agent.kb.pages.create');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,8 +119,7 @@ class PageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function store(PageRequest $request)
|
public function store(PageRequest $request) {
|
||||||
{
|
|
||||||
$sl = $request->input('slug');
|
$sl = $request->input('slug');
|
||||||
$slug = str_slug($sl, '-');
|
$slug = str_slug($sl, '-');
|
||||||
$this->page->slug = $slug;
|
$this->page->slug = $slug;
|
||||||
@@ -144,8 +139,7 @@ class PageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function edit($slug)
|
public function edit($slug) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
$page = $this->page->where('slug', $slug)->first();
|
$page = $this->page->where('slug', $slug)->first();
|
||||||
|
|
||||||
@@ -163,8 +157,7 @@ class PageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type redirect
|
* @return type redirect
|
||||||
*/
|
*/
|
||||||
public function update($slug, PageUpdate $request)
|
public function update($slug, PageUpdate $request) {
|
||||||
{
|
|
||||||
// get pages with respect to slug
|
// get pages with respect to slug
|
||||||
$pages = $this->page->where('slug', $slug)->first();
|
$pages = $this->page->where('slug', $slug)->first();
|
||||||
$sl = $request->input('slug');
|
$sl = $request->input('slug');
|
||||||
@@ -188,8 +181,7 @@ class PageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type redirect
|
* @return type redirect
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
// get the page to be deleted
|
// get the page to be deleted
|
||||||
$page = $this->page->whereId($id)->first();
|
$page = $this->page->whereId($id)->first();
|
||||||
@@ -200,4 +192,5 @@ class PageController extends Controller
|
|||||||
return redirect('page')->with('fails', $e->getMessage());
|
return redirect('page')->with('fails', $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -29,8 +29,8 @@ use Mail;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class AuthController extends Controller
|
class AuthController extends Controller {
|
||||||
{
|
|
||||||
use AuthenticatesAndRegistersUsers;
|
use AuthenticatesAndRegistersUsers;
|
||||||
/* to redirect after login */
|
/* to redirect after login */
|
||||||
|
|
||||||
@@ -50,8 +50,7 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(PhpMailController $PhpMailController)
|
public function __construct(PhpMailController $PhpMailController) {
|
||||||
{
|
|
||||||
$this->PhpMailController = $PhpMailController;
|
$this->PhpMailController = $PhpMailController;
|
||||||
SettingsController::smtp();
|
SettingsController::smtp();
|
||||||
$this->middleware('guest', ['except' => 'getLogout']);
|
$this->middleware('guest', ['except' => 'getLogout']);
|
||||||
@@ -62,8 +61,7 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function getRegister()
|
public function getRegister() {
|
||||||
{
|
|
||||||
// Event for login
|
// Event for login
|
||||||
\Event::fire(new \App\Events\FormRegisterEvent());
|
\Event::fire(new \App\Events\FormRegisterEvent());
|
||||||
if (Auth::user()) {
|
if (Auth::user()) {
|
||||||
@@ -85,8 +83,7 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function postRegister(User $user, RegisterRequest $request)
|
public function postRegister(User $user, RegisterRequest $request) {
|
||||||
{
|
|
||||||
// Event for login
|
// Event for login
|
||||||
\Event::fire(new \App\Events\LoginEvent($request));
|
\Event::fire(new \App\Events\LoginEvent($request));
|
||||||
$password = Hash::make($request->input('password'));
|
$password = Hash::make($request->input('password'));
|
||||||
@@ -100,26 +97,22 @@ class AuthController extends Controller
|
|||||||
$user->remember_token = $code;
|
$user->remember_token = $code;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $request->input('email')], $message = ['subject' => 'Activate your Account', 'scenario' => 'registration'], $template_variables = ['user' => $name, 'email_address' => $request->input('email'), 'password_reset_link' => url('account/activate/'.$code)]);
|
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $request->input('email')], $message = ['subject' => 'Activate your Account', 'scenario' => 'registration'], $template_variables = ['user' => $name, 'email_address' => $request->input('email'), 'password_reset_link' => url('account/activate/' . $code)]);
|
||||||
|
|
||||||
return redirect('home')->with('success', Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail'));
|
return redirect('home')->with('success', Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to activate account.
|
* Function to activate account
|
||||||
*
|
|
||||||
* @param type $token
|
* @param type $token
|
||||||
*
|
|
||||||
* @return type redirect
|
* @return type redirect
|
||||||
*/
|
*/
|
||||||
public function accountActivate($token)
|
public function accountActivate($token) {
|
||||||
{
|
|
||||||
$user = User::where('remember_token', '=', $token)->first();
|
$user = User::where('remember_token', '=', $token)->first();
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$user->active = 1;
|
$user->active = 1;
|
||||||
$user->remember_token = null;
|
$user->remember_token = NULL;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
return redirect('/auth/login')->with('status', 'Acount activated. Login to start');
|
return redirect('/auth/login')->with('status', 'Acount activated. Login to start');
|
||||||
} else {
|
} else {
|
||||||
return redirect('/auth/login')->with('fails', 'Invalid Token');
|
return redirect('/auth/login')->with('fails', 'Invalid Token');
|
||||||
@@ -134,8 +127,7 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function getMail($token, User $user)
|
public function getMail($token, User $user) {
|
||||||
{
|
|
||||||
$user = $user->where('remember_token', $token)->where('active', 0)->first();
|
$user = $user->where('remember_token', $token)->where('active', 0)->first();
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$user->active = 1;
|
$user->active = 1;
|
||||||
@@ -152,8 +144,7 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function getLogin()
|
public function getLogin() {
|
||||||
{
|
|
||||||
if (Auth::user()) {
|
if (Auth::user()) {
|
||||||
if (Auth::user()->role == 'admin' || Auth::user()->role == 'agent') {
|
if (Auth::user()->role == 'admin' || Auth::user()->role == 'agent') {
|
||||||
return \Redirect::route('dashboard');
|
return \Redirect::route('dashboard');
|
||||||
@@ -172,8 +163,7 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function postLogin(LoginRequest $request)
|
public function postLogin(LoginRequest $request) {
|
||||||
{
|
|
||||||
// Set login attempts and login time
|
// Set login attempts and login time
|
||||||
$value = $_SERVER['REMOTE_ADDR'];
|
$value = $_SERVER['REMOTE_ADDR'];
|
||||||
$usernameinput = $request->input('email');
|
$usernameinput = $request->input('email');
|
||||||
@@ -192,7 +182,7 @@ class AuthController extends Controller
|
|||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
->withInput($request->only('email', 'remember'))
|
->withInput($request->only('email', 'remember'))
|
||||||
->withErrors([
|
->withErrors([
|
||||||
'email' => $this->getFailedLoginMessage(),
|
'email' => $this->getFailedLoginMessage(),
|
||||||
'password' => $this->getFailedLoginMessage(),
|
'password' => $this->getFailedLoginMessage(),
|
||||||
])->with('error', Lang::get('lang.this_account_is_currently_inactive'));
|
])->with('error', Lang::get('lang.this_account_is_currently_inactive'));
|
||||||
}
|
}
|
||||||
@@ -200,7 +190,7 @@ class AuthController extends Controller
|
|||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
->withInput($request->only('email', 'remember'))
|
->withInput($request->only('email', 'remember'))
|
||||||
->withErrors([
|
->withErrors([
|
||||||
'email' => $this->getFailedLoginMessage(),
|
'email' => $this->getFailedLoginMessage(),
|
||||||
'password' => $this->getFailedLoginMessage(),
|
'password' => $this->getFailedLoginMessage(),
|
||||||
])->with('error', Lang::get('lang.this_account_is_currently_inactive'));
|
])->with('error', Lang::get('lang.this_account_is_currently_inactive'));
|
||||||
}
|
}
|
||||||
@@ -243,7 +233,7 @@ class AuthController extends Controller
|
|||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
->withInput($request->only('email', 'remember'))
|
->withInput($request->only('email', 'remember'))
|
||||||
->withErrors([
|
->withErrors([
|
||||||
'email' => $this->getFailedLoginMessage(),
|
'email' => $this->getFailedLoginMessage(),
|
||||||
'password' => $this->getFailedLoginMessage(),
|
'password' => $this->getFailedLoginMessage(),
|
||||||
])->with('error', Lang::get('lang.invalid'));
|
])->with('error', Lang::get('lang.invalid'));
|
||||||
// Increment login attempts
|
// Increment login attempts
|
||||||
@@ -256,8 +246,7 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function addLoginAttempt($value, $field)
|
public function addLoginAttempt($value, $field) {
|
||||||
{
|
|
||||||
$result = DB::table('login_attempts')->where('IP', '=', $value)->first();
|
$result = DB::table('login_attempts')->where('IP', '=', $value)->first();
|
||||||
$data = $result;
|
$data = $result;
|
||||||
$security = Security::whereId('1')->first();
|
$security = Security::whereId('1')->first();
|
||||||
@@ -265,7 +254,7 @@ class AuthController extends Controller
|
|||||||
if ($data) {
|
if ($data) {
|
||||||
$attempts = $data->Attempts + 1;
|
$attempts = $data->Attempts + 1;
|
||||||
if ($attempts == $apt) {
|
if ($attempts == $apt) {
|
||||||
$result = DB::select('UPDATE login_attempts SET Attempts='.$attempts.", LastLogin=NOW() WHERE IP = '$value' OR User = '$field'");
|
$result = DB::select('UPDATE login_attempts SET Attempts=' . $attempts . ", LastLogin=NOW() WHERE IP = '$value' OR User = '$field'");
|
||||||
} else {
|
} else {
|
||||||
$result = DB::table('login_attempts')->where('IP', '=', $value)->orWhere('User', '=', $field)->update(['Attempts' => $attempts]);
|
$result = DB::table('login_attempts')->where('IP', '=', $value)->orWhere('User', '=', $field)->update(['Attempts' => $attempts]);
|
||||||
// $result = DB::select("UPDATE login_attempts SET Attempts=".$attempts." WHERE IP = '$value' OR User = '$field'");
|
// $result = DB::select("UPDATE login_attempts SET Attempts=".$attempts." WHERE IP = '$value' OR User = '$field'");
|
||||||
@@ -282,8 +271,7 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function clearLoginAttempts($value, $field)
|
public function clearLoginAttempts($value, $field) {
|
||||||
{
|
|
||||||
$data = DB::table('login_attempts')->where('IP', '=', $value)->orWhere('User', '=', $field)->update(['attempts' => '0']);
|
$data = DB::table('login_attempts')->where('IP', '=', $value)->orWhere('User', '=', $field)->update(['attempts' => '0']);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
@@ -296,14 +284,13 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type Response
|
* @return type Response
|
||||||
*/
|
*/
|
||||||
public function confirmIPAddress($value, $field)
|
public function confirmIPAddress($value, $field) {
|
||||||
{
|
|
||||||
$security = Security::whereId('1')->first();
|
$security = Security::whereId('1')->first();
|
||||||
$time = $security->lockout_period;
|
$time = $security->lockout_period;
|
||||||
$max_attempts = $security->backlist_threshold;
|
$max_attempts = $security->backlist_threshold;
|
||||||
$table = 'login_attempts';
|
$table = 'login_attempts';
|
||||||
$result = DB::select('SELECT Attempts, (CASE when LastLogin is not NULL and DATE_ADD(LastLogin, INTERVAL '.$time.' MINUTE)>NOW() then 1 else 0 end) as Denied '.
|
$result = DB::select('SELECT Attempts, (CASE when LastLogin is not NULL and DATE_ADD(LastLogin, INTERVAL ' . $time . ' MINUTE)>NOW() then 1 else 0 end) as Denied ' .
|
||||||
' FROM '.$table." WHERE IP = '$value' OR User = '$field'");
|
' FROM ' . $table . " WHERE IP = '$value' OR User = '$field'");
|
||||||
$data = $result;
|
$data = $result;
|
||||||
//Verify that at least one login attempt is in database
|
//Verify that at least one login attempt is in database
|
||||||
if (!$data) {
|
if (!$data) {
|
||||||
@@ -327,8 +314,8 @@ class AuthController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type string
|
* @return type string
|
||||||
*/
|
*/
|
||||||
protected function getFailedLoginMessage()
|
protected function getFailedLoginMessage() {
|
||||||
{
|
|
||||||
return Lang::get('lang.this_field_do_not_match_our_records');
|
return Lang::get('lang.this_field_do_not_match_our_records');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -57,7 +57,7 @@ class ClientTicketController extends Controller
|
|||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function reply($id, Request $request)
|
public function reply($id, Request $request)
|
||||||
{
|
{
|
||||||
$tickets = Tickets::where('id', '=', $id)->first();
|
$tickets = Tickets::where('id', '=', $id)->first();
|
||||||
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
||||||
|
|
||||||
|
@@ -33,16 +33,15 @@ use Redirect;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class FormController extends Controller
|
class FormController extends Controller {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
* Constructor to check.
|
* Constructor to check.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(TicketWorkflowController $TicketWorkflowController)
|
public function __construct(TicketWorkflowController $TicketWorkflowController) {
|
||||||
{
|
|
||||||
$this->middleware('board');
|
$this->middleware('board');
|
||||||
// creating a TicketController instance
|
// creating a TicketController instance
|
||||||
$this->TicketWorkflowController = $TicketWorkflowController;
|
$this->TicketWorkflowController = $TicketWorkflowController;
|
||||||
@@ -55,8 +54,7 @@ class FormController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function getForm(Help_topic $topic, CountryCode $code)
|
public function getForm(Help_topic $topic, CountryCode $code) {
|
||||||
{
|
|
||||||
if (\Config::get('database.install') == '%0%') {
|
if (\Config::get('database.install') == '%0%') {
|
||||||
return \Redirect::route('license');
|
return \Redirect::route('license');
|
||||||
}
|
}
|
||||||
@@ -80,13 +78,13 @@ class FormController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type string
|
* @return type string
|
||||||
*/
|
*/
|
||||||
public function postForm($id, Help_topic $topic)
|
public function postForm($id, Help_topic $topic) {
|
||||||
{
|
|
||||||
if ($id != 0) {
|
if ($id != 0) {
|
||||||
$helptopic = $topic->where('id', '=', $id)->first();
|
$helptopic = $topic->where('id', '=', $id)->first();
|
||||||
$custom_form = $helptopic->custom_form;
|
$custom_form = $helptopic->custom_form;
|
||||||
$values = Fields::where('forms_id', '=', $custom_form)->get();
|
$values = Fields::where('forms_id', '=', $custom_form)->get();
|
||||||
if (!$values) {
|
if (!$values) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($values) {
|
if ($values) {
|
||||||
foreach ($values as $value) {
|
foreach ($values as $value) {
|
||||||
@@ -95,29 +93,29 @@ class FormController extends Controller
|
|||||||
$value = explode(',', $data);
|
$value = explode(',', $data);
|
||||||
echo '<select class="form-control">';
|
echo '<select class="form-control">';
|
||||||
foreach ($value as $option) {
|
foreach ($value as $option) {
|
||||||
echo '<option>'.$option.'</option>';
|
echo '<option>' . $option . '</option>';
|
||||||
}
|
}
|
||||||
echo '</select></br>';
|
echo '</select></br>';
|
||||||
} elseif ($value->type == 'radio') {
|
} elseif ($value->type == 'radio') {
|
||||||
$type2 = $value->value;
|
$type2 = $value->value;
|
||||||
$val = explode(',', $type2);
|
$val = explode(',', $type2);
|
||||||
echo '<label class="radio-inline">'.$value->label.'</label>   <input type="'.$value->type.'" name="'.$value->name.'"> '.$val[0].'
|
echo '<label class="radio-inline">' . $value->label . '</label>   <input type="' . $value->type . '" name="' . $value->name . '"> ' . $val[0] . '
|
||||||
   <input type="'.$value->type.'" name="'.$value->name.'"> '.$val[1].'</br>';
|
   <input type="' . $value->type . '" name="' . $value->name . '"> ' . $val[1] . '</br>';
|
||||||
} elseif ($value->type == 'textarea') {
|
} elseif ($value->type == 'textarea') {
|
||||||
$type3 = $value->value;
|
$type3 = $value->value;
|
||||||
$v = explode(',', $type3);
|
$v = explode(',', $type3);
|
||||||
//dd($v);
|
//dd($v);
|
||||||
if (array_key_exists(1, $v)) {
|
if (array_key_exists(1, $v)) {
|
||||||
echo '<label>'.$value->label.'</label></br><textarea class=form-control rows="'.$v[0].'" cols="'.$v[1].'"></textarea></br>';
|
echo '<label>' . $value->label . '</label></br><textarea class=form-control rows="' . $v[0] . '" cols="' . $v[1] . '"></textarea></br>';
|
||||||
} else {
|
} else {
|
||||||
echo '<label>'.$value->label.'</label></br><textarea class=form-control rows="10" cols="60"></textarea></br>';
|
echo '<label>' . $value->label . '</label></br><textarea class=form-control rows="10" cols="60"></textarea></br>';
|
||||||
}
|
}
|
||||||
} elseif ($value->type == 'checkbox') {
|
} elseif ($value->type == 'checkbox') {
|
||||||
$type4 = $value->value;
|
$type4 = $value->value;
|
||||||
$check = explode(',', $type4);
|
$check = explode(',', $type4);
|
||||||
echo '<label class="radio-inline">'.$value->label.'   <input type="'.$value->type.'" name="'.$value->name.'">  '.$check[0].'</label><label class="radio-inline"><input type="'.$value->type.'" name="'.$value->name.'">  '.$check[1].'</label></br>';
|
echo '<label class="radio-inline">' . $value->label . '   <input type="' . $value->type . '" name="' . $value->name . '">  ' . $check[0] . '</label><label class="radio-inline"><input type="' . $value->type . '" name="' . $value->name . '">  ' . $check[1] . '</label></br>';
|
||||||
} else {
|
} else {
|
||||||
echo '<label>'.$value->label.'</label><input type="'.$value->type.'" class="form-control" name="'.$value->name.'" /></br>';
|
echo '<label>' . $value->label . '</label><input type="' . $value->type . '" class="form-control" name="' . $value->name . '" /></br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,8 +130,8 @@ class FormController extends Controller
|
|||||||
* @param type Request $request
|
* @param type Request $request
|
||||||
* @param type User $user
|
* @param type User $user
|
||||||
*/
|
*/
|
||||||
public function postedForm(User $user, ClientRequest $request, Ticket $ticket_settings, Ticket_source $ticket_source, Ticket_attachments $ta, CountryCode $code)
|
public function postedForm(User $user, ClientRequest $request, Ticket $ticket_settings, Ticket_source $ticket_source, Ticket_attachments $ta, CountryCode $code) {
|
||||||
{
|
|
||||||
$form_extras = $request->except('Name', 'Phone', 'Email', 'Subject', 'Details', 'helptopic', '_wysihtml5_mode', '_token');
|
$form_extras = $request->except('Name', 'Phone', 'Email', 'Subject', 'Details', 'helptopic', '_wysihtml5_mode', '_token');
|
||||||
|
|
||||||
$name = $request->input('Name');
|
$name = $request->input('Name');
|
||||||
@@ -161,8 +159,8 @@ class FormController extends Controller
|
|||||||
$geoipcode = $code->where('iso', '=', $location['isoCode'])->first();
|
$geoipcode = $code->where('iso', '=', $location['isoCode'])->first();
|
||||||
if ($phonecode == null) {
|
if ($phonecode == null) {
|
||||||
$data = [
|
$data = [
|
||||||
'fails' => Lang::get('lang.country-code-required-error'),
|
'fails' => Lang::get('lang.country-code-required-error'),
|
||||||
'phonecode' => $geoipcode->phonecode,
|
'phonecode' => $geoipcode->phonecode,
|
||||||
'country_code_error' => 1,
|
'country_code_error' => 1,
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -171,8 +169,8 @@ class FormController extends Controller
|
|||||||
$code = CountryCode::select('phonecode')->where('phonecode', '=', $phonecode)->get();
|
$code = CountryCode::select('phonecode')->where('phonecode', '=', $phonecode)->get();
|
||||||
if (!count($code)) {
|
if (!count($code)) {
|
||||||
$data = [
|
$data = [
|
||||||
'fails' => Lang::get('lang.incorrect-country-code-error'),
|
'fails' => Lang::get('lang.incorrect-country-code-error'),
|
||||||
'phonecode' => $geoipcode->phonecode,
|
'phonecode' => $geoipcode->phonecode,
|
||||||
'country_code_error' => 1,
|
'country_code_error' => 1,
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -198,7 +196,7 @@ class FormController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is').' '.$result[0].'. '.Lang::get('lang.Please-save-this-for-future-reference'));
|
return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is') . ' ' . $result[0] . '. ' . Lang::get('lang.Please-save-this-for-future-reference'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,14 +207,13 @@ class FormController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function post_ticket_reply($id, Request $request)
|
public function post_ticket_reply($id, Request $request) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
if ($comment != null) {
|
if ($comment != null) {
|
||||||
$tickets = Tickets::where('id', '=', $id)->first();
|
$tickets = Tickets::where('id', '=', $id)->first();
|
||||||
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
||||||
|
|
||||||
$subject = $thread->title.'[#'.$tickets->ticket_number.']';
|
$subject = $thread->title . '[#' . $tickets->ticket_number . ']';
|
||||||
$body = $request->input('comment');
|
$body = $request->input('comment');
|
||||||
|
|
||||||
$user_cred = User::where('id', '=', $tickets->user_id)->first();
|
$user_cred = User::where('id', '=', $tickets->user_id)->first();
|
||||||
@@ -248,7 +245,7 @@ class FormController extends Controller
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return \Redirect::back()->with('fails1', $e->getMessage());
|
return \Redirect::back()->with('fails1', $e->getMessage());
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// $comment = $request->input('comment');
|
// $comment = $request->input('comment');
|
||||||
// if ($comment != null) {
|
// if ($comment != null) {
|
||||||
// $tickets = Tickets::where('id', '=', $id)->first();
|
// $tickets = Tickets::where('id', '=', $id)->first();
|
||||||
@@ -273,4 +270,5 @@ class FormController extends Controller
|
|||||||
// return \Redirect::back()->with('fails1', Lang::get('lang.please_fill_some_data'));
|
// return \Redirect::back()->with('fails1', Lang::get('lang.please_fill_some_data'));
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -15,11 +15,10 @@ use Redirect;
|
|||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class WelcomepageController extends Controller
|
class WelcomepageController extends Controller {
|
||||||
{
|
|
||||||
public function __construct()
|
public function __construct() {
|
||||||
{
|
// $this->middleware('board');
|
||||||
// $this->middleware('board');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,8 +26,7 @@ class WelcomepageController extends Controller
|
|||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function get(System $note)
|
public function get(System $note) {
|
||||||
{
|
|
||||||
if (Config::get('database.install') == '%0%') {
|
if (Config::get('database.install') == '%0%') {
|
||||||
return Redirect::route('licence');
|
return Redirect::route('licence');
|
||||||
}
|
}
|
||||||
@@ -40,12 +38,12 @@ class WelcomepageController extends Controller
|
|||||||
return view('themes.default1.client.guest-user.guest', compact('heading', 'content'));
|
return view('themes.default1.client.guest-user.guest', compact('heading', 'content'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index() {
|
||||||
{
|
|
||||||
if (Config::get('database.install') == '%0%') {
|
if (Config::get('database.install') == '%0%') {
|
||||||
return Redirect::route('licence');
|
return Redirect::route('licence');
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('themes.default1.client.helpdesk.guest-user.index');
|
return view('themes.default1.client.helpdesk.guest-user.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -11,10 +11,9 @@ use App\Model\helpdesk\Settings\Email;
|
|||||||
use App\User;
|
use App\User;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
|
||||||
class PhpMailController extends Controller
|
class PhpMailController extends Controller {
|
||||||
{
|
|
||||||
public function fetch_smtp_details($id)
|
public function fetch_smtp_details($id) {
|
||||||
{
|
|
||||||
$emails = Emails::where('id', '=', $id)->first();
|
$emails = Emails::where('id', '=', $id)->first();
|
||||||
if ($emails->sending_status == 1) {
|
if ($emails->sending_status == 1) {
|
||||||
return $emails;
|
return $emails;
|
||||||
@@ -30,8 +29,7 @@ class PhpMailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return Mail
|
* @return Mail
|
||||||
*/
|
*/
|
||||||
public function sendmail($from, $to, $message, $template_variables)
|
public function sendmail($from, $to, $message, $template_variables) {
|
||||||
{
|
|
||||||
// dd($from);
|
// dd($from);
|
||||||
$from_address = $this->fetch_smtp_details($from);
|
$from_address = $this->fetch_smtp_details($from);
|
||||||
if ($from_address == null) {
|
if ($from_address == null) {
|
||||||
@@ -223,7 +221,8 @@ class PhpMailController extends Controller
|
|||||||
|
|
||||||
// dd($messagebody);
|
// dd($messagebody);
|
||||||
//$mail->SMTPDebug = 3; // Enable verbose debug output
|
//$mail->SMTPDebug = 3; // Enable verbose debug output
|
||||||
if ($protocol == 'smtp') {
|
if ($protocol == "smtp") {
|
||||||
|
|
||||||
$mail->isSMTP(); // Set mailer to use SMTP
|
$mail->isSMTP(); // Set mailer to use SMTP
|
||||||
$mail->Host = $host; // Specify main and backup SMTP servers
|
$mail->Host = $host; // Specify main and backup SMTP servers
|
||||||
$mail->SMTPAuth = true; // Enable SMTP authentication
|
$mail->SMTPAuth = true; // Enable SMTP authentication
|
||||||
@@ -232,7 +231,7 @@ class PhpMailController extends Controller
|
|||||||
$mail->SMTPSecure = $smtpsecure; // Enable TLS encryption, `ssl` also accepted
|
$mail->SMTPSecure = $smtpsecure; // Enable TLS encryption, `ssl` also accepted
|
||||||
$mail->Port = $port; // TCP port to connect to
|
$mail->Port = $port; // TCP port to connect to
|
||||||
$mail->setFrom($username, $fromname);
|
$mail->setFrom($username, $fromname);
|
||||||
} elseif ($protocol == 'mail') {
|
} elseif ($protocol == "mail") {
|
||||||
$mail->IsSendmail(); // telling the class to use SendMail transport
|
$mail->IsSendmail(); // telling the class to use SendMail transport
|
||||||
if ($username == $fromname) {
|
if ($username == $fromname) {
|
||||||
$mail->setFrom($username);
|
$mail->setFrom($username);
|
||||||
@@ -270,7 +269,7 @@ class PhpMailController extends Controller
|
|||||||
$mail->Subject = $subject;
|
$mail->Subject = $subject;
|
||||||
if ($template == 'ticket-reply-agent') {
|
if ($template == 'ticket-reply-agent') {
|
||||||
$line = '---Reply above this line--- <br/><br/>';
|
$line = '---Reply above this line--- <br/><br/>';
|
||||||
$mail->Body = utf8_decode($line.$messagebody);
|
$mail->Body = utf8_decode($line . $messagebody);
|
||||||
} else {
|
} else {
|
||||||
$mail->Body = utf8_decode($messagebody);
|
$mail->Body = utf8_decode($messagebody);
|
||||||
}
|
}
|
||||||
@@ -293,8 +292,7 @@ class PhpMailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return MailNotification
|
* @return MailNotification
|
||||||
*/
|
*/
|
||||||
public function sendEmail($from, $to, $message)
|
public function sendEmail($from, $to, $message) {
|
||||||
{
|
|
||||||
// dd($from);
|
// dd($from);
|
||||||
$from_address = $this->fetch_smtp_details($from);
|
$from_address = $this->fetch_smtp_details($from);
|
||||||
|
|
||||||
@@ -420,8 +418,7 @@ class PhpMailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function company()
|
public function company() {
|
||||||
{
|
|
||||||
$company = Company::Where('id', '=', '1')->first();
|
$company = Company::Where('id', '=', '1')->first();
|
||||||
if ($company->company_name == null) {
|
if ($company->company_name == null) {
|
||||||
$company = 'Support Center';
|
$company = 'Support Center';
|
||||||
@@ -483,8 +480,7 @@ class PhpMailController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type integer
|
* @return type integer
|
||||||
*/
|
*/
|
||||||
public function mailfrom($reg, $dept_id)
|
public function mailfrom($reg, $dept_id) {
|
||||||
{
|
|
||||||
$email = Email::where('id', '=', '1')->first();
|
$email = Email::where('id', '=', '1')->first();
|
||||||
if ($reg == 1) {
|
if ($reg == 1) {
|
||||||
return $email->sys_email;
|
return $email->sys_email;
|
||||||
@@ -497,4 +493,5 @@ class PhpMailController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -27,15 +27,14 @@ use Lang;
|
|||||||
* ***************************
|
* ***************************
|
||||||
* Controller to keep smtp details and fetch where ever needed.
|
* Controller to keep smtp details and fetch where ever needed.
|
||||||
*/
|
*/
|
||||||
class SettingsController extends Controller
|
class SettingsController extends Controller {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct() {
|
||||||
{
|
|
||||||
// $this->smtp();
|
// $this->smtp();
|
||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
$this->middleware('roles');
|
$this->middleware('roles');
|
||||||
@@ -53,8 +52,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return response
|
* @return response
|
||||||
*/
|
*/
|
||||||
public function widgets()
|
public function widgets() {
|
||||||
{
|
|
||||||
return view('themes.default1.admin.helpdesk.theme.widgets');
|
return view('themes.default1.admin.helpdesk.theme.widgets');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,8 +61,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return response
|
* @return response
|
||||||
*/
|
*/
|
||||||
public function list_widget()
|
public function list_widget() {
|
||||||
{
|
|
||||||
return \Datatable::collection(Widgets::where('id', '<', '7')->get())
|
return \Datatable::collection(Widgets::where('id', '<', '7')->get())
|
||||||
->searchColumns('name')
|
->searchColumns('name')
|
||||||
->orderColumns('name', 'title', 'value')
|
->orderColumns('name', 'title', 'value')
|
||||||
@@ -78,33 +75,33 @@ class SettingsController extends Controller
|
|||||||
return $model->value;
|
return $model->value;
|
||||||
})
|
})
|
||||||
->addColumn('Actions', function ($model) {
|
->addColumn('Actions', function ($model) {
|
||||||
return '<span data-toggle="modal" data-target="#edit_widget'.$model->id.'"><a class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a></span>
|
return '<span data-toggle="modal" data-target="#edit_widget' . $model->id . '"><a class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a></span>
|
||||||
<div class="modal fade" id="edit_widget'.$model->id.'">
|
<div class="modal fade" id="edit_widget' . $model->id . '">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<form action="'.url('edit-widget/'.$model->id).'" method="POST">
|
<form action="' . url('edit-widget/' . $model->id) . '" method="POST">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h4 class="modal-title">'.strtoupper($model->name).' </h4>
|
<h4 class="modal-title">' . strtoupper($model->name) . ' </h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group" style="width:100%">
|
<div class="form-group" style="width:100%">
|
||||||
<label>'.\Lang::get('lang.title').'</label><br/>
|
<label>' . \Lang::get('lang.title') . '</label><br/>
|
||||||
<input type="text" name="title" value="'.$model->title.'" class="form-control" style="width:100%">
|
<input type="text" name="title" value="' . $model->title . '" class="form-control" style="width:100%">
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<div class="form-group" style="width:100%">
|
<div class="form-group" style="width:100%">
|
||||||
<label>'.\Lang::get('lang.content').'</label><br/>
|
<label>' . \Lang::get('lang.content') . '</label><br/>
|
||||||
<textarea name="content" class="form-control" style="width:100%" id="Content'.$model->id.'">'.$model->value.'</textarea>
|
<textarea name="content" class="form-control" style="width:100%" id="Content' . $model->id . '">' . $model->value . '</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">'.\Lang::get('lang.close').'</button>
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">' . \Lang::get('lang.close') . '</button>
|
||||||
<input type="submit" class="btn btn-primary" value="'.\Lang::get('lang.update').'">
|
<input type="submit" class="btn btn-primary" value="' . \Lang::get('lang.update') . '">
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$("#Content'.$model->id.'").wysihtml5();
|
$("#Content' . $model->id . '").wysihtml5();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</form>
|
</form>
|
||||||
@@ -123,15 +120,14 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type response
|
* @return type response
|
||||||
*/
|
*/
|
||||||
public function edit_widget($id, Widgets $widgets, Request $request)
|
public function edit_widget($id, Widgets $widgets, Request $request) {
|
||||||
{
|
|
||||||
$widget = $widgets->where('id', '=', $id)->first();
|
$widget = $widgets->where('id', '=', $id)->first();
|
||||||
$widget->title = $request->title;
|
$widget->title = $request->title;
|
||||||
$widget->value = $request->content;
|
$widget->value = $request->content;
|
||||||
try {
|
try {
|
||||||
$widget->save();
|
$widget->save();
|
||||||
|
|
||||||
return redirect()->back()->with('success', $widget->name.Lang::get('lang.saved_successfully'));
|
return redirect()->back()->with('success', $widget->name . Lang::get('lang.saved_successfully'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return redirect()->back()->with('fails', $e->getMessage());
|
return redirect()->back()->with('fails', $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -142,8 +138,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return response
|
* @return response
|
||||||
*/
|
*/
|
||||||
public function social_buttons()
|
public function social_buttons() {
|
||||||
{
|
|
||||||
return view('themes.default1.admin.helpdesk.theme.social');
|
return view('themes.default1.admin.helpdesk.theme.social');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,8 +147,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return response
|
* @return response
|
||||||
*/
|
*/
|
||||||
public function list_social_buttons()
|
public function list_social_buttons() {
|
||||||
{
|
|
||||||
return \Datatable::collection(Widgets::where('id', '>', '6')->get())
|
return \Datatable::collection(Widgets::where('id', '>', '6')->get())
|
||||||
->searchColumns('name')
|
->searchColumns('name')
|
||||||
->orderColumns('name', 'value')
|
->orderColumns('name', 'value')
|
||||||
@@ -164,25 +158,25 @@ class SettingsController extends Controller
|
|||||||
return $model->value;
|
return $model->value;
|
||||||
})
|
})
|
||||||
->addColumn('Actions', function ($model) {
|
->addColumn('Actions', function ($model) {
|
||||||
return '<span data-toggle="modal" data-target="#edit_widget'.$model->id.'"><a class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a></span>
|
return '<span data-toggle="modal" data-target="#edit_widget' . $model->id . '"><a class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a></span>
|
||||||
<div class="modal fade" id="edit_widget'.$model->id.'">
|
<div class="modal fade" id="edit_widget' . $model->id . '">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<form action="'.url('edit-widget/'.$model->id).'" method="POST">
|
<form action="' . url('edit-widget/' . $model->id) . '" method="POST">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h4 class="modal-title">'.strtoupper($model->name).' </h4>
|
<h4 class="modal-title">' . strtoupper($model->name) . ' </h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<br/>
|
<br/>
|
||||||
<div class="form-group" style="width:100%">
|
<div class="form-group" style="width:100%">
|
||||||
<label>'.\Lang::get('lang.link').'</label><br/>
|
<label>' . \Lang::get('lang.link') . '</label><br/>
|
||||||
<input type="url" name="content" class="form-control" style="width:100%" value="'.$model->value.'">
|
<input type="url" name="content" class="form-control" style="width:100%" value="' . $model->value . '">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">'.\Lang::get('lang.close').'</button>
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">' . \Lang::get('lang.close') . '</button>
|
||||||
<input type="submit" class="btn btn-primary" value="'.\Lang::get('lang.update').'">
|
<input type="submit" class="btn btn-primary" value="' . \Lang::get('lang.update') . '">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -200,15 +194,14 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type response
|
* @return type response
|
||||||
*/
|
*/
|
||||||
public function edit_social_buttons($id, Widgets $widgets, Request $request)
|
public function edit_social_buttons($id, Widgets $widgets, Request $request) {
|
||||||
{
|
|
||||||
$widget = $widgets->where('id', '=', $id)->first();
|
$widget = $widgets->where('id', '=', $id)->first();
|
||||||
$widget->title = $request->title;
|
$widget->title = $request->title;
|
||||||
$widget->value = $request->content;
|
$widget->value = $request->content;
|
||||||
try {
|
try {
|
||||||
$widget->save();
|
$widget->save();
|
||||||
|
|
||||||
return redirect()->back()->with('success', $widget->name.' Saved Successfully');
|
return redirect()->back()->with('success', $widget->name . ' Saved Successfully');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return redirect()->back()->with('fails', $e->errorInfo[2]);
|
return redirect()->back()->with('fails', $e->errorInfo[2]);
|
||||||
}
|
}
|
||||||
@@ -219,8 +212,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public static function driver()
|
public static function driver() {
|
||||||
{
|
|
||||||
$set = new Smtp();
|
$set = new Smtp();
|
||||||
$settings = Smtp::where('id', '=', '1')->first();
|
$settings = Smtp::where('id', '=', '1')->first();
|
||||||
Config::set('mail.host', $settings->driver);
|
Config::set('mail.host', $settings->driver);
|
||||||
@@ -231,8 +223,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public static function host()
|
public static function host() {
|
||||||
{
|
|
||||||
$set = new Smtp();
|
$set = new Smtp();
|
||||||
$settings = Smtp::where('id', '=', '1')->first();
|
$settings = Smtp::where('id', '=', '1')->first();
|
||||||
Config::set('mail.host', $settings->host);
|
Config::set('mail.host', $settings->host);
|
||||||
@@ -243,8 +234,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public static function port()
|
public static function port() {
|
||||||
{
|
|
||||||
$set = new Smtp();
|
$set = new Smtp();
|
||||||
$settings = Smtp::where('id', '=', '1')->first();
|
$settings = Smtp::where('id', '=', '1')->first();
|
||||||
Config::set('mail.port', intval($settings->port));
|
Config::set('mail.port', intval($settings->port));
|
||||||
@@ -255,8 +245,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public static function from()
|
public static function from() {
|
||||||
{
|
|
||||||
$set = new Smtp();
|
$set = new Smtp();
|
||||||
$settings = Smtp::where('id', '=', '1')->first();
|
$settings = Smtp::where('id', '=', '1')->first();
|
||||||
Config::set('mail.from', ['address' => $settings->email, 'name' => $settings->company_name]);
|
Config::set('mail.from', ['address' => $settings->email, 'name' => $settings->company_name]);
|
||||||
@@ -267,8 +256,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public static function encryption()
|
public static function encryption() {
|
||||||
{
|
|
||||||
$set = new Smtp();
|
$set = new Smtp();
|
||||||
$settings = Smtp::where('id', '=', '1')->first();
|
$settings = Smtp::where('id', '=', '1')->first();
|
||||||
Config::set('mail.encryption', $settings->encryption);
|
Config::set('mail.encryption', $settings->encryption);
|
||||||
@@ -279,8 +267,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public static function username()
|
public static function username() {
|
||||||
{
|
|
||||||
$set = new Smtp();
|
$set = new Smtp();
|
||||||
$settings = Smtp::where('id', '=', '1')->first();
|
$settings = Smtp::where('id', '=', '1')->first();
|
||||||
Config::set('mail.username', $settings->email);
|
Config::set('mail.username', $settings->email);
|
||||||
@@ -291,8 +278,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public static function password()
|
public static function password() {
|
||||||
{
|
|
||||||
$settings = Smtp::first();
|
$settings = Smtp::first();
|
||||||
if ($settings->password) {
|
if ($settings->password) {
|
||||||
$pass = $settings->password;
|
$pass = $settings->password;
|
||||||
@@ -306,8 +292,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function getsmtp()
|
public function getsmtp() {
|
||||||
{
|
|
||||||
$settings = Smtp::where('id', '=', '1')->first();
|
$settings = Smtp::where('id', '=', '1')->first();
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.emails.smtp', compact('settings'));
|
return view('themes.default1.admin.helpdesk.emails.smtp', compact('settings'));
|
||||||
@@ -318,8 +303,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function postsmtp(SmtpRequest $request)
|
public function postsmtp(SmtpRequest $request) {
|
||||||
{
|
|
||||||
$data = Smtp::where('id', '=', 1)->first();
|
$data = Smtp::where('id', '=', 1)->first();
|
||||||
$data->driver = $request->input('driver');
|
$data->driver = $request->input('driver');
|
||||||
$data->host = $request->input('host');
|
$data->host = $request->input('host');
|
||||||
@@ -342,8 +326,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type void
|
* @return type void
|
||||||
*/
|
*/
|
||||||
public static function smtp()
|
public static function smtp() {
|
||||||
{
|
|
||||||
$settings = Smtp::where('id', '=', '1')->first();
|
$settings = Smtp::where('id', '=', '1')->first();
|
||||||
if ($settings->password) {
|
if ($settings->password) {
|
||||||
$password = Crypt::decrypt($settings->password);
|
$password = Crypt::decrypt($settings->password);
|
||||||
@@ -364,8 +347,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view\
|
* @return type view\
|
||||||
*/
|
*/
|
||||||
public function settings(Smtp $set)
|
public function settings(Smtp $set) {
|
||||||
{
|
|
||||||
$settings = $set->where('id', '1')->first();
|
$settings = $set->where('id', '1')->first();
|
||||||
|
|
||||||
return view('themes.default1.admin.settings', compact('settings'));
|
return view('themes.default1.admin.settings', compact('settings'));
|
||||||
@@ -379,8 +361,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function PostSettings(Settings $set, Request $request)
|
public function PostSettings(Settings $set, Request $request) {
|
||||||
{
|
|
||||||
$settings = $set->where('id', '1')->first();
|
$settings = $set->where('id', '1')->first();
|
||||||
$pass = $request->input('password');
|
$pass = $request->input('password');
|
||||||
$password = Crypt::encrypt($pass);
|
$password = Crypt::encrypt($pass);
|
||||||
@@ -393,7 +374,7 @@ class SettingsController extends Controller
|
|||||||
if (Input::file('logo')) {
|
if (Input::file('logo')) {
|
||||||
$name = Input::file('logo')->getClientOriginalName();
|
$name = Input::file('logo')->getClientOriginalName();
|
||||||
$destinationPath = 'dist/logo';
|
$destinationPath = 'dist/logo';
|
||||||
$fileName = rand(0000, 9999).'.'.$name;
|
$fileName = rand(0000, 9999) . '.' . $name;
|
||||||
Input::file('logo')->move($destinationPath, $fileName);
|
Input::file('logo')->move($destinationPath, $fileName);
|
||||||
$settings->logo = $fileName;
|
$settings->logo = $fileName;
|
||||||
$settings->save();
|
$settings->save();
|
||||||
@@ -412,14 +393,13 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function version_check()
|
public function version_check() {
|
||||||
{
|
|
||||||
$response_url = \URL::route('post-version-check');
|
$response_url = \URL::route('post-version-check');
|
||||||
echo "<form action='http://www.faveohelpdesk.com/bill/version' method='post' name='redirect'>";
|
echo "<form action='http://www.faveohelpdesk.com/billing/version' method='post' name='redirect'>";
|
||||||
echo "<input type='hidden' name='_token' value='csrf_token()'/>";
|
echo "<input type='hidden' name='_token' value='csrf_token()'/>";
|
||||||
echo "<input type='hidden' name='title' value='helpdeskcommunityedition'/>";
|
echo "<input type='hidden' name='title' value='helpdeskcommunityedition'/>";
|
||||||
echo "<input type='hidden' name='id' value='19'/>";
|
echo "<input type='hidden' name='id' value='19'/>";
|
||||||
echo "<input type='hidden' name='response_url' value='".$response_url."' />";
|
echo "<input type='hidden' name='response_url' value='" . $response_url . "' />";
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo "<script language='javascript'>document.redirect.submit();</script>";
|
echo "<script language='javascript'>document.redirect.submit();</script>";
|
||||||
}
|
}
|
||||||
@@ -429,38 +409,31 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function post_version_check(Request $request)
|
public function post_version_check(Request $request) {
|
||||||
{
|
|
||||||
$current_version = \Config::get('app.version');
|
$current_version = \Config::get('app.version');
|
||||||
$new_version = $request->value;
|
$new_version = $request->value;
|
||||||
if ($current_version == $new_version) {
|
if ($current_version == $new_version) {
|
||||||
// echo "No, new Updates";
|
|
||||||
return redirect()->route('checkupdate')->with('info', ' No, new Updates');
|
return redirect()->route('checkupdate')->with('info', ' No, new Updates');
|
||||||
} elseif ($current_version < $new_version) {
|
} elseif ($current_version < $new_version) {
|
||||||
$version = Version_Check::where('id', '=', '1')->first();
|
$version = Version_Check::where('id', '=', '1')->first();
|
||||||
$version->current_version = $current_version;
|
$version->current_version = $current_version;
|
||||||
$version->new_version = $new_version;
|
$version->new_version = $new_version;
|
||||||
$version->save();
|
$version->save();
|
||||||
// echo "Version " . $new_version . " is Available";
|
return redirect()->route('checkupdate')->with('info', ' Version ' . $new_version . ' is Available');
|
||||||
return redirect()->route('checkupdate')->with('info', ' Version '.$new_version.' is Available');
|
|
||||||
} else {
|
} else {
|
||||||
// echo "Error Checking Version";
|
|
||||||
return redirect()->route('checkupdate')->with('info', ' Error Checking Version');
|
return redirect()->route('checkupdate')->with('info', ' Error Checking Version');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getupdate()
|
public function getupdate() {
|
||||||
{
|
|
||||||
return \View::make('themes.default1.admin.helpdesk.settings.checkupdate');
|
return \View::make('themes.default1.admin.helpdesk.settings.checkupdate');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Plugins()
|
public function Plugins() {
|
||||||
{
|
|
||||||
return view('themes.default1.admin.helpdesk.settings.plugins');
|
return view('themes.default1.admin.helpdesk.settings.plugins');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetPlugin()
|
public function GetPlugin() {
|
||||||
{
|
|
||||||
$plugins = $this->fetchConfig();
|
$plugins = $this->fetchConfig();
|
||||||
|
|
||||||
return \Datatable::collection(new Collection($plugins))
|
return \Datatable::collection(new Collection($plugins))
|
||||||
@@ -468,15 +441,15 @@ class SettingsController extends Controller
|
|||||||
->addColumn('name', function ($model) {
|
->addColumn('name', function ($model) {
|
||||||
if (array_has($model, 'path')) {
|
if (array_has($model, 'path')) {
|
||||||
if ($model['status'] == 0) {
|
if ($model['status'] == 0) {
|
||||||
$activate = '<a href='.url('plugin/status/'.$model['path']).'>Activate</a>';
|
$activate = '<a href=' . url('plugin/status/' . $model['path']) . '>Activate</a>';
|
||||||
$settings = ' ';
|
$settings = ' ';
|
||||||
} else {
|
} else {
|
||||||
$settings = '<a href='.url($model['settings']).'>Settings</a> | ';
|
$settings = '<a href=' . url($model['settings']) . '>Settings</a> | ';
|
||||||
$activate = '<a href='.url('plugin/status/'.$model['path']).'>Deactivate</a>';
|
$activate = '<a href=' . url('plugin/status/' . $model['path']) . '>Deactivate</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$delete = '<a href= id=delete'.$model['path'].' data-toggle=modal data-target=#del'.$model['path']."><span style='color:red'>Delete</span></a>"
|
$delete = '<a href= id=delete' . $model['path'] . ' data-toggle=modal data-target=#del' . $model['path'] . "><span style='color:red'>Delete</span></a>"
|
||||||
."<div class='modal fade' id=del".$model['path'].">
|
. "<div class='modal fade' id=del" . $model['path'] . ">
|
||||||
<div class='modal-dialog'>
|
<div class='modal-dialog'>
|
||||||
<div class=modal-content>
|
<div class=modal-content>
|
||||||
<div class=modal-header>
|
<div class=modal-header>
|
||||||
@@ -485,8 +458,8 @@ class SettingsController extends Controller
|
|||||||
<div class=modal-body>
|
<div class=modal-body>
|
||||||
<p>Are you Sure ?</p>
|
<p>Are you Sure ?</p>
|
||||||
<div class=modal-footer>
|
<div class=modal-footer>
|
||||||
<button type=button class='btn btn-default pull-left' data-dismiss=modal id=dismis>".\Lang::get('lang.close').'</button>
|
<button type=button class='btn btn-default pull-left' data-dismiss=modal id=dismis>" . \Lang::get('lang.close') . '</button>
|
||||||
<a href='.url('plugin/delete/'.$model['path'])."><button class='btn btn-danger'>Delete</button></a>
|
<a href=' . url('plugin/delete/' . $model['path']) . "><button class='btn btn-danger'>Delete</button></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -494,12 +467,12 @@ class SettingsController extends Controller
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>";
|
</div>";
|
||||||
$action = '<br><br>'.$delete.' | '.$settings.$activate;
|
$action = '<br><br>' . $delete . ' | ' . $settings . $activate;
|
||||||
} else {
|
} else {
|
||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return ucfirst($model['name']).$action;
|
return ucfirst($model['name']) . $action;
|
||||||
})
|
})
|
||||||
->addColumn('description', function ($model) {
|
->addColumn('description', function ($model) {
|
||||||
return ucfirst($model['description']);
|
return ucfirst($model['description']);
|
||||||
@@ -508,7 +481,7 @@ class SettingsController extends Controller
|
|||||||
return ucfirst($model['author']);
|
return ucfirst($model['author']);
|
||||||
})
|
})
|
||||||
->addColumn('website', function ($model) {
|
->addColumn('website', function ($model) {
|
||||||
return '<a href='.$model['website'].' target=_blank>'.$model['website'].'</a>';
|
return '<a href=' . $model['website'] . ' target=_blank>' . $model['website'] . '</a>';
|
||||||
})
|
})
|
||||||
->addColumn('version', function ($model) {
|
->addColumn('version', function ($model) {
|
||||||
return $model['version'];
|
return $model['version'];
|
||||||
@@ -521,9 +494,8 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function ReadPlugins()
|
public function ReadPlugins() {
|
||||||
{
|
$dir = app_path() . DIRECTORY_SEPARATOR . 'Plugins';
|
||||||
$dir = app_path().DIRECTORY_SEPARATOR.'Plugins';
|
|
||||||
$plugins = array_diff(scandir($dir), ['.', '..']);
|
$plugins = array_diff(scandir($dir), ['.', '..']);
|
||||||
|
|
||||||
return $plugins;
|
return $plugins;
|
||||||
@@ -536,13 +508,12 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function PostPlugins(Request $request)
|
public function PostPlugins(Request $request) {
|
||||||
{
|
|
||||||
$v = $this->validate($request, ['plugin' => 'required|mimes:application/zip,zip,Zip']);
|
$v = $this->validate($request, ['plugin' => 'required|mimes:application/zip,zip,Zip']);
|
||||||
$plug = new Plugin();
|
$plug = new Plugin();
|
||||||
$file = $request->file('plugin');
|
$file = $request->file('plugin');
|
||||||
//dd($file);
|
//dd($file);
|
||||||
$destination = app_path().DIRECTORY_SEPARATOR.'Plugins';
|
$destination = app_path() . DIRECTORY_SEPARATOR . 'Plugins';
|
||||||
$zipfile = $file->getRealPath();
|
$zipfile = $file->getRealPath();
|
||||||
/*
|
/*
|
||||||
* get the file name and remove .zip
|
* get the file name and remove .zip
|
||||||
@@ -551,30 +522,30 @@ class SettingsController extends Controller
|
|||||||
$filename2 = str_replace('.zip', '', $filename2);
|
$filename2 = str_replace('.zip', '', $filename2);
|
||||||
$filename1 = ucfirst($file->getClientOriginalName());
|
$filename1 = ucfirst($file->getClientOriginalName());
|
||||||
$filename = str_replace('.zip', '', $filename1);
|
$filename = str_replace('.zip', '', $filename1);
|
||||||
mkdir($destination.DIRECTORY_SEPARATOR.$filename);
|
mkdir($destination . DIRECTORY_SEPARATOR . $filename);
|
||||||
/*
|
/*
|
||||||
* extract the zip file using zipper
|
* extract the zip file using zipper
|
||||||
*/
|
*/
|
||||||
\Zipper::make($zipfile)->folder($filename2)->extractTo($destination.DIRECTORY_SEPARATOR.$filename);
|
\Zipper::make($zipfile)->folder($filename2)->extractTo($destination . DIRECTORY_SEPARATOR . $filename);
|
||||||
|
|
||||||
$file = app_path().DIRECTORY_SEPARATOR.'Plugins'.DIRECTORY_SEPARATOR.$filename; // Plugin file path
|
$file = app_path() . DIRECTORY_SEPARATOR . 'Plugins' . DIRECTORY_SEPARATOR . $filename; // Plugin file path
|
||||||
|
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
$seviceporvider = $file.DIRECTORY_SEPARATOR.'ServiceProvider.php';
|
$seviceporvider = $file . DIRECTORY_SEPARATOR . 'ServiceProvider.php';
|
||||||
$config = $file.DIRECTORY_SEPARATOR.'config.php';
|
$config = $file . DIRECTORY_SEPARATOR . 'config.php';
|
||||||
if (file_exists($seviceporvider) && file_exists($config)) {
|
if (file_exists($seviceporvider) && file_exists($config)) {
|
||||||
/*
|
/*
|
||||||
* move to faveo config
|
* move to faveo config
|
||||||
*/
|
*/
|
||||||
$faveoconfig = config_path().DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$filename.'.php';
|
$faveoconfig = config_path() . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $filename . '.php';
|
||||||
if ($faveoconfig) {
|
if ($faveoconfig) {
|
||||||
|
|
||||||
//copy($config, $faveoconfig);
|
//copy($config, $faveoconfig);
|
||||||
/*
|
/*
|
||||||
* write provider list in app.php line 128
|
* write provider list in app.php line 128
|
||||||
*/
|
*/
|
||||||
$app = base_path().DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'app.php';
|
$app = base_path() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'app.php';
|
||||||
$str = "\n\n\t\t\t'App\\Plugins\\$filename"."\\ServiceProvider',";
|
$str = "\n\n\t\t\t'App\\Plugins\\$filename" . "\\ServiceProvider',";
|
||||||
$line_i_am_looking_for = 144;
|
$line_i_am_looking_for = 144;
|
||||||
$lines = file($app, FILE_IGNORE_NEW_LINES);
|
$lines = file($app, FILE_IGNORE_NEW_LINES);
|
||||||
$lines[$line_i_am_looking_for] = $str;
|
$lines[$line_i_am_looking_for] = $str;
|
||||||
@@ -588,7 +559,7 @@ class SettingsController extends Controller
|
|||||||
*/
|
*/
|
||||||
$this->deleteDirectory($file);
|
$this->deleteDirectory($file);
|
||||||
|
|
||||||
return redirect()->back()->with('fails', 'Their is no '.$file);
|
return redirect()->back()->with('fails', 'Their is no ' . $file);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
@@ -596,7 +567,7 @@ class SettingsController extends Controller
|
|||||||
*/
|
*/
|
||||||
$this->deleteDirectory($file);
|
$this->deleteDirectory($file);
|
||||||
|
|
||||||
return redirect()->back()->with('fails', 'Their is no <b>config.php or ServiceProvider.php</b> '.$file);
|
return redirect()->back()->with('fails', 'Their is no <b>config.php or ServiceProvider.php</b> ' . $file);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
@@ -604,7 +575,7 @@ class SettingsController extends Controller
|
|||||||
*/
|
*/
|
||||||
$this->deleteDirectory($file);
|
$this->deleteDirectory($file);
|
||||||
|
|
||||||
return redirect()->back()->with('fails', '<b>Plugin File Path is not exist</b> '.$file);
|
return redirect()->back()->with('fails', '<b>Plugin File Path is not exist</b> ' . $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -615,8 +586,7 @@ class SettingsController extends Controller
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function deleteDirectory($dir)
|
public function deleteDirectory($dir) {
|
||||||
{
|
|
||||||
if (!file_exists($dir)) {
|
if (!file_exists($dir)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -627,8 +597,8 @@ class SettingsController extends Controller
|
|||||||
if ($item == '.' || $item == '..') {
|
if ($item == '.' || $item == '..') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
chmod($dir.DIRECTORY_SEPARATOR.$item, 0777);
|
chmod($dir . DIRECTORY_SEPARATOR . $item, 0777);
|
||||||
if (!$this->deleteDirectory($dir.DIRECTORY_SEPARATOR.$item)) {
|
if (!$this->deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -637,9 +607,8 @@ class SettingsController extends Controller
|
|||||||
return rmdir($dir);
|
return rmdir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ReadConfigs()
|
public function ReadConfigs() {
|
||||||
{
|
$dir = app_path() . DIRECTORY_SEPARATOR . 'Plugins' . DIRECTORY_SEPARATOR;
|
||||||
$dir = app_path().DIRECTORY_SEPARATOR.'Plugins'.DIRECTORY_SEPARATOR;
|
|
||||||
$directories = scandir($dir);
|
$directories = scandir($dir);
|
||||||
$files = [];
|
$files = [];
|
||||||
foreach ($directories as $key => $file) {
|
foreach ($directories as $key => $file) {
|
||||||
@@ -647,7 +616,7 @@ class SettingsController extends Controller
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_dir($dir.DIRECTORY_SEPARATOR.$file)) {
|
if (is_dir($dir . DIRECTORY_SEPARATOR . $file)) {
|
||||||
$files[$key] = $file;
|
$files[$key] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -656,7 +625,7 @@ class SettingsController extends Controller
|
|||||||
$plugins = [];
|
$plugins = [];
|
||||||
if (count($files) > 0) {
|
if (count($files) > 0) {
|
||||||
foreach ($files as $key => $file) {
|
foreach ($files as $key => $file) {
|
||||||
$plugin = $dir.$file;
|
$plugin = $dir . $file;
|
||||||
$plugins[$key] = array_diff(scandir($plugin), ['.', '..', 'ServiceProvider.php']);
|
$plugins[$key] = array_diff(scandir($plugin), ['.', '..', 'ServiceProvider.php']);
|
||||||
$plugins[$key]['file'] = $plugin;
|
$plugins[$key]['file'] = $plugin;
|
||||||
}
|
}
|
||||||
@@ -666,7 +635,7 @@ class SettingsController extends Controller
|
|||||||
if ($dh = opendir($dir)) {
|
if ($dh = opendir($dir)) {
|
||||||
while (($file = readdir($dh)) !== false) {
|
while (($file = readdir($dh)) !== false) {
|
||||||
if ($file == 'config.php') {
|
if ($file == 'config.php') {
|
||||||
$config[] = $dir.DIRECTORY_SEPARATOR.$file;
|
$config[] = $dir . DIRECTORY_SEPARATOR . $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($dh);
|
closedir($dh);
|
||||||
@@ -679,8 +648,7 @@ class SettingsController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchConfig()
|
public function fetchConfig() {
|
||||||
{
|
|
||||||
$configs = $this->ReadConfigs();
|
$configs = $this->ReadConfigs();
|
||||||
//dd($configs);
|
//dd($configs);
|
||||||
$plugs = new Plugin();
|
$plugs = new Plugin();
|
||||||
@@ -716,15 +684,14 @@ class SettingsController extends Controller
|
|||||||
return $attributes;
|
return $attributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function DeletePlugin($slug)
|
public function DeletePlugin($slug) {
|
||||||
{
|
$dir = app_path() . DIRECTORY_SEPARATOR . 'Plugins' . DIRECTORY_SEPARATOR . $slug;
|
||||||
$dir = app_path().DIRECTORY_SEPARATOR.'Plugins'.DIRECTORY_SEPARATOR.$slug;
|
|
||||||
$this->deleteDirectory($dir);
|
$this->deleteDirectory($dir);
|
||||||
/*
|
/*
|
||||||
* remove service provider from app.php
|
* remove service provider from app.php
|
||||||
*/
|
*/
|
||||||
$str = "'App\\Plugins\\$slug"."\\ServiceProvider',";
|
$str = "'App\\Plugins\\$slug" . "\\ServiceProvider',";
|
||||||
$path_to_file = base_path().DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'app.php';
|
$path_to_file = base_path() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'app.php';
|
||||||
$file_contents = file_get_contents($path_to_file);
|
$file_contents = file_get_contents($path_to_file);
|
||||||
$file_contents = str_replace($str, '//', $file_contents);
|
$file_contents = str_replace($str, '//', $file_contents);
|
||||||
file_put_contents($path_to_file, $file_contents);
|
file_put_contents($path_to_file, $file_contents);
|
||||||
@@ -737,13 +704,12 @@ class SettingsController extends Controller
|
|||||||
return redirect()->back()->with('success', 'Deleted Successfully');
|
return redirect()->back()->with('success', 'Deleted Successfully');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function StatusPlugin($slug)
|
public function StatusPlugin($slug) {
|
||||||
{
|
|
||||||
$plugs = new Plugin();
|
$plugs = new Plugin();
|
||||||
$plug = $plugs->where('name', $slug)->first();
|
$plug = $plugs->where('name', $slug)->first();
|
||||||
if (!$plug) {
|
if (!$plug) {
|
||||||
$app = base_path().DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'app.php';
|
$app = base_path() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'app.php';
|
||||||
$str = "\n'App\\Plugins\\$slug"."\\ServiceProvider',";
|
$str = "\n'App\\Plugins\\$slug" . "\\ServiceProvider',";
|
||||||
$line_i_am_looking_for = 144;
|
$line_i_am_looking_for = 144;
|
||||||
$lines = file($app, FILE_IGNORE_NEW_LINES);
|
$lines = file($app, FILE_IGNORE_NEW_LINES);
|
||||||
$lines[$line_i_am_looking_for] = $str;
|
$lines[$line_i_am_looking_for] = $str;
|
||||||
@@ -756,8 +722,8 @@ class SettingsController extends Controller
|
|||||||
if ($status == 0) {
|
if ($status == 0) {
|
||||||
$plug->status = 1;
|
$plug->status = 1;
|
||||||
|
|
||||||
$app = base_path().DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'app.php';
|
$app = base_path() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'app.php';
|
||||||
$str = "\n'App\\Plugins\\$slug"."\\ServiceProvider',";
|
$str = "\n'App\\Plugins\\$slug" . "\\ServiceProvider',";
|
||||||
$line_i_am_looking_for = 144;
|
$line_i_am_looking_for = 144;
|
||||||
$lines = file($app, FILE_IGNORE_NEW_LINES);
|
$lines = file($app, FILE_IGNORE_NEW_LINES);
|
||||||
$lines[$line_i_am_looking_for] = $str;
|
$lines[$line_i_am_looking_for] = $str;
|
||||||
@@ -768,8 +734,8 @@ class SettingsController extends Controller
|
|||||||
/*
|
/*
|
||||||
* remove service provider from app.php
|
* remove service provider from app.php
|
||||||
*/
|
*/
|
||||||
$str = "\n'App\\Plugins\\$slug"."\\ServiceProvider',";
|
$str = "\n'App\\Plugins\\$slug" . "\\ServiceProvider',";
|
||||||
$path_to_file = base_path().DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'app.php';
|
$path_to_file = base_path() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'app.php';
|
||||||
|
|
||||||
$file_contents = file_get_contents($path_to_file);
|
$file_contents = file_get_contents($path_to_file);
|
||||||
$file_contents = str_replace($str, '//', $file_contents);
|
$file_contents = str_replace($str, '//', $file_contents);
|
||||||
|
@@ -41,6 +41,6 @@ class Kernel extends HttpKernel
|
|||||||
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
|
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
|
||||||
'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
|
'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
|
||||||
'update' => \App\Http\Middleware\CheckUpdate::class,
|
'update' => \App\Http\Middleware\CheckUpdate::class,
|
||||||
'board' => \App\Http\Middleware\CheckBoard::class,
|
'board' => \App\Http\Middleware\CheckBoard::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -7,22 +7,19 @@ use Closure;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* CheckBoard.
|
* CheckBoard.
|
||||||
* Checking if the system board is online or offline.
|
* Checking if the system board is online or offline
|
||||||
*
|
*
|
||||||
* @author Ladybird <info@ladybirdweb.com>
|
* @author Ladybird <info@ladybirdweb.com>
|
||||||
*/
|
*/
|
||||||
class CheckBoard
|
class CheckBoard {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
*
|
|
||||||
* @return type Mixed
|
* @return type Mixed
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next) {
|
||||||
{
|
|
||||||
if ($this->checkBoard() == '1') {
|
if ($this->checkBoard() == '1') {
|
||||||
return $next($request);
|
return $next($request);
|
||||||
} else {
|
} else {
|
||||||
@@ -31,18 +28,16 @@ class CheckBoard
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to get the system offline details.
|
* Function to get the system offline details
|
||||||
*
|
|
||||||
* @return type Mixed
|
* @return type Mixed
|
||||||
*/
|
*/
|
||||||
public function checkBoard()
|
public function checkBoard() {
|
||||||
{
|
|
||||||
$res = 0;
|
$res = 0;
|
||||||
$system = new System();
|
$system = new System;
|
||||||
if ($system->first()) {
|
if ($system->first()) {
|
||||||
$res = $system->first()->status;
|
$res = $system->first()->status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,6 @@ class CheckUpdate
|
|||||||
return redirect('file-update');
|
return redirect('file-update');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,11 +46,11 @@ class CheckUpdate
|
|||||||
public function checkNewUpdate()
|
public function checkNewUpdate()
|
||||||
{
|
{
|
||||||
$notify = new BarNotification();
|
$notify = new BarNotification();
|
||||||
if (!\Schema::hasTable('bar_notifications')) {
|
if(!\Schema::hasTable('bar_notifications')){
|
||||||
$url = url('database-upgrade');
|
$url = url('database-upgrade');
|
||||||
//$string = "Your Database is outdated please upgrade <a href=$url>Now !</a>";
|
//$string = "Your Database is outdated please upgrade <a href=$url>Now !</a>";
|
||||||
echo view('themes.default1.update.database', compact('url'));
|
echo view('themes.default1.update.database', compact('url'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$not = $notify->get();
|
$not = $notify->get();
|
||||||
if ($not->count() > 0) {
|
if ($not->count() > 0) {
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
Route::group(['middleware' => 'update'], function () {
|
Route::group(['middleware' => 'update'], function () {
|
||||||
Route::controllers([
|
Route::controllers([
|
||||||
'auth' => 'Auth\AuthController',
|
'auth' => 'Auth\AuthController',
|
||||||
'password' => 'Auth\PasswordController',
|
'password' => 'Auth\PasswordController',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
@@ -335,12 +335,12 @@ Route::group(['middleware' => 'roles', 'middleware' => 'auth', 'middleware' => '
|
|||||||
|
|
||||||
//route for submit error and debugging setting form page
|
//route for submit error and debugging setting form page
|
||||||
Route::post('post-settings', ['as' => 'post.error.debug.settings',
|
Route::post('post-settings', ['as' => 'post.error.debug.settings',
|
||||||
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@postSettings', ]);
|
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@postSettings']);
|
||||||
|
|
||||||
//route to error logs table page
|
//route to error logs table page
|
||||||
Route::get('show-error-logs', [
|
Route::get('show-error-logs', [
|
||||||
'as' => 'error.logs',
|
'as' => 'error.logs',
|
||||||
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@showErrorLogs',
|
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@showErrorLogs'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -565,7 +565,7 @@ Route::POST('tickets/search/', function () {
|
|||||||
});
|
});
|
||||||
Route::any('getdata', function () {
|
Route::any('getdata', function () {
|
||||||
$term = Illuminate\Support\Str::lower(Input::get('term'));
|
$term = Illuminate\Support\Str::lower(Input::get('term'));
|
||||||
$data = Illuminate\Support\Facades\DB::table('tickets')->distinct()->select('ticket_number')->where('ticket_number', 'LIKE', $term.'%')->groupBy('ticket_number')->take(10)->get();
|
$data = Illuminate\Support\Facades\DB::table('tickets')->distinct()->select('ticket_number')->where('ticket_number', 'LIKE', $term . '%')->groupBy('ticket_number')->take(10)->get();
|
||||||
foreach ($data as $v) {
|
foreach ($data as $v) {
|
||||||
return [
|
return [
|
||||||
'value' => $v->ticket_number,
|
'value' => $v->ticket_number,
|
||||||
@@ -714,7 +714,7 @@ Route::get('auto-close-tickets', ['as' => 'auto.close', 'uses' => 'Agent\helpdes
|
|||||||
|=============================================================
|
|=============================================================
|
||||||
*/
|
*/
|
||||||
Route::get('500', ['as' => 'error500', function () {
|
Route::get('500', ['as' => 'error500', function () {
|
||||||
return view('errors.500');
|
return view('errors.500');
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
Breadcrumbs::register('error500', function ($breadcrumbs) {
|
Breadcrumbs::register('error500', function ($breadcrumbs) {
|
||||||
@@ -722,7 +722,7 @@ Breadcrumbs::register('error500', function ($breadcrumbs) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Route::get('404', ['as' => 'error404', function () {
|
Route::get('404', ['as' => 'error404', function () {
|
||||||
return view('errors.404');
|
return view('errors.404');
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
Breadcrumbs::register('error404', function ($breadcrumbs) {
|
Breadcrumbs::register('error404', function ($breadcrumbs) {
|
||||||
@@ -730,7 +730,7 @@ Breadcrumbs::register('error404', function ($breadcrumbs) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Route::get('board-offline', ['as' => 'board.offline', function () {
|
Route::get('board-offline', ['as' => 'board.offline', function () {
|
||||||
return view('errors.offline');
|
return view('errors.offline');
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
Breadcrumbs::register('board.offline', function ($breadcrumbs) {
|
Breadcrumbs::register('board.offline', function ($breadcrumbs) {
|
||||||
|
@@ -21,13 +21,12 @@ class Ticket_Thread extends BaseModel
|
|||||||
$this->attach()->delete();
|
$this->attach()->delete();
|
||||||
parent::delete();
|
parent::delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function setTitleAttribute($value) {
|
// public function setTitleAttribute($value) {
|
||||||
// $this->attributes['title'] = str_replace('"', "'", $value);
|
// $this->attributes['title'] = str_replace('"', "'", $value);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public function getTitleAttribute($value)
|
public function getTitleAttribute($value) {
|
||||||
{
|
return str_replace('"', "'", $value);
|
||||||
return str_replace('"', "'", $value);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -88,7 +88,7 @@ return [
|
|||||||
| will not be safe. Please do this before deploying an application!
|
| will not be safe. Please do this before deploying an application!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'key' => env('APP_KEY'),
|
'key' => env('APP_KEY'),
|
||||||
'cipher' => MCRYPT_RIJNDAEL_128,
|
'cipher' => MCRYPT_RIJNDAEL_128,
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -183,54 +183,54 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'aliases' => [
|
'aliases' => [
|
||||||
'App' => 'Illuminate\Support\Facades\App',
|
'App' => 'Illuminate\Support\Facades\App',
|
||||||
'Artisan' => 'Illuminate\Support\Facades\Artisan',
|
'Artisan' => 'Illuminate\Support\Facades\Artisan',
|
||||||
'Auth' => 'Illuminate\Support\Facades\Auth',
|
'Auth' => 'Illuminate\Support\Facades\Auth',
|
||||||
'Blade' => 'Illuminate\Support\Facades\Blade',
|
'Blade' => 'Illuminate\Support\Facades\Blade',
|
||||||
'Cache' => 'Illuminate\Support\Facades\Cache',
|
'Cache' => 'Illuminate\Support\Facades\Cache',
|
||||||
'Config' => 'Illuminate\Support\Facades\Config',
|
'Config' => 'Illuminate\Support\Facades\Config',
|
||||||
'Cookie' => 'Illuminate\Support\Facades\Cookie',
|
'Cookie' => 'Illuminate\Support\Facades\Cookie',
|
||||||
'Crypt' => 'Illuminate\Support\Facades\Crypt',
|
'Crypt' => 'Illuminate\Support\Facades\Crypt',
|
||||||
'DB' => 'Illuminate\Support\Facades\DB',
|
'DB' => 'Illuminate\Support\Facades\DB',
|
||||||
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
|
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
|
||||||
'Event' => 'Illuminate\Support\Facades\Event',
|
'Event' => 'Illuminate\Support\Facades\Event',
|
||||||
'File' => 'Illuminate\Support\Facades\File',
|
'File' => 'Illuminate\Support\Facades\File',
|
||||||
'Hash' => 'Illuminate\Support\Facades\Hash',
|
'Hash' => 'Illuminate\Support\Facades\Hash',
|
||||||
'Input' => 'Illuminate\Support\Facades\Input',
|
'Input' => 'Illuminate\Support\Facades\Input',
|
||||||
'Inspiring' => 'Illuminate\Foundation\Inspiring',
|
'Inspiring' => 'Illuminate\Foundation\Inspiring',
|
||||||
'Lang' => 'Illuminate\Support\Facades\Lang',
|
'Lang' => 'Illuminate\Support\Facades\Lang',
|
||||||
'Log' => 'Illuminate\Support\Facades\Log',
|
'Log' => 'Illuminate\Support\Facades\Log',
|
||||||
'Mail' => 'Illuminate\Support\Facades\Mail',
|
'Mail' => 'Illuminate\Support\Facades\Mail',
|
||||||
'Password' => 'Illuminate\Support\Facades\Password',
|
'Password' => 'Illuminate\Support\Facades\Password',
|
||||||
'Queue' => 'Illuminate\Support\Facades\Queue',
|
'Queue' => 'Illuminate\Support\Facades\Queue',
|
||||||
'Redirect' => 'Illuminate\Support\Facades\Redirect',
|
'Redirect' => 'Illuminate\Support\Facades\Redirect',
|
||||||
'Redis' => 'Illuminate\Support\Facades\Redis',
|
'Redis' => 'Illuminate\Support\Facades\Redis',
|
||||||
'Request' => 'Illuminate\Support\Facades\Request',
|
'Request' => 'Illuminate\Support\Facades\Request',
|
||||||
'Response' => 'Illuminate\Support\Facades\Response',
|
'Response' => 'Illuminate\Support\Facades\Response',
|
||||||
'Route' => 'Illuminate\Support\Facades\Route',
|
'Route' => 'Illuminate\Support\Facades\Route',
|
||||||
'Schema' => 'Illuminate\Support\Facades\Schema',
|
'Schema' => 'Illuminate\Support\Facades\Schema',
|
||||||
'Session' => 'Illuminate\Support\Facades\Session',
|
'Session' => 'Illuminate\Support\Facades\Session',
|
||||||
'Storage' => 'Illuminate\Support\Facades\Storage',
|
'Storage' => 'Illuminate\Support\Facades\Storage',
|
||||||
'URL' => 'Illuminate\Support\Facades\URL',
|
'URL' => 'Illuminate\Support\Facades\URL',
|
||||||
'Validator' => 'Illuminate\Support\Facades\Validator',
|
'Validator' => 'Illuminate\Support\Facades\Validator',
|
||||||
'View' => 'Illuminate\Support\Facades\View',
|
'View' => 'Illuminate\Support\Facades\View',
|
||||||
'Form' => 'Illuminate\Html\FormFacade',
|
'Form' => 'Illuminate\Html\FormFacade',
|
||||||
'HTML' => 'Illuminate\Html\HtmlFacade',
|
'HTML' => 'Illuminate\Html\HtmlFacade',
|
||||||
'phone' => 'The :attribute field contains an invalid number.',
|
'phone' => 'The :attribute field contains an invalid number.',
|
||||||
'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade',
|
'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade',
|
||||||
'PDF' => 'Vsmoraes\Pdf\PdfFacade',
|
'PDF' => 'Vsmoraes\Pdf\PdfFacade',
|
||||||
'Gravatar' => 'Thomaswelton\LaravelGravatar\Facades\Gravatar',
|
'Gravatar' => 'Thomaswelton\LaravelGravatar\Facades\Gravatar',
|
||||||
'UTC' => 'App\Http\Controllers\Agent\helpdesk\TicketController',
|
'UTC' => 'App\Http\Controllers\Agent\helpdesk\TicketController',
|
||||||
'Ttable' => 'App\Http\Controllers\Agent\helpdesk\TicketController', //to use getTable function.
|
'Ttable' => 'App\Http\Controllers\Agent\helpdesk\TicketController', //to use getTable function.
|
||||||
'SMTPS' => 'App\Http\Controllers\HomeController',
|
'SMTPS' => 'App\Http\Controllers\HomeController',
|
||||||
'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade',
|
'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade',
|
||||||
'Zipper' => 'Chumper\Zipper\Zipper',
|
'Zipper' => 'Chumper\Zipper\Zipper',
|
||||||
'Image' => 'Intervention\Image\Facades\Image',
|
'Image' => 'Intervention\Image\Facades\Image',
|
||||||
'JWTAuth' => 'Tymon\JWTAuth\Facades\JWTAuth',
|
'JWTAuth' => 'Tymon\JWTAuth\Facades\JWTAuth',
|
||||||
'JWTFactory' => 'Tymon\JWTAuth\Facades\JWTFactory',
|
'JWTFactory' => 'Tymon\JWTAuth\Facades\JWTFactory',
|
||||||
'Breadcrumbs' => 'DaveJamesMiller\Breadcrumbs\Facade',
|
'Breadcrumbs' => 'DaveJamesMiller\Breadcrumbs\Facade',
|
||||||
'GeoIP' => 'Torann\GeoIP\GeoIPFacade',
|
'GeoIP' => 'Torann\GeoIP\GeoIPFacade',
|
||||||
],
|
],
|
||||||
'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0XC9mYXZlby1oZWxwZGVzay1naXRodWJcL3B1YmxpY1wvYXBpXC92MVwvYXV0aGVudGljYXRlIiwiaWF0IjoxNDU1NzAyNDEyLCJleHAiOjE0NTU3MDYwMTIsIm5iZiI6MTQ1NTcwMjQxMiwianRpIjoiOTdlODg1ODNjOWQyNDIzNWQ4MzI3Y2ExNzI1NDY1MDQifQ.37E7H2kRCQuz5oBRkQLKhNNpaNXyk4FiEYS9RQ7HZPY',
|
'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0XC9mYXZlby1oZWxwZGVzay1naXRodWJcL3B1YmxpY1wvYXBpXC92MVwvYXV0aGVudGljYXRlIiwiaWF0IjoxNDU1NzAyNDEyLCJleHAiOjE0NTU3MDYwMTIsIm5iZiI6MTQ1NTcwMjQxMiwianRpIjoiOTdlODg1ODNjOWQyNDIzNWQ4MzI3Y2ExNzI1NDY1MDQifQ.37E7H2kRCQuz5oBRkQLKhNNpaNXyk4FiEYS9RQ7HZPY',
|
||||||
'name' => 'faveo helpdesk community',
|
'name' => 'faveo helpdesk community',
|
||||||
];
|
];
|
||||||
|
@@ -1,77 +1,77 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return array(
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| API Key
|
| API Key
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| You can find your API key on your Bugsnag dashboard.
|
| You can find your API key on your Bugsnag dashboard.
|
||||||
|
|
|
|
||||||
| This api key points the Bugsnag notifier to the project in your account
|
| This api key points the Bugsnag notifier to the project in your account
|
||||||
| which should receive your application's uncaught exceptions.
|
| which should receive your application's uncaught exceptions.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'api_key' => '280264db78f78f46e37169b2b65bed2d',
|
'api_key' => '280264db78f78f46e37169b2b65bed2d',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Notify Release Stages
|
| Notify Release Stages
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Set which release stages should send notifications to Bugsnag.
|
| Set which release stages should send notifications to Bugsnag.
|
||||||
|
|
|
|
||||||
| Example: array('development', 'production')
|
| Example: array('development', 'production')
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'notify_release_stages' => env('BUGSNAG_NOTIFY_RELEASE_STAGES', null),
|
'notify_release_stages' => env('BUGSNAG_NOTIFY_RELEASE_STAGES', null),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Endpoint
|
| Endpoint
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Set what server the Bugsnag notifier should send errors to. By default
|
| Set what server the Bugsnag notifier should send errors to. By default
|
||||||
| this is set to 'https://notify.bugsnag.com', but for Bugsnag Enterprise
|
| this is set to 'https://notify.bugsnag.com', but for Bugsnag Enterprise
|
||||||
| this should be the URL to your Bugsnag instance.
|
| this should be the URL to your Bugsnag instance.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'endpoint' => 'https://notify.bugsnag.com',
|
'endpoint' => 'https://notify.bugsnag.com',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Filters
|
| Filters
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Use this if you want to ensure you don't send sensitive data such as
|
| Use this if you want to ensure you don't send sensitive data such as
|
||||||
| passwords, and credit card numbers to our servers. Any keys which
|
| passwords, and credit card numbers to our servers. Any keys which
|
||||||
| contain these strings will be filtered.
|
| contain these strings will be filtered.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'filters' => env('BUGSNAG_FILTERS', ['password']),
|
'filters' => env('BUGSNAG_FILTERS', array('password')),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Proxy
|
| Proxy
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| If your server is behind a proxy server, you can configure this as well.
|
| If your server is behind a proxy server, you can configure this as well.
|
||||||
| Other than the host, none of these settings are mandatory.
|
| Other than the host, none of these settings are mandatory.
|
||||||
|
|
|
|
||||||
| Note: Proxy configuration is only possible if the PHP cURL extension
|
| Note: Proxy configuration is only possible if the PHP cURL extension
|
||||||
| is installed.
|
| is installed.
|
||||||
|
|
|
|
||||||
| Example:
|
| Example:
|
||||||
|
|
|
|
||||||
| 'proxy' => array(
|
| 'proxy' => array(
|
||||||
| 'host' => 'bugsnag.com',
|
| 'host' => 'bugsnag.com',
|
||||||
| 'port' => 42,
|
| 'port' => 42,
|
||||||
| 'user' => 'username',
|
| 'user' => 'username',
|
||||||
| 'password' => 'password123'
|
| 'password' => 'password123'
|
||||||
| )
|
| )
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'proxy' => env('BUGSNAG_PROXY', null),
|
'proxy' => env('BUGSNAG_PROXY', null)
|
||||||
|
|
||||||
];
|
);
|
||||||
|
@@ -16,6 +16,8 @@ return [
|
|||||||
'files' => [
|
'files' => [
|
||||||
|
|
||||||
realpath(__DIR__.'/../app/Providers/AppServiceProvider.php'),
|
realpath(__DIR__.'/../app/Providers/AppServiceProvider.php'),
|
||||||
|
realpath(__DIR__.'/../app/Providers/BusServiceProvider.php'),
|
||||||
|
realpath(__DIR__.'/../app/Providers/ConfigServiceProvider.php'),
|
||||||
realpath(__DIR__.'/../app/Providers/EventServiceProvider.php'),
|
realpath(__DIR__.'/../app/Providers/EventServiceProvider.php'),
|
||||||
realpath(__DIR__.'/../app/Providers/RouteServiceProvider.php'),
|
realpath(__DIR__.'/../app/Providers/RouteServiceProvider.php'),
|
||||||
],
|
],
|
||||||
|
@@ -101,7 +101,7 @@ return [
|
|||||||
| installed or not.
|
| installed or not.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'install' => '%0%',
|
'install' => '1',
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Redis Databases
|
| Redis Databases
|
||||||
|
@@ -10,9 +10,7 @@ use App\Model\helpdesk\Email\Smtp;
|
|||||||
use App\Model\helpdesk\Manage\Help_topic;
|
use App\Model\helpdesk\Manage\Help_topic;
|
||||||
use App\Model\helpdesk\Manage\Sla_plan;
|
use App\Model\helpdesk\Manage\Sla_plan;
|
||||||
use App\Model\helpdesk\Notification\NotificationType;
|
use App\Model\helpdesk\Notification\NotificationType;
|
||||||
use App\Model\helpdesk\Ratings\Rating;
|
|
||||||
use App\Model\helpdesk\Settings\Alert;
|
use App\Model\helpdesk\Settings\Alert;
|
||||||
use App\Model\helpdesk\Settings\CommonSettings;
|
|
||||||
use App\Model\helpdesk\Settings\Company;
|
use App\Model\helpdesk\Settings\Company;
|
||||||
use App\Model\helpdesk\Settings\Email;
|
use App\Model\helpdesk\Settings\Email;
|
||||||
use App\Model\helpdesk\Settings\Responder;
|
use App\Model\helpdesk\Settings\Responder;
|
||||||
@@ -33,6 +31,8 @@ use App\Model\helpdesk\Utility\Time_format;
|
|||||||
use App\Model\helpdesk\Utility\Timezones;
|
use App\Model\helpdesk\Utility\Timezones;
|
||||||
use App\Model\helpdesk\Utility\Version_Check;
|
use App\Model\helpdesk\Utility\Version_Check;
|
||||||
use App\Model\helpdesk\Workflow\WorkflowClose;
|
use App\Model\helpdesk\Workflow\WorkflowClose;
|
||||||
|
use App\Model\helpdesk\Settings\CommonSettings;
|
||||||
|
use App\Model\helpdesk\Ratings\Rating;
|
||||||
use App\Model\kb\Settings;
|
use App\Model\kb\Settings;
|
||||||
// Knowledge base
|
// Knowledge base
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
@@ -2007,17 +2007,17 @@ class DatabaseSeeder extends Seeder
|
|||||||
Template::create(['id' => '10', 'name' => 'ticket-reply', 'type' => '10', 'message' => '<span><div><span><p>{!!$content!!} <br></p><p>{!!$agent_sign!!} </p><p>Ticket Details</p><p>Ticket ID: {!!$ticket_number!!} </p><div><br></div></span><br></div><div><br></div></span>', 'set_id' => '1']);
|
Template::create(['id' => '10', 'name' => 'ticket-reply', 'type' => '10', 'message' => '<span><div><span><p>{!!$content!!} <br></p><p>{!!$agent_sign!!} </p><p>Ticket Details</p><p>Ticket ID: {!!$ticket_number!!} </p><div><br></div></span><br></div><div><br></div></span>', 'set_id' => '1']);
|
||||||
Template::create(['id' => '11', 'name' => 'ticket-reply-agent', 'type' => '11', 'message' => '<div>Hello {!!$ticket_agent_name!!},<b><br></b>A reply been made to ticket {!!$ticket_number!!}<b><br></b>From<br>Name: {!!$ticket_client_name!!}<br>E-mail: {!!$ticket_client_email!!}<b><br></b>{!!$content!!}<b><br></b>Kind Regards,<br>{!!$system_from!!}</div>', 'set_id' => '1']);
|
Template::create(['id' => '11', 'name' => 'ticket-reply-agent', 'type' => '11', 'message' => '<div>Hello {!!$ticket_agent_name!!},<b><br></b>A reply been made to ticket {!!$ticket_number!!}<b><br></b>From<br>Name: {!!$ticket_client_name!!}<br>E-mail: {!!$ticket_client_email!!}<b><br></b>{!!$content!!}<b><br></b>Kind Regards,<br>{!!$system_from!!}</div>', 'set_id' => '1']);
|
||||||
Template::create(['id' => '12', 'name' => 'registration', 'type' => '12', 'message' => '<span><p>Hello {!!$user!!} , </p><p>This email is confirmation that you are now registered at our helpdesk.</p><p>Registered Email: {!!$email_address!!}</p><p>Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p>{!!$system_from!!} </p></span>', 'set_id' => '1']);
|
Template::create(['id' => '12', 'name' => 'registration', 'type' => '12', 'message' => '<span><p>Hello {!!$user!!} , </p><p>This email is confirmation that you are now registered at our helpdesk.</p><p>Registered Email: {!!$email_address!!}</p><p>Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p>{!!$system_from!!} </p></span>', 'set_id' => '1']);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* All the common settings will be listed here
|
* All the common settings will be listed here
|
||||||
*/
|
*/
|
||||||
CommonSettings::create(['id' => '1', 'option_name' => 'ticket_token_time_duration', 'option_value' => '1']);
|
CommonSettings::create(['id' => '1', 'option_name' => 'ticket_token_time_duration', 'option_value' => '1']);
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Ratings
|
* Ratings
|
||||||
*/
|
*/
|
||||||
Rating::create(['id' => '1', 'name' => 'OverAll Satisfaction', 'display_order' => '1', 'allow_modification' => '1', 'rating_scale' => '5', 'rating_area' => 'Helpdesk Area']);
|
Rating::create(['id'=>'1','name'=>'OverAll Satisfaction','display_order'=>'1','allow_modification' => '1', 'rating_scale'=>'5','rating_area'=>'Helpdesk Area']);
|
||||||
Rating::create(['id' => '2', 'name' => 'Reply Rating', 'display_order' => '1', 'allow_modification' => '1', 'rating_scale' => '5', 'rating_area' => 'Comment Area']);
|
Rating::create(['id'=>'2','name'=>'Reply Rating','display_order'=>'1','allow_modification' => '1', 'rating_scale'=>'5','rating_area'=>'Comment Area']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,92 @@
|
|||||||
|
|=======================================================
|
||||||
|
| v1.0.7.5
|
||||||
|
|=======================================================
|
||||||
|
|
||||||
|
Enhancement
|
||||||
|
|
||||||
|
Changed email template from file system to database
|
||||||
|
Advanced Rating module
|
||||||
|
In App Notification Module is now per User
|
||||||
|
In App notification settings in admin panel
|
||||||
|
POP feature is added for fetching emails
|
||||||
|
Send mail from server using PHP mail feature is added for sending emails
|
||||||
|
Added more encryption options for sending emails
|
||||||
|
Removed Duplicate settings from system settings
|
||||||
|
One can do more advanced email diagnostics by choosing different emails
|
||||||
|
System Off line module Enhanced
|
||||||
|
Everything comes from language files now
|
||||||
|
Auto Close ticket workflow for closing a ticket in predefined days
|
||||||
|
Security settings added for secured login into the system
|
||||||
|
Error Debugging option added
|
||||||
|
Bugsnag integration added
|
||||||
|
Webhooks added for ticket creation
|
||||||
|
Added 3 new languages thanks to some of our clients (German, Russian, Italian)
|
||||||
|
Graph added to user profile
|
||||||
|
Remove organisation added in Client profile page
|
||||||
|
Graph and ticket list added Organisation page
|
||||||
|
GeoIp plugin added for Phone country code pickup
|
||||||
|
Faveo will be able to auto upgrade to new release from this version onwards
|
||||||
|
XSS Vulnerability check added
|
||||||
|
Upgrade from Laravel 5.0 to 5.2
|
||||||
|
Breadcrumbs
|
||||||
|
Auto update module
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
|
||||||
|
Registration Module email issue
|
||||||
|
Pages in knowledge base had some issue
|
||||||
|
Complete UI improved and proper error messages are now displayed
|
||||||
|
Bug fixed in edit system workflow
|
||||||
|
Dashboard Graph smoothened
|
||||||
|
Check ticket details without logging
|
||||||
|
Install module – check for file permission issue
|
||||||
|
Added dummy data for dummy installation
|
||||||
|
|
||||||
|
|------------------------------------------
|
||||||
|
|Updating from 1.0.7.4 to 1.0.7.5
|
||||||
|
|------------------------------------------
|
||||||
|
|
||||||
|
To upgrade read instructions here http://ladybirdweb.com/support/show/v1075
|
||||||
|
|
||||||
|
|=======================================================
|
||||||
|
| v1.0.7.4
|
||||||
|
|=======================================================
|
||||||
|
|
||||||
|
Enhancement
|
||||||
|
|
||||||
|
Added STARTTLS encryption feature on email fetching settings
|
||||||
|
|
||||||
|
|=======================================================
|
||||||
|
| v1.0.7.3
|
||||||
|
|=======================================================
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
|
||||||
|
Email settings update issue
|
||||||
|
|
||||||
|
|=======================================================
|
||||||
|
| v1.0.7.2
|
||||||
|
|=======================================================
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
|
||||||
|
System failing if no system email is configured issue fixed
|
||||||
|
|
||||||
|
Enhancement
|
||||||
|
|
||||||
|
Plugin Module updated for Pro Version
|
||||||
|
|
||||||
|
|=======================================================
|
||||||
|
| v1.0.7.1
|
||||||
|
|=======================================================
|
||||||
|
|
||||||
|
Bug Fixed
|
||||||
|
|
||||||
|
In app notification bug fixed
|
||||||
|
Ticket Listing hover issue fixed
|
||||||
|
Agent panel issue fixed for role agents
|
||||||
|
Template issue fixed
|
||||||
|
|
||||||
|=======================================================
|
|=======================================================
|
||||||
| v1.0.7
|
| v1.0.7
|
||||||
|=======================================================
|
|=======================================================
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@@ -840,44 +840,44 @@ return [
|
|||||||
| Error Pages
|
| Error Pages
|
||||||
|------------------------------------------------
|
|------------------------------------------------
|
||||||
*/
|
*/
|
||||||
'not_found' => 'Not Found',
|
'not_found' => 'Not Found',
|
||||||
'oops_page_not_found' => 'Oops! Page not found',
|
'oops_page_not_found' => 'Oops! Page not found',
|
||||||
'we_could_not_find_the_page_you_were_looking_for' => 'We could not find the page you were looking for',
|
'we_could_not_find_the_page_you_were_looking_for' => 'We could not find the page you were looking for',
|
||||||
'internal_server_error' => 'Internal server Error',
|
'internal_server_error' => 'Internal server Error',
|
||||||
'be_right_back' => 'Be right back',
|
'be_right_back' => 'Be right back',
|
||||||
'sorry' => 'Sorry',
|
'sorry' => 'Sorry',
|
||||||
'we_are_working_on_it' => 'We are working on it',
|
'we_are_working_on_it' => 'We are working on it',
|
||||||
'category' => 'Category',
|
'category' => 'Category',
|
||||||
'addcategory' => 'Add Category',
|
'addcategory' => 'Add Category',
|
||||||
'allcategory' => 'All Category',
|
'allcategory' => 'All Category',
|
||||||
'article' => 'Article',
|
'article' => 'Article',
|
||||||
'articles' => 'Articles',
|
'articles' => 'Articles',
|
||||||
'addarticle' => 'Add Article',
|
'addarticle' => 'Add Article',
|
||||||
'allarticle' => 'All Article',
|
'allarticle' => 'All Article',
|
||||||
'pages' => 'Pages',
|
'pages' => 'Pages',
|
||||||
'addpages' => 'Add Pages',
|
'addpages' => 'Add Pages',
|
||||||
'allpages' => 'All Pages',
|
'allpages' => 'All Pages',
|
||||||
'widgets' => 'Widgets',
|
'widgets' => 'Widgets',
|
||||||
'footer1' => 'Footer 1',
|
'footer1' => 'Footer 1',
|
||||||
'footer2' => 'Footer 2',
|
'footer2' => 'Footer 2',
|
||||||
'footer3' => 'Footer 3',
|
'footer3' => 'Footer 3',
|
||||||
'footer4' => 'Footer 4',
|
'footer4' => 'Footer 4',
|
||||||
'sidewidget1' => 'Side Widget 1',
|
'sidewidget1' => 'Side Widget 1',
|
||||||
'sidewidget2' => 'Side Widget 2',
|
'sidewidget2' => 'Side Widget 2',
|
||||||
'comments' => 'Comments',
|
'comments' => 'Comments',
|
||||||
'settings' => 'Settings',
|
'settings' => 'Settings',
|
||||||
'parent' => 'Parent',
|
'parent' => 'Parent',
|
||||||
'Beschreibung' => 'Beschreibung',
|
'Beschreibung' => 'Beschreibung',
|
||||||
'enter_the_description' => 'Enter the Description',
|
'enter_the_description' => 'Enter the Description',
|
||||||
'publish' => 'Publish',
|
'publish' => 'Publish',
|
||||||
'published' => 'Published',
|
'published' => 'Published',
|
||||||
'draft' => 'Draft',
|
'draft' => 'Draft',
|
||||||
'create_a_category' => 'Create a Category',
|
'create_a_category' => 'Create a Category',
|
||||||
'add' => 'Add',
|
'add' => 'Add',
|
||||||
'social' => 'Social',
|
'social' => 'Social',
|
||||||
'comment' => 'Comment',
|
'comment' => 'Comment',
|
||||||
'not_published' => 'Not Published',
|
'not_published' => 'Not Published',
|
||||||
'numberofelementstodisplay' => 'Number of elements to display',
|
'numberofelementstodisplay' => 'Number of elements to display',
|
||||||
//======================================
|
//======================================
|
||||||
'language' => 'Language',
|
'language' => 'Language',
|
||||||
'save' => 'Save',
|
'save' => 'Save',
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'password' => 'Passwörter müssen mindestens sechs Zeichen lang sein und der Bestätigung entsprechen.',
|
'password' => 'Passwörter müssen mindestens sechs Zeichen lang sein und der Bestätigung entsprechen.',
|
||||||
'user' => 'Wir können keinen Benutzer mit dieser E-Mail-Adresse finden.',
|
'user' => "Wir können keinen Benutzer mit dieser E-Mail-Adresse finden.",
|
||||||
'token' => 'Dieser Passwort-Reset-Token ist ungültig.',
|
'token' => 'Dieser Passwort-Reset-Token ist ungültig.',
|
||||||
'sent' => 'Wir haben dir einen Passwort-Reset-Link per E-Mail zukommen lassen!',
|
'sent' => 'Wir haben dir einen Passwort-Reset-Link per E-Mail zukommen lassen!',
|
||||||
'reset' => 'Dein Passwort wurde zurückgesetzt!',
|
'reset' => 'Dein Passwort wurde zurückgesetzt!',
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
@@ -105,42 +105,42 @@ return [
|
|||||||
| Emails Create Page
|
| Emails Create Page
|
||||||
|--------------------------------------
|
|--------------------------------------
|
||||||
*/
|
*/
|
||||||
'emails' => 'Emails',
|
'emails' => 'Emails',
|
||||||
'incoming_emails' => 'Incoming Emails',
|
'incoming_emails' => 'Incoming Emails',
|
||||||
'reuired_authentication' => 'Reuired Authentication',
|
'reuired_authentication' => 'Reuired Authentication',
|
||||||
'fetching_email_via_imap' => 'Fetching Email via IMAP',
|
'fetching_email_via_imap' => 'Fetching Email via IMAP',
|
||||||
'create_email' => 'Create Email',
|
'create_email' => 'Create Email',
|
||||||
'email_address' => 'Email Address',
|
'email_address' => 'Email Address',
|
||||||
'email_name' => 'Email Name',
|
'email_name' => 'Email Name',
|
||||||
'help_topic' => 'Help Topic',
|
'help_topic' => 'Help Topic',
|
||||||
'auto_response' => 'Auto Response',
|
'auto_response' => 'Auto Response',
|
||||||
'host_name' => 'Host Name',
|
'host_name' => 'Host Name',
|
||||||
'port_number' => 'Port Number',
|
'port_number' => 'Port Number',
|
||||||
'mail_box_protocol' => 'Mail Box Protocol',
|
'mail_box_protocol' => 'Mail Box Protocol',
|
||||||
'authentication_required' => 'Authentication Required',
|
'authentication_required' => 'Authentication Required',
|
||||||
'yes' => 'Yes',
|
'yes' => 'Yes',
|
||||||
'no' => 'No',
|
'no' => 'No',
|
||||||
'header_spoofing' => 'Header Spoofing',
|
'header_spoofing' => 'Header Spoofing',
|
||||||
'allow_for_this_email' => 'Allow For This Email',
|
'allow_for_this_email' => 'Allow For This Email',
|
||||||
'imap_config' => 'IMAP Configuration',
|
'imap_config' => 'IMAP Configuration',
|
||||||
'email_information_and_settings' => 'Email Information and Settings',
|
'email_information_and_settings' => 'Email Information and Settings',
|
||||||
'incoming_email_information' => 'Incoming Email Information',
|
'incoming_email_information' => 'Incoming Email Information',
|
||||||
'outgoing_email_information' => 'Outgoing Email Information',
|
'outgoing_email_information' => 'Outgoing Email Information',
|
||||||
'new_ticket_settings' => 'New Ticket Settings',
|
'new_ticket_settings' => 'New Ticket Settings',
|
||||||
'protocol' => 'Protocol',
|
'protocol' => 'Protocol',
|
||||||
'fetching_protocol' => 'Fetching Protocol',
|
'fetching_protocol' => 'Fetching Protocol',
|
||||||
'transfer_protocol' => 'Transfer Protocol',
|
'transfer_protocol' => 'Transfer Protocol',
|
||||||
'from_name' => 'From Name',
|
'from_name' => 'From Name',
|
||||||
'add_an_email' => 'Add an Email',
|
'add_an_email' => 'Add an Email',
|
||||||
'edit_an_email' => 'Edit an Email',
|
'edit_an_email' => 'Edit an Email',
|
||||||
'disable_for_this_email_address' => 'Disable for this Email address',
|
'disable_for_this_email_address' => 'Disable for this Email address',
|
||||||
'validate_certificates_from_tls_or_ssl_server' => 'Validate Certificates from TLS/SSL server',
|
'validate_certificates_from_tls_or_ssl_server' => 'Validate Certificates from TLS/SSL server',
|
||||||
'authentication' => 'Authentication',
|
'authentication' => 'Authentication',
|
||||||
'incoming_email_connection_failed_please_check_email_credentials_or_imap_settings' => 'Incoming email connection failed! Please check email credentials or Imap Settings',
|
'incoming_email_connection_failed_please_check_email_credentials_or_imap_settings' => 'Incoming email connection failed! Please check email credentials or Imap Settings',
|
||||||
'outgoing_email_connection_failed' => 'Outgoing email connection failed',
|
'outgoing_email_connection_failed' => 'Outgoing email connection failed',
|
||||||
'you_cannot_delete_system_default_email' => 'You cannot delete system default Email',
|
'you_cannot_delete_system_default_email' => 'You cannot delete system default Email',
|
||||||
'email_deleted_sucessfully' => 'Email Deleted sucessfully',
|
'email_deleted_sucessfully' => 'Email Deleted sucessfully',
|
||||||
'email_can_not_delete' => 'Email can not Delete',
|
'email_can_not_delete' => 'Email can not Delete',
|
||||||
/*
|
/*
|
||||||
|--------------------------------------
|
|--------------------------------------
|
||||||
| Ban Emails Create Page
|
| Ban Emails Create Page
|
||||||
@@ -894,6 +894,11 @@ return [
|
|||||||
'for_some_reason_your_reply_was_not_posted_please_try_again_later' => 'For some reason your reply was not posted. Please try again later',
|
'for_some_reason_your_reply_was_not_posted_please_try_again_later' => 'For some reason your reply was not posted. Please try again later',
|
||||||
'you_have_unassigned_your_ticket' => 'You have Unassigned your ticket',
|
'you_have_unassigned_your_ticket' => 'You have Unassigned your ticket',
|
||||||
'for_some_reason_your_request_failed' => 'For some reason your request failed',
|
'for_some_reason_your_request_failed' => 'For some reason your request failed',
|
||||||
|
'trash-delete-ticket' => 'Delete tickets permanently',
|
||||||
|
'trash-delete-title-msg' => 'Click here to delete tickets permanently.',
|
||||||
|
'moved_to_trash' => 'Moved selected tickets to trash.',
|
||||||
|
'tickets_have_been_closed' => 'Selected tickets have been closed.',
|
||||||
|
'tickets_have_been_opened' => 'Selected tickets have been opened.',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'password' => 'Le Passwords devono essere almeno di sei caratteri e combaciare.',
|
'password' => 'Le Passwords devono essere almeno di sei caratteri e combaciare.',
|
||||||
'user' => 'Non esiste un utente con questo indirizzo e-mail.',
|
'user' => "Non esiste un utente con questo indirizzo e-mail.",
|
||||||
'token' => 'Il token per il reset della password non è valido.',
|
'token' => 'Il token per il reset della password non è valido.',
|
||||||
'sent' => 'Una email con il link al reset della passowrd ti è stato inviato!',
|
'sent' => 'Una email con il link al reset della passowrd ti è stato inviato!',
|
||||||
'reset' => 'La tua password è stata resettata!',
|
'reset' => 'La tua password è stata resettata!',
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Pagination Language Lines
|
| Pagination Language Lines
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The following language lines are used by the paginator library to build
|
| The following language lines are used by the paginator library to build
|
||||||
| the simple pagination links. You are free to change them to anything
|
| the simple pagination links. You are free to change them to anything
|
||||||
| you want to customize your views to better match your application.
|
| you want to customize your views to better match your application.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'previous' => '« Предыдущая',
|
'previous' => '« Предыдущая',
|
||||||
'next' => 'Следующий »',
|
'next' => 'Следующий »',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Password Reminder Language Lines
|
| Password Reminder Language Lines
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The following language lines are the default lines which match reasons
|
| The following language lines are the default lines which match reasons
|
||||||
| that are given by the password broker for a password update attempt
|
| that are given by the password broker for a password update attempt
|
||||||
| has failed, such as for an invalid token or invalid new password.
|
| has failed, such as for an invalid token or invalid new password.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'password' => 'Пароль должен содержать не менее шести символов и соответствовать подтверждения.',
|
"password" => "Пароль должен содержать не менее шести символов и соответствовать подтверждения.",
|
||||||
'user' => 'Мы не можем найти пользователя с данным адресом электронной почты.',
|
"user" => "Мы не можем найти пользователя с данным адресом электронной почты.",
|
||||||
'token' => 'Этот пароль сбросить маркер недействителен.',
|
"token" => "Этот пароль сбросить маркер недействителен.",
|
||||||
'sent' => 'Мы по электронной почте Ваш пароль сбросить ссылку!',
|
"sent" => "Мы по электронной почте Ваш пароль сбросить ссылку!",
|
||||||
'reset' => 'Ваш пароль был сброшен!',
|
"reset" => "Ваш пароль был сброшен!",
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@@ -2,25 +2,25 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Pagination Language Lines
|
| Pagination Language Lines
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The following language lines are used by the paginator library to build
|
| The following language lines are used by the paginator library to build
|
||||||
| the simple pagination links. You are free to change them to anything
|
| the simple pagination links. You are free to change them to anything
|
||||||
| you want to customize your views to better match your application.
|
| you want to customize your views to better match your application.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'filename' => 'ISO CODE',
|
'filename' => 'ISO CODE',
|
||||||
'language' => 'Язык',
|
'language' => 'Язык',
|
||||||
'Action' => 'Действие',
|
'Action' => 'Действие',
|
||||||
'status' => 'stature',
|
'status' => 'stature',
|
||||||
'not-active' => 'Не Активный',
|
'not-active'=> 'Не Активный',
|
||||||
'active' => 'Активный',
|
'active' => 'Активный',
|
||||||
'hello' => 'Привет',
|
'hello' => 'Привет',
|
||||||
'enable' => 'Включен',
|
'enable' => 'Включен',
|
||||||
'disable' => 'Выключен',
|
'disable' => 'Выключен',
|
||||||
|
|
||||||
];
|
];
|
@@ -2,106 +2,106 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Validation Language Lines
|
| Validation Language Lines
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The following language lines contain the default error messages used by
|
| The following language lines contain the default error messages used by
|
||||||
| the validator class. Some of these rules have multiple versions such
|
| the validator class. Some of these rules have multiple versions such
|
||||||
| as the size rules. Feel free to tweak each of these messages here.
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'accepted' => 'The :attribute must be accepted.',
|
"accepted" => "The :attribute must be accepted.",
|
||||||
'active_url' => 'The :attribute is not a valid URL.',
|
"active_url" => "The :attribute is not a valid URL.",
|
||||||
'after' => 'The :attribute must be a date after :date.',
|
"after" => "The :attribute must be a date after :date.",
|
||||||
'alpha' => 'The :attribute may only contain letters.',
|
"alpha" => "The :attribute may only contain letters.",
|
||||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
|
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
|
||||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
"alpha_num" => "The :attribute may only contain letters and numbers.",
|
||||||
'array' => 'The :attribute must be an array.',
|
"array" => "The :attribute must be an array.",
|
||||||
'before' => 'The :attribute must be a date before :date.',
|
"before" => "The :attribute must be a date before :date.",
|
||||||
'between' => [
|
"between" => [
|
||||||
'numeric' => 'The :attribute must be between :min and :max.',
|
"numeric" => "The :attribute must be between :min and :max.",
|
||||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
"file" => "The :attribute must be between :min and :max kilobytes.",
|
||||||
'string' => 'The :attribute must be between :min and :max characters.',
|
"string" => "The :attribute must be between :min and :max characters.",
|
||||||
'array' => 'The :attribute must have between :min and :max items.',
|
"array" => "The :attribute must have between :min and :max items.",
|
||||||
],
|
],
|
||||||
'boolean' => 'The :attribute field must be true or false.',
|
"boolean" => "The :attribute field must be true or false.",
|
||||||
'confirmed' => 'The :attribute confirmation does not match.',
|
"confirmed" => "The :attribute confirmation does not match.",
|
||||||
'date' => 'The :attribute is not a valid date.',
|
"date" => "The :attribute is not a valid date.",
|
||||||
'date_format' => 'The :attribute does not match the format :format.',
|
"date_format" => "The :attribute does not match the format :format.",
|
||||||
'different' => 'The :attribute and :other must be different.',
|
"different" => "The :attribute and :other must be different.",
|
||||||
'digits' => 'The :attribute must be :digits digits.',
|
"digits" => "The :attribute must be :digits digits.",
|
||||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
"digits_between" => "The :attribute must be between :min and :max digits.",
|
||||||
'email' => 'The :attribute must be a valid email address.',
|
"email" => "The :attribute must be a valid email address.",
|
||||||
'filled' => 'The :attribute field is required.',
|
"filled" => "The :attribute field is required.",
|
||||||
'exists' => 'The selected :attribute is invalid.',
|
"exists" => "The selected :attribute is invalid.",
|
||||||
'image' => 'The :attribute must be an image.',
|
"image" => "The :attribute must be an image.",
|
||||||
'in' => 'The selected :attribute is invalid.',
|
"in" => "The selected :attribute is invalid.",
|
||||||
'integer' => 'The :attribute must be an integer.',
|
"integer" => "The :attribute must be an integer.",
|
||||||
'ip' => 'The :attribute must be a valid IP address.',
|
"ip" => "The :attribute must be a valid IP address.",
|
||||||
'max' => [
|
"max" => [
|
||||||
'numeric' => 'The :attribute may not be greater than :max.',
|
"numeric" => "The :attribute may not be greater than :max.",
|
||||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
"file" => "The :attribute may not be greater than :max kilobytes.",
|
||||||
'string' => 'The :attribute may not be greater than :max characters.',
|
"string" => "The :attribute may not be greater than :max characters.",
|
||||||
'array' => 'The :attribute may not have more than :max items.',
|
"array" => "The :attribute may not have more than :max items.",
|
||||||
],
|
],
|
||||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
"mimes" => "The :attribute must be a file of type: :values.",
|
||||||
'min' => [
|
"min" => [
|
||||||
'numeric' => 'The :attribute must be at least :min.',
|
"numeric" => "The :attribute must be at least :min.",
|
||||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
"file" => "The :attribute must be at least :min kilobytes.",
|
||||||
'string' => 'The :attribute must be at least :min characters.',
|
"string" => "The :attribute must be at least :min characters.",
|
||||||
'array' => 'The :attribute must have at least :min items.',
|
"array" => "The :attribute must have at least :min items.",
|
||||||
],
|
],
|
||||||
'not_in' => 'The selected :attribute is invalid.',
|
"not_in" => "The selected :attribute is invalid.",
|
||||||
'numeric' => 'The :attribute must be a number.',
|
"numeric" => "The :attribute must be a number.",
|
||||||
'regex' => 'The :attribute format is invalid.',
|
"regex" => "The :attribute format is invalid.",
|
||||||
'required' => 'The :attribute field is required.',
|
"required" => "The :attribute field is required.",
|
||||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
"required_if" => "The :attribute field is required when :other is :value.",
|
||||||
'required_with' => 'The :attribute field is required when :values is present.',
|
"required_with" => "The :attribute field is required when :values is present.",
|
||||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
"required_with_all" => "The :attribute field is required when :values is present.",
|
||||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
"required_without" => "The :attribute field is required when :values is not present.",
|
||||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
"required_without_all" => "The :attribute field is required when none of :values are present.",
|
||||||
'same' => 'The :attribute and :other must match.',
|
"same" => "The :attribute and :other must match.",
|
||||||
'size' => [
|
"size" => [
|
||||||
'numeric' => 'The :attribute must be :size.',
|
"numeric" => "The :attribute must be :size.",
|
||||||
'file' => 'The :attribute must be :size kilobytes.',
|
"file" => "The :attribute must be :size kilobytes.",
|
||||||
'string' => 'The :attribute must be :size characters.',
|
"string" => "The :attribute must be :size characters.",
|
||||||
'array' => 'The :attribute must contain :size items.',
|
"array" => "The :attribute must contain :size items.",
|
||||||
],
|
],
|
||||||
'unique' => 'The :attribute has already been taken.',
|
"unique" => "The :attribute has already been taken.",
|
||||||
'url' => 'The :attribute format is invalid.',
|
"url" => "The :attribute format is invalid.",
|
||||||
'timezone' => 'The :attribute must be a valid zone.',
|
"timezone" => "The :attribute must be a valid zone.",
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Custom Validation Language Lines
|
| Custom Validation Language Lines
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may specify custom validation messages for attributes using the
|
| Here you may specify custom validation messages for attributes using the
|
||||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
| specify a specific custom language line for a given attribute rule.
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'custom' => [
|
'custom' => [
|
||||||
'attribute-name' => [
|
'attribute-name' => [
|
||||||
'rule-name' => 'custom-message',
|
'rule-name' => 'custom-message',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Custom Validation Attributes
|
| Custom Validation Attributes
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The following language lines are used to swap attribute place-holders
|
| The following language lines are used to swap attribute place-holders
|
||||||
| with something more reader friendly such as E-Mail Address instead
|
| with something more reader friendly such as E-Mail Address instead
|
||||||
| of "email". This simply helps us make messages a little cleaner.
|
| of "email". This simply helps us make messages a little cleaner.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'attributes' => [],
|
'attributes' => [],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@@ -18,7 +18,7 @@ class="active"
|
|||||||
@endif
|
@endif
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
Click to check Update
|
Click to check Update
|
||||||
<a href="{!! URL::route('version-check') !!}" class="btn btn-primary">Check</a>
|
<a href="{!! URL::route('version-check') !!}" class="btn btn-primary">Check</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user