<?php
// INCLUDE HEADER IN PAGE
include('other_header.php');
// GET CURRENT DATE AND TIME
$date = date('Y-m-d H:i:s');
if(isset($_POST['success'])) {
	if($_POST['success'] == 'loggedin') {
	?>
	<div style="margin-top: -80px;" class="alert alert-success" role="alert">
		<strong>Well done!</strong> Successfully logged in.
	</div>
	<?php
	}
}
if (mysql_real_escape_string($_POST['submitad'])){
			// GET URL OF REDIRECTION FROM FORM
			$urlredir = $_POST['urlredir'];
			$urlredir = AntiXSS::setEncoding($urlredir, "UTF-8");
			$urlredir = str_replace('"','',$urlredir);
			$urlredir = str_replace("'","",$urlredir);
			$urlredir = str_replace(">","",$urlredir);
			$urlredir = str_replace("<","",$urlredir);
			$urlredir = str_replace("</","",$urlredir);
			$urlredir = str_replace("&%","",$urlredir);
			$urlredir = str_replace("script","",$urlredir);
			$urlredir = str_replace("(","",$urlredir);
			$urlredir = str_replace(")","",$urlredir);
			$urlredir = filter_var($urlredir, FILTER_SANITIZE_URL);
			
	$badurlredir = 0;	
	if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&#\/%?=~_|!:,.;]*[-a-z0-9+&#\/%=~_|]/i",$urlredir)) {
  		$badurlredir = 1;
	}
	if (!preg_match("*[.]*",$urlredir)) {
  		$badurlredir = 2;
	}
	if (!isset($urlredir)) {
	   $badurlredir = 3;
	}
	if (!filter_var($urlredir, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED) === true) {
		$badurlredir = 4;
	}
			// GET URL OF MEDIA FROM FORM
			$urlmedia = $_POST['urlmedia'];
			$urlmedia = AntiXSS::setEncoding($urlmedia, "UTF-8");
			$urlmedia = str_replace('"','',$urlmedia);
			$urlmedia = str_replace("'","",$urlmedia);
			$urlmedia = str_replace(">","",$urlmedia);
			$urlmedia = str_replace("<","",$urlmedia);
			$urlmedia = str_replace("</","",$urlmedia);
			$urlmedia = str_replace("&%","",$urlmedia);
			$urlmedia = str_replace("script","",$urlmedia);
			$urlmedia = str_replace("(","",$urlmedia);
			$urlmedia = str_replace(")","",$urlmedia);
			$urlmedia = filter_var($urlmedia, FILTER_SANITIZE_URL);
	if($urlmedia == '') {
		$urlmedia = 'http://urlurlemptyurl.com';
	}
	$badurlmedia = 0;
	if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&#\/%?=~_|!:,.;]*[-a-z0-9+&#\/%=~_|]/i",$urlmedia)) {
  		$badurlmedia = 1;
	}
	if (!preg_match("*[.]*",$urlmedia)) {
  		$badurlmedia = 2;
	}
	if (!isset($urlmedia)) {
	   $badurlmedia = 3;
	}
	if (!filter_var($urlmedia, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED) === true) {
		$badurlmedia = 4;
	}
			// GET ACTIVE STATUS FROM FORM
			$active = $_POST['active'];
			$active = AntiXSS::setEncoding($active, "UTF-8");
			$active = str_replace('"','',$active);
			$active = str_replace("'","",$active);
			$active = str_replace(">","",$active);
			$active = str_replace("<","",$active);
			$active = str_replace("</","",$active);
			$active = str_replace("&%","",$active);
			$active = str_replace("script","",$active);
			$active = str_replace("(","",$active);
			$active = str_replace(")","",$active);
			// GET AD TYPE FROM FORM
			$advtypeedit = $_POST['adtype'];
			$advtypeedit = AntiXSS::setEncoding($advtypeedit, "UTF-8");
			$advtypeedit = str_replace('"','',$advtypeedit);
			$advtypeedit = str_replace("'","",$advtypeedit);
			$advtypeedit = str_replace(">","",$advtypeedit);
			$advtypeedit = str_replace("<","",$advtypeedit);
			$advtypeedit = str_replace("</","",$advtypeedit);
			$advtypeedit = str_replace("&%","",$advtypeedit);
			$advtypeedit = str_replace("script","",$advtypeedit);
			$advtypeedit = str_replace("(","",$advtypeedit);
			$advtypeedit = str_replace(")","",$advtypeedit);
			// GET COUNTRY FROM FORM
			$countryinput = $_POST['countryinput'];
			$countryinput = AntiXSS::setEncoding($countryinput, "UTF-8");
			$countryinput = str_replace('"','',$countryinput);
			$countryinput = str_replace("'","",$countryinput);
			$countryinput = str_replace(">","",$countryinput);
			$countryinput = str_replace("<","",$countryinput);
			$countryinput = str_replace("</","",$countryinput);
			$countryinput = str_replace("&%","",$countryinput);
			$countryinput = str_replace("script","",$countryinput);
			$countryinput = str_replace("(","",$countryinput);
			$countryinput = str_replace(")","",$countryinput);
			$titlead = $_POST['title'];
			$titlead = AntiXSS::setEncoding($titlead, "UTF-8");
			$titlead = str_replace('"','',$titlead);
			$titlead = str_replace("'","",$titlead);
			$titlead = str_replace(">","",$titlead);
			$titlead = str_replace("<","",$titlead);
			$titlead = str_replace("</","",$titlead);
			$titlead = str_replace("&%","",$titlead);
			$titlead = str_replace("script","",$titlead);
			$titlead = str_replace("(","",$titlead);
			$titlead = str_replace(")","",$titlead);
			if($badurlmedia == 0){
				if($badurlredir == 0){
					if ($urlredir&&$active&&$advtypeedit&&$countryinput&&$titlead){
						// Update vales in DB
						$sqledit = mysql_query("INSERT INTO Ads_All VALUES('','$titlead','$session_username','$advtypeedit','$urlredir','$urlmedia','0','$countryinput','','','$active','0')");
						// Link Successfully edited
						?>
						<div style="margin-top: -80px;" class="alert alert-success" role="alert">
							<strong>Well done!</strong> Ad successfully created!
						</div>
						<?php
					}else {
						?>
						<div style="margin-top: -80px;" class="alert alert-danger" role="alert">
							<strong>Sorry!</strong> Please fill all required inputs!
						</div>
						<?php
					}
				}else {
						?>
						<div style="margin-top: -80px;" class="alert alert-danger" role="alert">
							<strong>Sorry!</strong> Please enter URL in right format, ex: http://google.com. You entered:<?php echo $urlredir;?> (<?php echo $badurlredir; ?>)
						</div>
						<?php
				}
			}else {
						?>
						<div style="margin-top: -80px;" class="alert alert-danger" role="alert">
							<strong>Sorry!</strong> Please enter media URL in right format, ex: http://google.com. You entered:<?php echo $urlmedia;?> (<?php echo $badurlmedia; ?>)
						</div>
						<?php
			}

}
if ( isset( $_POST[ 'submitad' ] ) )
{
    try
    {
        // Run CSRF check, on POST data, in exception mode, for 10 minutes, in one-time mode.
        NoCSRF::check( 'csrf_token', $_POST, true, 60*10, false );
        // form parsing, DB inserts, etc.
        // ...
        $result = 'CSRF check passed. Form parsed.';
    }
    catch ( Exception $e )
    {
        // CSRF attack detected
        echo"<script type='text/javascript'>javascript: window.history.go(-1);</script>";
    }
}
else
{
    $result = 'No post data yet.';
}
$token = NoCSRF::generate( 'csrf_token' );
if($_POST['submitlink']) {
$url = $_POST['url'];
	$badurl = 0;
	// Remove all illegal characters from a url
	$url = filter_var($url, FILTER_SANITIZE_URL);
	
	if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&#\/%?=~_|!:,.;]*[-a-z0-9+&#\/%=~_|]/i",$url)) {
  		$badurl = 1;
  		?>
  		<div style="margin-top: -80px;" class="alert alert-danger" role="alert">
			<strong>Sorry!</strong> Please enter URL in right format, ex: http://google.com
		</div>
		<?php
	}elseif (!preg_match("*[.]*",$url)) {
  		$badurl = 1;
  		?>
  		<div style="margin-top: -80px;" class="alert alert-danger" role="alert">
			<strong>Sorry!</strong> Please enter URL in right format, ex: http://google.com
		</div>
		<?php
	}elseif (!isset($url)) {
	   $badurl = 1;
	   ?>
  		<div style="margin-top: -80px;" class="alert alert-danger" role="alert">
			<strong>Sorry!</strong> Please enter URL in right format, ex: http://google.com
		</div>
		<?php
	}elseif (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED) === true) {
		$badurl = 1;
		?>
  		<div style="margin-top: -80px;" class="alert alert-danger" role="alert">
			<strong>Sorry!</strong> Please enter URL in right format, ex: http://google.com
		</div>
		<?php
	}else {
		?>
  		<div style="margin-top: -80px;" class="alert alert-success" role="alert">
			<strong>Success!</strong> Link successfully generated.
		</div>
		<?php
	}
}
	//ADVERTISER
	$queryCAMPAIGNS = "SELECT COUNT(id) AS numrows FROM Ads_All WHERE owner='$session_username'";
	$resultCAMPAIGNS  = mysql_query($queryCAMPAIGNS) or die('aaa');
	$rowCAMPAIGNS     = mysql_fetch_array($resultCAMPAIGNS, MYSQL_ASSOC);
	$numCAMPAIGNS = $rowCAMPAIGNS['numrows'];
	
	$graphCAMPAIGN = mysql_fetch_array(mysql_query("SELECT * FROM Accounts_Classic_Advertisers WHERE username='$session_username'"));
	$graphCAMPAIGNS[1] = $graphCAMPAIGN['date1'];
	$graphCAMPAIGNS[2] = $graphCAMPAIGN['date2'];
	$graphCAMPAIGNS[3] = $graphCAMPAIGN['date3'];
	$graphCAMPAIGNS[4] = $graphCAMPAIGN['date4'];
	$graphCAMPAIGNS[5] = $graphCAMPAIGN['date5'];
	$graphCAMPAIGNS[6] = $graphCAMPAIGN['date6'];
	$graphCAMPAIGNS[7] = $graphCAMPAIGN['date7'];
	$weirdooCAMPAIGNS = $graphCAMPAIGNS[1] + $graphCAMPAIGNS[2] + $graphCAMPAIGNS[3] + $graphCAMPAIGNS[4] + $graphCAMPAIGNS[5] + $graphCAMPAIGNS[6] + $graphCAMPAIGNS[7];
	// PUBLISHER
	$queryLINKS = "SELECT COUNT(id) AS numrows FROM Links_All WHERE username='$session_username'";
	$resultLINKS  = mysql_query($queryLINKS) or die('sss');
	$rowLINKS     = mysql_fetch_array($resultLINKS, MYSQL_ASSOC);
	$numLINKS = $rowLINKS['numrows'];
			
	$graphLINK = mysql_fetch_array(mysql_query("SELECT * FROM Accounts_Classic_Publishers WHERE username='$session_username'"));
	$graphLINKS[1] = $graphLINK['date1'];
	$graphLINKS[2] = $graphLINK['date2'];
	$graphLINKS[3] = $graphLINK['date3'];
	$graphLINKS[4] = $graphLINK['date4'];
	$graphLINKS[5] = $graphLINK['date5'];
	$graphLINKS[6] = $graphLINK['date6'];
	$graphLINKS[7] = $graphLINK['date7'];
	$weirdooLINKS = $graphLINKS[1] + $graphLINKS[2] + $graphLINKS[3] + $graphLINKS[4] + $graphLINKS[5] + $graphLINKS[6] + $graphLINKS[7];
