diff --git a/enginegp.sql b/enginegp.sql index 6f54981..a86485a 100644 --- a/enginegp.sql +++ b/enginegp.sql @@ -279,19 +279,6 @@ CREATE TABLE `cashback` ( -- -------------------------------------------------------- --- --- Структура таблицы `chat` --- - -CREATE TABLE `chat` ( - `id` int(11) NOT NULL, - `userid` int(11) NOT NULL, - `date` datetime NOT NULL, - `msg` text NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - -- -- Структура таблицы `control` -- @@ -1533,12 +1520,6 @@ ALTER TABLE `boost_rating` ALTER TABLE `cashback` ADD PRIMARY KEY (`id`); --- --- Индексы таблицы `chat` --- -ALTER TABLE `chat` - ADD PRIMARY KEY (`id`); - -- -- Индексы таблицы `control` -- @@ -1995,11 +1976,6 @@ ALTER TABLE `boost_rating` ALTER TABLE `cashback` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- --- AUTO_INCREMENT для таблицы `chat` --- -ALTER TABLE `chat` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; --- -- AUTO_INCREMENT для таблицы `control` -- ALTER TABLE `control` diff --git a/system/data/engine.php b/system/data/engine.php index 222a0a8..6d0e495 100644 --- a/system/data/engine.php +++ b/system/data/engine.php @@ -26,7 +26,6 @@ $aRoute = array( 'api_v1', 'check', 'monitoring', - 'chat', 'jobs', 'partners', ); diff --git a/system/engine/chat.php b/system/engine/chat.php deleted file mode 100644 index 4fb2d93..0000000 --- a/system/engine/chat.php +++ /dev/null @@ -1,10 +0,0 @@ - 'Необходимо написать сообщение')); - - $msg = $_POST['text']; - $sql->query('INSERT INTO `chat` (`userid`, `date`, `msg`) VALUES ("' . $user['id'] . '", NOW(), "' . mysqli_real_escape_string($sql->sql_id, $msg) . '");'); - sys::outjs(array('s' => '')); - case 'dialog': - $q_Msgs = $sql->query('SELECT `chat`.`id`, `userid`, `msg`, `chat`.`date`, `login`, `group` FROM `chat` INNER JOIN `users` ON `chat`.`userid` = `users`.`id` ORDER BY `chat`.`date` ASC LIMIT 30'); - while ($msg = $sql->get($q_Msgs)) { - $html->get('messages_all', 'sections/chat'); - if ($msg['group'] == 'admin') - $group = 'Администратор'; - else if ($msg['group'] == 'support') - $group = 'Тех. Поддержка'; - else if ($msg['group'] == 'user') - $group = 'Клиент'; - - $name = $msg['login'] . ' (' . $group . ')'; - - $html->set('id', $msg['id']); - $html->set('userid', $msg['userid']); - $html->set('name', $name); - $html->set('time', $time); - $html->set('date', $msg['date']); - $html->set('msg', $msg['msg']); - $html->set('login', $msg['login']); - - $html->unit('me', $user['id'] == $userid, 1); - - for ($i = 1; $i <= 32; $i++) - $html->set('emoji_' . $i, ''); - - global $cfg; - $file = 'upload/avatars/' . $resp['uid'] . '.'; - $link = $cfg['http'] . 'upload/avatars/' . $resp['uid'] . '.'; - if (file_exists(ROOT . $file . 'jpg')) - $html->set('ava', '/upload/avatars/' . $resp['uid'] . '.jpg'); - elseif (file_exists(ROOT . $file . 'png')) - $html->set('ava', '/upload/avatars/' . $resp['uid'] . '.png'); - elseif (file_exists(ROOT . $file . 'gif')) - $html->set('ava', '/upload/avatars/' . $resp['uid'] . '.gif'); - else - $html->set('ava', $cfg['http'] . 'template/images/avatar.png'); - $html->pack('dialog'); - } - sys::out(isset($html->arr['dialog']) ? $html->arr['dialog'] : ''); - case 'delete': - if ($user['group'] != 'admin') - sys::outjs(array('e' => 'Недостаточно прав')); - - if (!isset($url['id'])) - sys::outjs(array('e' => 'Отсутствует идентификатор')); - - if ($go) - $sql->query('DELETE FROM `chat` WHERE `userid`="' . $url['id'] . '";'); - else - $sql->query('DELETE FROM `chat` WHERE `id`="' . $url['id'] . '";'); - - sys::outjs(array('s' => '')); - } -} - -$html->nav($title); - -$q_Msgs = $sql->query('SELECT `chat`.`id`, `userid`, `msg`, `chat`.`date`, `login`, `group` FROM `chat` INNER JOIN `users` ON `chat`.`userid` = `users`.`id` ORDER BY `chat`.`date` ASC LIMIT 30'); -while ($msg = $sql->get($q_Msgs)) { - $html->get('messages_all', 'sections/chat'); - if ($msg['group'] == 'admin') - $group = 'Администратор'; - else if ($msg['group'] == 'support') - $group = 'Тех. Поддержка'; - else if ($msg['group'] == 'user') - $group = 'Клиент'; - - $name = $msg['login'] . ' (' . $group . ')'; - - $html->set('id', $msg['id']); - $html->set('userid', $msg['userid']); - $html->set('name', $name); - $html->set('time', $time); - $html->set('date', $msg['date']); - $html->set('msg', $msg['msg']); - $html->set('login', $msg['login']); - - $html->unit('me', $user['id'] == $userid, 1); - - for ($i = 1; $i <= 32; $i++) - $html->set('emoji_' . $i, ''); - - global $cfg; - $file = 'upload/avatars/' . $msg['uid'] . '.'; - $link = $cfg['http'] . 'upload/avatars/' . $msg['uid'] . '.'; - if (file_exists(ROOT . $file . 'jpg')) - $html->set('ava', '/upload/avatars/' . $msg['uid'] . '.jpg'); - elseif (file_exists(ROOT . $file . 'png')) - $html->set('ava', '/upload/avatars/' . $msg['uid'] . '.png'); - elseif (file_exists(ROOT . $file . 'gif')) - $html->set('ava', '/upload/avatars/' . $msg['uid'] . '.gif'); - else - $html->set('ava', $cfg['http'] . 'template/images/avatar.png'); - $html->pack('msg_all'); -} - -$html->get('dialog', 'sections/chat'); -$html->set('chats', isset($html->arr['msg_all']) ? $html->arr['msg_all'] : ''); -$html->pack('main'); diff --git a/system/sections/chat/dialog.php b/system/sections/chat/dialog.php deleted file mode 100644 index d1eb070..0000000 --- a/system/sections/chat/dialog.php +++ /dev/null @@ -1,37 +0,0 @@ -query('SELECT * FROM (SELECT `id`, `userid`, `msg`, `date` FROM `chat` ORDER BY `date` DESC LIMIT 30) t ORDER BY `date` ASC;'); -while ($msg = $sql->get($q_Msgs)) { - if ($user['group'] == 'admin') - $group = 'Администратор'; - //elseif () - // $group = '(Клиент, серверов: 1 шт.)'; - else - $group = 'Клиент'; - - $name = $user['login'] . ' (' . $group . ')'; // (Администратор) - // $time = '[date]'; - - $html->get('message', 'chatwin'); - - $html->set('id', $msg['id']); - $html->set('userid', $msg['userid']); - $html->set('name', $name); - $html->set('time', $time); - $html->set('date', $msg['date']); - $html->set('msg', $msg['msg']); - - $html->unit('me', $user['id'] == $userid, 1); - - for ($i = 1; $i <= 32; $i++) - $html->set('emoji_' . $i, ''); - - $html->pack('dialog'); -} - -sys::out(isset($html->arr['dialog']) ? $html->arr['dialog'] : ''); diff --git a/template/all.html b/template/all.html index 9e26e83..5e070f5 100644 --- a/template/all.html +++ b/template/all.html @@ -119,7 +119,9 @@ Услуги База знаний Контактная информация - |admin|ACP|_admin| + |admin| + Панель администратора + |_admin|
@@ -143,7 +145,7 @@ |servers| Игровые сервера |_servers| - Тех. поддержка + Поддержка
Личный кабинет Баланс: [balance] [cur] @@ -170,14 +172,10 @@
  • Игровые сервера
  • |_servers| |auth| -
  • Тех. поддержка +
  • Поддержка
  • |_auth|
  • Мониторинг
  • - |auth| -
  • Онлайн чат
  • - |_auth| [other_menu] diff --git a/template/chat.html b/template/chat.html deleted file mode 100644 index 14dd535..0000000 --- a/template/chat.html +++ /dev/null @@ -1,30 +0,0 @@ -
    - -
    - [date] - - |me||_me| - |!me||adm||_adm||_!me| - |me||_me| - |!me||_!me| - -
    |me|Я|_me| |!me|[name]|_!me|
    -

    [msg]

    |date|(ред.)|_date| - |img| -
    - Прикрепленные изображения: -
    - [img] -
    -
    - |_img| -
    -
    -
    \ No newline at end of file diff --git a/template/css/chat.css b/template/css/chat.css deleted file mode 100644 index 3c6cd39..0000000 --- a/template/css/chat.css +++ /dev/null @@ -1,265 +0,0 @@ -.chat_main_head span.chat_sender > a { - display: none; -} - -.chat_main_head:hover span.chat_sender > a { - display: initial; -} - -.chat_data a { - - text-decoration: underline; -} - -.chat_data_foot { - padding: 5px 5px 0 5px; - font-size: 10px; -} - -.chat_data_foot > div { - display: inline-block; - width: 100%; - margin: 5px 0; -} - -.chat_data_foot > div > div { - width: 88px; - float: left; - margin-right: 5px; -} - -.chat_data_foot > div > div > a .image { - position: relative; - height: 80px; - width: 80px; - border: 4px solid #fff; - box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); - background-color: #fff; - float: left; - overflow: hidden; - background-size: contain !important; - background-repeat: no-repeat !important; - text-align: center; -} - -.chat_msg { - position: relative; - display: block; - margin-bottom: 15px; -} - -.chat_msg_ava { - height: 57px; - width: 57px; - border: 4px solid #fff; - box-shadow: 0px 0px 1px 1px #DDD; - overflow: hidden; - margin-top: 5px; - border-radius: 50%; - float: left; -} - -.chat_msg > .chat_main { - margin-left: 80px; -} - -.chat_msg > .chat_main { - padding-right: 5px; - display: block; -} - -.chat_main_head { - padding: 0 5px; - line-height: 22px; -} - -.chat_main_head > span.chat_sender { - color: #597da3; - font-size: 11px; - font-family: 'Roboto Medium'; -} - -.chat_date { - color: #888; - float: right; - font-size: 10px; - margin-top: 2px; -} - -.chat_body { - position: relative; -} - -.chat_msg > .chat_main .chat_body span.chat_sprite { - background: url(../images/chat_sprite.png) no-repeat 0px 0px; - width: 25px; - height: 17px; - display: block; - position: absolute; - left: -11px; - top: 8px; -} - -.chat_data { - background: #fff; - border: 1px solid rgba(196, 196, 196, 0.47); - padding: 10px; - color: #000; - font-size: 12px; - z-index: 0; - display: block; - font-family: 'Exo 2', sans-serif; - font-style: italic; - font-weight: 300; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); - word-wrap: break-word; -} - -.chat_msg_ava img { - width: 110%; - min-height: 112%; - margin-top: -3px; - margin-left: -2px; -} - -#dialog { - height: 500px; - overflow-y: scroll; -} - -.emoji { - display: inline-block; - background: url(../images/emoji.png) no-repeat 0px 0px; - height: 16px; - width: 16px; -} - -.emoji_1 { - background-position: 0px 0px; -} - -.emoji_2 { - background-position: 0px -17px; -} - -.emoji_3 { - background-position: 0px -34px; -} - -.emoji_4 { - background-position: 0px -51px; -} - -.emoji_5 { - background-position: 0px -68px; -} - -.emoji_6 { - background-position: 0px -85px; -} - -.emoji_7 { - background-position: 0px -102px; -} - -.emoji_8 { - background-position: 0px -119px; -} - -.emoji_9 { - background-position: 0px -136px; -} - -.emoji_10 { - background-position: 0px -153px; -} - -.emoji_11 { - background-position: 0px -170px; -} - -.emoji_12 { - background-position: 0px -187px; -} - -.emoji_13 { - background-position: 0px -204px; -} - -.emoji_14 { - background-position: 0px -221px; -} - -.emoji_15 { - background-position: 0px -238px; -} - -.emoji_16 { - background-position: 0px -255px; -} - -.emoji_17 { - background-position: 0px -272px; -} - -.emoji_18 { - background-position: 0px -289px; -} - -.emoji_19 { - background-position: 0px -306px; -} - -.emoji_20 { - background-position: 0px -323px; -} - -.emoji_21 { - background-position: 0px -340px; -} - -.emoji_22 { - background-position: 0px -357px; -} - -.emoji_23 { - background-position: 0px -374px; -} - -.emoji_24 { - background-position: 0px -391px; -} - -.emoji_25 { - background-position: 0px -408px; -} - -.emoji_26 { - background-position: 0px -425px; -} - -.emoji_27 { - background-position: 0px -442px; -} - -.emoji_28 { - background-position: 0px -459px; -} - -.emoji_29 { - background-position: 0px -476px; -} - -.emoji_30 { - background-position: 0px -493px; -} - -.emoji_31 { - background-position: 0px -510px; -} - -.emoji_32 { - background-position: 0px -527px; -} \ No newline at end of file diff --git a/template/images/emoji.png b/template/images/emoji.png deleted file mode 100644 index a985352..0000000 Binary files a/template/images/emoji.png and /dev/null differ diff --git a/template/js/chat.js b/template/js/chat.js deleted file mode 100644 index 1b37bc7..0000000 --- a/template/js/chat.js +++ /dev/null @@ -1,508 +0,0 @@ -$('#send').ajaxForm({ - dataType: 'json', - success: function (data) { - $.each(data, function (i, val) { - if (i == 'e') - bootbox.dialog('

    Ошибка

    ' + val, - [{ - "label": "OK", - "class": "btn-small btn-primary", - }] - ); - - if (i == 's') { - chat_sound('send'); - $('#text').val(''); - $('#login').val('') - document.getElementById("text").removeAttribute("style"); - $('#img-input').html(''); - $('#uploaded-files').html(''); - $('#uploaded-files').css('display', 'none'); - $('#frm').html($('#frm').html()); - ; - chat_dialog(false); - } - }); - - loading(0); - - return false; - } -}); - -function chat_readers(go) { - $.get(home + 'chat/section/read/id/1', - function (readers) { - $('#chat_readers').html(readers); - $('#chat_readers_modal').html(readers); - - if (!go) - setTimeout(function () { - chat_readers(false) - }, 3000); - }); -} - -function chat_writers(now) { - write = ''; - - if (now) - write = '/write/1'; - - $.get(home + 'chat/section/write/id/1' + write, - function (writers) { - $('#chat_writers').html(writers); - - if (!now) - setTimeout(function () { - chat_writers(false) - }, 3000); - }); -} - -function chat_msg_send() { - if ($('#text').val() == '') { - chat_sound('err'); - return false; - } - - loading(1); - - return true; -} - -function chat_msg_edit(id, type) { - if (type == 'edit') { - $.get(home + 'chat/section/edit/id/' + id, function (data) { - bootbox.dialog('

    Выбранное сообщение

    ' + data + '
    Спойлер
    Подсветка
    Цитата
    Ссылка
    ', - [{ - "label": "Продолжить", - callback: function () { - chat_msg_edit(id, 'edit_go') - }, - }, { - "label": "Закрыть", - }] - ); - }); - } else { - $.ajax({ - type: 'POST', - url: home + 'chat/section/edit/go', - data: 'edit=' + $('#edit').val() + '&id=' + id, - dataType: 'json', - success: function (data) { - $.each(data, function (i, val) { - if (i == 'e') - bootbox.dialog('

    Внимание!

    ' + val, - [{ - "label": "OK", - }] - ); - - if (i == 's') { - chat_dialog(false); - loading(0) - } - - }); - } - }); - } -} - -function chat_msg_del(id, user) { - bootbox.dialog('

    Выберите операцию

    ', - [{ - "label": "Удалить выбранное сообщение", - "class": "btn-small btn-primary", - callback: function () { - $('#msg_' + id).css('display', 'none'); - chat_msg_del_go(id, '?id=1') - } - }, { - "label": "Удалить все отправленное сообщение", - "class": "btn-small btn-primary", - callback: function () { - $('.user_' + user).css('display', 'none'); - chat_msg_del_go(user, '?user=1') - } - }, { - "label": "Отмена", - "class": "btn-small btn-primary" - }] - ); - - return false; -} - -function chat_msg_del_go(id, type) { - - $.getJSON(home + 'chat/section/delete/id/' + id + '/go/' + type, function (data) { - $.each(data, function (i, val) { - if (i == 'e') - bootbox.dialog('

    Ошибка

    ' + val, - [{ - "label": "OK", - "class": "btn-small btn-primary", - }] - ); - - if (i == 's') - chat_dialog(false); - }); - }); - - return false; -} - -function chat_dialog(go) { - var dialog_form = document.getElementById('dialog'); - - $.get(home + 'chat/section/dialog', function (data) { - $('#dialog').html(data) - - $('.spoiler').click(function () { - $(this).parent().children('div.spoiler_main').toggle(0); - }); - - $('pre code').each(function (i, block) { - hljs.highlightBlock(block); - }); - }); - notice_load(true); - - if (chat_scroll_ativate) - setTimeout(function () { - dialog_form.scrollTop = dialog_form.scrollHeight; - }, 300); - - if (chat_notice_ativate) - chat_dialog_info(); - - if (go) { - spoilers = $('.spoiler_main'); - update = true; - for (var i = 0; i < spoilers.length; i++) { - if (spoilers[i].style.display == 'block') { - setTimeout(function () { - chat_dialog(true) - }, 4000); - - return false; - } - } - setTimeout(function () { - chat_dialog(true) - }, 4000); - } -} - -function notice_load(go) { - $.get(home + 'chat/section/notice/check', function (data) { - if (data == 0) - document.getElementById('notice_chat').className = 'notice_chat__check'; - else - document.getElementById('notice_chat').className = ''; - - if (go) - notice_load(go); - }); -} - -function chat_dialog_info(go) { - $.get(home + 'chat/section/dialog/go', function (data) { - if (data != chat_dialog_id && data != '') { - chat_dialog_id = data; - chat_sound('notice') - } - }); -} - -function reply_chat(login) { - $('#login').val(login); - $('#text').val(login + ', ' + $('#text').val()); - - return false; -} - -function chat_scroll_change() { - if (chat_scroll_ativate) { - chat_scroll_ativate = false; - $('#chat_scroll').html('включить скроллинг'); - } else { - chat_scroll_ativate = true; - $('#chat_scroll').html('отключить скроллинг'); - } -} - -function chat_notice_change() { - if (chat_notice_ativate) { - chat_notice_ativate = false; - $('#chat_notice').html('включить уведомления'); - } else { - chat_notice_ativate = true; - $('#chat_notice').html('отключить уведомления'); - } -} - -function chat_sound_change() { - if (chat_sound_ativate) { - chat_sound_ativate = false; - $('#chat_sound').html('включить звуки'); - } else { - chat_sound_ativate = true; - $('#chat_sound').html('отключить звуки'); - } -} - -function chat_emoji(emoji) { - form = document.getElementById('text'); - begin = form.value.substr(0, form.selectionStart); - end = form.value.substr(form.selectionEnd); - var text = form.firstChild; - form.value = begin + '[emoji_' + emoji + ']' + end; - selPos = '[emoji_' + emoji + ']'.length + begin.length; - form.setSelectionRange(begin.length, selPos); - - return false; -} - -function chat_sound(track) { - if (!chat_sound_ativate) - return false; - - var audio = new Audio(); - audio.preload = 'auto'; - audio.src = '/template/sections/chat/sound/chat_' + track + '.wav'; - audio.play(); -} - -function clearFileUpload(id) { - fileField = document.getElementById(id); - parentNod = fileField.parentNode; - tmpForm = document.createElement("form"); - parentNod.replaceChild(tmpForm, fileField); - tmpForm.appendChild(fileField); - tmpForm.reset(); - parentNod.replaceChild(fileField, tmpForm); -} - -function bbcode(bbbegin, bbend, eID) { - form = document.getElementById(eID); - begin = form.value.substr(0, form.selectionStart); - end = form.value.substr(form.selectionEnd); - sel = form.value.substr(form.selectionStart, form.selectionEnd - form.selectionStart); - var text = form.firstChild; - form.value = begin + bbbegin + sel + bbend + end; - selPos = bbbegin.length + begin.length + sel.length + bbend.length; - form.setSelectionRange(begin.length, selPos); - - return false; -} - -jQuery.event.props.push('dataTransfer'); - -var maxFiles = 8; -var dataArray = []; - -$('#uploaded-files').hide(); - -$('#drop-files').on('drop', function (e) { - var files = e.dataTransfer.files; - - if (files.length <= maxFiles) { - for (i = 0; i < files.length; i++) { - if (files[i].size < (1024 * 1024 * 1)) - loadInView(files[i]); - else - bootbox.dialog('

    Внимание!

    Слишком большой файл. Максимально 1024Kb.', - [{ - "label": "Хорошо" - }] - ); - } - } else { - bootbox.dialog('

    Внимание!

    Нельзя загружать больше ' + maxFiles + ' изображений.', - [{ - "label": "Хорошо" - }] - ); - files.length = 0; - } - - return false; -}); - -$('#img').on('change', function () { - var files = $(this)[0].files; - - if (files.length <= maxFiles) { - for (i = 0; i < files.length; i++) { - if (files[i].size < (1024 * 1024 * 1)) - loadInView(files[i]); - else - bootbox.dialog('

    Внимание!

    Слишком большой файл. Максимально 1024Kb.', - [{ - "label": "Хорошо" - }] - ); - } - } else { - // swal('Внимание!', 'Нельзя загружать больше '+maxFiles+' изображений.', 'warning'); - bootbox.dialog('

    Внимание!

    Нельзя загружать больше ' + maxFiles + ' изображений.', - [{ - "label": "Хорошо" - }] - ); - files.length = 0; - } - - clearFileUpload('img'); -}); - -var upload = 0; -var files = 0; - -function loadInView(file) { - if (files < 0) - files = 0; - - $('#uploaded-holder').css('display', 'inline-block'); - - if (!file.type.match('image.*')) { - $('#drop-files p').html('Файл не является изображением.'); - - return false; - } - - files = files + 1; - - if (files <= maxFiles) - $('#upload-button').css({'display': 'block'}); - else { - bootbox.dialog('

    Внимание!

    Нельзя загружать больше ' + maxFiles + ' изображений.', - [{ - "label": "Хорошо" - }] - ); - - files = files - 1; - - return false; - } - - var fileReader = new FileReader(); - - fileReader.onload = (function (file) { - return function (e) { - dataArray.push({name: file.name, value: this.result, check: null, sel: null}); - addImage((dataArray.length - 1)); - }; - })(file); - - fileReader.readAsDataURL(file); - - return false; -} - -function delImage(id) { - $(this).empty(); - dataArray.splice(id, 1); - $('#dropped-files > .img-block').remove(); - addImage(-1); - - return false; -} - -function addImage(ind) { - if (ind < 0) { - start = 0; - end = dataArray.length; - files = files - 1; - } else { - start = ind; - end = ind + 1; - } - - if (dataArray.length == 0) { - $('#upload-button').hide(); - $('#uploaded-holder').hide(); - } - - for (i = start; i < end; i++) - if ($('#dropped-files > .img-block').length <= maxFiles) - $('#dropped-files').append('
    Удалить
    '); - - return false; -} - -function restartFiles(go) { - $('#loading-bar .loading-color').css({'width': '0%'}); - $('#loading').css({'display': 'none'}); - $('#loading-content').html(' '); - $('#upload-button').hide(); - $('#dropped-files > .img-block').remove(); - $('#uploaded-holder').hide(); - dataArray.length = 0; - if (go != 1) - files = upload; - - return false; -} - -$('#dropped-files #upload-button .delete').click(restartFiles); - -$('#upload-button .upload').click(function () { - $("#loading").show(); - - var totalPercent = 100 / dataArray.length; - var x = 0; - - $('#loading-content').html('Загружен ' + dataArray[0].name); - - $.each(dataArray, function (index, file) { - upload = upload + 1; - - $.post(home + 'chat/section/upload', dataArray[index], function (data) { - var fileName = dataArray[index].name; - ++x; - - $('#loading-bar .loading-color').css({'width': totalPercent * (x) + '%'}); - - if (totalPercent * (x) == 100) { - $('#loading-content').html('Загрузка завершена.'); - setTimeout(restartFiles(1), 1000); - } else if (totalPercent * (x) < 100) - $('#loading-content').html('Загружается ' + fileName); - - var dataSplit = data.split(':'); - - if (dataSplit[1] == 'ok') { - $('#uploaded-files').append('
    Загружено
    '); - $('#img-input').append('
    '); - } else - $('#uploaded-files').append(data); - }); - - if (upload == maxFiles) - $('#upload_block').hide(); - }); - - $('#uploaded-files').show(); - - return false; -}); - -$('#drop-files').on('dragenter', function () { - $(this).css({'border-color': '#74b084'}); - - return false; -}); - -$('#drop-files').on('drop', function () { - $(this).css({'border-color': '#dcdcdc'}); - files = files - 1; - - return false; -}); \ No newline at end of file diff --git a/template/sections/chat/dialog.html b/template/sections/chat/dialog.html deleted file mode 100644 index b1abdeb..0000000 --- a/template/sections/chat/dialog.html +++ /dev/null @@ -1,78 +0,0 @@ -

    Онлайн чат

    -
    -
    [dialog]
    -
    - - - - - - - - - - - -
    - -
    - Настройки: - отключить скроллинг - отключить уведомления - отключить звуки -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - \ No newline at end of file diff --git a/template/sections/chat/messages_all.html b/template/sections/chat/messages_all.html deleted file mode 100644 index 42ef380..0000000 --- a/template/sections/chat/messages_all.html +++ /dev/null @@ -1,21 +0,0 @@ -
    -
    - -
    -
    -
    - - |me|Я|_me| |!me|[name]|_!me| - |!me|Профиль|_!me| - |!me|(удалить соощение)|_!me| - - [date] -
    -
    - -
    -
    [msg]
    -
    -
    -
    -
    \ No newline at end of file diff --git a/template/sections/chat/sound/chat_err.wav b/template/sections/chat/sound/chat_err.wav deleted file mode 100644 index 2c05ea2..0000000 Binary files a/template/sections/chat/sound/chat_err.wav and /dev/null differ diff --git a/template/sections/chat/sound/chat_notice.wav b/template/sections/chat/sound/chat_notice.wav deleted file mode 100644 index 03677e5..0000000 Binary files a/template/sections/chat/sound/chat_notice.wav and /dev/null differ diff --git a/template/sections/chat/sound/chat_send.wav b/template/sections/chat/sound/chat_send.wav deleted file mode 100644 index b8ffa41..0000000 Binary files a/template/sections/chat/sound/chat_send.wav and /dev/null differ