Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. <?php session_start(); ?>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <link rel="shortcut icon" href="./rmilogo.png" type="img/png" />
  7. <title>Welcome!</title>
  8.  
  9. <?php session_start(); ?>
  10. <?php
  11.  
  12. function getDealer() {
  13. require '../data/DealerDB.php';
  14.  
  15. $action = filter_input(INPUT_POST, 'response');
  16. $dealerID = filter_input(INPUT_POST, 'dCode');
  17. new DealerDB('****************', $dealerID);
  18.  
  19. $cmpDealer = $_SESSION['dealer'];
  20.  
  21. if (!$cmpDealer['dCode'] == '' || !is_null($cmpDealer['dCode'])) {
  22. require '../business/AutoEmail.php';
  23.  
  24. try{
  25. new AutoEmail($action, $cmpDealer['dCode']);
  26. }catch(Exception $e) {
  27. trigger_error('Message: ' . $e->getTraceAsString());
  28. }
  29. header("Location: http://www.*******.com/welcome.php");
  30. } else {
  31. header("Location: http://www.*******.com/error.html");
  32. }
  33. }
  34.  
  35. getDealer();
  36.  
  37. <?php session_start(); ?>
  38. <?php
  39.  
  40. $_SESSION['dealer'] = null;
  41. require '../business/Dealer.php';
  42.  
  43.  
  44.  
  45.  
  46. class DealerDB {
  47.  
  48. private $host;
  49. private $user;
  50. private $passkey;
  51. private $db;
  52.  
  53. function __construct($db, $dealerCode) {
  54.  
  55. $this->host = '*******';
  56. $this->user = '*******';
  57. $this->passkey = '*******';
  58. $this->db = $db;
  59.  
  60. $_SESSION['dealer'] = $this->buildDealer($dealerCode);
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement