  <?php
                if ($member_group_list) {
                    foreach ($member_group_list as $v_group_list) {
                        ?>
                        <div class="col-sm-12 gray text-center" >
                            <?php
                            foreach (($selected_group[$v_group_list->group_id]) as $v_selected_group) {
                                ?>

                                <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                                    <a href="<?php echo base_url() . 'group/' . $v_selected_group->url; ?>">
                                        <?php echo $v_selected_group->group_name; ?>
                                    </a>
                                </div>

                                <div class="col-sm-2" style="padding: 10px 0 0 0  "><?php echo $v_selected_group->group_type_name ?></div>

                                <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                                    <?php
                                    $group_permission = $v_selected_group->group_permission;
                                    if ($group_permission == 1) {
                                        echo 'Public';
                                    } else if ($group_permission == 2) {
                                        echo 'Talhatraining User';
                                    } else if ($group_permission == 3) {
                                        echo 'My Link';
                                    } else if ($group_permission == 4) {
                                        echo 'Only Group Member';
                                    }
                                    ?>
                                </div>

                                <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                                    <!--<a href="">-->
                                    <?php echo $total_member[$v_selected_group->group_id]->total; ?>
                                    <!--</a>-->
                                </div>

                                <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                                    <!--<a href="">-->
                                    <?php echo count($group_requested_members[$v_group_list->group_id]); ?>
                                    <!--</a>-->
                                </div>

                                <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                                    <?php
                                    $status = $v_group_list->group_member_status;
                                    if ($v_selected_group->group_created_by == $this->session->userdata('person_id')) {
                                        echo 'Group Author';
                                    } else {
                                        if ($status == 1) {
                                            ?>
                                            <a href="<?php echo base_url() . 'group/leave_group/' . $v_selected_group->group_public_id; ?>">
                                                <span class="btn btn-success" title="Leave Group"> <i class="fa fa-times"></i> </span>
                                            </a>
                                        <?php } else if ($status == 2) { ?>
                                            <a href="<?php echo base_url() . 'join-group/' . $v_selected_group->group_public_id; ?>">
                                                <span class="btn btn-success" title="Join Request"><i class="fa fa-plus"></i>  </span>
                                            </a>
                                        <?php } else if ($status == 3) { ?>
                                            <a href="<?php echo base_url() . 'group/cancel_group_request/' . $v_selected_group->group_public_id; ?>">
                                                <span class="btn btn-success"  title="Cancel Request"><i class="fa fa-remove"></i></span>
                                            </a>
                                        <?php } else if ($status == 4) { ?>
                                            <a href="<?php echo base_url() . 'join-group/' . $v_selected_group->group_public_id; ?>">
                                                <span class="btn btn-success" title="Join Request"><i class="fa fa-plus"></i>  </span>
                                            </a>
                                        <?php } else {
                                            ?>
                                            <a href="<?php echo base_url() . 'join-group/' . $v_selected_group->group_public_id; ?>">
                                                <span class="btn btn-success" title="Join Request"><i class="fa fa-plus"></i>  </span>
                                            </a>
                                            <?php
                                        }
                                    }
                                    ?>
                                </div>

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


                   

                    <?php
                    // echo $total_limit_value->total_type;
                    $totall_count = count($count_member_group_list);
                    $total_page = ceil($totall_count / 10);
                    if ($total_page > 1) {
                        ?>
                        <nav class="course-pagination">
                            <ul class="pagination">
                                <?php
                                if ($page > 2) {
                                    ?>
                                    <li>
                                        <a href="javascript:;" onclick="searchPaginationlearnerGroup('<?php echo base_url() . 'search-learner-group' ?>')" aria-label="Previous">
                                            <span aria-hidden="true" title="First Page">&laquo;&laquo;</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="javascript:;" onclick="searchPaginationlearnerGroup('<?php echo base_url() . 'search-learner-group' . '/' . ($page - 1);?>')" aria-label="Previous">
                                            <span aria-hidden="true" title="Previous Page">&laquo;</span>
                                        </a>
                                    </li>
                                <?php } elseif ($page > 1) { ?>
                                    <li>
                                        <a href="javascript:;" onclick="searchPaginationlearnerGroup('<?php echo base_url() . 'search-learner-group' . '/' . ($page - 1);?>')" aria-label="Previous">
                                            <span aria-hidden="true" title="Previous Page">&laquo;</span>
                                        </a>
                                    </li>
                                    <?php
                                }
                                for ($i = 0; $total_page > $i; $i++) { ?>
                                  <li><a href="javascript:;" onclick="searchPaginationlearnerGroup('<?php echo base_url() . 'search-learner-group/' . ($i + 1);?>')">  <?php echo ($i + 1);?> </a></li>
                               <?php }
                                if ($total_page != $page) {
                                    ?>
                                    <li>
                                        <a href="javascript:;" onclick="searchPaginationlearnerGroup('<?php echo base_url() . 'search-learner-group/' . ($page + 1); ?>')" aria-label="Next">
                                            <span aria-hidden="true" title="Next Page">&raquo;</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="<?php echo base_url() . 'search-learner-group/' . $total_page; ?>" aria-label="Next">
                                            <span aria-hidden="true" title="Last Page">&raquo;&raquo;</span>
                                        </a>
                                    </li>
                                <?php } ?>
                            </ul>
                        </nav>
                    <?php }
                } ?>