-- Account Pages
-- (
--   276 /* Account */,
--   277 /* My Account */,
--   278 /* Edit Profile */,
--   669 /* Edit Company Individuals */,
--   621 /* View Meeting Summaries */,
--   622 /* View Survey Results */,
--   623 /* Library */,
--   624 /* Library :: Statistics */,
--   625 /* Library :: Templates */,
--   627 /* Library :: Studies */,
--   279 /* My Purchases */,
--   553 /* My Event History */,
--   628 /* My Classified Listings */,
--   281 /* Login */,
--   552 /* Member Directory */,
--   280 /* Logout */,
--   282 /* Forgot Password */,
--   283 /* Forgot Password :: Thank You! */,
--   294 /* Enter New Password */
-- )

UPDATE `mm_Page` SET `handler` = 'user' WHERE `id` = 276;
UPDATE `mm_DraftPage` SET `handler` = 'user' WHERE `id` = 276;

UPDATE `mm_Page` AS `p`
LEFT JOIN `mm_PageOption` AS `po`
  ON  `po`.`idPage` = `p`.`id` AND `po`.`name` IN('showInMenu', 'isIndexing', 'showInSiteMap', 'showInFooter', 'enabled')
SET
  `p`.`showInMenu` = 'n',
  `p`.`isIndexing` = 'n',
  `p`.`showInSiteMap` = 'n',
  `p`.`showInFooter` = 'n',
  `po`.`value` = IF(`po`.`name` = 'enabled', 'y', 'n'),
  `po`.`show` = IF(`po`.`name` = 'enabled', 'y', 'n')
WHERE `p`.`id` IN (
  276 /* Account */,
  277 /* My Account */,
  278 /* Edit Profile */,
  669 /* Edit Company Individuals */,
  621 /* View Meeting Summaries */,
  622 /* View Survey Results */,
  623 /* Library */,
  624 /* Library :: Statistics */,
  625 /* Library :: Templates */,
  627 /* Library :: Studies */,
  279 /* My Purchases */,
  553 /* My Event History */,
  628 /* My Classified Listings */,
  281 /* Login */,
  552 /* Member Directory */,
  280 /* Logout */,
  282 /* Forgot Password */,
  283 /* Forgot Password :: Thank You! */,
  294 /* Enter New Password */
);

UPDATE `mm_PageOption` AS `po`
SET
  `po`.`value` = 'y',
  `po`.`show` = 'y'
WHERE `po`.`name` = 'isAccountNavigation'
  AND `po`.`idPage` IN (
    276 /* Account */,
    277 /* My Account */,
    669 /* Edit Company Individuals */,
    621 /* View Meeting Summaries */,
    622 /* View Survey Results */,
    623 /* Library */,
    624 /* Library :: Statistics */,
    625 /* Library :: Templates */,
    627 /* Library :: Studies */,
    278 /* Edit Profile */,
    279 /* My Purchases */,
    553 /* My Event History */,
    552 /* Member Directory */,
    628 /* My Classified Listings */,
    280 /* Logout */
  );

-- D R A F T

UPDATE `mm_DraftPage` AS `p`
LEFT JOIN `mm_DraftPageOption` AS `po`
  ON  `po`.`idPage` = `p`.`id` AND `po`.`name` IN('showInMenu', 'isIndexing', 'showInSiteMap', 'showInFooter', 'enabled')
SET
  `p`.`showInMenu` = 'n',
  `p`.`isIndexing` = 'n',
  `p`.`showInSiteMap` = 'n',
  `p`.`showInFooter` = 'n',
  `po`.`value` = IF(`po`.`name` = 'enabled', 'y', 'n'),
  `po`.`show` = IF(`po`.`name` = 'enabled', 'y', 'n')
WHERE `p`.`id` IN (
  276 /* Account */,
  277 /* My Account */,
  278 /* Edit Profile */,
  669 /* Edit Company Individuals */,
  621 /* View Meeting Summaries */,
  622 /* View Survey Results */,
  623 /* Library */,
  624 /* Library :: Statistics */,
  625 /* Library :: Templates */,
  627 /* Library :: Studies */,
  279 /* My Purchases */,
  553 /* My Event History */,
  628 /* My Classified Listings */,
  281 /* Login */,
  552 /* Member Directory */,
  280 /* Logout */,
  282 /* Forgot Password */,
  283 /* Forgot Password :: Thank You! */,
  294 /* Enter New Password */
);


UPDATE `mm_DraftPageOption` AS `po`
SET
  `po`.`value` = 'y',
  `po`.`show` = 'y'
WHERE `po`.`name` = 'isAccountNavigation'
  AND `po`.`idPage` IN (
    276 /* Account */,
    277 /* My Account */,
    278 /* Edit Profile */,
    669 /* Edit Company Individuals */,
    621 /* View Meeting Summaries */,
    622 /* View Survey Results */,
    623 /* Library */,
    624 /* Library :: Statistics */,
    625 /* Library :: Templates */,
    627 /* Library :: Studies */,
    279 /* My Purchases */,
    553 /* My Event History */,
    628 /* My Classified Listings */,
    552 /* Member Directory */,
    280 /* Logout */
  );
