<?php if($total_post_info ){
    foreach ($total_post_info as $value){
        if( $post_info[$value->post_id]){
            $serial++; ?>
        <div class="col-sm-12 gray text-center">
               <input type="hidden" name="group_id" id="group_id" value="<?php echo $grp_id->group_id;?>">
            <input type="hidden" name="url_id" id="url_id" value="<?php echo $url; ?>">

            <div class="col-sm-6" style="padding: 10px 0 0 0  "><?php 
            if($post_url[$value->post_id]){
            $post_url=  $post_url[$value->post_id]->post_comment_url_info;
            $url_array=  explode("URL:", $post_url);?>
              <a href="<?php echo $url_array[1];?>" target="_blank"><i class="fa fa-lemon-o" title="<?php echo $url_array[1];?>"></i></a>
            <?php } 
           $mess= $post_info[$value->post_id]->post_details; 
           echo substr($mess, 0,50)."...";
                 
            ?>
                <a href="<?php echo base_url().'view-post-group-viedo/'.$value->post_id;?>">view</a>
            </div>
            <div class="col-sm-2" style="padding: 10px 0 0 0  "><a href="#"><?php echo $person_info[$value->post_id]->person_first_name ." ". $person_info[$value->post_id]->person_last_name;?></a></div>
            <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                    <?php  echo date('h:i a' , strtotime( $post_info[$value->post_id]->post_date_time)).",";
                           echo date('d F'  , strtotime( $post_info[$value->post_id]->post_date_time));
                        ?>
            </div>
            
            
            <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                <?php 
                $person_id = $this->session->userdata('person_id');
                if($check_person_status->person_role==6 ||($check_person_status->person_role==5 && $person_id==$grp_id->group_created_by)){ ?>
                <a href="javascript:;" onclick="remove_alert('<?php echo $post_info[$value->post_id]->post_id ?>')"><i class="fa fa-user-times" title="Remove"></i></a>
                <?php } ?>
            </div>
        </div>
<?php } 

        }

        }?>
        <div class="col-sm-12"><br></div> 
<?php
                // echo $total_limit_value->total_type;
                $total_page = ceil($total_alert->total_alert / 10);
                if ($total_page > 1) {
                    ?>
                    <nav class="course-pagination">
                        <ul class="pagination">
                            <?php
                            if ($page > 2) {
                                ?>
                                <li>
                                    <a href="<?php echo base_url() . 'super-admin-group-alert/'.$url ?>" aria-label="Previous">
                                        <span aria-hidden="true" title="First Page">&laquo;&laquo;</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="<?php echo base_url() . 'super-admin-group-alert/'.$url.'/'. ($page - 1); ?>" aria-label="Previous">
                                        <span aria-hidden="true" title="Previous Page">&laquo;</span>
                                    </a>
                                </li>
                            <?php } elseif ($page > 1) { ?>
                                <li>
                                    <a href="<?php echo base_url() . 'super-admin-group-alert/'.$url.'/'. ($page - 1); ?>" aria-label="Previous">
                                        <span aria-hidden="true" title="Previous Page">&laquo;</span>
                                    </a>
                                </li>
                                <?php
                            }
                            for ($i = 0; $total_page > $i; $i++) {
                                echo '<li><a href="' . base_url() . 'super-admin-group-alert/'.$url.'/'. ($i + 1) . '">' . ($i + 1) . '</a></li>';
                            }
                            if ($total_page != $page) {
                                ?>
                                <li>
                                    <a href="<?php echo base_url() . 'super-admin-group-alert/'.$url.'/'. ($page + 1); ?>" aria-label="Next">
                                        <span aria-hidden="true" title="Next Page">&raquo;</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="<?php echo base_url() . 'super-admin-group-alert/'.$url.'/'. $total_page; ?>" aria-label="Next">
                                        <span aria-hidden="true" title="Last Page">&raquo;&raquo;</span>
                                    </a>
                                </li>
                            <?php } ?>
                        </ul>
                    </nav>
                <?php } ?>