# [16-Aug-2024 08:18:56] /efam/www/eF8R4nsA9B/bg/assets/list.html?fund=principal 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `ID`,
                `PostDate`,
                `NSA`,
                `Shares`,
                `NsaPerShare`,
                `YearBegin`,
                `YearAgo`,
                `OfferingBegin`,
                `Deviation`
            FROM
                `assets`
            WHERE
                `Fund` = 'principal'
         ORDER BY `PostDate` DESC LIMIT 0, 100

SELECT `URLLabel` FROM `pages` WHERE`Module` = 'assets' AND
	`Language` = 'bg' LIMIT 1

SELECT COUNT(*) AS NumRows FROM (
            SELECT
                `ID`,
                `PostDate`,
                `NSA`,
                `Shares`,
                `NsaPerShare`,
                `YearBegin`,
                `YearAgo`,
                `OfferingBegin`,
                `Deviation`
            FROM
                `assets`
            WHERE
                `Fund` = 'principal'
         ORDER BY `PostDate` DESC) AS CountTable
# [16-Aug-2024 08:18:57] /efam/www/eF8R4nsA9B/bg/ajax/assets/form/principal.html?_=1723785536830 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1
# [16-Aug-2024 08:19:01] /efam/www/eF8R4nsA9B/bg/documents/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `documents`.*,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Page`
            FROM
                `documents`
                INNER JOIN `pages` ON `pages`.`ID` = `documents`.`PageID` AND `pages`.`Language` = `documents`.`Language`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `documents`.`Language` = 'bg'
         ORDER BY `documents`.`PostDate` ASC
# [16-Aug-2024 08:19:02] /efam/www/eF8R4nsA9B/bg/ajax/documents/form.html?_=1723785542294 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `pages`.`ID`,
                `pages`.`ParentID`,
                `pages`.`Module`,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Label`
                -- `MenuLabel` AS `Label`
            FROM
                `pages`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`MenuLabel` <> '' AND
                `pages`.`Language` = 'bg' AND
                `pages`.`AddContent` LIKE '%documents%'
            ORDER BY
                `pages`.`ParentID` ASC,
                `pages`.`PostDate` ASC
# [16-Aug-2024 08:20:35] /efam/www/eF8R4nsA9B/bg/ajax/documents/form.html?_=1723785634613 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `pages`.`ID`,
                `pages`.`ParentID`,
                `pages`.`Module`,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Label`
                -- `MenuLabel` AS `Label`
            FROM
                `pages`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`MenuLabel` <> '' AND
                `pages`.`Language` = 'bg' AND
                `pages`.`AddContent` LIKE '%documents%'
            ORDER BY
                `pages`.`ParentID` ASC,
                `pages`.`PostDate` ASC
# [16-Aug-2024 08:24:54] /efam/www/eF8R4nsA9B/bg/ajax/documents/form.html?_=1723785893492 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `pages`.`ID`,
                `pages`.`ParentID`,
                `pages`.`Module`,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Label`
                -- `MenuLabel` AS `Label`
            FROM
                `pages`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`MenuLabel` <> '' AND
                `pages`.`Language` = 'bg' AND
                `pages`.`AddContent` LIKE '%documents%'
            ORDER BY
                `pages`.`ParentID` ASC,
                `pages`.`PostDate` ASC
# [16-Aug-2024 08:24:57] /efam/www/eF8R4nsA9B/bg/ajax/documents/form.html?_=1723785896741 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `pages`.`ID`,
                `pages`.`ParentID`,
                `pages`.`Module`,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Label`
                -- `MenuLabel` AS `Label`
            FROM
                `pages`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`MenuLabel` <> '' AND
                `pages`.`Language` = 'bg' AND
                `pages`.`AddContent` LIKE '%documents%'
            ORDER BY
                `pages`.`ParentID` ASC,
                `pages`.`PostDate` ASC
# [16-Aug-2024 08:25:04] /efam/www/eF8R4nsA9B/bg/events/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `ID`,
                `Language`,
                `PostDate`,
                `LastUpdate`,
                `StartFrom`,
                `EndTo`,
                `Title`,
                `URLLabel`,
                `Visible`
            FROM
                `events`
            WHERE
                `Language` = 'bg'
         ORDER BY `PostDate` DESC LIMIT 0, 100

SELECT
                    IF(P1.`URLLabel` <> '', CONCAT(P1.`URLLabel`, '/', P2.`URLLabel`), P2.`URLLabel`) AS `URL`
                FROM
                    `pages` P2
                    LEFT JOIN `pages` P1 ON
                        P2.`ParentID` > 1 AND
                        P1.`ID` = P2.`ParentID` AND
                        P1.`Language` = P2.`Language` AND
                        P1.`Visible` = P2.`Visible`
                WHERE
                    P2.`Language` = 'bg' AND
                    P2.`Module` = 'events'
             LIMIT 1

SELECT COUNT(*) AS NumRows FROM (
            SELECT
                `ID`,
                `Language`,
                `PostDate`,
                `LastUpdate`,
                `StartFrom`,
                `EndTo`,
                `Title`,
                `URLLabel`,
                `Visible`
            FROM
                `events`
            WHERE
                `Language` = 'bg'
         ORDER BY `PostDate` DESC) AS CountTable
# [16-Aug-2024 08:25:05] /efam/www/eF8R4nsA9B/bg/ajax/events/form.html?_=1723785904590 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1
# [16-Aug-2024 08:25:10] /efam/www/eF8R4nsA9B/bg/documents/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `documents`.*,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Page`
            FROM
                `documents`
                INNER JOIN `pages` ON `pages`.`ID` = `documents`.`PageID` AND `pages`.`Language` = `documents`.`Language`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `documents`.`Language` = 'bg'
         ORDER BY `documents`.`PostDate` ASC
# [16-Aug-2024 08:25:15] /efam/www/eF8R4nsA9B/bg/reports/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `reports`.*,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Page`
            FROM
                `reports`
                INNER JOIN `pages` ON `pages`.`ID` = `reports`.`PageID` AND `pages`.`Language` = `reports`.`Language`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `reports`.`Language` = 'bg'
         ORDER BY `reports`.`PostDate` ASC
# [16-Aug-2024 08:25:20] /efam/www/eF8R4nsA9B/bg/ajax/reports/form.html?_=1723785920039 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `pages`.`ID`,
                `pages`.`ParentID`,
                `pages`.`Module`,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Label`
                -- `MenuLabel` AS `Label`
            FROM
                `pages`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`MenuLabel` <> '' AND
                `pages`.`Language` = 'bg' AND
                `pages`.`AddContent` LIKE '%reports%'
            ORDER BY
                `pages`.`ParentID` ASC,
                `pages`.`PostDate` ASC
# [16-Aug-2024 08:25:24] /efam/www/eF8R4nsA9B/bg/documents/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `documents`.*,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Page`
            FROM
                `documents`
                INNER JOIN `pages` ON `pages`.`ID` = `documents`.`PageID` AND `pages`.`Language` = `documents`.`Language`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `documents`.`Language` = 'bg'
         ORDER BY `documents`.`PostDate` ASC
# [16-Aug-2024 08:25:25] /efam/www/eF8R4nsA9B/bg/ajax/documents/form.html?_=1723785925061 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `pages`.`ID`,
                `pages`.`ParentID`,
                `pages`.`Module`,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Label`
                -- `MenuLabel` AS `Label`
            FROM
                `pages`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`MenuLabel` <> '' AND
                `pages`.`Language` = 'bg' AND
                `pages`.`AddContent` LIKE '%documents%'
            ORDER BY
                `pages`.`ParentID` ASC,
                `pages`.`PostDate` ASC
# [16-Aug-2024 08:25:28] /efam/www/eF8R4nsA9B/bg/assets/list.html?fund=principal 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `ID`,
                `PostDate`,
                `NSA`,
                `Shares`,
                `NsaPerShare`,
                `YearBegin`,
                `YearAgo`,
                `OfferingBegin`,
                `Deviation`
            FROM
                `assets`
            WHERE
                `Fund` = 'principal'
         ORDER BY `PostDate` DESC LIMIT 0, 100

SELECT `URLLabel` FROM `pages` WHERE`Module` = 'assets' AND
	`Language` = 'bg' LIMIT 1

SELECT COUNT(*) AS NumRows FROM (
            SELECT
                `ID`,
                `PostDate`,
                `NSA`,
                `Shares`,
                `NsaPerShare`,
                `YearBegin`,
                `YearAgo`,
                `OfferingBegin`,
                `Deviation`
            FROM
                `assets`
            WHERE
                `Fund` = 'principal'
         ORDER BY `PostDate` DESC) AS CountTable
# [16-Aug-2024 08:25:32] /efam/www/eF8R4nsA9B/bg/events/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `ID`,
                `Language`,
                `PostDate`,
                `LastUpdate`,
                `StartFrom`,
                `EndTo`,
                `Title`,
                `URLLabel`,
                `Visible`
            FROM
                `events`
            WHERE
                `Language` = 'bg'
         ORDER BY `PostDate` DESC LIMIT 0, 100

SELECT
                    IF(P1.`URLLabel` <> '', CONCAT(P1.`URLLabel`, '/', P2.`URLLabel`), P2.`URLLabel`) AS `URL`
                FROM
                    `pages` P2
                    LEFT JOIN `pages` P1 ON
                        P2.`ParentID` > 1 AND
                        P1.`ID` = P2.`ParentID` AND
                        P1.`Language` = P2.`Language` AND
                        P1.`Visible` = P2.`Visible`
                WHERE
                    P2.`Language` = 'bg' AND
                    P2.`Module` = 'events'
             LIMIT 1

SELECT COUNT(*) AS NumRows FROM (
            SELECT
                `ID`,
                `Language`,
                `PostDate`,
                `LastUpdate`,
                `StartFrom`,
                `EndTo`,
                `Title`,
                `URLLabel`,
                `Visible`
            FROM
                `events`
            WHERE
                `Language` = 'bg'
         ORDER BY `PostDate` DESC) AS CountTable
# [16-Aug-2024 08:25:33] /efam/www/eF8R4nsA9B/bg/pages/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `pages`.`ID`,
                `pages`.`Language`,
                `pages`.`Module`,
                `pages`.`Action`,
                `pages`.`PostDate`,
                `pages`.`LastUpdate`,
                IF(`pages`.`MenuLabel` <> '', `pages`.`MenuLabel`, `pages`.`FooterLabel`) AS `Label`,
                IF(`Parent`.`URLLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`URLLabel`, '/', `pages`.`URLLabel`), `pages`.`URLLabel`) AS `URLLabel`,
                `pages`.`Visible`
            FROM
                `pages`
                LEFT JOIN `pages` AS `Parent` ON
                    -- `Parent`.`ParentID` = 1 AND // TODO: FULL TEST
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`Language` = 'bg'
         ORDER BY `pages`.`ParentID` ASC, `pages`.`PostDate` ASC
