# [04-Oct-2024 07:23:57] /ski/www/ 108.61.209.243

set names utf8

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

SELECT
                `ID`,
                `Country`,
                `Resort`
            FROM
                `destinations`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

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
# [04-Oct-2024 07:32:27] /ski/www/ 108.61.209.243

set names utf8

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

SELECT
                `ID`,
                `Country`,
                `Resort`
            FROM
                `destinations`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

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
                `meta`.`URLLabel`
	        FROM
	        	`meta`
                INNER JOIN `pages` ON
                    `pages`.`ID` = `meta`.`ID` AND
                    `pages`.`Language` = `meta`.`Language`
	    	WHERE
                `meta`.`ParentID` < 2 AND
                `meta`.`Language` = 'bg' AND
                `meta`.`Module` = 'offers' AND
                `pages`.`Action` = 'index'
         AND `meta`.`Visible` = 1 LIMIT 1

SELECT
                `meta`.`ID`,
                `meta`.`PostDate`,
                `meta`.`UploadID`,
                `offers`.`Gallery`,
                `meta`.`URLLabel`,
                `offers`.`DateFrom`,
                `offers`.`DateTo`,
                `offers`.`Beds`,
                `offers`.`Country`,
                `offers`.`Resort`,
                `offers`.`Annotation`
            FROM
                `offers`
                INNER JOIN `meta` ON
                    `offers`.`ID` = `meta`.`ID` AND
                    `offers`.`Language` = `meta`.`Language` AND
                    `meta`.`Module` = 'offers'
            WHERE
                `meta`.`Language` = 'bg'
         AND
                `meta`.`Visible` = 1 AND
                (`offers`.`StartFrom` IS NULL OR `offers`.`StartFrom` <= CURDATE()) AND
                (`offers`.`EndTo` IS NULL OR `offers`.`EndTo` >= CURDATE())
            
            GROUP BY
                `offers`.`ID`
            ORDER BY
                `meta`.`PostDate` ASC

SELECT
                `pages`.`ID`,
                `pages`.`Annotation`
	        FROM
	        	`meta`
                INNER JOIN `pages` ON
                    `pages`.`ID` = `meta`.`ID` AND
                    `pages`.`Language` = `meta`.`Language`
	    	WHERE
                `meta`.`Language` = 'bg' AND
                `meta`.`Module` = 'offers' AND
	    		`meta`.`URLLabel` = 'оферти'
         AND `meta`.`Visible` = 1 LIMIT 1

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

SELECT
                `meta`.`URLLabel`
	        FROM
	        	`meta`
                INNER JOIN `pages` ON
                    `pages`.`ID` = `meta`.`ID` AND
                    `pages`.`Language` = `meta`.`Language`
	    	WHERE
                `meta`.`ParentID` < 2 AND
                `meta`.`Language` = 'bg' AND
                `meta`.`Module` = 'reviews' AND
                `pages`.`Action` = 'index'
         AND `meta`.`Visible` = 1 LIMIT 1

SELECT
                `ID`,
                `UploadID`,
                `Image`,
                `FullName`,
                `Review`,
                `Visible`
            FROM
                `reviews`
            WHERE
                `Language` = 'bg' AND
                `Image` != '' AND
                `Visible` = 1
            ORDER BY `PostDate` DESC

SELECT
                `pages`.`ID`,
                `pages`.`Annotation`
	        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` = 'отзиви'
         AND `meta`.`Visible` = 1 LIMIT 1

SELECT
                `meta`.`URLLabel`
	        FROM
	        	`meta`
                INNER JOIN `pages` ON
                    `pages`.`ID` = `meta`.`ID` AND
                    `pages`.`Language` = `meta`.`Language`
	    	WHERE
                `meta`.`ParentID` < 2 AND
                `meta`.`Language` = 'bg' AND
                `meta`.`Module` = 'articles' AND
                `pages`.`Action` = 'index'
         AND `meta`.`Visible` = 1 LIMIT 1

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

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

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

SELECT
                *
            FROM
                `partners`
            WHERE
                `Language` = 'bg'

         AND `Visible` = 1
            ORDER BY
                `PostDate` 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
                (`meta`.`Module` = 'pages' OR `Parent`.`Module` = 'pages') AND
                (`pages`.`MenuLabel` <> '' OR `pages`.`FooterLabel` <> '')
            ORDER BY
                `meta`.`PostDate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LContacts','Domain','FacebookURL','LFacebook','InstagramURL','LInstagram','Phone','EMail','LHome','LHowOffer','InfoNewsletter','SubscribeURL','LSubscribe','Copyright') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
