use island42;

create table section (
  id int(11) NOT NULL,
  access_type_id int(11),
  hide_access_type_id int(11),
  label varchar(50) NOT NULL default '',
  default_page_id int(11) NOT NULL,
  rank int(11) NOT NULL,
  PRIMARY KEY (id)
) type=InnoDB;

insert into section values (1, null, null, 'HOME', 1, 1);
insert into section values (2, 1, null, 'ADMIN', 13, 4);
insert into section values (3, 4, null, 'SUPPORT', 7, 6);
insert into section values (4, 0, null, 'MY ACCOUNT', 72, 7);
insert into section values (5, null, null, 'FIND A TRADESMAN', 2, 8);
insert into section values (6, null, 0, 'JOIN', 3, 9);
insert into section values (7, 4, null, 'NEW MEMBER', 3, 10);
insert into section values (8, null, 0, 'LOGIN', 6, 11);
insert into section values (9, 0, null, 'LOG OUT', 5, 12);
insert into section values (10, 1, null, 'STATS', 66, 5);
-- insert into section values (11, null, null, 'FORUMS', 83, 3);
insert into section values (12, null, null, 'INFO', 88, 2);


create table page (
  id int(11) NOT NULL,
  access_type_id int(11),
  hide_access_type_id int(11),
  label varchar(50) NOT NULL default '',
  link varchar(100) NOT NULL default '',
  path varchar(100) NOT NULL default '',
  secondary_menu_item char(1) NOT NULL default 't',
  secure_only char(1) NOT NULL default 'f',
  section_id int(11) NOT NULL,
  rank int(11) NOT NULL,
  PRIMARY KEY (id)
) type=InnoDB;

insert into page values (1, null, null, 'HOME', '/index', '/index.jsp', 't', 'f', 1, 1);

insert into page values (2, null, null, 'FIND A TRADESMAN', '/search', '/search.jsp', 't', 'f', 5, 2);

insert into page values (3, null, null, 'JOIN', '/join', '/join.jsp', 't', 'f', 6, 3);

-- insert into page values (4, 0, null, 'JOBS', '/myJobs', '/myJobs.jsp', 'f', 'f', 4, 20);

insert into page values (5, 0, null, 'LOG OUT', '/logout?loginAction=Log+out', '/login.jsp', 'f', 't', 8, 5);

insert into page values (6, null, null, 'LOGIN', '/login', '/login.jsp', 'f', 't', 8, 6);

insert into page values (7, 4, null, 'ACCOUNT DETAILS', '/support/accountDetails', '/support/accountDetails.jsp', 't', 'f', 3, 7);
insert into page values (8, 4, null, 'RECRUIT BY QUOTE', '/support/nextQuote', '/support/nextQuote.jsp', 't', 't', 3, 8);

insert into page values (9, 1, null, 'ADD YP SPEC', '/util/addYPSpecialisation', '/util/addYPSpecialisation.jsp', 't', 'f', 2, 9);
insert into page values (10, 1, null, 'IMPORT DATA', '/util/importMarketingData', '/util/importMarketingData.jsp', 't', 'f', 2, 10);
insert into page values (11, 1, null, 'MAIL TEST', '/util/mailTest', '/util/mailTest.jsp', 't', 'f', 2, 11);
insert into page values (12, 1, null, 'POSTCODE', '/util/postcode', '/util/postcode.jsp', 't', 'f', 2, 12);
insert into page values (13, 1, null, 'SHOW PROPERTIES', '/util/showProperties', '/util/showProperties.jsp', 't', 'f', 2, 13);
insert into page values (14, 1, null, 'SHOW TABLES', '/util/showTables', '/util/showTables.jsp', 't', 'f', 2, 14);
insert into page values (15, 1, null, 'SHOW TABLE', '/util/showTable', '/util/showTable.jsp', 2, 't', 'f', 15);
insert into page values (16, 1, null, 'SHOW TRADESMEN', '/util/showTradesmen', '/util/showTradesmen.jsp', 't', 'f', 2, 16);
insert into page values (17, 1, null, 'SKILLS MATRIX', '/util/skillsMatrix', '/util/skillsMatrix.jsp', 't', 'f', 2, 17);
insert into page values (18, 1, null, 'SKILLS BY PAGE', '/util/ypSkillsMatrix', '/util/ypSkillsMatrix.jsp', 't', 'f', 2, 18);

