first commit

This commit is contained in:
Ricsi
2016-11-10 08:19:53 +00:00
commit ae91c7c53b
41 changed files with 3462 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<table>
<input type="hidden" id="tr_id" value="{$tr_id}">
{foreach $users as $user}
<tr>
<td>{$user->get_uk_last_name()} {$user->get_uk_first_name()}</td>
<td><input name="chk" type="checkbox" id="chk" value="{$user->get_uk_id()}" class="chk" {if $user->get_uk_presence($tr_id)}checked{/if}> </td>
</tr>
{/foreach}
</table>
<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');
}
});
});
</script>