






<?php
 //$txnid= $_GET['txnId'];
 
session_start();



$bizname = $_SESSION['biz_name'];

$status = $_SESSION['status'];
$privilage = $_SESSION['privilage']; 


$background_color =$_SESSION['background_color'];
$text_color =$_SESSION['text_color'];

		$bottom_backgroundcolor = $_SESSION['bottom_backgroundcolor'] ;
		$bottom_textcolor = $_SESSION['bottom_textcolor'] ;









 

?>


<?php

 
$app_name = $_SESSION['app_name'];
  $db_size = $_SESSION['db_size'];




$current_date = date("Y-m-d");
$activation_d = $_SESSION['activation_date'];
 $expiration_d = $_SESSION['expiration_date'];
/*




?>




<?php


$date1 = date_create("$current_date");

$date2 = date_create($expiration_d);


$date_diff = date_diff($date1,$date2);

echo '<br>';

   $date_diff->format("%a ")
	
	 ?>











<?php
require 'config.php';



//================================================================================
//web_server


//================================================================================

/*



	if($date_diff->format("%R%a ") >0){
								
								
								
//echo  $activation_date = date("Y-m-d");
								
								
								  $activation_date = $expiration_d;

echo "<br>";

		
	
								
						//echo	 $duration = $_SESSION['duration'];	
		
		
						
echo	$expiration_date = $expiration_d;

						
						
						
						
						
						
						
						$SQl_update ="UPDATE  `login` SET `expiration_date`='$expiration_date' WHERE app_code = '$app_code'";

		
		$result = $db_login->query($SQl_update);
		
								
								
	
		https://lawped.com.ng/LBS/pin_mgt.php?
		
		$errorMessage = $duration."days activation is successful";
		//header ("Location: http://127.0.0.1/LBS/pin_mgt.php?txnfailed=$errorMessage");
		
		header ("Location: https://lawped.com.ng/LBS/pin_mgt.php?txnfailed=$errorMessage");
		
//	header ("Location: http://127.0.0.1/LBS/pin_mgt.php");

	//subscription is still  valid
													
							}
						
						
						
					else if($date_diff->format("%R%a ") <0){
						
						
						
						

  $activation_dat = date("Y-m-d");

	
						
						
	echo   $expiration_d;

					//	 $duration = $_SESSION['duration'];	
						
						
						
						
						
						
						
						$SQl_update ="UPDATE `login` SET `activation_date`='$activation_dat',`expiration_date`='$expiration_dat' WHERE app_code = '$app_code'";

		
		$result = $db_login->query($SQl_update);
						
						
					//	echo	 $duration = $_SESSION['duration'];	
		
				
						
						
					
						$errorMessage = $duration."days activation is successful";
						
						header ("Location: https://lawped.com.ng/LBS/pin_mgt.php?txnfailed=$errorMessage");
						
						//header ("Location: http://127.0.0.1/LBS/pin_mgt.php?txnfailed=$errorMessage");
		
//	header ("Location: dash_exp.php");

	//subscription is over due
													
							}









*/




















































?>


  



	<html>
		
			<title>Product Key</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->	
		 <link href="css/bootstrap-4.4.1.css" rel="stylesheet">
		 <link href="css/popup.css" rel="stylesheet">
		
		
	<head>



	</head>

	
		
		
		<style>
			body, html {
background-color: #C1C1C4;
}
			
			
			
		
				.loader {
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid blue;
  border-right: 16px solid green;
  border-bottom: 16px solid red;
  border-left: 16px solid pink;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 1s linear infinite;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
		
		</style>
		
		
		
		

<body onLoad=" spinner()">
	
	<a href="logout.php"><input type="button" value="Back" onClick="spinner()" style= "width:; height: inherit; float: " > </a>	
	<div class="jumbotron-fluid" style="text-align: center;background-color:; margin: auto" >

	
		
			<div class="container-fluid">
		
				
		
		
				<div class="jumbotron" style="margin: auto; background-color:">
				
				
				
		<div class="row">
			
			
		
			<div class="col-md-4">
			
				
			</div>
			
			
			<div class="col-md-4" style="">
			
				
			<div class="input-group mb-3" style="">
													
  
													<div class="input-group-prepend">
														
														
														
														
    
														
														<span class="input-group-text" id="basic-addon1" > Have Purchase a new <?php echo $_SESSION['key_update'] ; ?> </span>
															
														
														
										<a href="cloud_pin_mgt.php">
											
											
											
											
											
											<input type="submit" value="Continue" onClick="spinner()" name = "A" style= "width:; height: inherit;; float: " class="btn btn-dark" >  			
														</a>
												
  
				</div>			
											
				
				</div>
																		
  
												
					
					
					
				
											
												
							
												
						
				
			</div>
			
			
				<div class="col-md-4">
		
			</div>
			
			
		</div>
		
	
	</div>
		
			
			</div>
			
	
	
	
	</div>
	
	
	


			
	
		<div class="loader" id="spin" style="margin: auto"></div>

	
		</body>
	
			</html>

		
		

<script>


		function spinner() {
  
			var x = document.getElementById("spin");
	
	
	
  if (x.style.display === "none") {
    x.style.display = "block ";
	  
	  
  }
	else {
    x.style.display = "none";
  }
	
	
}
	
		

function CustomAlert(){
  this.alert = function(message,title){
    document.body.innerHTML = document.body.innerHTML + '<div id="dialogoverlay"></div><div id="dialogbox" class="slit-in-vertical"><div><div id="dialogboxhead"></div><div id="dialogboxbody"></div><div id="dialogboxfoot"></div></div></div>';

    let dialogoverlay = document.getElementById('dialogoverlay');
    let dialogbox = document.getElementById('dialogbox');
    
    let winH = window.innerHeight;
    dialogoverlay.style.height = winH+"px";
    
    dialogbox.style.top = "100px";

    dialogoverlay.style.display = "block";
    dialogbox.style.display = "block";
    
    document.getElementById('dialogboxhead').style.display = 'block';

    if(typeof title === 'undefined') {
      document.getElementById('dialogboxhead').style.display = 'none';
    } else {
      document.getElementById('dialogboxhead').innerHTML = '<i class="fa fa-exclamation-circle" aria-hidden="true"></i> '+ title;
    }
    document.getElementById('dialogboxbody').innerHTML = message;
    document.getElementById('dialogboxfoot').innerHTML = '<button class="pure-material-button-contained active" onclick="customAlert.ok()">OK</button>';
  }
  
  this.ok = function(){
    document.getElementById('dialogbox').style.display = "none";
    document.getElementById('dialogoverlay').style.display = "none";
  }
}

let customAlert = new CustomAlert();
	

</script>