# [16-Aug-2024 08:25:35] /efam/www/eF8R4nsA9B/bg/ajax/pages/form.html?_=1723785934533 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `ID`,
                `MenuLabel`
            FROM
                `pages`
            WHERE
                ((`Module` = 'pages' AND `ParentID` = 1) OR `Module` = 'contacts') AND
                `Language` = 'bg' AND
                `MenuLabel` <> ''
# [16-Aug-2024 08:25:37] /efam/www/eF8R4nsA9B/bg/events/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `ID`,
                `Language`,
                `PostDate`,
                `LastUpdate`,
                `StartFrom`,
                `EndTo`,
                `Title`,
                `URLLabel`,
                `Visible`
            FROM
                `events`
            WHERE
                `Language` = 'bg'
         ORDER BY `PostDate` DESC LIMIT 0, 100

SELECT
                    IF(P1.`URLLabel` <> '', CONCAT(P1.`URLLabel`, '/', P2.`URLLabel`), P2.`URLLabel`) AS `URL`
                FROM
                    `pages` P2
                    LEFT JOIN `pages` P1 ON
                        P2.`ParentID` > 1 AND
                        P1.`ID` = P2.`ParentID` AND
                        P1.`Language` = P2.`Language` AND
                        P1.`Visible` = P2.`Visible`
                WHERE
                    P2.`Language` = 'bg' AND
                    P2.`Module` = 'events'
             LIMIT 1

SELECT COUNT(*) AS NumRows FROM (
            SELECT
                `ID`,
                `Language`,
                `PostDate`,
                `LastUpdate`,
                `StartFrom`,
                `EndTo`,
                `Title`,
                `URLLabel`,
                `Visible`
            FROM
                `events`
            WHERE
                `Language` = 'bg'
         ORDER BY `PostDate` DESC) AS CountTable
# [16-Aug-2024 08:25:38] /efam/www/eF8R4nsA9B/bg/ajax/events/form.html?_=1723785937717 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1
# [16-Aug-2024 08:25:40] /efam/www/eF8R4nsA9B/bg/documents/list.html 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `documents`.*,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Page`
            FROM
                `documents`
                INNER JOIN `pages` ON `pages`.`ID` = `documents`.`PageID` AND `pages`.`Language` = `documents`.`Language`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `documents`.`Language` = 'bg'
         ORDER BY `documents`.`PostDate` ASC
# [16-Aug-2024 08:25:41] /efam/www/eF8R4nsA9B/bg/ajax/documents/form.html?_=1723785941061 108.61.209.243

set names utf8

SELECT
                                `ID`
                            FROM
                                `users`
                            WHERE
                                `ID` = 4 AND
                                CRC32(`UserKey`) = 2170544426 AND
                                RIGHT(`UserKey`, 1) = 2
                            LIMIT 1

SELECT
                `pages`.`ID`,
                `pages`.`ParentID`,
                `pages`.`Module`,
                IF(`Parent`.`MenuLabel` <> '' AND `pages`.`ParentID` > 1, CONCAT(`Parent`.`MenuLabel`, ' / ', `pages`.`MenuLabel`), `pages`.`MenuLabel`) AS `Label`
                -- `MenuLabel` AS `Label`
            FROM
                `pages`
                LEFT JOIN `pages` AS `Parent` ON
                    `Parent`.`ParentID` = 1 AND
                    `pages`.`ParentID` = `Parent`.`ID` AND
                    `pages`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`MenuLabel` <> '' AND
                `pages`.`Language` = 'bg' AND
                `pages`.`AddContent` LIKE '%documents%'
            ORDER BY
                `pages`.`ParentID` ASC,
                `pages`.`PostDate` ASC
