<?php 
$submit_url = $file_name."?page=view"; 
$show_all_page = "page=view";
?>
<!-- search form -->
<form class="form-horizontal" action="<?php echo $submit_url;?>" method="post" name="search_form" id="search_form">
	<div class="card-body">
		<div class="row">
		  <div class="col-sm-2 col-12">
			<label for="Campaign Name" class="control-label">Campaign Name</label>
			<input type="text" class="form-control" id="campaign_name" name="campaign_name" value="<?php echo $campaign_name;?>" placeholder="Campaign Name">
		  </div>
		   <!--<div class="col-lg-2 col-12">
			<label for="Email" class="control-label">Email/Phone no.</label>
			<input type="text" class="form-control" id="search2" name="search2" value="<?php echo $search2;?>" placeholder="Email/Phone no.">
		  </div>-->
		   <div class="col-lg-2 col-12">
			<label for="From" class="control-label">From</label>
			<input type="text" class="form-control datepicker" id="from_date" name="from_date" value="<?php (isset($from_date) && $from_date !="") ? utility::getFormatedDate($from_date) : "";?>" placeholder="DD-MM-YYYY" autocomplete="off">
		  </div>
		  <div class="col-lg-2 col-12">
			<label for="To" class="control-label">To</label>
			<input type="text" class="form-control datepicker" id="to_date" name="to_date" value="<?php (isset($to_date) && $to_date !="") ? utility::getFormatedDate($to_date) : "";?>" placeholder="DD-MM-YYYY" autocomplete="off">
		  </div>
		  <div class="col-lg-2 col-12">
			<label for="For End Date" class="control-label">For End Date</label><br/>
			<input type="checkbox" class="flat-red search_tickbox" id="for_end_date" name="for_end_date" value="1"  <? echo ($for_end_date ==1) ? 'checked':''; ?>>
		  </div>
		  <div class="col-lg-2 col-12">	
			<label for="Archived" class="control-label">Archived</label><br>
			<div class="icheck-primary d-inline">
				<input type="checkbox" class="flat-red" id="is_archive" name="is_archive" value="1"  <? echo ($is_archive ==1) ? 'checked':''; ?>>
				<label for="is_archive"></label>
			</div>
		  </div>
		
		  <div style="clear:both;"></div>
		  <div class="col-sm-3">
			<label for="Search" class="control-label">&nbsp;</label><br>
			<button type="submit" class="btn btn-success">Search
				<i class="fa fa-refresh fa-spin" style="display:none;" id="page_load_div"></i>
			</button>
			<button type="button" value="Show All" onclick="javascript:window.location='?<?php echo $show_all_page ?>'" class="btn btn-info">Show All</button>
		  </div>
		</div>
	</div>
</form>
<!-- /.search form -->
<script type="text/javascript">
$(document).ready(function(){
	$('#search_form').submit(function(){
		$("#submit").attr("disabled", true);
		$('#page_load_div').show();
	});
});
</script>