<?php
//$this->load->library('ForeignExchange');
//$fx = new ForeignExchange('BDT', 'USD');
$person_id = $this->session->userdata('person_id');
$person_role = $this->session->userdata('person_role');
$role_name = $this->session->userdata('role_name');
?>

<?php
$id = $feature_id = $feature_info->feature_price_id;
?>

<?php if ($feature_info->virtual_classroom_number) { ?>

    <div class="col-sm-2"><?php echo $feature_info->virtual_classroom_number; ?></div>
    <div class="col-sm-2" ><?php echo $feature_info->virtual_classroom_per_day; ?></div>
    <div class="col-sm-1" ><?php echo $feature_info->virtual_classroom_attendees_number; ?></div>
    <div class="col-sm-2" ><?php
        if ($feature_info->virtual_classroom_type == 1) {
            echo 'Live Broadcasting';
        } else {
            echo 'Live Broadcasting and Recording';
        }
        ?> 
    </div>
    <div class="col-sm-1" ><?php echo $feature_info->feature_price_storage; ?></div>
    <div class="col-sm-2" ><?php echo $feature_info->virtual_classroom_price; ?></div>

    <div class="col-sm-2" >
        <?php
        $encrypt_feature_price_id = $this->encrypt->encode($feature_info->feature_price_id);
        $feature_id = str_replace("/", "%F2", $encrypt_feature_price_id);
        ?>
        <a href="<?php echo base_url() . 'super_admin_virtual_classroom/edit-virtual-classroom-feature-set-id/' . $feature_id; ?>" > 
            <i class="fa fa-edit" title="Edit"></i>
        </a>

        <?php
        $status = $feature_info->feature_price_status;
        $id = $feature_info->feature_price_id;
        switch ($status) {
            case 0: // inactive
                ?>
                <a href="javascript:;" onclick="return checkForAction('<?php echo base_url() . 'make-feature-active/' . $id; ?>', 'Active', '<?php echo 'actions_for' . $id; ?>')">
                    <i class="fa  fa-user-plus" title="Active"></i>
                </a>&nbsp;&nbsp;

                <?php if (!$feature_holding_user) { ?>
                    <a href="javascript:;" 
                       onclick="return checkForAction('<?php echo base_url() . 'make-feature-delete/' . $id; ?>', 'Delete', '<?php echo 'actions_for' . $id; ?>')"> 
                        <i class="fa fa-trash" title="Delete"></i>
                    </a>&nbsp;&nbsp;
                <?php } ?>

                <?php
                break;
            case 1: // active
                ?>
                <?php if ($value->feature_price_talhatraining == 1 || !$feature_holding_user[$id]) { ?>
                    <a href="javascript:;" onclick="return checkForAction('<?php echo base_url() . 'make-feature-inactive/' . $id; ?>', 'Inactive', '<?php echo 'actions_for' . $id; ?>')">
                        <i class="fa  fa-user-times" title="Inactive"></i>
                    </a>&nbsp;&nbsp;
                <?php } ?>

                <?php if (!$feature_holding_user) { ?>
                    <a href="javascript:;" 
                       onclick="return checkForAction('<?php echo base_url() . 'make-feature-delete/' . $id; ?>', 'Delete', '<?php echo 'actions_for' . $id; ?>')"> 
                        <i class="fa fa-trash" title="Delete"></i>
                    </a>&nbsp;&nbsp;
                <?php } ?>

                <?php
                break;
            case 2:
                ?>

                <a href="javascript:;" 
                   onclick="return checkForAction('<?php echo base_url() . 'make-feature-active/' . $id; ?>', 'Active', '<?php echo 'actions_for' . $id; ?>')">
                    <i class="fa  fa-user-plus" title="Active"></i>
                </a>&nbsp;&nbsp;

                <?php if (!$feature_holding_user) { ?>
                    <a href="javascript:;" 
                       onclick="return checkForAction('<?php echo base_url() . 'make-feature-delete/' . $id; ?>', 'Delete', '<?php echo 'actions_for' . $id; ?>')"> 
                        <i class="fa fa-trash" title="Delete"></i>
                    </a>&nbsp;&nbsp;  
                <?php } ?>

                <?php
                break;
            case 3:
                ?>
                <a href="javascript:;" 
                   onclick="return checkForAction('<?php echo base_url() . 'make-feature-delete/' . $id; ?>', 'Delete', '<?php echo 'actions_for' . $id; ?>')"> 
                    <i class="fa fa-trash" title="Delete"></i>
                </a>&nbsp;&nbsp;
                <?php
                break;
            default:
                break;
        }
        ?>
    </div>

<?php } else if ($feature_info->online_exam_feature_number) { ?>
    <div class="col-sm-4 text-center">
        <?php echo $feature_info->online_exam_feature_number; ?>
    </div>
    <div class="col-sm-6">
        <?php
        //$fx = new ForeignExchange('BDT', 'USD');
        $currency_type = $feature_info->feature_price_currency;
        $price = $feature_info->online_exam_feature_price;
        //$USD_price = fmtMoney($fx->toForeign($price));
        //$USD_price = $this->tt_currency->set($price, 'BDT', 'USD')->convert_currency()->get();
        $BDT_price = $price;
        //echo 'BDT ' . $BDT_price . ' USD' . $USD_price;
        echo 'BDT ' . $BDT_price;
        ?>
    </div>

    <div class="col-sm-2" >

        <a href="<?php echo base_url() . 'super_admin_virtual_classroom/edit-online-exam-feature/' . $feature_info->feature_price_id; ?>" > 
            <i class="fa fa-edit" title="Edit"></i> 
        </a>

        <?php
        $status = $feature_info->feature_price_status;
        $id = $feature_info->feature_price_id;
        if ($status == 0) {
            ?>
            <a href="javascript:;" onclick="return checkForAction('<?php echo base_url() . 'make-feature-active/' . $id; ?>', 'Active', '<?php echo 'online_actions_for' . $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-feature-inactive/' . $id; ?>', 'Inactive', '<?php echo 'online_actions_for' . $id; ?>')">
                <i class="fa  fa-user-times" title="Inactive"></i>
            </a>&nbsp;&nbsp;
        <?php } else if ($status == 2) { ?>
            <a href="javascript:;" 
               onclick="return checkForAction('<?php echo base_url() . 'make-feature-active/' . $id; ?>', 'Active', '<?php echo 'online_actions_for' . $id; ?>')">
                <i class="fa  fa-user-plus" title="Active"></i>
            </a>&nbsp;&nbsp;
        <?php } ?>

        <?php if ($status != 2) { ?>
            <a href="javascript:;" 
               onclick="return checkForAction('<?php echo base_url() . 'make-feature-archive/' . $id; ?>', 'Archive', '<?php echo 'online_actions_for' . $id; ?>')"> 
                <i class="fa fa-archive" title="Archive"></i>
            </a>&nbsp;&nbsp;
            <a href="javascript:;" 
               onclick="return checkForAction('<?php echo base_url() . 'make-feature-delete/' . $id; ?>', 'Delete', '<?php echo 'online_actions_for' . $id; ?>')"> 
                <i class="fa fa-trash" title="Delete"></i>
            </a>&nbsp;&nbsp;
        <?php } ?>

        <?php if ($status == 2) { ?>
            <a href="javascript:;" 
               onclick="return checkForAction('<?php echo base_url() . 'make-feature-delete/' . $id; ?>', 'Delete', '<?php echo 'online_actions_for' . $id; ?>')"> 
                <i class="fa fa-trash" title="Delete"></i>
            </a>&nbsp;&nbsp;
        <?php } ?>

    </div>

<?php } else if ($feature_info->explore_expert_resume_per_day) { ?>

    <div class="col-sm-4"><?php echo $feature_info->explore_expert_resume_per_day; ?></div>

    <div class="col-sm-4">
        <?php
        //$fx = new ForeignExchange('BDT', 'USD');
        $currency_type = $feature_info->feature_price_currency;
        $price = $feature_info->explore_expert_resume_price;
        //$USD_price = fmtMoney($fx->toForeign($price));
        //$USD_price = $this->tt_currency->set($price, 'BDT', 'USD')->convert_currency()->get();
        $BDT_price = $price;
        //echo 'BDT ' . $BDT_price . ' USD' . $USD_price;
        echo 'BDT ' . $BDT_price;
        ?>
    </div>

                            <!--<div class="col-sm-3"><?php // echo $feature_info->feature_price_storage;       ?></div>-->

    <div class="col-sm-4 text-center">

        <a href="<?php echo base_url() . 'super_admin_virtual_classroom/edit-explore-expert-resume-feature/' . $feature_info->feature_price_id; ?>" > 
            <i class="fa fa-edit" title="Edit"></i>
        </a>

        <?php
        $status = $feature_info->feature_price_status;
        $id = $feature_info->feature_price_id;
        if ($status == 0) {
            ?>
            <a href="javascript:;" onclick="return checkForAction('<?php echo base_url() . 'make-feature-active/' . $id; ?>', 'Active', '<?php echo 'explore_actions_for' . $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-feature-inactive/' . $id; ?>', 'Inactive', '<?php echo 'explore_actions_for' . $id; ?>')">
                <i class="fa  fa-user-times" title="Inactive"></i>
            </a>&nbsp;&nbsp;
        <?php } else if ($status == 2) { ?>
            <a href="javascript:;" 
               onclick="return checkForAction('<?php echo base_url() . 'make-feature-active/' . $id; ?>', 'Active', '<?php echo 'explore_actions_for' . $id; ?>')">
                <i class="fa  fa-user-plus" title="Active"></i>
            </a>&nbsp;&nbsp;
        <?php } ?>

        <?php if ($status != 2) { ?>

            <a href="javascript:;" 
               onclick="return checkForAction('<?php echo base_url() . 'make-feature-archive/' . $id; ?>', 'Archive', '<?php echo 'explore_actions_for' . $id; ?>')">
                <i class="fa fa-archive" title="Archive"></i>
            </a>&nbsp;&nbsp;
            <a href="javascript:;" 
               onclick="return checkForAction('<?php echo base_url() . 'make-feature-delete/' . $id; ?>', 'Delete', '<?php echo 'explore_actions_for' . $id; ?>')">
                <i class="fa fa-trash" title="Delete"></i>
            </a>&nbsp;&nbsp;

        <?php } ?>

        <?php if ($status == 2) { ?>

            <a href="javascript:;" 
               onclick="return checkForAction('<?php echo base_url() . 'make-feature-delete/' . $id; ?>', 'Delete', '<?php echo 'explore_actions_for' . $id; ?>')"> 
                <i class="fa fa-trash" title="Delete"></i>
            </a>&nbsp;&nbsp;

        <?php } ?>

    </div>
<?php } ?>
