<script type="text/javascript">
    function reply_message(to_user_id,message_subject){
        var mlink=mainUrl+"user/create_message/"+to_user_id+"/"+message_subject;
        $.colorbox(
                {
            width:"400px", 
    height:"350px", 
    iframe:true, 
    href:mlink, 
    overlayClose: false
    }
            );
        return false;
    }
</script>
<div class="row">
    <div class="tab_container">
<!--                <div class="row">
                <div class="col-sm-8 col-md-8 col-lg-8">
                <ul id="myTab" class="nav nav-tabs nav-justified">
                    <li class="jShowProfile active"  alias="{PageContext::$response->alias}" uid="{PageContext::$response->sess_user_id}"><a href="#myprofile" data-toggle="tab">Personal</a>
                    </li>                   
                    <li class="jShowFriends jShowFriends_tab" alias="{PageContext::$response->alias}" uid="{PageContext::$response->sess_user_id}"><a href="#tab-Friends" data-toggle="tab">Business</a>
                    </li>
                </ul>
                </div>
				
                </div>-->
            </div>
    <div id="msg"></div>
     <?php 
     if (PageContext::$response->alias == PageContext::$response->sess_user_alias){ ?>
    <div class="col-sm-12 col-md-12 col-lg-12">
        
    <div class="mediapost marg0top" id="jDisplayInviteMain">
       <div class="mediapost_head"> 
       <h4 class="media-heading">Invite Friends</h4>
       </div>
        <div class="col-md-8">
        <input type="button" id="jInviteFriends" title="invite-block" class="invite_btn" value="Invite" name="invite">
<!--        <div class="" id="msgDisplay1"></div>-->
      
<!--        <div id="jDisplayInviteGrp" style="display:none">
        <?php // echo PageContext::renderRegisteredPostActions('importcontacts');?>
        <div class="low-mrg-top">
        <input type="button" id="jdisplayEmailOption" title="invite-block" name="cs_import" class="invite_btn" value="Enter mail ids to invite" name="invite">
        </div>
        </div>-->
        </div>
        <div class="clearfix"></div>
    </div>
    <div id="jDisplayInviteGrp" class="mediapost marg0top" style="display: none;">
       <div class="mediapost_head"> 
       <h4 class="media-heading">Invite Friends <span class="inv_back pull-right"><a href="#" id="jBackToMainInvite"><i class="fa fa-angle-left" aria-hidden="true"></i>
Back</a></span></h4>
       </div>
          
        <div class="col-md-8">

            <div class="low-mrg-top">
                <input type="button" value="Enter mail ids to invite" class="invite_btn" name="cs_import" title="invite-block" id="jdisplayEmailOption">
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <div id="jDisplayInviteMail" class="mediapost marg0top" style="display: none;">
         <!--<div class="" id="msgDisplay1"></div>-->
       <div class="mediapost_head"> 
       <h4 class="media-heading">Invite Friends <span class="pull-right"><a href="#" id="jBackToSubInvite"><i class="fa fa-angle-left" aria-hidden="true"></i>
Back</a></span></h4>
       </div>
        <div class="col-md-8">
             <div class="" id="msgDisplay1"></div>
            <div id="jDivEmail">
                <textarea name="txtmailids" id="txtmailids" placeholder="Enter email id's" style="height:80px;"></textarea>
                <div class="clear"></div>
                <input type="button" value="Send" id="jEmailFriendRequest" uid="1" class="invite_btn marg10col">
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    </div>
    <?php } ?>
    <div class="clearfix"></div>
    <div>
                        <input type="hidden" class=" " value="{PageContext::$response->invitation_type}" id="contact_type" name="contact_type">
                    </div>
                    <div>
                        <input type="hidden" class=" " value="{PageContext::$response->invitation_typeid}" id="contact_typeid" name="contact_typeid">
                    </div>
    <?php if (count(PageContext::$response->friends) > 0) { ?>
      <br>
      <?php if (PageContext::$response->alias == PageContext::$response->sess_user_alias){ ?>

      <?php } ?>
      <div class="clearfix"></div>
        <?php foreach (PageContext::$response->friends As $friends) { ?>
            <div class="col-sm-6 col-md-6 col-lg-6">
                <div class="mediapost display_table wid100per">
                    <div class="picpost_left display_table_cell wid30per">
                        <span class="picpost_left_pic">
                            <img src="<?php
                                if ($friends->file_path != '') {
                                    echo PageContext::$response->userImagePath . $friends->file_path;
                                } else {
                                    echo PageContext::$response->userImagePath . 'medium/member_noimg.jpg';
                                }
                                    ?>">
                        </span>
                    </div>
                    <div class="media-body frndslist_media display_table_cell wid70per vert_align_middle">
                        <a href="<?php echo PageContext::$response->baseUrl; ?><?php echo $friends->user_alias ?>"><h4 class="media-heading " id="<?php echo $friends->user_id;?>"><?php echo $friends->user_firstname . ' ' . $friends->user_lastname; ?></h4></a>
                        <p><?php echo $friends->user_friends_count; ?> Friends</p>
                        <?php if (PageContext::$response->alias == PageContext::$response->sess_user_alias && PageContext::$response->sess_user_alias != '') { ?>
                        <p><span class="accept">
                                <a name="reply_message" class="replymessage" id="<?php echo $message->message_id; ?>" onclick="return reply_message(<?php echo $friends->user_id; ?>,'')" title="Send Message"  src="#">Send Message
                                </a></span>
                            
                                <span class="reject"> x<a class=" jUnfriend" uid="<?php echo $friends->user_id ?>" href="#" id="jUnfriend_<?php echo $friends->user_id ?>"> Unfriend</a></span>
                            <div class="clearfix"></div>
                        </p>
                         <?php }
                            ?>
                        
                        <?php if (PageContext::$response->alias == PageContext::$response->sess_user_alias){ ?>
<!--                           <p>
                            <div class="dropdown">
                              <button class="btn btn-default dropdown-toggle" type="button" id="<?php echo $friends->user_id;?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                <span class="tik_icon"></span>
                                Friends
                                <span class="caret"></span>
                              </button>
                              <ul class="dropdown-menu" aria-labelledby="<?php echo $friends->user_id;?>">
                                <li><a class="jChangetopersonal jChangetopersonal_<?php echo $friends->user_id;?>" id="<?php echo $friends->user_id;?>"><?php if($friends->friends_list_view_status == 'P'){ echo "<span class='tik_icon'></span> "; }?>Personal</a></li>
                                <li><a class="jChangetoBusiness jChangetoBusiness_<?php echo $friends->user_id;?>" id="<?php echo $friends->user_id;?>"><?php if($friends->friends_list_view_status == 'B'){ echo "<span class='tik_icon'></span> "; }?>Business</a></li>
                               
                              </ul>
                            </div>
                            </p>-->
                         <?php } ?>
                         
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <?php
        }
        ?>
        <?php
    } else {
        ?>
        <div class="frndslisting_blk_content">
            <span class="margin_l_20">No friends added yet</span>
        </div>
        <?php
    }
    ?>
</div>
<div class="clear"></div>