// // //
//

16 2017 13:05
16 2017 13:05
16 2017 12:31
19 2017 11:29
16 2017 13:05
16 2017 13:03
16 2017 12:30
16 2017 13:07
13 2017 12:07
13 2017 12:07
: 1 2 3 4
: 0.9470 .
: 40
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 = 'a0oaidcv4j7lh50cnr3siemn47' AND ip = '54.162.181.75' LIMIT 1

INSERT INTO cms_online (ip, sess_id, lastdate, user_id, agent, viewurl) VALUES ('54.162.181.75', 'a0oaidcv4j7lh50cnr3siemn47', NOW(), '0', 'CCBot/2.0 (http://commoncrawl.org/faq/)', '/users')

SELECT id FROM cms_stats WHERE (ip = '54.162.181.75' AND page = '/users')

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

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

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

SELECT		        
				    u.id as id,
				    u.login,
				    u.nickname,
				    u.logdate as flogdate,
		            u.is_deleted as is_deleted,
                    u.birthdate, u.rating,
				    u.status as microstatus,
                    p.city, p.karma as karma, p.imageurl, 
				    p.gender as gender
                    FROM cms_users u
				    INNER JOIN cms_user_profiles p ON p.user_id = u.id
				    WHERE u.is_locked = 0 AND u.is_deleted = 0
					ORDER BY regdate desc
					LIMIT 0, 10

SELECT 1 FROM cms_online WHERE user_id = '851'

SELECT 1 FROM cms_online WHERE user_id = '850'

SELECT 1 FROM cms_online WHERE user_id = '849'

SELECT 1 FROM cms_online WHERE user_id = '848'

SELECT 1 FROM cms_online WHERE user_id = '847'

SELECT 1 FROM cms_online WHERE user_id = '846'

SELECT 1 FROM cms_online WHERE user_id = '845'

SELECT 1 FROM cms_online WHERE user_id = '844'

SELECT 1 FROM cms_online WHERE user_id = '843'

SELECT 1 FROM cms_online WHERE user_id = '842'

SELECT 1 FROM cms_users WHERE is_locked=0 AND is_deleted=0

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

SELECT NSLeft, NSRight, NSLevel FROM cms_menu WHERE id = '15' 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 = '15' 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 = '15' 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 = '15' OR mb.menu_id = 0)
                  
            ORDER BY m.ordering ASC

SELECT 1 FROM cms_users WHERE is_locked=0 AND is_deleted=0

SELECT u.id
			FROM cms_users u
			LEFT JOIN cms_user_profiles p ON p.user_id = u.id
			WHERE u.is_locked = 0 AND u.is_deleted = 0 AND p.gender = 'm'

SELECT u.id 
			FROM cms_users u
			LEFT JOIN cms_user_profiles p ON p.user_id = u.id
			WHERE u.is_locked = 0 AND u.is_deleted = 0 AND p.gender = 'f'

SELECT IF (p.city != '', p.city, ' ') city, COUNT( p.user_id ) count
			FROM cms_users u
			LEFT JOIN cms_user_profiles p ON p.user_id = u.id
			WHERE u.is_locked =0 AND u.is_deleted =0
			GROUP BY p.city

SELECT user_id FROM cms_online

SELECT u.id as id, u.nickname as nickname, u.login as login, u.birthdate, p.gender as gender
                FROM cms_users u
				LEFT JOIN cms_user_profiles p ON p.user_id = u.id
                WHERE u.is_locked = 0 AND u.is_deleted = 0 AND p.showbirth = 1 AND DATE_FORMAT(u.birthdate, '%d-%m')='25-09'