
<style type="text/css">
    .dataTables_length,.dataTables_info  {
    width: 0px !important;
    }
   table, th, td {
  border: 1px solid black;
  border-collapse: collapse;
  text-align: center;
}

</style>
<div class="row">
    <div class="container">
        <div class="panel-body">     
            <ul class="nav nav-tabs">
                <li class="active"><a href="#studentsubjects" data-toggle="tab">تخصصات المتدربين</a></li>
                {if $studentsubjectgroups}
                <li><a href="#studentsubjectgroups" data-toggle="tab">المجموعات</a></li>
                {/if}
                {if $studentaddsubjectdetails}
                <li><a href="#studentaddsubjectdetails" data-toggle="tab"> المتدربين </a></li>
                {/if}
                {if $studentsexams}
                <li><a href="#studentsexams" data-toggle="tab"> الاختبارات</a></li>
                {/if}
                {if $studentspays}
                <li><a href="#studentspays" data-toggle="tab"> الدفع</a></li>
                {/if}
                 {if $studentabsences}
                <li><a href="#studentabsences" data-toggle="tab">الغياب </a></li>
                {/if}
             </ul>               
            <div class="tab-content">
                <hr/>
                 <div class="tab-pane active" id="studentsubjects">
                    <table class="table table-black border">
                        <thead>
                            <tr>
                                <th>اسم </th>
                                <th>رقم  تخصصات المتدربين</th>
                                <th>السعر</th>
                                <th>عدد المجموعات</th>
                                <th>عدد  المتدربين</th>
                                <th>عدد الاختبارات</th>
                                <th>الدفع</th>
                                <th>المستخدم</th>
                                <th>التاريخ</th>
                            </tr>
                        </thead>
                        <tbody>
                             <tr  {if $studentsubjects->del gt 1} style="background:#fb7777" {/if}>
                                <td>{$studentsubjects->subjectname}</td>
                                <td>{$studentsubjects->deviceid}</td>
                                <td>{$studentsubjects->subjectprice}</td>
                                <td>{count($studentsubjectgroups) - studentsubjectgroupdel}</td>
                                <td>{count($studentaddsubjectdetails) - studentaddsubjectdetaildel}</td>
                                <td>{count($studentsexams) - $studentsexamdel}</td>
                                <td>{$payprice}</td>
                                <td>{$studentsubjects->employeename}</td>
                                <td>{$studentsubjects->addtoday}</td>
                            </tr>
                           
                        </tbody>
                    </table>
                    <br>
                    <div class="clearfix"></div>
                </div>
                <div class="tab-pane " id="studentsubjectgroups">
                     <table class="table table-black reportstable">
                        <thead>
                            <tr>
                                <th>المجموعه</th>
                                <th>السعر</th>
                                <th>الايام والوقت</th>
                                <th>المستخدم</th>
                                <th>التاريخ</th>
                            </tr>
                        </thead>
                        <tbody>
                            {foreach $studentsubjectgroups as $data}
                             <tr  {if $data->del gt 1} style="background:#fb7777" {/if}>
                                <td>{$data->subjectgroupname}</td>
                                <td>{$data->subjectgroupprice}</td>
                                <td>
                                    {foreach $data->daytimes as $data2}
                                     {if $data2->del lt 2}
                                       {$data2->dayar} => {$data2->timeform} - {$data2->timeto} /
                                        {else}
                                         <span style="color:red"> {$data2->dayar} => {$data2->timeform} - {$data2->timeto}/
                                        </span>
                                        {/if}
                                    {/foreach}
                                </td>
                                <td>{$data->employeename}</td>
                                <td>{$data->addtoday}</td>
                            </tr>
                            {/foreach}
                        </tbody>
                    </table>
                    <br>
                    <div class="clearfix"></div>
                </div>
                <div class="tab-pane " id="studentaddsubjectdetails">
                <table class="table table-black reportstable">
                <thead>
                    <tr>
                        <th>الاسم</th>
                        <th>المجموعه</th>
                        <th>السعر</th>
                        <th>المستخدم</th>
                        <th>التاريخ</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach $studentaddsubjectdetails as $data}
                     <tr  {if $data->del gt 1} style="background:#fb7777" {/if}>
                        <td>{$data->studentname}</td>
                        <td>{$data->subjectgroupname}</td>
                        <td>{$data->subjectgroupprice}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->addtoday}</td>
                    </tr>
                    
                    {/foreach}
                </tbody>
            </table>
                <div class="clearfix"></div>
                </div>
                <div class="tab-pane " id="studentsexams">
                <table class="table table-black reportstable">
                <thead>
                    <tr>
                        <th>الاسم</th>
                        <th>الدراجه</th>
                        <th>المجموعه</th>
                        <th>المستخدم</th>
                        <th>التاريخ</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach $studentsexams as $data}
                     <tr  {if $data->del gt 1} style="background:#fb7777" {/if}>
                        <td>{$data->examname}</td>
                        <td>{$data->greatdegree}</td>
                        <td>{$data->subjectgroupname}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->addtoday}</td>
                    </tr>
                   
                    {/foreach}
                </tbody>
            </table>
                <div class="clearfix"></div>
                </div>
                <div class="tab-pane " id="studentspays">
                <table class="table table-black reportstable">
                <thead>
                    <tr>
                        <th>النظام</th>
                        <th>عدد الشهور</th>
                        <th>المتدرب</th>
                        <th>السعر</th>
                        <th>تاريخ البدايه</th>
                        <th>تاريخ  الانتهاء</th>
                        <th>المستخدم</th>
                        <th>التاريخ</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach $studentspays as $data}
                     <tr  {if $data->del gt 1} style="background:#fb7777" {/if}>
                        <td>{$data->paytype}</td>
                        <td>{$data->paymonths}</td>
                        <td>{$data->studentname}</td>
                        <td>{$data->payprice}</td>
                        <td>{$data->paystartdate}</td>
                        <td>{$data->payenddate}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->addtoday}</td>
                    </tr>
                  
                    {/foreach}
                </tbody>
            </table>
                <div class="clearfix"></div>
                </div>
                <div class="tab-pane " id="studentabsences">
                <table class="table table-black reportstable">
                <thead>
                    <tr>
                        <th>المتدرب</th>
                        <th>المستخدم</th>
                        <th>التاريخ</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach $studentabsences as $data}
                     <tr  {if $data->del gt 1} style="background:#fb7777" {/if}>
                        <td>{$data->studentname}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->addtoday}</td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
                <div class="clearfix"></div>
                </div>              
            </div>
        </div>
    </div>
</div>


