	<!DOCTYPE html>
	<html lang="en">
	<head>
	<!-- Main navbar -->
	<?php
	use App\Libraries\MyEncrypt;
	$session = session();

	echo view('admin/common_header'); ?>
	<!-- /main navbar -->

	<!-- select box theme JS files -->
	<script type="text/javascript" src="<?php echo base_url('assets/js/plugins/forms/selects/bootstrap_select.min.js');?>"></script>

	<!-- Theme JS files -->
	<script type="text/javascript" src="<?php echo base_url('assets/js/plugins/tables/datatables/datatables.min.js');?>"></script>
	<script type="text/javascript" src="<?php echo base_url('assets/js/plugins/tables/datatables/extensions/responsive.min.js');?>"></script>
	<script type="text/javascript" src="<?php echo base_url('assets/js/plugins/forms/selects/select2.min.js');?>"></script>

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

	<!-- notify JS files -->
	<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/plugins/notifications/bootbox.min.js');?>"></script>
	<script type="text/javascript" src="<?php echo base_url('assets/js/plugins/notifications/sweet_alert.min.js');?>"></script>
	<!--<script type="text/javascript" src="<?php echo base_url();?>assets/js/pages/components_modals.js"></script>-->
	<style type="text/css">
	.icons-list a[data-action="reload1"]:after {
	content: '\e9fb';
	}
	.btns {
	padding: 5px;
	}
	</style>
	</head>
	<style>
	.icons-list > li {
	display: inline-block;
	font-size: 26px;
	}
	.heading-elements .icons-list {
	margin-top: 5px;
	}
	.help-block
	{
		position: absolute !important;
	}
	</style>
	<body class="navbar-top-md-md pace-done">

	<!-- Fixed navbars wrapper -->
	<div class="navbar-fixed-top">

	<!-- Main navbar -->
	<?php echo view('admin/mainnav'); ?>
	<!-- /main navbar -->

	<!-- Second navbar -->
	<?php echo view('admin/secondnav'); ?>
	<!-- /second navbar -->

	</div>
	<!-- /fixed navbars wrapper -->


	<!-- Page header -->
	<div class="page-header">
	<div class="page-header-content">
	<div class="page-title">
	<h4><i id="icon-bck" class="icon-arrow-left52 position-left"></i> <span class="text-semibold"><?php echo 'Interest ( PNL ) Settings'; ?></h4>

	<ul class="breadcrumb breadcrumb-caret position-right">
	<?php foreach ($breadcrumbs as $breadcrumb) { if(isset($breadcrumb['href'])){?>
	<li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
	<?php } else { ?> <li><?php echo $breadcrumb['text']; ?></li><?php } } ?>
	</ul>
	</div>
	<?php echo view('admin/'.$module_name.'_header'); ?>
	</div>
	</div>
	<!-- /page header -->


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

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

	<!-- Main content -->
	<div class="content-wrapper">

	<!-- Horizontal form -->
	<div class="panel panel-flat">
	<div class="panel-heading">
	<h5 class="panel-title"><?php echo "Interest ( PNL ) Page Settings"; ?></h5>
	<div class="heading-elements">
	<ul class="icons-list">
	<li><a data-action="collapse"></a></li>
	<li><a data-action="close"></a></li>
	</ul>
	</div>
	</div>

	<div class="panel-body">
	<form class="form-horizontal interestsetting" action="" method="post"  data-fv-live="enabled" data-fv-framework="bootstrap" data-fv-excluded="true">

	<div class="row">
	<div class="col-lg-12">
	<div class="modal-head">
	</div>
	<div class="row" style="margin-left: 17px !important;">
	<?php
	$validation = \Config\Services::validation();
	for($i=1;$i<=90; $i++) {
	$day = strtotime("+".$i." day", strtotime(date('Y-m-d')));
	$cond = "plan_id = 1 AND DATE(cr_date) = '".date('Y-m-d', $day)."'";
	$plans_info = $this->common_model->GetRow('daily_interest', $cond);
	?>
	<div class="col-lg-2 mb-4" style="margin-right: 25px;">
	<label class=""><b><?php echo $start_date = date ("d-M-Y", strtotime("+".$i." day", strtotime(date('Y-m-d'))));?></b></label>
	<div class="form-group  has-feedback <?php if($validation->getError('rate_'.$plan->planid.'_'.$day)) echo "has-error";?>">
	<div class="input-group">
	<input type="text" name="rate_<?php echo $day;?>" class="form-control"  placeholder="<?php echo "Rate"; ?>" value="<?php echo set_value('rate_1',isset($plans_info->rate) ? $plans_info->rate : '0'); ?>" data-fv-excluded="false" pattern="^[0-9.]+$" data-fv-validatorname="true" data-fv-notempty="true" data-fv-regexp-message="Invalid Rate" data-fv-notempty-message="Rate is Required" required/>
	<span class="input-group-addon">%</span>
	</div>
	<?php echo $validation->getError('rate_1'.$plan->planid.'_'.$day, '<div class="form-control-feedback"><i class="icon-cancel-circle2"></i></div><span class="help-block">', '</span>'); ?>
	</div>
	</div>
<?php } ?>
	</div>
</div>
	</div>

<div class="text-right col-lg-6">
<button type="submit" class="btn btn-primary">Update<i class="icon-arrow-right14 position-right"></i></button>
</div>
</form>
</div>
</div>
	<!-- /horizotal form -->

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

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


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

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


<!-- 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>

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

<!-- bootsrap switch checkbox JS files -->
<script src="<?php echo base_url('assets/boots/js/bootstrap-switch.js');?>"></script>

<!-- notify JS files -->
<script type="text/javascript" src="<?php echo base_url('assets/js/plugins/notifications/jgrowl.min.js');?>"></script>
	<script type="text/javascript">
	jQuery.noConflict();

	(function( $ ) {
	$(function() {

	$(document).ready(function() {

	// $(".switchery").bootstrapSwitch();

	$('.interestsetting').formValidation(
	{
	framework: 'bootstrap',
	excluded: [':disabled', ':hidden', ':not(:visible)'],
	icon: {
	valid: 'glyphicon glyphicon-ok1',
	invalid: 'glyphicon glyphicon-remove1',
	validating: 'glyphicon glyphicon-refresh'
	},
	fields: {

	}
	}
	);

	$('input[type="text"]').on('change', function(e){

	$('.interestsetting').formValidation('revalidateField');
	})

	// $('.interestsetting .form-control').on('change', function(){

	// });


	$.jGrowl.defaults.closer = false;

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

	$.jGrowl("<?php echo $session->getFlashData('error_message');?>", {
	header: 'error',
	theme: 'bg-danger'
	});
	<?php } ?>

	<?php if($session->getFlashData('success_message')) { ?>

	$.jGrowl("<?php echo $session->getFlashData('success_message');?>", {
	header: 'success',
	theme: 'bg-success'
	});
	<?php } ?>



	});
	$('#icon-bck').on('click',function() {
	window.history.back();
	});

	});
	})(jQuery);


	</script>

	</body>
	</html>
