# --------------------------------------------------------
# VERSION UPDATING
# --------------------------------------------------------
UPDATE setting set value='2.5.9__2.6beta1' where name='ClientExec Version';

# --------------------------------------------------------
# NEW ANNOUNCEMENT TABLES
# --------------------------------------------------------
CREATE TABLE `announcement` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(125) NOT NULL default '',
  `excerpt` text NOT NULL,
  `post` longtext NOT NULL,
  `postdate` date NOT NULL default '0000-00-00',
  `publish` tinyint(4) NOT NULL default '0',
  `authorid` tinyint(4) NOT NULL default '0',
  `recipient` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;

CREATE TABLE `announcement_recipient` (
`ann_id` INT NOT NULL ,
`recipient_id` INT NOT NULL ,
PRIMARY KEY ( `ann_id` , `recipient_id` )
) ENGINE=MYISAM ;

# --------------------------------------------------------
# SETTINGS UPGRADES
# --------------------------------------------------------

DELETE FROM setting WHERE name='Popup Confirmations';
DELETE FROM `setting` WHERE name = 'Domain Registration Extra';
INSERT INTO `setting` VALUES (NULL, 'Login Disabled', '0', 'Temporary disable login from customers without admin privileges', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `setting` VALUES (NULL, 'Login disabled system message', 'Login for users is currently disabled due to server maintenance', 'System message for explain customers why the login is temporary disabled. If it is empty, default message will be displayed.', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `setting` VALUES (NULL, 'Email For New High Priority Trouble Tickets', '', 'Email addresses to CC notification messages for new high priority tickets', 8, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `setting` ( `id` , `name` , `value` , `description` , `type` , `isrequired` , `istruefalse` , `istextarea` , `isfromoptions` , `myorder` , `helpid` , `plugin` , `ispassword` , `ishidden` ) VALUES (NULL, 'Number of displayed announcements', '2', 'Number of announcements by category displayed in dashboard', '11', '1', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `setting` VALUES (NULL, 'Enable MaxMind Telephone Verification', '0', 'This setting will\r\nenable the Maxmind telephone verification plugin on signup for new\r\ncustomers. (Phone credits are bought seperate from regular credit card\r\nfraud detection services)<br><a\r\nhref="http://www.maxmind.com/app/telephone_buynow?rId=clientexec">http://www.maxmind.com/app/telephone_buynow</a>', 12, 1, 1, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `setting` ( `id` , `name` , `value` , `description` , `type` , `isrequired` , `istruefalse` , `istextarea` , `isfromoptions` , `myorder` , `helpid` , `plugin` , `ispassword` , `ishidden` )
VALUES (NULL, 'Request Access Code', '1', 'Select this option if you want to display an Access code to prevent signup flooding and require the form to be filled by a human', '10', '1', '1', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `setting` ( `id` , `name` , `value` , `description` , `type` , `isrequired` , `istruefalse` , `istextarea` , `isfromoptions` , `myorder` , `helpid` , `plugin` , `ispassword` , `ishidden` )
VALUES (NULL, 'Disable CE Tickets Support System', '0', 'Select Yes if you want to disable the embedded Clientexec support system. <br> Aditionally, you can define an URL to redirect your customers to an eternal support system of youy own.', '8', '1', '1', '0', '0', '0', '0', '0', '0', '0'
);
INSERT INTO `setting` ( `id` , `name` , `value` , `description` , `type` , `isrequired` , `istruefalse` , `istextarea` , `isfromoptions` , `myorder` , `helpid` , `plugin` , `ispassword` , `ishidden` )
VALUES (NULL, '3rd Party Support URL', '', 'URL of an external support system, different to Clientexec''s.', '8', '0', '0', '0', '0', '0', '0', '0', '0', '0'
);

# --------------------------------------------------------
# NEW COUNTRY AND REGISTRAR TABLES, AND ADDITIONAL FIELDS 
# NEEDED BY THE REGISTRAR PLUGINS
# --------------------------------------------------------
DROP TABLE IF EXISTS `country`;
CREATE TABLE `country` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(80) NOT NULL default '',
  `iso` char(2) NOT NULL default '',
  `phone_code` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `by_name` (`name`,`iso`),
  KEY `by_iso` (`iso`,`name`)
);
INSERT INTO `country` VALUES (1, 'Afghanistan', 'AF', '93');
INSERT INTO `country` VALUES (2, 'Albania', 'AL', '355');
INSERT INTO `country` VALUES (3, 'Algeria', 'DZ', '213');
INSERT INTO `country` VALUES (4, 'American Samoa', 'AS', '684');
INSERT INTO `country` VALUES (5, 'Andorra', 'AD', '376');
INSERT INTO `country` VALUES (6, 'Angola', 'AO', '244');
INSERT INTO `country` VALUES (7, 'Anguilla', 'AI', '1');
INSERT INTO `country` VALUES (8, 'Antarctica', 'AQ', '672');
INSERT INTO `country` VALUES (9, 'Antigua and Barbuda', 'AG', '1');
INSERT INTO `country` VALUES (10, 'Argentina', 'AR', '54');
INSERT INTO `country` VALUES (11, 'Armenia', 'AM', '374');
INSERT INTO `country` VALUES (12, 'Aruba', 'AW', '297');
INSERT INTO `country` VALUES (13, 'Australia', 'AU', '61');
INSERT INTO `country` VALUES (14, 'Austria', 'AT', '43');
INSERT INTO `country` VALUES (15, 'Azerbaijan', 'AZ', '994');
INSERT INTO `country` VALUES (16, 'Bahamas', 'BS', '1');
INSERT INTO `country` VALUES (17, 'Bahrain', 'BH', '973');
INSERT INTO `country` VALUES (18, 'Bangladesh', 'BD', '880');
INSERT INTO `country` VALUES (19, 'Barbados', 'BB', '1');
INSERT INTO `country` VALUES (20, 'Belarus', 'BY', '375');
INSERT INTO `country` VALUES (21, 'Belgium', 'BE', '32');
INSERT INTO `country` VALUES (22, 'Belize', 'BZ', '501');
INSERT INTO `country` VALUES (23, 'Benin', 'BJ', '229');
INSERT INTO `country` VALUES (24, 'Bermuda', 'BM', '1');
INSERT INTO `country` VALUES (25, 'Bhutan', 'BT', '975');
INSERT INTO `country` VALUES (26, 'Bolivia', 'BO', '591');
INSERT INTO `country` VALUES (27, 'Bosnia and Herzegovina', 'BA', '387');
INSERT INTO `country` VALUES (28, 'Botswana', 'BW', '267');
INSERT INTO `country` VALUES (29, 'Bouvet Island', 'BV', '');
INSERT INTO `country` VALUES (30, 'Brazil', 'BR', '55');
INSERT INTO `country` VALUES (31, 'Brunei Darussalam', 'BN', '673');
INSERT INTO `country` VALUES (32, 'Bulgaria', 'BG', '359');
INSERT INTO `country` VALUES (33, 'Burkina Faso', 'BF', '226');
INSERT INTO `country` VALUES (34, 'Burundi', 'BI', '257');
INSERT INTO `country` VALUES (35, 'Cambodia', 'KH', '855');
INSERT INTO `country` VALUES (36, 'Cameroon', 'CM', '237');
INSERT INTO `country` VALUES (37, 'Canada', 'CA', '1');
INSERT INTO `country` VALUES (38, 'Cape Verde', 'CV', '238');
INSERT INTO `country` VALUES (39, 'Cayman Islands', 'KY', '1');
INSERT INTO `country` VALUES (40, 'Central African Republic', 'CF', '236');
INSERT INTO `country` VALUES (41, 'Chad', 'TD', '235');
INSERT INTO `country` VALUES (42, 'Chile', ' C', '56');
INSERT INTO `country` VALUES (43, 'China', 'CN', '86');
INSERT INTO `country` VALUES (44, 'Christmas Island', 'CX', '');
INSERT INTO `country` VALUES (45, 'Cocos (Keeling) Islands', 'CC', '61');
INSERT INTO `country` VALUES (46, 'Colombia', 'CO', '57');
INSERT INTO `country` VALUES (47, 'Comoros', 'KM', '269');
INSERT INTO `country` VALUES (48, 'Congo', 'CG', '242');
INSERT INTO `country` VALUES (49, 'Cook Islands', 'CK', '682');
INSERT INTO `country` VALUES (50, 'Costa Rica', 'CR', '506');
INSERT INTO `country` VALUES (51, 'Cote D''ivoire', 'CI', '225');
INSERT INTO `country` VALUES (52, 'Croatia', 'HR', '385');
INSERT INTO `country` VALUES (53, 'Cuba', 'CU', '53');
INSERT INTO `country` VALUES (54, 'Cyprus', 'CY', '357');
INSERT INTO `country` VALUES (55, 'Czech Republic', 'CZ', '420');
INSERT INTO `country` VALUES (56, 'Denmark', 'DK', '45');
INSERT INTO `country` VALUES (57, 'Djibouti', 'DJ', '253');
INSERT INTO `country` VALUES (58, 'Dominica', 'DM', '1');
INSERT INTO `country` VALUES (59, 'Dominican Republic', 'DO', '1');
INSERT INTO `country` VALUES (60, 'East Timor', 'TP', '670');
INSERT INTO `country` VALUES (61, 'Ecuador', 'EC', '593');
INSERT INTO `country` VALUES (62, 'Egypt', 'EG', '20');
INSERT INTO `country` VALUES (63, 'El Salvador', 'SV', '503');
INSERT INTO `country` VALUES (64, 'Equatorial Guinea', 'GQ', '240');
INSERT INTO `country` VALUES (65, 'Eritrea', 'ER', '291');
INSERT INTO `country` VALUES (66, 'Estonia', 'EE', '372');
INSERT INTO `country` VALUES (67, 'Ethiopia', 'ET', '251');
INSERT INTO `country` VALUES (68, 'Faroe Islands', 'FO', '298');
INSERT INTO `country` VALUES (69, 'Fiji', 'FJ', '679');
INSERT INTO `country` VALUES (70, 'Finland', 'FI', '358');
INSERT INTO `country` VALUES (71, 'France', 'FR', '33');
INSERT INTO `country` VALUES (72, 'France, Metropolitan', 'FX', '33');
INSERT INTO `country` VALUES (73, 'French Guiana', 'GF', '594');
INSERT INTO `country` VALUES (74, 'French Polynesia', 'PF', '689');
INSERT INTO `country` VALUES (75, 'Gabon', 'GA', '241');
INSERT INTO `country` VALUES (76, 'Gambia', 'GM', '220');
INSERT INTO `country` VALUES (77, 'Georgia', 'GE', '995');
INSERT INTO `country` VALUES (78, 'Germany', 'DE', '49');
INSERT INTO `country` VALUES (79, 'Ghana', 'GH', '233');
INSERT INTO `country` VALUES (80, 'Gibraltar', 'GI', '350');
INSERT INTO `country` VALUES (81, 'Greece', 'GR', '30');
INSERT INTO `country` VALUES (82, 'Greenland', 'GL', '299');
INSERT INTO `country` VALUES (83, 'Grenada', 'GD', '1');
INSERT INTO `country` VALUES (84, 'Guadeloupe', 'GP', '590');
INSERT INTO `country` VALUES (85, 'Guam', 'GU', '1');
INSERT INTO `country` VALUES (86, 'Guatemala', 'GT', '502');
INSERT INTO `country` VALUES (87, 'Guinea', 'GN', '224');
INSERT INTO `country` VALUES (88, 'Guinea-bissau', 'GW', '245');
INSERT INTO `country` VALUES (89, 'Guyana', 'GY', '592');
INSERT INTO `country` VALUES (90, 'Haiti', 'HT', '509');
INSERT INTO `country` VALUES (91, 'Honduras', 'HN', '504');
INSERT INTO `country` VALUES (92, 'Hong Kong', 'HK', '852');
INSERT INTO `country` VALUES (93, 'Hungary', 'HU', '36');
INSERT INTO `country` VALUES (94, 'Iceland', 'IS', '354');
INSERT INTO `country` VALUES (95, 'India', 'IN', '91');
INSERT INTO `country` VALUES (96, 'Indonesia', 'ID', '62');
INSERT INTO `country` VALUES (97, 'Iran (Islamic Republic of)', 'IR', '98');
INSERT INTO `country` VALUES (98, 'Iraq', 'IQ', '964');
INSERT INTO `country` VALUES (99, 'Ireland', 'IE', '353');
INSERT INTO `country` VALUES (100, 'Israel', 'IL', '972');
INSERT INTO `country` VALUES (101, 'Italy', 'IT', '39');
INSERT INTO `country` VALUES (102, 'Jamaica', 'JM', '1');
INSERT INTO `country` VALUES (103, 'Japan', 'JP', '81');
INSERT INTO `country` VALUES (104, 'Jordan', 'JO', '962');
INSERT INTO `country` VALUES (105, 'Kazakhstan', 'KZ', '7');
INSERT INTO `country` VALUES (106, 'Kenya', 'KE', '254');
INSERT INTO `country` VALUES (107, 'Kiribati', 'KI', '686');
INSERT INTO `country` VALUES (108, 'Korea', 'KR', '82');
INSERT INTO `country` VALUES (109, 'Kuwait', 'KW', '965');
INSERT INTO `country` VALUES (110, 'Kyrgyzstan', 'KG', '996');
INSERT INTO `country` VALUES (111, 'Latvia', 'LV', '371');
INSERT INTO `country` VALUES (112, 'Lebanon', 'LB', '961');
INSERT INTO `country` VALUES (113, 'Lesotho', 'LS', '266');
INSERT INTO `country` VALUES (114, 'Liberia', 'LR', '231');
INSERT INTO `country` VALUES (115, 'Libya', 'LY', '218');
INSERT INTO `country` VALUES (116, 'Liechtenstein', 'LI', '423');
INSERT INTO `country` VALUES (117, 'Lithuania', 'LT', '370');
INSERT INTO `country` VALUES (118, 'Luxembourg', 'LU', '352');
INSERT INTO `country` VALUES (119, 'Macau', 'MO', '853');
INSERT INTO `country` VALUES (120, 'Madagascar', 'MG', '261');
INSERT INTO `country` VALUES (121, 'Malawi', 'MW', '265');
INSERT INTO `country` VALUES (122, 'Malaysia', 'MY', '60');
INSERT INTO `country` VALUES (123, 'Maldives', 'MV', '960');
INSERT INTO `country` VALUES (124, 'Mali', 'ML', '223');
INSERT INTO `country` VALUES (125, 'Malta', 'MT', '356');
INSERT INTO `country` VALUES (126, 'Martinique', 'MQ', '596');
INSERT INTO `country` VALUES (127, 'Mauritania', 'MR', '222');
INSERT INTO `country` VALUES (128, 'Mauritius', 'MU', '230');
INSERT INTO `country` VALUES (129, 'Mayotte', 'YT', '269');
INSERT INTO `country` VALUES (130, 'Mexico', 'MX', '52');
INSERT INTO `country` VALUES (131, 'Monaco', 'MC', '377');
INSERT INTO `country` VALUES (132, 'Mongolia', 'MN', '976');
INSERT INTO `country` VALUES (133, 'Montserrat', 'MS', '1');
INSERT INTO `country` VALUES (134, 'Morocco', 'MA', '212');
INSERT INTO `country` VALUES (135, 'Mozambique', 'MZ', '258');
INSERT INTO `country` VALUES (136, 'Myanmar', 'MM', '95');
INSERT INTO `country` VALUES (137, 'Namibia', 'NA', '264');
INSERT INTO `country` VALUES (138, 'Nauru', 'NR', '674');
INSERT INTO `country` VALUES (139, 'Nepal', 'NP', '977');
INSERT INTO `country` VALUES (140, 'Netherlands', 'NL', '31');
INSERT INTO `country` VALUES (141, 'New Caledonia', 'NC', '687');
INSERT INTO `country` VALUES (142, 'New Zealand', 'NZ', '64');
INSERT INTO `country` VALUES (143, 'Nicaragua', 'NI', '505');
INSERT INTO `country` VALUES (144, 'Niger', 'NE', '227');
INSERT INTO `country` VALUES (145, 'Nigeria', 'NG', '234');
INSERT INTO `country` VALUES (146, 'Niue', 'NU', '683');
INSERT INTO `country` VALUES (147, 'Norfolk Island', 'NF', '672');
INSERT INTO `country` VALUES (148, 'Norway', 'NO', '47');
INSERT INTO `country` VALUES (149, 'Oman', 'OM', '968');
INSERT INTO `country` VALUES (150, 'Pakistan', 'PK', '92');
INSERT INTO `country` VALUES (151, 'Palau', 'PW', '680');
INSERT INTO `country` VALUES (152, 'Panama', 'PA', '507');
INSERT INTO `country` VALUES (153, 'Papua New Guinea', 'PG', '675');
INSERT INTO `country` VALUES (154, 'Paraguay', 'PY', '595');
INSERT INTO `country` VALUES (155, 'Peru', 'PE', '51');
INSERT INTO `country` VALUES (156, 'Philippines', 'PH', '63');
INSERT INTO `country` VALUES (157, 'Pitcairn', 'PN', '');
INSERT INTO `country` VALUES (158, 'Poland', 'PL', '48');
INSERT INTO `country` VALUES (159, 'Portugal', 'PT', '351');
INSERT INTO `country` VALUES (160, 'Puerto Rico', 'PR', '1');
INSERT INTO `country` VALUES (161, 'Qatar', 'QA', '974');
INSERT INTO `country` VALUES (162, 'Reunion', 'RE', '262');
INSERT INTO `country` VALUES (163, 'Romania', 'RO', '40');
INSERT INTO `country` VALUES (164, 'Russian Federation', 'RU', '7');
INSERT INTO `country` VALUES (165, 'Rwanda', 'RW', '250');
INSERT INTO `country` VALUES (166, 'Saint Kitts and Nevis', 'KN', '1');
INSERT INTO `country` VALUES (167, 'Saint Lucia', 'LC', '1');
INSERT INTO `country` VALUES (168, 'Samoa', 'WS', '');
INSERT INTO `country` VALUES (169, 'San Marino', 'SM', '378');
INSERT INTO `country` VALUES (170, 'Sao Tome and Principe', 'ST', '239');
INSERT INTO `country` VALUES (171, 'Saudi Arabia', 'SA', '966');
INSERT INTO `country` VALUES (172, 'Senegal', 'SN', '221');
INSERT INTO `country` VALUES (173, 'Seychelles', 'SC', '248');
INSERT INTO `country` VALUES (174, 'Sierra Leone', 'SL', '232');
INSERT INTO `country` VALUES (175, 'Singapore', 'SG', '65');
INSERT INTO `country` VALUES (176, 'Slovakia (Slovak Republic)', 'SK', '421');
INSERT INTO `country` VALUES (177, 'Slovenia', 'SI', '386');
INSERT INTO `country` VALUES (178, 'Solomon Islands', 'SB', '677');
INSERT INTO `country` VALUES (179, 'Somalia', 'SO', '252');
INSERT INTO `country` VALUES (180, 'South Africa', 'ZA', '27');
INSERT INTO `country` VALUES (181, 'Spain', 'ES', '34');
INSERT INTO `country` VALUES (182, 'Sri Lanka', 'LK', '94');
INSERT INTO `country` VALUES (183, 'St. Helena', 'SH', '');
INSERT INTO `country` VALUES (184, 'Sudan', 'SD', '249');
INSERT INTO `country` VALUES (185, 'Suriname', 'SR', '597');
INSERT INTO `country` VALUES (186, 'Swaziland', 'SZ', '268');
INSERT INTO `country` VALUES (187, 'Sweden', 'SE', '46');
INSERT INTO `country` VALUES (188, 'Switzerland', 'CH', '41');
INSERT INTO `country` VALUES (189, 'Syrian Arab Republic', 'SY', '963');
INSERT INTO `country` VALUES (190, 'Taiwan', 'TW', '886');
INSERT INTO `country` VALUES (191, 'Tajikistan', 'TJ', '992');
INSERT INTO `country` VALUES (192, 'Thailand', 'TH', '66');
INSERT INTO `country` VALUES (193, 'Togo', 'TG', '228');
INSERT INTO `country` VALUES (194, 'Tokelau', 'TK', '690');
INSERT INTO `country` VALUES (195, 'Tonga', 'TO', '676');
INSERT INTO `country` VALUES (196, 'Trinidad and Tobago', 'TT', '1');
INSERT INTO `country` VALUES (197, 'Tunisia', 'TN', '216');
INSERT INTO `country` VALUES (198, 'Turkey', 'TR', '90');
INSERT INTO `country` VALUES (199, 'Turkmenistan', 'TM', '993');
INSERT INTO `country` VALUES (200, 'Tuvalu', 'TV', '688');
INSERT INTO `country` VALUES (201, 'Uganda', 'UG', '256');
INSERT INTO `country` VALUES (202, 'Ukraine', 'UA', '380');
INSERT INTO `country` VALUES (203, 'United Arab Emirates', 'AE', '971');
INSERT INTO `country` VALUES (204, 'United Kingdom', 'GB', '44');
INSERT INTO `country` VALUES (205, 'United States', 'US', '1');
INSERT INTO `country` VALUES (206, 'Uruguay', 'UY', '598');
INSERT INTO `country` VALUES (207, 'Uzbekistan', 'UZ', '998');
INSERT INTO `country` VALUES (208, 'Vanuatu', 'VU', '678');
INSERT INTO `country` VALUES (209, 'Venezuela', 'VE', '58');
INSERT INTO `country` VALUES (210, 'Viet Nam', 'VN', '84');
INSERT INTO `country` VALUES (211, 'Virgin Islands (British)', 'VG', '');
INSERT INTO `country` VALUES (212, 'Virgin Islands (U.S.)', 'VI', '');
INSERT INTO `country` VALUES (213, 'Wallis and Futuna Islands', 'WF', '681');
INSERT INTO `country` VALUES (214, 'Western Sahara', 'EH', '');
INSERT INTO `country` VALUES (215, 'Yemen', 'YE', '967');
INSERT INTO `country` VALUES (216, 'Yugoslavia', 'YU', '');
INSERT INTO `country` VALUES (217, 'Zambia', 'ZM', '260');
INSERT INTO `country` VALUES (218, 'Zimbabwe', 'ZW', '263');

CREATE TABLE `registrars` (
    `plugin` VARCHAR( 20 ) NOT NULL ,
    `tld` VARCHAR( 10 ) NOT NULL ,
    `extra_attributes` TEXT NOT NULL ,
    PRIMARY KEY ( `plugin` , `tld` )
);

INSERT INTO `registrars` VALUES ('enom', 'us', 'a:2:{s:8:"us_nexus";a:3:{s:2:"ID";s:1:"9";s:11:"description";s:14:"Nexus Category";s:7:"options";a:5:{s:10:"US Citizen";a:2:{s:11:"description";s:36:"A natural person who is a US Citizen";s:5:"value";s:3:"C11";}s:18:"Permanent Resident";a:2:{s:11:"description";s:44:"A natural person who is a Permanent Resident";s:5:"value";s:3:"C12";}s:15:"Business Entity";a:2:{s:11:"description";s:100:"An entity or organization that is (i) incorporated within one of the fifty US states, the District o";s:5:"value";s:3:"C21";}s:14:"Foreign Entity";a:3:{s:11:"description";s:100:"A foreign organization that regularly engages in lawful activities (sales of goods or services or ot";s:5:"value";s:3:"C31";s:8:"requires";a:1:{i:0;s:2:"14";}}s:15:"US Based Office";a:3:{s:11:"description";s:100:"An organization has an office or other facility in the U.S., where CC equals to the county code of t";s:5:"value";s:3:"C32";s:8:"requires";a:1:{i:0;s:2:"14";}}}}s:10:"us_purpose";a:3:{s:2:"ID";s:2:"10";s:11:"description";s:19:"Application Purpose";s:7:"options";a:5:{s:10:"For Profit";a:2:{s:11:"description";s:23:"Business use for profit";s:5:"value";s:2:"P1";}s:10:"Non-profit";a:2:{s:11:"description";s:68:"Non-profit business, club, association, religious organization, etc.";s:5:"value";s:2:"P2";}s:8:"Personal";a:2:{s:11:"description";s:12:"Personal use";s:5:"value";s:2:"P3";}s:11:"Educational";a:2:{s:11:"description";s:20:"Educational purposes";s:5:"value";s:2:"P4";}s:10:"Government";a:2:{s:11:"description";s:19:"Government purposes";s:5:"value";s:2:"P5";}}}}');
INSERT INTO `registrars` VALUES ('enom', 'ca', 'a:4:{s:15:"cira_legal_type";a:3:{s:2:"ID";s:1:"1";s:11:"description";s:32:"Legal type of registrant contact";s:7:"options";a:18:{s:11:"Corporation";a:3:{s:11:"description";s:571:"A corporation under the laws of Canada or any province or territory of Canada, Charities, Cooperative, Council.<br/>Requirements: Registrant name must be the full legal name of the corporation and must be followed by the jurisdiction of incorporation (eg. Canada, Ontario, NWT...), unless it is obvious from the corporation''s name. Canadian Internet Registration Authority (Canada). For Charities, the NFP should be included in the organization name. If this is a not-for-profit organization, you are also required to submit the registration number i.e.: 123456789 RR0001";s:5:"value";s:3:"CCO";s:8:"requires";a:1:{i:0;s:2:"42";}}s:16:"Canadian Citizen";a:2:{s:11:"description";s:886:"A Canadian citizen of the age of majority under the laws of the province or territory in Canada in which he or she resides or last resided.<br/>Requirements: The Registrant''s name must be the full legal name of the Canadian Citizen who will hold the domain name registration as the name would appear on a passport, driver''s license or other identification document issued by a government. The name can be followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and a degree granted to the registrant (eg. PhD.) Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark(''''), hyphen(-), period(.).";s:5:"value";s:3:"CCT";}s:17:"Canadian Resident";a:2:{s:11:"description";s:1536:"A permanent resident as defined in the Immigration and Refugee Protection Act (Canada) S.C. 2001, c.27, as amended from time to time, who is "ordinarily resident" (as defined below) in Canada and of the age of majority under the laws of the province or territory in Canada in which he or she resides or last resided. "Ordinarily resident in Canada" means an individual who resides in Canada for more than 183 days in the twelve month period immediately preceding the date of the applicable request for registration of the .ca domain name or sub-domain name and in each twelve month period thereafter for the duration of the domain name registration.<br/>Requirements: The Registrant''s name must be the full legal name of the Permanent Resident who will hold the domain name registration as the name would appear on a driver''s license or other identification document issued by a government. The full legal name may be followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and andegree granted to the registrant by a recognized degree granting institution or a recognized professional designation which the registrant has the right to use  (eg. PhD, MD, DDS.) Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark(''''), hyphen(-), period(.).";s:5:"value";s:3:"RES";}s:17:"Government Entity";a:2:{s:11:"description";s:732:"Her Majesty the Queen in right of Canada, a province or a territory; an agent of Her Majesty the Queen in right of Canada, of a province or of a territory; a federal, provincial or territorial Crown corporation, government agency or government entity; or a regional, municipal or local area government.<br />Requirements: The Registrant''s name must be the complete official name of the entity that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the official name in parentheses). If the Registrant is not a government, the Registrant''s name must be followed by the name of the jurisdiction (eg. Canada, province, territory, municipality, etc) to which the Registrant is related.";s:5:"value";s:3:"GOV";}s:11:"Educational";a:2:{s:11:"description";s:983:"(i) A university or college which is located in Canada and which is authorized or recognized as a university or college under an Act of the legislature of a province or territory of Canada; or<br />(ii) A college, post-secondary school, vocational school, secondary school, pre-school or other school or educational institution which is located in Canada and which is recognized by the educational authorities of a province or territory of Canada or licensed under or maintained by an Act of Parliament of Canada or of the legislature of a province or territory of Canada.<br />Requirements: The Registrant''s name must be the complete official name of the institution that will hold the domain name registration, without any abbreviations. A common abbreviation may follow the official name in parentheses. The Registrant name must be followed by the jurisdiction (e.g. name of province, municipality) in which the institution is accredited if not obvious from the Registrant''s name.";s:5:"value";s:3:"EDU";}s:26:"Unincorporated Association";a:3:{s:11:"description";s:1067:"This Registrant Type is principally intended for religious congregations, social and sports clubs and community groups, council (not registered) or society (not registered) which are based and operating in Canada. An unincorporated organization, association or club:<br />(i) At least 80% of whose members: (A) are ordinarily resident in Canada (if such members are individuals); or (B) meet the requirements of any one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, Partnership Registered in Canada, Trust established in Canada, Legal Representative of a Canadian Citizen or Permanent Resident; and<br />(ii) At least 80% of whose directors, officers, employees, managers, administrators or other representatives are ordinarily resident in Canada.<br />Requirements: The Registrant''s name must be the complete name of the association that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the complete name in parentheses).";s:5:"value";s:3:"ASS";s:8:"requires";a:1:{i:0;s:2:"42";}}s:8:"Hospital";a:2:{s:11:"description";s:565:"A hospital which is located in Canada and which is licensed, authorized or approved to operate as a hospital under an Act of the legislature of a province or territory of Canada<br />Requirements: The Registrant''s name must be the complete official name of the hospital that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the complete name in parentheses.) The Registrant''s name must be followed by the jurisdiction (eg. name of province) which accredited the hospital if not obvious from the Registrant''s name.";s:5:"value";s:3:"HOP";}s:11:"Partnership";a:3:{s:11:"description";s:666:"A partnership, more than 66 2/3 per cent of whose partners meet the requirements of one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, Trust established in Canada or a Legal Representative of a Canadian Citizen or Permanent Resident, which is registered as a partnership under the laws of any province or territory of Canada.<br />Requirements: The Registrant''s name must be the registered name of the partnership that will hold the domain name registration. The Registrant name must be followed by the jurisdiction of registration (eg. Alberta) and the registration number.";s:5:"value";s:3:"PRT";s:8:"requires";a:1:{i:0;s:2:"42";}}s:10:"Trade-mark";a:3:{s:11:"description";s:898:"A Person which does not fall under any other registrant type, but which is the owner of a trade-mark which is the subject of a registration under the Trade-marks Act (Canada) R.S.C. 1985, c.T-13 as amended from time to time, but in this case such permission is limited to a request to register a .ca domain name consisting of or including the exact word component of that registered trade-mark.<br />This Registrant Type is only intended for Registrants which do not meet the requirements associated with any other registrant type but which have a trade-mark registered in Canada. (Trade-marks subject of trade-mark applications and trade-marks registered in other jurisdictions, such as the United States, do not qualify.)<br />The domain name to be registered must include the trade-mark. (eg. If the trade-mark is AVEA this type of registrant can register avea.ca or aveaisus.ca but not xyz.ca).";s:5:"value";s:3:"TDM";s:8:"requires";a:1:{i:0;s:2:"41";}}s:11:"Trade Union";a:2:{s:11:"description";s:526:"A trade union which is recognized by a labour board under the laws of Canada or any province or territory of Canada and which has its head office in Canada.<br />Requirements: The Registrant''s name must be the complete official name of the trade union that will hold the domain name registration, without abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must be followed by the jurisdiction in Canada which recognizes it (if it is not obvious from the Registrant''s name.)";s:5:"value";s:3:"TRD";}s:15:"Political Party";a:2:{s:11:"description";s:482:"A political party registered under a relevant electoral law of Canada or any province or territory of Canada<br />Requirements: The Registrant''s name must be the complete official name of the political party holding the domain name registration, without abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must also by followed by the jurisdiction in Canada in which it is registered (if it is not obvious from the official name).";s:5:"value";s:3:"PLT";}s:26:"Library, Archive or Museum";a:2:{s:11:"description";s:633:"An institution, whether or not incorporated, that:<br />(i) is located in Canada; and<br />(ii) is not established or conducted for profit or does not form part of, or is not administered or directly or indirectly controlled by, a body that is established or conducted for profit in which is held and maintained a collection of documents and other materials that is open to the public or to researchers.<br />Requirements: The Registrant''s name  must be the complete legal name of the institution which will hold the domain name registration without abbreviations. (A common abbreviation may follow the complete name in parentheses.)";s:5:"value";s:3:"LAM";}s:5:"Trust";a:2:{s:11:"description";s:760:"A trust established and subsisting under the laws of a province or territory of Canada, more than 66 2/3 % of whose trustees meet the requirements of one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, or a Legal Representative of a Canadian Citizen or Permanent Resident.<br />Requirements: The Registrant''s name must be the complete official name of the trust, without any abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must also indicate the total percentage of the trustees that meet one or more of the following requirements: Canadian citizen, permanent resident, Canadian corporation, legal representative.";s:5:"value";s:3:"TRS";}s:18:"Aboriginal Peoples";a:2:{s:11:"description";s:1346:"Any individual belonging to any Inuit, First Nation, Metis or other people indigenous to Canada.<br />Requirements: The Registrant''s name must be the full legal name of the Aboriginal Person applying for the Registration as it would appear on a driver''s license or other identification document issued by government.<br />The Registrant may enter its full legal name followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and a degree granted to the registrant by a recognized degree granting institution or a recognized professional designation which the registrant has the right to use  (eg. PhD, MD, DDS.)<br />Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark(''''), hyphen(-), period(.).<br/>Groups: Any Inuit, First Nation, Metis or other people indigenous to Canada, and any collectivity of such Aboriginal peoples.<br />Requirements: The Registrant''s name must be the complete official name of the indigenous people a collectivity of Aboriginal Persons or, if there is no official name, the name by which the collectivity is commonly known.";s:5:"value";s:3:"ABO";}s:11:"Indian Band";a:2:{s:11:"description";s:272:"Any Indian band as defined in the Indian Act, R.S.C. 1985, c. I-5, as amended from time to time, and any group of Indian bands;<br />Requirements: The name of Registrant must be the Indian Band Name as registered with the Department of Indian and Northern Affairs, Canada.";s:5:"value";s:3:"INB";}s:20:"Legal Representative";a:2:{s:11:"description";s:865:"An executor, administrator or other legal representative of a Person listed as a Canadian Citizen or Permanent Resident of Canada.<br />Note: This registrant type is only available to a person or entity that has been appointed by legal process to represent an individual who is not competent to represent him or herself. It is not available to anyone who represents a Canadian or foreign corporation  in any capacity.<br />Requirements: The Registrant''s name must be the full legal name of the Canadian Citizen or Permanent Resident of Canada who is being represented as it would appear on a passport, driver''s license or other government identification document. This must be followed by the full legal name and capacity of at least one of the official representatives. The representative should be identified as the administrative contact for these registrations.";s:5:"value";s:3:"LGR";}s:13:"Official Mark";a:2:{s:11:"description";s:1242:"A Person which does not meet the requirements for any other Registrant Type, but which is a Person intended to be protected by Subsection 9(1) of the Trade-Marks Act (Canada) at whose request the Registrar of Trade-marks has published notice of adoption of any badge, crest, emblem, official mark or other mark pursuant to Subsection 9(1), but in this case such permission is limited to a request to register a .ca domain name consisting of or including the exact word component of such badge, crest, emblem, official mark or other mark in respect of which such Person requested publications.<br />Notes: This registrant type is only intended for Registrants which do not meet the requirements associated with any other registrant type but which have an Official Mark registered in Canada. The domain name must include the official mark (eg. If the official mark is WIPO, the registrant can register wipo.ca but not intellectual-property.ca)<br />Requirements: The Registrant''s name must be the complete official name of the entity holding the domain name registration without any abbreviations. (A common abbreviation may follow the complete name in parentheses.) The registration number of the official mark must follow the Registrant Name.";s:5:"value";s:3:"OMK";}s:9:"The Queen";a:2:{s:11:"description";s:182:"Her Majesty Queen Elizabeth the Second and her successors.Requirements: The Registrant?s name must be that of Her Majesty the Queen or, after a succession, the name of her successor.";s:5:"value";s:3:"MAJ";}}}s:15:"cira-registrant";a:3:{s:2:"ID";s:2:"39";s:11:"description";s:51:"Registrant of domain (individual or company''s name)";s:7:"options";a:0:{}}s:17:"cira-trademark-no";a:3:{s:2:"ID";s:2:"41";s:11:"description";s:16:"Trademark Number";s:7:"options";a:0:{}}s:22:"cira-org-registered-in";a:3:{s:2:"ID";s:2:"42";s:11:"description";s:32:"Organization registered location";s:7:"options";a:0:{}}}');
INSERT INTO `registrars` VALUES ('enom', 'co.uk', 'a:3:{s:14:"registered_for";a:3:{s:2:"ID";s:2:"15";s:11:"description";s:95:"Company or person domain is registered for (this must be accurate and cannot be changed easily)";s:7:"options";a:0:{}}s:13:"uk_legal_type";a:3:{s:2:"ID";s:1:"2";s:11:"description";s:32:"Legal type of registrant contact";s:7:"options";a:16:{s:13:"UK Individual";a:2:{s:11:"description";s:33:"UK Individual (our default value)";s:5:"value";s:3:"IND";}s:37:"Non-UK Individual (representing self)";a:2:{s:11:"description";s:37:"Non-UK Individual (representing self)";s:5:"value";s:6:"Non-UK";}s:18:"UK Limited Company";a:3:{s:11:"description";s:18:"UK Limited Company";s:5:"value";s:3:"LTD";s:8:"requires";a:1:{i:0;s:1:"4";}}s:25:"UK Public Limited Company";a:3:{s:11:"description";s:25:"UK Public Limited Company";s:5:"value";s:3:"PLC";s:8:"requires";a:1:{i:0;s:1:"4";}}s:14:"UK Partnership";a:2:{s:11:"description";s:14:"UK Partnership";s:5:"value";s:4:"PTNR";}s:6:"UK LLP";a:3:{s:11:"description";s:32:"UK Limited Liability Partnership";s:5:"value";s:3:"LLP";s:8:"requires";a:1:{i:0;s:1:"4";}}s:14:"UK Sole Trader";a:2:{s:11:"description";s:14:"UK Sole Trader";s:5:"value";s:4:"STRA";}s:21:"UK Registered Charity";a:2:{s:11:"description";s:21:"UK Registered Charity";s:5:"value";s:5:"RCHAR";}s:42:"UK Industrial/Provident Registered Company";a:2:{s:11:"description";s:42:"UK Industrial/Provident Registered Company";s:5:"value";s:2:"ip";}s:9:"UK School";a:2:{s:11:"description";s:9:"UK School";s:5:"value";s:3:"SCH";}s:18:"UK Government Body";a:2:{s:11:"description";s:18:"UK Government Body";s:5:"value";s:3:"GOV";}s:31:"UK Corporation by Royal Charter";a:2:{s:11:"description";s:31:"UK Corporation by Royal Charter";s:5:"value";s:3:"CRC";}s:22:"UK Statutory Body FIND";a:2:{s:11:"description";s:22:"UK Statutory Body FIND";s:5:"value";s:4:"STAT";}s:17:"UK Entity (other)";a:2:{s:11:"description";s:17:"UK Entity (other)";s:5:"value";s:5:"OTHER";}s:18:"Non-UK Corporation";a:2:{s:11:"description";s:18:"Non-UK Corporation";s:5:"value";s:5:"FCORP";}s:27:"Non-UK Organization (other)";a:2:{s:11:"description";s:19:"Non-UK Organization";s:5:"value";s:6:"FOTHER";}}}s:12:"uk_reg_co_no";a:3:{s:2:"ID";s:1:"4";s:11:"description";s:32:"UK company identification number";s:7:"options";a:0:{}}}');
INSERT INTO `registrars` VALUES ('enom', 'org.uk', 'a:3:{s:14:"registered_for";a:3:{s:2:"ID";s:2:"16";s:11:"description";s:95:"Company or person domain is registered for (this must be accurate and cannot be changed easily)";s:7:"options";a:0:{}}s:13:"uk_legal_type";a:3:{s:2:"ID";s:1:"3";s:11:"description";s:32:"Legal type of registrant contact";s:7:"options";a:16:{s:13:"UK Individual";a:2:{s:11:"description";s:33:"UK Individual (our default value)";s:5:"value";s:3:"IND";}s:37:"Non-UK Individual (representing self)";a:2:{s:11:"description";s:37:"Non-UK Individual (representing self)";s:5:"value";s:6:"Non-UK";}s:18:"UK Limited Company";a:3:{s:11:"description";s:18:"UK Limited Company";s:5:"value";s:3:"LTD";s:8:"requires";a:1:{i:0;s:1:"5";}}s:25:"UK Public Limited Company";a:3:{s:11:"description";s:25:"UK Public Limited Company";s:5:"value";s:3:"PLC";s:8:"requires";a:1:{i:0;s:1:"5";}}s:14:"UK Partnership";a:2:{s:11:"description";s:14:"UK Partnership";s:5:"value";s:4:"PTNR";}s:6:"UK LLP";a:3:{s:11:"description";s:32:"UK Limited Liability Partnership";s:5:"value";s:3:"LLP";s:8:"requires";a:1:{i:0;s:1:"5";}}s:14:"UK Sole Trader";a:2:{s:11:"description";s:14:"UK Sole Trader";s:5:"value";s:4:"STRA";}s:21:"UK Registered Charity";a:2:{s:11:"description";s:21:"UK Registered Charity";s:5:"value";s:5:"RCHAR";}s:42:"UK Industrial/Provident Registered Company";a:2:{s:11:"description";s:42:"UK Industrial/Provident Registered Company";s:5:"value";s:2:"ip";}s:9:"UK School";a:2:{s:11:"description";s:9:"UK School";s:5:"value";s:3:"SCH";}s:18:"UK Government Body";a:2:{s:11:"description";s:18:"UK Government Body";s:5:"value";s:3:"GOV";}s:31:"UK Corporation by Royal Charter";a:2:{s:11:"description";s:31:"UK Corporation by Royal Charter";s:5:"value";s:3:"CRC";}s:22:"UK Statutory Body FIND";a:2:{s:11:"description";s:22:"UK Statutory Body FIND";s:5:"value";s:4:"STAT";}s:17:"UK Entity (other)";a:2:{s:11:"description";s:17:"UK Entity (other)";s:5:"value";s:5:"OTHER";}s:18:"Non-UK Corporation";a:2:{s:11:"description";s:18:"Non-UK Corporation";s:5:"value";s:5:"FCORP";}s:27:"Non-UK Organization (other)";a:2:{s:11:"description";s:19:"Non-UK Organization";s:5:"value";s:6:"FOTHER";}}}s:12:"uk_reg_co_no";a:3:{s:2:"ID";s:1:"5";s:11:"description";s:32:"UK company identification number";s:7:"options";a:0:{}}}');
INSERT INTO `registrars` VALUES ('enom', 'de', 'a:1:{s:14:"confirmaddress";a:3:{s:2:"ID";s:2:"26";s:11:"description";s:23:"Confirmation of address";s:7:"options";a:1:{s:47:"I confirm the below Admin contact is in Germany";a:2:{s:11:"description";s:68:"I confirm the Administrative address below is a valid German address";s:5:"value";s:2:"DE";}}}}');
INSERT INTO `registrars` VALUES ('enom', 'kids.us', 'a:2:{s:8:"us_nexus";a:3:{s:2:"ID";s:2:"18";s:11:"description";s:14:"Nexus Category";s:7:"options";a:5:{s:10:"US Citizen";a:2:{s:11:"description";s:36:"A natural person who is a US Citizen";s:5:"value";s:3:"C11";}s:18:"Permanent Resident";a:2:{s:11:"description";s:44:"A natural person who is a Permanent Resident";s:5:"value";s:3:"C12";}s:15:"Business Entity";a:2:{s:11:"description";s:100:"An entity or organization that is (i) incorporated within one of the fifty US states, the District o";s:5:"value";s:3:"C21";}s:14:"Foreign Entity";a:3:{s:11:"description";s:100:"A foreign organization that regularly engages in lawful activities (sales of goods or services or ot";s:5:"value";s:3:"C31";s:8:"requires";a:1:{i:0;s:2:"19";}}s:15:"US Based Office";a:3:{s:11:"description";s:100:"An organization has an office or other facility in the U.S., where CC equals to the county code of t";s:5:"value";s:3:"C32";s:8:"requires";a:1:{i:0;s:2:"19";}}}}s:10:"us_purpose";a:3:{s:2:"ID";s:2:"20";s:11:"description";s:19:"Application Purpose";s:7:"options";a:5:{s:10:"For Profit";a:2:{s:11:"description";s:23:"Business use for profit";s:5:"value";s:2:"P1";}s:10:"Non-profit";a:2:{s:11:"description";s:68:"Non-profit business, club, association, religious organization, etc.";s:5:"value";s:2:"P2";}s:8:"Personal";a:2:{s:11:"description";s:12:"Personal use";s:5:"value";s:2:"P3";}s:11:"Educational";a:2:{s:11:"description";s:20:"Educational purposes";s:5:"value";s:2:"P4";}s:10:"Government";a:2:{s:11:"description";s:19:"Government purposes";s:5:"value";s:2:"P5";}}}}');

# --------------------------------------------------------
# OTHERS
# --------------------------------------------------------
INSERT INTO `customuserfields` VALUES (NULL, 'Records per page', 0, 0, 1, 0, 20, 0, 0, 0, 0, 0, '');
ALTER TABLE `promotion` ADD `promorder` INT NOT NULL ;
ALTER TABLE `domains` ADD `registration_years` TINYINT NOT NULL AFTER `recurring` ;
ALTER TABLE `domains` ADD `server_acct_properties` TEXT NOT NULL AFTER `serverid` ;
ALTER TABLE `domains` ADD `domain_extra_attr` TEXT NOT NULL AFTER `server_acct_properties`;
