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

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

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

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

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

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


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

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

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


                    <div class="col-sm-1 padding-zero">Image</div>
                    <div class="col-sm-1 padding-zero">Name</div>
                    <div class="col-sm-3 padding-zero">Email</div>
                    <div class="col-sm-2 padding-zero">Mobile</div>
                    <div class="col-sm-2 padding-zero">Course</div>
                    <div class="col-sm-2 padding-zero">Category</div>

                    <div class="col-sm-1 padding-zero">Action</div>
                </div>
                <div class="col-sm-12"><br></div> 
                <?php if($all_wishlist){ 
                    foreach($all_wishlist as $val){?>
                <div class="col-sm-12 gray_ttc " style="padding:10px 0 10px 0; ">


                    <div class="col-sm-1 padding-zero">
                        <img src="<?php echo base_url() ?>images/logo-50.png" style="width: 30px">
                    </div>
                    <div class="col-sm-1 padding-zero"><a href="<?php echo base_url() ?>super_admin_group/profile"><?php echo $person_info[$val->wish_list_management_id]->person_first_name." ".$person_info[$val->wish_list_management_id]->person_last_name;?></a></div>
                    <div class="col-sm-3 padding-zero"><?php echo $person_info[$val->wish_list_management_id]->person_email;?></div>
                    <div class="col-sm-2 padding-zero"><?php echo $person_info[$val->wish_list_management_id]->person_contact_number;?></div>
                    <div class="col-sm-2 padding-zero"><?php echo $course_info[$val->wish_list_management_id]->course_name;?></div>
                    <div class="col-sm-2 padding-zero">
                  <?php 
                  if($course_info[$val->wish_list_management_id]){
                  if($course_created_person_info[$val->wish_list_management_id]->person_role==3){
                     if( $resource_person_role[$val->wish_list_management_id]->resource_person_type==1) {
                         echo "Talha training";
                     }
                     else if( $resource_person_role[$val->wish_list_management_id]->resource_person_type==2) {
                         echo "Individual Teacher";
                     }
                     else if( $resource_person_role[$val->wish_list_management_id]->resource_person_type==3) {
                         echo "Organization";
                     }
                  }
                  
                  else{
                  if( $course_created_person_info[$val->wish_list_management_id]->person_role==6 || $course_created_person_info[$val->wish_list_management_id]->person_role==1)
                    {
                        echo "Talha Training";
                    } else if($course_created_person_info[$val->wish_list_management_id]->person_role==4){
                       echo "Organization"; 
                  }
                  
                    }
                  }
                    ?></div>

                    <div class="col-sm-1 padding-zero" >
                        
                        <a href="javascript:;" onclick=""><i class="fa fa-user-plus" title="Acitve"></i></a>
                        
                        
                        <a href="javascript:;"onclick=""><i class="fa fa-archive" title="Archive"></i></a>
                        
                        <a href="javascript:;"onclick="RemoveWishlist('<?php echo $val->wish_list_management_id;?>')"><i class="fa fa-trash-o" title="Delete"></i></a>
                        
                        <!--<a href="<?php //echo base_url() ?>super_admin/user_video_wish_list_details"><i class="fa fa-th" title="Details"></i></a>-->

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



    </div>

    <br>
    <br>
    <div class="col-sm-12 ">
        <div class="col-sm-12 gray text-left">
            <label><a href="<?php echo base_url() ?>super_admin">Dashboard </a>->>Manage Course Wish List</label>
        </div>   
    </div>   

</div>
<script>
    function AjaxInitialization(xmlhttp3){
       var xmlhttp3 = false;
        try {
            xmlhttp3 = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {

            try {
                xmlhttp3 = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (E) {
                xmlhttp3 = false;
            }
        }
        if (!xmlhttp3 && typeof XMLHttpRequest != 'undefined') {
            xmlhttp3 = new XMLHttpRequest();
        }
        return xmlhttp3;
}
function RemoveWishlist(WishListid){
        var xmlhttp3;
           xmlhttp3=AjaxInitialization(xmlhttp3);
            var url = '<?php echo base_url()?>'+'delete-to-wish-list';
            var formdata = new FormData();
            formdata.append("wish_list_management_id", WishListid);
          

            xmlhttp3.addEventListener("load", function () {
                
                 
            }, false);

            xmlhttp3.addEventListener("error", function () {
                alert("not email id sent");
            }, false);
            xmlhttp3.addEventListener("abort", function () {
                alert("Aborted");
            }, false);

            xmlhttp3.open("POST", url);
            xmlhttp3.send(formdata);
}
</script>