67 lines
2.3 KiB
PHP
67 lines
2.3 KiB
PHP
|
<?php /* Smarty version Smarty-3.1.13, created on 2022-10-25 09:43:19
|
||
|
compiled from "tpl/tpl_optionally_zavkaf.html" */ ?>
|
||
|
<?php /*%%SmartyHeaderCode:57406033363578587968153-23769721%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
|
'file_dependency' =>
|
||
|
array (
|
||
|
'7973f6e0fc3e1db2f60dc9607514071f1ac50101' =>
|
||
|
array (
|
||
|
0 => 'tpl/tpl_optionally_zavkaf.html',
|
||
|
1 => 1553676631,
|
||
|
2 => 'file',
|
||
|
),
|
||
|
),
|
||
|
'nocache_hash' => '57406033363578587968153-23769721',
|
||
|
'function' =>
|
||
|
array (
|
||
|
),
|
||
|
'variables' =>
|
||
|
array (
|
||
|
'students' => 0,
|
||
|
'it' => 0,
|
||
|
),
|
||
|
'has_nocache_code' => false,
|
||
|
'version' => 'Smarty-3.1.13',
|
||
|
'unifunc' => 'content_635785879a6d87_96378190',
|
||
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
|
<?php if ($_valid && !is_callable('content_635785879a6d87_96378190')) {function content_635785879a6d87_96378190($_smarty_tpl) {?><div class="container-fluid">
|
||
|
<hr />
|
||
|
<div class="row">
|
||
|
<div class="span6">
|
||
|
<p>Выберите студента, чтобы посмотреть выбранные им предметы: </p>
|
||
|
<ul>
|
||
|
<?php $_smarty_tpl->tpl_vars['it'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['it']->_loop = false;
|
||
|
$_from = $_smarty_tpl->tpl_vars['students']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
|
foreach ($_from as $_smarty_tpl->tpl_vars['it']->key => $_smarty_tpl->tpl_vars['it']->value){
|
||
|
$_smarty_tpl->tpl_vars['it']->_loop = true;
|
||
|
?>
|
||
|
<li><a href="#" class="student-zayvka" data-id="<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
|
"><?php echo $_smarty_tpl->tpl_vars['it']->value['fio'];?>
|
||
|
</a></li>
|
||
|
<?php } ?>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="span6">
|
||
|
<p><b>Здесь будет отображаться список выбранных предметов:</b></p>
|
||
|
<div class="view-student-block"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function(){
|
||
|
|
||
|
$(".student-zayvka").click(function(){
|
||
|
var id = $(this).data("id");
|
||
|
|
||
|
$.ajax({
|
||
|
url: '/json.php',dataType:'json',type:'POST',async:false,data:'ajdes=student_zayvka_view&id='+id,
|
||
|
success: function(data){
|
||
|
$(".view-student-block").html(data.html);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|
||
|
|
||
|
});
|
||
|
</script><?php }} ?>
|