<style>
    .teacher-profile {
        max-width: 396px;
        max-height: 282px;
    }

    .logo-img {
        width: 80%;
        height: 60px;
        object-fit: contain !important;
    }

    .student-details {
        width: 100%;
    }

    .student-details h6 {
        font-size: 15px;
        color: #0E2F9E;
        font-weight: 600;
    }

    .student-details p {
        font-size: 13px;
        color: #0E2F9E;
        font-weight: 400;
    }

    .student-details span {
        font-size: 13px;
        font-weight: 500;
    }

    .student-details-footer p {
        font-size: 10px;
        color: #0E2F9E;
        font-weight: 400;
    }

    .student-details-footer {
        text-align: center;
        width: 100%;
    }

    .student-details-footers {
        display: flex;
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .student-details-footers span {
        font-size: 10px;
        color: black;
        font-weight: 600;
        width: 100%;
    }

    .student-details-footers img {
        width: 60px;
        height: 26px;
        object-fit: contain;
        margin: auto;
    }

    .teacher_id_card_wrap {
        position: absolute;
        right: 45px;
        top: 0;
    }

    .applicatn-wrap {
        position: relative;
    }

    .teacher-card-footer {
        background: transparent linear-gradient(89deg, #0D2D73 0%, #3F63A9 100%) 0% 0% no-repeat padding-box;
        border-radius: 0px 0px 15px 15px;
        opacity: 1;
        padding: 15px 20px 15px 20px;
    }

    .teacher-card-footer p {
        font-size: 9px;
        color: white;
        font-weight: 400;
    }
</style>
<div class="wraper responsive-width">
    <main class="long-tbl-main" id="main">
        <!-- admin template section -->
        <div class="admin_tempblock">
            <div class="admin_tempsec">
                <div class="admin_sec">
                    <form>
                        <div class="subsec_sec">
                            <div class="subject_r">
                                <div class="subject_lsec">
                                    <div class="from-group">
                                        <a href="<?php echo base_url(); ?>admin/teacher"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>

                                    </div>
                                    <div class="subject_lhead">Teacher</div>
                                    <div class="application-toggle-btn view-student-tab">
                                        <ul class="nav nav-pills">
                                            <li>
                                                <a href="#1b" data-toggle="tab" class="active">Teacher Info</a>
                                            </li>
                                            <li>
                                                <a href="#2b" data-toggle="tab">Classes and subject</a>
                                            </li>
                                            <li>
                                                <a href="#3b" data-toggle="tab">View Schedule</a>
                                            </li>
                                        </ul>
                                    </div>

                                    <div class="tab-content">
                                        <div class="tab-toggle-content active" id="1b">
                                            <div class="applicatn-wrap row">
                                                <div class="col-md-8">


                                                    <?php
                                                    if (isset($teacher_info) && !empty($teacher_info) && count($teacher_info) > 0) {
                                                        if (empty($teacher_info['photo'])) {

                                                            $profileimg = base_url() . "common_assets/user.png";
                                                        } else if (file_exists('assets_admin/images/teacher-profile/' . $teacher_info['photo'])) {

                                                            $profileimg = base_url() . "assets_admin/images/teacher-profile/" . $teacher_info['photo'];
                                                        } else {
                                                            $profileimg = base_url() . "common_assets/user.png";
                                                        }
                                                    ?>
                                                        <img src="<?= $profileimg; ?>" class="teacher-img img-fluid img-thumbnail rounded-circle border-primary teacher-profile">
                                                        <div class="applicant-detl-wrap">

                                                            <ul>
                                                                <li>
                                                                    <span class="applicant_lbl">Teacher ID </span>
                                                                    <span class="applicant_detl"><?php echo $teacher_info['teacherId'] ?></span>
                                                                </li>
                                                                <li>
                                                                    <span class="applicant_lbl">Name:</span>
                                                                    <span class="applicant_detl"> <?php echo $teacher_info['teacher_name'] ?></span>
                                                                </li>
                                                                <li>
                                                                    <span class="applicant_lbl">Email: </span>
                                                                    <span class="applicant_detl"><?php echo $teacher_info['email'] ?></span>
                                                                </li>
                                                                <li>
                                                                    <span class="applicant_lbl">Contact number:</span>
                                                                    <span class="applicant_detl"><?php echo $teacher_info['mobile'] ?></span>
                                                                </li>

                                                                <li>
                                                                    <span class="applicant_lbl">Address:</span>
                                                                    <span class="applicant_detl">
                                                                        <?php echo $teacher_info['address'] ?>
                                                                    </span>
                                                                </li>
                                                            </ul>

                                                        </div>
                                                    <?php  } ?>
                                                    <div class="application-btns">
                                                        <a href="<?php echo base_url(); ?>admin/add-edit-teacher/<?php echo $teacher_info['id']; ?>">
                                                            <button type="button" class="subject_addbtn">
                                                                Edit Info</button>
                                                        </a>

                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                        <div class="tab-toggle-content" id="2b">
                                            <div class="teacher-info">
                                                <div class="teacher-img-cover">
                                                    <img src="<?= $profileimg; ?>" class="teacher-img img-fluid img-thumbnail rounded-circle border-primary teacher-profile">
                                                </div>
                                                <div class="teacher-info-name">
                                                    <ul>
                                                        <li><span class="applicant_lbl">Teacher Name:</span>
                                                            <span class="applicant_detl">
                                                                <?php echo $teacher_info ? $teacher_info['teacher_name'] : '' ?>
                                                            </span>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                            <div class="teacher-class-table">
                                                <table id="tbl4" class="display dataTable  table-responsive">
                                                    <thead>
                                                        <tr>
                                                            <th>S. No.</th>
                                                            <th>Classroom</th>
                                                            <th>Course</th>
                                                            <th>Subject</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <?php $i = 0;
                                                        if (isset($course_subject) && !empty($course_subject)) {
                                                            foreach ($course_subject as $class_key) {

                                                        ?>
                                                                <tr>
                                                                    <td><?php echo $i + 1;
                                                                        $i++; ?></td>
                                                                    <td><?php echo $class_key['classroom_name'] ?></td>
                                                                    <td><?php echo $class_key['course_name'] ?></td>
                                                                    <td>
                                                                        <?php foreach ($all_co_sub as $val) {

                                                                            if ($class_key['classroom_id'] == $val['classroom_id']) {
                                                                                echo $val['subject_name'] . "<br>";
                                                                            }
                                                                        } ?>

                                                                    </td>
                                                                </tr>

                                                        <?php }
                                                        }  ?>
                                                        <tr></tr>

                                                    </tbody>
                                                </table>

                                            </div>

                                        </div>
                                        <div class="tab-toggle-content " id="3b">
                                            <div class="teacher-info">
                                                <div class="teacher-img-cover">
                                                    <img src="<?= $profileimg; ?>" class="teacher-img img-fluid img-thumbnail rounded-circle border-primary teacher-profile">
                                                </div>
                                                <div class="teacher-info-name">
                                                    <ul>
                                                        <li><span class="applicant_lbl">Teacher Name:</span>
                                                            <span class="applicant_detl">
                                                                <?php echo $teacher_info ? $teacher_info['teacher_name'] : '' ?>
                                                            </span>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <hr>
                                            </div>
                                            <div class="teacher-schedule-wrap online-session-wrap">
                                                <table>
                                                    <thead>
                                                        <tr>
                                                            <th>Monday</th>
                                                            <th>Tuesday</th>
                                                            <th>Wednesday</th>
                                                            <th>Thursday</th>
                                                            <th>Friday</th>
                                                            <th>Saturday</th>
                                                            <th>Sunday</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <?php for ($i = 0; $i < $count; $i++) { ?>
                                                            <tr>

                                                                <td>
                                                                    <?php if (isset($monday[$i]) && !empty($monday[$i])) { ?>
                                                                        <p><b><?php echo $monday[$i]['classroom_name']; ?></b></p>
                                                                        <p><?php echo $monday[$i]['start']; ?></p>
                                                                        <p><?php echo $monday[$i]['duration']; ?></p>
                                                                        <p><?php echo $monday[$i]['subject_name']; ?></p>

                                                                    <?php } else { ?>
                                                                        <span><?php echo "Not Scheduled"; ?> </span>
                                                                    <?php } ?>
                                                                </td>
                                                                <td>
                                                                    <?php if (isset($tuesday[$i]) && !empty($tuesday[$i])) { ?>
                                                                        <p><b><?php echo $tuesday[$i]['classroom_name']; ?></b></p>
                                                                        <p><?php echo $tuesday[$i]['start']; ?></p>
                                                                        <p><?php echo $tuesday[$i]['duration']; ?></p>
                                                                        <p><?php echo $tuesday[$i]['subject_name']; ?></p>

                                                                    <?php } else { ?>
                                                                        <span><?php echo "Not Scheduled"; ?> </span>
                                                                    <?php } ?>
                                                                </td>
                                                                <td>
                                                                    <?php if (isset($wednesday[$i]) && !empty($wednesday[$i])) { ?>
                                                                        <p><b><?php echo $wednesday[$i]['classroom_name']; ?></b></p>
                                                                        <p><?php echo $wednesday[$i]['start']; ?></p>
                                                                        <p><?php echo $wednesday[$i]['duration']; ?></p>
                                                                        <p><?php echo $wednesday[$i]['subject_name']; ?></p>

                                                                    <?php } else { ?>
                                                                        <span><?php echo "Not Scheduled"; ?> </span>
                                                                    <?php } ?>
                                                                </td>
                                                                <td><?php if (isset($thursday[$i]) && !empty($thursday[$i])) { ?>
                                                                        <p><b><?php echo $thursday[$i]['classroom_name']; ?></b></p>
                                                                        <p><?php echo $thursday[$i]['start']; ?></p>
                                                                        <p><?php echo $thursday[$i]['duration']; ?></p>
                                                                        <p><?php echo $thursday[$i]['subject_name']; ?></p>

                                                                    <?php } else { ?>
                                                                        <span><?php echo "Not Scheduled"; ?> </span>
                                                                    <?php } ?>
                                                                </td>
                                                                <td>
                                                                    <?php if (isset($friday[$i]) && !empty($friday[$i])) { ?>
                                                                        <p><b><?php echo $friday[$i]['classroom_name']; ?></b></p>
                                                                        <p><?php echo $friday[$i]['start']; ?></p>
                                                                        <p><?php echo $friday[$i]['duration']; ?></p>
                                                                        <p><?php echo $friday[$i]['subject_name']; ?></p>

                                                                    <?php } else { ?>
                                                                        <span><?php echo "Not Scheduled"; ?> </span>
                                                                    <?php } ?>
                                                                </td>
                                                                <td>
                                                                    <?php if (isset($saturday[$i]) && !empty($saturday[$i])) { ?>
                                                                        <p><b><?php echo $saturday[$i]['classroom_name']; ?></b></p>
                                                                        <p><?php echo $saturday[$i]['start']; ?></p>
                                                                        <p><?php echo $saturday[$i]['duration']; ?></p>
                                                                        <p><?php echo $saturday[$i]['subject_name']; ?></p>

                                                                    <?php } else { ?>
                                                                        <span><?php echo "Not Scheduled"; ?> </span>
                                                                    <?php } ?>
                                                                </td>
                                                                <td>
                                                                    <?php if (isset($sunday[$i]) && !empty($sunday[$i])) { ?>
                                                                        <p><b><?php echo $sunday[$i]['classroom_name']; ?></b></p>
                                                                        <p><?php echo $sunday[$i]['start']; ?></p>
                                                                        <p><?php echo $sunday[$i]['duration']; ?></p>
                                                                        <p><?php echo $sunday[$i]['subject_name']; ?></p>

                                                                    <?php } else { ?>
                                                                        <span><?php echo "Not Scheduled"; ?> </span>
                                                                    <?php } ?>
                                                                </td>
                                                            </tr>
                                                        <?php
                                                        } ?>
                                                    </tbody>
                                                </table>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <!-- admin template section end -->
    </main>
    <!--End right-top side-->

</div>
<!-- modals -->
<div class="view-doc">
    <div class="modal fade" id="viewPhoto" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="document-view-wrap">
                    <img src="assets/images/syllabus-doc.png" alt="" />
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="viewCertificate" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="document-view-wrap">
                    <img src="assets/images/syllabus-doc.png" alt="" />
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="viewResult" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="document-view-wrap">
                    <img src="assets/images/syllabus-doc.png" alt="" />
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="viewMedical" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="document-view-wrap">
                    <img src="assets/images/syllabus-doc.png" alt="" />
                </div>
            </div>
        </div>
    </div>
</div>
<!-- modals -->
<script>
    $(document).ready(function() {
        //table js
        $('#tbl').DataTable({
            "lengthMenu": [
                [25, 50, 100, 150, -1],
                [25, 50, 100, 150, "All"]
            ]
        });
        //table js end
    });
</script>