<?php
$datatable = true;
echo message_box('success');
echo message_box('error');
?>
<div class="space-y-4">
    <div class="rounded-2xl border border-border bg-card shadow-sm">
        <div class="p-4">
            <div class="overflow-x-auto">
                <table class="min-w-[920px] text-sm DataTables md:min-w-full" id="DataTables" width="100%">
                    <thead class="bg-slate-50 text-slate-500 dark:bg-slate-800 dark:text-slate-300">
                        <tr>
                            <th class="px-4 py-3 text-left"><?= lang('photo') ?></th>
                            <th class="px-4 py-3 text-left"><?= lang('name') ?></th>
                            <th class="px-4 py-3 text-left"><?= lang('username') ?></th>
                            <th class="px-4 py-3 text-left"><?= lang('phone') ?></th>
                            <th class="px-4 py-3 text-left"><?= lang('mobile') ?></th>
                            <th class="px-4 py-3 text-left"><?= lang('skype_id') ?></th>
                            <th class="px-4 py-3 text-left"><?= lang('last_login') ?></th>
                            <th class="px-4 py-3 text-left"><?= lang('status') ?></th>
                        </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    var list = base_url + "client/user/usersList";
    $(document).ready(function() {
        $('[data-view-refresh]').on('click', function() {
            if ($.fn.dataTable && $.fn.dataTable.isDataTable('#DataTables')) {
                table_url(list);
            } else if (typeof fire_datatable === 'function') {
                fire_datatable(list, "DataTables");
            }
        });
    });
</script>
