# [30-Sep-2024 10:50:43] /ngobg/root/ 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'messages'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                *
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'index' AND
                `Visible` = 1
            LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'main'
             ORDER BY
                `labels`.`Label` ASC

(SELECT `ID`, `Title`, '' AS `URLLabel`, 'annual' AS `Module` FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            LIMIT 3

SELECT SUM(CR) FROM
            (
                (SELECT COUNT(`ID`) AS CR FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
            ) A

(SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'analysis' AS `Module` FROM `analysis` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'legal' AS `Module` FROM `legal` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'position' AS `Module` FROM `position` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            ORDER BY PostDate ASC, `PostDate` DESC
            LIMIT 3

SELECT
                `ID`,
                `UserID`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                `FirstPage` = 1 AND
                `Visible` = 1
            ORDER BY
                `PostDate` DESC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

(SELECT
                `ID`,
                `UserID`,
                'news' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `news`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'analysis' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `analysis`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'reportage' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `FirstPage` = 'no' AND
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'legal' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `legal`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'position' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `position`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'live' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `live`
            WHERE
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            ORDER BY `PostDate` DESC

            LIMIT 20

(SELECT
                `ID`,
                `UserID`,
                `Title`,
                `URLLabel`,
                'ads' AS `PostType`,
                `PostDate`,
                `ValidTo`
            FROM
                `ads`
            WHERE
                `ValidTo` IS NOT NULL AND
                `ValidTo` >= CURDATE() AND
                `Visible` = 1
            LIMIT 14)

            UNION

            (SELECT
                `careers`.`ID`,
                `careers`.`UserID`,
                `careers`.`Title`,
                `careers`.`URLLabel`,
                'careers' AS `PostType`,
                `careers`.`PostDate`,
                `ActiveDate` AS `ValidTo`
            FROM
                `careers`
                INNER JOIN `users` ON `careers`.`UserID` = `users`.`ID`
            WHERE
                `ActiveDate` IS NOT NULL AND
                `ActiveDate` >= CURDATE() AND
                `users`.`UserKey` LIKE '%2' AND
                `careers`.`Visible` = 1
            LIMIT 14)

            ORDER BY `ValidTo` DESC
            LIMIT 14;

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 9959 AND `Visible` = 1 LIMIT 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` != 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` = 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) = 1 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `documents`
            WHERE
                `PostDate` >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND
                `DocType` != 4 AND
                `Visible` = 1;

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                `Visible` = 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                DISTINCT `Region`
            FROM
                `regions`
            WHERE
                `Language` = 'bg' AND
                `Region` != ''
            ORDER BY `Region` ASC

SELECT
                `ID`,
                `Title`
            FROM
                `activities`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `ID` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 10:50:44] /ngobg/root/bg/ajax/users/bar.html?_=1727682644230 167.99.142.201
# [30-Sep-2024 10:50:44] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727682644231 167.99.142.201

set names utf8

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 10:50:57] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 10:50:58] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727682658079 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 10:50:58] /ngobg/root/bg/ajax/users/bar.html?_=1727682658079 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 1
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 10:51:44] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 10:51:44] /ngobg/root/bg/ajax/users/bar.html?_=1727682704531 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')
# [30-Sep-2024 10:51:44] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727682704532 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 2
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 10:52:40] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 10:52:40] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727682760516 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 10:52:40] /ngobg/root/bg/ajax/users/bar.html?_=1727682760515 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 3
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 10:55:44] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 10:55:45] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727682945119 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 10:55:45] /ngobg/root/bg/ajax/users/bar.html?_=1727682945118 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 4
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:04:11] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:04:11] /ngobg/root/bg/ajax/users/bar.html?_=1727683451250 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')
# [30-Sep-2024 11:04:11] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727683451251 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 5
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:04:13] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:04:13] /ngobg/root/bg/ajax/users/bar.html?_=1727683453235 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')
# [30-Sep-2024 11:04:13] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727683453236 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 6
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:05:33] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:05:33] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727683533255 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:05:33] /ngobg/root/bg/ajax/users/bar.html?_=1727683533255 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 7
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:05:36] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:05:36] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727683536239 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:05:36] /ngobg/root/bg/ajax/users/bar.html?_=1727683536238 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 8
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:06:00] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:06:00] /ngobg/root/bg/ajax/users/bar.html?_=1727683560860 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')
# [30-Sep-2024 11:06:00] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727683560860 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 9
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:06:36] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:06:37] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:11:28] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:11:28] /ngobg/root/bg/ajax/users/bar.html?_=1727683888265 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')
# [30-Sep-2024 11:11:28] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727683888265 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 10
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:19:10] /ngobg/root/bg/organizations/management.html 167.99.142.201

