<?php $person_id = $this->session->userdata('user_id'); ?>
<div class="col-sm-12 gray text-left">
    <div class="col-sm-2" style="width:100px;" > 
        <a href="#">
            <?php
            if ($person_info->person_image_thumb) {
                ?>
                <img class="img-responsive" style="margin: 0 auto; max-height: 60px; cursor: pointer;" 
                     src="<?php echo base_url() . 'content-library/' . $person_info->url . '/' . $person_info->person_image_thumb; ?>" 
                     alt="image">
                     <?php
                 } else {
                     ?>
                <img class="img-responsive" style="margin: 0 auto; max-height: 60px; cursor: pointer;" 
                     src="<?php echo base_url() ?>image/no_profile_picture.png" 
                     alt="image">
                 <?php } ?>
        </a>
    </div>

    <div class="col-sm-3" >
        <a href="<?php echo base_url() . $person_info->url . '/profile'; ?>" class="padding-zero" target="_blank">
            <?php echo $person_info->person_first_name . ' ' . $person_info->person_last_name; ?>
        </a>
    </div>
    <div class="col-sm-4" >
        <?php echo $person_info->person_email ?>
    </div>

    <div class="col-sm-1">Active</div>
    <div class="col-sm-2">

        <?php
        $encrypted_url = $this->encrypt->encode($person_info->url);
        $encrypted_url = str_replace("/", "%F2", $encrypted_url);
        if ($person_id != $person_info->person_id) {
            ?>

            <a href="<?php echo base_url() . 'edit-teacher/' . $encrypted_url; ?>" > 
                <i class="fa fa-edit"></i> 
            </a>

            <?php
            $person_id = $person_info->person_id;
            $status = $person_info->person_status;
            $url = $person_info->url;
            if ($status == 0) {
                ?>
                <a href="javascript:;" onclick="return checkForAction('<?php echo base_url() . 'make-account-active/' . $encrypted_url; ?>', 'Active', '<?php echo $person_id; ?>')">
                    <i class="fa  fa-user-plus" title="Active"></i>
                </a>&nbsp;&nbsp;
            <?php } else if ($status == 1) { ?>
                <a href="javascript:;" onclick="return checkForAction('<?php echo base_url() . 'make-account-inactive/' . $encrypted_url; ?>', 'Inactive', '<?php echo $person_id; ?>')">
                    <i class="fa  fa-user-times" title="Inactive"></i>
                </a>&nbsp;&nbsp;
            <?php } else if ($status == 4) { ?>
                <a href="javascript:;" onclick="return checkForAction('<?php echo base_url() . 'make-account-active/' . $encrypted_url; ?>', 'Active', '<?php echo $person_id; ?>')">
                    <i class="fa  fa-user-plus" title="Active"></i>
                </a>&nbsp;&nbsp;
            <?php } ?>

        <?php } else { ?>
            <a href="<?php echo base_url() . 'edit-teacher/' . $encrypted_url; ?>" > 
                <i class="fa fa-edit"></i> 
            </a>
        <?php } ?>
    </div>
</div>
<div class="col-sm-12">
    <br>
</div>