// // //
//
Час генерації сторінки: 0.9756 сек.
Запити до бази: 99
SET NAMES cp1251

SELECT * FROM cms_menu ORDER BY id ASC

SELECT id, title, link, config, internal, published, version, system FROM cms_components

SELECT p.id, p.plugin, p.config, e.event FROM cms_plugins p, cms_event_hooks e WHERE p.published = 1 AND e.plugin_id = p.id

SELECT id FROM cms_user_groups WHERE alias = 'guest'

DELETE FROM cms_online WHERE lastdate <= DATE_SUB(NOW(), INTERVAL 3 MINUTE)

SELECT id as getfield FROM cms_online WHERE sess_id = 'pauchm20s4edifr06bvvaucvj5' AND ip = '54.158.248.167' LIMIT 1

INSERT INTO cms_online (ip, sess_id, lastdate, user_id, agent, viewurl) VALUES ('54.158.248.167', 'pauchm20s4edifr06bvvaucvj5', NOW(), '0', 'CCBot/2.0 (http://commoncrawl.org/faq/)', '/photos/1040')

SELECT id FROM cms_stats WHERE (ip = '54.158.248.167' AND page = '/photos/1040')

INSERT INTO cms_stats (ip, logdate, page, agent, refer) VALUES ('54.158.248.167', NOW(), '/photos/1040', 'CCBot/2.0 (http://commoncrawl.org/faq/)', '')

SELECT NSLeft, NSRight FROM cms_menu WHERE id = '20'

SELECT id, title, link, linktype
                           FROM cms_menu
                           WHERE NSLeft <= 36 AND NSRight >= 41 AND parent_id > 0
                           ORDER BY NSLeft

SELECT id, title FROM cms_photo_albums WHERE parent_id=0 AND NSDiffer='' ORDER BY id ASC LIMIT 1

SELECT * FROM cms_photo_albums WHERE id = '1040' ORDER BY id ASC LIMIT 1

SELECT id, title, NSLevel FROM cms_photo_albums WHERE NSLeft <= 6 AND NSRight >= 55 AND parent_id > 0 AND NSDiffer = '' ORDER BY NSLeft

SELECT NSDiffer as getfield FROM cms_photo_albums WHERE id='1040' LIMIT 1

SELECT a.*, IFNULL(COUNT(f.id), 0) as content_count
                FROM cms_photo_albums a
                LEFT JOIN cms_photo_files f ON f.album_id = a.id AND f.published = 1
                WHERE (a.parent_id=1040) AND a.published = 1 AND a.NSDiffer = ''
                GROUP BY a.id
                ORDER BY pubdate desc

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 53 AND NSRight < 54

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1158 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1158
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 51 AND NSRight < 52

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1152 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1152
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 43 AND NSRight < 50

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1140 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1140
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 41 AND NSRight < 42

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1139 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1139
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 39 AND NSRight < 40

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1135 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1135
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 37 AND NSRight < 38

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1115 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1115
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 35 AND NSRight < 36

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1114 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1114
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 27 AND NSRight < 34

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1094 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1094
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 23 AND NSRight < 26

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1070 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1070
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 21 AND NSRight < 22

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1068 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1068
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 19 AND NSRight < 20

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1066 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1066
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 17 AND NSRight < 18

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1065 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1065
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 15 AND NSRight < 16

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1064 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1064
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 11 AND NSRight < 12

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1063 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1063
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 9 AND NSRight < 10

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1062 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1062
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 7 AND NSRight < 8

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1058 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1058
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 13 AND NSRight < 14

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '26-09-2017' AND album_id=1053 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1053
				ORDER BY RAND()
				LIMIT 1

SELECT f.*,
                            IFNULL(r.total_rating, 0) as rating
					FROM cms_photo_files f
					LEFT JOIN cms_ratings_total r ON r.item_id=f.id AND r.target='photo'
					WHERE f.album_id = 1040  AND f.published = 1
					 ORDER BY pubdate desc 
LIMIT 0, 20

SELECT 1 FROM cms_photo_files WHERE album_id = 1040

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '3004' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '3002' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '2033' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '1901' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '364' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '363' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '362' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '173' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '174' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '175' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '176' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '169' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '170' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '171' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '172' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '168' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '133' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '132' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '130' AND published = 1

SELECT id FROM cms_comments WHERE target = 'photo' AND target_id = '131' AND published = 1

SELECT m.access_list
            FROM cms_modules m, cms_modules_bind mb
            WHERE mb.position = 'top' AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)

SELECT m.access_list
            FROM cms_modules m, cms_modules_bind mb
            WHERE mb.position = 'sidebar' AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)

SELECT *, m.id as mid, m.template as tpl
            FROM cms_modules m, cms_modules_bind mb
            WHERE (mb.position = 'topmenu') AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)
            ORDER BY m.ordering ASC

SELECT NSLeft, NSRight, NSLevel FROM cms_menu WHERE id = '20' ORDER BY id ASC LIMIT 1

SELECT id as getfield FROM cms_menu WHERE parent_id=0 LIMIT 1

SELECT * FROM cms_menu WHERE id = 1 AND NSDiffer = ''

SELECT * FROM cms_menu WHERE NSLeft > 1 AND NSRight < 64 AND NSDiffer = '' ORDER BY NSLeft,ordering

SELECT *, m.id as mid, m.template as tpl
            FROM cms_modules m, cms_modules_bind mb
            WHERE (mb.position = 'maintop') AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)
            ORDER BY m.ordering ASC

SELECT *, m.id as mid, m.template as tpl
            FROM cms_modules m, cms_modules_bind mb
            WHERE (mb.position = 'mainbottom') AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)
            ORDER BY m.ordering ASC