<?php echo $header;?>
<div id="dashboard">
	<div class="container">
<div class="row"><br/></div>
<div class="panel">

	<div class="panel-header"><?php echo $LANG["WBS_ADMIN_ADS_REPORTED"];?></div>

<div class="panel-content">
<div class="col-md-12">
<!-- ADMIN QUICK STATS -->



<table class="table">
      <thead>
        <tr>
          <th><?php echo $LANG["WBS_ADMIN_ADS_REPORTED_ON"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_ADS_REPORTED_NAME"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_ADS_REPORTED_TYPE"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_ADS_REPORTED_IMPRESSIONS"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_ADS_REPORTED_CLICKS"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_ADS_REPORTED_SPENT"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_ADS_REPORTED_STATUS"];?></th>
          <th></th>
        </tr>
      </thead>
      <tbody>


			<?php if ( !empty ( $ads ) ) { ?>
			<?php foreach($ads as $ad): ?>
				<tr
				<?php if ( $ad['aau_status'] == '1' ) { ?> class="success"<?php } ?>
				<?php if ( $ad['aau_status'] == '2' ) { ?> class="info"<?php } ?>
				<?php if ( $ad['aau_status'] == '3' ) { ?> class="danger"<?php } ?>
				>

				  <td><?php echo date ( DATE_FORMAT_FULL, $ad['ra_date'] );?></td>
				  <td><?php echo $ad['aau_title'];?></td>
				  <td>
					<?php if ( $ad['aau_type'] == '1') { ?>
						<?php echo $LANG["WBS_ADMIN_ADS_REPORTED_TYPE_TEXT_AD"];?>
					<?php } ?>
				  
					<?php if ( $ad['aau_type'] == '2') { ?>
						<?php echo $LANG["WBS_ADMIN_ADS_REPORTED_TYPE_BANNER_AD"];?>
					<?php } ?>
				  </td>
				  <td><?php echo $ad['aaus_impressions'];?></td>
				  <td><?php echo $ad['aaus_clicks'];?></td>
				  <td><?php echo sprintf(NUMBER_FORMAT, $ad['aaus_money_spent'] );?></td>
				  <td>
					<?php if ( $ad['aau_status'] == '1' ) { ?>
						<?php echo $LANG["WBS_ADMIN_ADS_REPORTED_STATUS_STARTED"];?>
					<?php } ?>

					<?php if ( $ad['aau_status'] == '2' ) { ?>
						<?php echo $LANG["WBS_ADMIN_ADS_REPORTED_STATUS_PAUSED"];?>
					<?php } ?>

					<?php if ( $ad['aau_status'] == '3' ) { ?>
						<?php echo $LANG["WBS_ADMIN_ADS_REPORTED_STATUS_DISABLED"];?>
					<?php } ?>
				  </td>
				  <td>
				  <a class="no-decoration" href="<?php echo HTTP_SERVER_ADMIN ?>ads/details.php?ad=<?php echo $ad['aau_id'];?>&rf=reported">
					<span class="glyphicon glyphicon-eye-open"></span> <?php echo $LANG["WBS_ADMIN_ADS_REPORTED_OPEN"];?>
				  </a>
				  </td>

				</tr>
			<?php endforeach; ?>
			<?php } ?>


      </tbody>
</table>

<?php if ( $paginator['rows'] > 10 ) { ?>
<div class="row"></div>
	<?php echo $paginator['pager'];?>
<?php } ?>



<!-- END ADMIN QUICK STATS -->
<div class="row"><br/></div>
</div>
<div class="row"><br/></div>
</div>

</div>
</div>
</div>
<?php echo $footer;?>