
CREATE TABLE IF NOT EXISTS `appsetting` (
  `settingsid` int(11) NOT NULL AUTO_INCREMENT,
  `searchmode` varchar(10) NOT NULL,
  `mapposition` varchar(10) NOT NULL,
  `category` tinyint(1) NOT NULL DEFAULT '0',
  `markersize` varchar(25) DEFAULT NULL,
  `logosize` varchar(25) DEFAULT NULL,
  `charset_id` int(11) DEFAULT NULL,
  `charset_value` varchar(25) DEFAULT NULL,
  `load_location` tinyint NOT NULL DEFAULT '0',
  `logo_visible` tinyint NOT NULL DEFAULT '1',
  `preferred_country` VARCHAR(100) NULL DEFAULT NULL,
  `enable_single_country` TINYINT(4) NOT NULL DEFAULT '0',
  `locator_css` TEXT NULL,
  PRIMARY KEY (`settingsid`)
) AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT IGNORE INTO `appsetting` (`settingsid`, `searchmode`, `mapposition`, `category`, `markersize`, `logosize`, `charset_id`, `charset_value`, `load_location`, `logo_visible`, `preferred_country`, `enable_single_country`) VALUES
	(1, 'SM', 'MR', 1, '[32,32]', '[64,64]', 12, 'iso-8859-1', 0, 1, '', 0);

CREATE TABLE IF NOT EXISTS `countries` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `country` varchar(100) DEFAULT NULL,
  `lat` float(10,6) NOT NULL,
  `lng` float(10,6) NOT NULL,
  PRIMARY KEY (`id`)
)   DEFAULT CHARSET=utf8 AUTO_INCREMENT=276 ;

