
<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">المجموعات   ({count($studentsubjectgroups)}) / ({count($studentsubjectgroups) - studentsubjectgroupdel}) / ({$studentsubjectgroupdel})</a></li>
                {/if}
                {if $studentaddsubjectdetails}
                <li><a href="#studentaddsubjectdetails" data-toggle="tab"> المتدربين   ({count($studentaddsubjectdetails)}) / ({count($studentaddsubjectdetails) - $studentaddsubjectdetaildel}) / ({$studentaddsubjectdetaildel})</a></li>
                {/if}
                {if $studentsexams}
                <li><a href="#studentsexams" data-toggle="tab"> الاختبارات    ({count($studentsexams)}) / 
                ({count($studentsexams) - $studentsexamdel}) / ({$studentsexamdel})</a></li>
                {/if}
                {if $studentspays}
                <li><a href="#studentspays" data-toggle="tab"> الدفع   ({count($studentspays)}) / ({count($studentspays) - $studentspaydel})/ ({$studentspaydel})</a></li>
                {/if}
                 {if $studentabsences}
                <li><a href="#studentabsences" data-toggle="tab">الغياب     ({count($studentabsences)}) / ({count($studentabsences) - $studentabsencesdel}) / ({$studentabsencesdel})</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>
                            {if $studentsubjects->del lt 2}
                            <tr >
                                <td><a href="studentSubjectsController.php?do=edit&id={$studentsubjects->id}" class="btn btn-default btn-lm" target="_blank">{$studentsubjects->subjectname}</a></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>
                            {else}
                            <tr style="background:#fb7777">
                               <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->deltoday}</td>
                            </tr>
                            {/if}
                        </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}
                            {if $data->del lt 2}
                            <tr >
                                <td><a href="studentsAddSubject.php?do=edit&id={$data->studentsubjectid}" class="btn btn-default btn-lm" target="_blank">{$data->subjectgroupname}</a></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>
                            {else}
                            <tr style="background:#fb7777">
                                <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->deltoday}</td>
                            </tr>
                            {/if}
                            {/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}
                    {if $data->del lt 2}
                    <tr >
                        <td><a href="studentsAddSubject.php?do=edit&id={$data->studentaddsubjectid}&addstudent=1" class="btn btn-default btn-lm" target="_blank">{$data->studentname}</a></td>
                        <td>{$data->subjectgroupname}</td>
                        <td>{$data->subjectgroupprice}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->addtoday}</td>
                    </tr>
                    {else}
                    <tr style="background:#fb7777">
                        <td><a href="studentsAddSubject.php?do=edit&id={$data->studentaddsubjectid}&addstudent=1" class="btn btn-default btn-lm" target="_blank">{$data->studentname}</a></td>
                        <td>{$data->subjectgroupname}</td>
                        <td>{$data->subjectgroupprice}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->deltoday}</td>
                    </tr>
                    {/if}
                    {/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}
                    {if $data->del lt 2}
                    <tr >
                        <td><a href="studentsExamsController.php?do=edit&id={$data->id}" class="btn btn-default btn-lm" target="_blank">{$data->examname}</a></td>
                        <td>{$data->greatdegree}</td>
                        <td>{$data->subjectgroupname}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->addtoday}</td>
                    </tr>
                    {else}
                    <tr style="background:#fb7777">
                        <td>{$data->examname}</td>
                        <td>{$data->greatdegree}</td>
                        <td>{$data->subjectgroupname}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->deltoday}</td>
                    </tr>
                    {/if}
                    {/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}
                    {if $data->del lt 2}
                    <tr >
                        <td><a href="studentsPay.php?do=edit&id={$data->id}" class="btn btn-default btn-lm" target="_blank">{$data->paytype}</a></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>
                    {else}
                    <tr style="background:#fb7777">
                        <td>{$data->paytype}</td>
                        <td>{$data->paymonths}</td>
                        <td>{$data->subjectname}</td>
                        <td>{$data->payprice}</td>
                        <td>{$data->paystartdate}</td>
                        <td>{$data->payenddate}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->deltoday}</td>
                    </tr>
                    {/if}
                    {/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}
                    {if $data->del lt 2}
                    <tr >
                        <td>{$data->studentname}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->addtoday}</td>
                    </tr>
                    {else}
                    <tr style="background:#fb7777">
                        <td>{$data->subjectname}</td>
                        <td>{$data->employeename}</td>
                        <td>{$data->deltoday}</td>
                    </tr>
                    {/if}
                    {/foreach}
                </tbody>
            </table>
                <div class="clearfix"></div>
                </div>              
            </div>
        </div>
    </div>
</div>


