81 lines
2.4 KiB
PHP
Executable File
81 lines
2.4 KiB
PHP
Executable File
<?php /* Smarty version 3.1.27, created on 2016-11-01 12:10:11
|
|
compiled from "template/templates/presence.tpl" */ ?>
|
|
<?php
|
|
/*%%SmartyHeaderCode:16005617145818781378ff46_21030545%%*/
|
|
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
|
'file_dependency' =>
|
|
array (
|
|
'61c8e0d372142135e64030ddc559e26a938e95b0' =>
|
|
array (
|
|
0 => 'template/templates/presence.tpl',
|
|
1 => 1477998607,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'nocache_hash' => '16005617145818781378ff46_21030545',
|
|
'variables' =>
|
|
array (
|
|
'tr_id' => 0,
|
|
'users' => 0,
|
|
'user' => 0,
|
|
),
|
|
'has_nocache_code' => false,
|
|
'version' => '3.1.27',
|
|
'unifunc' => 'content_581878137e5895_92635142',
|
|
),false);
|
|
/*/%%SmartyHeaderCode%%*/
|
|
if ($_valid && !is_callable('content_581878137e5895_92635142')) {
|
|
function content_581878137e5895_92635142 ($_smarty_tpl) {
|
|
|
|
$_smarty_tpl->properties['nocache_hash'] = '16005617145818781378ff46_21030545';
|
|
?>
|
|
<table>
|
|
<input type="hidden" id="tr_id" value="<?php echo $_smarty_tpl->tpl_vars['tr_id']->value;?>
|
|
">
|
|
|
|
<?php
|
|
$_from = $_smarty_tpl->tpl_vars['users']->value;
|
|
if (!is_array($_from) && !is_object($_from)) {
|
|
settype($_from, 'array');
|
|
}
|
|
$_smarty_tpl->tpl_vars['user'] = new Smarty_Variable;
|
|
$_smarty_tpl->tpl_vars['user']->_loop = false;
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['user']->value) {
|
|
$_smarty_tpl->tpl_vars['user']->_loop = true;
|
|
$foreach_user_Sav = $_smarty_tpl->tpl_vars['user'];
|
|
?>
|
|
<tr>
|
|
<td><?php echo $_smarty_tpl->tpl_vars['user']->value->get_uk_last_name();?>
|
|
<?php echo $_smarty_tpl->tpl_vars['user']->value->get_uk_first_name();?>
|
|
</td>
|
|
<td><input name="chk" type="checkbox" id="chk" value="<?php echo $_smarty_tpl->tpl_vars['user']->value->get_uk_id();?>
|
|
" class="chk" <?php if ($_smarty_tpl->tpl_vars['user']->value->get_uk_presence($_smarty_tpl->tpl_vars['tr_id']->value)) {?>checked<?php }?>> </td>
|
|
</tr>
|
|
<?php
|
|
$_smarty_tpl->tpl_vars['user'] = $foreach_user_Sav;
|
|
}
|
|
?>
|
|
</table>
|
|
<?php echo '<script'; ?>
|
|
>
|
|
$('.chk').click(function() {
|
|
var checked = $(this).is(':checked');
|
|
var user_id = $(this).val();
|
|
var tr_id = $("#tr_id").val();
|
|
alert(checked);
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: '/ajax/update_presence.php',
|
|
data: { checked : checked, user_id : user_id, tr_id : tr_id },
|
|
success: function(data) {
|
|
//alert('it worked');
|
|
}
|
|
});
|
|
|
|
});
|
|
<?php echo '</script'; ?>
|
|
><?php }
|
|
}
|
|
?>
|