<div class="innerBanner container-fluid mb-5">
	<div class="row h-100 align-items-center">
		<div class="col-md-4 col-lg-6">
			<h2 class="whiteColor mb-0">Resource Center</h2>
		</div>
		<div class="col-md-8 col-lg-6">
			<ul class="breadcrumb">
				<li><a href="<?php echo base_url(); ?>">Home</a></li>
				<li><a href="<?php echo base_url(); ?>circulars">Circulars</a></li>
				<li><?php echo strtolower($name); ?></li>
			</ul>
		</div>
	</div>
</div>
<div class="container-fluid">
	<div class="row">
		<div class="col-lg-8 order-lg-12 mb-5" id="innerData">
			<div class="row">
				<h1 class="col-12 mb-4"><span><?php echo $name; ?> circulars</span></h1>
				<div class="col-12" id="circulars">
					<div class="table-responsive">
						<table class="table table-bordered">
							<tr class="grayGradientBg">
								<th>Date</th>
								<th colspan="2">Circulars Name</th>
							</tr>
              <?php if($circulars !== "No Data"){
                foreach($circulars as $val){
									$limit = strtotime("-6 months");
									if(strtotime($val->post_date) > $limit){
              ?>
							<tr>
								<td class="date"><?php echo date("d M Y",strtotime($val->post_date)); ?></td>
								<td><p class="mb-1"><?php echo $val->name; ?></p>			
								<?php if($val->last_date !== ""){ ?>
									<p class="redColor">Last Date: <?php echo date("d M Y",strtotime($val->last_date)); ?></p>
								<?php } ?>
								</td>
								<td>
									<a href="<?php echo base_url().$val->filepath; ?>" target="_blank" class="downloadIcon rounded-circle"></a>
								</td>
							</tr>
              <?php  } } }else{ ?>
							<tr>
							<td colspan="3"> Data Not Available.</td>
							</tr>
							<?php } ?>
						</table>
					</div>

					<div class="table-responsive archiveData mt-4">
						<table class="table table-bordered">
							<tr class="grayGradientBg">
								<th>Date</th>
								<th colspan="2">Circulars Name</th>
							</tr>
              <?php if($circulars !== "No Data"){
                foreach($circulars as $val){
									$limit = strtotime("-6 months");
									if(strtotime($val->post_date) < $limit){
              ?>
							<tr>
								<td class="date"><?php echo date("d M Y",strtotime($val->post_date)); ?></td>
								<td><p class="mb-1"><?php echo $val->name; ?></p>			
								<?php if($val->last_date !== ""){ ?>
									<p class="redColor">Last Date: <?php echo date("d M Y",strtotime($val->last_date)); ?></p>
								<?php } ?>
								</td>
								<td>
									<a href="<?php echo base_url().$val->filepath; ?>" target="_blank" class="downloadIcon rounded-circle"></a>
								</td>
							</tr>
              <?php  } } }else{ ?>
							<tr>
							<td colspan="3"> Data Not Available.</td>
							</tr>
							<?php } ?>
						</table>
					</div>

					<?php if($circulars !== "No Data"){ ?>
						<a href="#" class="archive grayGradientBg rounded mb-4 mt-4">Archive  <i class="fa fa-angle-down rounded-circle" aria-hidden="true"></i></a>
					<?php } ?>
				</div>
			</div>
		</div>
		
		<div class="col-lg-4 order-lg-1 mb-5">
			<div class="dataList">
				<div class="blackRect"></div>
			<ul>
					<li><a href="<?php echo base_url(); ?>circulars" class="fadeAnim active">Circulars</a></li>
					<li><a href="<?php echo base_url(); ?>statistics" class="fadeAnim">Statistics </a></li>
					<li><a href="<?php echo base_url(); ?>trade-remedies" class="fadeAnim">Trade Remedies </a></li>
					<li><a href="<?php echo base_url(); ?>government-representation" class="fadeAnim">Govt. Representations</a></li>
					<li><a href="<?php echo base_url(); ?>important-links" class="fadeAnim">Important Links</a></li>
</ul>
</div>
</div>
</div>
</div>