<div class="col-sm-8">
    <div class="row ">
        <div class="col-sm-12 " style="padding: 0">
            <div class="col-sm-12" >
                <h3 class="pull-right">&nbsp;
<!--                    <a href=""> <span style="font-size: 18px;padding: 10px"><i class="fa fa-envelope" title=" Send Message"></i></span></a>
                    <a href=""> <span style="font-size: 18px;padding: 10px"><i class="fa  fa-mail-reply" title="Reply Message"></i></span></a>-->
                     <a href="javascript:;" onclick="dustbin();"> <span style="font-size: 18px;padding: 10px"><i class="fa fa-trash-o" title="Delete "></i></span></a>
                </h3>
            </div>
            <div class="col-sm-12" >
                <div class="col-sm-12 gray_ttc text-left" style="border-bottom: 2px solid #8CC73F;font-weight: bold">
                    <div class="col-sm-2" style="padding:10px 0">
                        <div class="checkbox checkbox-success">
                            <input id="checkbox1" name="checkbox1"class="styled padding-zero" type="checkbox" ><label for="checkbox1" > <strong>Receiver</strong></label>

                        </div>
                    </div>
                    <div class="col-sm-5" style="padding:26px">Message</div>                    
                    <div class="col-sm-2"  style="padding:26px">Type</div>
                    <div class="col-sm-3" style="padding:26px">Date & Time</div>
                </div>
                <div class="col-sm-12"><br></div> 
<?php foreach($sent_invitation_email as $value){ ?>
                <div class="col-sm-12 gray_ttc text-left" >

                    <div class="col-sm-2" style="padding:10px 0">
                        <div class="checkbox checkbox-success">
                            <input class="checkbox2" name="checkbox2[]" class="styled" type="checkbox" value="<?php echo $value->invitation_message_id ?>" ><label for="checkbox2" >
                                <a href="#">Me(<?php 
                                $email=$value->invitation_receiver_email;
                                $email_array=  explode(",", $email);
                                if ( $email_array[count( $email_array) - 1] == '') {
                                         array_pop( $email_array);
                                        }
                                        echo count($email_array);
                                
                                ?>)</a></label>

                        </div>

                    </div>
                    <div class="col-sm-5" style="padding:23px 0">
                        <p class="text-left col-sm-12 padding-zero">
                        <?php echo $value->invitation_message_subject; ?> <a href="<?php echo base_url()?>view-invitation-sent-message/<?php $invitation_message_id= $this->encrypt->encode($value->invitation_message_id);echo str_replace("/","%F2", $invitation_message_id); ?>">View</a>
                      
                        </p>
                        
                    </div>
                    <div class="col-sm-2" style="padding:23px 0">
                        <p class="text-center col-sm-12  padding-zero">
                            <a href="#">
                                <?php if($value->invitation_message_type ==2){
                                    echo "Group";
                                }
                                else if($value->invitation_message_type ==1){
                                    echo "Person";
                                }?>
                            </a>
                        </p>
                    </div>

                    <div class="col-sm-3 text-center" style="padding:23px 0">
                        <p>
                            
                         <?php                                                        
                         $today_day= date("d m");
                          $message_day=date("d m",strtotime($value->invitation_message_datetime));
                          $today_year=date("y");
                          //echo $today_year;
                          $message_year=date("y",strtotime($value->invitation_message_datetime));
                          //echo $message_year;
                          if($message_year==$today_year){
                          if($today_day>$message_day)
                         {
                        echo date('h:i a' , strtotime($value->invitation_message_datetime)).",";
                        echo date('d F'  , strtotime($value->invitation_message_datetime));
                             
                         }
                        else {
                        echo date('h:i a' , strtotime($value->invitation_message_datetime))."<br>";
                        
                        }
                          }
                          else 
                          {
                        echo date('h:i a' , strtotime($value->invitation_message_datetime)).",";
                        echo date('d F y'  , strtotime($value->invitation_message_datetime));
                          }
                        ?> 
                        </p>
                    </div>
                </div>
               <?php } ?>
                <div class="col-sm-12"><br></div> 
            </div>
        </div><!-- /.row gray -->
    </div>
</div>