kphp Posted October 6, 2019 Report Share Posted October 6, 2019 Открыть: \system\modules\support.php Найти : $question = preg_replace('`(http(?:s)?://\w+[^\s\[\]\<]+)`i', '<!--link:$1--><a href="$1" target="_blank">$1</a><!--/link-->', $question); $db->query("INSERT INTO `".PREFIX."_support` SET title = '{$title}', question = '{$question}', suser_id = '{$user_id}', sfor_user_id = '{$user_id}', sdate = '{$server_time}', сdate = '{$server_time}'"); $dbid = $db->insert_id(); И после вставить : $agents = $db->super_query("SELECT user_id, user_group, user_last_visit FROM `".PREFIX."_users` WHERE user_group = '4'", true); foreach($agents as $agent){ $update_time = $server_time - 70; if($agent['user_last_visit'] >= $update_time){ $db->query("INSERT INTO `".PREFIX."_updates` SET for_user_id = '{$agent['user_id']}', from_user_id = '1', type = '', date = '{$server_time}', text = 'Новый вопрос в поддержке: ".substr($question, 0, 30)."...', user_photo = '', user_search_pref = '".substr($title, 0, 15)."...', lnk = '/support?act=show&qid={$dbid}'"); mozg_create_cache("user_{$agent['user_id']}/updates", 1); } } Автор: viiprogrammer Quote Link to comment Share on other sites More sharing options...
Disy Posted October 7, 2019 Report Share Posted October 7, 2019 Не полный, не работает.. Quote Link to comment Share on other sites More sharing options...
kphp Posted October 8, 2019 Author Report Share Posted October 8, 2019 12 часов назад, Disy сказал: Не полный, не работает.. если человек в группе техподдержке ему от пользователя приходит Моментальное уведомление Quote Link to comment Share on other sites More sharing options...
Disy Posted October 8, 2019 Report Share Posted October 8, 2019 пробовал, не пришло, оно же в index.php это уведомление по сути вообще настраивается.. Quote Link to comment Share on other sites More sharing options...
kphp Posted October 8, 2019 Author Report Share Posted October 8, 2019 17 минут назад, Disy сказал: пробовал, не пришло, оно же в index.php это уведомление по сути вообще настраивается.. это что патвоему Quote Link to comment Share on other sites More sharing options...
KirKMS Posted October 8, 2019 Report Share Posted October 8, 2019 26 минут назад, Disy сказал: пробовал, не пришло, оно же в index.php это уведомление по сути вообще настраивается.. Там отображение //ТП $user_support = $user_info['user_support']; if($user_support) $support = "<div class=\"headm_newac\" style=\"margin-left:26px\">{$user_support}</div>"; else $support = ''; document.getElementById('new_support').innerHTML = '{$support}'; Quote Link to comment Share on other sites More sharing options...
Mario Posted October 8, 2019 Report Share Posted October 8, 2019 3 минуты назад, Kir KMS сказал: Там отображение //ТП $user_support = $user_info['user_support']; if($user_support) $support = "<div class=\"headm_newac\" style=\"margin-left:26px\">{$user_support}</div>"; else $support = ''; document.getElementById('new_support').innerHTML = '{$support}'; Моментальные уведомления и счётчики не зависят друг от друга Quote Link to comment Share on other sites More sharing options...
KirKMS Posted October 8, 2019 Report Share Posted October 8, 2019 В MAIN.TPL Или push.js нужно добавить в $(document).ready(function(){ строку else if(row[0] == 15) uTitle = 'СП'; Если мне не обшибает память Quote Link to comment Share on other sites More sharing options...
KirKMS Posted October 8, 2019 Report Share Posted October 8, 2019 @Mario Так я и написал что там отображение Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.