<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">E-Magazine</h2>
		</div>
		<div class="col-md-8 col-lg-6">
			<ul class="breadcrumb">
				<li><a href="<?php echo base_url(); ?>">Home</a></li>
				<li>E-Magazine</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>E-Magazine</span></h1>
				<div class="col-12">
        <?php if($magazine !== "No Data"){ ?>
          <div class="row" id="awardWinners">
            <?php 
            $i = $j = 0;
            $length = sizeof($magazine);

            if($length <= 6){
              $loop_limit_1 = $length;
            }else{
              $loop_limit_1 = 6;
            }
            for($i=0; $i < $loop_limit_1; $i++){ 
            ?>
            <div class="col-md-6 col-lg-4 mb-4">
							<div class="rounded border p-2">
							<?php if($magazine[$i]->url!='') 
							{ ?>
							<a href="<?php echo $magazine[$i]->url; ?>" target="_blank">
							<?php } ?>
							<?php if($magazine[$i]->coverfilepath!='')
							{								?>
								<img src="<?php echo base_url(); ?><?php echo $magazine[$i]->coverfilepath; ?>" class="img-fluid rounded" alt="Magazine picture" width="243" height="313">
							<?php } 
							else { ?>
								<img src="<?php echo base_url(); ?>public/images/plex_magazine_big.png" class="img-fluid rounded" alt="Magazine picture" width="243" height="313">
							<?php } ?>	
						<?php if($magazine[$i]->url!='') 
							{ ?>
							</a>
							<?php } ?>						
								<div class="row justify-content-between">
									<div class="col-8 pr-0">
										<h6 class="redColor"><?php echo $magazine[$i]->title; ?></h6>
									<!--	<p class="mb-0 redColor">Published on : <?php // echo date('d-m-Y',strtotime($magazine[$i]->createdDate)); ?></p>-->
										<p class="mb-0"><?php //echo $magazine[$i]->year; ?></p>
									</div>
							<!--	<div class="col-4 text-right">
										<a href="<?php //echo base_url().$magazine[$i]->filepath; ?>" target="_blank"  class="downloadIcon fadeAnim rounded-circle"></a>
									</div> -->
								</div>
							</div>
						</div>
            <?php } ?>
            
            <?php 
            if($length > 6){ 
            ?>
            <div class="archiveData col-12">
							<div class="row">
            <?php  
            for($j=$i; $j < $length; $j++){ 
            ?>
						    <div class="col-md-6 col-lg-4 mb-4">
									<div class="rounded border p-2">
								<?php if($magazine[$j]->url!='') 
							{ ?>
							<a href="<?php echo $magazine[$j]->url; ?>" target="_blank">
							<?php } ?>
									<?php if($magazine[$j]->coverfilepath!='')
							{								?>
								<img src="<?php echo base_url(); ?><?php echo $magazine[$j]->coverfilepath; ?>" class="img-fluid rounded" alt="Magazine picture">
							<?php } 
							else { ?>
								<img src="<?php echo base_url(); ?>public/images/plex_magazine_big.png" class="img-fluid rounded" alt="Magazine picture">
							<?php } ?>	
								<?php if($magazine[$j]->url!='') 
							{ ?>
							</a>
							<?php } ?>							
										<!--<img src="<?php //echo base_url(); ?>public/images/award.jpg" class="img-fluid rounded" alt="">-->
										<div class="row justify-content-between">
											<div class="col-8 pr-0">
												<h6 class="redColor"><?php echo $magazine[$j]->title; ?></h6>
												<p class="mb-0"><?php //echo $magazine[$j]->year; ?></p>
											</div>
									<!--	<div class="col-4 text-right">
												<a href="<?php //echo base_url().$magazine[$j]->filepath; ?>" target="_blank" class="downloadIcon fadeAnim rounded-circle"></a>
											</div>-->
										</div>
									</div>
                </div>
            <?php } ?>
							</div>
            </div>
            <?php } ?>

            <?php 
            if($length > 6){ 
            ?>
						<div class="col-12 pt-4">
							<a href="#" class="archive grayGradientBg rounded mb-4">Archive  <i class="fa fa-angle-down rounded-circle" aria-hidden="true"></i></a>
            </div>
            <?php } ?>
					</div>
        <?php } ?>
				</div>
			</div>
		</div>
		<div class="col-lg-4 order-lg-1 mb-5">
			<div class="dataList">
				<div class="blackRect"></div>
				<ul>
					<ul>
					<li><a href="javascript:;" class="fadeAnim active">E-Magazine </a></li>
					<li><a href="<?php echo base_url(); ?>articles" class="fadeAnim">Articles </a></li>
					<li><a href="<?php echo base_url(); ?>press-releases" class="fadeAnim">Press Releases </a></li>
					<li><a href="<?php echo base_url(); ?>advertise" class="fadeAnim">Advertise </a></li>
				<!--<li><a href="<?php echo base_url(); ?>circulars" class="fadeAnim">Circulars</a></li>
					<li><a href="<?php echo base_url(); ?>statistics">Statistics </a></li>
					<li><a href="javascript:;" class="fadeAnim active">E-Magazine </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>
				</ul>
			</div>
		</div>
	</div>
</div>
