<div class="col-sm-10">
    <div class="row gray">
        <div class="col-sm-12">
            <ul class="nav nav-tabs">
                <li <?php
                if ($send_invitation_tab == 'anonymous') {
                    echo 'class="active"';
                }
                ?>><a data-toggle="tab" href="#send_invitation_anonymous">Anonymous</a></li>
                <li <?php
                if ($send_invitation_tab == 'user') {
                    echo 'class="active"';
                }
                ?>><a data-toggle="tab" href="#send_invitation_user">TT User</a></li>
            </ul>
            
            <div style="display: none" id="loading_image">
                <img src="<?php echo base_url() ?>image/course-loader.gif" 
                     height="60" width="60" style="margin: 20% 45%;">
            </div>
            <input type="hidden" id="view_video_course_invitation_url" value="<?php echo base_url('pagination-view-video-course-invitation'); ?>">
            <input type="hidden" id="view_video_course_url" value="<?php echo $video_course->url; ?>">
        
        </div>
        
        <div class="col-sm-12">
            <div class="tab-content">
                <!--------------------view all Draft Courses--------------->
                <div id="send_invitation_anonymous" class="tab-pane fade
                    <?php
                    if ($send_invitation_tab == 'anonymous') {
                        echo 'in active';
                    }
                    ?>
                    ">
                    <div class="col-sm-12 gray_ttc send_invitation_list_border">
                        <div class="col-sm-1">St</div>
                        <div class="col-sm-3">Invite By</div>
                        <div class="col-sm-2">Total Email</div>
                        <div class="col-sm-2">Sent</div>
                        <div class="col-sm-2">Time</div>
                        <div class="col-sm-2">Action</div>
                    </div>
                    <div class="col-sm-12"><br></div> 
                    <div id="view_send_video_course_anonymous_all_invitation">
                    <?php
                    if(isset($anonymous_invitation['invitation']) && !empty($anonymous_invitation['invitation'])){
                        foreach ($anonymous_invitation['invitation'] as $invitation){
                    ?>
                                <div class="col-sm-12 gray">
                                    <div class="col-sm-1">
                                        <span id="pending<?php echo $invitation->invitation_id; ?>" 
                                              style="display :<?php echo ($invitation->invitation_user_number > 0) ? 'block' : 'none'?>" 
                                              title="Pending"><i class="fa fa-clock-o green"></i></span>
                                        <span id="processing<?php echo $invitation->invitation_id; ?>" title="Processing" style="display: none"><i class="fa fa-spinner fa-spin green"></i></span>
                                        <span id="sent<?php echo $invitation->invitation_id;?>" 
                                              style="display : <?php echo ($invitation->invitation_user_number == 0) ? 'block' : 'none'?>" 
                                              title="Sent"><i class="fa fa-check-circle green"></i></span>
                                    </div>
                                    <div class="col-sm-3">TT-Admin</div>
                                    <div class="col-sm-2" id="invitation_user_number<?php echo $invitation->invitation_id; ?>"><?php echo $invitation->invitation_user_number; ?></div>
                                    <input type="hidden" id="total_invitation_user_number<?php echo $invitation->invitation_id; ?>" value="<?php echo $invitation->invitation_user_number; ?>">
                                    <div class="col-sm-2" id="sent_invitation_user_number<?php echo $invitation->invitation_id; ?>"><?php echo $anonymous_invitation['invitation_receive_person']['invitation_sent'][$invitation->invitation_id]; ?></div>
                                    <div class="col-sm-2"><?php echo $invitation->invitation_sent_date; ?></div>
                                    <div class="col-sm-2">
                                        <a href="<?php echo base_url().'send-video-course-invitation-user-list/'.$invitation->invitation_id; ?>">
                                            <i class="fa fa-users" title="Member List"></i>
                                        </a>&nbsp;
                                        <?php if($invitation->invitation_user_number != 0){ ?>
                                        <a href="javascript:void(0)" id="send_invitation<?php echo $invitation->invitation_id; ?>" onclick="sendInvitation('<?php echo base_url() . 'send-invitation'; ?>','<?php echo $invitation->invitation_id; ?>')">
                                            <i class="fa fa-paper-plane" title="Send"></i>
                                        </a>&nbsp;
                                        <?php } ?>
                                    </div>
                                </div>
                        <?php 
                        }
                        echo $anonymous_invitation['anonymous_view_video_course_invitation_pagination'];
                    }
                    else{ 
                    ?>
                        <center><p>You have no mail to send currently !!!</p></center> 
                    <?php 
                    } 
                    ?>
                    </div>
                    
                </div>
                
                <div id="send_invitation_user" class="tab-pane fade <?php
                if ($send_invitation_tab == 'user') {
                    echo 'in active';
                }
                ?>">
                    <div class="col-sm-12 gray_ttc send_invitation_list_border">
                        <div class="col-sm-1">St</div>
                        <div class="col-sm-3">Invite By</div>
                        <div class="col-sm-2">Total Email</div>
                        <div class="col-sm-2">Sent</div>
                        <div class="col-sm-2">Time</div>
                        <div class="col-sm-2">Action</div>
                    </div>
                    <div class="col-sm-12"><br></div> 
                    <div id="view_send_video_course_user_all_invitation">
                    <?php
                    if(isset($user_invitation['invitation']) && !empty($user_invitation['invitation'])){
                        foreach ($user_invitation['invitation'] as $invitation){
                        ?>
                                <div class="col-sm-12 gray">
                                    <div class="col-sm-1">
                                        <span id="pending<?php echo $invitation->invitation_id; ?>" 
                                              style="display :<?php echo ($invitation->invitation_user_number > 0) ? 'block' : 'none'?>" 
                                              title="Pending"><i class="fa fa-clock-o green"></i></span>
                                        <span id="processing<?php echo $invitation->invitation_id; ?>" title="Processing" style="display: none"><i class="fa fa-spinner fa-spin green"></i></span>
                                        <span id="sent<?php echo $invitation->invitation_id;?>" 
                                              style="display : <?php echo ($invitation->invitation_user_number == 0) ? 'block' : 'none'?>" 
                                              title="Sent"><i class="fa fa-check-circle green"></i></span>
                                    </div>
                                    <div class="col-sm-3"><?php 
                                        if ($invitation->invitation_send_type == 2){
                                            echo 'TT';
                                        }
                                        if ($invitation->invitation_send_type == 3){
                                            echo 'Individual';
                                        }
                                        if ($invitation->invitation_send_type == 4){
                                            echo 'Groups';
                                        }
                                    ?>
                                    </div>
                                    <div class="col-sm-2" id="invitation_user_number<?php echo $invitation->invitation_id; ?>"><?php echo $invitation->invitation_user_number; ?></div>
                                    <input type="hidden" id="total_invitation_user_number<?php echo $invitation->invitation_id; ?>" value="<?php echo $invitation->invitation_user_number; ?>">
                                    <div class="col-sm-2" id="sent_invitation_user_number<?php echo $invitation->invitation_id; ?>"><?php echo $user_invitation['invitation_receive_person']['invitation_sent'][$invitation->invitation_id]; ?></div>
                                    <div class="col-sm-2"><?php echo $invitation->invitation_sent_date; ?></div>
                                    <div class="col-sm-2">
                                        <a href="<?php echo base_url() . 'send-video-course-invitation-user-list/'.$invitation->invitation_id;?>">
                                            <i class="fa fa-users" title="Member List"></i>
                                        </a>&nbsp;
                                        <?php if($invitation->invitation_user_number != 0){ ?>
                                        <a href="javascript:void(0)" id="send_invitation" onclick="sendInvitation('<?php echo base_url() . 'send-invitation';?>', '<?php echo $invitation->invitation_id; ?>')">
                                            <i class="fa fa-paper-plane" title="Send"></i>
                                        </a>&nbsp;
                                    <?php } ?>
                                    </div>
                                </div>
                    <?php 
                        }
                        echo $user_invitation['user_view_video_course_invitation_pagination'];
                    }
                    else{ 
                    ?>
                        <center><p>You have no user mail to send currently !!!</p></center> 
                    <?php 
                    }
                    ?>
                    </div>
                
                </div>
            </div>
            <input type="hidden" id="video_course_url" value="<?php echo $video_course->url;?>">
        </div>
    </div>
</div>
<script src="<?php echo base_url();?>back_end_resource/send_video_course_invitation/send_video_course_invitation.js" type="text/javascript"></script>
<link href="<?php echo base_url();?>back_end_resource/send_video_course_invitation/send_video_course_invitation.css" rel="stylesheet" type="text/css"/>