<div class="col-sm-8">

    <div class="row ">
        <div class="col-sm-12 ">
            <div class="col-sm-12" style="padding: 0">
                <div class="col-sm-12 gray_ttc text-left" style="border-bottom: 2px solid #8CC73F;padding-top: 10px;padding-bottom: 10px;font-weight: bold">

                    <div class="col-sm-7">Class Details</div>
                    <div class="col-sm-5">Action</div>

                </div>
                <div class="col-sm-12"><br></div> 
                <div class="col-sm-12">
                    <h3 style="text-align: center !important">
                        <?php
                        if ($classroom_status_message != '') {
                            echo $classroom_status_message;
                            echo '<hr><br>';
                        }
                        ?>
                    </h3>

                </div>


                <?php
                $classroom_status = array('Not Started', 'Running', 'End', 'Unexpected End', 'Not Held', 'Canceled', 'Archived', 'Draft');
                foreach ($all_classes as $class_value) {
                    ++$i;
                    ?>
                    <div class="col-sm-12 <?php
                    if ($i % 2 == 0) {
                        echo 'white';
                    } else {
                        echo 'gray';
                    }
                    ?> ">
                        <div class="col-xs-7  col-sm-9 text-left">
                            <address>
                                <span class="row col-sm-12">   
                                    <span class="col-sm-4" style="padding:0">Course Name</span>
                                    <span class="col-sm-1" style="padding:0">: </span>
                                    <span class="col-sm-6" style="padding:0">
                                        <a href="<?php echo base_url() . $course_info[$class_value->classroom_id]->url ?>" target="blank">
                                            <?php echo $class_value->course_name; ?>                                            
                                        </a>
                                    </span>
                                </span>
                                <span class="row col-sm-12">   
                                    <span class="col-sm-4" style="padding:0">Classroom Title</span>
                                    <span class="col-sm-1" style="padding:0">: </span>
                                    <span class="col-sm-6" style="padding:0"><?php echo $class_value->classroom_title; ?> </span>
                                </span>
                                <span class="row col-sm-12">   
                                    <span class="col-sm-4" style="padding:0">Class Status</span>
                                    <span class="col-sm-1" style="padding:0">: </span>
                                    <span class="col-sm-6" style="padding:0">
                                        <?php
                                        if ($class_value->classroom_status == '0') {
                                            $todays_date1 = date('Y-m-d H:i', (time() - $this->session->userdata('time_offset')));
                                            if ($class_value->class_start_time > $todays_date1) {
                                                $todays_date = new DateTime($todays_date1, new DateTimeZone($person_info->person_time_zone));
                                                $class_start_time1 = date('Y-M-d H:i:s', (strtotime($class_value->class_start_time)));
                                                $class_start_time = new DateTime($class_start_time1, new DateTimeZone($person_info->person_time_zone));
                                                $interval = $class_start_time->diff($todays_date);
                                                echo 'Start In ' . $this->cf->format_interval($interval);
                                            }else{
                                                echo 'Not Started';
                                            }
                                        } else {
                                            echo $classroom_status[$class_value->classroom_status];
                                        }
                                        ?>                                        
                                    </span>
                                </span>
                                <span class="row col-sm-12">   
                                    <span class="col-sm-4" style="padding:0">Resource Person</span>
                                    <span class="col-sm-1" style="padding:0">: </span>
                                    <span class="col-sm-6" style="padding:0">
                                        <?php echo $resource_person_info[$class_value->classroom_id]->person_first_name . ' ' . $resource_person_info[$class_value->classroom_id]->person_last_name; ?>                                        
                                    </span>
                                </span>
                                <span class="row col-sm-12">
                                    <span class="col-sm-4" style="padding:0">Presented by</span>
                                    <span class="col-sm-1" style="padding:0">: </span>
                                    <span class="col-sm-6" style="padding:0">
                                        <?php
                                        if ($resource_person_info[$class_value->classroom_id]->resource_person_type == 3) {
                                            ?>
                                            <a href="<?php echo base_url() . $organization_info[$class_value->classroom_id]->url ?>">
                                                <?php echo $organization_info[$class_value->classroom_id]->person_first_name . ' ' . $organization_info[$class_value->classroom_id]->person_last_name; ?>
                                            </a>
                                            <?php
                                        } else if ($resource_person_info[$class_value->classroom_id]->resource_person_type == 1) {
                                            echo 'Talha Training';
                                        } else {
                                            ?>
                                            <a href="<?php echo base_url() . $resource_person_info[$class_value->classroom_id]->url ?>">
                                                <?php echo $resource_person_info[$class_value->classroom_id]->person_first_name . ' ' . $resource_person_info[$class_value->classroom_id]->person_last_name; ?>
                                            </a>
                                            <?php
                                        }
                                        ?>
                                    </span>
                                </span>
                                <span class="row col-sm-12">   
                                    <span class="col-sm-4" style="padding:0">Duration</span>
                                    <span class="col-sm-1" style="padding:0">: </span>
                                    <span class="col-sm-6" style="padding:0"><?php echo $class_value->class_duration.' Munitue'; ?></span>
                                </span>
                            </address>
                        </div>


                        <?php
                        if ($status == 1) {
                            ?>
                            <div class="col-xs-5  col-sm-3 text-left" style="padding: 20px 0 0 0">
                                <a href="<?php echo base_url() . 'edit-scheduled-class/' . $class_value->url ?>"><i class="fa fa-edit" title="Edit"></i></a>&nbsp;&nbsp;&nbsp;
                                <span>&nbsp;&nbsp;</span>

                                <a href="javascript:void(0)" onclick="checkClassroomAction('<?php echo base_url() . 'check-classroom-action' ?>', 'Delete', '<?php echo $class_value->classroom_id; ?>')">
                                    <i class="fa fa-trash-o" title="Delete"></i>
                                </a>&nbsp;&nbsp;&nbsp;

                                <span>&nbsp;&nbsp;</span>
                                <a href="javascript:void(0)" onclick="checkClassroomAction('<?php echo base_url() . 'check-classroom-action' ?>', 'Cancel', '<?php echo $class_value->classroom_id; ?>')">
                                    <i class="fa  fa-times" title="Cancel Class"></i>
                                </a>&nbsp;&nbsp;&nbsp;


                                <a href="<?php echo base_url() . $class_value->url . '/view-assigned-student'; ?>"><i class="fa fa-users" title="Assigned Student"></i></a>&nbsp;
                                <span>&nbsp;</span>
                                <a href="<?php echo base_url() . 'assign-student/' . $class_value->url; ?>"><i class="fa fa-user-plus" title="Assign Student"></i></a>&nbsp;
                                <span>&nbsp;</span>
                            </div>
                            <?php
                        } else if ($status == 2) {
                            if ($class_value->classroom_status == 0) {
                                ?>
                                <div class="col-xs-5  col-sm-3 text-left" style="padding: 20px 0 0 0">
                                    <span>&nbsp;&nbsp;</span>
                                    <a href="javascript:void(0)" onclick="checkClassroomAction('<?php echo base_url() . 'check-classroom-action' ?>', 'Cancel', '<?php echo $class_value->classroom_id; ?>')">
                                        <i class="fa  fa-times" title="Cancel Class"></i>
                                    </a>&nbsp;&nbsp;&nbsp;

                                    <span>&nbsp;&nbsp;</span>
                                    <a href="<?php echo base_url() . $class_value->url; ?>" target="_blank">
                                        <i class="fa  fa-play-circle-o" title="Launch Class"></i>
                                    </a>&nbsp;&nbsp;&nbsp;
                                </div>
                                <?php
                            } else {
                                ?>
                                <div class="col-xs-5  col-sm-3 text-left" style="padding: 20px 0 0 0">
                                    <span>&nbsp;&nbsp;</span>
                                    <a href="<?php echo base_url() . $class_value->url; ?>" target="_blank">
                                        <i class="fa  fa-play-circle-o" title="Launch Class"></i>
                                    </a>&nbsp;&nbsp;&nbsp;
                                </div>
                                <?php
                            }
                        } else if ($status == 3) {
                            if (($class_value->classroom_status == 4) || ($class_value->classroom_status == 5) || $class_value->classroom_status == 7) {
                                ?>
                                <div class="col-xs-5  col-sm-3 text-left" style="padding: 20px 0 0 0">
                                    <span>&nbsp;&nbsp;</span>
                                    <a href="javascript:void(0)" onclick="checkClassroomAction('<?php echo base_url() . 'check-classroom-action' ?>', 'Cancel', '<?php echo $class_value->classroom_id; ?>')">
                                        <i class="fa  fa-times" title="Cancel Class"></i>
                                    </a>&nbsp;&nbsp;&nbsp;
                                </div>
                                <?php
                            }
                        }
                        ?>
                    </div>
                    <div class="col-sm-12"><br></div>
                    <?php
                }
                ?>

            </div>

            <div class="col-sm-12"><br></div>
