Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="contact">
- <div class="container">
- <h1>Finalizar Compra</h1>
- <div class="contact-form">
- <div class="col-md-8 contact-grid">
- <form action="mailcl.php" method="post">
- <div class="container">
- <div class="check">
- <h1>Revisão</h1>
- <br>
- <br>
- <br>
- <?php
- echo 'Nome';
- echo '<input type="text" name="nome">';
- echo'Email';
- echo '<input type="text" name="email" >';
- echo'Senha';
- echo '<input type="password" name="senha" >';
- <div class="send">
- <input type="submit" value="Comprar">
- </div>
- </form>
- </div>';
- ?>
- //Codigo onde a compra é enviada no email
- <html>
- <title>Autenticando usuario</title>
- <head>
- <style type="text/css">
- </style>
- <script type="text/javascript">
- function LoginSucessfully(){
- setTimeout("window.location='index.php'",5000);
- }
- </script>
- </head>
- <body>
- </body>
- </html>
- <html>
- <title>Autenticando usuario</title>
- <head>
- <style type="text/css">
- </style>
- <script type="text/javascript">
- function LoginFailed(){
- setTimeout("window.location='finalizacompra.php'",5000);
- }
- </script>
- </head>
- <body>
- </body>
- </html>
- <?php
- require "PHPMailer-master/PHPMailerAutoload.php";
- $nome = $_POST['nome'];
- $email = $_POST['email'];
- $tabela = $_POST['tabela'];
- $mail = new PHPMailer;
- //$mail->SMTPDebug = 3; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'marveldc999loja@gmail.com'; // SMTP username
- $mail->Password = '**********'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom('from@example.com', 'MarvelDC');
- $mail->addAddress('marveldc999loja@gmail.com');
- $mail->addAddress($email); // Add a recipient
- //$mail->addAddress('ellen@example.com'); // Name is optional
- //$mail->addReplyTo('info@example.com', 'Information');
- //$mail->addCC('cc@example.com');
- //$mail->addBCC('bcc@example.com');
- //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
- //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = $email;
- $mail->Body = $nome;
- $mail->Body = $tabela;
- $mail->Subject = "Compra efeituada com sucesso!!!";
- $mail->Body = "<!DOCTYPE html>
- <html lang='pt-br'>
- <head>
- <meta charset='utf-8'/>
- <meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport'>
- <title>Título da Página (Estrutura básica de uma página com HTML 5)</title>
- <link href='css/seu-stylesheet.css' rel='stylesheet'/>
- <script src='scripts/seu-script.js'></script>
- </head>
- <body>
- <font color='black' face='arial' size='4px'>Olá, $nome<p>
- <h3>Recebemos o seu pedido!</h3><p> Deposite Nessa Conta o Valor da compra: 4752564814 01 Apos o deposito entraremos em contato para o envio!
- </font>
- $tabela
- </html>
- ";
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo"<center><font color = black>Email ou senha invalidos!!Aguarde um instante para tentar novamente.</font></center>";
- echo "<script>LoginFailed()</script>";
- }else{
- echo"
- <br>
- <br>
- ";
- echo"<center><h1><font color='black' face='arial' >O email foi enviado com sucesso!Aguarde um instante que voce sera redirecionado a pagina Home.</font></h1></center>";
- echo"<br> <br>";
- echo"<center><img src='images/carregamento.gif'></center>";
- echo"<script>LoginSucessfully()</script>";
- }
- ?>
Add Comment
Please, Sign In to add comment