<div class="row">
	<div class="col-md-11 col-sm-11">
		<div class="box box-info">
			<div class="box-header with-border">
				<h3 class="box-title"><?= !empty(lang('ads'))?lang('ads'):"Ads";?></h3>
				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
					<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
				</div>
			</div>
			<!-- /.box-header -->
			<div class="box-body" >
				<div class="upcoming_events">
					<div class="row">
						<?php for ($i = 1; $i <=4 ; $i++) { ?>
							<div class="col-md-6">
								<form action="#" method="post" id="ads_form_<?= $i;?>" class="ads_forms" enctype= "multipart/form-data" data-type='<?= $i;?>'>
									<input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>">
									<div class="single_ads_area">
										<label class="single_ads">
											<img src="<?= !empty($images['ads_thumb_'.$i])?base_url($images['ads_thumb_'.$i]):"";?>" alt="" class="ads_preview_<?= $i;?>" style="display:<?= !empty($images['ads_thumb_'.$i])?"block":"none";?>;">

												<div class="show_ads_details" style="display:<?= !empty($images['ads_thumb_'.$i])?"none":"block";?>;" id="ads_details_<?= $i;?>">

														<div class="adds_details"  >
															<i class="fa fa-upload"></i>
															<h4><?= !empty(lang('upload_image'))?lang('upload_image'):"Upload Image";?></h4>
															<p><?= !empty(lang('max_dimention'))?lang('max_dimention'):"Max Dimentions: ";?> 250 x 1200 px</p>
															<?php if($i==1): ?>
																<p>* <?= !empty(lang('home_page_ads'))?lang('home_page_ads'):"Home Page ads";?></p>
															<?php endif ?>
														</div>
												</div>	
											<input type="file" name="file[]" class="ads_img" data-id='<?= $i;?>' style="display: none;" accept="image/*">
											<?php if(!empty($images['ads_thumb_'.$i])): ?>
												<a href="<?= base_url('admin/dashboard/delete_ads/'.$images['id'].'/'.$i); ?>" class="btn btn-danger  sm-btn btn-flat ads_delete_btn"><i class="fa fa-close"></i></a>
											<?php endif ?>
										</label>
										<div class="img_error_<?= $i;?> error"></div>
										<div class="upload_progress" style="display: none;" id="single_progress_<?= $i;?>">
											<div class="progress">
												<div class="progress-bar progress-bar-success progress-bar-striped myprogress" role="progressbar" style="width:0%">0%</div>
											</div>
										</div>
									</div>
									<input type="hidden" name="id" value="<?= isset($images['id']) && $images['id']!=0?$images['id']:0;?>">
								</form>
								
							</div>
						<?php } ?>
					</div>
				</div>	
			</div><!-- /.box-body -->
		</div>
	</div>
</div>

