750 lines
38 KiB
PHP
750 lines
38 KiB
PHP
<?php /* Smarty version Smarty-3.1.13, created on 2023-04-13 13:08:47
|
||
compiled from "tpl/tpl_pm.html" */ ?>
|
||
<?php /*%%SmartyHeaderCode:17721940816254651a173e95-04125114%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
'file_dependency' =>
|
||
array (
|
||
'3e091512219199264a2b81104be97032a2d01c1d' =>
|
||
array (
|
||
0 => 'tpl/tpl_pm.html',
|
||
1 => 1681380524,
|
||
2 => 'file',
|
||
),
|
||
),
|
||
'nocache_hash' => '17721940816254651a173e95-04125114',
|
||
'function' =>
|
||
array (
|
||
),
|
||
'version' => 'Smarty-3.1.13',
|
||
'unifunc' => 'content_6254651a206ac9_84671830',
|
||
'variables' =>
|
||
array (
|
||
'page1' => 0,
|
||
'rassylka' => 0,
|
||
'user' => 0,
|
||
'regim' => 0,
|
||
'form' => 0,
|
||
'itshow' => 0,
|
||
'oftengrupps' => 0,
|
||
'og' => 0,
|
||
'lc' => 0,
|
||
'itshow1' => 0,
|
||
'er' => 0,
|
||
'oftenusers' => 0,
|
||
'id' => 0,
|
||
'ou' => 0,
|
||
'gr' => 0,
|
||
'grupps' => 0,
|
||
'search_fio' => 0,
|
||
'message' => 0,
|
||
'mes' => 0,
|
||
'id_user' => 0,
|
||
),
|
||
'has_nocache_code' => false,
|
||
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
<?php if ($_valid && !is_callable('content_6254651a206ac9_84671830')) {function content_6254651a206ac9_84671830($_smarty_tpl) {?>
|
||
<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="<?php echo $_smarty_tpl->tpl_vars['page1']->value['url'];?>
|
||
">Личные сообщения</a></li>
|
||
<li><a class="btn btn-warning" href="<?php echo $_smarty_tpl->tpl_vars['page1']->value['url'];?>
|
||
start/"><i class="icon-plus icon-white"></i> Написать</a></li>
|
||
<?php if ($_smarty_tpl->tpl_vars['rassylka']->value==1){?><li><a class="btn btn-info" href="<?php echo $_smarty_tpl->tpl_vars['page1']->value['url'];?>
|
||
writegrupp/"><i class="icon-plus icon-white"></i> Написать группе</a></li><?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['user']->value['status']==99){?>
|
||
<li><a class="btn btn-danger" href="<?php echo $_smarty_tpl->tpl_vars['page1']->value['url'];?>
|
||
writeprepods/"><i class="icon-plus icon-white"></i> Написать преподавателям</a></li>
|
||
<li><a class="btn btn-success" href="<?php echo $_smarty_tpl->tpl_vars['page1']->value['url'];?>
|
||
listletter/"><i class="icon-plus icon-white"></i> Пофамильная рассылка</a></li>
|
||
|
||
<?php }?>
|
||
<li><a class="btn btn-primary tooltips read-all" data-trigger="hover" data-placement="bottom" href="#" data-original-title="Все сообщения станут прочитанными. Необратимая операция! Целесообразно использовать, если у Вас скопилось много непрочитанных сообщений."><i class="icon-ok icon-white"></i> Прочитать всё</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='show'){?>
|
||
|
||
<?php if (isset($_smarty_tpl->tpl_vars['user']->value['student'])){?>
|
||
<?php }?>
|
||
<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">
|
||
<?php if ($_smarty_tpl->tpl_vars['form']->value['msg']!=''){?>
|
||
<div class="alert alert-success">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Успешно!</strong> <?php echo $_smarty_tpl->tpl_vars['form']->value['msg'];?>
|
||
|
||
</div>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['form']->value['err']!=''){?>
|
||
<div class="alert alert-error">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Ошибка!</strong> <?php echo $_smarty_tpl->tpl_vars['form']->value['err'];?>
|
||
|
||
</div>
|
||
<?php }?>
|
||
<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>
|
||
<?php if (count($_smarty_tpl->tpl_vars['itshow']->value)){?>
|
||
<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>
|
||
<?php $_smarty_tpl->tpl_vars['og'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['og']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['oftengrupps']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['og']->key => $_smarty_tpl->tpl_vars['og']->value){
|
||
$_smarty_tpl->tpl_vars['og']->_loop = true;
|
||
?>
|
||
<a href="#" class="oftengrup_show btn btn-sm btn-info" id="ofgr_<?php echo $_smarty_tpl->tpl_vars['og']->value['id'];?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['og']->value['sokr'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['og']->value['kurs'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['og']->value['num_grupp'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['og']->value['fo'];?>
|
||
</a>
|
||
<?php } ?>
|
||
|
||
|
||
<?php $_smarty_tpl->tpl_vars['lc'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lc']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['itshow']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['lc']->key => $_smarty_tpl->tpl_vars['lc']->value){
|
||
$_smarty_tpl->tpl_vars['lc']->_loop = true;
|
||
?>
|
||
<div class="row-fluid tr ofgrtr_<?php if (count($_smarty_tpl->tpl_vars['lc']->value['gruppa'])){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['id'];?>
|
||
<?php }else{ ?>0<?php }?>">
|
||
<div class="span12">
|
||
<div class="widget">
|
||
<div class="widget-title" style="<?php if ($_smarty_tpl->tpl_vars['lc']->value['tm']=='in'){?><?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==1){?>background: #68c365!important;<?php }else{ ?>background: #a1bfa0!important;<?php }?><?php }else{ ?>background: #a1bfa0!important;<?php }?>height: 46px!important;">
|
||
<h4 style="color: #000;">
|
||
<?php if ($_smarty_tpl->tpl_vars['lc']->value['tm']=="in"){?><?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==1){?><span data-trigger="hover" data-original-title="Новое(непрочитанное) сообщение" data-placement="bottom"><i class="icon-bolt" style="color: #dc3015;"></i></span><?php }?><?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['lc']->value['file']!=''){?><span style="" data-trigger="hover" data-original-title="В сообщении есть прикрепленный файл" data-placement="bottom"><i class="icon-download" style="color: #2a15dc;"></i></span><?php }?>
|
||
<?php echo str_replace('06ff00','ffffff',str_replace('ffba00','ffffff',str_replace('38200a','ffffff',str_replace('<br>','',$_smarty_tpl->tpl_vars['lc']->value['data']))));?>
|
||
<br><?php echo $_smarty_tpl->tpl_vars['lc']->value['from']['fio'];?>
|
||
<?php if ($_smarty_tpl->tpl_vars['lc']->value['gruppa']['sokr']!=''){?><i> <?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['sokr'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['kurs'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['num_grupp'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['fo'];?>
|
||
</i><?php }?>
|
||
</h4>
|
||
<span class="tools">
|
||
<a class="<?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==1){?>icon-chevron-down<?php }else{ ?>icon-chevron-up<?php }?>" href="javascript:;"></a>
|
||
</span>
|
||
</div>
|
||
<div class="widget-body" style="position: relative;<?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==1){?><?php }else{ ?>display:none;<?php }?>">
|
||
<?php if ($_smarty_tpl->tpl_vars['lc']->value['tm']=="in"){?><?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==1){?>
|
||
<span class="btn btn-sm btn-default text_small<?php if ($_smarty_tpl->tpl_vars['lc']->value['tm']=='in'){?><?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==1){?> pm_set_status<?php }?><?php }?>" id="s_<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
">ПРОЧИТАТЬ...</span><span class="text_full" id="f_<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
" style="display:none;"><?php if (isset($_smarty_tpl->tpl_vars['lc']->value['message1'])){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message1'];?>
|
||
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message'];?>
|
||
<?php }?> <?php echo $_smarty_tpl->tpl_vars['lc']->value['file'];?>
|
||
</span>
|
||
<?php }else{ ?>
|
||
<?php if (isset($_smarty_tpl->tpl_vars['lc']->value['message1'])){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message1'];?>
|
||
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message'];?>
|
||
<?php }?> <?php echo $_smarty_tpl->tpl_vars['lc']->value['file'];?>
|
||
|
||
<?php }?><?php }else{ ?><?php if (isset($_smarty_tpl->tpl_vars['lc']->value['message1'])){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message1'];?>
|
||
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message'];?>
|
||
<?php }?> <?php echo $_smarty_tpl->tpl_vars['lc']->value['file'];?>
|
||
<?php }?>
|
||
<br><br>
|
||
<div style="float: right;position: absolute;right: 2px;bottom: 2px;width:94px;">
|
||
<a class="btn btn-primary" href="<?php echo $_smarty_tpl->tpl_vars['page1']->value['url'];?>
|
||
answer/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
/" data-trigger="hover" data-original-title="ответить"><i class="icon-mail-reply"></i></a>
|
||
<a class="btn btn-danger" href="<?php echo $_smarty_tpl->tpl_vars['page1']->value['url'];?>
|
||
del/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
/"><i class="icon-trash "></i></a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
</div>
|
||
<?php }?>
|
||
</div>
|
||
|
||
<div class="tab-pane" id="widget_tab2">
|
||
<span class="btn btn-success"><i class="icon-check"></i></span> - сообщение прочитано пользователем<br /><br />
|
||
<?php if (count($_smarty_tpl->tpl_vars['itshow1']->value)){?>
|
||
|
||
<?php $_smarty_tpl->tpl_vars['lc'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lc']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['itshow1']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['lc']->key => $_smarty_tpl->tpl_vars['lc']->value){
|
||
$_smarty_tpl->tpl_vars['lc']->_loop = true;
|
||
?>
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="widget">
|
||
<div class="widget-title" style="<?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==2){?>background: #68c365!important;<?php }else{ ?>background: #a1bfa0!important;<?php }?>height: 46px!important;">
|
||
<h4 style="color: #000;">
|
||
<?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==2){?><span data-trigger="hover" data-original-title="сообщение прочитано пользователем" data-placement="bottom"><i class="icon-check" style="color: #dc3015;"></i></span><?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['lc']->value['file']!=''){?><span style="" data-trigger="hover" data-original-title="В сообщении есть прикрепленный файл" data-placement="bottom"><i class="icon-download" style="color: #2a15dc;"></i></span><?php }?>
|
||
<?php echo str_replace('06ff00','ffffff',str_replace('ffba00','ffffff',str_replace('38200a','ffffff',str_replace('<br>','',$_smarty_tpl->tpl_vars['lc']->value['data']))));?>
|
||
<br><?php echo $_smarty_tpl->tpl_vars['lc']->value['from']['fio'];?>
|
||
<?php if ($_smarty_tpl->tpl_vars['lc']->value['gruppa']['sokr']!=''){?><i> <?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['sokr'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['kurs'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['num_grupp'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['lc']->value['gruppa']['fo'];?>
|
||
</i><?php }?>
|
||
</h4>
|
||
<span class="tools">
|
||
<a class="icon-chevron-up" href="javascript:;"></a>
|
||
</span>
|
||
</div>
|
||
<div class="widget-body" style="position: relative;display:none;">
|
||
<?php if ($_smarty_tpl->tpl_vars['lc']->value['tm']=="in"){?><?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==1){?>
|
||
<span class="btn btn-sm btn-default text_small<?php if ($_smarty_tpl->tpl_vars['lc']->value['tm']=='in'){?><?php if ($_smarty_tpl->tpl_vars['lc']->value['to_status']==1){?> pm_set_status<?php }?><?php }?>" id="s_<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
">ПРОЧИТАТЬ...</span><span class="text_full" id="f_<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
" style="display:none;"><?php if (isset($_smarty_tpl->tpl_vars['lc']->value['message1'])){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message1'];?>
|
||
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message'];?>
|
||
<?php }?> <?php echo $_smarty_tpl->tpl_vars['lc']->value['file'];?>
|
||
</span>
|
||
<?php }else{ ?>
|
||
<?php if (isset($_smarty_tpl->tpl_vars['lc']->value['message1'])){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message1'];?>
|
||
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message'];?>
|
||
<?php }?> <?php echo $_smarty_tpl->tpl_vars['lc']->value['file'];?>
|
||
|
||
<?php }?><?php }else{ ?><?php if (isset($_smarty_tpl->tpl_vars['lc']->value['message1'])){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message1'];?>
|
||
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['lc']->value['message'];?>
|
||
<?php }?> <?php echo $_smarty_tpl->tpl_vars['lc']->value['file'];?>
|
||
<?php }?>
|
||
<br><br>
|
||
<div style="float: right;position: absolute;right: 2px;bottom: 2px;width:40px;">
|
||
<a class="btn btn-danger" href="<?php echo $_smarty_tpl->tpl_vars['page1']->value['url'];?>
|
||
del/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
/"><i class="icon-trash "></i></a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<?php }?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<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>
|
||
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='write'){?>
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> <?php echo $_smarty_tpl->tpl_vars['form']->value['title'];?>
|
||
</h4>
|
||
<span class="tools">
|
||
<a href="javascript:;" class="icon-chevron-down"></a>
|
||
</span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<?php if (count($_smarty_tpl->tpl_vars['form']->value['err'])){?><?php $_smarty_tpl->tpl_vars['er'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['er']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['form']->value['err']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['er']->key => $_smarty_tpl->tpl_vars['er']->value){
|
||
$_smarty_tpl->tpl_vars['er']->_loop = true;
|
||
?>
|
||
<div class="alert alert-error">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Ошибка!</strong> <?php echo $_smarty_tpl->tpl_vars['er']->value;?>
|
||
|
||
</div>
|
||
<?php } ?><?php }?>
|
||
<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 Мб)" 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>
|
||
<?php $_smarty_tpl->tpl_vars['ou'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['ou']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['id'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['oftenusers']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['ou']->key => $_smarty_tpl->tpl_vars['ou']->value){
|
||
$_smarty_tpl->tpl_vars['ou']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['id']->value = $_smarty_tpl->tpl_vars['ou']->key;
|
||
?>
|
||
<a href="#" class="btn btn-sm btn-info ou_sel" id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['ou']->value;?>
|
||
</a>
|
||
<?php } ?>
|
||
<select data-placeholder="Укажите пользователя, кому Вы хотите написать" class="span12 to_user" tabindex="6" name="to_user">
|
||
<option value=""></option>
|
||
<?php $_smarty_tpl->tpl_vars['gr'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['gr']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['form']->value['p']['users']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['gr']->key => $_smarty_tpl->tpl_vars['gr']->value){
|
||
$_smarty_tpl->tpl_vars['gr']->_loop = true;
|
||
?>
|
||
<option<?php if ($_smarty_tpl->tpl_vars['gr']->value['sel']==1){?> selected<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['gr']->value['id'];?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['gr']->value['fio'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-actions">
|
||
<button type="submit" name="pm_write" class="btn btn-success">Отправить</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<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>
|
||
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='writegrupp'){?>
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> <?php echo $_smarty_tpl->tpl_vars['form']->value['title'];?>
|
||
</h4>
|
||
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<?php if (count($_smarty_tpl->tpl_vars['form']->value['err'])){?><?php $_smarty_tpl->tpl_vars['er'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['er']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['form']->value['err']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['er']->key => $_smarty_tpl->tpl_vars['er']->value){
|
||
$_smarty_tpl->tpl_vars['er']->_loop = true;
|
||
?>
|
||
<div class="alert alert-error">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Ошибка!</strong> <?php echo $_smarty_tpl->tpl_vars['er']->value;?>
|
||
|
||
</div>
|
||
<?php } ?><?php }?>
|
||
<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>
|
||
<?php $_smarty_tpl->tpl_vars['gr'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['gr']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['grupps']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['gr']->key => $_smarty_tpl->tpl_vars['gr']->value){
|
||
$_smarty_tpl->tpl_vars['gr']->_loop = true;
|
||
?>
|
||
<option<?php if ($_smarty_tpl->tpl_vars['gr']->value['sel']==1){?> selected<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['gr']->value['id'];?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['gr']->value['sokr'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['gr']->value['kurs'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['gr']->value['fo'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</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>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='writeprepods'){?>
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> <?php echo $_smarty_tpl->tpl_vars['form']->value['title'];?>
|
||
</h4>
|
||
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<?php if (count($_smarty_tpl->tpl_vars['form']->value['err'])){?><?php $_smarty_tpl->tpl_vars['er'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['er']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['form']->value['err']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['er']->key => $_smarty_tpl->tpl_vars['er']->value){
|
||
$_smarty_tpl->tpl_vars['er']->_loop = true;
|
||
?>
|
||
<div class="alert alert-error">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Ошибка!</strong> <?php echo $_smarty_tpl->tpl_vars['er']->value;?>
|
||
|
||
</div>
|
||
<?php } ?><?php }?>
|
||
<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>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='listletter'){?>
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> <?php echo $_smarty_tpl->tpl_vars['form']->value['title'];?>
|
||
</h4>
|
||
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<?php if (count($_smarty_tpl->tpl_vars['form']->value['err'])){?><?php $_smarty_tpl->tpl_vars['er'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['er']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['form']->value['err']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['er']->key => $_smarty_tpl->tpl_vars['er']->value){
|
||
$_smarty_tpl->tpl_vars['er']->_loop = true;
|
||
?>
|
||
<div class="alert alert-error">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Ошибка!</strong> <?php echo $_smarty_tpl->tpl_vars['er']->value;?>
|
||
|
||
</div>
|
||
<?php } ?><?php }?>
|
||
<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">Список получателей (1 строка - 1 человек)</label>
|
||
<div class="controls">
|
||
<textarea class="span12" name="listfio" rows="15" data-trigger="hover" data-original-title="укажите фио" ></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<span style="color: red;">ДО 100 человек!</span>
|
||
<div class="form-actions">
|
||
<button type="submit" name="pm_write_listletter" class="btn btn-success">Отправить</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='start'){?>
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> <?php echo $_smarty_tpl->tpl_vars['form']->value['title'];?>
|
||
</h4>
|
||
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<form name="search_user" class="form-horizontal" action="" method="post">
|
||
<div class="control-group">
|
||
<label class="control-label">Поиск пользователя:</label>
|
||
<div class="controls">
|
||
<input type="text" name="fio" class="form-control" required minlength="6" />
|
||
<button type="submit" name="pm_search" class="btn btn-success">Искать</button>
|
||
</div>
|
||
</div>
|
||
<table class="table">
|
||
<?php $_smarty_tpl->tpl_vars['user'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['user']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['search_fio']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['user']->key => $_smarty_tpl->tpl_vars['user']->value){
|
||
$_smarty_tpl->tpl_vars['user']->_loop = true;
|
||
?><tr>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['user']->value['fio'];?>
|
||
<?php if (($_smarty_tpl->tpl_vars['user']->value['prepod']>0)){?>(<i>это профиль преподавателя</i>)<?php }else{ ?>(<i>Группа студента: <?php echo $_smarty_tpl->tpl_vars['user']->value['student']['sokr'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['user']->value['student']['kurs'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['user']->value['student']['num_grupp'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['user']->value['student']['fo'];?>
|
||
</i>)<?php }?></td>
|
||
<td><a href="/pm/writeuser/<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
|
||
/" class="btn btn-warning">Написать</a> <a href="/pm/history/<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
|
||
/" class="btn btn-info">Посмотреть всю переписку </a></td>
|
||
</tr><?php } ?>
|
||
</table>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='history'){?>
|
||
<style>
|
||
/* Chat containers */
|
||
.container {
|
||
border: 2px solid #dedede;
|
||
background-color: #f1f1f1;
|
||
border-radius: 5px;
|
||
padding: 10px;
|
||
margin: 10px 0;
|
||
}
|
||
|
||
/* Darker chat container */
|
||
.darker {
|
||
border-color: #ccc;
|
||
background-color: #ddd;
|
||
}
|
||
|
||
/* Clear floats */
|
||
.container::after {
|
||
content: "";
|
||
clear: both;
|
||
display: table;
|
||
}
|
||
|
||
/* Style images */
|
||
.container img {
|
||
float: left;
|
||
max-width: 60px;
|
||
width: 100%;
|
||
margin-right: 20px;
|
||
border-radius: 50%;
|
||
}
|
||
|
||
/* Style the right image */
|
||
.container img.right {
|
||
float: right;
|
||
margin-left: 20px;
|
||
margin-right:0;
|
||
}
|
||
|
||
/* Style time text */
|
||
.time-right {
|
||
float: right;
|
||
color: #aaa;
|
||
}
|
||
|
||
/* Style time text */
|
||
.time-left {
|
||
float: left;
|
||
color: #999;
|
||
}
|
||
</style>
|
||
<h3>История переписки с пользователем</h3>
|
||
<?php $_smarty_tpl->tpl_vars['mes'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['mes']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['message']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['mes']->key => $_smarty_tpl->tpl_vars['mes']->value){
|
||
$_smarty_tpl->tpl_vars['mes']->_loop = true;
|
||
?>
|
||
<?php if (($_smarty_tpl->tpl_vars['mes']->value['from_user']==$_smarty_tpl->tpl_vars['id_user']->value)){?>
|
||
<div class="container">
|
||
<img src="https://eios.mkgtu.ru/tpl/img/eiosava.png" alt="Avatar">
|
||
<p><?php echo $_smarty_tpl->tpl_vars['mes']->value['message'];?>
|
||
</p>
|
||
<span class="time-right"><?php echo $_smarty_tpl->tpl_vars['mes']->value['data_c'];?>
|
||
</span>
|
||
</div>
|
||
<?php }else{ ?>
|
||
<div class="container darker">
|
||
<img src="https://eios.mkgtu.ru/tpl/img/eiosava.png" alt="Avatar" class="right">
|
||
<p><?php echo $_smarty_tpl->tpl_vars['mes']->value['message'];?>
|
||
</p>
|
||
<span class="time-left"><?php echo $_smarty_tpl->tpl_vars['mes']->value['data_c'];?>
|
||
</span>
|
||
</div>
|
||
<?php }?>
|
||
<?php } ?>
|
||
|
||
<h4>В данном режиме можно только просматривать историю сообщений, чтобы написать пользователю, <a href="/pm/writeuser/<?php echo $_smarty_tpl->tpl_vars['id_user']->value;?>
|
||
/">нажмите сюда</a></h4>
|
||
|
||
<?php }?>
|
||
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='answer'){?>
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> <?php echo $_smarty_tpl->tpl_vars['form']->value['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"><?php echo $_smarty_tpl->tpl_vars['form']->value['p']['user']['fio'];?>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Сообщение</label>
|
||
<div class="controls"><?php echo $_smarty_tpl->tpl_vars['form']->value['p']['message'];?>
|
||
</div>
|
||
</div>
|
||
<?php if ($_smarty_tpl->tpl_vars['form']->value['p']['file']!=''){?>
|
||
<div class="control-group">
|
||
<label class="control-label">Файл</label>
|
||
<div class="controls"><a href="/<?php echo $_smarty_tpl->tpl_vars['form']->value['p']['file'];?>
|
||
">Скачать</a></div>
|
||
</div>
|
||
<?php }?>
|
||
<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="<?php echo $_smarty_tpl->tpl_vars['form']->value['p']['to_user'];?>
|
||
">
|
||
<button type="submit" name="pm_write" class="btn btn-success">Ответить</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
|
||
//прочитать все сообщения
|
||
$(".read-all").click(function(){
|
||
var id = $(this).data("id");
|
||
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=read_all',
|
||
success: function(data){
|
||
location.href='/pm/';
|
||
}
|
||
});
|
||
|
||
});
|
||
</script>
|
||
<?php }} ?>
|