# [10-Jan-2025 13:29:34] /activa/www/bg/актива-балансиран-фонд/инвестиционна-стратегия.html 108.61.209.243

set names utf8

SELECT
                `Module`
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'актива-балансиран-фонд' -- AND
                -- `ParentID` = 1 AND // TODO: FULL TEST
                -- (`Action` IS NULL OR `Action` = '')
         AND `Visible` = 1 LIMIT 1

SELECT
                `Module`
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'инвестиционна-стратегия' -- AND
                -- `ParentID` = 1 AND // TODO: FULL TEST
                -- (`Action` IS NULL OR `Action` = '')
         AND `Visible` = 1 LIMIT 1

SELECT
                    P1.`MenuLabel` AS `ParentTitle`,
                    IF(`P2`.`Image` <> '',
                            CONCAT('pages/', `P2`.`UploadID`, '/i_', `P2`.`Image`),
                            CONCAT('pages/', `P1`.`UploadID`, '/i_', `P1`.`Image`)
                    ) AS `HeaderImage`,
                    P2.*
                FROM
                    `pages` AS P1
                    INNER JOIN `pages` AS P2 ON P2.`ParentID` = P1.`ID` AND P2.`Language` = P1.`Language`
                WHERE
                    -- P1.`ParentID` = 1 AND // TODO: FULL TEST
                    P1.`URLLabel` = 'актива-балансиран-фонд' AND
                    P2.`Language` = 'bg' AND
                    P2.`Module` = 'pages' AND
                    P2.`URLLabel` = 'инвестиционна-стратегия'
             AND P2.`Visible` = 1 LIMIT 1

SELECT
                    P2.`Language`,
                    CONCAT(P0.`URLLabel`, '/', P2.`URLLabel`) AS `URLLabel`
                FROM
                    `pages` AS P1
                    INNER JOIN `pages` AS P2 ON
                        P1.`ID` = P2.`ID` AND
                        P2.`NoIndex` = 0 AND
                        P2.`Language` != 'bg' AND
                        P2.`Visible` = 1
                    INNER JOIN `pages` AS P0 ON
                        P0.`ID` = P2.`ParentID` AND
                        P0.`Language` = P2.`Language` AND
                        P0.`NoIndex` = 0 AND
                        P0.`Visible` = 1
                WHERE
                    P1.`NoIndex` = 0 AND
                    P1.`Language` = 'bg' AND
                    P1.`URLLabel` = 'инвестиционна-стратегия' AND
                    P1.`Visible` = 1

SELECT
                `P1`.`ID`,
                `P1`.`URLLabel`
	        FROM
	        	`pages` `P1`
                INNER JOIN `pages` `P2` ON
                    `P1`.`ID` = `P2`.`ID` AND
                    `P2`.`Language` = 'bg' AND
                    `P2`.`URLLabel` = 'актива-балансиран-фонд'
	    	WHERE
                `P1`.`Language` = 'en'
         AND `P1`.`Visible` = 1 LIMIT 1

SELECT
                        `P1`.`URLLabel`
                    FROM
                        `pages` `P1`
                        INNER JOIN `pages` `P2` ON
                            `P1`.`ID` = `P2`.`ID` AND
                            `P2`.`Language` = 'bg' AND
                            `P2`.`URLLabel` = 'инвестиционна-стратегия'
                    WHERE
                        `P1`.`Language` = 'en' AND
                        `P1`.`ParentID` = 32
                 AND `P1`.`Visible` = 1 LIMIT 1

SELECT
                `P1`.`ID`,
                `P1`.`ParentID`,
                `P1`.`MenuLabel`,
                IF(`P2`.`URLLabel` <> '', CONCAT(`P2`.`URLLabel`, '/', `P1`.`URLLabel`), `P1`.`URLLabel`) AS `URLLabel`,
                (SELECT `ID` FROM `pages` WHERE `ParentID` = `P1`.`ID` AND `P1`.`ParentID` = 1 LIMIT 1) AS `ChildID`,
                (SELECT `URLLabel` FROM `pages` WHERE `ParentID` = `P1`.`ID` AND `P1`.`ParentID` = 1 AND `Language` = `P1`.`Language` ORDER BY `PostDate` LIMIT 1) AS `ChildURLLabel`
            FROM
                `pages` AS `P1`
                LEFT JOIN `pages` AS `P2` ON
                    `P2`.`ID` = `P1`.`ParentID` AND
                    `P2`.`Language` = `P1`.`Language` AND
                    `P2`.`MenuLabel` <> ''
            WHERE
                `P1`.`MenuLabel` <> '' AND
                `P1`.`Visible` = 1 AND
                `P1`.`Language` = 'bg'
            GROUP BY
                `P1`.`ID`
            ORDER BY
                `P1`.`ParentID` ASC,
                `P1`.`PostDate` ASC