insert into page values (19, null, null, 'HOME', '/', '/index.jsp', 'f', 'f', 1, 19);

insert into page values (20, 0, null, 'FEEDBACK', '/feedback', '/feedback.jsp', 'f', 'f', 4, 21);

insert into page values (21, 3, null, 'RATINGS', '/myRatings', '/myRatings.jsp', 't', 'f', 4, 22);
insert into page values (22, 0, null, 'CONTACT DETAILS', '/myDetails', '/myDetails.jsp', 't', 'f', 4, 23);
insert into page values (23, 3, null, 'SKILLS', '/mySkills', '/mySkills.jsp', 't', 'f', 4, 57);

insert into page values (24, 1, null, 'RECALC FEEDBACK', '/util/recalculateFeedbackStats', '/util/recalculateFeedbackStats.jsp', 't', 'f', 2, 24);
insert into page values (25, 1, null, 'CREATE GLOSSARY', '/util/createGlossary', '/util/createGlossary.jsp', 't', 'f', 2, 25);
insert into page values (26, 1, null, 'CREATE FAQ', '/util/createFAQ', '/util/createFAQ.jsp', 't', 'f', 2, 26);

insert into page values (27, 4, null, 'RECRUIT BY REC', '/support/nextRecommendation', '/support/nextRecommendation.jsp', 't', 'f', 3, 27);
insert into page values (28, 4, null, 'QUALIFY JOB', '/support/jobQualification', '/support/jobQualification.jsp', 't', 'f', 3, 28);
insert into page values (29, 4, null, 'MEMBER SEARCH', '/support/memberSearch', '/support/memberSearch.jsp', 't', 't', 3, 29);

insert into page values (30, 1, null, 'DOCO TEMPLATES', '/util/docoTemplate', '/util/docoTemplate.jsp', 't', 'f', 2, 30);

insert into page values (31, 3, null, 'PAYMENT DETAILS', '/paymentDetails', '/paymentDetails.jsp', 't', 't', 4, 31);
insert into page values (32, 3, null, 'INVOICES', '/invoiceHistory', '/invoiceHistory.jsp', 't', 't', 4, 32);

insert into page values (33, 1, null, 'TIPS MATRIX', '/util/skillsTip', '/util/skillsTip.jsp', 't', 'f', 2, 33);
insert into page values (34, 5, null, 'KPI STATS', '/util/kpi', '/util/kpi.jsp', 't', 'f', 3, 34);
insert into page values (35, null, null, 'RECOMMENDATIONS', '/recommendations', '/recommendations.jsp', 'f', 'f', 1, 35);

insert into page values (36, 4, null, 'ACTIVATION', '/support/activations', '/support/activations.jsp', 't', 'f', 3, 36);
insert into page values (37, 4, null, 'COLD CALL', '/support/coldCall', '/support/coldCall.jsp', 't', 'f', 3, 37);

