<?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_ADVERTISER_STATS_TITLE"];?></div>

<div class="panel-content">
<div class="row"><br/></div>

<div class="col-md-12">


<?php if ( !empty ( $campaigns ) ) { ?>
	<?php if ( CHARTS_TYPE == 'HIGHCHARTS' ) { ?>
		<div id="container" style="width:100%; height:500px;"></div>
		<script>
		$(function () { 
			$('#container').highcharts({
				chart: {
					type: 'bar'
				},
				title: {
					text: '<?php echo $LANG["WBS_ADV_OVERALL_STATS_CAMPAIGNS"];?>'
				},
				xAxis: {
					categories: [<?php foreach($campaigns as $c): ?>'<?php echo $c['adv_campaign_title'];?>',<?php endforeach; ?>]
				},
				yAxis: {
					title: {
						text: ''
					}
				},
				series: [
				{
					name: '<?php echo $LANG["WBS_ADV_STATISTICS_SPENT_MONEY"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo sprintf( NUMBER_FORMAT, $c['acs_money_spent'] );?>,<?php endforeach; ?>]
				},
				{
					name: '<?php echo $LANG["WBS_ADV_STATISTICS_CLICKS"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo $c['acs_clicks'];?>,<?php endforeach; ?>]
				},
				{
					name: '<?php echo $LANG["WBS_ADV_STATISTICS_IMPRESSIONS"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo $c['acs_impressions'];?>,<?php endforeach; ?>]
				},
				{
					name: '<?php echo $LANG["WBS_ADV_STATISTICS_DAILY_BUDGET_SPENT"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo sprintf(NUMBER_FORMAT, $c['adv_campaign_daily_spent'] );?>,<?php endforeach; ?>]
				},{
					name: '<?php echo $LANG["WBS_ADV_STATISTICS_DAILY_BUDGET"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo sprintf(NUMBER_FORMAT, $c['adv_campaign_daily_budget'] );?>,<?php endforeach; ?>]
				}

				
				]
			});
		});
		</script>
	<?php } ?>
<?php } ?>









	<table class="table">

		  <tbody>

			<tr>
			  <td><?php echo $LANG["WBS_ADV_STATISTICS_DEPOSIT"];?></td>

<?php if ( MONEY_ALIGN == 'LEFT' ) { ?>
	<td><?php echo MONEY_SYMBOL;?> <?php echo sprintf(NUMBER_FORMAT, $profile['0']['adv_profile_deposits']);?></td>
<?php } ?>

<?php if ( MONEY_ALIGN == 'RIGHT' ) { ?>
	<td><?php echo sprintf(NUMBER_FORMAT, $profile['0']['adv_profile_deposits']);?> <?php echo MONEY_SYMBOL;?></td>
<?php } ?>

			</tr>

			<tr>
			  <td><?php echo $LANG["WBS_ADV_STATISTICS_SPENT"];?></td>

<?php if ( MONEY_ALIGN == 'LEFT' ) { ?>
	<td><?php echo MONEY_SYMBOL;?> <?php echo sprintf(NUMBER_FORMAT, $profile['0']['adv_profile_spent']);?></td>
<?php } ?>

<?php if ( MONEY_ALIGN == 'RIGHT' ) { ?>
	<td><?php echo sprintf(NUMBER_FORMAT, $profile['0']['adv_profile_spent']);?> <?php echo MONEY_SYMBOL;?></td>
<?php } ?>

			</tr>

			<tr>
			  <td><?php echo $LANG["WBS_ADV_STATISTICS_CAMPAIGNS"];?></td>
			  <td><?php echo $profile['0']['adv_profile_campaigns'];?></td>
			</tr>

			<tr>
			  <td><?php echo $LANG["WBS_ADV_STATISTICS_ADS"];?></td>
			  <td><?php echo $profile['0']['adv_profile_ads'];?></td>
			</tr>

		  </tbody>
	</table>

</div>

<div class="row"><br/></div>
</div>

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