144 lines
6.2 KiB
PHP
144 lines
6.2 KiB
PHP
|
<?php /* Smarty version Smarty-3.1.13, created on 2023-05-26 15:31:27
|
||
|
compiled from "tpl/tpl_learn_fk.html" */ ?>
|
||
|
<?php /*%%SmartyHeaderCode:429519056625470d39bb189-64310516%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
|
'file_dependency' =>
|
||
|
array (
|
||
|
'9a2e0f3178672520550c30b9dbfd811b28ae1de2' =>
|
||
|
array (
|
||
|
0 => 'tpl/tpl_learn_fk.html',
|
||
|
1 => 1685103447,
|
||
|
2 => 'file',
|
||
|
),
|
||
|
),
|
||
|
'nocache_hash' => '429519056625470d39bb189-64310516',
|
||
|
'function' =>
|
||
|
array (
|
||
|
),
|
||
|
'version' => 'Smarty-3.1.13',
|
||
|
'unifunc' => 'content_625470d39ebf97_96450801',
|
||
|
'variables' =>
|
||
|
array (
|
||
|
'order_is' => 0,
|
||
|
'elective' => 0,
|
||
|
'kod_podgotovki' => 0,
|
||
|
'page' => 0,
|
||
|
'fk' => 0,
|
||
|
'f' => 0,
|
||
|
'section' => 0,
|
||
|
'zapis' => 0,
|
||
|
'zz' => 0,
|
||
|
'zap' => 0,
|
||
|
),
|
||
|
'has_nocache_code' => false,
|
||
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
|
<?php if ($_valid && !is_callable('content_625470d39ebf97_96450801')) {function content_625470d39ebf97_96450801($_smarty_tpl) {?><!-- BEGIN PAGE HEADER-->
|
||
|
<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="/learn/fk/">Физическая культура</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row-fluid">
|
||
|
<div class="span12">
|
||
|
<div class="row-fluid">
|
||
|
<?php if (($_smarty_tpl->tpl_vars['order_is']->value!=0)){?>
|
||
|
<div class="alert alert-info" role="alert">
|
||
|
<b>Вы уже записаны:</b> <?php echo $_smarty_tpl->tpl_vars['elective']->value['name'];?>
|
||
|
(преподаватель: <?php echo $_smarty_tpl->tpl_vars['elective']->value['fio'];?>
|
||
|
)<br />
|
||
|
<?php echo $_smarty_tpl->tpl_vars['elective']->value['raspis'];?>
|
||
|
|
||
|
</div>
|
||
|
<?php }?>
|
||
|
|
||
|
<?php if (($_smarty_tpl->tpl_vars['kod_podgotovki']->value!='')){?>
|
||
|
<?php if (($_smarty_tpl->tpl_vars['page']->value=='')){?>
|
||
|
<div class="blog-side-bar blue-box">
|
||
|
<h2><i class=" icon-tasks"></i> Выберите элективную дисциплину по ФК и спорту</h2>
|
||
|
<ul>
|
||
|
<?php $_smarty_tpl->tpl_vars['f'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['f']->_loop = false;
|
||
|
$_from = $_smarty_tpl->tpl_vars['fk']->value; 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;
|
||
|
?>
|
||
|
<li>
|
||
|
<a href="/learn/fk/<?php echo $_smarty_tpl->tpl_vars['f']->value['id'];?>
|
||
|
/" alt="<?php echo $_smarty_tpl->tpl_vars['f']->value['name'];?>
|
||
|
" title="<?php echo $_smarty_tpl->tpl_vars['f']->value['name'];?>
|
||
|
">
|
||
|
<i class="icon-trophy"></i>
|
||
|
<span><?php echo $_smarty_tpl->tpl_vars['f']->value['sokr'];?>
|
||
|
</span>
|
||
|
</a>
|
||
|
</li>
|
||
|
<?php } ?>
|
||
|
|
||
|
</ul>
|
||
|
</div>
|
||
|
<?php }else{ ?>
|
||
|
<h3 align="center"><?php echo $_smarty_tpl->tpl_vars['section']->value;?>
|
||
|
</h3>
|
||
|
<?php $_smarty_tpl->tpl_vars['zap'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['zap']->_loop = false;
|
||
|
$_smarty_tpl->tpl_vars['zz'] = new Smarty_Variable;
|
||
|
$_from = $_smarty_tpl->tpl_vars['zapis']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
|
foreach ($_from as $_smarty_tpl->tpl_vars['zap']->key => $_smarty_tpl->tpl_vars['zap']->value){
|
||
|
$_smarty_tpl->tpl_vars['zap']->_loop = true;
|
||
|
$_smarty_tpl->tpl_vars['zz']->value = $_smarty_tpl->tpl_vars['zap']->key;
|
||
|
?>
|
||
|
<?php if (($_smarty_tpl->tpl_vars['zz']->value%3==0)){?><div class="row-fluid"><?php }?>
|
||
|
<!-- Карточка, в которой в качестве элемента шапки используется h4 -->
|
||
|
<div class="span4" style="padding: 10px; border: 2px solid black; border-radius: 10px!important; background: #eee;">
|
||
|
<h4 style="text-align: center; "><?php echo $_smarty_tpl->tpl_vars['zap']->value['fio'];?>
|
||
|
</h4>
|
||
|
<p>
|
||
|
<?php echo $_smarty_tpl->tpl_vars['zap']->value['raspis'];?>
|
||
|
|
||
|
</p>
|
||
|
<p align="center"><i class="icon-user"></i> Осталось мест: <?php echo $_smarty_tpl->tpl_vars['zap']->value['count'];?>
|
||
|
</p>
|
||
|
<?php if (($_smarty_tpl->tpl_vars['zap']->value['disability']==1)){?><p style="color: red; text-align: center; font-weight: bold;">Для студентов, имеющих ограничение по состоянию здоровья. Вы должны отправить сообщение преподавателю, прикрепив медицинскую справку перед тем, как записаться</p><?php }?>
|
||
|
<?php if (($_smarty_tpl->tpl_vars['zap']->value['count']>0)){?>
|
||
|
<?php if (($_smarty_tpl->tpl_vars['order_is']->value==0)){?><p align="center"><button class="btn btn-success order-fk" data-id="<?php echo $_smarty_tpl->tpl_vars['zap']->value['id'];?>
|
||
|
">Записаться</button></p><?php }else{ ?><p align="center"><span style="color: red;">Вы уже выбрали дисциплину.</span></p><?php }?>
|
||
|
<?php }else{ ?>
|
||
|
<p align="center"><span style="color: red;">Мест нет!</span></p>
|
||
|
<?php }?>
|
||
|
</div>
|
||
|
<!-- Конец карточки -->
|
||
|
|
||
|
<?php if (($_smarty_tpl->tpl_vars['zz']->value%3==2)){?></div><br /><?php }?>
|
||
|
<?php } ?>
|
||
|
<?php if (($_smarty_tpl->tpl_vars['zz']->value%3!=2)){?></div><?php }?>
|
||
|
|
||
|
<?php }?>
|
||
|
<?php }else{ ?>
|
||
|
<div class="alert alert-primary"><b>Пожалуйста, укажите код направления подготовки, иначе запись невозможна.</b></div>
|
||
|
<?php }?>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function(){
|
||
|
|
||
|
//запись к определенному преподу на элективную дисциплину по физической культуре
|
||
|
$('.order-fk').click(function(){
|
||
|
var id = $(this).data("id");
|
||
|
|
||
|
$.ajax({
|
||
|
url: '/json.php', dataType:'json', type:'POST', async:false, data: 'ajdes=fk_order&id='+id,
|
||
|
success: function(data){
|
||
|
location.reload(true);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
<?php }} ?>
|