
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="userController.php?do=show">المستخدمين</a></li>
            <li class="active">عرض المستخدمين</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->


            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;"> عرض المستخدمين<br />
                    {if $message != ""}
                    {$message}
                    {/if}</h3>
                <a href="{$youtubes[2]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="userController.php" class="hidden-print"><input type="button"  style="margin-left: 12px"  id="submit"  class="btn btn-primary pull-left " value="إضافة جديد"/></a>
            </div>
            <div class="panel-body">
                <form class="form-inline hidden-print" action="userController.php?do=show" method="post">
                    <div class="form-group">
                        <label class="sr-only">المجموعة</label>
                        <select class="select2 wdt100" name="usergroupid" onchange="this.form.submit();">
                            <option value="-1">اختر مجموعة</option>


                            {foreach $UserGroupData as $UserGroup}


                            <option value="{$UserGroup->usergroupid}">{$UserGroup->usergroupname}</option>



                            {/foreach}



                        </select>
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </div>
            <hr/>
            <!-- Table -->
            <table class="table table-black">
                <thead>
                    <tr>
                        <th>اسم العضو</th>
                        <th>اسم المجموعة</th>
                        <th>تاريخ اخر نشاط</th>
                        <th>الحاالة</th>
                        <th>نوع الجهاز</th>
                        <th class="hidden-print">تعديل</th>
                        <th class="hidden-print">ايقاف</th>
                    </tr>
                </thead>
                <tbody>

                    {foreach $userData as $user}
                    {if {$user->conditions} eq 1}
                    <tr class="danger"> {elseif {$user->conditions} eq 0}

                    <tr> {/if}
                        <td>{$user->username} / {$user->employeename}</td>
                        <td>{$user->usergroupname}</td>
                        <td>{$user->lastactivetime}</td>
                        <td>{if $user->loginip == ""}<span style="color: red; font-weight: bold;">سجل خروج</span>{else}<span style="color: green; font-weight: bold;">سجل دخول</span>{/if}</td>
                        <td>{$user->deviceType}</td>
                        <td class="hidden-print"> <a href="userController.php?do=edit&userid={$user->userid}" type="button" class="btn btn-default btn-lg editicon"></a> </td>
                        <td class="hidden-print"> <a href="userController.php?do=delete&userid={$user->userid}&conditions={$user->conditions}" type="button" class="btn btn-default btn-lg removeicon"></a> </td>
                    </tr>
                    {/foreach}

                </tbody>

            </table>
        </div>
    </div>
</div>



<div  class="hidden-print">
    <div class="col-lg-12">
        <div class="form-group">
            <div class="col-lg-4">
                <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">طباعة</button>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
</div>