<?php $__env->startSection('body2'); ?>

<h3>List Ads</h3>
<hr>
<table class="table table-striped table-bordered dataTable" cellspacing="0" width="100%">
	<thead>
		<tr>
			<th>Id</th>
			<th>Type</th>
			<th class="center">Price</th>
			<th class="center">Period</th>
			<th class="center">Start date</th>
			<th class="center">End date</th>
			<th class="center">Status</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<?php foreach($list_ads as $list_ad): ?>
		<tr>
			<td><?php echo $list_ad->user_id; ?>/<?php echo $list_ad->id; ?></td>
			<td><?php echo $list_ad->type; ?></td>
			<td class="center"><?php echo $list_ad->price; ?></td>
			<td class="center"><?php echo $list_ad->period; ?></td>
			<td class="center"><?php echo $list_ad->start_date; ?></td>
			<td class="center"><?php echo $list_ad->end_date; ?></td>
			<td class="center"><?php echo $list_ad->status; ?></td>
			<td class="center">
				<a href="/member/advertising/cancel-ads/<?php echo $list_ad->id; ?>" onclick="return confirm('Ads will be deactivate.')" class="btn btn-xs btn-danger">Cancel</a>
			</td>
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('status-message'); ?>

<?php if(Session::has('status') && Session::get('status') === true): ?>
<div class="alert msg">
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  <strong>Ads Deactivate Success</strong>
</div>
<?php endif; ?>
<?php if(Session::has('status') && !Session::get('status') ): ?>
<div class="alert msg">
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  <strong>ERROR! Try again</strong>
</div>
<?php endif; ?>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('/member/template', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>