<!DOCTYPE html>
<html lang="en" class="h-100">

<!-- Mirrored from edumin.dexignlab.com/xhtml/page-login.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:58:28 GMT -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Rizwan Associates</title>
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="<?php echo base_url(); ?>assets/logo.png">
    <link href="<?php echo base_url(); ?>assets/css/style.css" rel="stylesheet">
    
</head>

<body class="h-100">
    <div class="authincation h-100">
        <div class="container h-100">
            <div class="row justify-content-center h-100 align-items-center">
                <div class="col-md-6">
                    <div class="authincation-content">
                        <div class="row no-gutters">
                            <div class="col-xl-12">
                                <div class="auth-form">
                                    <img src="<?php base_url();?>assets/logo.png" style="width:25%;"/>
                                  
                                    <h4 class="text-center mb-4">Sign in your account</h4>
                  

                                    <div id='sales1success' class='alert alert-danger solid' style='display:none;'></div>
                                        <?php if($this->session->flashdata('sales1success')){ ?>
                                        <div class="alert alert-danger solid" style='text-align:center;'><?php echo $this->session->flashdata('sales1success'); ?></div>
                                    <?php } ?>
                                    
                                    <div id='salessuccess' class='alert alert-success solid' style='display:none;'></div>
                                    <?php if($this->session->flashdata('salessuccess')){ ?>
                                        <div class="alert alert-success solid" style='text-align:center;'><?php echo $this->session->flashdata('salessuccess'); ?></div>
                                    <?php } ?>
                                        <div class="form-group">
                                            <label><strong>Email</strong></label>
                                            <input type="email" name="username" id="username" class="form-control" >
                                        </div>
                                        <div class="form-group">
                                            <label><strong>Password</strong></label>
                                            <input type="password" name="password" id="password" class="form-control">
                                        </div>
                                        <div class="form-row d-flex justify-content-between mt-4 mb-2">
                                            <div class="form-group">
                                               <div class="custom-control custom-checkbox ml-1">
													<input type="checkbox" class="custom-control-input" id="basic_checkbox_1">
													<label class="custom-control-label" for="basic_checkbox_1">Remember my preference</label>
												</div>
                                            </div>
                                          
                                        </div>
                                        </div> 
                                        <div class="text-center">
                                           <button type="button" id="login" class="btn btn-primary btn-block">Sign me in</button>
                                           
                                   
                                    <!-- <div class="new-account mt-3">
                                        <p>Don't have an account? <a class="text-primary" >Sign up</a></p>
                                    </div> -->
                                </div>
                                
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php //echo base_url('User/index'); ?>
        <script type="text/javascript">
        
    $("#login").click(function() {
                 
       var username = $("#username").val();
       var password = $("#password").val();
       var formdata = {username:username, password:password};
      // var url = base_url + "User/processSignin";
        $.ajax({
        
                 type: "POST",
                 dataType : "json",
                 url: "<?php echo base_url(); ?>User/index",
                 data: formdata,
                success:function(data){
					console.log('first'+data);
					if(data.status == 'true' ){
						console.log('second'+data);
						$('#salessuccess').show().html('Login Successfully').hide(3000);
							var dashboard = '';
							if(data.role == 1)
							{
								dashboard = 'Admin/dashboard';
							}else if(data.role == 2){
								dashboard = 'Admin/dashboard1';
							}else if(data.role == 3){
								dashboard = 'Admin/dashboard1';
							}else if(data.role == 4){
								dashboard = 'Admin/dashboard1';
							}else if(data.role == 5){
                                dashboard = 'Admin/dashboard1';
                            }else if(data.role == 6){
                                dashboard = 'Admin/dashboard1';
                            }else if(data.role == 11){
                                dashboard = 'Admin/dashboard1';
                            }else if(data.role == 12){
                                dashboard = 'Admin/dashboard1';
                            }else if(data.role == 7){
                                dashboard = 'Admin/dashboard1';
                            }else if(data.role == 13){
                                dashboard = 'Admin/dashboard1';
                            }else if(data.role == 14){
                                dashboard = 'Admin/dashboard1';
                            }else if(data.role == 15){
                                dashboard = 'Admin/dashboard1';
                            }
							var path = "<?php echo base_url(); ?>"+dashboard;
						
						setTimeout(function(){location.href=path} , 2000);   
							console.log(data);
							
						$('#sales1success').hide();
				
					}else if(data.status == 'false'){
						console.log('third'+data);

						$('#sales1success').show().html('Invalid User');
												
					}
				},

				error:function(data){
					//console.log(data.responseText);
					$('#sales1success').show().html('Invalid User');
							}
                });
               
            });
      

        </script>

    <!--**********************************
        Scripts
    ***********************************-->
    <!-- Required vendors -->
	<script src="<?php echo base_url(); ?>assets/vendor/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/custom.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/dlabnav-init.js"></script>

</body>


<!-- Mirrored from edumin.dexignlab.com/xhtml/page-login.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:58:28 GMT -->
</html>