<?php $this->load->view('theme/include/header.php') ?>

<!--Start Main Content-->
<section>
    <div class="main-content">
        <div class="row">
            <div class="inner-contatier">
                <div class="col-sm-12 content-title"><h4>Gestion des taux</h4></div>
                <div class="col-sm-5">

                    <?php
                    $message = $this->session->userdata('success');
                    if($message){?>
                        <!-- Alert Box -->
                        <div class="alert my-alert alert-success">
                            <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                            <strong>Effectue avec succes! </strong><?php echo $message; ?>
                        </div>
                        <?php
                    }else{
                        $message = $this->session->userdata('error');
                        if($message){
                            ?>
                            <!-- Alert Box -->
                            <div class="alert my-alert alert-danger">
                                <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                                <strong>Alerte! </strong><?php echo $message; ?>
                            </div>
                            <?php
                        }
                    }
                    if(validation_errors()) {
                        ?>
                        <!-- Alert Box //validation error -->
                        <div class="alert my-alert alert-danger">
                            <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                            <?php echo validation_errors('<i class="fa fa-times"> ','</i></br>'); ?>
                        </div>
                    <?php } ?>

                    <!--Start Panel-->
                    <div class="panel panel-default">
                        <!-- Default panel contents -->
                        <div class="panel-heading">Tableaux des taux</div>
                        <div class="panel-body add-client">
                            <form action="<?php echo site_url('Fee/save') ?>" method="post">

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (1 - 25,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-1"); ?>" name="cost-1">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (25,001 - 50,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-2"); ?>" name="cost-2">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (50,001 - 75,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-3"); ?>" name="cost-3">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (75,001 - 100,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-4"); ?>" name="cost-4">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (100,001 - 125,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-5"); ?>" name="cost-5">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (125,001 - 150,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-6"); ?>" name="cost-6">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (150,001 - 200,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-7"); ?>" name="cost-7">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (200,001 - 250,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-8"); ?>" name="cost-8">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (250,001 - 300,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-9"); ?>" name="cost-9">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (300,001 - 400,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-10"); ?>" name="cost-10">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (400,001 - 500,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-11"); ?>" name="cost-11">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (500,001 - 600,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-12"); ?>" name="cost-12">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (600,001 - 700,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-13"); ?>" name="cost-13">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (700,001 - 800,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-14"); ?>" name="cost-14">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (800,001 - 900,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-15"); ?>" name="cost-15">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (900,001 - 1,000,000)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-16"); ?>" name="cost-16">
                                    </div>
                                </div>

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>From (1,000,001)</label>
                                        <input type="text" class="form-control" value="<?php echo get_fee("cost-17"); ?>" name="cost-17">
                                    </div>
                                </div>


                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <button type="submit"  class="mybtn btn-submit"><i class="fa fa-check"></i> Save</button>
                                    </div></div>

                            </form>
                        </div>
                        <!--End Panel Body-->
                    </div>
                    <!--End Panel-->
                </div>



            </div><!--End Inner container--->
        </div><!--End Row-->
    </div><!--End Main-content DIV-->
</section><!--End Main-content Section-->

<?php $this->load->view('theme/include/footer'); ?>

<script type="text/javascript">
    $(document).ready(function() {
        //amount
        $('.form-control').keypress(function(event) {
            if ((event.which != 46 || $(this).val().indexOf('.') != -1) &&
                (event.which < 48 || event.which > 57)) { event.preventDefault();
            }
        });

        $('.form-control').keyup(function(e){
            if(e.keyCode == 8) {
               if($(this).val()==""){
                   $(this).val("0");
               }
            }
            });
    });

</script>
</body>

</html>