insert into page values (38, null, null, 'JOBS', '/jobs', '/jobs.jsp', 'f', 'f', 1, 38);
insert into page values (39, null, null, 'FAQ', '/faq', '/faq.jsp', 'f', 'f', 1, 39);
insert into page values (40, null, null, 'PRIVACY STATEMENT', '/privacyStatement', '/privacyStatement.jsp', 'f', 'f', 1, 40);
insert into page values (41, null, null, 'GET THE BEST', '/info/advice', '/info/advice.jsp', 't', 'f', 12, 88);
insert into page values (42, null, null, 'WELCOME', '/welcome', '/welcome.jsp', 'f', 'f', 1, 42);
insert into page values (43, null, null, 'ONLINE', '/online', '/online.jsp', 'f', 'f', 1, 43);
insert into page values (44, null, null, 'NEWS', '/info/news', '/info/news.jsp', 't', 'f', 12, 150);
insert into page values (45, null, null, 'USER AGREEMENT', '/userAgreement', '/userAgreement.jsp', 'f', 'f', 1, 45);
insert into page values (46, null, null, 'TRADE PROFILE', '/tradeProfile', '/tradeProfile.jsp', 'f', 'f', 1, 46);
insert into page values (47, null, null, 'SHOPPING', '/shopping', '/shopping.jsp', 'f', 'f', 1, 47);
insert into page values (48, null, null, 'CONTACT', '/contact', '/contact.jsp', 'f', 'f', 1, 48);
insert into page values (49, null, null, 'PAYMENT TERMS', '/paymentTerms', '/paymentTerms.jsp', 'f', 'f', 1, 49);
insert into page values (50, null, null, 'LINKS', '/links', '/links.jsp', 'f', 'f', 1, 50);
insert into page values (51, null, null, 'GLOSSARY', '/glossary', '/glossary.jsp', 'f', 'f', 1, 51);
insert into page values (52, null, null, 'CRON', '/cron', '/cron.jsp', 'f', 'f', 1, 52);
insert into page values (53, null, null, 'ABOUT', '/info/about', '/info/about.jsp', 't', 'f', 12, 151);
-- insert into page values (54, null, null, 'AFFILIATE PARTNERS', '/affiliates', '/affiliates.jsp', 'f', 'f', 1, 54);
insert into page values (55, null, null, 'PRESS', '/press', '/press.jsp', 'f', 'f', 1, 55);

insert into page values (56, 1, null, 'SHOPPING SITE', '/util/shoppingSite', '/util/shoppingSite.jsp', 't', 'f', 2, 56);

insert into page values (57, 0, null, 'WELCOME', '/memberWelcome', '/memberWelcome.jsp', 't', 'f', 4, 4);

insert into page values (58, 1, null, 'COLD QUEUE', '/util/coldQueue', '/util/coldQueue.jsp', 't', 'f', 2, 58);
insert into page values (59, 1, null, 'SMS TEST', '/util/smsTest', '/util/smsTest.jsp', 't', 'f', 2, 59);
insert into page values (60, null, null, 'UNSUBSCRIBE', '/subscriptions', '/subscriptions.jsp', 'f', 'f', 1, 60);
insert into page values (61, 1, null, 'MAIL SHOTS', '/util/mailshots', '/util/mailshots.jsp', 't', 'f', 2, 61);
insert into page values (62, 1, null, 'MEMBER INFO', '/util/memberInfo', '/util/memberInfo.jsp', 't', 'f', 2, 62);
insert into page values (63, null, null, 'UNSUBSCRIBE', '/unsubscribe', '/subscriptions.jsp', 'f', 'f', 1, 63);
insert into page values (64, null, null, 'TRADE WELCOME', '/tradeWelcome', '/tradeWelcome.jsp', 'f', 'f', 1, 64);
insert into page values (65, null, null, 'TESTIMONIALS', '/testimonials', '/testimonials.jsp', 'f', 'f', 1, 65);

insert into page values (66, 1, null, 'STATS OVERVIEW', '/stat/overview', '/stat/overview.jsp', 't', 'f', 10, 66);
insert into page values (67, 1, null, 'PAYMENTS', '/stat/payments', '/stat/payments.jsp', 't', 'f', 10, 67);
insert into page values (68, 1, null, 'JOBS', '/stat/jobs', '/stat/jobs.jsp', 't', 'f', 10, 68);
insert into page values (69, 1, null, 'SKILLS COVERAGE', '/stat/skillsCoverage', '/stat/skillsCoverage.jsp', 't', 'f', 10, 69);
insert into page values (70, 1, null, 'SMS / MAIL', '/stat/smsMail', '/stat/smsMail.jsp', 't', 'f', 10, 70);
insert into page values (71, 1, null, 'COMPLETE', '/stat/complete', '/stat/complete.jsp', 't', 'f', 10, 71);


insert into page values (72, 0, 3, 'JOBS', '/myJobs', '/myJobs.jsp', 't', 'f', 4, 20);
insert into page values (73, 3, null, 'MY CUSTOMERS', '/myJobs', '/myJobs.jsp', 't', 'f', 4, 20);
insert into page values (74, 3, null, 'MY TRADESMEN', '/myTradesmen', '/myTradesmen.jsp', 't', 'f', 4, 20);


