# [16-Nov-2025 10:48:49] /www/ 108.61.209.243

set names utf8

SELECT
                *
	        FROM
	        	`meta`
                INNER JOIN `pages` ON
                    `pages`.`ID` = `meta`.`ID` AND
                    `pages`.`Language` = `meta`.`Language`
	    	WHERE
                `meta`.`Language` = 'bg' AND
                `meta`.`Module` = 'pages' AND
	    		`meta`.`URLLabel` = 'index'
         AND `meta`.`Visible` = 1 LIMIT 1

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

SELECT
                `Content`,
                `Limit`
            FROM
                `blocks`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'articles' AND
                `Action` = 'home'
         AND `Visible` = 1 LIMIT 1

SELECT
                `meta`.`ID`,
                `meta`.`PostDate`,
                `meta`.`UploadID`,
                `articles`.`Images`,
                CONCAT(`Parent`.`URLLabel`, '/', `meta`.`URLLabel`) AS `URLLabels`,
                `articles`.`Title`,
                `articles`.`Annotation`,
                `meta`.`Visible`
            FROM
                `articles`
                INNER JOIN `meta` ON
                    `articles`.`ID` = `meta`.`ID` AND
                    `articles`.`Language` = `meta`.`Language` AND
                    `meta`.`Module` = 'articles'
                INNER JOIN `meta` AS `Parent` ON
                    `meta`.`ParentID` = `Parent`.`ID` AND
                    `meta`.`Language` = `Parent`.`Language` AND
                    `Parent`.`Module` = 'articles'
            WHERE
                `meta`.`Language` = 'bg'
         AND
                `meta`.`Visible` = 1
            
            GROUP BY
                `articles`.`ID`
            ORDER BY
                `meta`.`PostDate` ASC
         LIMIT 0, 3

SELECT
                `meta`.`Module`,
                `pages`.`MenuLabel`,
                `pages`.`FooterLabel`,
                IF(`Parent`.`URLLabel` = 'index', `meta`.`URLLabel`, CONCAT(`Parent`.`URLLabel`, '/', `meta`.`URLLabel`)) AS `URLLabel`
            FROM
                `meta`
                INNER JOIN `pages` ON
                    `pages`.`ID` = `meta`.`ID` AND
                    `pages`.`Language` = `meta`.`Language`
                LEFT JOIN `meta` AS `Parent` ON
                    `meta`.`ParentID` = `Parent`.`ID` AND
                    `meta`.`Language` = `Parent`.`Language`
            WHERE
                `pages`.`Language` = 'bg' AND
                (`pages`.`MenuLabel` <> '' OR `pages`.`FooterLabel` <> '') AND
                (`meta`.`Module` = 'pages' OR `Parent`.`Module` = 'pages' OR `meta`.`Module` = `Parent`.`Module`)
         AND `meta`.`Visible` = 1
            GROUP BY
                `pages`.`ID`
            ORDER BY
                `meta`.`PostDate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Address','LFollowUs','FacebookURL','InstagramURL','Phone','EMail','LFooterInfo','LContactUs','Copyright','MGURL','MGLabel','MGAlt') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
