<!DOCTYPE html>
<html lang="en">
<head>
	<!-- header -->
		<?php $this->load->view('admin/common_header'); ?>
	<!-- /header -->

	<!-- Bootsrap form validation JS files -->
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/formValidation.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/bootstrap.js"></script>

	<script type="text/javascript" src="<?php echo base_url();?>assets/js/plugins/notifications/pnotify.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/plugins/notifications/noty.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/plugins/notifications/jgrowl.min.js"></script>

	<!-- Theme JS files -->
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/core/app.js"></script>
	<!-- /theme JS files -->

	

</head>

<body class="login-cover">

	<!-- Page container -->
	<div class="page-container login-container">

		<!-- Page content -->
		<div class="page-content">

			<!-- Main content -->
			<div class="content-wrapper">
				
				
				<!-- Form with validation -->
				<form action="<?php echo base_url();?>admin/emailconfirmupdate" class="form-validate confirm" method="post">
					<div class="panel panel-body login-form">
						<div class="text-center">
							<div class="icon-object border-slate-300 text-slate-300"><i class="icon-reading"></i></div>
							<h5 class="content-group"><?php echo $this->lang->line('admin_emailconfirm_lbl');?> <small class="display-block"><?php echo $this->lang->line('admin_emailconfirm_cred');?></small></h5>
						</div>

						<div class="form-group has-feedback has-feedback-left">
							<input type="password" class="form-control" placeholder="<?php echo $this->lang->line('plac_emailconfirm_title'); ?>" name="confirmcode" required="required">
							<div class="form-control-feedback">
								<i class="icon-user text-muted"></i>
							</div>
							<?php echo form_error('confirmcode');?>
						</div>
						
						<div class="form-group">
							<button type="submit" class="btn bg-blue btn-block"><?php echo $this->lang->line('button_Login');?> <i class="icon-arrow-right14 position-right"></i></button>
						</div>
						
					</div>
				</form>
				<!-- /form with validation -->

				

			</div>
			<!-- /main content -->

		</div>
		<!-- /page content -->


		<!-- Footer -->
		<div class="footer text-white">
			<?php echo site_footer();?>
		</div>
		<!-- /footer -->

	</div>
	<!-- /page container -->

	<script type="text/javascript">
	jQuery.noConflict();
	(function( $ ) {
	$(function() {

		$(document).ready(function() {

			 $.jGrowl.defaults.closer = false;


			<?php if($this->session->flashdata('error_message')) { ?>

			// $('#jgrowl-warning').on('click', function () {
		        $.jGrowl('<?php echo $this->session->flashdata('error_message');?>', {
		            header: 'Attention Here!',
		            theme: 'bg-warning'
		        });
		    // });

		    <?php } ?>
			

		    $('.confirm').formValidation({
		    	framework: 'bootstrap',
		    	excluded: [':disabled'],
		        
		        fields: {
		            confirmcode: {
		                message: '<?php echo $this->lang->line("email_confirm_mismatch");?>',
		                validators: {
		                    notEmpty: {
		                        message: '<?php echo $this->lang->line("email_confirm_required");?>'
		                    },remote: {
                                    url: function(validator, $field, value) {
                                        
                                        return '<?php echo base_url();?>admin/login/validcode';
                                    },
                                    type: 'POST',
                                    delay: 1000,
                                    message: '<?php echo $this->lang->line("email_confirm_mismatch"); ?>'
                                }
		                    
		                }
		            }
                                
		            
		        }
		    })
			
		});
	    
	   

	});
	})(jQuery);

	</script>

</body>
</html>
