SET AUTOCOMMIT=0;
START TRANSACTION;

-- ------------------------------------

SET @idItem := (SELECT `id` FROM `qs_PageItem` WHERE `type` = 'User_ForgotPassword_');
SET @id := (SELECT `idPage` FROM `qs_PageItem` WHERE `type` = 'User_ForgotPassword_');
INSERT INTO `qs_PageItemConfig` (`idItem`, `name`, `value`) VALUES (@idItem, 'id', @id);
INSERT INTO `qs_PageItemConfig` (`idItem`, `name`, `value`) VALUES (@idItem, 'defaultAction', 'new');

-- ------------------------------------

-- Page: "account/reset-password" (id = 329, idParent = 276) ------------------------------------------------

SET @idParent := (SELECT `p`.`idParent` FROM `qs_Page` AS `p` JOIN `qs_PageItem` AS `pi` ON `pi`.`idPage` = `p`.`id` WHERE `pi`.`type` = 'User_ForgotPassword_' LIMIT 1);

INSERT INTO `qs_Page` (`idParent`, `alias`, `handler`, `bodyTemplate`, `showInSiteMap`, `showInMenu`, `showInFooter`, `enabled`, `allowDelete`, `isSecure`, `isIndexing`, `showInDropdowns`, `isRoot`, `hasBlocks`, `final`, `system`, `redirect`, `redirectType`, `redirectPageId`, `redirectStatus`, `redirectAlias`, `headerImage`, `added`, `changed`, `sorter`)
VALUES (@idParent, 'reset-password', 'site', 'default.tpl', 'n', 'n', 'n', 'y', 'n', 'n', 'n', 'n', 'n', 'y', 'n', 'n', 'n', '', '0', '302', '', '', '2013-01-23 16:30:28', '2013-01-23 16:32:18', 4638764);
SET @pageId329 := LAST_INSERT_ID();
INSERT INTO `qs_PageContent` (`title`, `menuTitle`, `header`, `language`, `idPage`) VALUES ('', 'Enter New Password', '', 'eng', @pageId329);
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'showInSiteMap', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'showInMenu', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'showInFooter', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'enabled', 'n', 'y');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'allowDelete', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'isSecure', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'isIndexing', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'final', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'system', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'redirect', 'y', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'allowSubpages', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'isAdditional', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'showInCtrlMenu', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'requireSu', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'isAccountNavigation', 'n', 'n');
INSERT INTO `qs_PageOption` (`idPage`, `name`, `show`, `value`) VALUES (@pageId329, 'showInDropdowns', 'n', 'n');
INSERT INTO `qs_HtmlBlock` (`added`) VALUES ('2013-01-23 16:32:05');
SET @htmlBlockId2376 := LAST_INSERT_ID();
INSERT INTO `qs_HtmlBlockContent` (`idBlock`, `language`, `content`, `rawContent`, `added`, `changed`) VALUES (@htmlBlockId2376, 'eng', '', '', '2013-01-23 16:32:05', '2013-01-23 16:32:05');
INSERT INTO `qs_PageItem` (`idGroup`, `type`, `number`, `allowDelete`, `sorter`, `added`, `changed`, `idPage`) VALUES ('1', 'HtmlBlock_', @htmlBlockId2376, 'y', '1', '2013-01-23 16:32:05', '2013-01-23 16:32:05', @pageId329);
INSERT INTO `qs_PageItem` (`idGroup`, `type`, `allowDelete`, `sorter`, `added`, `changed`, `idPage`) VALUES ('1', 'User_ForgotPassword_', 'y', '2', '2013-01-23 16:32:05', '2013-01-23 16:32:05', @pageId329);
SET @pageItemId3564 := LAST_INSERT_ID();
INSERT INTO `qs_PageItemConfig` (`idItem`, `name`, `value`) VALUES (@pageItemId3564, 'defaultAction', 'edit');

-- ------------------------------------

COMMIT;

UPDATE `qs_SettingsCategory` SET `system` = 'n' WHERE `qs_SettingsCategory`.`id` = 4;

UPDATE `qs_PageContent` AS `pc` JOIN `qs_PageItem` AS `pi` ON `pi`.`idPage` = `pc`.`idPage` SET `pc`.`menuTitle` = 'Log Out', `pc`.`title` = 'Logout' WHERE `pi`.`type` = 'User_Logout_';
