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

	<div class="panel-header"><?php echo $profile['0']['up_first_name'];?> <?php echo $profile['0']['up_last_name'];?> <?php if ( $profile['0']['up_phone'] !="" ) { ?> ( <?php echo $profile['0']['up_phone'];?> ) <?php } ?></div>


	
<div class="panel-content">
<?php if ( PUBLISHER == 'ON' ) { ?>
	<div class="row"><br/></div>
	<div class="col-md-12">
	<legend><?php echo $LANG["WBS_ADMIN_USERS_PROFILE_PUB_PROFILE"];?></legend>



<?php if ( !empty ( $channels ) ) { ?>
	<?php if ( CHARTS_TYPE == 'HIGHCHARTS' ) { ?>
		<div id="publisher-report" style="width:100%; height:500px;"></div>
		<script>
		$(function () { 
			$('#publisher-report').highcharts({
				chart: {
					type: 'bar'
				},
				title: {
					text: '<?php echo $LANG["WBS_ADMIN_USERS_PROFILE_CHANNELS"];?>'
				},
				xAxis: {
					categories: [<?php foreach($channels as $c): ?>'<?php echo $c['pc_title'];?>',<?php endforeach; ?>]
				},
				yAxis: {
					title: {
						text: ''
					}
				},
				series: [
				{
					name: '<?php echo $LANG["WBS_ADMIN_USERS_PROFILE_IMPRESSIONS"];?>',
					data: [<?php foreach($channels as $c): ?><?php echo $c['pcs_impressions'];?>,<?php endforeach; ?>]
				},
				{
					name: '<?php echo $LANG["WBS_ADMIN_USERS_PROFILE_CLICKS"];?>',
					data: [<?php foreach($channels as $c): ?><?php echo $c['pcs_clicks'];?>,<?php endforeach; ?>]
				},
				{
					name: '<?php echo $LANG["WBS_ADMIN_USERS_PROFILE_MONEY"];?>',
					data: [<?php foreach($channels as $c): ?><?php echo sprintf(NUMBER_FORMAT, $c['pcs_money'] );?>,<?php endforeach; ?>]
				}
				
				]
			});
		});
		</script>
	<?php } ?>
<?php } ?>


<div class="row"><br/></div>
	</div>
<?php } ?>
<div class="row"><br/></div>
<?php if ( ADVERTISER == 'ON' ) { ?>
	<div class="col-md-12">
	<legend><?php echo $LANG["WBS_ADMIN_USERS_PROFILE_ADV_PROFILE"];?></legend>



<?php if ( !empty ( $campaigns ) ) { ?>
	<?php if ( CHARTS_TYPE == 'HIGHCHARTS' ) { ?>
		<div id="advertiser-report" style="width:100%; height:500px;"></div>
		<script>
		$(function () { 
			$('#advertiser-report').highcharts({
				chart: {
					type: 'bar'
				},
				title: {
					text: '<?php echo $LANG["WBS_ADMIN_USERS_PROFILE_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_ADMIN_USERS_PROFILE_SPENT"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo sprintf(NUMBER_FORMAT, $c['acs_money_spent'] );?>,<?php endforeach; ?>]
				},
				{
					name: '<?php echo $LANG["WBS_ADMIN_USERS_PROFILE_RECEIVED_CLICKS"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo $c['acs_clicks'];?>,<?php endforeach; ?>]
				},
				{
					name: '<?php echo $LANG["WBS_ADMIN_USERS_PROFILE_IMPRESSIONS_ADV"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo $c['acs_impressions'];?>,<?php endforeach; ?>]
				},
				{
					name: '<?php echo $LANG["WBS_ADMIN_USERS_PROFILE_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_ADMIN_USERS_PROFILE_DAILY_BUDGET"];?>',
					data: [<?php foreach($campaigns as $c): ?><?php echo sprintf(NUMBER_FORMAT, $c['adv_campaign_daily_budget'] );?>,<?php endforeach; ?>]
				}

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





<div class="row"><br/></div>
	</div>
<?php } ?>






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

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