<div class="row ">
    <div class="col-sm-12 ">
        <div class="col-sm-12">
            <h3>My classes</h3>
            <hr>
        </div>

        <div class="col-sm-12" >
            <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> 
            <style>
                .gray{
                    background-color: #ccffcc;
                }
                .white{
                    background-color: #ffffff;
                }
            </style>
            <?php
            $i = 1;
            foreach ($my_class as $v_my_class) {
                ?>
                <div class="col-sm-12 <?php
                if ($i % 2 == 0) {
                    echo 'gray';
                } else {
                    echo 'white';
                }
                $i++;
                ?> " >
                    <div class="col-sm-7 text-left" style="padding-top: 20px ">
                        <address>
                            <span  style="font-weight: bold;margin-right: 20px">Course Name : </span> <?php echo $v_my_class->course_name; ?><br>
                            <?php echo $v_my_class->class_date . ', ' . $v_my_class->class_start_time; ?><br>
                            <?php
                            $now = new DateTime();
                            $class_start_time = $v_my_class->class_date . ' ' . $v_my_class->class_start_time;
                            $class_start_time = new DateTime($class_start_time);

                            $interval = $class_start_time->diff($now);
//                                print_r($interval);
                            if ($interval->format("%d")) {
                                echo ' ' . $interval->format("%d days");
                            }
                            if ($interval->format("%h")) {
                                echo ' ' . $interval->format("%h hours");
                            }
                            if ($interval->format("%i")) {
                                echo ' ' . $interval->format("%i minutes");
                            }
                            echo ' ' . $interval->format("%s seconds");
                            echo ' Remain ';
                            ?><br><br>
                            <span  style="font-weight: bold;margin-right: 20px">Presented by : </span><?php echo $v_my_class->person_first_name . ' ' . $v_my_class->person_last_name; ?><br>
                            <span  style="font-weight: bold;margin-right: 45px">Duration : </span>60 Minutes
                        </address>
                    </div>
                    <div class="col-sm-5 text-left" style="padding: 20px 0 0 0">
                        <?php if ($v_my_class->student_id) { ?>
                            <a href="delete_schedule_class.html"><i class="fa  fa-user-times" title="Cancel Class"></i></a>&nbsp;&nbsp;&nbsp;
                            <span>|</span>
                        <?php } else if ($v_my_class->student_id) { ?>
                            <a href="edit_schedule_class.html"><i class="fa fa-edit" title="Edit"></i></a>&nbsp;&nbsp;&nbsp;
                            <span>|</span>
                            <a href="delete_schedule_class.html"><i class="fa fa-trash-o" title="Delete"></i></a>&nbsp;&nbsp;&nbsp;
                            <span>|</span>
                            <a href="delete_schedule_class.html"><i class="fa  fa-user-times" title="Cancel Class"></i></a>&nbsp;&nbsp;&nbsp;
                            <span>|</span>
                            <a href="<?php echo base_url() . 'start-class/' . $v_my_class->course_id ?>"><i class="fa  fa-play-circle-o" title="Launch Class"></i></a>&nbsp;&nbsp;&nbsp;
                        <?php } else { ?>
                            <a href="edit_schedule_class.html"><i class="fa fa-edit" title="Edit"></i></a>&nbsp;&nbsp;&nbsp;
                            <span>|</span>
                            <a href="delete_schedule_class.html"><i class="fa fa-trash-o" title="Delete"></i></a>&nbsp;&nbsp;&nbsp;
                            <span>|</span>
                            <a href="delete_schedule_class.html"><i class="fa  fa-user-times" title="Cancel Class"></i></a>&nbsp;&nbsp;&nbsp;
                            <span>|</span>
                            <a href="<?php echo base_url() . 'start-class/' . $v_my_class->course_id ?>"><i class="fa  fa-play-circle-o" title="Launch Class"></i></a>&nbsp;&nbsp;&nbsp;
                        <?php } ?>
                    </div>


                </div>
                <div class="col-sm-12"><br></div> 
            <?php } ?>



            <div class="col-sm-12"><br></div> 

            <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>