# [22-Nov-2025 18:24:33] /ooyes/www/ 113.196.59.51

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
                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` = 'services' AND
                `pages`.`Action` = 'index'
         AND `meta`.`Visible` = 1 LIMIT 1

SELECT
                `meta`.`ID`,
                `meta`.`UploadID`,
                `meta`.`URLLabel`,
                `services`.`Icon`,
                `services`.`Title`,
                `meta`.`Visible`
            FROM
                `services`
                INNER JOIN `meta` ON
                    `services`.`ID` = `meta`.`ID` AND
                    `services`.`Language` = `meta`.`Language` AND
                    `meta`.`Module` = 'services'
            WHERE
                `meta`.`Language` = 'bg'
         AND
                `meta`.`Visible` = 1
            
            GROUP BY
                `services`.`ID`
            ORDER BY
                `meta`.`PostDate` ASC

SELECT
                *
            FROM
                `documents`
            WHERE
                `Language` = 'bg' AND
                `DocType` = 0

             AND `Visible` = 1 ORDER BY `PostDate` DESC

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

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` = 'projects' AND
                `pages`.`Action` = 'index'
         AND `meta`.`Visible` = 1 LIMIT 1

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

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

SELECT
                `ID`,
                `UploadID`,
                `Rate`,
                `Image`,
                `FullName`,
                `Review`,
                `Media`,
                `MediaURL`,
                `HomePage`,
                `Visible`
            FROM
                `reviews`
            WHERE
                `Language` = 'bg'
         AND `HomePage` = 1 AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 0, 4

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

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

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
                `pages`.`ID`,
                `pages`.`Annotation`,
                `meta`.`Visible`
	        FROM
	        	`meta`
                INNER JOIN `pages` ON
                    `pages`.`ID` = `meta`.`ID` AND
                    `pages`.`Language` = `meta`.`Language`
	    	WHERE
                `meta`.`Language` = 'bg' AND
                `meta`.`Module` = 'contacts' AND
	    		`meta`.`URLLabel` = 'kontakti'
         AND `meta`.`Visible` = 1 LIMIT 1

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

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
                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 DISTINCT
                `FooterLabel`
            FROM
                `stores`
            WHERE
                `FooterLabel` <> '' AND
                `Language` = 'bg'
         AND `Visible` = 1
            ORDER BY
                `PostDate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LPartOf','Address','LFollowUs','FacebookURL','InstagramURL','EMail','LFooterInfo','LOurOffices','LContactUs','LServices','LProductCatalog','LBusinessHours','BusinessHours','WorkingDays','LSubscribe','Copyright') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
