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

    <div class="row gray">

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

            <div class="col-sm-6 col-sm-offset-3">
                <form action="#" method="post">
                    <div class="input-group">
                        <input type="text" class="form-control"  placeholder="Search here..." aria-describedby="basic-addon1">
                        <span class="input-group-addon" id="basic-addon1"><i class="fa fa-search"></i></span>
                    </div>
                </form>
            </div>
        </div>

    </div>

    <div class="row ">
        <div class="col-sm-12 ">

            <div class="col-sm-12">
                <div class="col-sm-12">
                    <h3 class="text-left">TTC Group Course Member</h3>
                </div>                
            </div>

            <div class="col-sm-12"><hr></div>
            <div class="col-sm-12" style="padding: 0">


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

                    <div class="col-sm-3" style="padding: 0">Name</div>
                    <div class="col-sm-3" style="padding: 0">Email</div>
                    <div class="col-sm-2" style="padding: 0">Mobile</div>
                    <div class="col-sm-2" style="padding: 0">Payment Status</div>
                    <div class="col-sm-2" style="padding: 0">Action</div>
                </div>
                <div class="col-sm-12"><br></div> 
                <?php if($student_id){
                    foreach($student_id as $val){
                    ?>
                <div class="col-sm-12 gray text-center" >

                    <div class="col-sm-3" style="padding: 10px 0 0 0  "><a href="#"><?php echo $student_info[$val->person_id]->person_first_name. " ".$student_info[$val->person_id]->person_last_name;?> </a></div>
                    <div class="col-sm-3" style="padding: 10px 0 0 0  "><?php echo $student_info[$val->person_id]->person_email;?></div>
                    <div class="col-sm-2" style="padding: 10px 0 0 0  "><?php echo $student_info[$val->person_id]->person_contact_number;?></div>
                    <div class="col-sm-2" style="padding: 10px 0 0 0  "><?php 
                    //echo $payment_status[$val->person_id]->payment_status;
                    $payment_status = array('', 'Paid', 'Partial paid', 'Unpaid', 'Drop', 'Cancel', 'Pending', 'Free');
                    echo $payment_status[$person_payment_status[$val->person_id]->payment_status];
                   
                    ?></div>
                    <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                      <?php ?>
                        <a href="javascript:;" onclick="deleteMemberCourse('<?php echo $course_id->course_id;?>','<?php echo $grp_id-> group_id;?>','<?php echo $student_info[$val->person_id]->person_id;?>','<?php echo $val->student_id;?>');"><i class="fa  fa-user-times" title="Remove"></i></a>
                    <?php ?>
                    </div>
                </div>
                    <?php } } ?>
              
                
            </div>
            <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>

    <div class="row gray">

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

            <div class="col-sm-12 text-left">
                <label><a href="<?php echo base_url() ?>super_admin">Dashboard </a>->><a href="<?php echo base_url() ?>super_admin_group/manage_group">Manage Group</a> ->> Group Member Details</label>
            </div>    

        </div>


    </div>

</div>
<script>
 function deleteMemberCourse(course_id,group_id,person_id,student_id){
  
swal({
                title: "", text: "Do you really want to delete the group??",
                showCancelButton: true,
                confirmButtonColor: '#DD6B55',
                confirmButtonText: 'Yes!',
                cancelButtonText: "No", closeOnConfirm: true,
                closeOnCancel: true
            },
            function (isConfirm) {
                if (isConfirm) {
                    
                    var xmlhttp4 = false;
        try {
            xmlhttp4 = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                xmlhttp4 = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (E) {
                xmlhttp4 = false;
            }
        }
        if (!xmlhttp4 && typeof XMLHttpRequest != 'undefined') {
            xmlhttp4 = new XMLHttpRequest();
        }
        
       
           
        var url='<?php echo base_url(); ?>' +'delete-group-course-memeber';
            
           
            var formdata = new FormData();
            formdata.append("course_id", course_id);
            formdata.append("group_id", group_id);
            formdata.append("person_id", person_id);
            formdata.append("student_id",student_id);
          
       
         
            
        
        
        xmlhttp4.addEventListener("load", function () {
            //alert(xmlhttp4.responseText);
           if( xmlhttp4.responseText==1){
               swal('you can not delete this group.');
              
           }
           else{
               window.location='<?php echo base_url(); ?>'+'super-admin-group-course-member-details/<?php echo $url;?>/<?php echo $grp_url;?>' ;
       
           }
           
                
           
            }, false);
            xmlhttp4.addEventListener("error", function () {
                alert("not upload");
            }, false);
            xmlhttp4.addEventListener("abort", function () {
                alert("Aborted");
            }, false);

            xmlhttp4.open("POST", url);
            xmlhttp4.send(formdata);

            return true;
                    
                    }
      });


    
}

</script>