<!--            <div class="col-sm-12">
                <h3 style="text-align: center !important">
                    TalhaTraining upcoming course:
                </h3>
                <hr><br>
            </div>
            <div class="col-sm-12 " style="padding: 0">

                <div class="row gray" >
                    <div class="col-sm-7 text-left" ><a href="#" class="red">Making Practicle Apps using Laraval the php framework.</a><br>
                        By- <span class="green"><a href="#">Safiul Alam</a></span>
                    </div>
                    <div class="col-sm-2" style="padding: 0"><div class="rating-read-only" ></div></div>
                    <div class="col-sm-3"><span class="red">Advanced </span>&nbsp;BDT 15,500</div>
                    <div class="col-sm-2" style="padding-left:0;">
                        <a class="btn btn-success" data-toggle="tooltip" title="Get enrollment in the course !" data-placement="top"><i class="fa fa-plus-square-o"></i></a> 
                         <a class="btn btn-danger" data-toggle="tooltip" title="Add to wishlist!" data-placement="top"><i class="fa fa-heart"></i></a>
                    </div>
                </div>
                <div><br></div>
                <div class="row gray" >
                    <div class="col-sm-7 text-left" ><a href="#" class="red">Making Practicle Apps using Laraval the php framework.</a><br>
                        By- <span class="green"><a href="#">Safiul Alam</a></span>
                    </div>
                    <div class="col-sm-2" style="padding: 0"><div class="rating-read-only" ></div></div>
                    <div class="col-sm-3"><span class="red">Advanced </span>&nbsp;BDT 15,500</div>
                    <div class="col-sm-2" style="padding-left:0;">
                        <a class="btn btn-success" data-toggle="tooltip" title="Get enrollment in the course !" data-placement="top"><i class="fa fa-plus-square-o"></i></a> 
                        <a class="btn btn-danger" data-toggle="tooltip" title="Add to wishlist!" data-placement="top"><i class="fa fa-heart"></i></a>
                    </div>
                </div>
                <div><br></div>
                <div class="text-right"><a href="course.html" >More ...</a></div>
            </div>
            <div class="col-sm-12">
                <h3 style="text-align: center !important">
                    TalhaTraining upcoming Video course:
                </h3>
                <hr><br>

            </div>
            <div class="col-sm-12 " style="padding: 0">
                <div class="row gray" >
                    <div class="col-sm-7 text-left" ><a href="#" class="red">Making Practicle Apps using Laraval the php framework.</a><br>
                        By- <span class="green"><a href="#">Safiul Alam</a></span>
                    </div>
                    <div class="col-sm-2" style="padding: 0"><div class="rating-read-only" ></div></div>
                    <div class="col-sm-3"><span class="red">Advanced </span>&nbsp;BDT 15,500</div>
                    <div class="col-sm-2" style="padding-left:0;">
                        <a class="btn btn-success" data-toggle="tooltip" title="Get enrollment in the course !" data-placement="top"><i class="fa fa-plus-square-o"></i></a> 
                         <a class="btn btn-danger" data-toggle="tooltip" title="Add to wishlist!" data-placement="top"><i class="fa fa-heart"></i></a>
                    </div>
                </div>
                <div><br></div>
                <div class="row gray" >
                    <div class="col-sm-7 text-left" ><a href="#" class="red">Making Practicle Apps using Laraval the php framework.</a><br>
                        By- <span class="green"><a href="#">Safiul Alam</a></span>
                    </div>
                    <div class="col-sm-2" style="padding: 0"><div class="rating-read-only" ></div></div>
                    <div class="col-sm-3"><span class="red">Advanced </span>&nbsp;BDT 15,500</div>
                    <div class="col-sm-2" style="padding-left:0;">
                        <a class="btn btn-success" data-toggle="tooltip" title="Get enrollment in the course !" data-placement="top"><i class="fa fa-plus-square-o"></i></a> 
                        <a class="btn btn-danger" data-toggle="tooltip" title="Add to wishlist!" data-placement="top"><i class="fa fa-heart"></i></a>
                    </div>
                </div>
                <div><br></div>
                <div class="text-right"><a href="my_video.html" >More ...</a></div>
                <div><br><br></div>
            </div>      
            <div class="col-sm-12 " style="padding: 0">
                <nav class="course-pagination">
                    <ul class="pagination">
                        <li>
                            <a href="#" aria-label="Previous">
                                <span aria-hidden="true" title="First Page">&laquo;&laquo;</span>
                            </a>
                        </li>
                        <li>
                            <a href="#" aria-label="Previous">
                                <span aria-hidden="true" title="Previous Page">&laquo;</span>
                            </a>
                        </li>
                        <li><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                        <li>
                            <a href="#" aria-label="Next">
                                <span aria-hidden="true" title="Next Page">&raquo;</span>
                            </a>
                        </li>
                        <li>
                            <a href="#" aria-label="Next">
                                <span aria-hidden="true" title="Last Page">&raquo;&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>-->
        </div><!-- /.row gray -->
    </div>
</div>
<script type="text/javascript" src="<?php echo base_url() ?>front_end_resource/classroom/classroom.js"></script>
