<?php
if (!empty($student_info)) {
    foreach ($student_info as $value) {
        ?>
        <div class="col-sm-12 gray_ttc " style="padding-top: 10px;padding-bottom: 10px;">
            <div class="col-sm-2">
                <?php echo "<strong>$value->student_roll_number</strong>" ?>
            </div>

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

            <div class="col-sm-3 padding-zero">
                <?php
                echo date("F j, Y, g:i a", strtotime($value->register_date_time));
                ?>
            </div>

            <div class="col-sm-3 padding-zero"><strong>
                    <?php
                    if (!empty($payment_info[$value->student_id])) {
                        echo $this->tt_message->set_payment_status($payment_info[$value->student_id]->payment_status)
                                ->get_payment_status_message();
                    } else {
                        echo 'FREE';
                    }
                    ?></strong>
            </div>

            <div class="col-sm-1 padding-zero" >
                <?php
                if (!empty($payment_info[$value->student_id])) {
                    ?>
                    <input type="hidden" id="paymentID<?php echo $value->student_roll_number; ?>" value="<?php echo $encrypt_payment_id[$value->student_id]; ?>">
                    <input type="hidden" id="status<?php echo $value->student_roll_number; ?>" value="">
                    <a href="javascript:void(0)" id="viewAllInvoices<?php echo $value->student_roll_number; ?>"><i class="fa fa-money" title="All Payment"></i></a>
                    <span>&nbsp;</span>
                    <?php
                }
                ?>
                <a href="<?php echo base_url("admin/assign-course/" . $person_info[$value->student_id]->url); ?>"><i class="glyphicon glyphicon-paste" title="Assign Course"></i></a>
                <span>&nbsp;</span>
                <a href="<?php echo base_url('admin/student-accounts-details/' . $person_info[$value->student_id]->url) ?>"><i class="fa  fa-th" title="View Details"></i></a>
                <span>&nbsp;</span>
            </div>
            <div class="col-sm-12 col-sm-offset-4" style="margin-top: 20px; display: none;" id="loadingImage<?php echo $value->student_roll_number; ?>">
                <img src="<?php echo base_url('image\invoice.gif'); ?>">
            </div>
            <div class="col-sm-12" style="margin-top: 20px; display: none;" id="displayAllInvoice<?php echo $value->student_roll_number; ?>">
            </div>
        </div>
    <?php } ?>

    <?php
    echo $paginzation_link;
} else {
    echo 'There is no available student';
}