getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.3.1', 'unifunc' => 'content_679f6502bc8df6_94217674', 'has_nocache_code' => false, 'file_dependency' => array ( '8f1f78ed6e613231cf8fb2ed877a02c6cb5b89d1' => array ( 0 => 'admin/user/index.tpl', 1 => 1733016424, 2 => 'file', ), ), 'includes' => array ( 'file:admin/header.tpl' => 1, 'file:datatable.tpl' => 1, 'file:admin/footer.tpl' => 1, ), ))) { function content_679f6502bc8df6_94217674 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = '/www/wwwroot/fuuu.cloud/resources/views/tabler/admin/user'; $_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?>
getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('details')['field'], 'value', false, 'key'); $foreach0DoElse = true; foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value => $_smarty_tpl->getVariable('value')->value) { $foreach0DoElse = false; ?> getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
getValue('value');?>
renderSubTemplate('file:datatable.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?> > tableConfig.ajax = { url: '/admin/user/ajax', type: 'POST', dataSrc: 'users' }; tableConfig.order = [ [1, 'asc'] ]; tableConfig.columnDefs = [ { targets: [0, 6, 7], orderable: false }, ]; let table = new DataTable('#data-table', tableConfig); function loadTable() { table; } $("#create-button").click(function () { $.ajax({ type: "POST", url: "/admin/user/create", dataType: "json", data: { getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('details')['create_dialog'], 'from'); $foreach3DoElse = true; foreach ($_from ?? [] as $_smarty_tpl->getVariable('from')->value) { $foreach3DoElse = false; ?> getValue('from')['id'];?> : $('#getValue('from')['id'];?> ').val(), getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> }, success: function (data) { if (data.ret === 1) { $('#success-noreload-message').text(data.msg); $('#success-noreload-dialog').modal('show'); reloadTableAjax(); } else { $('#fail-message').text(data.msg); $('#fail-dialog').modal('show'); } } }) }); function deleteUser(user_id) { $('#notice-message').text('确定删除此用户?'); $('#notice-dialog').modal('show'); $('#notice-confirm').off('click').on('click', function () { $.ajax({ url: "/admin/user/" + user_id, type: 'DELETE', dataType: "json", success: function (data) { if (data.ret === 1) { $('#success-noreload-message').text(data.msg); $('#success-noreload-dialog').modal('show'); reloadTableAjax(); } else { $('#fail-message').text(data.msg); $('#fail-dialog').modal('show'); } } }) }); } function reloadTableAjax() { table.ajax.reload(null, false); } loadTable(); > renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); } }