618 lines
30 KiB
HTML
618 lines
30 KiB
HTML
|
|
|||
|
<link href="/tpl/css/style_bled.css?v=2" rel="stylesheet" />
|
|||
|
<div class="row-fluid">
|
|||
|
<div class="span12">
|
|||
|
<h3 class="page-title">Личные сообщения</h3>
|
|||
|
<ul class="breadcrumb">
|
|||
|
<li><a href="/">Главная</a><span class="divider">/</span></li>
|
|||
|
<li class="active"><a href="{$page1.url}">Личные сообщения</a></li>
|
|||
|
<li><a class="btn btn-warning" href="{$page1.url}write/"><i class="icon-plus icon-white"></i> Написать</a></li>
|
|||
|
{if $rassylka==1}<li><a class="btn btn-info" href="{$page1.url}writegrupp/"><i class="icon-plus icon-white"></i> Написать группе</a></li>{/if}
|
|||
|
{if $user.status==99}<li><a class="btn btn-danger" href="{$page1.url}writeprepods/"><i class="icon-plus icon-white"></i> Написать преподавателям</a></li>{/if}
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="row-fluid">
|
|||
|
<div class="span12">
|
|||
|
<div class="row-fluid">
|
|||
|
{*<div class="row-fluid">
|
|||
|
<div class="span12">
|
|||
|
<div class="widget red">
|
|||
|
<div class="widget-title">
|
|||
|
<h4>ВАЖНАЯ ИНФОРМАЦИЯ!!!</h4>
|
|||
|
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
|||
|
</div>
|
|||
|
<div class="widget-body">
|
|||
|
УБЕДИТЕЛЬНАЯ ПРОСЬБА, все вложенные файлы в личные сообщения скачивайте к себе на компьютер!
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>*}
|
|||
|
{if $regim=='show'}
|
|||
|
{* <!--старая версия 09042020-->
|
|||
|
<div class="row-fluid">
|
|||
|
<div class="span6">
|
|||
|
<div class="widget purple">
|
|||
|
<div class="widget-title">
|
|||
|
<h4><i class="icon-reorder"></i> Входящие сообщения</h4>
|
|||
|
<span class="tools"><a class="icon-chevron-down" href="javascript:;"></a></span>
|
|||
|
</div>
|
|||
|
<div class="widget-body">
|
|||
|
{if $form.msg!=""}
|
|||
|
<div class="alert alert-success">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Успешно!</strong> {$form.msg}
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
{if $form.err!=""}
|
|||
|
<div class="alert alert-error">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Ошибка!</strong> {$form.err}
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{if count($itshow)}
|
|||
|
<table class="table table-striped table-bordered table-advance table-hover">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th width="5%"> </th>
|
|||
|
<th width="15%"><i class="icon-bullhorn"></i> Дата</th>
|
|||
|
<th width="25%"><i class="icon-question-sign"></i> от кого</th>
|
|||
|
<th width="40%"><i class="icon-bookmark"></i> сообщение</th>
|
|||
|
<th width="15%"><i class=" icon-edit"></i> </th>
|
|||
|
<th></th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
{foreach from=$itshow item=lc}
|
|||
|
<tr>
|
|||
|
<td>
|
|||
|
{if $lc.tm=="in"}<span class="btn disabled"><i class="icon-arrow-down"></i></span>{/if}
|
|||
|
{if $lc.tm=="out"}<span class="btn btn-warning"><i class="icon-arrow-up"></i></span>{/if}
|
|||
|
</td>
|
|||
|
<td>{$lc.data}</td>
|
|||
|
<td>{$lc.from.fio} {if $lc.gruppa.sokr != ''}<br /><i>(Группа: {$lc.gruppa.sokr}-{$lc.gruppa.kurs}{$lc.gruppa.num_grupp} {$lc.gruppa.fo})</i>{/if}</td>
|
|||
|
<td>
|
|||
|
{if $lc.tm=="in"}{if $lc.to_status==1}<span class="btn btn-warning"><i class="icon-bolt"></i></span> {/if}{/if}<span class="text_small" id="s_{$lc.id}">{$lc.message|truncate}</span><span class="text_full" id="f_{$lc.id}" style="display:none;">{$lc.message}</span>{$lc.file}</td>
|
|||
|
<td nowarp>
|
|||
|
<a class="btn btn-primary" href="{$page1.url}answer/{$lc.id}/" data-trigger="hover" data-original-title="ответить"><i class="icon-mail-reply"></i></a>
|
|||
|
<a class="btn btn-danger" href="{$page1.url}del/{$lc.id}/"><i class="icon-trash "></i></a>
|
|||
|
</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
{/foreach}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
{/if}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="span6">
|
|||
|
<div class="widget gray">
|
|||
|
<div class="widget-title">
|
|||
|
<h4><i class="icon-reorder"></i> Отправленные сообщения (100 последних сообщений)</h4>
|
|||
|
<span class="tools"><a class="icon-chevron-down" href="javascript:;"></a></span>
|
|||
|
</div>
|
|||
|
<div class="widget-body">
|
|||
|
<span class="btn btn-success"><i class="icon-check"></i></span> - сообщение прочитано пользователем<br /><br />
|
|||
|
{if count($itshow1)}
|
|||
|
<table class="table table-striped table-bordered table-advance table-hover">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th width="5%"> </th>
|
|||
|
<th width="15%"><i class="icon-bullhorn"></i> Дата</th>
|
|||
|
<th width="15%"><i class="icon-question-sign"></i> кому</th>
|
|||
|
<th width="40%"><i class="icon-bookmark"></i> сообщение</th>
|
|||
|
<th width="15%"><i class=" icon-edit"></i> </th>
|
|||
|
<th width="5%"></th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
{foreach from=$itshow1 item=lc}
|
|||
|
<tr>
|
|||
|
<td>
|
|||
|
{if $lc.tm=="in"}<span class="btn btn-warning"><i class="icon-arrow-down"></i></span>{/if}
|
|||
|
{if $lc.tm=="out"}<span class="btn disabled"><i class="icon-arrow-up"></i></span>{/if}
|
|||
|
</td>
|
|||
|
<td>{$lc.data}</td>
|
|||
|
<td>{$lc.from.fio} {if $lc.gruppa.sokr != ''}<br /><i>(Группа: {$lc.gruppa.sokr}-{$lc.gruppa.kurs}{$lc.gruppa.num_grupp} {$lc.gruppa.fo})</i>{/if}</td>
|
|||
|
<td>
|
|||
|
{if $lc.to_status==2}<span class="btn btn-success"><i class="icon-check"></i></span> {/if}<span class="text_small1" id="s1_{$lc.id}">{$lc.message|truncate}</span><span class="text_full1" id="f1_{$lc.id}" style="display:none;">{$lc.message}</span>{$lc.file}</td>
|
|||
|
<td nowrap>
|
|||
|
<a class="btn btn-danger" href="{$page1.url}del/{$lc.id}/"><i class="icon-trash "></i></a>
|
|||
|
</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
{/foreach}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
{/if}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<!--div class="span4">
|
|||
|
<div class="widget yellow">
|
|||
|
<div class="widget-title">
|
|||
|
<h4><i class="icon-reorder"></i> Пользователи, с кем чаще общаемся</h4>
|
|||
|
<span class="tools"><a class="icon-chevron-down" href="javascript:;"></a></span>
|
|||
|
</div>
|
|||
|
<div class="widget-body" style="overflow:auto; height:500px;">
|
|||
|
{if count($pmusers)}
|
|||
|
{foreach from=$pmusers item=lc}
|
|||
|
<div class="row-fluid"><div class="green-box-blog">
|
|||
|
<div class="span3"><a href="{$page1.url}writeuser/{$lc.id}/">
|
|||
|
{if $lc.foto!=""}<img src="/upload/users/ava/{$lc.foto}" alt="{$lc.fio}" />{else}<img src="/tpl/img/no_avatar.png" alt="нет фото" />{/if}
|
|||
|
</a></div>
|
|||
|
<div class="span9">
|
|||
|
<blockquote><h5><a href="{$page1.url}writeuser/{$lc.id}/">{$lc.fio}</a></h5></blockquote>
|
|||
|
</div>
|
|||
|
</div></div>
|
|||
|
{/foreach}
|
|||
|
{/if}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div-->
|
|||
|
</div>
|
|||
|
<!--старая версия 09042020-->*}
|
|||
|
|
|||
|
<!--МОИ ПРЕПОДАВАТЕЛИ-->
|
|||
|
{if isset($user.student)}
|
|||
|
{/if}
|
|||
|
<div class="widget widget-tabs purple">
|
|||
|
<div class="widget-title">
|
|||
|
<h4 style="width:20%;"><i class="icon-reorder"></i> Личные сообщения</h4>
|
|||
|
</div>
|
|||
|
<div class="widget-body">
|
|||
|
<div class="tabbable ">
|
|||
|
<ul class="nav nav-tabs">
|
|||
|
<li class="active"><a href="#widget_tab1" data-toggle="tab">Входящие</a></li>
|
|||
|
<li class=""><a href="#widget_tab2" data-toggle="tab">Отправленные</a></li>
|
|||
|
</ul>
|
|||
|
<div class="tab-content">
|
|||
|
<div class="tab-pane active" id="widget_tab1">
|
|||
|
{if $form.msg!=""}
|
|||
|
<div class="alert alert-success">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Успешно!</strong> {$form.msg}
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
{if $form.err!=""}
|
|||
|
<div class="alert alert-error">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Ошибка!</strong> {$form.err}
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
|
|||
|
|
|||
|
<form name="search-fio" action="" method="post" class="form-horizontal">
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Введите имя </label>
|
|||
|
<div class="controls">
|
|||
|
<input type="text" class="span6 " placeholder="для поиска сообщений" name="fio_search" value="" minlength="5" />
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
|
|||
|
|
|||
|
{if count($itshow)}
|
|||
|
<div style="width:100%;overflow:auto;overflow-x: auto;overflow-y: hidden;">
|
|||
|
<a href="#" class="oftengrup_show btn btn-success" id="ofgr_-1">Все</a> <a href="#" class="oftengrup_show btn btn-success" id="ofgr_0">Сотрудники</a>
|
|||
|
{foreach from=$oftengrupps item=og}<a href="#" class="oftengrup_show btn btn-sm btn-info" id="ofgr_{$og.id}">{$og.sokr}-{$og.kurs}{$og.num_grupp} {$og.fo}</a> {/foreach}
|
|||
|
|
|||
|
{*<!--ТАБЛИЧНАЯ ВЕРСИЯ-->
|
|||
|
<table class="table table-striped table-bordered table-advance table-hover">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th width="5%"> </th>
|
|||
|
<th width="15%"><i class="icon-bullhorn"></i> Дата</th>
|
|||
|
<th width="25%"><i class="icon-question-sign"></i> от кого</th>
|
|||
|
<th width="40%"><i class="icon-bookmark"></i> сообщение</th>
|
|||
|
<th width="15%"><i class=" icon-edit"></i> </th>
|
|||
|
<th></th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
{foreach from=$itshow item=lc}
|
|||
|
<tr class="tr ofgrtr_{if count($lc.gruppa)}{$lc.gruppa.id}{else}0{/if}">
|
|||
|
<td>
|
|||
|
{if $lc.tm=="in"}<span class="btn disabled"><i class="icon-arrow-down"></i></span>{/if}
|
|||
|
{if $lc.tm=="out"}<span class="btn btn-warning"><i class="icon-arrow-up"></i></span>{/if}
|
|||
|
</td>
|
|||
|
<td>{$lc.data}</td>
|
|||
|
<td>{$lc.from.fio} {if $lc.gruppa.sokr != ''}<br /><i>(Группа: {$lc.gruppa.sokr}-{$lc.gruppa.kurs}{$lc.gruppa.num_grupp} {$lc.gruppa.fo})</i>{/if}</td>
|
|||
|
<td>
|
|||
|
{if $lc.tm=="in"}{if $lc.to_status==1}<span class="btn btn-warning" data-trigger="hover" data-original-title="Новое(непрочитанное) сообщение" data-placement="bottom"><i class="icon-bolt"></i></span> {/if}{/if}
|
|||
|
{if $lc.file!=""}<span class="btn btn-success" style="float: right;" data-trigger="hover" data-original-title="В сообщении есть прикрепленный файл" data-placement="bottom"><i class="icon-download"></i></span>{/if}
|
|||
|
<span class="btn btn-sm btn-default text_small{if $lc.tm=='in'}{if $lc.to_status==1} pm_set_status{/if}{/if}" id="s_{$lc.id}">ПРОЧИТАТЬ...</span><span class="text_full" id="f_{$lc.id}" style="display:none;">{$lc.message} {$lc.file}</span>
|
|||
|
</td>
|
|||
|
<td nowarp>
|
|||
|
<a class="btn btn-primary" href="{$page1.url}answer/{$lc.id}/" data-trigger="hover" data-original-title="ответить"><i class="icon-mail-reply"></i></a>
|
|||
|
<a class="btn btn-danger" href="{$page1.url}del/{$lc.id}/"><i class="icon-trash "></i></a>
|
|||
|
</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
{/foreach}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
*}
|
|||
|
|
|||
|
{foreach from=$itshow item=lc}
|
|||
|
<div class="row-fluid tr ofgrtr_{if count($lc.gruppa)}{$lc.gruppa.id}{else}0{/if}">
|
|||
|
<div class="span12">
|
|||
|
<div class="widget">
|
|||
|
<div class="widget-title" style="{if $lc.tm=="in"}{if $lc.to_status==1}background: #68c365!important;{else}background: #a1bfa0!important;{/if}{else}background: #a1bfa0!important;{/if}height: 46px!important;">
|
|||
|
<h4 style="color: #000;">
|
|||
|
{if $lc.tm=="in"}{if $lc.to_status==1}<span data-trigger="hover" data-original-title="Новое(непрочитанное) сообщение" data-placement="bottom"><i class="icon-bolt" style="color: #dc3015;"></i></span>{/if}{/if}
|
|||
|
{if $lc.file!=""}<span style="" data-trigger="hover" data-original-title="В сообщении есть прикрепленный файл" data-placement="bottom"><i class="icon-download" style="color: #2a15dc;"></i></span>{/if}
|
|||
|
{str_replace('06ff00','ffffff',str_replace('ffba00','ffffff',str_replace('38200a','ffffff',str_replace('<br>','',$lc.data))))}<br>{$lc.from.fio} {if $lc.gruppa.sokr != ''}<i> {$lc.gruppa.sokr}-{$lc.gruppa.kurs}{$lc.gruppa.num_grupp} {$lc.gruppa.fo}</i>{/if}
|
|||
|
</h4>
|
|||
|
<span class="tools">
|
|||
|
<a class="{if $lc.to_status==1}icon-chevron-down{else}icon-chevron-up{/if}" href="javascript:;"></a>
|
|||
|
</span>
|
|||
|
</div>
|
|||
|
<div class="widget-body" style="position: relative;{if $lc.to_status==1}{else}display:none;{/if}">
|
|||
|
{if $lc.tm=="in"}{if $lc.to_status==1}
|
|||
|
<span class="btn btn-sm btn-default text_small{if $lc.tm=='in'}{if $lc.to_status==1} pm_set_status{/if}{/if}" id="s_{$lc.id}">ПРОЧИТАТЬ...{*$lc.message|truncate:20:"..."*}</span><span class="text_full" id="f_{$lc.id}" style="display:none;">{if isset($lc.message1)}{$lc.message1}{else}{$lc.message}{/if} {$lc.file}</span>
|
|||
|
{else}
|
|||
|
{if isset($lc.message1)}{$lc.message1}{else}{$lc.message}{/if} {$lc.file}
|
|||
|
{/if}{else}{if isset($lc.message1)}{$lc.message1}{else}{$lc.message}{/if} {$lc.file}{/if}
|
|||
|
<br><br>
|
|||
|
<div style="float: right;position: absolute;right: 2px;bottom: 2px;width:94px;">
|
|||
|
<a class="btn btn-primary" href="{$page1.url}answer/{$lc.id}/" data-trigger="hover" data-original-title="ответить"><i class="icon-mail-reply"></i></a>
|
|||
|
<a class="btn btn-danger" href="{$page1.url}del/{$lc.id}/"><i class="icon-trash "></i></a>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{/foreach}
|
|||
|
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
</div>
|
|||
|
<div class="tab-pane" id="widget_tab2">
|
|||
|
<span class="btn btn-success"><i class="icon-check"></i></span> - сообщение прочитано пользователем<br /><br />
|
|||
|
{if count($itshow1)}
|
|||
|
{*<!--табличная версия-->
|
|||
|
<div style="width:100%;overflow:auto;overflow-x: auto;overflow-y: hidden;">
|
|||
|
<table class="table table-striped table-bordered table-advance table-hover">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th width="5%"> </th>
|
|||
|
<th width="15%"><i class="icon-bullhorn"></i> Дата</th>
|
|||
|
<th width="15%"><i class="icon-question-sign"></i> кому</th>
|
|||
|
<th width="40%"><i class="icon-bookmark"></i> сообщение</th>
|
|||
|
<th width="15%"><i class=" icon-edit"></i> </th>
|
|||
|
<th width="5%"></th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
{foreach from=$itshow1 item=lc}
|
|||
|
<tr>
|
|||
|
<td>
|
|||
|
{if $lc.tm=="in"}<span class="btn btn-warning"><i class="icon-arrow-down"></i></span>{/if}
|
|||
|
{if $lc.tm=="out"}<span class="btn disabled"><i class="icon-arrow-up"></i></span>{/if}
|
|||
|
</td>
|
|||
|
<td>{$lc.data}</td>
|
|||
|
<td>{$lc.from.fio} {if $lc.gruppa.sokr != ''}<br /><i>(Группа: {$lc.gruppa.sokr}-{$lc.gruppa.kurs}{$lc.gruppa.num_grupp} {$lc.gruppa.fo})</i>{/if}</td>
|
|||
|
<td>
|
|||
|
{if $lc.to_status==2}<span class="btn btn-success"><i class="icon-check"></i></span> {/if}<span class="text_small1" id="s1_{$lc.id}">{$lc.message|truncate}</span><span class="text_full1" id="f1_{$lc.id}" style="display:none;">{$lc.message}</span>{$lc.file}</td>
|
|||
|
<td nowrap>
|
|||
|
<a class="btn btn-danger" href="{$page1.url}del/{$lc.id}/"><i class="icon-trash "></i></a>
|
|||
|
</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
{/foreach}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
*}
|
|||
|
{foreach from=$itshow1 item=lc}
|
|||
|
<div class="row-fluid">
|
|||
|
<div class="span12">
|
|||
|
<div class="widget">
|
|||
|
<div class="widget-title" style="{if $lc.to_status==2}background: #68c365!important;{else}background: #a1bfa0!important;{/if}height: 46px!important;">
|
|||
|
<h4 style="color: #000;">
|
|||
|
{if $lc.to_status==2}<span data-trigger="hover" data-original-title="сообщение прочитано пользователем" data-placement="bottom"><i class="icon-check" style="color: #dc3015;"></i></span>{/if}
|
|||
|
{if $lc.file!=""}<span style="" data-trigger="hover" data-original-title="В сообщении есть прикрепленный файл" data-placement="bottom"><i class="icon-download" style="color: #2a15dc;"></i></span>{/if}
|
|||
|
{str_replace('06ff00','ffffff',str_replace('ffba00','ffffff',str_replace('38200a','ffffff',str_replace('<br>','',$lc.data))))}<br>{$lc.from.fio} {if $lc.gruppa.sokr != ''}<i> {$lc.gruppa.sokr}-{$lc.gruppa.kurs}{$lc.gruppa.num_grupp} {$lc.gruppa.fo}</i>{/if}
|
|||
|
</h4>
|
|||
|
<span class="tools">
|
|||
|
<a class="icon-chevron-up" href="javascript:;"></a>
|
|||
|
</span>
|
|||
|
</div>
|
|||
|
<div class="widget-body" style="position: relative;display:none;">
|
|||
|
{if $lc.tm=="in"}{if $lc.to_status==1}
|
|||
|
<span class="btn btn-sm btn-default text_small{if $lc.tm=='in'}{if $lc.to_status==1} pm_set_status{/if}{/if}" id="s_{$lc.id}">ПРОЧИТАТЬ...{*$lc.message|truncate:20:"..."*}</span><span class="text_full" id="f_{$lc.id}" style="display:none;">{if isset($lc.message1)}{$lc.message1}{else}{$lc.message}{/if} {$lc.file}</span>
|
|||
|
{else}
|
|||
|
{if isset($lc.message1)}{$lc.message1}{else}{$lc.message}{/if} {$lc.file}
|
|||
|
{/if}{else}{if isset($lc.message1)}{$lc.message1}{else}{$lc.message}{/if} {$lc.file}{/if}
|
|||
|
<br><br>
|
|||
|
<div style="float: right;position: absolute;right: 2px;bottom: 2px;width:40px;">
|
|||
|
<a class="btn btn-danger" href="{$page1.url}del/{$lc.id}/"><i class="icon-trash "></i></a>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{/foreach}
|
|||
|
|
|||
|
{/if}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{literal}
|
|||
|
<style>.text_small,.text_full,.text_small1,.text_full1{cursor:pointer;}</style>
|
|||
|
<script>$(document).ready(function(){
|
|||
|
$(".oftengrup_show").click(function(){
|
|||
|
var id = $(this).attr("id").split("_");
|
|||
|
if(id[1]==-1){
|
|||
|
$(".tr").show();
|
|||
|
}else{
|
|||
|
if(id[1]==0){
|
|||
|
$(".tr").hide();
|
|||
|
$(".ofgrtr_0").show();
|
|||
|
}else{
|
|||
|
$(".tr").show();
|
|||
|
$(".tr").not(".ofgrtr_"+id[1]).hide();
|
|||
|
}
|
|||
|
}
|
|||
|
return false;
|
|||
|
});
|
|||
|
$(".text_small").click(function(){
|
|||
|
var id = $(this).attr("id").split("_");
|
|||
|
$(this).hide();
|
|||
|
$("#f_"+id[1]).show();
|
|||
|
if($(this).hasClass("pm_set_status")){
|
|||
|
$(this).removeClass("pm_set_status");
|
|||
|
$.ajax({url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=pm_set_status&id='+id[1],
|
|||
|
success: function(data){}
|
|||
|
});
|
|||
|
}
|
|||
|
});
|
|||
|
$(".text_full").click(function(){
|
|||
|
var id = $(this).attr("id").split("_");
|
|||
|
$(this).hide();
|
|||
|
$("#s_"+id[1]).show();
|
|||
|
});
|
|||
|
$(".text_small1").click(function(){
|
|||
|
var id = $(this).attr("id").split("_");
|
|||
|
$(this).hide();
|
|||
|
$("#f1_"+id[1]).show();
|
|||
|
});
|
|||
|
$(".text_full1").click(function(){
|
|||
|
var id = $(this).attr("id").split("_");
|
|||
|
$(this).hide();
|
|||
|
$("#s1_"+id[1]).show();
|
|||
|
});
|
|||
|
|
|||
|
});
|
|||
|
</script>
|
|||
|
{/literal}
|
|||
|
{/if}
|
|||
|
{if $regim=='write'}
|
|||
|
<div class="span12">
|
|||
|
<div class="widget red">
|
|||
|
<div class="widget-title">
|
|||
|
<h4><i class="icon-reorder"></i> {$form.title} </h4>
|
|||
|
<span class="tools">
|
|||
|
<a href="javascript:;" class="icon-chevron-down"></a>
|
|||
|
</span>
|
|||
|
</div>
|
|||
|
<div class="widget-body">
|
|||
|
{if count($form.err)}{foreach from=$form.err item=er}
|
|||
|
<div class="alert alert-error">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Ошибка!</strong> {$er}
|
|||
|
</div>
|
|||
|
{/foreach}{/if}
|
|||
|
<form action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Сообщение</label>
|
|||
|
<div class="controls">
|
|||
|
<textarea class="span12 wysihtmleditor5" name="message" rows="15" data-trigger="hover" data-original-title="напишите сообщение" ></textarea>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Прикрепить файл</label>
|
|||
|
<div class="controls">{*jpg,pdf,docx,doc,xls,xlsx,ppt,pptx,*}
|
|||
|
<input type="hidden" name="max_file_size" value="20971520">
|
|||
|
<input type="file" class="span12 tooltips" data-trigger="hover" data-original-title="Загрузить файл (не более 20 Мб)" name="sfile" accept=".zip,.rar,.pdf,.doc,.docx,image/jpeg,image/png,image/gif" /> <span style="color:red;">Если файлов много, рекомендуется загружать их на отдельный сервис, а в письме указывать ссылки на файлы.</span>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Получатель</label>
|
|||
|
<div class="controls">
|
|||
|
<p>Часто используемые контакты, можете нажать на пользователя, для быстрого выбора!</p>
|
|||
|
{foreach from=$oftenusers item=ou key=id}
|
|||
|
<a href="#" class="btn btn-sm btn-info ou_sel" id="{$id}">{$ou}</a>
|
|||
|
{/foreach}
|
|||
|
<select data-placeholder="Укажите пользователя, кому Вы хотите написать" class="span12 to_user" tabindex="6" name="to_user">
|
|||
|
<option value=""></option>
|
|||
|
{foreach from=$form.p.users item=gr}
|
|||
|
<option{if $gr.sel==1} selected{/if} value="{$gr.id}">{$gr.fio}</option>
|
|||
|
{/foreach}
|
|||
|
</select>
|
|||
|
{*<select data-placeholder="Укажите пользователя, кому Вы хотите написать" class="chzn-select span12" tabindex="6" name="to_user">
|
|||
|
<option value=""></option>
|
|||
|
{foreach from=$form.p.users item=gr}
|
|||
|
<option{if $gr.sel==1} selected{/if} value="{$gr.id}">{$gr.fio}</option>
|
|||
|
{/foreach}
|
|||
|
</select>*}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="form-actions">
|
|||
|
<button type="submit" name="pm_write" class="btn btn-success">Отправить</button>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{literal}
|
|||
|
<style>.ou_sel{}</style>
|
|||
|
<script type="text/javascript">
|
|||
|
$(document).ready(function(){
|
|||
|
//выбор из часто используемых
|
|||
|
$(".ou_sel").click(function(){
|
|||
|
var id = $(this).attr("id");
|
|||
|
$('.to_user option[value='+id+']').attr('selected','selected');
|
|||
|
return false;
|
|||
|
});
|
|||
|
//кнопка исчезает при клике, чтобы бесконечно на нее не тыкали)
|
|||
|
$("button[name=pm_write]").click(function(){
|
|||
|
$(this).css('display', 'none');
|
|||
|
});
|
|||
|
});
|
|||
|
</script>
|
|||
|
{/literal}
|
|||
|
{/if}
|
|||
|
{if $regim=='writegrupp'}
|
|||
|
<div class="span12">
|
|||
|
<div class="widget red">
|
|||
|
<div class="widget-title">
|
|||
|
<h4><i class="icon-reorder"></i> {$form.title} </h4>
|
|||
|
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
|||
|
</div>
|
|||
|
<div class="widget-body">
|
|||
|
{if count($form.err)}{foreach from=$form.err item=er}
|
|||
|
<div class="alert alert-error">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Ошибка!</strong> {$er}
|
|||
|
</div>
|
|||
|
{/foreach}{/if}
|
|||
|
<form action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Сообщение</label>
|
|||
|
<div class="controls">
|
|||
|
<textarea class="span12 wysihtmleditor5" name="message" rows="15" data-trigger="hover" data-original-title="напишите сообщение" ></textarea>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Прикрепить файл</label>
|
|||
|
<div class="controls">
|
|||
|
<input type="hidden" name="max_file_size" value="20971520">
|
|||
|
<input type="file" class="span12 tooltips" data-trigger="hover" data-original-title="Загрузить файл (не более 20 Мб)" accept=".zip,.rar,.pdf,.doc,.docx,image/jpeg,image/png,image/gif" name="sfile" />
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Группы получатели</label>
|
|||
|
<div class="controls">
|
|||
|
<select data-placeholder="Укажите какие группы получат сообщение" class="chzn-select span12" multiple="multiple" tabindex="6" name="grupps[]">
|
|||
|
<option value=""></option>
|
|||
|
{foreach from=$grupps item=gr}
|
|||
|
<option{if $gr.sel==1} selected{/if} value="{$gr.id}">{$gr.sokr}-{$gr.kurs} {$gr.fo}</option>
|
|||
|
{/foreach}
|
|||
|
</select>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Укажите подгруппу</label>
|
|||
|
<div class="controls">
|
|||
|
<input type="text" class="span12" name="podgr" value="*" />
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<span style="color: red;">Если рассылка требуется всем группам, то просто оставьте "звездочку". Если, например, группе ЛД-32, то значение "2"<br />
|
|||
|
<b>Внимание! Рассылка может не дойти до студентов по одной из следующих причин:</b><br />
|
|||
|
1. Неправильно указан номер группы в потоке (например, несуществующий)<br />
|
|||
|
2. Студенты в данной группе неправильно указали номер группы в потоке или не указали его вообще<br />
|
|||
|
3. Студент также может не увидеть Вашего письма, если указал группу после рассылки
|
|||
|
</span>
|
|||
|
|
|||
|
<div class="form-actions">
|
|||
|
<button type="submit" name="pm_write_grupps" class="btn btn-success">Отправить</button>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
{if $regim=='writeprepods'}
|
|||
|
<div class="span12">
|
|||
|
<div class="widget red">
|
|||
|
<div class="widget-title">
|
|||
|
<h4><i class="icon-reorder"></i> {$form.title} </h4>
|
|||
|
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
|||
|
</div>
|
|||
|
<div class="widget-body">
|
|||
|
{if count($form.err)}{foreach from=$form.err item=er}
|
|||
|
<div class="alert alert-error">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Ошибка!</strong> {$er}
|
|||
|
</div>
|
|||
|
{/foreach}{/if}
|
|||
|
<form action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Сообщение</label>
|
|||
|
<div class="controls">
|
|||
|
<textarea class="span12 wysihtmleditor5" name="message" rows="15" data-trigger="hover" data-original-title="напишите сообщение" ></textarea>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Прикрепить файл</label>
|
|||
|
<div class="controls">
|
|||
|
<input type="hidden" name="max_file_size" value="20971520">
|
|||
|
<input type="file" class="span12 tooltips" data-trigger="hover" data-original-title="Загрузить файл (не более 20 Мб)" accept=".zip,.rar,.pdf,.doc,.docx,image/jpeg,image/png,image/gif" name="sfile" />
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<span style="color: red;">Просто так не использовать!</span>
|
|||
|
<div class="form-actions">
|
|||
|
<button type="submit" name="pm_write_prepods" class="btn btn-success">Отправить</button>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
|
|||
|
{if $regim=='answer'}
|
|||
|
<div class="span12">
|
|||
|
<div class="widget red">
|
|||
|
<div class="widget-title">
|
|||
|
<h4><i class="icon-reorder"></i> {$form.title} </h4>
|
|||
|
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
|||
|
</div>
|
|||
|
<div class="widget-body">
|
|||
|
<form action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Отправитель</label>
|
|||
|
<div class="controls">{$form.p.user.fio}</div>
|
|||
|
</div>
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Сообщение</label>
|
|||
|
<div class="controls">{$form.p.message}</div>
|
|||
|
</div>
|
|||
|
{if $form.p.file!=""}
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Файл</label>
|
|||
|
<div class="controls"><a href="/{$form.p.file}">Скачать</a></div>
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
<div class="control-group">
|
|||
|
<label class="control-label">Сообщение</label>
|
|||
|
<div class="controls">
|
|||
|
<textarea class="span12 wysihtmleditor5" name="message" rows="15" data-trigger="hover" data-original-title="напишите сообщение" ></textarea>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="form-actions">
|
|||
|
<input type="HIDDEN" name="to_user" value="{$form.p.to_user}">
|
|||
|
<button type="submit" name="pm_write" class="btn btn-success">Ответить</button>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|