?>
  <div class="container">
    <div class="text-center">
      <h1><?php echo $title; ?>
      	<small>/
      			<?php
						$accounttypenow = $_SESSION['acctype'];
						if($accounttypenow == 0){//Publisher
					?>
							Active is: Publisher Account
					<?php
						}
						if($accounttypenow == 1){//Advertiser
					?>
							Active is: Advertiser Account
					<?php
						}
					?>
			</small>
		</h1>
 	 </div>
		</br>
		<?php
$accounttypenow = $_SESSION['acctype'];
if($accounttypenow == 0){//Publisher
if($_POST['submitlink']) {
$url = $_POST['url'];
$adtitle = $_POST['adtitle'];
$adtitle = AntiXSS::setEncoding($adtitle, "UTF-8");
$adtitle = str_replace('"','',$adtitle);
$adtitle = str_replace("'","",$adtitle);
$adtitle = str_replace(">","",$adtitle);
$adtitle = str_replace("<","",$adtitle);
$adtitle = str_replace("</","",$adtitle);
$adtitle = str_replace("&%","",$adtitle);
$adtitle = str_replace("script","",$adtitle);
$adtitle = str_replace("(","",$adtitle);
$adtitle = str_replace(")","",$adtitle);
if(isset($_POST['password'])) {
	$passwordnew = md5($_POST['password']);
}
$adtype = $_POST['adtype'];
if($adtype == 'interstitial') {
	$adverttype = 'interstitial';
}elseif($adtype == 'banner') {
	$adverttype = 'banner';
}elseif($adtype == 'video') {
	$adverttype = 'video';
}elseif($adtype == 'none') {
	$adverttype = 'none';
}else {
	$badurl = 1;
}
	
	if($badurl == 1){
		?>
		<div class="row">
      <div class="col-md-8 col-md-offset-2">
		<div class="well">
			<div class="row">
				<form name="csrf_form" id="shrinkform" action="" method="POST">
					<div data-original-title="Enter your long URL" data-toggle="tooltip" data-placement="top" title="" class="input-group">
							<input class="form-control" placeholder="http://" name="url" type="text">
							<span class="input-group-btn">
								<input value="<?php echo $a012; ?>" class="btn btn-default" style="width: 150px;" name="submitlink" type="submit">
							</span>				
					</div>
					<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
				</form>
				</br>
				<div class="col-md-10 col-md-offset-2">
					<h4>Please enter URL in right format, ex: http://google.com</h4>
				</div>
			</div>
        </div>
      </div>
    </div>
    <?php
	}elseif ($url){

	// THESE CHARACTERS ARE ALLOWED IN SHORTENED LINK ex. adp.ay/CHARACTER >> adp.ay/d6w8s9a4
  $charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  $len = 5;
  $numrows = 1;
  
  while ($numrows != 0){
  for ($i = 0; $i <= $len; $i++) {
      $rand = rand() % strlen($charset);
      $tmp = substr($charset,$rand, 1);
      $code .= $tmp;
  }
  
  $query = mysql_query("SELECT * FROM Links_All WHERE code='$code'");
  $numrows = mysql_num_rows($query);
  }

	$url = mysql_real_escape_string($url);
  mysql_query("INSERT INTO Links_All VALUES ('', '$url', '$code','$session_username','$adverttype','0','0.00','$adtitle','$password')");
  $qstats = mysql_query("UPDATE Web_Stats SET sclinks7=sclinks7 + '1' WHERE id='1'");
  $query = mysql_query("SELECT * FROM Links_All WHERE code='$code'");
  $numrows = mysql_num_rows($query);
	
  if($numrows == 1){

?>
	<div class="row">
      <div class="col-md-8 col-md-offset-2">
		<div class="well">
			<div class="row">
				<form name="csrf_form" id="shrinkform" action="" method="POST">
					<div data-original-title="Enter your long URL" data-toggle="tooltip" data-placement="top" title="" class="input-group">
							<input readonly="readonly" onmouseover="this.select()" style="cursor:copy; opacity: 1;text-align: center;" class="form-control" value='<?php echo"$mainurl$code"; ?>' name="url" type="text">
							<span class="input-group-btn">
								<input value="Another" class="btn btn-default" style="width: 150px;" name="createanother" type="submit">
							</span>				
					</div>
					<center>
					<div style="top: -5px;" class="fb-share-button" data-href="<?php echo"$mainurl$code"; ?>" data-layout="button"></div>
					<a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo"$mainurl$code"; ?>" data-count="none">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
					<div class="g-plus" data-action="share" data-annotation="none" data-href="<?php echo"$mainurl$code"; ?>"></div>
					<script src="https://apis.google.com/js/platform.js" async defer>
  						{lang: 'en-GB'}
					</script>		
					<center>
					<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
				</form>
				</br>
				<div class="col-md-10 col-md-offset-2">
					<h4><?php echo $a021; ?> <?php echo $title; ?></h4>
				</div>
			</div>
        </div>
      </div>
    </div>	

<?php
  }
  else{
  echo"<div class='jbar' style='bottom: 1%; right: 1%; opacity: 1;' align='center'><div class='content error' align='center'>$a238</div></div>";
  }     
 }
 else"<script type='text/javascript'>window.location='f.Dashboard'</script>";
}
else
{
?>
	<div class="row">
      <div class="col-md-8 col-md-offset-2">
		<div class="well">
			<div class="row">
				<center>
				<form name="csrf_form" id="shrinkform" action="" method="POST">
					<div data-original-title="Enter your long URL" data-toggle="tooltip" data-placement="top" title="555" class="input-group">
							<input class="form-control" placeholder="http://" name="url" type="text">
							<span class="input-group-btn">
								<input value="<?php echo $a012; ?>" class="btn btn-default" style="width: 150px;" name="submitlink" type="submit">
							</span>
					</div>
					<div data-original-title="Enter your long URL" data-toggle="tooltip" data-placement="top" title="555" class="input-group">
							<center>
							<input style="width:50%" class="form-control" placeholder="Title" name="adtitle" type="text">
							<input style="width:50%" class="form-control" placeholder="Password" name="password" type="text">
							<?php if($sa['interstitialactive'] == '1') {
							?>
							<input id="interstitial" class="toggle toggle-left" name="adtype" value="interstitial" type="radio" checked><label class="btn btn-default" for="interstitial" class="btn">Interstitial</label>
							<?php
							}
							?>
							<?php if($sa['banneractive'] == '1') {
							?>
							<input id="banner" class="toggle toggle-right" name="adtype" value="banner" type="radio"><label class="btn btn-default" for="banner" class="btn">Banner</label>
							<?php
							}
							?>
							<?php if($sa['videoactive'] == '1') {
							?>
							<input id="video" class="toggle toggle-right" name="adtype" value="video" type="radio"><label class="btn btn-default" for="video" class="btn">Video</label>
							<?php
							}
							?>
							<input id="none" class="toggle toggle-right" name="adtype" value="none" type="radio"><label class="btn btn-default" for="none" class="btn">None</label>
							</center>					
					</div>
					<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
				</form>
				</br>
				</center>
				<center>
					<h4><?php echo $a016; ?></h4>
				</center>
			</div>
        </div>
      </div>
    </div>
<?php
}
}
if($accounttypenow == 1){//Advertiser
?>
	<div class="row">
      <div class="col-md-8 col-md-offset-2">
		<div class="well">
			<div class="row">
				<center>
				<form name="csrf_form" id="campaignform" action="" method="POST">
					<div data-original-title="Enter your long URL" data-toggle="tooltip" data-placement="top" title="555" class="input-group">
							<input class="form-control" placeholder="Iframe URL [Interstitial], Redirect URL [Video or Banner]" name="urlredir" type="text">
							<span class="input-group-btn">
								<input value="Create ad" class="btn btn-default" style="width: 150px;" name="submitad" type="submit">
							</span>
					</div>
					<div data-original-title="Enter your long URL" data-toggle="tooltip" data-placement="top" title="555" class="input-group">
							<center>
							<input style="width:50%" class="form-control" placeholder="Media URL [Video or Banner]" name="urlmedia" type="text">
							<input style="width:50%" class="form-control" placeholder="Title" name="title" type="text">
							<select style="width:100%" class="form-control" name='countryinput'>
								<option value='ALL'>Countries</option>
								<?php
									$countrieslist = mysql_query("SELECT * FROM Web_Countries ORDER BY id ASC");
									while($rowc = mysql_fetch_array($countrieslist)) 
									{
										echo"<option value='{$rowc['country']}'>{$rowc['country']}</option>";
									}
								?>
							</select>
							</br>
							<?php if($sa['interstitialactive'] == '1') {
							?>
							<input id="interstitial" class="toggle toggle-left" name="adtype" value="interstitial" type="radio" checked><label style="min-width:20%;width:auto" class="btn btn-default" for="interstitial" class="btn">Interstitial</label>
							<?php
							}
							?>
							<?php if($sa['banneractive'] == '1') {
							?>
							<input id="banner" class="toggle toggle-right" name="adtype" value="banner" type="radio"><label style="min-width:20%;width:auto" class="btn btn-default" for="banner" class="btn">Banner</label>
							<?php
							}
							?>
							<?php if($sa['videoactive'] == '1') {
							?>
							<input id="video" class="toggle toggle-right" name="adtype" value="video" type="radio"><label style="min-width:20%;width:auto" class="btn btn-default" for="video" class="btn">Video</label>
							<?php
							}
							?>
							</br>
							<input id="activated" class="toggle toggle-left" name="active" value="1" type="radio" checked><label style="min-width:30.2%;width:auto" class="btn btn-default" for="activated" class="btn">Activated</label>
							<input id="deactivated" class="toggle toggle-right" name="active" value="0" type="radio"><label style="min-width:30.2%;width:auto" class="btn btn-default" for="deactivated" class="btn">Deactivated</label>
							</center>					
					</div>
					<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
				</form>
				</br>
				</center>
				<center>
					<h4>Create traffic on your website, we will boost your business.</h4>
				</center>
			</div>
        </div>
      </div>
    </div>
<?php
}
?>
	<div class="text-center">
      <h1><small>Publisher's account</small></h1>
 	</div>
		<div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">
              <?php echo $a002; ?></h3>
            </div>
            <div class="panel-body">
            	<?php echo $numLINKS ?>
            </div>
          </div>
          <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title"><?php echo $a067; ?></h3>
            </div>
            <div class="panel-body">
              <?php echo"{$acu['ISO']}"; ?> <?php echo"{$seeP['balance']}"; ?>
            </div>
          </div>
        </div>
        <div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title"><?php echo $a018; ?></h3>
            </div>
            <div class="panel-body">
              <?php echo"{$seeP['date7']}"; ?>
            </div>
          </div>
          <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title"><?php echo $a066; ?></h3>
            </div>
            <div class="panel-body">
              <?php echo $graphLINKS[7]; ?>
            </div>
          </div>
        </div>
        <div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Yesterday</h3>
            </div>
            <div class="panel-body">
              <?php echo"{$seeP['date6']}"; ?>
            </div>
          </div>
          <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title">Last logged in IP</h3>
            </div>
            <div class="panel-body">
              <?php echo"{$seeP['last1ip']}"; ?>
            </div>
          </div>
        </div>
        </br>
        </br>
   <div class="text-center">
      <h1><small>Advertiser's account</small></h1>
 	</div>
        <div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">
              <?php echo $a052; ?></h3>
            </div>
            <div class="panel-body">
            	<?php echo $numCAMPAIGNS ?>
            </div>
          </div>
          <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title"><?php echo $a067; ?></h3>
            </div>
            <div class="panel-body">
              <?php echo"{$acu['ISO']}"; ?> <?php echo"{$seeA['balance']}"; ?>
            </div>
          </div>
        </div>
        <div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title"><?php echo $a018; ?></h3>
            </div>
            <div class="panel-body">
              <?php echo"{$seeA['date7']}"; ?>
            </div>
          </div>
          <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title"><?php echo $a066; ?></h3>
            </div>
            <div class="panel-body">
              <?php echo $graphCAMPAIGNS[7]; ?>
            </div>
          </div>
        </div>
        <div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Yesterday</h3>
            </div>
            <div class="panel-body">
              <?php echo"{$seeA['date6']}"; ?>
            </div>
          </div>
          <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title">Last logged in IP</h3>
            </div>
            <div class="panel-body">
              <?php echo"{$seeA['last1ip']}"; ?>
            </div>
          </div>
        </div>
    <div class="text-center">
      <h1><small>Other informations</small></h1>
 	</div>
        <div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">
						Your country           
              </h3>
            </div>
            <div class="panel-body">
            	<?php echo"{$seeP['country']}"; ?>
            </div>
          </div>
        </div>
        <div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Referred users</h3>
            </div>
            <div class="panel-body">
              <?php echo"{$seeP['totalrefs']}"; ?>
            </div>
          </div>
        </div>
        <div class="col-sm-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Referral earnings</h3>
            </div>
            <div class="panel-body">
              <?php echo"{$seeP['refearnings']}"; ?>
            </div>
          </div>
        </div>
</div>

<?php
include('other_footer.php');
?>
