<?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>Mon Profil</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 success! </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">Profil</div>
                        <div class="panel-body add-client">
                            <form action="<?php echo site_url('Profile/update') ?>" method="post">

                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label>Nom d'utilisateur</label>
                                        <input type="text" class="form-control" 
										value="<?php echo $this->session->userdata("username") ?>" name="username" readonly>
                                    </div>
                                </div>
								<div class="col-sm-12">
                                    <div class="form-group">
                                        <label>Email</label>
                                        <input type="email" class="form-control" 
										value="<?php echo $this->session->userdata("email") ?>" name="email" required>
                                    </div>
                                </div>
								
								<div class="col-sm-12">
                                    <div class="form-group">
                                        <label>Prenom</label>
                                        <input type="text" class="form-control" 
										value="<?php echo $this->session->userdata("first_name") ?>" name="first_name" required>
                                    </div>
                                </div>
								
								<div class="col-sm-12">
                                    <div class="form-group">
                                        <label>Nom</label>
                                        <input type="text" class="form-control" 
										value="<?php echo $this->session->userdata("last_name") ?>" name="last_name" required>
                                    </div>
                                </div>

                                
                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <button type="submit"  class="mybtn btn-submit"><i class="fa fa-check"></i> VALIDER</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() {

    });

</script>
</body>

</html>