INSERT IGNORE INTO `countries` (`id`, `country`, `lat`, `lng`) VALUES
(1, 'Afghanistan', 0.000000, 0.000000),
(2, 'Albania', 0.000000, 0.000000),
(3, 'Algeria', 0.000000, 0.000000),
(4, 'American Samoa', 0.000000, 0.000000),
(5, 'Andorra', 0.000000, 0.000000),
(6, 'Angola', 0.000000, 0.000000),
(7, 'Anguilla', 0.000000, 0.000000),
(8, 'Antarctica', 0.000000, 0.000000),
(9, 'Antigua and Barbuda', 0.000000, 0.000000),
(10, 'Argentina', 0.000000, 0.000000),
(11, 'Armenia', 0.000000, 0.000000),
(12, 'Aruba', 0.000000, 0.000000),
(13, 'Ashmore and Cartier', 0.000000, 0.000000),
(14, 'Australia', 0.000000, 0.000000),
(15, 'Austria', 0.000000, 0.000000),
(16, 'Azerbaijan', 0.000000, 0.000000),
(17, 'Bahrain', 0.000000, 0.000000),
(18, 'Baker Island', 0.000000, 0.000000),
(19, 'Bangladesh', 0.000000, 0.000000),
(20, 'Barbados', 0.000000, 0.000000),
(21, 'Bassas da India', 0.000000, 0.000000),
(22, 'Belarus', 0.000000, 0.000000),
(23, 'Belgium', 0.000000, 0.000000),
(24, 'Belize', 0.000000, 0.000000),
(25, 'Benin', 0.000000, 0.000000),
(26, 'Bermuda', 0.000000, 0.000000),
(27, 'Bhutan', 0.000000, 0.000000),
(28, 'Bolivia', 0.000000, 0.000000),
(29, 'Bosnia and Herzegovina', 0.000000, 0.000000),
(30, 'Botswana', 0.000000, 0.000000),
(31, 'Bouvet Island', 0.000000, 0.000000),
(32, 'Brazil', 0.000000, 0.000000),
(33, 'British Indian Ocean Territory', 0.000000, 0.000000),
(34, 'British Virgin Islands', 0.000000, 0.000000),
(35, 'Brunei Darussalam', 0.000000, 0.000000),
(36, 'Bulgaria', 0.000000, 0.000000),
(37, 'Burkina Faso', 0.000000, 0.000000),
(38, 'Burma', 0.000000, 0.000000),
(39, 'Burundi', 0.000000, 0.000000),
(40, 'Cambodia', 0.000000, 0.000000),
(41, 'Cameroon', 0.000000, 0.000000),
(42, 'Canada', 0.000000, 0.000000),
(43, 'Cape Verde', 0.000000, 0.000000),
(44, 'Cayman Islands', 0.000000, 0.000000),
(45, 'Central African Republic', 0.000000, 0.000000),
(46, 'Chad', 0.000000, 0.000000),
(47, 'Chile', 0.000000, 0.000000),
(48, 'China', 0.000000, 0.000000),
(49, 'Christmas Island', 0.000000, 0.000000),
(50, 'Clipperton Island', 0.000000, 0.000000),
(51, 'Cocos (Keeling) Islands', 0.000000, 0.000000),
(52, 'Colombia', 0.000000, 0.000000),
(53, 'Comoros', 0.000000, 0.000000),
(54, 'Congo', 0.000000, 0.000000),
(55, 'Congo', 0.000000, 0.000000),
(56, 'Cook Islands', 0.000000, 0.000000),
(57, 'Coral Sea Islands', 0.000000, 0.000000),
(58, 'Costa Rica', 0.000000, 0.000000),
(59, 'Cote dIvoire', 0.000000, 0.000000),
(60, 'Croatia', 0.000000, 0.000000),
(61, 'Cuba', 0.000000, 0.000000),
(62, 'Cyprus', 0.000000, 0.000000),
(63, 'Czech Republic', 0.000000, 0.000000),
(64, 'Denmark', 0.000000, 0.000000),
(65, 'Djibouti', 0.000000, 0.000000),
(66, 'Dominica', 0.000000, 0.000000),
(67, 'Dominican Republic', 0.000000, 0.000000),
(68, 'East Timor', 0.000000, 0.000000),
(69, 'Ecuador', 0.000000, 0.000000),
(70, 'Egypt', 0.000000, 0.000000),
(71, 'El Salvador', 0.000000, 0.000000),
(72, 'Equatorial Guinea', 0.000000, 0.000000),
(73, 'Eritrea', 0.000000, 0.000000),
(74, 'Estonia', 0.000000, 0.000000),
(75, 'Ethiopia', 0.000000, 0.000000),
(76, 'Europa Island', 0.000000, 0.000000),
(77, 'Falkland Islands (Islas Malvinas)', 0.000000, 0.000000),
(78, 'Faroe Islands', 0.000000, 0.000000),
(79, 'Fiji', 0.000000, 0.000000),
(80, 'Finland', 0.000000, 0.000000),
(81, 'France', 0.000000, 0.000000),
(82, 'France', 0.000000, 0.000000),
(83, 'French Guiana', 0.000000, 0.000000),
(84, 'French Polynesia', 0.000000, 0.000000),
(85, 'French Southern and Antarctic Lands', 0.000000, 0.000000),
(86, 'Gabon', 0.000000, 0.000000),
(87, 'Gaza Strip', 0.000000, 0.000000),
(88, 'Georgia', 0.000000, 0.000000),
(89, 'Germany', 0.000000, 0.000000),
(90, 'Ghana', 0.000000, 0.000000),
(91, 'Gibraltar', 0.000000, 0.000000),
(92, 'Glorioso Islands', 0.000000, 0.000000),
(93, 'Greece', 0.000000, 0.000000),
(94, 'Greenland', 0.000000, 0.000000),
(95, 'Grenada', 0.000000, 0.000000),
(96, 'Guadeloupe', 0.000000, 0.000000),
(97, 'Guam', 0.000000, 0.000000),
(98, 'Guatemala', 0.000000, 0.000000),
(99, 'Guernsey', 0.000000, 0.000000),
(100, 'Guinea', 0.000000, 0.000000),
(101, 'Guinea-Bissau', 0.000000, 0.000000),
(102, 'Guyana', 0.000000, 0.000000),
(103, 'Haiti', 0.000000, 0.000000),
(104, 'Heard Island and McDonald Islands', 0.000000, 0.000000),
(105, 'Holy See (Vatican City)', 0.000000, 0.000000),
(106, 'Honduras', 0.000000, 0.000000),
(107, 'Hong Kong (SAR)', 0.000000, 0.000000),
(108, 'Howland Island', 0.000000, 0.000000),
(109, 'Hungary', 0.000000, 0.000000),
(110, 'Iceland', 0.000000, 0.000000),
(111, 'India', 0.000000, 0.000000),
(112, 'Indonesia', 0.000000, 0.000000),
(113, 'Iran', 0.000000, 0.000000),
(114, 'Iraq', 0.000000, 0.000000),
(115, 'Ireland', 0.000000, 0.000000),
(116, 'Israel', 0.000000, 0.000000),
(117, 'Italy', 0.000000, 0.000000),
(118, 'Jamaica', 0.000000, 0.000000),
(119, 'Jan Mayen', 0.000000, 0.000000),
(120, 'Japan', 0.000000, 0.000000),
(121, 'Jarvis Island', 0.000000, 0.000000),
(122, 'Jersey', 0.000000, 0.000000),
(123, 'Johnston Atoll', 0.000000, 0.000000),
(124, 'Jordan', 0.000000, 0.000000),
(125, 'Juan de Nova Island', 0.000000, 0.000000),
(126, 'Kazakhstan', 0.000000, 0.000000),
(127, 'Kenya', 0.000000, 0.000000),
(128, 'Kingman Reef', 0.000000, 0.000000),
(129, 'Kiribati', 0.000000, 0.000000),
(130, 'Korea', 0.000000, 0.000000),
(131, 'Korea', 0.000000, 0.000000),
(132, 'Kuwait', 0.000000, 0.000000),
(133, 'Kyrgyzstan', 0.000000, 0.000000),
(134, 'Laos', 0.000000, 0.000000),
(135, 'Latvia', 0.000000, 0.000000),
(136, 'Lebanon', 0.000000, 0.000000),
(137, 'Lesotho', 0.000000, 0.000000),
(138, 'Liberia', 0.000000, 0.000000),
(139, 'Libya', 0.000000, 0.000000),
(140, 'Liechtenstein', 0.000000, 0.000000),
(141, 'Lithuania', 0.000000, 0.000000),
(142, 'Luxembourg', 0.000000, 0.000000),
(143, 'Macao', 0.000000, 0.000000),
(144, 'Macedonia', 0.000000, 0.000000),
(145, 'Madagascar', 0.000000, 0.000000),
(146, 'Malawi', 0.000000, 0.000000),
(147, 'Malaysia', 0.000000, 0.000000),
(148, 'Maldives', 0.000000, 0.000000),
(149, 'Mali', 0.000000, 0.000000),
(150, 'Malta', 0.000000, 0.000000),
(151, 'Man', 0.000000, 0.000000),
(152, 'Marshall Islands', 0.000000, 0.000000),
(153, 'Martinique', 0.000000, 0.000000),
(154, 'Mauritania', 0.000000, 0.000000),
(155, 'Mauritius', 0.000000, 0.000000),
(156, 'Mayotte', 0.000000, 0.000000),
(157, 'Mexico', 0.000000, 0.000000),
(158, 'Micronesia', 0.000000, 0.000000),
(159, 'Midway Islands', 0.000000, 0.000000),
(160, 'Miscellaneous (French)', 0.000000, 0.000000),
(161, 'Moldova', 0.000000, 0.000000),
(162, 'Monaco', 0.000000, 0.000000),
(163, 'Mongolia', 0.000000, 0.000000),
(164, 'Montenegro', 0.000000, 0.000000),
(165, 'Montserrat', 0.000000, 0.000000),
(166, 'Morocco', 0.000000, 0.000000),
(167, 'Mozambique', 0.000000, 0.000000),
(168, 'Myanmar', 0.000000, 0.000000),
(169, 'Namibia', 0.000000, 0.000000),
(170, 'Nauru', 0.000000, 0.000000),
(171, 'Navassa Island', 0.000000, 0.000000),
(172, 'Nepal', 0.000000, 0.000000),
(173, 'Netherlands', 0.000000, 0.000000),
(174, 'Netherlands Antilles', 0.000000, 0.000000),
(175, 'New Caledonia', 0.000000, 0.000000),
(176, 'New Zealand', 0.000000, 0.000000),
(177, 'Nicaragua', 0.000000, 0.000000),
(178, 'Niger', 0.000000, 0.000000),
(179, 'Nigeria', 0.000000, 0.000000),
(180, 'Niue', 0.000000, 0.000000),
(181, 'Norfolk Island', 0.000000, 0.000000),
(182, 'Northern Mariana Islands', 0.000000, 0.000000),
(183, 'Norway', 0.000000, 0.000000),
(184, 'Oman', 0.000000, 0.000000),
(185, 'Pakistan', 0.000000, 0.000000),
(186, 'Palau', 0.000000, 0.000000),
(187, 'Palestinian Territory', 0.000000, 0.000000),
(188, 'Palmyra Atoll', 0.000000, 0.000000),
(189, 'Panama', 0.000000, 0.000000),
(190, 'Papua New Guinea', 0.000000, 0.000000),
(191, 'Paracel Islands', 0.000000, 0.000000),
(192, 'Paraguay', 0.000000, 0.000000),
(193, 'Peru', 0.000000, 0.000000),
(194, 'Philippines', 0.000000, 0.000000),
(195, 'Pitcairn Islands', 0.000000, 0.000000),
(196, 'Poland', 0.000000, 0.000000),
(197, 'Portugal', 0.000000, 0.000000),
(198, 'Puerto Rico', 0.000000, 0.000000),
(199, 'Qatar', 0.000000, 0.000000),
(200, 'Reunion', 0.000000, 0.000000),
(201, 'Romania', 0.000000, 0.000000),
(202, 'Russia', 0.000000, 0.000000),
(203, 'Rwanda', 0.000000, 0.000000),
(204, 'Saint Helena', 0.000000, 0.000000),
(205, 'Saint Kitts and Nevis', 0.000000, 0.000000),
(206, 'Saint Lucia', 0.000000, 0.000000),
(207, 'Saint Pierre and Miquelon', 0.000000, 0.000000),
(208, 'Saint Vincent and the Grenadines', 0.000000, 0.000000),
(209, 'Samoa', 0.000000, 0.000000),
(210, 'San Marino', 0.000000, 0.000000),
(211, 'Sao Tome and Principe', 0.000000, 0.000000),
(212, 'Saudi Arabia', 0.000000, 0.000000),
(213, 'Senegal', 0.000000, 0.000000),
(214, 'Serbia', 0.000000, 0.000000),
(215, 'Serbia and Montenegro', 0.000000, 0.000000),
(216, 'Seychelles', 0.000000, 0.000000),
(217, 'Sierra Leone', 0.000000, 0.000000),
(218, 'Singapore', 0.000000, 0.000000),
(219, 'Slovakia', 0.000000, 0.000000),
(220, 'Slovenia', 0.000000, 0.000000),
(221, 'Solomon Islands', 0.000000, 0.000000),
(222, 'Somalia', 0.000000, 0.000000),
(223, 'South Africa', 0.000000, 0.000000),
(224, 'South Georgia and the South Sandwich Islands', 0.000000, 0.000000),
(225, 'Spain', 0.000000, 0.000000),
(226, 'Spratly Islands', 0.000000, 0.000000),
(227, 'Sri Lanka', 0.000000, 0.000000),
(228, 'Sudan', 0.000000, 0.000000),
(229, 'Suriname', 0.000000, 0.000000),
(230, 'Svalbard', 0.000000, 0.000000),
(231, 'Swaziland', 0.000000, 0.000000),
(232, 'Sweden', 0.000000, 0.000000),
(233, 'Switzerland', 0.000000, 0.000000),
(234, 'Syria', 0.000000, 0.000000),
(235, 'Taiwan', 0.000000, 0.000000),
(236, 'Tajikistan', 0.000000, 0.000000),
(237, 'Tanzania', 0.000000, 0.000000),
(238, 'Thailand', 0.000000, 0.000000),
(239, 'The Bahamas', 0.000000, 0.000000),
(240, 'The Gambia', 0.000000, 0.000000),
(241, 'Togo', 0.000000, 0.000000),
(242, 'Tokelau', 0.000000, 0.000000),
(243, 'Tonga', 0.000000, 0.000000),
(244, 'Trinidad and Tobago', 0.000000, 0.000000),
(245, 'Tromelin Island', 0.000000, 0.000000),
(246, 'Tunisia', 0.000000, 0.000000),
(247, 'Turkey', 0.000000, 0.000000),
(248, 'Turkmenistan', 0.000000, 0.000000),
(249, 'Turks and Caicos Islands', 0.000000, 0.000000),
(250, 'Tuvalu', 0.000000, 0.000000),
(251, 'Uganda', 0.000000, 0.000000),
(252, 'Ukraine', 0.000000, 0.000000),
(253, 'United Arab Emirates', 0.000000, 0.000000),
(254, 'United Kingdom', 0.000000, 0.000000),
(255, 'United States', 0.000000, 0.000000),
(256, 'United States Minor Outlying Islands', 0.000000, 0.000000),
(257, 'Uruguay', 0.000000, 0.000000),
(258, 'Uzbekistan', 0.000000, 0.000000),
(259, 'Vanuatu', 0.000000, 0.000000),
(260, 'Venezuela', 0.000000, 0.000000),
(261, 'Vietnam', 0.000000, 0.000000),
(262, 'Virgin Islands', 0.000000, 0.000000),
(263, 'Virgin Islands (UK)', 0.000000, 0.000000),
(264, 'Virgin Islands (US)', 0.000000, 0.000000),
(265, 'Wake Island', 0.000000, 0.000000),
(266, 'Wallis and Futuna', 0.000000, 0.000000),
(267, 'West Bank', 0.000000, 0.000000),
(268, 'Western Sahara', 0.000000, 0.000000),
(269, 'Western Samoa', 0.000000, 0.000000),
(270, 'World', 0.000000, 0.000000),
(271, 'Yemen', 0.000000, 0.000000),
(272, 'Yugoslavia', 0.000000, 0.000000),
(273, 'Zaire', 0.000000, 0.000000),
(274, 'Zambia', 0.000000, 0.000000),
(275, 'Zimbabwe', 0.000000, 0.000000);

