
{literal}
<style>


    .prntbl2 {
        padding:0px !important;
        width:95% !important;
        margin:0px auto !important;
    }.prntbl2 table{
        border-collapse: collapse !important;
        width:100% !important;
        margin:0px !important;
        padding:0px !important;
    }
    .prntbl2 table th {
        //   background-color: #2D2D2D !important;
        //   background: #2D2D2D !important;
        border:0px solid #000000 !important;
        border-width:0px 0px 1px 1px !important;
        font-size:15px !important;
        font-family:Arial !important;
        font-weight:bold !important;
        color: #FFFFFF !important;
        text-align: center !important;
    }.prntbl2 tr:hover td{

    }
    .prntbl2 tr:nth-child(odd){background-color: #E0E0E0 !important;}
    .prntbl2 tr:nth-child(even)    { background-color:#ffffff !important; }
    .prntbl2 td{
        border:1px solid #000000 !important;
        padding: 0px 3px !important;
        font-size: 13px !important;
        font-family: tahoma !important;
        color:#000000 !important;
        text-align: left !important;
    }


    .prntbl2 th, .prntbl2 tt, .prntbl2 td {
        line-height: 20px !important;
        padding: 1px 5px !important;


    }

    .prntbl2 span {
        font-weight: 700;
    }

    .col-md-3{
        width: 25%;
    }
    .col-md-4{
        width: 33%;
    }
    .col-md-8{
        width: 66.66%;
    }


</style>

{/literal}
<div class="prntbl2">
    {literal}
    <style>


        .prntbl2 {
            padding:0px !important;
            width:95% !important;
            margin:0px auto !important;
        }.prntbl2 table{
            border-collapse: collapse !important;
            width:100% !important;
            margin:0px !important;
            padding:0px !important;
        }
        .prntbl2 table th {
            //     background-color: #2D2D2D !important;
            //   background: #2D2D2D !important;
            border-width:1px 1px 1px 1px !important;
            font-size:15px !important;
            font-family:Arial !important;
            font-weight:normal !important;
            color: #000 !important;
            text-align: center !important;
        }.prntbl2 tr:hover td{

        }
        .prntbl2 tr:nth-child(odd){background-color: #E0E0E0 !important;}
        .prntbl2 tr:nth-child(even)    { background-color:#ffffff !important; }
        .prntbl2 td{
            border:1px solid #000000 !important;
            padding: 0px 3px !important;
            font-size: 13px !important;
            font-family: tahoma !important;
            color:#000000 !important;
            text-align: center !important;
        }


        .prntbl2 th, .prntbl2 tt, .prntbl2 td {
            line-height: 20px !important;
            padding: 1px 5px !important;


        }

        .prntbl2 span {
            font-weight: normal;
        }

        @media print {
            a[href]:after {
                content: none !important;
            }

            th,td{
                font-weight: normal!important;
            }
        }

    </style>

    {/literal}
    <div class="prntbl2">
        <!--center><h4 class="modal-title">Operation Report</h4></center-->


        <table class="table table-hover portlet light bg-inverse" id="repTable" style="direction: rtl;text-align: center;">
            <thead>
                <tr>
                    <th colspan="7" class="text-center" style="border-left:  none !important">
                        اليوم 
                        {if {$fdate|date_format:"%A"} eq 'Saturday'} السبت
                        {elseif {$fdate|date_format:"%A"} eq 'Sunday'} الاحد
                        {elseif {$fdate|date_format:"%A"} eq 'Monday'} الاثنين
                        {elseif {$fdate|date_format:"%A"} eq 'Tuesday'} الثلاثاء
                        {elseif {$fdate|date_format:"%A"} eq 'Wednesday'} الاربعاء
                        {elseif {$fdate|date_format:"%A"} eq 'Thursday'} الخميس
                        {elseif {$fdate|date_format:"%A"} eq 'Friday'} الجمعه
                        {/if}
                    </th>
                    <th colspan="7" class="text-center" style="border-right: none !important">
                        التاريخ
                        {$fdate|date_format:"%Y/%m/%d"}
                    </th>
                </tr>
                <tr>
                    <th colspan="14" class="text-center">
                        Operation List
                    </th>
                </tr>
                <tr>
                    <th style="width: 10px !important;">م</th>
                    <th>
                        اسم الحالة
                    </th>
                    <th >
                        رقم الملف
                    </th>
                    <th>
                        التاريخ 
                    </th>
                    <th>
                        الطبيب المعالج
                    </th>
                    <th>
                        نوع العمليه
                    </th>
                    <th>
                        الدخول
                    </th>
                    <th>
                        الخروج
                    </th>
                    <th>
                        العمليات
                    </th>
                    <th>
                        الدخول
                    </th>
                    <th>
                        الخروج
                    </th>

                    <th>
                        الإقامة
                    </th>
                    <th>
                        الدخول
                    </th>
                    <th>
                        الخروج
                    </th>

                </tr>
            </thead>
            <tbody>
                {assign var="i" value="1"}
                {foreach $allData as $data}
                <tr class="odd ">
                    <td>{$i}</td>
                    <td>
                        <a href="{$hosturl}/controllers/patients.php?ac=edit&id={$data.patientid}" target="_new">
                            {if  $data.for_husband == 1 }
                            {$data.husdandname}
                            {else}
                            {$data.wifename}
                            {/if}
                        </a>
                    </td>
                    <td>
                        {$data.statusno}
                    </td>
                    <td>  {$data.visitdate}</td>
                    <td>
                        {$data.for_doctor_name}
                    </td>
                    <td>
                        {$data.type}
                    </td>
                    <td>
                        {$data.recep_enterance}
                    </td>
                    <td>
                        {$data.recep_p_exit}
                    </td>
                    <td>
                        {$data.room_no}
                    </td>
                    <td>
                        {$data.enterance}
                    </td>
                    <td>
                        {$data.p_exit}
                    </td>

                    <td>
                        {$data.res_room_no}
                    </td>
                    <td>
                        {$data.res_enterance}
                    </td>
                    <td>
                        {$data.res_p_exit}
                    </td>

                </tr>
                {assign var="i" value={$i+1}}
                {/foreach}
            </tbody>
        </table>
    </div>

    <div class="prntbl2">
        {if !empty($lab_1_users)}
        <div class="col-md-3 pull-right">
            <div class="form-group ">
                <label class="col-md-4 pull-right text-right" style="padding-right: 5px;">النائب</label>
                <div class="col-md-8 pull-right">
                    {foreach $all_users_th as $user}
                    {if $nab_1_users eq $user.user_id}
                    <label>{$user.name}</label>
                    {/if}
                    {/foreach}
                </div>
            </div>

        </div>
        {/if}
        {if !empty($lab_1_users)}
        <div class="col-md-3 pull-right">
            <div class="form-group ">
                <label class="col-md-4 pull-right text-right" style="padding-right: 5px;">المعمل</label>
                <div class="col-md-8 pull-right">
                    {foreach $all_users_th as $user}
                    {if $lab_1_users eq $user.user_id}
                    <label>{$user.name}</label>
                    {/if}
                    {/foreach}
                </div>
            </div>
        </div>
        {/if}

        {if !empty($sleep_1_users)}
        <div class="col-md-3 pull-right">
            <div class="form-group ">
                <label class="col-md-4 pull-right text-right" style="padding-right: 5px;">التخدير</label>
                <div class="col-md-8 pull-right">
                    {foreach $all_users_th as $user}
                    {if $sleep_1_users eq $user.user_id}
                    <label>{$user.name}</label>
                    {/if}
                    {/foreach}
                </div>
            </div>

        </div>
        {/if}

        {if !empty($sug_1_users)}
        <div class="col-md-3 pull-right">
            <div class="form-group ">
                <label class="col-md-4 pull-right text-right" style="padding-right: 5px;">الجراح</label>
                <div class="col-md-8 pull-right">
                    {foreach $all_users_th as $user}
                    {if $sug_1_users eq $user.user_id}
                    <label>{$user.name}</label>
                    {/if}
                    {/foreach}
                </div>
            </div>

        </div>
        {/if}

        {if !empty($nab_2_users)}
        <div class="clearfix" style="margin:  6px;"></div>
        <div class="col-md-3 pull-right">
            <div class="form-group ">
                <label class="col-md-4 pull-right text-right" style="padding-right: 5px;">النائب</label>
                <div class="col-md-8 pull-right">
                    {foreach $all_users_th as $user}
                    {if $nab_2_users eq $user.user_id}
                    <label>{$user.name}</label>
                    {/if}
                    {/foreach}
                </div>
            </div>

        </div>
        {/if}

        {if !empty($lab_2_users)}
        <div class="col-md-3 pull-right">
            <div class="form-group ">
                <label class="col-md-4 pull-right text-right" style="padding-right: 5px;">المعمل</label>
                <div class="col-md-8 pull-right">
                    {foreach $all_users_th as $user}
                    {if $lab_2_users eq $user.user_id}
                    <label>{$user.name}</label>
                    {/if}
                    {/foreach}
                </div>
            </div>

        </div>

        {/if}
        <div class="clearfix" style="margin:  6px;"></div>


    </div>


    <!--

    الى
                {if {$todate|date_format:"%A"} eq 'Saturday'} السبت
                {elseif {$todate|date_format:"%A"} eq 'Sunday'} الاحد
                {elseif {$todate|date_format:"%A"} eq 'Monday'} الاثنين
                {elseif {$todate|date_format:"%A"} eq 'Tuesday'} الثلاثاء
                {elseif {$todate|date_format:"%A"} eq 'Wednesday'} الاربعاء
                {elseif {$todate|date_format:"%A"} eq 'Thursday'} الخميس
                {elseif {$todate|date_format:"%A"} eq 'Friday'} الجمعه
                {/if}

                الي
                {$todate|date_format:"%Y/%m/%d"}

    -->