<input type="hidden" id="baseUrl" value="<?php echo base_url(); ?>">
<div class="col-sm-10">
    <div class="row ">
        <div class="col-sm-12 ">
            <span class="col-sm-6 text-left">

            </span>
        </div>
        <div class="col-sm-12">
            <hr><br>
        </div>
        <div class="col-sm-12">
            <br>
        </div>
        <div class="col-sm-12">
            <div class="col-sm-12  text-left  "style="margin-bottom: 5px;font-weight: bold;border-bottom: 2px solid limegreen">
                <div class="col-sm-4">Course Title</div>
                <div class="col-sm-2">Type</div>
                <div class="col-sm-2">Price</div>
                <div class="col-sm-2 text-center">Student</div>
                <div class="col-sm-2 text-center">Earning</div>
            </div>

            <?php
            if (!empty($course_id)) {
                foreach ($earning_info as $value) {
                    ?>
            <input type="hidden" id="status<?php echo $url[$value->payment_type_id]->url ?>" value="">
                    <div class="col-sm-12 text-left " style="padding: 10px;background-color:#F2F9EA;border: 1px solid #ededed">
                        <div class="col-sm-4"><a href="<?php echo base_url() . $url[$value->payment_type_id]->url ?>"><?php echo $course_data[$value->payment_type_id]->course_name ?></a></div>
                        <div class="col-sm-2"><?php
                            if ($value->payment_type == 1) {
                                echo 'Course';
                            } else {
                                echo 'Video Course';
                            }
                            ?></div>
                        <div class="col-sm-2"><?php
                            echo $course_price[$value->payment_type_id] . $currency_sign[$value->payment_type_id];
                            ?></div>
                        <div class="col-sm-2 text-center"><a href="<?php echo base_url('admin/account/view-student-invoice/' . $url[$value->payment_type_id]->url); ?>"><?php echo $total_student[$value->payment_type_id] ?></a></div>
                        <div class="col-sm-2 text-center">
                            <a href="<?php echo base_url('admin/account/view-course-earning/' . $url[$value->payment_type_id]->url); ?>">
                                <i class="fa fa-money" title="Invoice"></i>
                            </a>
                            <span>&nbsp;</span>
                            <a href="javascript:void(0)" id="paymentRequestDetail<?php echo $url[$value->payment_type_id]->url?>">
                                <i class="fa fa-dollar" title="Payment Request Detail"></i>
                            </a>
                        </div>
                    </div>
                    <div id="loadingImage<?php echo $url[$value->payment_type_id]->url?>" class="col-sm-12 col-sm-offset-4" style="margin-top: 20px; display: none;">
                        <img src="<?php echo base_url('image/loading.gif'); ?>">
                    </div>
            <div id="displayPaymentRequest<?php echo $url[$value->payment_type_id]->url ?>" class="col-sm-12 form-group"></div>
                    <?php
                }
            } else {
                echo 'There is no invoice under this user!';
            }
            ?>
        </div>
    </div>
</div>
<script src="<?php echo base_url(); ?>back_end_resource/payment/payment_request.js" type="text/javascript"></script>