
<?php include_once('header.php'); ?>
<?php include_once('sidebar.php'); ?>
	<!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper ">
	<section class="content-header">
      <h1>Subscription Plan Setup</h1>
    </section>
  
 
		<section class="content">
			
		<div class="backf pt30">
		<form method="post" action="<?php echo base_url(); ?>main_controller/add_subscription">  
			
			<div class="row mb20 d-flex">
				<div class="col-sm-6 mb30">
					<div class="form-group">
					  <label for="usr">Plan Title:</label>
					  <input type="text" class="form-control" id="usr" name="plan_title">
					</div>
				</div>
				<div class="col-sm-6 mb30">
					<div class="form-group">
					  <label for="usr">Plan ID:</label>
					  <input type="text" class="form-control" id="usr" name="plan_id">
					</div>
				</div>
				<div class="col-sm-6 mb30">
					<div class="form-group">
					  <label for="usr">Interval:</label>
					  <select class="form-control" name="interval_type">
					  <?php foreach($data_intervals as $di){ ?>
						<option value="<?php echo $di->interval_id; ?>"><?php echo $di->interval_text; ?></option>
					  <?php } ?>
					  </select>
					</div>
				</div>
				<div class="col-sm-6 mb30">
					<div class="form-group">
					  <label for="usr"># of Intervals:</label>
					  <input type="text" class="form-control" id="usr" name="interval_nos">
					</div>
				</div>
				<div class="col-sm-6 mb30">
					<div class="form-group">
					  <label for="usr">Amount (USD):</label>
					  <input type="text" class="form-control" id="usr" name="amount">
					</div>
				</div>
				<div class="col-sm-6 mb30">
					<div class="form-group">
					  <label for="usr">Trial Period Days:</label>
					  <input type="text" class="form-control" id="usr" name="trail_period_days">
					</div>
				</div>
				<div class="col-sm-6 mb30">
					<div class="form-group">
					  <label for="usr">Group To Activate On User:</label>
					  <select class="form-control"  name="grp_to_activate">
					  <?php foreach($data_intervals as $di){ ?>
						<option value="<?php echo $di->interval_id; ?>"><?php echo $di->interval_text; ?></option>
					  <?php } ?>
					  </select>
					</div>
				</div>
				<div class="col-sm-12 mb30">
					<div class="form-group text-center">
					  <button type="submit" class="btn btn-success">SAVE</button>
					</div>
				</div>
			</div>
			
		</form>
      </div>
		
		</section>
		
		
		
  </div>
<?php include_once('footer.php'); ?>
<script>
function edit_page(page_id,page_name,page_content){
	$("#page_id").val(page_id); //alert(page_id);
	$("#page_name").val(page_name); //alert(page_name);
	$(".Editor-editor").html(page_content); //alert(page_content);
}
</script>
