# [31-Oct-2024 12:25:23] /spisanie8/root/ 108.61.209.243

set names utf8

SELECT
                    `ID`,
                    `URLLabel`,
                    `MetaTitle`,
                    `MetaDescription`,
                    `Title`,
                    `Annotation`,
                    `Image`,
                    `Module`
                FROM
                    `groups`
                WHERE
                    `URLLabel` = 'index'
                LIMIT 1

SELECT
                *
            FROM
                `slider`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Visible` = 1
            ORDER BY
                `PostDate` DESC
            LIMIT 6

SELECT
                    `articles`.`ID`,
                    `articles`.`IntDate`,
                    `articles`.`PostDate`,
                    `articles`.`Title`,
                    `articles`.`Annotation`,
                    `articles`.`Section`,
                    `articles`.`Gallery`,
                    `articles`.`VideoURL`,
                    `articles`.`URLLabel`,
                    `articles`.`Featured`,
                    `articles`.`OnlineSub`,
                    `articles`.`Visible`,
                    `groups`.`MenuLabel` AS GroupLabel,
                    `groups`.`URLLabel` AS GroupURLLabel
                FROM
                    `articles`
                    INNER JOIN `groups` ON `groups`.`ID` = `articles`.`GroupID`
                WHERE
                    `articles`.`Gallery` != '' AND
                    (CASE WHEN `articles`.`GroupID` = 41 THEN `articles`.`PostDate` >= '2024-10-31' ELSE `articles`.`PostDate` BETWEEN '2024-10-03' AND '2024-10-31 23:59:59' END) AND 
                `articles`.`PostDate` <= NOW()
             AND `articles`.`OnlineSub` = 0 AND
`articles`.`Visible` = 1
                ORDER BY
                    `articles`.`PostDate` DESC
             LIMIT 0, 100

SELECT
                `products`.`ID`,
                `products`.`PostDate`,
                `products`.`URLLabel`,
                `products`.`Title`,
                `products`.`Annotation`,
                `products`.`Gallery`,
                `magazines`.`IntDate`,
                `groups`.`URLLabel` AS `MLabel`
            FROM
                `products`
                INNER JOIN `magazines` ON `ID` = `ProductID`
                INNER JOIN `groups` ON `groups`.`ID` = `products`.`GroupID`
            WHERE
                `products`.`PostDate` <= NOW() AND
                `products`.`Visible` = 1
            ORDER BY
                `products`.`PostDate` DESC

SELECT
                `ID`,
                `ParentID`,
                `Colour`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `groups`
            WHERE
                `ParentID` > 0 AND
                `Visible` = 1
         AND `OnlineSub` = 0 ORDER BY `PostDate` DESC

SELECT
                `URLLabel`,
                `MenuLabel`,
                `Rules`,
                `Payments`
            FROM
                `pages`
            WHERE
                `Visible` = 1
            ORDER BY
                `PostDate` DESC