set names utf8

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:19:10] /ngobg/root/bg/ajax/users/bar.html?_=1727684350404 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:19:10] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727684350405 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:19:15] /ngobg/root/bg/organizations.html 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'organizations'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'search'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'form'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'error'
             ORDER BY
                `labels`.`Label` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'main'

SELECT
                `ID`,
                `Title`
            FROM
                `activities`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `ID` ASC

SELECT
                DISTINCT `Region`
            FROM
                `regions`
            WHERE
                `Language` = 'bg' AND
                `Region` != ''
            ORDER BY `Region` ASC

SELECT
                `ID`,
                `Title`
            FROM
                `org_types`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `ID` ASC

SELECT
                `ID`,
                `Title`
            FROM
                `org_statutes`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `ID` ASC

SELECT `ID`, `From`, `UpTo` FROM `org_financial` WHERE `Visible` = 1 ORDER BY `ID` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                *
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'organizations' AND
                `Visible` = 1
            LIMIT 1

SELECT
                `organizations`.`ID`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `organizations`.`Statute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'active', 'unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`CRData`
            FROM
                `organizations`
                INNER JOIN `org_data` ON `organizations`.`ID` = `org_data`.`OrgID`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
            WHERE
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            ORDER BY `organizations`.`LastUpdate` DESC
         LIMIT 0, 20

SELECT COUNT(*) AS NumRows FROM (
            SELECT
                `organizations`.`ID`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `organizations`.`Statute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'active', 'unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`CRData`
            FROM
                `organizations`
                INNER JOIN `org_data` ON `organizations`.`ID` = `org_data`.`OrgID`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
            WHERE
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            ORDER BY `organizations`.`LastUpdate` DESC
        ) AS CountTable

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:19:21] /ngobg/root/bg/organizations 167.99.142.201

set names utf8

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:19:21] /ngobg/root/bg/ajax/users/bar.html?_=1727684361409 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:19:21] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1365&_=1727684361410 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:20:59] /ngobg/root/bg/ajax/users/bar.html?_=1727684458991 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:20:59] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684458991 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:21:00] /ngobg/root/bg/ajax/users/bar.html?_=1727684460629 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:21:00] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684460630 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:21:01] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684461138 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:21:01] /ngobg/root/bg/ajax/users/bar.html?_=1727684461138 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 11
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:22:59] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:23:11] /ngobg/root/bg/organizations/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:23:11] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684591709 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:23:11] /ngobg/root/bg/ajax/users/bar.html?_=1727684591708 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 12
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:27:01] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:02] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:02] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:21] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:23] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:23] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:23] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:23] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:23] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:24] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:24] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1
# [30-Sep-2024 11:27:44] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:27:44] /ngobg/root/bg/ajax/users/bar.html?_=1727684864852 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')
# [30-Sep-2024 11:27:44] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684864852 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 13
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:28:10] /ngobg/root/ 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'messages'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                *
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'index' AND
                `Visible` = 1
            LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'main'
             ORDER BY
                `labels`.`Label` ASC