SELECT `Title`, `URLLabel` FROM `pages` WHERE`Module` = 'pages' AND
	`Action` = 'top' AND
	`Language` = 'bg' AND
	`Visible` = 1 LIMIT 1

SELECT
                `P1`.`FooterLabel`,
                `P1`.`URLLabel`,
                `P2`.`URLLabel` AS `ParentURLLabel`
            FROM
                `pages` AS `P1`
                LEFT JOIN `pages` AS `P2` ON
                    `P2`.`ID` = `P1`.`ParentID` AND
                    `P2`.`Language` = `P1`.`Language`
            WHERE
                `P1`.`FooterLabel` <> '' AND
                `P1`.`Visible` = 1 AND
                `P1`.`Language` = 'bg'
            GROUP BY
                `P1`.`ID`
            ORDER BY
                `P1`.`ParentID` ASC,
                `P1`.`PostDate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LAttention','AttentionText') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
# [10-Jan-2025 13:29:35] /activa/www/bg/ajax/cookies.html?_=1736508575222 108.61.209.243

set names utf8

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

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('TextCookies','LUnderstood') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
# [10-Jan-2025 13:29:38] /activa/www/ 108.61.209.243

set names utf8

SELECT
                    *,
                    CONCAT('pages/', `UploadID`, '/i_', `Image`) AS `HeaderImage`
    	        FROM
    	        	`pages`
    	    	WHERE
                    -- `ParentID` = 1 AND // TODO: full test
                    `Language` = 'bg' AND
                    `Module` = 'pages' AND
    	    		`URLLabel` = 'index'
             AND `Visible` = 1 LIMIT 1

SELECT
                    P2.`Language`,
                    P2.`URLLabel`
                FROM
                    `pages` AS P1
                    INNER JOIN `pages` AS P2 ON
                        P1.`ID` = P2.`ID` AND
                        P2.`NoIndex` = 0 AND
                        P2.`Language` != 'bg' AND
                        P2.`Visible` = 1
                WHERE
                    P1.`NoIndex` = 0 AND
                    P1.`Language` = 'bg' AND
                    P1.`URLLabel` = 'index' AND
                    P1.`Visible` = 1

SELECT
                `P1`.`UploadID`,
                `P1`.`URLLabel`,
                `P1`.`Icon`,
                `P1`.`Image`,
                `P1`.`MenuLabel`,
                `P1`.`Annotation`,
                (SELECT `URLLabel` FROM `pages` WHERE `ParentID` = `P1`.`ID` AND `P1`.`ParentID` = 1 AND `Language` = `P1`.`Language` ORDER BY `PostDate` LIMIT 1) AS `ChildURLLabel`
            FROM
                `pages` AS `P1`
            WHERE
                `P1`.`Icon` <> '' AND
                `P1`.`Image` <> '' AND
                `P1`.`MenuLabel` <> '' AND
                `P1`.`Language` = 'bg' AND
                `P1`.`FirstPage` = 1 AND
                `P1`.`Visible` = 1
            ORDER BY `P1`.`PostDate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LViewMore') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT `MetaTitle` FROM `pages` WHERE`ID` = 1 AND
	`Language` = 'bg' AND
	`Visible` = 1 LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('BGN','EUR') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `assets`.`Fund`,
                `assets`.`PostDate` + INTERVAL - 1 DAY AS `Date1`,
                `assets`.`PostDate`,
                `assets`.`NsaPerShare`,
                `assets`.`NSA`,
                `assets`.`Shares`,
                `assets`.`YearBegin`,
                `assets`.`YearAgo`,
                `assets`.`Deviation`,
                `funds`.`Currency`
            FROM
                `assets`
                INNER JOIN `funds` ON `assets`.`Fund` = `funds`.`Name`
            WHERE
                `assets`.`ID` IN (SELECT MAX(`assets`.`ID`) FROM `assets` GROUP BY `assets`.`Fund`)
             ORDER BY
                `assets`.`PostDate` DESC,
                `funds`.`Currency` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('June') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('balanced') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('highyield') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('euro') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('ndf') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

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'
             AND P2.`Visible` = 1 LIMIT 1

SELECT
                `PostDate`,
                `URLLabel`,
                `Title`,
                `Annotation`
            FROM
                `events`
            WHERE
                `Language` = 'bg' AND
                `FirstPage` = 1 AND
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 3