insert into page values (75, 1, null, 'SHOPPING SKILLS', '/util/shoppingSkills', '/util/shoppingSkills.jsp', 't', 'f', 2, 75);

insert into page values (76, 3, null, 'OTHER JOBS', '/otherJobs', '/otherJobs.jsp', 't', 'f', 4, 20);

insert into page values (77, 3, null, 'TRADE BENEFITS', '/tradeBenefits', '/tradeBenefits.jsp', 't', 'f', 4, 30);

insert into page values (78, 4, null, 'COURTESY CALL', '/support/courtesyCall', '/support/courtesyCall.jsp', 't', 't', 3, 78);

insert into page values (79, null, null, 'FORGOT PASSWORD', '/forgotPassword', '/forgotPassword.jsp', 'f', 't', 8, 78);

insert into page values (80, null, null, 'LINKS', '/links', '/links.jsp', 'f', 'f', 1, 80);

insert into page values (81, 0, null, 'AFFILIATES', '/affiliates', '/affiliates.jsp', 't', 'f', 4, 81);

insert into page values (82, null, null, 'AFFILIATE WELCOME', '/affiliateWelcome', '/affiliateWelcome.jsp', 'f', 'f', 1, 82);

insert into page values (83, null, null, 'SECTIONS', '/forums/sections', '/forums/sections.jsp', 't', 'f', 11, 83);
insert into page values (84, null, null, 'ARTICLES', '/forums/showArticle', '/forums/showArticle.jsp', 'f', 'f', 11, 84);
insert into page values (85, null, null, 'NEW TOPIC', '/forums/articles', '/forums/articles.jsp', 'f', 'f', 11, 85);


insert into page values (86, 1, null, 'AVAILABLE HOURS', '/stat/availableHours', '/stat/availableHours.jsp', 't', 'f', 10, 86);


insert into page values (87, null, null, 'ADDING VALUE', '/info/addingValue', '/info/addingValue.jsp', 't', 'f', 12, 91);
insert into page values (88, null, null, 'INFO HOME', '/info/infoHome', '/info/infoHome.jsp', 't', 'f', 12, 87);
insert into page values (89, null, null, 'SAVE ENERGY', '/info/energyEfficiency', '/info/energyEfficiency.jsp', 't', 'f', 12, 92);
insert into page values (90, null, null, 'FEATURES', '/info/features', '/info/features.jsp', 't', 'f', 12, 90);
insert into page values (91, null, null, 'PLANNING', '/info/planningRegs', '/info/planningRegs.jsp', 't', 'f', 12, 89);

insert into page values (92, 1, null, 'DOCO SECTIONS', '/util/docoSection', '/util/docoSection.jsp', 't', 'f', 2, 92);
insert into page values (93, null, null, 'SCREWFIX INFO', '/promo/screwfixInfo', '/promo/screwfixInfo.jsp', 'f', 'f', 1, 93);
insert into page values (94, null, null, 'SCREWFIX TERMS', '/promo/screwfixTerms', '/promo/screwfixTerms.jsp', 'f', 'f', 1, 94);


insert into page values (95, 1, null, 'TRADE TIPS', '/util/specSkillsTip', '/util/specSkillsTip.jsp', 't', 'f', 2, 95);


insert into page values (96, 7, null, 'SELF-ACTIVATE!', '/selfActivate', '/selfActivate.jsp', 't', 'f', 4, 1);


insert into page values (97, null, null, 'DIRECTORY', '/directory', '/directory.jsp', 'f', 'f', 1, 1);

insert into page values (98, null, null, 'SURVEY', '/survey', '/survey.jsp', 'f', 'f', 1, 1);

insert into page values (99, 1, null, 'REDIRECT URLS', '/util/redirectURLs', '/util/redirectURLs.jsp', 't', 'f', 2, 99);

insert into page values (100, null, null, 'INCOMING SMS', '/ext/incomingSMS', '/ext/incomingSMS.jsp', 'f', 'f', 1, 100);