<html>
<meta charset="utf-8">
<title>Kudumbashree</title>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>

<head>
    <meta charset="UTF-8">
    
    <link href="<?php echo base_url(); ?>fa/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/style.css" />

    <script type="text/javascript" src="<?php echo base_url(); ?>js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>js/bootstrap.js"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>js/jquery.validate.js"></script>

    <script>
        $(document).ready(function() {
            // validate signup form
            $("#login_form").validate({
                rules: {
                    username: {
                        required: true
                    },
                    password: {
                        required: true,
                        minlength: 3,
                        maxlength: 50
                    },
                },
                messages: {

                    /*  username:"0-9, a-z, A-Z, -, _, @. are accepted with atleast one alphabet (min-3 to max-15).",
                      password:"a-z, A-Z, 0-9, - _ . @ ! $ are accepted with atleast one alphabet (min-3 to max-15).",*/
                    username: {
                        required: "username Required",
                    },
                    password: "Password Required.",
                }
            });
            //var tt=setInterval(function(){$("#no-log-error").html("")},5000);
        });
    </script>
</head>

<body id="logid">
    <div class="container">
        <div class="logindiv">
            <div class="forms text-center" >
            	<img src="<?php echo base_url(); ?>/images/kudumbashree-logo.png" alt="Logo" style="text-align:center; width: 100%;padding: 10px;">
                <!--<h3 class="text-center" style="color: white;">Login</h3>-->
                <div>
                    <div id="no-log-error" align="center">

                        <?php if($this->session->flashdata('er')) { ?>
                            <div class="alert">
                                <label>
                                    <?php echo $this->session->flashdata('er');?>
                                </label>
                            </div>
                            <?php } ?>
                    </div>
                    <?php $attributes = array('id' => 'login_form', 'name' => 'login_form');
                  echo form_open('user/check_user', $attributes);  ?>
                        <div class="form-group">
                            <input type="text" name="username" id="username" placeholder="username" value="" class="form-control">
                            <?php if(form_error('username')) {?>
                            <label class="error">
                                <?php echo form_error('username'); ?></label><?php  }?>
                            
                        </div>
                       

                        <div class="form-group">
                            <input type="password" name="password" id="password" placeholder="Password" value="" class="form-control">
                             <?php if(form_error('password')) {?>
                            <label class="error">
                                <?php echo form_error('password'); ?></label><?php  }?>

                        </div>
                        <!-- <div class="form-group">
                            <a href="<?php echo site_url('user/forgot_password') ?>">Forgot password?</a>
                        </div> -->
                        <span class="clearfix"></span>
                        <div class="form-group text-center">
                            <input type="submit" name="submit" id="submit" value="LOGIN" class="btn btn-default btn-sm" style="background: #a2217d !important">
                        </div>
                        </form>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</body>

</html>