(SELECT `ID`, `Title`, '' AS `URLLabel`, 'annual' AS `Module` FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            LIMIT 3

SELECT SUM(CR) FROM
            (
                (SELECT COUNT(`ID`) AS CR FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
            ) A

(SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'analysis' AS `Module` FROM `analysis` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'legal' AS `Module` FROM `legal` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'position' AS `Module` FROM `position` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            ORDER BY PostDate ASC, `PostDate` DESC
            LIMIT 3

SELECT
                `ID`,
                `UserID`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                `FirstPage` = 1 AND
                `Visible` = 1
            ORDER BY
                `PostDate` DESC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

(SELECT
                `ID`,
                `UserID`,
                'news' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `news`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'analysis' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `analysis`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'reportage' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `FirstPage` = 'no' AND
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'legal' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `legal`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'position' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `position`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'live' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `live`
            WHERE
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            ORDER BY `PostDate` DESC

            LIMIT 20

(SELECT
                `ID`,
                `UserID`,
                `Title`,
                `URLLabel`,
                'ads' AS `PostType`,
                `PostDate`,
                `ValidTo`
            FROM
                `ads`
            WHERE
                `ValidTo` IS NOT NULL AND
                `ValidTo` >= CURDATE() AND
                `Visible` = 1
            LIMIT 14)

            UNION

            (SELECT
                `careers`.`ID`,
                `careers`.`UserID`,
                `careers`.`Title`,
                `careers`.`URLLabel`,
                'careers' AS `PostType`,
                `careers`.`PostDate`,
                `ActiveDate` AS `ValidTo`
            FROM
                `careers`
                INNER JOIN `users` ON `careers`.`UserID` = `users`.`ID`
            WHERE
                `ActiveDate` IS NOT NULL AND
                `ActiveDate` >= CURDATE() AND
                `users`.`UserKey` LIKE '%2' AND
                `careers`.`Visible` = 1
            LIMIT 14)

            ORDER BY `ValidTo` DESC
            LIMIT 14;

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 9959 AND `Visible` = 1 LIMIT 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` != 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` = 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) = 1 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `documents`
            WHERE
                `PostDate` >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND
                `DocType` != 4 AND
                `Visible` = 1;

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                `Visible` = 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                DISTINCT `Region`
            FROM
                `regions`
            WHERE
                `Language` = 'bg' AND
                `Region` != ''
            ORDER BY `Region` ASC

SELECT
                `ID`,
                `Title`
            FROM
                `activities`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `ID` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:28:11] /ngobg/root/ 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'messages'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                *
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'index' AND
                `Visible` = 1
            LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'main'
             ORDER BY
                `labels`.`Label` ASC

(SELECT `ID`, `Title`, '' AS `URLLabel`, 'annual' AS `Module` FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            LIMIT 3

SELECT SUM(CR) FROM
            (
                (SELECT COUNT(`ID`) AS CR FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
            ) A

(SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'analysis' AS `Module` FROM `analysis` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'legal' AS `Module` FROM `legal` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'position' AS `Module` FROM `position` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            ORDER BY PostDate ASC, `PostDate` DESC
            LIMIT 3

SELECT
                `ID`,
                `UserID`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                `FirstPage` = 1 AND
                `Visible` = 1
            ORDER BY
                `PostDate` DESC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

(SELECT
                `ID`,
                `UserID`,
                'news' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `news`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'analysis' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `analysis`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'reportage' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `FirstPage` = 'no' AND
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'legal' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `legal`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'position' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `position`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'live' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `live`
            WHERE
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            ORDER BY `PostDate` DESC

            LIMIT 20

(SELECT
                `ID`,
                `UserID`,
                `Title`,
                `URLLabel`,
                'ads' AS `PostType`,
                `PostDate`,
                `ValidTo`
            FROM
                `ads`
            WHERE
                `ValidTo` IS NOT NULL AND
                `ValidTo` >= CURDATE() AND
                `Visible` = 1
            LIMIT 14)

            UNION

            (SELECT
                `careers`.`ID`,
                `careers`.`UserID`,
                `careers`.`Title`,
                `careers`.`URLLabel`,
                'careers' AS `PostType`,
                `careers`.`PostDate`,
                `ActiveDate` AS `ValidTo`
            FROM
                `careers`
                INNER JOIN `users` ON `careers`.`UserID` = `users`.`ID`
            WHERE
                `ActiveDate` IS NOT NULL AND
                `ActiveDate` >= CURDATE() AND
                `users`.`UserKey` LIKE '%2' AND
                `careers`.`Visible` = 1
            LIMIT 14)

            ORDER BY `ValidTo` DESC
            LIMIT 14;

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 9959 AND `Visible` = 1 LIMIT 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` != 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` = 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) = 1 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `documents`
            WHERE
                `PostDate` >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND
                `DocType` != 4 AND
                `Visible` = 1;

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                `Visible` = 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1
# [30-Sep-2024 11:28:11] /ngobg/root/bg/ajax/users/bar.html?_=1727684891131 167.99.142.201
# [30-Sep-2024 11:28:11] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684891131 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                DISTINCT `Region`
            FROM
                `regions`
            WHERE
                `Language` = 'bg' AND
                `Region` != ''
            ORDER BY `Region` ASC

SELECT
                `ID`,
                `Title`
            FROM
                `activities`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `ID` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:28:11] /ngobg/root/bg/ajax/users/bar.html?_=1727684891336 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:28:11] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684891338 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:28:15] /ngobg/root/bg/ajax/users/bar.html?_=1727684894949 167.99.142.201
# [30-Sep-2024 11:28:15] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684894949 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 14
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:28:15] /ngobg/root/ 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'messages'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                *
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'index' AND
                `Visible` = 1
            LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'main'
             ORDER BY
                `labels`.`Label` ASC

(SELECT `ID`, `Title`, '' AS `URLLabel`, 'annual' AS `Module` FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            LIMIT 3

SELECT SUM(CR) FROM
            (
                (SELECT COUNT(`ID`) AS CR FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
            ) A

(SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'analysis' AS `Module` FROM `analysis` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'legal' AS `Module` FROM `legal` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'position' AS `Module` FROM `position` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            ORDER BY PostDate ASC, `PostDate` DESC
            LIMIT 3

SELECT
                `ID`,
                `UserID`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                `FirstPage` = 1 AND
                `Visible` = 1
            ORDER BY
                `PostDate` DESC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

(SELECT
                `ID`,
                `UserID`,
                'news' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `news`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'analysis' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `analysis`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'reportage' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `FirstPage` = 'no' AND
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'legal' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `legal`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'position' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `position`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'live' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `live`
            WHERE
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            ORDER BY `PostDate` DESC

            LIMIT 20

(SELECT
                `ID`,
                `UserID`,
                `Title`,
                `URLLabel`,
                'ads' AS `PostType`,
                `PostDate`,
                `ValidTo`
            FROM
                `ads`
            WHERE
                `ValidTo` IS NOT NULL AND
                `ValidTo` >= CURDATE() AND
                `Visible` = 1
            LIMIT 14)

            UNION

            (SELECT
                `careers`.`ID`,
                `careers`.`UserID`,
                `careers`.`Title`,
                `careers`.`URLLabel`,
                'careers' AS `PostType`,
                `careers`.`PostDate`,
                `ActiveDate` AS `ValidTo`
            FROM
                `careers`
                INNER JOIN `users` ON `careers`.`UserID` = `users`.`ID`
            WHERE
                `ActiveDate` IS NOT NULL AND
                `ActiveDate` >= CURDATE() AND
                `users`.`UserKey` LIKE '%2' AND
                `careers`.`Visible` = 1
            LIMIT 14)

            ORDER BY `ValidTo` DESC
            LIMIT 14;

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 9959 AND `Visible` = 1 LIMIT 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` != 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` = 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) = 1 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `documents`
            WHERE
                `PostDate` >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND
                `DocType` != 4 AND
                `Visible` = 1;

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                `Visible` = 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                DISTINCT `Region`
            FROM
                `regions`
            WHERE
                `Language` = 'bg' AND
                `Region` != ''
            ORDER BY `Region` ASC

SELECT
                `ID`,
                `Title`
            FROM
                `activities`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `ID` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:28:15] /ngobg/root/bg/ajax/users/bar.html?_=1727684895932 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:28:16] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684895934 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:28:16] /ngobg/root/ 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'messages'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                *
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'index' AND
                `Visible` = 1
            LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'main'
             ORDER BY
                `labels`.`Label` ASC

(SELECT `ID`, `Title`, '' AS `URLLabel`, 'annual' AS `Module` FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 9)
            LIMIT 3

SELECT SUM(CR) FROM
            (
                (SELECT COUNT(`ID`) AS CR FROM `annual` WHERE `AnnualDate` = DATE_FORMAT(NOW(),'%c%d') AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `calendar` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
                UNION ALL
                (SELECT COUNT(`ID`) AS CR FROM `news` WHERE `CalendarDate` = CURDATE() AND `Visible` = 1 ORDER BY `PostDate` DESC)
            ) A

(SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'news' AS `Module` FROM `news` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'calendar' AS `Module` FROM `calendar` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'analysis' AS `Module` FROM `analysis` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'legal' AS `Module` FROM `legal` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            UNION
            (SELECT `ID`, `PostDate`, `Title`, `URLLabel`, 'position' AS `Module` FROM `position` WHERE `PostDate` > DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND `Visible` = 1 ORDER BY `Hits` DESC, `PostDate` DESC LIMIT 9)
            ORDER BY PostDate ASC, `PostDate` DESC
            LIMIT 3

SELECT
                `ID`,
                `UserID`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                `FirstPage` = 1 AND
                `Visible` = 1
            ORDER BY
                `PostDate` DESC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

(SELECT
                `ID`,
                `UserID`,
                'news' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `news`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'analysis' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `analysis`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'reportage' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `reportage`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `FirstPage` = 'no' AND
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'legal' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `legal`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'position' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `position`
            WHERE
                /* (`CalendarDate` IS NULL OR `CalendarDate` != CURDATE()) AND */
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            UNION

            (SELECT
                `ID`,
                `UserID`,
                'live' AS `PostType`,
                `PostDate`,
                `UploadID`,
                `Gallery`,
                `URLLabel`,
                `Title`,
                `Annotation`,
                `Content`
            FROM
                `live`
            WHERE
                `Visible` = 1
            ORDER BY `PostDate` DESC
            LIMIT 20)

            ORDER BY `PostDate` DESC

            LIMIT 20

(SELECT
                `ID`,
                `UserID`,
                `Title`,
                `URLLabel`,
                'ads' AS `PostType`,
                `PostDate`,
                `ValidTo`
            FROM
                `ads`
            WHERE
                `ValidTo` IS NOT NULL AND
                `ValidTo` >= CURDATE() AND
                `Visible` = 1
            LIMIT 14)

            UNION

            (SELECT
                `careers`.`ID`,
                `careers`.`UserID`,
                `careers`.`Title`,
                `careers`.`URLLabel`,
                'careers' AS `PostType`,
                `careers`.`PostDate`,
                `ActiveDate` AS `ValidTo`
            FROM
                `careers`
                INNER JOIN `users` ON `careers`.`UserID` = `users`.`ID`
            WHERE
                `ActiveDate` IS NOT NULL AND
                `ActiveDate` >= CURDATE() AND
                `users`.`UserKey` LIKE '%2' AND
                `careers`.`Visible` = 1
            LIMIT 14)

            ORDER BY `ValidTo` DESC
            LIMIT 14;

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 5088 AND `Visible` = 1 LIMIT 1

SELECT `ID`, `UploadID`, `FilePath` FROM `organizations` WHERE `FilePath` != '' AND `UserID` = 9959 AND `Visible` = 1 LIMIT 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` != 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) > 1 AND
                `careers`.`CareerType` = 3 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`careers`.`ID`)
            FROM
                `careers`
                INNER JOIN `users` ON `users`.`ID` = `careers`.`UserID`
            WHERE
                RIGHT(`users`.`UserKey`, 1) = 1 AND
                `careers`.`ActiveDate` IS NOT NULL AND
                `careers`.`ActiveDate` >= CURDATE() AND
                `careers`.`Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `documents`
            WHERE
                `PostDate` >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND
                `DocType` != 4 AND
                `Visible` = 1;

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `financing`
            WHERE
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                (
                    (`DeadlineTo` IS NOT NULL AND `DeadlineTo` >= CURDATE())
                    OR
                    `Current` = 1
                ) AND
                `Visible` = 1

SELECT
                COUNT(`ID`)
            FROM
                `publicconsultations`
            WHERE
                `Visible` = 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                DISTINCT `Region`
            FROM
                `regions`
            WHERE
                `Language` = 'bg' AND
                `Region` != ''
            ORDER BY `Region` ASC

SELECT
                `ID`,
                `Title`
            FROM
                `activities`
            WHERE
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `ID` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:28:16] /ngobg/root/bg/ajax/users/bar.html?_=1727684896372 167.99.142.201

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:28:16] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684896373 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (1 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
# [30-Sep-2024 11:28:17] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684897514 167.99.142.201
# [30-Sep-2024 11:28:17] /ngobg/root/bg/ajax/users/bar.html?_=1727684897514 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 15
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:28:18] /ngobg/root/bg/organizations/management/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'footer'
# [30-Sep-2024 11:28:18] /ngobg/root/bg/ajax/users/bar.html?_=1727684898157 167.99.142.201

set names utf8

INSERT INTO `counter`.`organizations`
                        (`PostDate`, `OrgID`, `IP`, `Info`) VALUES
                        (NOW(), 111734, '167.99.142.201', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36')
# [30-Sep-2024 11:28:18] /ngobg/root/bg/ajax/banners.html?pos=11,12,13,14,31,32,33,34,21,22&width=1920&_=1727684898158 167.99.142.201

set names utf8

(
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 11 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 12 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 13 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 14 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 31 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 32 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 33 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 34 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 21 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )
                     UNION 
                        (
                            SELECT
                                `ID`,
                                `UploadID`,
                                `Images`,
                                `SourceCode`,
                                `Title`,
                                `Target`,
                                `Position`
                            FROM
                                `banners`
                            WHERE
                                (`Images` <> '' OR `SourceCode` <> '') AND
                                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                                `Position` = 22 AND
                                1 << (2 - 1) & `Pages` AND
                                `Visible` = 1
                            ORDER BY RAND()
                            LIMIT 1
                        )

SELECT COUNT(`ID`) FROM `counter`.`organizations` WHERE `OrgID` = 111734

UPDATE
                        `organizations`
                    SET
                        `Hits` = 16
                    WHERE
                        `ID` = 111734 AND
                        `Visible` = 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'users'
             ORDER BY
                `labels`.`Label` ASC
# [30-Sep-2024 11:28:30] /ngobg/root/bg/organizations/111734-зоо-полиция.html 167.99.142.201

set names utf8

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'organizations'

SELECT
                `organizations`.`ID`,
                `organizations`.`UserID`,
                `organizations`.`UploadID`,
                `organizations`.`FilePath`,
                `organizations`.`Data`,
                `org_types`.`Title` AS `OrgType`,
                `org_statutes`.`Title` AS `OrgStatute`,
                GROUP_CONCAT(`activities`.`Title` SEPARATOR '; ') AS `ScopeOfActivities`,
                IF(`organizations`.`LastUpdate` > DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 'Active', 'Unactive') AS `Active`,
                `organizations`.`Volunteers`,
                `organizations`.`FinancialInfo`,
                `org_financial`.`From` AS `FinancialFrom`,
                `org_financial`.`UpTo` AS `FinancialUpTo`
            FROM
                `organizations`
                LEFT JOIN `org_types` ON `org_types`.`ID` = `organizations`.`OrgType` AND `org_types`.`Language` = 'bg'
                LEFT JOIN `org_statutes` ON `org_statutes`.`ID` = `organizations`.`Statute` AND `org_statutes`.`Language` = 'bg'
                LEFT JOIN `activities` ON 1 << (`activities`.`ID` - 1) & `organizations`.`ScopeOfActivity` AND `activities`.`Language` = 'bg'
                LEFT JOIN `org_financial` ON `org_financial`.`ID` = `organizations`.`FinancialInfo`
            WHERE
                `organizations`.`ID` = 111734 AND
                `organizations`.`Visible` = 1
            GROUP BY
                `organizations`.`ID`
            LIMIT 1

SELECT
                `CRData`
            FROM
                `organizations`
            WHERE
                `ID` = 111734 AND
                `Visible` = 1
            LIMIT 1

SELECT COUNT(ID) FROM organizations WHERE `Visible` = 1

SELECT `Label`, `Value` FROM `labels` WHERE `Language` = 'bg' AND `Module` = 'search'

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Language` = 'bg' AND
                `Module` = 'months'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `ExternalURL`,
                `MenuLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `MenuLabel` != '' AND
                `MenuLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Content`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `URLLabel` = 'footer'
            LIMIT 1

SELECT
                `ExternalURL`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `FooterLabel` != '' AND
                `FooterLabel` IS NOT NULL AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