CREATE TABLE IF NOT EXISTS `encoding` (
  `encode_id` int(11) NOT NULL AUTO_INCREMENT,
  `encode_name` varchar(50) NOT NULL,
  `encode_value` varchar(15) NOT NULL,
  `is_active` tinyint(4) NOT NULL DEFAULT '1',
  PRIMARY KEY (`encode_id`)
)  AUTO_INCREMENT=47 DEFAULT CHARSET=utf8;

INSERT IGNORE INTO `encoding` (`encode_id`, `encode_name`, `encode_value`, `is_active`) VALUES
(1, 'Afrikaans(af) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(2, 'Albanian(sq) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(3, 'Arabic(ar) iso-8859-6', 'iso-8859-6', 1),
(4, 'Basque(eu) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(5, 'Bulgarian(bg) iso-8859-5', 'iso-8859-5', 1),
(6, 'Byelorussian(be) iso-8859-5', 'iso-8859-5', 1),
(7, 'Catalan(ca) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(8, 'Croatian(hr) iso-8859-2, windows-1250', 'iso-8859-2', 1),
(9, 'Czech(cs) iso-8859-2', 'iso-8859-2', 1),
(10, 'Danish(da) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(11, 'Dutch(nl) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(12, 'English(en) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(13, 'Esperanto(eo) iso-8859-3', 'iso-8859-3', 1),
(14, 'Estonian(et) iso-8859-15', 'iso-8859-15', 1),
(15, 'Faroese(fo) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(16, 'Finnish(fi) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(17, 'French(fr) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(18, 'Galician(gl) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(19, 'German(de) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(20, 'Greek(el) iso-8859-7', 'iso-8859-7', 1),
(21, 'Hebrew(iw) iso-8859-8', 'iso-8859-8', 1),
(22, 'Hungarian(hu) iso-8859-2', 'iso-8859-2', 1),
(23, 'Icelandic(is) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(24, 'Inuit(Eskimo) iso-8859-10', 'iso-8859-10', 1),
(25, 'Irish(ga) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(26, 'Italian(it) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(27, 'Japanese(ja) iso-2022-jp', 'iso-2022-jp', 1),
(28, 'Lapp iso-8859-10', 'iso-8859-10', 1),
(29, 'Latvian(lv) iso-8859-13, windows-1257', 'iso-8859-13', 1),
(30, 'Lithuanian(lt) iso-8859-13, windows-1257', 'iso-8859-13', 1),
(31, 'Macedonian(mk) iso-8859-5, windows-1251', 'iso-8859-5', 1),
(32, 'Maltese(mt) iso-8859-3', 'iso-8859-3', 1),
(33, 'Norwegian(no) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(34, 'Polish(pl) iso-8859-2', 'iso-8859-2', 1),
(35, 'Portuguese(pt) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(36, 'Romanian(ro) iso-8859-2', 'iso-8859-2', 1),
(37, 'Russian(ru) iso-8859-5', 'iso-8859-5', 1),
(38, 'Scottish(gd) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(39, 'Serbian(sr) iso-8859-5, windows-1251', 'iso-8859-5', 1),
(40, 'Serbian(sr) iso-8859-2, windows-1250', 'iso-8859-2', 1),
(41, 'Slovak(sk) iso-8859-2', 'iso-8859-2', 1),
(42, 'Slovenian(sl) iso-8859-2, windows-1250', 'iso-8859-2', 1),
(43, 'Spanish(es) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(44, 'Swedish(sv) iso-8859-1, windows-1252', 'iso-8859-1', 1),
(45, 'Turkish(tr) iso-8859-9, windows-1254', 'iso-8859-9', 1),
(46, 'Ukrainian(uk) iso-8859-5', 'iso-8859-5', 1);
	
CREATE TABLE IF NOT EXISTS `importdata` (
  `fileid` int(11) NOT NULL AUTO_INCREMENT,
  `filename` varchar(100) NOT NULL,
  `filepath` varchar(250) NOT NULL,
  `totalrecord` int(11) NOT NULL,
  `latlngrecord` int(11) NOT NULL,
  `importeddate` datetime NOT NULL,
  `userid` int(11) NOT NULL,
  PRIMARY KEY (`fileid`)
)   DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE IF NOT EXISTS `labels` (
  `labelid` int(11) NOT NULL AUTO_INCREMENT,
  `imgurl` varchar(250) NOT NULL,
  `colortype` varchar(50) NOT NULL,
  PRIMARY KEY (`labelid`)
)   DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

INSERT IGNORE INTO `labels` (`labelid`, `imgurl`, `colortype`) VALUES
(1, 'images/sl_lblimg/none.png', 'None'),
(2, 'images/sl_lblimg/blue.png', 'Blue'),
(3, 'images/sl_lblimg/red.png', 'Red'),
(4, 'images/sl_lblimg/violet.png', 'Violet'),
(5, 'images/sl_lblimg/silver.png', 'Silver'),
(6, 'images/sl_lblimg/Dgreen.png', 'Dark Green'),
(7, 'images/sl_lblimg/green.png', 'Green');


CREATE TABLE IF NOT EXISTS `mapradius` (
  `radiusid` int(11) not null auto_increment,
  `radius` int(5) NOT NULL,
  PRIMARY KEY (`radiusid`)
)   DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

INSERT IGNORE INTO `mapradius` (`radiusid`, `radius`) VALUES
(1, 1),
(2, 5);

CREATE TABLE IF NOT EXISTS `markerimg` (
  `markerid` int(11) NOT NULL AUTO_INCREMENT,
  `markerpath` varchar(250) NOT NULL,
  `createddate` datetime NOT NULL,
  `updateddate` datetime NOT NULL,
  `default` tinyint(1) NOT NULL,
  PRIMARY KEY (`markerid`)
)   DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

INSERT IGNORE INTO `markerimg` (`markerid`, `markerpath`, `createddate`, `updateddate`, `default`) VALUES
(1, 'marker/default.png', '2012-12-27 14:10:46', '0000-00-00 00:00:00', 1),
(2, 'marker/coffee.png', '2012-12-27 14:10:46', '0000-00-00 00:00:00', 0),
(3, 'marker/hotel.png', '2012-12-27 14:10:46', '0000-00-00 00:00:00', 0),
(4, 'marker/market.png', '2012-12-27 14:10:46', '0000-00-00 00:00:00', 0);

CREATE TABLE IF NOT EXISTS `map_language` (
  `language_id` int(10) NOT NULL AUTO_INCREMENT,
  `language` varchar(50) DEFAULT NULL,
  `language_code` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`language_id`)
)  AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;


INSERT IGNORE INTO `map_language` (`language_id`, `language`, `language_code`) VALUES
(1, 'Arabic', 'ar'),
(2, 'Basque', 'eu'),
(3, 'Bulgarian', 'bg'),
(4, 'Bengali', 'bn'),
(5, 'Catalan', 'ca'),
(6, 'Czech', 'cs'),
(7, 'Danish', 'da'),
(8, 'German', 'de'),
(9, 'Greek', 'el'),
(10, 'English', 'en'),
(11, 'English (Australian)', 'en-AU'),
(12, 'English (Great Britain)', 'en-GB'),
(13, 'Spanish', 'es'),
(14, 'Basque', 'eu'),
(15, 'Farsi', 'fa'),
(16, 'Finnish', 'fi'),
(17, 'Filipino', 'fil'),
(18, 'French', 'fr'),
(19, 'Galician', 'gl'),
(20, 'Gujarati', 'gu'),
(21, 'Hindi', 'hi'),
(22, 'Croatian', 'hr'),
(23, 'Hungarian', 'hu'),
(24, 'Indonesian', 'id'),
(25, 'Italian', 'it'),
(26, 'Hebrew', 'iw'),
(27, 'Japanese', 'ja'),
(28, 'Kannada', 'kn'),
(29, 'Korean', 'ko'),
(30, 'Lithuanian', 'lt'),
(31, 'Latvian', 'lv'),
(32, 'Malayalam', 'ml'),
(33, 'Marathi', 'mr'),
(34, 'Dutch', 'nl'),
(35, 'Norwegian', 'no'),
(36, 'Polish', 'pl'),
(37, 'Portuguese', 'pt'),
(38, 'Portuguese (Brazil)', 'pt-BR'),
(39, 'Portuguese (Portugal)', 'pt-PT'),
(40, 'Romanian', 'ro'),
(41, 'Russian', 'ru'),
(42, 'Slovak', 'sk'),
(43, 'Slovenian', 'sl'),
(44, 'Serbian', 'sr'),
(45, 'Swedish', 'sv'),
(46, 'Tagalog', 'tl'),
(47, 'Tamil', 'ta'),
(48, 'Telugu', 'te'),
(49, 'Thai', 'th'),
(50, 'Turkish', 'tr'),
(51, 'Ukrainian', 'uk'),
(52, 'Vietnamese', 'vi'),
(53, 'Chinese (Simplified)', 'zh-CN'),
(54, 'Chinese (Traditional)', 'zh-TW');

CREATE TABLE IF NOT EXISTS `pluginsetting` (
  `settingid` int(11) NOT NULL AUTO_INCREMENT,
  `google` tinyint(1) NOT NULL DEFAULT '0',
  `facebook` tinyint(1) NOT NULL DEFAULT '0',
  `twitter` tinyint(1) NOT NULL DEFAULT '0',
  `printrest` tinyint(1) NOT NULL DEFAULT '0',
  `info` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`settingid`)
)   DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `storecategory` (
  `categoryid` int(11) NOT NULL AUTO_INCREMENT,
  `markerid` int(11) NOT NULL,
  `category` varchar(150) NOT NULL,
  `categoryicon` varchar(250) DEFAULT NULL,
  `createddate` datetime NOT NULL,
  `updateddate` datetime NOT NULL,
  `isdefault` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`categoryid`)
)   DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

INSERT IGNORE INTO `storecategory` (`categoryid`, `markerid`, `category`, `categoryicon`, `createddate`, `updateddate`, `isdefault`) VALUES
(1, 1, 'Default', NULL, '2012-12-27 14:14:00', '2012-12-27 14:31:41', 1);

CREATE TABLE IF NOT EXISTS `storelogos` (
  `logoid` int(11) NOT NULL AUTO_INCREMENT,
  `logopath` varchar(300) NOT NULL,
  `default` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LogoId`)
)   DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

INSERT IGNORE INTO `storelogos` (`logoid`, `logopath`, `default`) VALUES
(1, 'Logo/logo2.png', 1);

CREATE TABLE IF NOT EXISTS `stores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) NOT NULL,
  `address` varchar(250) NOT NULL,
  `lat` float(10,6) NOT NULL,
  `lng` float(10,6) NOT NULL,
  `city` varchar(80) DEFAULT NULL,
  `state` varchar(80) DEFAULT NULL,
  `country` varchar(80) DEFAULT NULL,
  `zip_code` varchar(7) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `fax` varchar(30) DEFAULT NULL,
  `email` varchar(128) DEFAULT NULL,
  `website` varchar(256) DEFAULT NULL,
  `logo` varchar(250) DEFAULT NULL,
  `logoid` int(11) NOT NULL,
  `logotype` varchar(5) NOT NULL,
  `type` int(11) NOT NULL,
  `labelid` int(11) NOT NULL,
  `labeltext` varchar(60) NOT NULL,
  `createdbyid` int(11) DEFAULT NULL,
  `updatedbyid` int(11) DEFAULT NULL,
  `createddate` datetime DEFAULT NULL,
  `updateddate` datetime DEFAULT NULL,
  `statuscode` varchar(10) DEFAULT NULL,
  `status` bit(1) NOT NULL DEFAULT b'1',
  `defaultloc` bit(1) NOT NULL DEFAULT b'0',
  PRIMARY KEY (`id`)
)  DEFAULT CHARSET=utf8  AUTO_INCREMENT=1 ;
