EIOS/inc/smarty/templates_c/2613563ece49a5137afb59d1e04...

302 lines
13 KiB
PHP
Raw 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-06-20 11:22:45
compiled from "tpl/tpl_teacher_fk_zavkaf.html" */ ?>
<?php /*%%SmartyHeaderCode:78417024564521061857176-78065341%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'2613563ece49a5137afb59d1e04f6f7a3294dee4' =>
array (
0 => 'tpl/tpl_teacher_fk_zavkaf.html',
1 => 1687249358,
2 => 'file',
),
),
'nocache_hash' => '78417024564521061857176-78065341',
'function' =>
array (
),
'version' => 'Smarty-3.1.13',
'unifunc' => 'content_645210618fac00_05695710',
'variables' =>
array (
'message' => 0,
'teacher' => 0,
'teach' => 0,
'days' => 0,
'day' => 0,
'tt' => 0,
'dd' => 0,
'time' => 0,
'zanyato' => 0,
'ident' => 0,
'sections_teacher' => 0,
'section' => 0,
'students_no_order' => 0,
'no_order' => 0,
'faculties' => 0,
'facult' => 0,
'sections' => 0,
),
'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_645210618fac00_05695710')) {function content_645210618fac00_05695710($_smarty_tpl) {?><div class="row-fluid">
<div class="span12">
<div class="row-fluid">
<?php if (($_smarty_tpl->tpl_vars['message']->value!='')){?>
<div class="alert alert-success" role="alert">
<?php echo $_smarty_tpl->tpl_vars['message']->value;?>
</div>
<?php }?>
<!--Блок с расписанием-->
<div class="row-fluid">
<div class="widget blue">
<div class="widget-title">
<h4>Расписание элективных дисциплин по физической культуре</h4>
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
</div>
<div class="widget-body">
<table class="table table-bordered">
<tr style="background: #E6E6FA;" class="fix">
<th>День</th>
<th>Пара</th>
<th>Время</th>
<?php $_smarty_tpl->tpl_vars['teach'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['teach']->_loop = false;
$_smarty_tpl->tpl_vars['kk'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['teacher']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['teach']->key => $_smarty_tpl->tpl_vars['teach']->value){
$_smarty_tpl->tpl_vars['teach']->_loop = true;
$_smarty_tpl->tpl_vars['kk']->value = $_smarty_tpl->tpl_vars['teach']->key;
?>
<th><br /><br /><br /><?php echo $_smarty_tpl->tpl_vars['teach']->value['fio'];?>
</th>
<?php } ?>
</tr>
<!--ДЕНЬ-->
<!--в начале перебираем дни-->
<?php $_smarty_tpl->tpl_vars['day'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['day']->_loop = false;
$_smarty_tpl->tpl_vars['dd'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['days']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['day']->key => $_smarty_tpl->tpl_vars['day']->value){
$_smarty_tpl->tpl_vars['day']->_loop = true;
$_smarty_tpl->tpl_vars['dd']->value = $_smarty_tpl->tpl_vars['day']->key;
?>
<!--затем перебираем пары-->
<?php $_smarty_tpl->tpl_vars['time'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['time']->_loop = false;
$_smarty_tpl->tpl_vars['tt'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['day']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['time']->key => $_smarty_tpl->tpl_vars['time']->value){
$_smarty_tpl->tpl_vars['time']->_loop = true;
$_smarty_tpl->tpl_vars['tt']->value = $_smarty_tpl->tpl_vars['time']->key;
?>
<tr>
<?php if (($_smarty_tpl->tpl_vars['tt']->value==1)){?><td rowspan="7" style="border-bottom: 2px solid black;"><?php echo $_smarty_tpl->tpl_vars['dd']->value;?>
</td><?php }?>
<td><?php echo $_smarty_tpl->tpl_vars['tt']->value;?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['time']->value;?>
</td>
<?php $_smarty_tpl->tpl_vars['teach'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['teach']->_loop = false;
$_smarty_tpl->tpl_vars['kk'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['teacher']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['teach']->key => $_smarty_tpl->tpl_vars['teach']->value){
$_smarty_tpl->tpl_vars['teach']->_loop = true;
$_smarty_tpl->tpl_vars['kk']->value = $_smarty_tpl->tpl_vars['teach']->key;
?>
<td><?php if ((!isset($_smarty_tpl->tpl_vars['zanyato']->value[$_smarty_tpl->tpl_vars['dd']->value][$_smarty_tpl->tpl_vars['tt']->value][$_smarty_tpl->tpl_vars['teach']->value['id_teach']]))){?><button class="btn btn-success add-raspis" data-toggle="modal" data-target="#exampleModal" href="#" data-id="<?php echo $_smarty_tpl->tpl_vars['dd']->value;?>
-<?php echo $_smarty_tpl->tpl_vars['tt']->value;?>
-<?php echo $_smarty_tpl->tpl_vars['teach']->value['id_teach'];?>
"><i class="icon-plus icon-white"></i></button><?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['zanyato']->value[$_smarty_tpl->tpl_vars['dd']->value][$_smarty_tpl->tpl_vars['tt']->value][$_smarty_tpl->tpl_vars['teach']->value['id_teach']];?>
<br /><button class="btn btn-danger del-raspis" href="#" data-id="<?php echo $_smarty_tpl->tpl_vars['ident']->value[$_smarty_tpl->tpl_vars['dd']->value][$_smarty_tpl->tpl_vars['tt']->value][$_smarty_tpl->tpl_vars['teach']->value['id_teach']];?>
"><i class="icon-trash icon-white"></i></button><?php }?></td>
<?php } ?>
</tr>
<?php } ?>
<?php } ?>
</table>
</div>
</div>
</div>
<!--Список записанных студентов-->
<div class="row-fluid">
<div class="widget blue">
<div class="widget-title">
<h4>Записанные студенты</h4>
<span class="tools"><a href="javascript:;" class="icon-chevron-up"></a></span>
</div>
<div class="widget-body" style="display: none;">
<?php $_smarty_tpl->tpl_vars['section'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['section']->_loop = false;
$_smarty_tpl->tpl_vars['kk'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['sections_teacher']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['section']->key => $_smarty_tpl->tpl_vars['section']->value){
$_smarty_tpl->tpl_vars['section']->_loop = true;
$_smarty_tpl->tpl_vars['kk']->value = $_smarty_tpl->tpl_vars['section']->key;
?>
<div class="row-fluid">
<div class="widget orange">
<div class="widget-title">
<h4><?php echo $_smarty_tpl->tpl_vars['section']->value['name'];?>
(<?php echo $_smarty_tpl->tpl_vars['section']->value['course'];?>
курс)</h4>
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
</div>
<div class="widget-body">
<p><b>Преподаватель: </b> <?php echo $_smarty_tpl->tpl_vars['section']->value['teacher'];?>
</p>
<?php echo $_smarty_tpl->tpl_vars['section']->value['content'];?>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<!--Список незаписавшихся студентов-->
<div class="row-fluid">
<div class="widget blue">
<div class="widget-title">
<h4>Незаписавшиеся студенты</h4>
<span class="tools"><a href="javascript:;" class="icon-chevron-up"></a></span>
</div>
<div class="widget-body" style="display: none;">
<div class="alert alert-danger" role="alert">
<b>Отображается только список студентов, которые не записались и указали свою принадлежность к 1-3 курсу группы "ЛД"</b>
</div>
<ol>
<?php $_smarty_tpl->tpl_vars['no_order'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['no_order']->_loop = false;
$_smarty_tpl->tpl_vars['kk'] = new Smarty_Variable;
$_from = $_smarty_tpl->tpl_vars['students_no_order']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['no_order']->key => $_smarty_tpl->tpl_vars['no_order']->value){
$_smarty_tpl->tpl_vars['no_order']->_loop = true;
$_smarty_tpl->tpl_vars['kk']->value = $_smarty_tpl->tpl_vars['no_order']->key;
?>
<li><?php echo $_smarty_tpl->tpl_vars['no_order']->value['fio'];?>
</li>
<?php } ?>
</ol>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Модальное окно -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalLabel">Редактирование расписания</h3>
</div>
<div class="modal-body">
<form name="raspis_fk" method="post">
<input type="hidden" name="code" />
<p id="teacher"></p>
<p id="day"></p>
<p id="couple"></p>
<p>Выберите факультеты, которые могут записаться на дисциплину: </p>
<select data-placeholder="Выберите" class="chzn-select" multiple="multiple" tabindex="6" name="facult[]">
<?php $_smarty_tpl->tpl_vars['facult'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['facult']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['faculties']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['facult']->key => $_smarty_tpl->tpl_vars['facult']->value){
$_smarty_tpl->tpl_vars['facult']->_loop = true;
?>
<option value="<?php echo $_smarty_tpl->tpl_vars['facult']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['facult']->value['name'];?>
</option>
<?php } ?>
</select>
<p>Выберите элективную дисциплину: </p>
<select class="form-control" name="section">
<?php $_smarty_tpl->tpl_vars['section'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['section']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['sections']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['section']->key => $_smarty_tpl->tpl_vars['section']->value){
$_smarty_tpl->tpl_vars['section']->_loop = true;
?>
<option value="<?php echo $_smarty_tpl->tpl_vars['section']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['section']->value['name'];?>
(<?php echo $_smarty_tpl->tpl_vars['section']->value['sokr'];?>
)</option>
<?php } ?>
</select>
<p>Курс студентов: </p>
<select class="from-control" name="course">
<option value="1">1 курс</option>
<option value="2">2 курс</option>
<option value="3">3 курс</option>
</select>
<p>Возможное количество студентов для записи: </p>
<input type="number" class="from-control" name="count" min="0" max="50" value="27"/>
<p><input type="checkbox" name="disability" /> Для студентов, имеющих инвалидность</p>
<hr />
<button type="button" class="btn btn-secondary" data-dismiss="modal">Закрыть</button>
<input type="submit" class="btn btn-success" value="Сохранить" name="save_fk" />
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
//добавление расписания
$('.add-raspis').click(function(){
var str = $(this).data("id");
//alert(str);
$("input[name=code]").val(str);
$.ajax({
url: '/json.php', dataType:'json', type:'POST', async:false, data: 'ajdes=fk_print&str='+str,
success: function(data){
$('#day').html('<b>День недели:</b> ' + data.day);
$('#couple').html('<b>Номер пары:</b> ' + data.couple);
$('#teacher').html('<b>Преподаватель:</b> ' + data.teacher);
}
});
});
//удаление ячейки из расписания
$('.del-raspis').click(function(){
var id = $(this).data("id");
//alert(id);
$.ajax({
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=fk_del&id='+id,
success: function (data){
location.reload(true);
}
});
});
});
</script>
<style>
.fix th{
position: sticky;
top: 0;
background: white;
}
</style><?php }} ?>