Assembla home | Assembla project page
 

Changeset 137

Show
Ignore:
Timestamp:
07/25/07 16:13:52 (1 year ago)
Author:
digitalspaghetti
Message:

Cleaned up SQL

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/config/core.php

    r120 r137  
    5555 * In development mode, you need to click the flash message to continue. 
    5656 */ 
    57         define('DEBUG', 2); 
     57        define('DEBUG', 0); 
    5858/** 
    5959 * Turn off or enable cache checking application-wide. 
  • branch/db.sql

    r119 r137  
    44--  
    55-- Host: localhost 
    6 -- Generation Time: Jul 19, 2007 at 01:47 PM 
     6-- Generation Time: Jul 25, 2007 at 05:07 PM 
    77-- Server version: 5.0.38 
    88-- PHP Version: 5.2.1 
     
    1010-- Database: `webrocket` 
    1111--  
     12 
     13-- -------------------------------------------------------- 
     14 
     15--  
     16-- Table structure for table `acos` 
     17--  
     18 
     19DROP TABLE IF EXISTS `acos`; 
     20CREATE TABLE `acos` ( 
     21  `id` int(11) NOT NULL auto_increment, 
     22  `parent_id` int(11) default NULL, 
     23  `model` varchar(255) collate utf8_unicode_ci default '', 
     24  `foreign_key` int(11) default NULL, 
     25  `alias` varchar(255) collate utf8_unicode_ci default '', 
     26  `lft` int(11) default NULL, 
     27  `rght` int(11) default NULL, 
     28  PRIMARY KEY  (`id`) 
     29) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 
     30 
     31--  
     32-- Dumping data for table `acos` 
     33--  
     34 
     35INSERT INTO `acos` (`id`, `parent_id`, `model`, `foreign_key`, `alias`, `lft`, `rght`) VALUES  
     36(1, NULL, 'Post', NULL, 'Post', 1, 2), 
     37(2, NULL, 'Page', NULL, 'Page', 3, 4), 
     38(3, NULL, 'User', NULL, 'User', 5, 6), 
     39(4, NULL, 'Event', NULL, 'Event', 7, 8), 
     40(5, NULL, 'Feed', NULL, 'Feed', 9, 10), 
     41(6, NULL, 'Gallery', NULL, 'Gallery', 11, 12), 
     42(7, NULL, 'Group', NULL, 'Group', 13, 14), 
     43(8, NULL, 'Image', NULL, 'Image', 15, 16), 
     44(9, NULL, 'Menu', NULL, 'Menu', 17, 18), 
     45(10, NULL, 'Video', NULL, 'Video', 19, 20), 
     46(11, NULL, 'Venue', NULL, 'Venue', 21, 22); 
     47 
     48-- -------------------------------------------------------- 
     49 
     50--  
     51-- Table structure for table `aros` 
     52--  
     53 
     54DROP TABLE IF EXISTS `aros`; 
     55CREATE TABLE `aros` ( 
     56  `id` int(11) NOT NULL auto_increment, 
     57  `parent_id` int(11) default NULL, 
     58  `model` varchar(255) collate utf8_unicode_ci default '', 
     59  `foreign_key` int(11) default NULL, 
     60  `alias` varchar(255) collate utf8_unicode_ci default '', 
     61  `lft` int(11) default NULL, 
     62  `rght` int(11) default NULL, 
     63  PRIMARY KEY  (`id`) 
     64) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 
     65 
     66--  
     67-- Dumping data for table `aros` 
     68--  
     69 
     70INSERT INTO `aros` (`id`, `parent_id`, `model`, `foreign_key`, `alias`, `lft`, `rght`) VALUES  
     71(1, NULL, '', NULL, 'Admin', 1, 6), 
     72(2, NULL, '', NULL, 'Registered', 7, 8), 
     73(3, NULL, '', NULL, 'Guest', 9, 10), 
     74(4, 1, '', NULL, 'Site Editor', 2, 3), 
     75(5, 1, 'User', 1, 'User::1', 4, 5); 
     76 
     77-- -------------------------------------------------------- 
     78 
     79--  
     80-- Table structure for table `aros_acos` 
     81--  
     82 
     83DROP TABLE IF EXISTS `aros_acos`; 
     84CREATE TABLE `aros_acos` ( 
     85  `id` int(11) NOT NULL auto_increment, 
     86  `aro_id` int(11) default NULL, 
     87  `aco_id` int(11) default NULL, 
     88  `_create` int(11) NOT NULL default '0', 
     89  `_read` int(11) NOT NULL default '0', 
     90  `_update` int(11) NOT NULL default '0', 
     91  `_delete` int(11) NOT NULL default '0', 
     92  PRIMARY KEY  (`id`) 
     93) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 
     94 
     95--  
     96-- Dumping data for table `aros_acos` 
     97--  
     98 
     99INSERT INTO `aros_acos` (`id`, `aro_id`, `aco_id`, `_create`, `_read`, `_update`, `_delete`) VALUES  
     100(1, 1, 1, 1, 1, 1, 1), 
     101(2, 1, 2, 1, 1, 1, 1), 
     102(3, 1, 3, 1, 1, 1, 1), 
     103(4, 1, 4, 1, 1, 1, 1), 
     104(5, 1, 5, 1, 1, 1, 1), 
     105(6, 1, 6, 1, 1, 1, 1), 
     106(7, 1, 7, 1, 1, 1, 1), 
     107(8, 1, 8, 1, 1, 1, 1), 
     108(9, 1, 9, 1, 1, 1, 1), 
     109(10, 1, 10, 1, 1, 1, 1), 
     110(11, 1, 11, 1, 1, 1, 1), 
     111(12, 5, 1, 1, 1, 1, 1), 
     112(13, 5, 2, 1, 1, 1, 1), 
     113(14, 5, 3, 1, 1, 1, 1), 
     114(15, 5, 4, 1, 1, 1, 1), 
     115(16, 5, 5, 1, 1, 1, 1), 
     116(17, 5, 6, 1, 1, 1, 1), 
     117(18, 5, 7, 1, 1, 1, 1), 
     118(19, 5, 8, 1, 1, 1, 1), 
     119(20, 5, 9, 1, 1, 1, 1), 
     120(21, 5, 10, 1, 1, 1, 1), 
     121(22, 5, 11, 1, 1, 1, 1); 
    12122 
    13123-- -------------------------------------------------------- 
     
    45155  `modified` datetime NOT NULL, 
    46156  PRIMARY KEY  (`id`) 
    47 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     157) ENGINE=MyISAM DEFAULT CHARSET=utf8
    48158 
    49159--  
     
    65175  `desc` varchar(255) NOT NULL, 
    66176  PRIMARY KEY  (`id`) 
    67 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4
     177) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    68178 
    69179--  
     
    89199  `value` varchar(50) NOT NULL, 
    90200  PRIMARY KEY  (`id`) 
    91 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=14
     201) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    92202 
    93203--  
     
    120230  `id` int(8) unsigned NOT NULL auto_increment, 
    121231  `title` varchar(255) NOT NULL, 
    122   `body` text NOT NULL, 
    123   PRIMARY KEY  (`id`) 
    124 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7
     232  `url` varchar(255) NOT NULL, 
     233  PRIMARY KEY  (`id`) 
     234) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    125235 
    126236--  
     
    128238--  
    129239 
    130 INSERT INTO `copyrights` (`id`, `title`, `body`) VALUES  
    131 (1, 'Creative Commons Attribution 3.0', '<a rel="license" href="http://creativecommons.org/licenses/by/3.0/">\r\n<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" />\r\n</a>\r\n<br />This work is licensed under a \r\n<a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License</a>.'), 
    132 (2, 'Creative Commons Attribution-Share Alike 3.0', '<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">\r\n<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" />\r\n</a>\r\n<br />This work is licensed under a \r\n<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 License</a>.'), 
    133 (3, 'Creative Commons Attribution-No Derivative Works 3.0', '<a rel="license" href="http://creativecommons.org/licenses/by-nd/3.0/">\r\n<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nd/3.0/88x31.png" />\r\n</a>\r\n<br />This work is licensed under a \r\n<a rel="license" href="http://creativecommons.org/licenses/by-nd/3.0/">Creative Commons Attribution-No Derivative Works 3.0 License</a>.'), 
    134 (4, 'Creative Commons Attribution-Noncommercial 3.0', '<a rel="license" href="http://creativecommons.org/licenses/by-nc/3.0/">\r\n<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/3.0/88x31.png" />\r\n</a>\r\n<br />This work is licensed under a \r\n<a rel="license" href="http://creativecommons.org/licenses/by-nc/3.0/">Creative Commons Attribution-Noncommercial 3.0 License</a>.'), 
    135 (5, 'Creative Commons Attribution-Noncommercial-Share Alike 3.0', '<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">\r\n<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" />\r\n</a>\r\n<br />This work is licensed under a \r\n<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 License</a>.'), 
    136 (6, 'Creative Commons Attribution-Noncommercial-No Derivative Works 3.0', '<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">\r\n<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png" />\r\n</a>\r\n<br />This work is licensed under a \r\n<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License</a>.'); 
     240INSERT INTO `copyrights` (`id`, `title`, `url`) VALUES  
     241(1, 'Creative Commons Attribution 3.0', 'http://creativecommons.org/licenses/by/3.0/'), 
     242(2, 'Creative Commons Attribution-Share Alike 3.0', 'http://creativecommons.org/licenses/by-sa/3.0/'), 
     243(3, 'Creative Commons Attribution-No Derivative Works 3.0', 'http://creativecommons.org/licenses/by-nd/3.0/'), 
     244(4, 'Creative Commons Attribution-Noncommercial 3.0', 'http://creativecommons.org/licenses/by-nc/3.0/'), 
     245(5, 'Creative Commons Attribution-Noncommercial-Share Alike 3.0', 'http://creativecommons.org/licenses/by-nc-sa/3.0/'), 
     246(6, 'Creative Commons Attribution-Noncommercial-No Derivative Works 3.0', 'http://creativecommons.org/licenses/by-nc-nd/3.0/'); 
    137247 
    138248-- -------------------------------------------------------- 
     
    144254DROP TABLE IF EXISTS `countries`; 
    145255CREATE TABLE `countries` ( 
    146   `id` smallint(6) NOT NULL auto_increment, 
    147   `twoAbrev` char(2) collate utf8_unicode_ci NOT NULL, 
    148   `threeAbrev` char(3) collate utf8_unicode_ci NOT NULL, 
    149   `code` int(11) NOT NULL default '0', 
    150   `name` varchar(50) collate utf8_unicode_ci NOT NULL, 
    151   PRIMARY KEY  (`id`) 
    152 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=240 ; 
     256  `id` int(8) NOT NULL auto_increment, 
     257  `continents_code` char(3) NOT NULL, 
     258  `countries_iso_code_2` char(2) NOT NULL, 
     259  `countries_iso_code_3` char(3) NOT NULL, 
     260  `countries_number` char(3) NOT NULL, 
     261  `countries_name` varchar(64) NOT NULL, 
     262  `active` tinyint(1) NOT NULL, 
     263  PRIMARY KEY  (`id`), 
     264  KEY `countries_name` (`countries_name`) 
     265) ENGINE=MyISAM  DEFAULT CHARSET=utf8; 
    153266 
    154267--  
     
    156269--  
    157270 
    158 INSERT INTO `countries` (`id`, `twoAbrev`, `threeAbrev`, `code`, `name`) VALUES  
    159 (1, 'GB', 'GBR', 826, 'United Kingdom'), 
    160 (2, 'AL', 'ALB', 8, 'Albania'), 
    161 (3, 'DZ', 'DZA', 12, 'Algeria'), 
    162 (4, 'AS', 'ASM', 16, 'American Samoa'), 
    163 (5, 'AD', 'AND', 20, 'Andorra'), 
    164 (6, 'AO', 'AGO', 24, 'Angola'), 
    165 (7, 'AI', 'AIA', 660, 'Anguilla'), 
    166 (8, 'AQ', 'ATA', 10, 'Anarctica'), 
    167 (9, 'AG', 'ATG', 28, 'Antigua and Barbuda'), 
    168 (10, 'AR', 'ARG', 32, 'Argentina'), 
    169 (11, 'AM', 'ARM', 51, 'Armenia'), 
    170 (12, 'AW', 'ABW', 533, 'Aruba'), 
    171 (13, 'AU', 'AUS', 36, 'Australia'), 
    172 (14, 'AT', 'AUT', 40, 'Austria'), 
    173 (15, 'AZ', 'AZE', 31, 'Azerbaijan'), 
    174 (16, 'BS', 'BHS', 44, 'Bahamas'), 
    175 (17, 'BH', 'BHR', 48, 'Bahrain'), 
    176 (18, 'BD', 'BGD', 50, 'Bangladesh'), 
    177 (19, 'BB', 'BRB', 52, 'Barbados'), 
    178 (20, 'BY', 'BLR', 112, 'Belarus'), 
    179 (21, 'BE', 'BEL', 56, 'Belgiun'), 
    180 (22, 'BZ', 'BLZ', 84, 'Belize'), 
    181 (23, 'BJ', 'BEN', 204, 'Benin'), 
    182 (24, 'BM', 'BMU', 60, 'Bermuda'), 
    183 (25, 'BT', 'BTN', 64, 'Bhutan'), 
    184 (26, 'BO', 'BOL', 68, 'Bolivia'), 
    185 (27, 'BA', 'BIH', 70, 'Bosnia & Herzegowina'), 
    186 (28, 'BW', 'BWA', 72, 'Botswana'), 
    187 (29, 'BV', 'BVT', 74, 'Bouvet Is.'), 
    188 (30, 'BR', 'BRA', 76, 'Brazil'), 
    189 (31, 'IO', 'IOT', 86, 'Brit. Indian Ocean Terr.'), 
    190 (32, 'BN', 'BRN', 96, 'Brunei Darussalam'), 
    191 (33, 'BG', 'BGR', 100, 'Bulgaria'), 
    192 (34, 'BF', 'BFA', 854, 'Burkina Faso'), 
    193 (35, 'BI', 'BDI', 108, 'Burundi'), 
    194 (36, 'KH', 'KHM', 116, 'Cambodia'), 
    195 (37, 'CM', 'CMR', 120, 'Cameron'), 
    196 (38, 'CA', 'CAN', 124, 'Canada'), 
    197 (39, 'CV', 'CPV', 132, 'Cape Verde'), 
    198 (40, 'KY', 'CYM', 136, 'Cayman Islands'), 
    199 (41, 'CF', 'CAF', 140, 'Central African Rep.'), 
    200 (42, 'TD', 'TCD', 148, 'Chad'), 
    201 (43, 'CL', 'CHL', 152, 'Chile'), 
    202 (44, 'CN', 'CHN', 156, 'China'), 
    203 (45, 'CX', 'CXR', 162, 'Christmas Island'), 
    204 (46, 'CC', 'CCK', 166, 'Cocos (Keeling) Is.'), 
    205 (47, 'CO', 'COL', 170, 'Colombia'), 
    206 (48, 'KM', 'COM', 174, 'Comoros'), 
    207 (49, 'CG', 'COG', 178, 'Congo'), 
    208 (50, 'CD', 'COD', 180, 'Congo, Democratic Rep.'), 
    209 (51, 'CK', 'COK', 184, 'Cook Islands'), 
    210 (52, 'CR', 'CRI', 188, 'Costa Rica'), 
    211 (53, 'CI', 'CIV', 384, 'Cote D''ivoire'), 
    212 (54, 'HR', 'HRV', 191, 'Croatia (Hrvatska)'), 
    213 (55, 'CU', 'CUB', 192, 'Cuba'), 
    214 (56, 'CY', 'CYP', 196, 'Cyprus'), 
    215 (57, 'CZ', 'CZE', 203, 'Czech Republic'), 
    216 (58, 'DK', 'DNK', 208, 'Denmark'), 
    217 (59, 'DJ', 'DJI', 262, 'Djibouti'), 
    218 (60, 'DM', 'DMA', 212, 'Dominica'), 
    219 (61, 'DO', 'DOM', 214, 'Dominican Republic'), 
    220 (62, 'TP', 'TMP', 626, 'East Timor'), 
    221 (63, 'EC', 'ECU', 218, 'Ecuador'), 
    222 (64, 'EG', 'EGY', 818, 'Egypt'), 
    223 (65, 'SV', 'SLV', 222, 'El Salvador'), 
    224 (66, 'GQ', 'GNQ', 226, 'Equatorial Guinea'), 
    225 (67, 'ER', 'ERI', 232, 'Eritrea'), 
    226 (68, 'EE', 'EST', 233, 'Estonia'), 
    227 (69, 'ET', 'ETH', 231, 'Ethiopia'), 
    228 (70, 'FK', 'FLK', 238, 'Falkland Is.(Malvinas)'), 
    229 (71, 'FO', 'FRO', 234, 'Faroe Islands'), 
    230 (72, 'FJ', 'FJI', 242, 'Fiji'), 
    231 (73, 'FI', 'FIN', 246, 'Finland'), 
    232 (74, 'FR', 'FRA', 250, 'France'), 
    233 (75, 'FX', 'FXX', 249, 'France, Metro.'), 
    234 (76, 'GF', 'GUF', 254, 'French Guiana'), 
    235 (77, 'PF', 'PYF', 258, 'French Polynesia'), 
    236 (78, 'TF', 'ATF', 260, 'French South Terr.'), 
    237 (79, 'GA', 'GAB', 266, 'Gabon'), 
    238 (80, 'GM', 'GMB', 270, 'Gambia'), 
    239 (81, 'GE', 'GEO', 268, 'Georgia'), 
    240 (82, 'DE', 'DEU', 276, 'Germany'), 
    241 (83, 'GH', 'GHA', 288, 'Ghana'), 
    242 (84, 'GI', 'GIB', 292, 'Gibraltar'), 
    243 (85, 'GR', 'GRC', 300, 'Greece'), 
    244 (86, 'GL', 'GRL', 304, 'Greenland'), 
    245 (87, 'GD', 'GRD', 308, 'Grenada'), 
    246 (88, 'GP', 'GLP', 312, 'Guadeloupe'), 
    247 (89, 'GU', 'GUM', 316, 'Guam'), 
    248 (90, 'GT', 'GTM', 320, 'Guatemala'), 
    249 (91, 'GN', 'GIN', 324, 'Guinea'), 
    250 (92, 'GW', 'GNB', 624, 'Guinea-Bissau'), 
    251 (93, 'GY', 'GUY', 328, 'Guyana'), 
    252 (94, 'HT', 'HTI', 332, 'Haiti'), 
    253 (95, 'HM', 'HMD', 334, 'Heard & Mc Donald Is.'), 
    254 (96, 'VA', 'VAT', 336, 'Holy See(Vatican City St.)'), 
    255 (97, 'HN', 'HND', 340, 'Honduras'), 
    256 (98, 'HK', 'HKG', 344, 'Hong Kong'), 
    257 (99, 'HU', 'HUN', 348, 'Hungary'), 
    258 (100, 'IS', 'ISL', 352, 'Iceland'), 
    259 (101, 'IN', 'IND', 356, 'India'), 
    260 (102, 'ID', 'IDN', 360, 'Indonesia'), 
    261 (103, 'IR', 'IRN', 364, 'Iran (Islamic Rep.)'), 
    262 (104, 'IQ', 'IRQ', 368, 'Iraq'), 
    263 (105, 'IE', 'IRL', 372, 'Ireland'), 
    264 (106, 'IL', 'ISR', 376, 'Israel'), 
    265 (107, 'IT', 'ITA', 380, 'Italy'), 
    266 (108, 'JM', 'JAM', 388, 'Jamaica'), 
    267 (109, 'JP', 'JPN', 392, 'Japan'), 
    268 (110, 'JO', 'JOR', 400, 'Jordan'), 
    269 (111, 'KZ', 'KAZ', 398, 'Kazakhstan'), 
    270 (112, 'KE', 'KEN', 404, 'Kenya'), 
    271 (113, 'KI', 'KIR', 296, 'Kiribati'), 
    272 (114, 'KP', 'PRK', 408, 'Korea, Dem. People''s Rep.'), 
    273 (115, 'KR', 'KOR', 410, 'Korea, Rep.'), 
    274 (116, 'KW', 'KWT', 414, 'Kuwait'), 
    275 (117, 'KG', 'KGZ', 417, 'Kyrgyzstan'), 
    276 (118, 'LA', 'LAO', 418, 'Lao People''s Dem. Rep.'), 
    277 (119, 'LV', 'LVA', 428, 'Latvia'), 
    278 (120, 'LB', 'LBN', 422, 'Lebanon'), 
    279 (121, 'LS', 'LSO', 426, 'Lesotho'), 
    280 (122, 'LR', 'LBR', 430, 'Liberia'), 
    281 (123, 'LY', 'LBY', 434, 'Libyan Arab Jamahiriya'), 
    282 (124, 'LI', 'LIE', 438, 'Liechtenstein'), 
    283 (125, 'LT', 'LTU', 440, 'Lithuania'), 
    284 (126, 'LU', 'LUX', 442, 'Luxembourg'), 
    285 (127, 'MO', 'MAC', 446, 'Macau'), 
    286 (128, 'MK', 'MKD', 807, 'Macedonia, Frmr. Yugoslav Rep.'), 
    287 (129, 'MG', 'MDG', 450, 'Madagascar'), 
    288 (130, 'MW', 'MWI', 454, 'Malawi'), 
    289 (131, 'MY', 'MYS', 458, 'Malaysia'), 
    290 (132, 'MV', 'MDV', 462, 'Maldives'), 
    291 (133, 'ML', 'MLI', 466, 'Mali'), 
    292 (134, 'MT', 'MLT', 470, 'Malta'), 
    293 (135, 'MH', 'MHL', 584, 'Marshall Is.'), 
    294 (136, 'MQ', 'MTQ', 474, 'Martinique'), 
    295 (137, 'MR', 'MRT', 478, 'Mauritania'), 
    296 (138, 'MU', 'MUS', 480, 'Mauritius'), 
    297 (139, 'YT', 'MYT', 175, 'Mayotte'), 
    298 (140, 'MX', 'MEX', 484, 'Mexico'), 
    299 (141, 'FM', 'FSM', 583, 'Micronesia, Fed. St.'), 
    300 (142, 'MD', 'MDA', 498, 'Moldova, Rep.'), 
    301 (143, 'MC', 'MCO', 492, 'Monaco'), 
    302 (144, 'MN', 'MNG', 496, 'Mongolia'), 
    303 (145, 'MS', 'MSR', 500, 'Montserrat'), 
    304 (146, 'MA', 'MAR', 504, 'Morocco'), 
    305 (147, 'MZ', 'MOZ', 508, 'Mozambique'), 
    306 (148, 'MM', 'MMR', 104, 'Myanmar'), 
    307 (149, 'NA', 'NAM', 516, 'Namibia'), 
    308 (150, 'NR', 'NRU', 520, 'Nauru'), 
    309 (151, 'NP', 'NPL', 524, 'Nepal'), 
    310 (152, 'NL', 'NLD', 528, 'Netherlands'), 
    311 (153, 'AN', 'ANT', 530, 'Netherlands Antilles'), 
    312 (154, 'NC', 'NCL', 540, 'New Caledonia'), 
    313 (155, 'NZ', 'NZL', 554, 'New Zealand'), 
    314 (156, 'NI', 'NIC', 558, 'Nicaragua'), 
    315 (157, 'NE', 'NER', 562, 'Niger'), 
    316 (158, 'NG', 'NGA', 566, 'Nigeria'), 
    317 (159, 'NU', 'NIU', 570, 'Niue'), 
    318 (160, 'NF', 'NFK', 574, 'Norfolk Island'), 
    319 (161, 'MP', 'MNP', 580, 'Norhtern Mariana Is.'), 
    320 (162, 'NO', 'NOR', 578, 'Norway'), 
    321 (163, 'OM', 'OMN', 512, 'Oman'), 
    322 (164, 'PK', 'PAK', 586, 'Pakistan'), 
    323 (165, 'PW', 'PLW', 585, 'Palau'), 
    324 (166, 'PS', 'PSE', 275, 'Palestinian Terr.'), 
    325 (167, 'PA', 'PAN', 591, 'Panama'), 
    326 (168, 'PG', 'PNG', 598, 'Papua New Guinea'), 
    327 (169, 'PY', 'PRY', 600, 'Paraguay'), 
    328 (170, 'PE', 'PER', 604, 'Peru'), 
    329 (171, 'PH', 'PHL', 608, 'Philippines'), 
    330 (172, 'PN', 'PCN', 612, 'Pitcairn'), 
    331 (173, 'PL', 'POL', 616, 'Poland'), 
    332 (174, 'PT', 'PRT', 620, 'Portugal'), 
    333 (175, 'PR', 'PRI', 630, 'Puerto Rico'), 
    334 (176, 'QA', 'QAT', 634, 'Qatar'), 
    335 (177, 'RE', 'REU', 638, 'Reunion'), 
    336 (178, 'RO', 'ROM', 642, 'Romain'), 
    337 (179, 'RU', 'RUS', 643, 'Russian Federation'), 
    338 (180, 'RW', 'RWA', 646, 'Rwanda'), 
    339 (181, 'KN', 'KNA', 659, 'Saint Kitts & Nevis'), 
    340 (182, 'LC', 'LCA', 662, 'Saint Lucia'), 
    341 (183, 'VC', 'VCT', 670, 'Saint Vincent & The Grenadines'), 
    342 (184, 'WS', 'WSM', 882, 'Samoa'), 
    343 (185, 'SM', 'SMR', 674, 'San Marino'), 
    344 (186, 'ST', 'STP', 678, 'Sao Tome Principe'), 
    345 (187, 'SA', 'SAU', 682, 'Saudi Arabia'), 
    346 (188, 'SN', 'SEN', 686, 'Senegal'), 
    347 (189, 'SC', 'SYC', 690, 'Seychelles'), 
    348 (190, 'SL', 'SLE', 694, 'Sierra Leone'), 
    349 (191, 'SG', 'SGP', 702, 'Singapore'), 
    350 (192, 'SK', 'SVK', 703, 'Slovakia (Slovak Rep.)'), 
    351 (193, 'SI', 'SVN', 705, 'Slovenia'), 
    352 (194, 'SB', 'SLB', 90, 'Solomon Islands'), 
    353 (195, 'SO', 'SOM', 706, 'Somalia'), 
    354 (196, 'ZA', 'ZAF', 710, 'South Africa'), 
    355 (197, 'GS', 'SGS', 239, 'S. Georgia & The S. Sandwich Is.'), 
    356 (198, 'ES', 'ESP', 724, 'Spain'), 
    357 (199, 'LK', 'LKA', 144, 'Sri Lanka'), 
    358 (200, 'SH', 'SHN', 654, 'St. Helena'), 
    359 (201, 'PM', 'SPM', 666, 'St. Pierre & Miquelon'), 
    360 (202, 'SD', 'SDN', 736, 'Sudan'), 
    361 (203, 'SR', 'SUR', 740, 'Suriname'), 
    362 (204, 'SJ', 'SJM', 744, 'Svalbard & Jan Mayen Is.'), 
    363 (205, 'SZ', 'SWZ', 748, 'Swaziland'), 
    364 (206, 'SE', 'SWE', 752, 'Sweden'), 
    365 (207, 'CH', 'CHE', 756, 'Switzerland'), 
    366 (208, 'SY', 'SYR', 760, 'Syrian Arab Rep.'), 
    367 (209, 'TW', 'TWN', 158, 'Taiwan, Prov. of China'), 
    368 (210, 'TJ', 'TJK', 762, 'Tajikistan'), 
    369 (211, 'TZ', 'TZA', 834, 'Tanzania, United Rep.'), 
    370 (212, 'TH', 'THA', 764, 'Thailand'), 
    371 (213, 'TG', 'TGO', 768, 'Togo'), 
    372 (214, 'TK', 'TKL', 772, 'Tokelau'), 
    373 (215, 'TO', 'TON', 776, 'Tonga'), 
    374 (216, 'TT', 'TTO', 780, 'Trinidad & Tobago'), 
    375 (217, 'TN', 'TUN', 788, 'Tunisia'), 
    376 (218, 'TR', 'TUR', 792, 'Turkey'), 
    377 (219, 'TM', 'TKM', 795, 'Turkmenistan'), 
    378 (220, 'TC', 'TCA', 796, 'Turks & Caicos Is.'), 
    379 (221, 'TV', 'TUV', 798, 'Tuvalu'), 
    380 (222, 'UG', 'UGA', 800, 'Uganda'), 
    381 (223, 'UA', 'UKR', 804, 'Ukraine'), 
    382 (224, 'AE', 'ARE', 784, 'United Arab Emirates'), 
    383 (225, 'US', 'USA', 840, 'United States'), 
    384 (226, 'UM', 'UMI', 581, 'U.S. Minor Outlying Is.'), 
    385 (227, 'UY', 'URY', 858, 'Uruguay'), 
    386 (228, 'UZ', 'UZB', 860, 'Uzbekistan'), 
    387 (229, 'VU', 'VUT', 548, 'Vanuatu'), 
    388 (230, 'VE', 'VEN', 862, 'Venezuela'), 
    389 (231, 'VN', 'VNM', 704, 'Vietnam'), 
    390 (232, 'VG', 'VGB', 92, 'Virgin Is. (British)'), 
    391 (233, 'VI', 'VIR', 850, 'Virgin Is. (U.S.)'), 
    392 (234, 'WF', 'WLF', 876, 'Wallis & Futuna Is.'), 
    393 (235, 'EH', 'ESH', 732, 'Western Sahara'), 
    394 (236, 'YE', 'YEM', 887, 'Yemen'), 
    395 (237, 'YU', 'YUG', 891, 'Yugoslavia'), 
    396 (238, 'ZM', 'ZMB', 894, 'Zambia'), 
    397 (239, 'ZW', 'ZWE', 716, 'Zimbabwe'); 
     271INSERT INTO `countries` (`id`, `continents_code`, `countries_iso_code_2`, `countries_iso_code_3`, `countries_number`, `countries_name`, `active`) VALUES  
     272(1, 'AS', 'AF', 'AFG', '004', 'Afghanistan', 1), 
     273(2, 'EU', 'AX', 'ALA', '248', 'Ă…land Islands', 1), 
     274(3, 'EU', 'AL', 'ALB', '008', 'Albania', 1), 
     275(4, 'AF', 'DZ', 'DZA', '012', 'Algeria', 1), 
     276(5, 'OC', 'AS', 'ASM', '016', 'American Samoa', 1), 
     277(6, 'EU', 'AD', 'AND', '020', 'Andorra', 1), 
     278(7, 'AF', 'AO', 'AGO', '024', 'Angola', 1), 
     279(8, 'NA', 'AI', 'AIA', '660', 'Anguilla', 1), 
     280(9, 'AN', 'AQ', 'ATA', '010', 'Antarctica', 1), 
     281(10, 'NA', 'AG', 'ATG', '028', 'Antigua and Barbuda', 1), 
     282(11, 'SA', 'AR', 'ARG', '032', 'Argentina', 1), 
     283(12, 'AS', 'AM', 'ARM', '051', 'Armenia', 1), 
     284(13, 'NA', 'AW', 'ABW', '533', 'Aruba', 1), 
     285(14, 'OC', 'AU', 'AUS', '036', 'Australia', 1), 
     286(15, 'EU', 'AT', 'AUT', '040', 'Austria', 1), 
     287(16, 'AS', 'AZ', 'AZE', '031', 'Azerbaijan', 1), 
     288(17, 'NA', 'BS', 'BHS', '044', 'Bahamas', 1), 
     289(18, 'AS', 'BH', 'BHR', '048', 'Bahrain', 1), 
     290(19, 'AS', 'BD', 'BGD', '050', 'Bangladesh', 1), 
     291(20, 'NA', 'BB', 'BRB', '052', 'Barbados', 1), 
     292(21, 'EU', 'BY', 'BLR', '112', 'Belarus', 1), 
     293(22, 'EU', 'BE', 'BEL', '056', 'Belgium', 1), 
     294(23, 'NA', 'BZ', 'BLZ', '084', 'Belize', 1), 
     295(24, 'AF', 'BJ', 'BEN', '204', 'Benin', 1), 
     296(25, 'NA', 'BM', 'BMU', '060', 'Bermuda', 1), 
     297(26, 'AS', 'BT', 'BTN', '064', 'Bhutan', 1), 
     298(27, 'SA', 'BO', 'BOL', '068', 'Bolivia', 1), 
     299(28, 'EU', 'BA', 'BIH', '070', 'Bosnia and Herzegovina', 1), 
     300(29, 'AF', 'BW', 'BWA', '072', 'Botswana', 1), 
     301(30, 'AN', 'BV', 'BVT', '074', 'Bouvet Island', 1), 
     302(31, 'SA', 'BR', 'BRA', '076', 'Brazil', 1), 
     303(32, 'AS', 'IO', 'IOT', '086', 'British Indian Ocean Territory', 1), 
     304(33, 'NA', 'VG', 'VGB', '092', 'British Virgin Islands', 1), 
     305(34, 'AS', 'BN', 'BRN', '096', 'Brunei Darussalam', 1), 
     306(35, 'EU', 'BG', 'BGR', '100', 'Bulgaria', 1), 
     307(36, 'AF', 'BF', 'BFA', '854', 'Burkina Faso', 1), 
     308(37, 'AF', 'BI', 'BDI', '108', 'Burundi', 1), 
     309(38, 'AS', 'KH', 'KHM', '116', 'Cambodia', 1), 
     310(39, 'AF', 'CM', 'CMR', '120', 'Cameroon', 1), 
     311(40, 'NA', 'CA', 'CAN', '124', 'Canada', 1), 
     312(41, 'AF', 'CV', 'CPV', '132', 'Cape Verde', 1), 
     313(42, 'NA', 'KY', 'CYM', '136', 'Cayman Islands', 1), 
     314(43, 'AF', 'CF', 'CAF', '140', 'Central African Republic', 1), 
     315(44, 'AF', 'TD', 'TCD', '148', 'Chad', 1), 
     316(45, 'SA', 'CL', 'CHL', '152', 'Chile', 1), 
     317(46, 'AS', 'CN', 'CHN', '156', 'China', 1), 
     318(47, 'AS', 'CX', 'CXR', '162', 'Christmas Island', 1), 
     319(48, 'AS', 'CC', 'CCK', '166', 'Cocos (Keeling) Islands', 1), 
     320(49, 'SA', 'CO', 'COL', '170', 'Colombia', 1), 
     321(50, 'AF', 'KM', 'COM', '174', 'Comoros', 1), 
     322(51, 'AF', 'CG', 'COG', '178', 'Congo', 1), 
     323(52, 'OC', 'CK', 'COK', '184', 'Cook Islands', 1), 
     324(53, 'NA', 'CR', 'CRI', '188', 'Costa Rica', 1), 
     325(54, 'AF', 'CI', 'CIV', '384', 'Cote D''Ivoire', 1), 
     326(55, 'EU', 'HR', 'HRV', '191', 'Croatia', 1), 
     327(56, 'NA', 'CU', 'CUB', '192', 'Cuba', 1), 
     328(57, 'AS', 'CY', 'CYP', '196', 'Cyprus', 1), 
     329(58, 'EU', 'CZ', 'CZE', '203', 'Czech Republic', 1), 
     330(59, 'EU', 'DK', 'DNK', '208', 'Denmark', 1), 
     331(60, 'AF', 'DJ', 'DJI', '262', 'Djibouti', 1), 
     332(61, 'NA', 'DM', 'DMA', '212', 'Dominica', 1), 
     333(62, 'NA', 'DO', 'DOM', '214', 'Dominican Republic', 1), 
     334(63, 'SA', 'EC', 'ECU', '218', 'Ecuador', 1), 
     335(64, 'AF', 'EG', 'EGY', '818', 'Egypt', 1), 
     336(65, 'NA', 'SV', 'SLV', '222', 'El Salvador', 1), 
     337(66, 'AF', 'GQ', 'GNQ', '226', 'Equatorial Guinea', 1), 
     338(67, 'AF', 'ER', 'ERI', '232', 'Eritrea', 1), 
     339(68, 'EU', 'EE', 'EST', '233', 'Estonia', 1), 
     340(69, 'AF', 'ET', 'ETH', '231', 'Ethiopia', 1), 
     341(70, 'EU', 'FO', 'FRO', '234', 'Faroe Islands', 1), 
     342(71, 'SA', 'FK', 'FLK', '238', 'Falkland Islands', 1), 
     343(72, 'OC', 'FJ', 'FJI', '242', 'Fiji', 1), 
     344(73, 'EU', 'FI', 'FIN', '246', 'Finland', 1), 
     345(74, 'EU', 'FR', 'FRA', '250', 'France', 1), 
     346(75, 'SA', 'GF', 'GUF', '254', 'French Guiana', 1), 
     347(76, 'OC', 'PF', 'PYF', '258', 'French Polynesia', 1), 
     348(77, 'AN', 'TF', 'ATF', '260', 'French Southern Territories', 1), 
     349(78, 'AF', 'GA', 'GAB', '266', 'Gabon', 1), 
     350(79, 'AF', 'GM', 'GMB', '270', 'Gambia', 1), 
     351(80, 'AS', 'GE', 'GEO', '268', 'Georgia', 1), 
     352(81, 'EU', 'DE', 'DEU', '276', 'Germany', 1), 
     353(82, 'AF', 'GH', 'GHA', '288', 'Ghana', 1), 
     354(83, 'EU', 'GI', 'GIB', '292', 'Gibraltar', 1), 
     355(84, 'EU', 'GR', 'GRC', '300', 'Greece', 1), 
     356(85, 'NA', 'GL', 'GRL', '304', 'Greenland', 1), 
     357(86, 'NA', 'GD', 'GRD', '308', 'Grenada', 1), 
     358(87, 'NA', 'GP', 'GLP', '312', 'Guadaloupe', 1), 
     359(88, 'OC', 'GU', 'GUM', '316', 'Guam', 1), 
     360(89, 'NA', 'GT', 'GTM', '320', 'Guatemala', 1), 
     361(90, 'EU', 'GG', 'GGY', '831', 'Guernsey', 1), 
     362(91, 'AF', 'GN', 'GIN', '324', 'Guinea', 1), 
     363(92, 'AF', 'GW', 'GNB', '624', 'Guinea-Bissau', 1), 
     364(93, 'SA', 'GY', 'GUY', '328', 'Guyana', 1), 
     365(94, 'NA', 'HT', 'HTI', '332', 'Haiti', 1), 
     366(95, 'AN', 'HM', 'HMD', '334', 'Heard and McDonald Islands', 1), 
     367(96, 'EU', 'VA', 'VAT', '336', 'Holy See (Vatican City State)', 1), 
     368(97, 'NA', 'HN', 'HND', '340', 'Honduras', 1), 
     369(98, 'AS', 'HK', 'HKG', '344', 'Hong Kong', 1), 
     370(99, 'EU', 'HU', 'HUN', '348', 'Hungary', 1), 
     371(100, 'EU', 'IS', 'ISL', '352', 'Iceland', 1), 
     372(101, 'AS', 'IN', 'IND', '356', 'India', 1), 
     373(102, 'AS', 'ID', 'IDN', '360', 'Indonesia', 1), 
     374(103, 'AS', 'IR', 'IRN', '364', 'Iran', 1), 
     375(104, 'AS', 'IQ', 'IRQ', '368', 'Iraq', 1), 
     376(105, 'EU', 'IE', 'IRL', '372', 'Ireland', 1), 
     377(106, 'EU', 'IM', 'IMN', '833', 'Isle of Man', 1), 
     378(107, 'AS', 'IL', 'ISR', '376', 'Israel', 1), 
     379(108, 'EU', 'IT', 'ITA', '380', 'Italy', 1), 
     380(109, 'NA', 'JM', 'JAM', '388', 'Jamaica', 1), 
     381(110, 'AS', 'JP', 'JPN', '392', 'Japan', 1), 
     382(111, 'EU', 'JE', 'JEY', '832', 'Jersey', 1), 
     383(112, 'AS', 'JO', 'JOR', '400', 'Jordan', 1), 
     384(113, 'AS', 'KZ', 'KAZ', '398', 'Kazakhstan', 1), 
     385(114, 'AF', 'KE', 'KEN', '404', 'Kenya', 1), 
     386(115, 'OC', 'KI', 'KIR', '296', 'Kiribati', 1), 
     387(116, 'AS', 'KP', 'PRK', '408', 'Korea, Democratic People''s Republic of', 1), 
     388(117, 'AS', 'KR', 'KOR', '410', 'Korea, Republic of', 1), 
     389(118, 'AS', 'KW', 'KWT', '414', 'Kuwait', 1), 
     390(119, 'AS', 'KG', 'KGZ', '417', 'Kyrgyz Republic', 1), 
     391(120, 'AS', 'LA', 'LAO', '418', 'Lao, People''s Democratic Republic', 1), 
     392(121, 'EU', 'LV', 'LVA', '428', 'Latvia', 1), 
     393(122, 'AS', 'LB', 'LBN', '422', 'Lebanon', 1), 
     394(123, 'AF', 'LS', 'LSO', '426', 'Lesotho', 1), 
     395(124, 'AF', 'LR', 'LBR', '430', 'Liberia', 1), 
     396(125, 'AF', 'LY', 'LBY', '434', 'Libyan Arab Jamahiriya', 1), 
     397(126, 'EU', 'LI', 'LIE', '438', 'Liechtenstein', 1), 
     398(127, 'EU', 'LT', 'LTU', '440', 'Lithuania', 1), 
     399(128, 'EU', 'LU', 'LUX', '442', 'Luxembourg', 1), 
     400(129, 'AS', 'MO', 'MAC', '446', 'Macao', 1), 
     401(130, 'EU', 'MK', 'MKD', '807', 'Macedonia the former Yugoslav Republic of', 1), 
     402(131, 'AF', 'MG', 'MDG', '450', 'Madagascar', 1), 
     403(132, 'AF', 'MW', 'MWI', '454', 'Malawi', 1), 
     404(133, 'AS', 'MY', 'MYS', '458', 'Malaysia', 1), 
     405(134, 'AS', 'MV', 'MDV', '462', 'Maldives', 1), 
     406(135, 'AF', 'ML', 'MLI', '466', 'Mali', 1), 
     407(136, 'EU', 'MT', 'MLT', '470', 'Malta', 1), 
     408(137, 'OC', 'MH', 'MHL', '584', 'Marshall Islands', 1), 
     409(138, 'NA', 'MQ', 'MTQ', '474', 'Martinique', 1), 
     410(139, 'AF', 'MR', 'MRT', '478', 'Mauritania', 1), 
     411(140, 'AF', 'MU', 'MUS', '480', 'Mauritius', 1), 
     412(141, 'AF', 'YT', 'MYT', '175', 'Mayotte', 1), 
     413(142, 'NA', 'MX', 'MEX', '484', 'Mexico', 1), 
     414(143, 'OC', 'FM', 'FSM', '583', 'Micronesia', 1), 
     415(144, 'EU', 'MD', 'MDA', '498', 'Moldova', 1), 
     416(145, 'EU', 'MC', 'MCO', '492', 'Monaco', 1), 
     417(146, 'AS', 'MN', 'MNG', '496', 'Mongolia', 1), 
     418(147, 'EU', 'ME', 'MNE', '499', 'Montenegro', 1), 
     419(148, 'NA', 'MS', 'MSR', '500', 'Montserrat', 1), 
     420(149, 'AF', 'MA', 'MAR', '504', 'Morocco', 1), 
     421(150, 'AF', 'MZ', 'MOZ', '508', 'Mozambique', 1), 
     422(151, 'AS', 'MM', 'MMR', '104', 'Myanmar', 1), 
     423(152, 'AF', 'NA', 'NAM', '516', 'Namibia', 1), 
     424(153, 'OC', 'NR', 'NRU', '520', 'Nauru', 1), 
     425(154, 'AS', 'NP', 'NPL', '524', 'Nepal', 1), 
     426(155, 'NA', 'AN', 'ANT', '530', 'Netherlands Antilles', 1), 
     427(156, 'EU', 'NL', 'NLD', '528', 'Netherlands', 1), 
     428(157, 'OC', 'NC', 'NCL', '540', 'New Caledonia', 1), 
     429(158, 'OC', 'NZ', 'NZL', '554', 'New Zealand', 1), 
     430(159, 'NA', 'NI', 'NIC', '558', 'Nicaragua', 1), 
     431(160, 'AF', 'NE', 'NER', '562', 'Niger', 1), 
     432(161, 'AF', 'NG', 'NGA', '566', 'Nigeria', 1), 
     433(162, 'OC', 'NU', 'NIU', '570', 'Niue', 1), 
     434(163, 'OC', 'NF', 'NFK', '574', 'Norfolk Island', 1), 
     435(164, 'OC', 'MP', 'MNP', '580', 'Northern Mariana Islands', 1), 
     436(165, 'EU', 'NO', 'NOR', '578', 'Norway', 1), 
     437(166, 'AS', 'OM', 'OMN', '512', 'Oman', 1), 
     438(167, 'AS', 'PK', 'PAK', '586', 'Pakistan', 1), 
     439(168, 'OC', 'PW', 'PLW', '585', 'Palau', 1), 
     440(169, 'AS', 'PS', 'PSE', '275', 'Palestinian Territory', 1), 
     441(170, 'NA', 'PA', 'PAN', '591', 'Panama', 1), 
     442(171, 'OC', 'PG', 'PNG', '598', 'Papua New Guinea', 1), 
     443(172, 'SA', 'PY', 'PRY', '600', 'Paraguay', 1), 
     444(173, 'SA', 'PE', 'PER', '604', 'Peru', 1), 
     445(174, 'AS', 'PH', 'PHL', '608', 'Philippines', 1), 
     446(175, 'OC', 'PN', 'PCN', '612', 'Pitcairn Island', 1), 
     447(176, 'EU', 'PL', 'POL', '616', 'Poland', 1), 
     448(177, 'EU', 'PT', 'PRT', '620', 'Portugal', 1), 
     449(178, 'NA', 'PR', 'PRI', '630', 'Puerto Rico', 1), 
     450(179, 'AS', 'QA', 'QAT', '634', 'Qatar State of', 1), 
     451(180, 'AF', 'RE', 'REU', '638', 'Reunion', 1), 
     452(181, 'EU', 'RO', 'ROU', '642', 'Romania', 1), 
     453(182, 'EU', 'RU', 'RUS', '643', 'Russian Federation', 1), 
     454(183, 'AF', 'RW', 'RWA', '646', 'Rwanda', 1), 
     455(184, 'AF', 'SH', 'SHN', '654', 'St Helena', 1), 
     456(185, 'NA', 'KN', 'KNA', '659', 'St Kitts and Nevis', 1), 
     457(186, 'NA', 'LC', 'LCA', '662', 'St Lucia', 1), 
     458(187, 'NA', 'PM', 'SPM', '666', 'St Pierre and Miquelon', 1), 
     459(188, 'NA', 'VC', 'VCT', '670', 'St Vincent and the Grenadines', 1), 
     460(189, 'OC', 'WS', 'WSM', '882', 'Samoa', 1), 
     461(190, 'EU', 'SM', 'SMR', '674', 'San Marino', 1), 
     462(191, 'AF', 'ST', 'STP', '678', 'Sao Tome and Principe', 1), 
     463(192, 'AS', 'SA', 'SAU', '682', 'Saudi Arabia', 1), 
     464(193, 'AF', 'SN', 'SEN', '686', 'Senegal', 1), 
     465(194, 'EU', 'RS', 'SRB', '688', 'Serbia', 1), 
     466(195, 'AF', 'SC', 'SYC', '690', 'Seychelles', 1), 
     467(196, 'AF', 'SL', 'SLE', '694', 'Sierra Leone', 1), 
     468(197, 'AS', 'SG', 'SGP', '702', 'Singapore', 1), 
     469(198, 'EU', 'SK', 'SVK', '703', 'Slovakia', 1), 
     470(199, 'EU', 'SI', 'SVN', '705', 'Slovenia', 1), 
     471(200, 'OC', 'SB', 'SLB', '090', 'Solomon Islands', 1), 
     472(201, 'AF', 'SO', 'SOM', '706', 'Somalia', 1), 
     473(202, 'AF', 'ZA', 'ZAF', '710', 'South Africa', 1), 
     474(203, 'AN', 'GS', 'SGS', '239', 'South Georgia and the South Sandwich Islands', 1), 
     475(204, 'EU', 'ES', 'ESP', '724', 'Spain', 1), 
     476(205, 'AS', 'LK', 'LKA', '144', 'Sri Lanka', 1), 
     477(206, 'AF', 'SD', 'SDN', '736', 'Sudan', 1), 
     478(207, 'SA', 'SR', 'SUR', '740', 'Suriname', 1), 
     479(208, 'EU', 'SJ', 'SJM', '744', 'Svalbard & Jan Mayen Islands', 1), 
     480(209, 'AF', 'SZ', 'SWZ', '748', 'Swaziland', 1), 
     481(210, 'EU', 'SE', 'SWE', '752', 'Sweden', 1), 
     482(211, 'EU', 'CH', 'CHE', '756', 'Switzerland', 1), 
     483(212, 'AS', 'SY', 'SYR', '760', 'Syrian Arab Republic', 1), 
     484(213, 'AS', 'TW', 'TWN', '158', 'Taiwan', 1), 
     485(214, 'AS', 'TJ', 'TJK', '762', 'Tajikistan', 1), 
     486(215, 'AF', 'TZ', 'TZA', '834', 'Tanzania', 1), 
     487(216, 'AS', 'TH', 'THA', '764', 'Thailand', 1), 
     488(217, 'AS', 'TL', 'TLS', '626', 'Timor-Leste', 1), 
     489(218, 'AF', 'TG', 'TGO', '768', 'Togo', 1), 
     490(219, 'OC', 'TK', 'TKL', '772', 'Tokelau', 1), 
     491(220, 'OC', 'TO', 'TON', '776', 'Tonga', 1), 
     492(221, 'NA', 'TT', 'TTO', '780', 'Trinidad and Tobago', 1), 
     493(222, 'AF', 'TN', 'TUN', '788', 'Tunisia', 1), 
     494(223, 'AS', 'TR', 'TUR', '792', 'Turkey', 1), 
     495(224, 'AS', 'TM', 'TKM', '795', 'Turkmenistan', 1), 
     496(225, 'NA', 'TC', 'TCA', '796', 'Turks and Caicos Islands', 1), 
     497(226, 'OC', 'TV', 'TUV', '798', 'Tuvalu', 1), 
     498(227, 'NA', 'VI', 'VIR', '850', 'US Virgin Islands', 1), 
     499(228, 'AF', 'UG', 'UGA', '800', 'Uganda', 1), 
     500(229, 'EU', 'UA', 'UKR', '804', 'Ukraine', 1), 
     501(230, 'AS', 'AE', 'ARE', '784', 'United Arab Emirates', 1), 
     502(231, 'EU', 'GB', 'GBR', '826', 'United Kingdom', 1), 
     503(232, 'OC', 'UM', 'UMI', '581', 'United States Minor Outlying Islands', 1), 
     504(233, 'NA', 'US', 'USA', '840', 'United States of America', 1), 
     505(234, 'SA', 'UY', 'URY', '858', 'Uruguay', 1), 
     506(235, 'AS', 'UZ', 'UZB', '860', 'Uzbekistan', 1), 
     507(236, 'OC', 'VU', 'VUT', '548', 'Vanuatu', 1), 
     508(237, 'SA', 'VE', 'VEN', '862', 'Venezuela', 1), 
     509(238, 'AS', 'VN', 'VNM', '704', 'Viet Nam', 1), 
     510(239, 'OC', 'WF', 'WLF', '876', 'Wallis and Futuna Islands', 1), 
     511(240, 'AF', 'EH', 'ESH', '732', 'Western Sahara', 1), 
     512(241, 'AS', 'YE', 'YEM', '887', 'Yemen', 1), 
     513(242, 'AF', 'ZM', 'ZMB', '894', 'Zambia', 1), 
     514(243, 'AF', 'ZW', 'ZWE', '716', 'Zimbabwe', 1); 
    398515 
    399516-- -------------------------------------------------------- 
     
    409526  `events_count` int(8) unsigned default '0', 
    410527  PRIMARY KEY  (`id`) 
    411 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5
     528) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    412529 
    413530--  
     
    446563  `modified` datetime default NULL, 
    447564  PRIMARY KEY  (`id`) 
    448 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
     565) ENGINE=MyISAM DEFAULT CHARSET=utf8
    449566 
    450567--  
    451568-- Dumping data for table `events` 
    452569--  
     570 
    453571 
    454572-- -------------------------------------------------------- 
     
    469587--  
    470588 
     589 
    471590-- -------------------------------------------------------- 
    472591 
     
    485604  `modified` datetime NOT NULL, 
    486605  PRIMARY KEY  (`id`) 
    487 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     606) ENGINE=MyISAM DEFAULT CHARSET=utf8
    488607 
    489608--  
     
    510629  `modified` datetime NOT NULL, 
    511630  PRIMARY KEY  (`id`) 
    512 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     631) ENGINE=MyISAM DEFAULT CHARSET=utf8
    513632 
    514633--  
     
    568687  `modified` datetime NOT NULL default '0000-00-00 00:00:00', 
    569688  PRIMARY KEY  (`id`) 
    570 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5
     689) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    571690 
    572691--  
     
    630749  `modified` datetime default NULL, 
    631750  PRIMARY KEY  (`id`) 
    632 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8
     751) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    633752 
    634753--  
     
    694813  `modified` datetime NOT NULL, 
    695814  PRIMARY KEY  (`id`) 
    696 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=44
     815) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    697816 
    698817--  
     
    714833(12, 'Admin', '#', 5, '', 0, 7, 63, 1, 900, 1, '0000-00-00 00:00:00', '2007-07-18 00:07:09'), 
    715834(13, 'Galleries', '/galleries/', 3, NULL, 0, 66, 67, 1, 0, 1, '0000-00-00 00:00:00', '2007-07-18 00:07:09'), 
    716 (14, 'Manage Videos', '/admin/videos', 1, 'admin-videos', 30, 37, 40, 1, 900, 1, '0000-00-00 00:00:00', '2007-07-18 00:07:09'), 
     835(14, 'Manage Videos', '/admin/videos/home', 1, 'admin-videos', 30, 37, 40, 1, 900, 1, '0000-00-00 00:00:00', '2007-07-18 00:07:09'), 
    717836(15, 'Videos', '/videos', 4, '', 0, 64, 65, 1, 0, 1, '0000-00-00 00:00:00', '2007-07-18 00:07:09'), 
    718837(16, 'Manage Menus', '/admin/menus', 1, 'admin-menus', 31, 19, 22, 1, 900, 1, '0000-00-00 00:00:00', '2007-07-18 00:07:09'), 
     
    766885  `modified` datetime NOT NULL, 
    767886  PRIMARY KEY  (`id`) 
    768 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 
     887) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    769888 
    770889--  
    771890-- Dumping data for table `pages` 
    772891--  
     892 
    773893 
    774894-- -------------------------------------------------------- 
     
    788908-- Dumping data for table `pages_tags` 
    789909--  
     910 
    790911 
    791912-- -------------------------------------------------------- 
     
    803924  PRIMARY KEY  (`id`), 
    804925  UNIQUE KEY `name` (`name`) 
    805 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11
     926) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    806927 
    807928--  
     
    833954  `comments` varchar(255) collate utf8_unicode_ci NOT NULL, 
    834955  PRIMARY KEY  (`id`) 
    835 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1
     956) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
    836957 
    837958--  
     
    8831004  `modified` datetime default NULL, 
    8841005  PRIMARY KEY  (`id`) 
    885 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8
     1006) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    8861007 
    8871008--  
    8881009-- Dumping data for table `posts` 
    8891010--  
    890  
    8911011-- -------------------------------------------------------- 
    8921012 
     
    9051025-- Dumping data for table `posts_tags` 
    9061026--  
     1027 
    9071028-- -------------------------------------------------------- 
    9081029 
     
    9221043  `modified` datetime NOT NULL, 
    9231044  PRIMARY KEY  (`id`) 
    924 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     1045) ENGINE=MyISAM DEFAULT CHARSET=utf8
    9251046 
    9261047--  
     
    9401061  `name` varchar(50) NOT NULL, 
    9411062  PRIMARY KEY  (`id`) 
    942 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2
     1063) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    9431064 
    9441065--  
     
    9621083  `cntry` varchar(13) collate utf8_unicode_ci NOT NULL, 
    9631084  PRIMARY KEY  (`id`) 
    964 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=67
     1085) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
    9651086 
    9661087--  
     
    10561177  `modified` datetime default NULL, 
    10571178  PRIMARY KEY  (`id`) 
    1058 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4
     1179) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    10591180 
    10601181--  
     
    10631184 
    10641185INSERT INTO `subjects` (`id`, `title`, `posts_count`, `pages_count`, `events_count`, `feeds_count`, `images_count`, `galleries_count`, `videos_count`, `created`, `modified`) VALUES  
    1065 (1, 'Uncatagorised', 1, 0, 2, 0, 0, 0, 0, '2007-05-01 17:05:55', '2007-05-01 17:05:55'), 
    1066 (2, 'The Hedrons', 1, 1, 3, NULL, 2, NULL, NULL, '2007-07-06 14:33:59', '2007-07-06 14:33:59'), 
     1186(1, 'Uncatagorised', 4, 0, 2, 0, 1, 0, 0, '2007-05-01 17:05:55', '2007-05-01 17:05:55'), 
     1187(2, 'The Hedrons', 0, 0, 3, NULL, 2, NULL, NULL, '2007-07-06 14:33:59', '2007-07-06 14:33:59'), 
    10671188(3, 'Wet Wet Wet', 0, NULL, NULL, NULL, NULL, NULL, NULL, '2007-07-06 14:34:09', '2007-07-06 14:34:09'); 
    10681189 
     
    10781199  `tag` varchar(255) collate utf8_unicode_ci NOT NULL, 
    10791200  PRIMARY KEY  (`id`) 
    1080 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
     1201) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
    10811202 
    10821203--  
    10831204-- Dumping data for table `tags` 
    10841205--  
     1206 
    10851207 
    10861208-- -------------------------------------------------------- 
     
    11161238-- Dumping data for table `tags_users` 
    11171239--  
     1240 
    11181241 
    11191242-- -------------------------------------------------------- 
     
    11331256--  
    11341257-- Dumping data for table `tags_videos` 
     1258--  
     1259 
     1260 
     1261-- -------------------------------------------------------- 
     1262 
     1263--  
     1264-- Table structure for table `themes` 
     1265--  
     1266 
     1267DROP TABLE IF EXISTS `themes`; 
     1268CREATE TABLE `themes` ( 
     1269  `id` int(8) unsigned NOT NULL auto_increment, 
     1270  `title` varchar(255) collate utf8_unicode_ci NOT NULL, 
     1271  `body` varchar(255) collate utf8_unicode_ci NOT NULL, 
     1272  `directory` varchar(255) collate utf8_unicode_ci NOT NULL, 
     1273  `created` datetime default NULL, 
     1274  `modified` datetime default NULL, 
     1275  PRIMARY KEY  (`id`) 
     1276) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 
     1277 
     1278--  
     1279-- Dumping data for table `themes` 
    11351280--  
    11361281 
     
    11571302  `modified` datetime default NULL, 
    11581303  PRIMARY KEY  (`id`) 
    1159 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1
     1304) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
    11601305 
    11611306--  
     
    11781323  `visitdate` datetime NOT NULL, 
    11791324  PRIMARY KEY  (`id`) 
    1180 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     1325) ENGINE=MyISAM DEFAULT CHARSET=utf8
    11811326 
    11821327--  
     
    11961341  `username` varchar(50) NOT NULL default '', 
    11971342  `openid` varchar(255) default NULL, 
    1198   `passwd` varchar(32) default NULL, 
     1343  `passwd` varchar(255) default NULL, 
    11991344  `name` varchar(50) NOT NULL default '', 
    12001345  `email` varchar(100) NOT NULL default '', 
     
    12151360  UNIQUE KEY `email` (`email`,`username`), 
    12161361  KEY `group_id` (`group_id`) 
    1217 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4
     1362) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    12181363 
    12191364--  
     
    12221367 
    12231368INSERT INTO `users` (`id`, `username`, `openid`, `passwd`, `name`, `email`, `last_visit`, `group_id`, `profile_id`, `posts_count`, `pages_count`, `events_count`, `comments_count`, `videos_count`, `tags`, `active`, `created`, `modified`) VALUES  
    1224 (1, 'WebrocketAdmin', NULL, 'fdfedc01c66e9ea2817508ca1097df2f', 'Webrocket Admin', 'admin@webrocket.com', '2007-07-19 13:43:56', 1, 1, 1, 1, 1, 2, 0, 'Admin, Owner', 1, '2007-03-26 00:00:00', '2007-07-19 10:45:36'), 
     1369(1, 'WebrocketAdmin', NULL, 'fdfedc01c66e9ea2817508ca1097df2f', 'Webrocket Admin', 'admin@webrocket.com', '2007-07-25 12:03:58', 1, 1, 4, 0, 1, 2, 0, 'Admin, Owner', 1, '2007-03-26 00:00:00', '2007-07-19 10:45:36'), 
    12251370(2, 'Editor', NULL, '5aee9dbd2a188839105073571bee1b1f', 'Site', 'Editor', '2007-04-27 10:02:45', 2, 0, 0, 0, 0, 0, 0, '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'), 
    12261371(3, 'Member', NULL, 'aa08769cdcb26674c6706093503ff0a3', 'Member', 'member@member.com', '2007-04-26 13:43:34', 3, 0, 0, 0, 0, 0, 0, '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'); 
     
    12481393  `modified` datetime default NULL, 
    12491394  PRIMARY KEY  (`id`) 
    1250 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=24
     1395) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
    12511396 
    12521397--  
     
    12911436  `user_id` int(8) unsigned NOT NULL, 
    12921437  `subject_id` int(8) unsigned NOT NULL, 
     1438  `copyright_id` int(8) unsigned NOT NULL, 
    12931439  `tags` varchar(255) NOT NULL, 
    12941440  `created` datetime NOT NULL, 
    12951441  `modified` datetime NOT NULL, 
    12961442  PRIMARY KEY  (`id`) 
    1297 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     1443) ENGINE=MyISAM DEFAULT CHARSET=utf8
    12981444 
    12991445--  
  • branch/models/group.php

    r136 r137  
    2828        ); 
    2929 
    30         /*var $hasAndBelongsToMany = array( 
     30        var $hasAndBelongsToMany = array( 
    3131                        'Permission' => array('className' => 'Permission', 
    3232                                                'joinTable' => 'groups_permissions', 
     
    4242                                                'deleteQuery' => '', 
    4343                                                'insertQuery' => ''), 
    44         );*/ 
     44        ); 
    4545         
    4646        function parentNode(){ 
  • branch/webroot/js/webrocket.js

    r135 r137  
    5656        $j('#admin-tabs').tabs({ remote: true, fxFade: true, fxSpeed: 'normal' }); 
    5757         
    58         $j('form#ImageAddForm').ajaxForm({success: showResponse}); 
     58        $j('form#PostAddForm').ajaxForm({success: showResponse}); 
    5959        function showResponse(){ 
    60                 console.log(this); 
     60                location = "#remote-tab-1" 
    6161        } 
    6262