Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2.  
  3. require_once 'autoload.php';
  4.  
  5.  
  6. $sql = new Mysql;
  7. $query = $sql->SqlQuery("SELECT * FROM email WHERE status <> 'entregue'");
  8.  
  9. $verificaLinha = mysql_num_rows($query);
  10.  
  11. if ($verificaLinha != 0) {
  12.     while ($array_result = mysql_fetch_array($query)) {
  13.         $id = $array_result["id"];
  14.         $nome = $array_result["nome"];
  15.         $email = $array_result["email"];
  16.         $code = $array_result["code"];
  17.         $hashbanco = $array_result["hash"];
  18.  
  19.         $rastreia = new buscaEncomenda();
  20.         $rastreia->validaCode($code);
  21.         $hashatual = $rastreia->hash;
  22.  
  23.         if ($hashbanco != $hashatual) {
  24.             $cronEmail = new cronEmail($email, $code, $nome);
  25.  
  26.             $cronEmail->enviaEmail();
  27.  
  28.  
  29.         } else {
  30.             echo "faz nada";
  31.         }
  32.     }
  33. }
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement