EIOS/inc/smarty/templates_c/8f3d70fa37ff3648a9305723596...

548 lines
31 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php /* Smarty version Smarty-3.1.13, created on 2023-02-08 09:39:50
compiled from "tpl/tpl_teacher_lection.html" */ ?>
<?php /*%%SmartyHeaderCode:170260433625469a37c4778-43579309%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'8f3d70fa37ff3648a930572359607b76e8f94b29' =>
array (
0 => 'tpl/tpl_teacher_lection.html',
1 => 1675838377,
2 => 'file',
),
),
'nocache_hash' => '170260433625469a37c4778-43579309',
'function' =>
array (
),
'version' => 'Smarty-3.1.13',
'unifunc' => 'content_625469a38b3192_03533689',
'variables' =>
array (
'regim' => 0,
'form' => 0,
'er' => 0,
'lections' => 0,
'lc' => 0,
'lcg' => 0,
'file' => 0,
'k' => 0,
'f' => 0,
'pagination' => 0,
'p' => 0,
'leckaf' => 0,
'disc' => 0,
'dd' => 0,
'isDisc' => 0,
'gr' => 0,
),
'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_625469a38b3192_03533689')) {function content_625469a38b3192_03533689($_smarty_tpl) {?><!-- BEGIN PAGE HEADER-->
<div class="row-fluid">
<div class="span12">
<h3 class="page-title">Учебные материалы для студентов</h3>
<ul class="breadcrumb">
<li><a class="btn btn-warning" href="/teach/lection/add/"><i class="icon-plus icon-white"></i> Добавить</a></li>
<li><a class="btn btn-info" href="/teach/workprogram/">Рабочие программы</a></li>
<li><a class="btn btn-danger" href="/teach/cancel_binding/">Отменить привязку групп к учебным материалам</a></li>
<!--li><a class="btn btn-info" href="/teach/lection/ch_import/"><i class="icon-random icon-white"></i> Импорт из Расчета часов</a></li-->
</ul>
</div>
</div>
<div class="alert alert-danger" role="alert">
<h4 align="center">Уважаемые преподаватели! <br />Необходимо чтобы Вы полностью проверили все имеющиеся учебные материалы, при необходимости привязали отсутствующие группы и удалили не актуальную на текущий учебный год информацию</h4>
</div>
<div class="row-fluid">
<div class="span12">
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='show'){?>
<div class="row-fluid">
<div class="span12">
<div class="row-fluid">
<div class="widget green">
<div class="widget-title">
<h4><i class="icon-reorder"></i> Учебный материал, который Вы добавили в системе</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 }?>
<?php if (isset($_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 (count($_smarty_tpl->tpl_vars['lections']->value)){?>
<span class="btn btn-info sort-type" data-type="0">Все</span>
<span class="btn btn-info sort-type" data-type="лек">Лекции</span>
<span class="btn btn-info sort-type" data-type="лаб">Практические</span>
<span class="btn btn-info sort-type" data-type="контр">Контрольные</span>
<span class="btn btn-info sort-type" data-type="курс">Курсовые</span>
<span class="btn btn-info sort-type" data-type="сам">Самостоятельные</span>
<table class="table table-striped table-bordered table-advance table-hover">
<thead>
<tr>
<th>Даты</th>
<th>Специальность (курс/семестр)</th>
<!--th>Спец.</th-->
<th>Дисциплина</th>
<th>Описание</th>
<th>Группы</th>
<th>Файл</th>
<th><i class=" icon-edit"></i> </th>
<th></th>
</tr>
</thead>
<tbody>
<?php $_smarty_tpl->tpl_vars['lc'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lc']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['lections']->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;
?>
<tr data-type="<?php echo $_smarty_tpl->tpl_vars['lc']->value['type'];?>
">
<td nowrap><?php if ($_smarty_tpl->tpl_vars['lc']->value['data_c']!=$_smarty_tpl->tpl_vars['lc']->value['data_u']){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['data_c'];?>
<br><?php echo $_smarty_tpl->tpl_vars['lc']->value['data_u'];?>
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['lc']->value['data_c'];?>
<?php }?></td>
<!--td></td-->
<td><?php echo $_smarty_tpl->tpl_vars['lc']->value['specialnost'];?>
<br /> <sup><?php echo $_smarty_tpl->tpl_vars['lc']->value['kurs'];?>
курс / <?php echo $_smarty_tpl->tpl_vars['lc']->value['semestr'];?>
сем.</sup></td>
<td>
<?php if (($_smarty_tpl->tpl_vars['lc']->value['type']=="лек")){?><span class="label label-default label-mini">Лекция</span><?php }?>
<?php if (($_smarty_tpl->tpl_vars['lc']->value['type']=="лаб")){?><span class="label label-warning label-mini">Практическая</span><?php }?>
<?php if (($_smarty_tpl->tpl_vars['lc']->value['type']=="контр")){?><span class="label label-important label-mini">Контрольная</span><?php }?>
<?php if (($_smarty_tpl->tpl_vars['lc']->value['type']=="курс")){?><span class="label label-success">Курсовая</span><?php }?>
<?php if (($_smarty_tpl->tpl_vars['lc']->value['type']=="раб")){?><span class="label label-info label-mini">Раб.программа</span><?php }?>
<?php if (($_smarty_tpl->tpl_vars['lc']->value['type']=="сам")){?><span class="label label-info label-mini">Самостоятельная</span><?php }?>
<?php if (($_smarty_tpl->tpl_vars['lc']->value['type']=="практика")){?><span class="label label-inverse label-mini">Практика</span><?php }?>
<?php echo $_smarty_tpl->tpl_vars['lc']->value['name'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['lc']->value['descrip'];?>
</td>
<td><?php if (count($_smarty_tpl->tpl_vars['lc']->value['grups'])){?>
<?php $_smarty_tpl->tpl_vars['lcg'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lcg']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['lc']->value['grups']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['lcg']->key => $_smarty_tpl->tpl_vars['lcg']->value){
$_smarty_tpl->tpl_vars['lcg']->_loop = true;
?>
<?php echo $_smarty_tpl->tpl_vars['lcg']->value['sokr'];?>
-<?php echo $_smarty_tpl->tpl_vars['lcg']->value['kurs'];?>
<?php echo $_smarty_tpl->tpl_vars['lcg']->value['fo'];?>
;
<?php } ?>
<?php }?></td>
<td nowrap><?php if ($_smarty_tpl->tpl_vars['lc']->value['file']!=''){?><?php $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['file']->_loop = false;
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['lc']->value['mfile']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['file']->key => $_smarty_tpl->tpl_vars['file']->value){
$_smarty_tpl->tpl_vars['file']->_loop = true;
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['file']->key;
?><?php if ($_smarty_tpl->tpl_vars['file']->value!=''){?>
<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
. <!--i class="icon-file"></i> <a href="/upload/lections/<?php echo $_smarty_tpl->tpl_vars['file']->value;?>
">скачать файл</a><br-->
<?php if (strpos($_smarty_tpl->tpl_vars['file']->value,"https://eios.mkgtu.ru/")!==false){?><i class="icon-file"></i> <a href="<?php echo $_smarty_tpl->tpl_vars['file']->value;?>
">скачать файл</a><br><?php echo $_smarty_tpl->tpl_vars['f']->value;?>
</a>
<?php }else{ ?><i class="icon-file"></i> <a href="/upload/lections/<?php echo $_smarty_tpl->tpl_vars['file']->value;?>
">скачать файл</a><br><?php }?>
<?php }?><?php } ?><?php }else{ ?>
<span class="label label-important label-mini">нет файла</span>
<?php }?></td>
<td nowrap>
<a class="btn btn-primary" href="/teach/lection/edit/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
/"><i class="icon-pencil"></i></a>
<a class="btn btn-danger" href="/teach/lection/del/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
/" onclick="return confirm('Вы уверены, что хотите удалить?')"><i class="icon-trash "></i></a>
</td>
<td></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php if (isset($_smarty_tpl->tpl_vars['pagination']->value)){?>
<div class="pagination pagination-large">
<ul>
<?php if ($_smarty_tpl->tpl_vars['pagination']->value['kol']<=15){?>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['p']->step = 1;$_smarty_tpl->tpl_vars['p']->total = (int)ceil(($_smarty_tpl->tpl_vars['p']->step > 0 ? $_smarty_tpl->tpl_vars['pagination']->value['kol']+1 - (1) : 1-($_smarty_tpl->tpl_vars['pagination']->value['kol'])+1)/abs($_smarty_tpl->tpl_vars['p']->step));
if ($_smarty_tpl->tpl_vars['p']->total > 0){
for ($_smarty_tpl->tpl_vars['p']->value = 1, $_smarty_tpl->tpl_vars['p']->iteration = 1;$_smarty_tpl->tpl_vars['p']->iteration <= $_smarty_tpl->tpl_vars['p']->total;$_smarty_tpl->tpl_vars['p']->value += $_smarty_tpl->tpl_vars['p']->step, $_smarty_tpl->tpl_vars['p']->iteration++){
$_smarty_tpl->tpl_vars['p']->first = $_smarty_tpl->tpl_vars['p']->iteration == 1;$_smarty_tpl->tpl_vars['p']->last = $_smarty_tpl->tpl_vars['p']->iteration == $_smarty_tpl->tpl_vars['p']->total;?>
<li><a href="/teach/lection/p<?php echo $_smarty_tpl->tpl_vars['p']->value;?>
/"<?php if ($_smarty_tpl->tpl_vars['pagination']->value['page']==$_smarty_tpl->tpl_vars['p']->value){?> class=" label-warning"<?php }?>><?php echo $_smarty_tpl->tpl_vars['p']->value;?>
</a></li>
<?php }} ?>
<?php }else{ ?>
<?php if ($_smarty_tpl->tpl_vars['pagination']->value['page']>4){?>
<li><a href="/teach/lection/p1/">1</a></li>
<li><a href="#">...</a></li>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['p']->step = 1;$_smarty_tpl->tpl_vars['p']->total = (int)ceil(($_smarty_tpl->tpl_vars['p']->step > 0 ? ($_smarty_tpl->tpl_vars['pagination']->value['page']+3)+1 - (($_smarty_tpl->tpl_vars['pagination']->value['page']-3)) : ($_smarty_tpl->tpl_vars['pagination']->value['page']-3)-(($_smarty_tpl->tpl_vars['pagination']->value['page']+3))+1)/abs($_smarty_tpl->tpl_vars['p']->step));
if ($_smarty_tpl->tpl_vars['p']->total > 0){
for ($_smarty_tpl->tpl_vars['p']->value = ($_smarty_tpl->tpl_vars['pagination']->value['page']-3), $_smarty_tpl->tpl_vars['p']->iteration = 1;$_smarty_tpl->tpl_vars['p']->iteration <= $_smarty_tpl->tpl_vars['p']->total;$_smarty_tpl->tpl_vars['p']->value += $_smarty_tpl->tpl_vars['p']->step, $_smarty_tpl->tpl_vars['p']->iteration++){
$_smarty_tpl->tpl_vars['p']->first = $_smarty_tpl->tpl_vars['p']->iteration == 1;$_smarty_tpl->tpl_vars['p']->last = $_smarty_tpl->tpl_vars['p']->iteration == $_smarty_tpl->tpl_vars['p']->total;?>
<li><a href="/teach/lection/p<?php echo $_smarty_tpl->tpl_vars['p']->value;?>
/"<?php if ($_smarty_tpl->tpl_vars['pagination']->value['page']==$_smarty_tpl->tpl_vars['p']->value){?> class=" label-warning"<?php }?>><?php echo $_smarty_tpl->tpl_vars['p']->value;?>
</a></li>
<?php }} ?>
<li><a href="#">...</a></li>
<li><a href="/teach/lection/p<?php echo $_smarty_tpl->tpl_vars['pagination']->value['kol'];?>
/"><?php echo $_smarty_tpl->tpl_vars['pagination']->value['kol'];?>
</a></li>
<?php }else{ ?>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['p']->step = 1;$_smarty_tpl->tpl_vars['p']->total = (int)ceil(($_smarty_tpl->tpl_vars['p']->step > 0 ? 5+1 - (1) : 1-(5)+1)/abs($_smarty_tpl->tpl_vars['p']->step));
if ($_smarty_tpl->tpl_vars['p']->total > 0){
for ($_smarty_tpl->tpl_vars['p']->value = 1, $_smarty_tpl->tpl_vars['p']->iteration = 1;$_smarty_tpl->tpl_vars['p']->iteration <= $_smarty_tpl->tpl_vars['p']->total;$_smarty_tpl->tpl_vars['p']->value += $_smarty_tpl->tpl_vars['p']->step, $_smarty_tpl->tpl_vars['p']->iteration++){
$_smarty_tpl->tpl_vars['p']->first = $_smarty_tpl->tpl_vars['p']->iteration == 1;$_smarty_tpl->tpl_vars['p']->last = $_smarty_tpl->tpl_vars['p']->iteration == $_smarty_tpl->tpl_vars['p']->total;?>
<li><a href="/teach/lection/p<?php echo $_smarty_tpl->tpl_vars['p']->value;?>
/"<?php if ($_smarty_tpl->tpl_vars['pagination']->value['page']==$_smarty_tpl->tpl_vars['p']->value){?> class=" label-warning"<?php }?>><?php echo $_smarty_tpl->tpl_vars['p']->value;?>
</a></li>
<?php }} ?>
<li><a href="#">...</a></li>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['p']->step = 1;$_smarty_tpl->tpl_vars['p']->total = (int)ceil(($_smarty_tpl->tpl_vars['p']->step > 0 ? $_smarty_tpl->tpl_vars['pagination']->value['kol']+1 - (($_smarty_tpl->tpl_vars['pagination']->value['kol']-5)) : ($_smarty_tpl->tpl_vars['pagination']->value['kol']-5)-($_smarty_tpl->tpl_vars['pagination']->value['kol'])+1)/abs($_smarty_tpl->tpl_vars['p']->step));
if ($_smarty_tpl->tpl_vars['p']->total > 0){
for ($_smarty_tpl->tpl_vars['p']->value = ($_smarty_tpl->tpl_vars['pagination']->value['kol']-5), $_smarty_tpl->tpl_vars['p']->iteration = 1;$_smarty_tpl->tpl_vars['p']->iteration <= $_smarty_tpl->tpl_vars['p']->total;$_smarty_tpl->tpl_vars['p']->value += $_smarty_tpl->tpl_vars['p']->step, $_smarty_tpl->tpl_vars['p']->iteration++){
$_smarty_tpl->tpl_vars['p']->first = $_smarty_tpl->tpl_vars['p']->iteration == 1;$_smarty_tpl->tpl_vars['p']->last = $_smarty_tpl->tpl_vars['p']->iteration == $_smarty_tpl->tpl_vars['p']->total;?>
<li><a href="/teach/lection/p<?php echo $_smarty_tpl->tpl_vars['p']->value;?>
/"<?php if ($_smarty_tpl->tpl_vars['pagination']->value['page']==$_smarty_tpl->tpl_vars['p']->value){?> class=" label-warning"<?php }?>><?php echo $_smarty_tpl->tpl_vars['p']->value;?>
</a></li>
<?php }} ?>
<?php }?>
<?php }?>
</ul>
</div>
<?php }?>
<?php }?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
//сортировка по направлениям
$(".sort-type").click(function(){
var type = $(this).data("type");
$('tr').css("display","none");
if (type == 0) $('tr').css("display","table-row"); //все
if (type == "лек") $('tr[data-type=лек]').css("display","table-row");
if (type == "лаб") $('tr[data-type=лаб]').css("display","table-row");
if (type == "контр") $('tr[data-type=контр]').css("display","table-row");
if (type == "курс") $('tr[data-type=курс]').css("display","table-row");
if (type == "сам") $('tr[data-type=сам]').css("display","table-row");
});
});
</script>
<!--div class="row-fluid">
<div class="span12">
<p>Список всех лекций на вашей кафедре. Вы можете привязать к себе необходимую лекцию, при условии что вы ведете практику, контрольные или курсовые.</p>
<div class="row-fluid">
<div class="widget blue">
<div class="widget-title">
<h4><i class="icon-reorder"></i> Лекции на вашей кафедре</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['leckaf']->value)){?>
<table class="table table-striped table-bordered table-advance table-hover">
<thead>
<tr>
<th>Даты</th>
<th>Курс/Сем.</th>
<th>Спец.</th>
<th>Дисциплина</th>
<th>Описание</th>
<th>Группы</th>
<th>Файл</th>
<th><i class=" icon-edit"></i> </th>
<th></th>
</tr>
</thead>
<tbody>
<?php $_smarty_tpl->tpl_vars['lc'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lc']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['leckaf']->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;
?>
<tr>
<td nowrap><?php if ($_smarty_tpl->tpl_vars['lc']->value['data_c']!=$_smarty_tpl->tpl_vars['lc']->value['data_u']){?><?php echo $_smarty_tpl->tpl_vars['lc']->value['data_c'];?>
<br><?php echo $_smarty_tpl->tpl_vars['lc']->value['data_u'];?>
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['lc']->value['data_c'];?>
<?php }?></td>
<td><?php echo $_smarty_tpl->tpl_vars['lc']->value['kurs'];?>
/ <?php echo $_smarty_tpl->tpl_vars['lc']->value['semestr'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['lc']->value['specialnost'];?>
</td>
<td>
<?php echo $_smarty_tpl->tpl_vars['lc']->value['name'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['lc']->value['descrip'];?>
</td>
<td><?php if (count($_smarty_tpl->tpl_vars['lc']->value['grups'])){?>
<?php $_smarty_tpl->tpl_vars['lcg'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lcg']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['lc']->value['grups']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['lcg']->key => $_smarty_tpl->tpl_vars['lcg']->value){
$_smarty_tpl->tpl_vars['lcg']->_loop = true;
?>
<?php echo $_smarty_tpl->tpl_vars['lcg']->value['sokr'];?>
-<?php echo $_smarty_tpl->tpl_vars['lcg']->value['kurs'];?>
<?php echo $_smarty_tpl->tpl_vars['lcg']->value['fo'];?>
;
<?php } ?>
<?php }?></td>
<td nowarp><?php if ($_smarty_tpl->tpl_vars['lc']->value['file']!=''){?>
<i class="icon-file"></i> <a href="/upload/lections/<?php echo $_smarty_tpl->tpl_vars['lc']->value['file'];?>
">скачать файл</a>
<?php }else{ ?>
<span class="label label-important label-mini">нет файла</span>
<?php }?></td>
<td nowarp>
<a class="btn btn-primary" href="/teach/lection/link/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
/"><i class="icon-plus"></i></a>
</td>
<td></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }?>
</div>
</div>
</div>
</div>
</div-->
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='aded'){?>
<div class="row-fluid">
<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">
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="наименование специальности (не более 255 символов)" name="specialnost" value="<?php echo $_smarty_tpl->tpl_vars['form']->value['p']['specialnost'];?>
" />
</div>
</div>
<div class="control-group">
<label class="control-label">Курс</label>
<div class="controls">
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Курс 1-6 (только цифра)" name="kurs" value="<?php echo $_smarty_tpl->tpl_vars['form']->value['p']['kurs'];?>
" />
</div>
</div>
<div class="control-group">
<label class="control-label">Семестр</label>
<div class="controls">
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Семестр 1-12 (только цифра)" name="semestr" value="<?php echo $_smarty_tpl->tpl_vars['form']->value['p']['semestr'];?>
" />
</div>
</div>
<div class="control-group">
<label class="control-label">Название дисциплины</label>
<div class="controls">
<select class="span12 tooltips" data-trigger="hover" data-original-title="Название дисциплины" name="name" onchange="document.getElementById('dop').value= this.value">
<option value="нет">Не выбрано</option>
<?php $_smarty_tpl->tpl_vars["isDisc"] = new Smarty_variable(0, null, 0);?>
<?php $_smarty_tpl->tpl_vars['dd'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['dd']->_loop = false;
$_smarty_tpl->tpl_vars['kk'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['disc']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['dd']->key => $_smarty_tpl->tpl_vars['dd']->value){
$_smarty_tpl->tpl_vars['dd']->_loop = true;
$_smarty_tpl->tpl_vars['kk']->value = $_smarty_tpl->tpl_vars['dd']->key;
?>
<option value="<?php echo $_smarty_tpl->tpl_vars['dd']->value['name_disp'];?>
" <?php if ($_smarty_tpl->tpl_vars['form']->value['p']['name']==$_smarty_tpl->tpl_vars['dd']->value['name_disp']){?> selected <?php $_smarty_tpl->tpl_vars["isDisc"] = new Smarty_variable(1, null, 0);?><?php }?>><?php echo $_smarty_tpl->tpl_vars['dd']->value['name_disp'];?>
</option>
<?php } ?>
</select>
<!--input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Полное название дисциплины (не более 255 символов)" name="name" value="<?php echo $_smarty_tpl->tpl_vars['form']->value['p']['name'];?>
" /-->
</div>
</div>
<?php if (($_smarty_tpl->tpl_vars['isDisc']->value==0)){?><div class="control-group">
<label class="control-label">Если нет в списке </label>
<div class="controls">
<input type="text" id="dop" class="span12 tooltips" data-trigger="hover" data-original-title="Полное название дисциплины (не более 255 символов)" name="name" value="<?php echo $_smarty_tpl->tpl_vars['form']->value['p']['name'];?>
" />
</div>
</div><?php }?>
<div class="control-group">
<label class="control-label">Описание дисциплины</label>
<div class="controls">
<textarea class="span12 tooltips" rows="3" data-trigger="hover" data-original-title="Опишите в кратце о чем материал" name="descrip"><?php echo $_smarty_tpl->tpl_vars['form']->value['p']['descrip'];?>
</textarea>
</div>
</div>
<div class="control-group group_file">
<?php echo $_smarty_tpl->tpl_vars['form']->value['p']['ofile'];?>
<label class="control-label">Файл дисциплины <a href="#" class="btn btn-inverse lection_file_add"><i class="icon-plus"></i></a></label>
<div class="controls">
<input type="file" class="span12 tooltips" data-trigger="hover" data-original-title="Загрузить файл дисциплины (не более 8 Мб)" name="file[]" />
<?php if (count($_smarty_tpl->tpl_vars['form']->value['p']['mfile'])){?>
скачать: <?php $_smarty_tpl->tpl_vars['f'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['f']->_loop = false;
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['form']->value['p']['mfile']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['f']->key => $_smarty_tpl->tpl_vars['f']->value){
$_smarty_tpl->tpl_vars['f']->_loop = true;
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['f']->key;
?><?php if ($_smarty_tpl->tpl_vars['f']->value!=''){?>
<span class="item_file_<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
">
<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
. <i class="icon-file"></i>
<?php if (strpos($_smarty_tpl->tpl_vars['f']->value,"https://eios.mkgtu.ru/")!==false){?><a href="<?php echo $_smarty_tpl->tpl_vars['f']->value;?>
" target="_blank" class="item_file_name_<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
"><?php echo $_smarty_tpl->tpl_vars['f']->value;?>
</a>
<?php }else{ ?><a href="/upload/lections/<?php echo $_smarty_tpl->tpl_vars['f']->value;?>
" target="_blank" class="item_file_name_<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
"><?php echo $_smarty_tpl->tpl_vars['f']->value;?>
</a><?php }?>
<a href="#" id="<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
" class="btn btn-inverse item_file_delete">
<i class="icon-remove"></i></a>;
<input type="HIDDEN" name="del_file[]" value="" class="item_file_del_<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
">
</span>
<?php }?><?php } ?>
<?php }?>
</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="l_g[]">
<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']['grupp']; 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">
<select class="span12 tooltips" data-trigger="hover" name="type">
<option value="лек" <?php if (($_smarty_tpl->tpl_vars['form']->value['p']['type']=="лек")){?>selected<?php }?>>Лекция</option>
<option value="лаб" <?php if (($_smarty_tpl->tpl_vars['form']->value['p']['type']=="лаб")){?>selected<?php }?>>Практическая/Лабораторная работа</option>
<option value="контр" <?php if (($_smarty_tpl->tpl_vars['form']->value['p']['type']=="контр")){?>selected<?php }?>>Контрольная работа</option>
<option value="сам" <?php if (($_smarty_tpl->tpl_vars['form']->value['p']['type']=="сам")){?>selected<?php }?>>Самостоятельная работа</option>
<option value="курс" <?php if (($_smarty_tpl->tpl_vars['form']->value['p']['type']=="курс")){?>selected<?php }?>>Курсовая работа/проект</option>
<option value="раб" <?php if (($_smarty_tpl->tpl_vars['form']->value['p']['type']=="раб")){?>selected<?php }?>>Рабочая программа</option>
<option value="практика" <?php if (($_smarty_tpl->tpl_vars['form']->value['p']['type']=="практика")){?>selected<?php }?>>Учебная/производственная практика</option>
</select>
</div>
</div>
<div class="form-actions">
<?php echo $_smarty_tpl->tpl_vars['form']->value['id'];?>
<button type="submit" name="<?php echo $_smarty_tpl->tpl_vars['form']->value['btn_url'];?>
" class="btn btn-success"><?php echo $_smarty_tpl->tpl_vars['form']->value['btn_name'];?>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<style>
.fdele a{ color:red; }
</style>
<script>$(document).ready(function(){
$(".lection_file_add").click(function(){//добавление в форму загрузки файла
$(".group_file").after('<div class="control-group"><label class="control-label">Файл дисциплины</label><div class="controls"><input type="file" class="span12" name="file[]" /></div></div>');
return false;
});
$(".item_file_delete").click(function(){//удаление загруженного файла
var id=$(this).attr("id");
if($(".item_file_"+id).hasClass("fdele")){
$(".item_file_del_"+id).val("");
$(".item_file_"+id).removeClass("fdele");
}else{
$(".item_file_del_"+id).val($(".item_file_name_"+id).text());
$(".item_file_"+id).addClass("fdele");
}
return false;
});
});</script>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='ch_import'){?>
<?php if (isset($_smarty_tpl->tpl_vars['form']->value['err'])){?><?php echo $_smarty_tpl->tpl_vars['form']->value['err'];?>
<?php }?>
<?php echo $_smarty_tpl->tpl_vars['form']->value['html'];?>
<?php }?>
</div>
</div>
<?php }} ?>