// // //
//

.
:
1.
2.
3. -
4.


1

.
2

.
3


4
0
41
:
0
31 2019
:

0
0

0
1. : , , .
2.
0
, .

___________________________
0
. в òί ϲ


. Ҳ-в


. òί ϲ Ͳ ί
0
41



0


- 1 -
- 2 Գ
0
: 1 2 3 4
: 0.6967 .
: 47
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 = 'bjhgucqfn680vafr4lsp2fdie0' AND ip = '3.95.131.208' LIMIT 1

INSERT INTO cms_online (ip, sess_id, lastdate, user_id, agent, viewurl) VALUES ('3.95.131.208', 'bjhgucqfn680vafr4lsp2fdie0', NOW(), '0', 'CCBot/2.0 (https://commoncrawl.org/faq/)', '/blogs')

SELECT id FROM cms_stats WHERE (ip = '3.95.131.208' AND page = '/blogs')

INSERT INTO cms_stats (ip, logdate, page, agent, refer) VALUES ('3.95.131.208', NOW(), '/blogs', 'CCBot/2.0 (https://commoncrawl.org/faq/)', '')

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

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

SELECT 1 FROM cms_blogs WHERE ownertype='single' AND owner='user'

SELECT 1 FROM cms_blogs WHERE ownertype='multi' AND owner='user'

SELECT p.user_id, b.allow_who
				FROM cms_blog_posts p
				LEFT JOIN cms_blogs b ON b.id = p.blog_id
				WHERE p.published = 1

SELECT p.*, p.pubdate as fpubdate,
                       IFNULL(r.total_rating, 0) as points,
                       u.nickname as author, u.id as author_id, u.login,
                       b.allow_who blog_allow_who,
                       b.seolink bloglink,
                       b.title blog_title,
                       b.owner owner,
                       c.title as club_title,
                       c.clubtype as club_type
                FROM cms_blog_posts p
				LEFT JOIN cms_users u ON u.id = p.user_id				
				LEFT JOIN cms_blogs b ON b.id = p.blog_id
                LEFT JOIN cms_clubs c ON c.id = b.user_id
                LEFT JOIN cms_ratings_total r ON r.item_id=p.id AND r.target='blogpost'
                WHERE p.published = 1
                ORDER BY p.pubdate DESC
                LIMIT 0, 10

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16067' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16067'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16066' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16066'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16065' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16065'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16064' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16064'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16063' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16063'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16062' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16062'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16061' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16061'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16060' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16060'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16059' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16059'
			ORDER BY tag DESC

SELECT id FROM cms_comments WHERE target = 'blog' AND target_id = '16058' AND published = 1

SELECT tag
			FROM cms_tags 
			WHERE target='blogpost' AND item_id='16058'
			ORDER BY tag DESC

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 = '17' OR mb.menu_id = 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 = '17' OR mb.menu_id = 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 = '17' OR mb.menu_id = 0)
                  
            ORDER BY m.ordering ASC

SELECT NSLeft, NSRight, NSLevel FROM cms_menu WHERE id = '17' 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 < 66 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 = '17' OR mb.menu_id = 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 = '17' OR mb.menu_id = 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 = 'sidebar') AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '17' OR mb.menu_id = 0)
                  
            ORDER BY m.ordering ASC

SELECT  p.id,
		                p.title,
						p.seolink,
						p.pubdate,
                        b.title as blog,
                        b.id as blog_id,
                        b.seolink as bloglink,
                        b.owner as owner,
                        b.user_id as uid, 
                        b.owner as owner,
                        b.ownertype as ownertype,
                        IFNULL(r.total_rating, 0) as points,
                        u.nickname as author
				FROM cms_blog_posts p
				LEFT JOIN cms_blogs b ON b.id = p.blog_id		
				LEFT JOIN cms_ratings_total r ON r.item_id=p.id AND r.target='blogpost'
				LEFT JOIN cms_users u ON u.id=b.user_id
				WHERE p.published = 1 AND b.allow_who = 'all'
				ORDER BY points DESC
LIMIT 10