SELECT `Annotation` FROM `pages` WHERE`Module` = 'events' AND
	`Language` = 'bg' AND
	`Visible` = 1 LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Jul') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Apr') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Jan') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LViewAllNews') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `P1`.`ID`,
                `P1`.`ParentID`,
                `P1`.`MenuLabel`,
                IF(`P2`.`URLLabel` <> '', CONCAT(`P2`.`URLLabel`, '/', `P1`.`URLLabel`), `P1`.`URLLabel`) AS `URLLabel`,
                (SELECT `ID` FROM `pages` WHERE `ParentID` = `P1`.`ID` AND `P1`.`ParentID` = 1 LIMIT 1) AS `ChildID`,
                (SELECT `URLLabel` FROM `pages` WHERE `ParentID` = `P1`.`ID` AND `P1`.`ParentID` = 1 AND `Language` = `P1`.`Language` ORDER BY `PostDate` LIMIT 1) AS `ChildURLLabel`
            FROM
                `pages` AS `P1`
                LEFT JOIN `pages` AS `P2` ON
                    `P2`.`ID` = `P1`.`ParentID` AND
                    `P2`.`Language` = `P1`.`Language` AND
                    `P2`.`MenuLabel` <> ''
            WHERE
                `P1`.`MenuLabel` <> '' AND
                `P1`.`Visible` = 1 AND
                `P1`.`Language` = 'bg'
            GROUP BY
                `P1`.`ID`
            ORDER BY
                `P1`.`ParentID` ASC,
                `P1`.`PostDate` ASC

SELECT `Title`, `URLLabel` FROM `pages` WHERE`Module` = 'pages' AND
	`Action` = 'top' AND
	`Language` = 'bg' AND
	`Visible` = 1 LIMIT 1

SELECT
                `P1`.`FooterLabel`,
                `P1`.`URLLabel`,
                `P2`.`URLLabel` AS `ParentURLLabel`
            FROM
                `pages` AS `P1`
                LEFT JOIN `pages` AS `P2` ON
                    `P2`.`ID` = `P1`.`ParentID` AND
                    `P2`.`Language` = `P1`.`Language`
            WHERE
                `P1`.`FooterLabel` <> '' AND
                `P1`.`Visible` = 1 AND
                `P1`.`Language` = 'bg'
            GROUP BY
                `P1`.`ID`
            ORDER BY
                `P1`.`ParentID` ASC,
                `P1`.`PostDate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LAttention','AttentionText') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
# [10-Jan-2025 13:29:38] /activa/www/bg/ajax/cookies.html?_=1736508578587 108.61.209.243

set names utf8

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

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('TextCookies','LUnderstood') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
# [10-Jan-2025 13:29:47] /activa/www/bg/актива-асет-мениджмънт/новини.html 108.61.209.243

set names utf8

SELECT
                `Module`
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'актива-асет-мениджмънт' -- AND
                -- `ParentID` = 1 AND // TODO: FULL TEST
                -- (`Action` IS NULL OR `Action` = '')
         AND `Visible` = 1 LIMIT 1

SELECT
                `Module`
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'новини' -- AND
                -- `ParentID` = 1 AND // TODO: FULL TEST
                -- (`Action` IS NULL OR `Action` = '')
         AND `Visible` = 1 LIMIT 1

SELECT
                    P1.`MenuLabel` AS `ParentTitle`,
                    IF(`P2`.`Image` <> '',
                            CONCAT('pages/', `P2`.`UploadID`, '/i_', `P2`.`Image`),
                            CONCAT('pages/', `P1`.`UploadID`, '/i_', `P1`.`Image`)
                    ) AS `HeaderImage`,
                    P2.*
                FROM
                    `pages` AS P1
                    INNER JOIN `pages` AS P2 ON P2.`ParentID` = P1.`ID` AND P2.`Language` = P1.`Language`
                WHERE
                    -- P1.`ParentID` = 1 AND // TODO: FULL TEST
                    P1.`URLLabel` = 'актива-асет-мениджмънт' AND
                    P2.`Language` = 'bg' AND
                    P2.`Module` = 'events' AND
                    P2.`URLLabel` = 'новини'
             AND P2.`Visible` = 1 LIMIT 1

SELECT
                    P2.`Language`,
                    CONCAT(P0.`URLLabel`, '/', P2.`URLLabel`) AS `URLLabel`
                FROM
                    `pages` AS P1
                    INNER JOIN `pages` AS P2 ON
                        P1.`ID` = P2.`ID` AND
                        P2.`NoIndex` = 0 AND
                        P2.`Language` != 'bg' AND
                        P2.`Visible` = 1
                    INNER JOIN `pages` AS P0 ON
                        P0.`ID` = P2.`ParentID` AND
                        P0.`Language` = P2.`Language` AND
                        P0.`NoIndex` = 0 AND
                        P0.`Visible` = 1
                WHERE
                    P1.`NoIndex` = 0 AND
                    P1.`Language` = 'bg' AND
                    P1.`URLLabel` = 'новини' AND
                    P1.`Visible` = 1

SELECT
	        	*
	        FROM
	        	`events`
	    	WHERE
                `Language` = 'bg' AND
                (`StartFrom` IS NULL OR `StartFrom` <= CURDATE()) AND
                (`EndTo` IS NULL OR `EndTo` >= CURDATE())
         AND `Visible` = 1 ORDER BY `PostDate` DESC, `LastUpdate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LViewMore') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Jul') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Apr') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Jan') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Dec') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('May') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Mar') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Oct') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Nov') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Sep') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Aug') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `P1`.`ID`,
                `P1`.`URLLabel`
	        FROM
	        	`pages` `P1`
                INNER JOIN `pages` `P2` ON
                    `P1`.`ID` = `P2`.`ID` AND
                    `P2`.`Language` = 'bg' AND
                    `P2`.`URLLabel` = 'актива-асет-мениджмънт'
	    	WHERE
                `P1`.`Language` = 'en'
         AND `P1`.`Visible` = 1 LIMIT 1

