# [07-May-2025 12:09:08] /kadmea/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` = 'pages' AND
                `Action` = 'services'
         AND `Visible` = 1 LIMIT 1

SELECT
                `pages`.`Images`,
                `pages`.`MenuLabel`,
                -- `pages`.`Annotation`,
                `meta`.`MetaTitle`,
                `meta`.`UploadID`,
                `meta`.`URLLabel`
	        FROM
	        	`meta`
                INNER JOIN `pages` ON
                    `pages`.`ID` = `meta`.`ID` AND
                    `pages`.`Language` = `meta`.`Language`
	    	WHERE
                `meta`.`Language` = 'bg' AND
                `pages`.`ID` >= 1000

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

SELECT
                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
                (`meta`.`Module` = 'pages' OR `Parent`.`Module` = 'pages' OR `meta`.`Module` = `Parent`.`Module`) AND
                `pages`.`Language` = 'bg' AND
                `meta`.`Module` = 'contacts' AND
                `pages`.`Action` = 'index'
         AND `meta`.`Visible` = 1 LIMIT 1

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 ('LOurCommitments','Address','LContacts','LFollowUs','FacebookURL','InstagramURL','Copyright') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
