Кто на сайте!-давно интересует вопрос почему мой ник на всех сайтах самый первый
потому, что список "кто на сайте"работает по принципу FIFO-буфера. В пиках посещаемости бывало я видел себя вторым.
А я все темы просматриваю первый 😃
Кто на сайте!-давно интересует вопрос почему мой ник на всех сайтах самый первый,ведь много ников начинающихся на букву а?
Потому что обычно через два “d” пишется. А у Вас изобретение…
потому, что список "кто на сайте"работает по принципу FIFO-буфера. В пиках посещаемости бывало я видел себя вторым.
больно сложно, всё проще 😁
<?php
/**/
$db=locator::LoadClass("DB");
$ch=Cacher::Run("memdb",array("cache_time"=>Configer::Load()->OnlineBar()->Cache_Time));
$res=array();
$res['users_list']=array();
$res['all_count']=0;
$res['guest_count']=0;
$res['user_count']=0;
if(!$res=$ch->Load("onlinebar")){
$user_id=(APP_User::Run()->User_ID!==null)?APP_User::Run()->User_ID:false;
$res['users_list']=$db->Select("
SELECT ?arrlk
FROM `?_sessions`
LEFT JOIN `?_users` ON(user_id=session_user_id)
LEFT JOIN `?_groups` ON(group_id=user_group_id)
WHERE session_user_id!=0
ORDER BY {user_id=?n DESC,} `user_login`",
array("user_id",
"user_login",
"group_attr_color",
"group_index",
"group_name",
"user_attr_status"),
$user_id);
$res['all_count']=$db->SqlGetNumRows("sessions");
$res['user_count']=count($res['users_list'];
$res['guest_count']=$res['all_count']-$res['user_count'];
$ch->Save("onlinebar",$res);
}
return $res;
/**/
?>
В точку!=))
Жуть…
{"assets_hash":"a8b26fa7f6e768b07a72c8c9aadb9422","page_data":{"users":{"3e1573483df9550077796e6c":{"_id":"3e1573483df9550077796e6c","hid":1128,"name":"Torvic99","nick":"Torvic99","avatar_id":null,"css":""},"3f07fcbc3df9550077796163":{"_id":"3f07fcbc3df9550077796163","hid":1915,"name":"chabapok","nick":"chabapok","avatar_id":null,"css":""},"3f40d29e3df9550077795f29":{"_id":"3f40d29e3df9550077795f29","hid":2076,"name":"Mick","nick":"Mick","avatar_id":null,"css":""},"486745843df95500777798a0":{"_id":"486745843df95500777798a0","hid":35959,"name":"sashok17","nick":"sashok17","avatar_id":null,"css":""},"4a37b2c93df955007776d044":{"_id":"4a37b2c93df955007776d044","hid":49615,"name":"armagedon","nick":"armagedon","avatar_id":null,"css":""},"4adc87d73df9550077768dfb":{"_id":"4adc87d73df9550077768dfb","hid":55217,"name":"Hight","nick":"Hight","avatar_id":null,"css":""}},"settings":{"can_see_ip":false,"can_report_abuse":false,"can_see_hellbanned":false,"forum_can_view":true,"forum_can_reply":false,"forum_edit_max_time":30,"forum_can_close_topic":false,"forum_show_ignored":false,"forum_mod_can_delete_topics":false,"forum_mod_can_hard_delete_topics":false,"forum_mod_can_see_hard_deleted_topics":false,"forum_mod_can_edit_posts":false,"forum_mod_can_pin_topic":false,"forum_mod_can_edit_titles":false,"forum_mod_can_close_topic":false,"can_vote":false,"forum_mod_can_add_infractions":false,"forum_topic_title_min_length":10,"forum_reply_old_post_threshold":30,"votes_add_max_time":168,"forum_show_post_interval":7,"can_see_deleted_users":false},"section":{"_id":"61c9a54c3df9550077bb50ab","hid":6,"title":"Курилка","parent":"61c9a54c3df9550077bb5123","description":"Разговоры на общие околомодельные темы.","is_category":false,"is_votable":true,"is_writable":true,"cache":{"topic_count":8213,"post_count":312955,"last_post":"672bdee8f9bb00ab89c25e0d","last_topic":"672bdee8f9bb00ab89c25e0c","last_topic_hid":572564,"last_topic_title":"Уро......ы заблокировали форум!","last_ts":"2024-11-06T21:26:00.126Z","last_user":"45d2cba43df955007778633c"}},"topic":{"_id":"4cb5df8b3df9550077698b77","hid":206434,"title":"Кто на сайте!-давно интересует вопрос почему мой ник на всех сайтах самый первый","views_count":1472,"last_post_counter":17,"cache":{"post_count":17,"first_post":"4cb5df8b3df9550077699fe4","first_ts":"2010-10-13T16:34:19.000Z","first_user":"4a37b2c93df955007776d044","last_post":"4cb9f1c13df955007769a004","last_post_hid":17,"last_ts":"2010-10-16T18:41:05.000Z","last_user":"3f40d29e3df9550077795f29"},"st":1,"section":"61c9a54c3df9550077bb50ab"},"subscription":null,"pagination":{"total":17,"per_page":25,"chunk_offset":11},"posts_list_before_post":["paginator","datediff"]},"locale":"en-US","user_id":"000000000000000000000000","user_hid":0,"user_name":"","user_nick":"","user_avatar":null,"is_member":false,"settings":{"can_access_acp":false,"can_use_dialogs":false,"hide_heavy_content":false},"unread_dialogs":false,"footer":{"rules":{"to":"common.rules"},"contacts":{"to":"rco-nodeca.contacts"}},"navbar":{"tracker":{"to":"users.tracker","autoselect":false,"priority":10},"forum":{"to":"forum.index"},"blogs":{"to":"blogs.index"},"clubs":{"to":"clubs.index"},"market":{"to":"market.index.buy"}},"recaptcha":{"public_key":"6LcyTs0dAAAAADW_1wxPfl0IHuXxBG7vMSSX26Z4"},"layout":"common.layout"}