SELECT
                        `P1`.`URLLabel`
                    FROM
                        `pages` `P1`
                        INNER JOIN `pages` `P2` ON
                            `P1`.`ID` = `P2`.`ID` AND
                            `P2`.`Language` = 'bg' AND
                            `P2`.`URLLabel` = 'новини'
                    WHERE
                        `P1`.`Language` = 'en' AND
                        `P1`.`ParentID` = 31
                 AND `P1`.`Visible` = 1 LIMIT 1

SELECT
                `P1`.`ID`,
                `P1`.`ParentID`,
                `P1`.`MenuLabel`,
                IF(`P2`.`URLLabel` <> '', CONCAT(`P2`.`URLLabel`, '/', `P1`.`URLLabel`), `P1`.`URLLabel`) AS `URLLabel`,
                (SELECT `ID` FROM `pages` WHERE `ParentID` = `P1`.`ID` AND `P1`.`ParentID` = 1 LIMIT 1) AS `ChildID`,
                (SELECT `URLLabel` FROM `pages` WHERE `ParentID` = `P1`.`ID` AND `P1`.`ParentID` = 1 AND `Language` = `P1`.`Language` ORDER BY `PostDate` LIMIT 1) AS `ChildURLLabel`
            FROM
                `pages` AS `P1`
                LEFT JOIN `pages` AS `P2` ON
                    `P2`.`ID` = `P1`.`ParentID` AND
                    `P2`.`Language` = `P1`.`Language` AND
                    `P2`.`MenuLabel` <> ''
            WHERE
                `P1`.`MenuLabel` <> '' AND
                `P1`.`Visible` = 1 AND
                `P1`.`Language` = 'bg'
            GROUP BY
                `P1`.`ID`
            ORDER BY
                `P1`.`ParentID` ASC,
                `P1`.`PostDate` ASC

SELECT `Title`, `URLLabel` FROM `pages` WHERE`Module` = 'pages' AND
	`Action` = 'top' AND
	`Language` = 'bg' AND
	`Visible` = 1 LIMIT 1

SELECT
                `P1`.`FooterLabel`,
                `P1`.`URLLabel`,
                `P2`.`URLLabel` AS `ParentURLLabel`
            FROM
                `pages` AS `P1`
                LEFT JOIN `pages` AS `P2` ON
                    `P2`.`ID` = `P1`.`ParentID` AND
                    `P2`.`Language` = `P1`.`Language`
            WHERE
                `P1`.`FooterLabel` <> '' AND
                `P1`.`Visible` = 1 AND
                `P1`.`Language` = 'bg'
            GROUP BY
                `P1`.`ID`
            ORDER BY
                `P1`.`ParentID` ASC,
                `P1`.`PostDate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LAttention','AttentionText') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
# [10-Jan-2025 13:29:47] /activa/www/bg/ajax/cookies.html?_=1736508587919 108.61.209.243

set names utf8

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

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('TextCookies','LUnderstood') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
