			<?php 
			include("sass/connection.php");
			include("sass/header_links_only.php");
			echo " <div class='wrapper row-offcanvas row-offcanvas-left'>
           
               <aside class='right-side'>
                <section class='content-header'>
                    <h1>
                      
                        <small>Control panel</small>
                    </h1>
                    <ol class='breadcrumb'>
                        <li><a href='index.php'><i class='fa fa-dashboard'></i> Home</a></li>
                        <li class='active'>Dashboard</li>
                    </ol>
                </section>
                 <section class='content'>
                 	 <div class='row'>
                        <div class='col-md-10'>
						<a href='index.php'><h2><i class='fa fa-dashboard'></i> Home</h2></a>";
						

							
							 if(isset($_POST['update_me']))
    {
		
		
		
		$afterslno = "57139s73086";
		
		
$real_mac = "10-1F-74-FA-04-2";
        $sl_no = mysqli_real_escape_string($connection,$_POST['sl_no']);
        $scrt_code = mysqli_real_escape_string($connection,$_POST['scrt_code']);
		
		
		
		
		$sl_no_full = explode("$afterslno",$sl_no);
	$sl_no = $sl_no_full[0];		
	$now_find_mac = $sl_no_full[1];
	
		$sl_no = base64_decode($sl_no);
		$now_find_mac = base64_decode($now_find_mac);
		
		
		
	
	if ($now_find_mac == $real_mac){	
	if ($sl_no == "Lonely_cat231" || $sl_no == "Only1AllahCanProtect" || $sl_no == "AllahuAkber" || $sl_no == "LaIlahaIllallah" || $sl_no == "hasbunallahuwanimalwakil" || $sl_no == "thereisnogdacceptAllah") { 
	
		mysqli_query($connection,"UPDATE transaction_history SET hint ='$scrt_code' WHERE payment_type = 'li'")
				or die(mysqli_error()); 

			
				
	$alert = "success" ;
	$errMsg="License Successfully Updated !";

	} else { 
	
	$errMsg="Wrong Code Or Serial No.";
$alert = "warning" ;

	}
	}
	
	else {
			$errMsg="Here is a problem. Please call 01818279054 ";
$alert = "warning" ;
		
	}


	}
							
							
							
							if (!empty($errMsg))
							{echo "<div class='alert alert-$alert alert-dismissible' role='alert'>$errMsg";
							echo "<button type='button' class='close' data-dismiss='alert'><span aria-hidden='false'>&times;</span><span class='sr-only'>		Close</span></button>
                        </div>";}
                       
                               echo "<form role='form'  action='update_days.php' method='post' id='login_form'>
                                    <div class='box-body'>
									  
									 <div class='form-group'>
                                            <label for='exampleInputEmail1'>Serial Number</label>
                                            <input type='text' class='form-control' name='sl_no' placeholder='Make sure no space in serial number' required>
                                        </div>  
										
									 <div class='form-group'>
                                            <label for='exampleInputEmail1'>Secret Code</label>
                                            <input type='text' class='form-control' name='scrt_code' placeholder='Make sure no space in Secret Code' required>
                                        </div>
                                       
                                        
                                    </div>
									
									<div class='box-footer'>
                                        <button type='submit' name='update_me' class='btn btn-primary'>Submit</button>
                                    </div>
                                </form>
                 		</div>
                    </div>
                 
                 
                 </section>
                </aside>
                
        </div>";
		include("sass/footer_for_datepicker_and_datatable.php");
    echo "</body>
</html>";
?>