Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php session_start(); ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link rel="shortcut icon" href="./rmilogo.png" type="img/png" />
- <title>Welcome!</title>
- <?php session_start(); ?>
- <?php
- function getDealer() {
- require '../data/DealerDB.php';
- $action = filter_input(INPUT_POST, 'response');
- $dealerID = filter_input(INPUT_POST, 'dCode');
- new DealerDB('****************', $dealerID);
- $cmpDealer = $_SESSION['dealer'];
- if (!$cmpDealer['dCode'] == '' || !is_null($cmpDealer['dCode'])) {
- require '../business/AutoEmail.php';
- try{
- new AutoEmail($action, $cmpDealer['dCode']);
- }catch(Exception $e) {
- trigger_error('Message: ' . $e->getTraceAsString());
- }
- header("Location: http://www.*******.com/welcome.php");
- } else {
- header("Location: http://www.*******.com/error.html");
- }
- }
- getDealer();
- <?php session_start(); ?>
- <?php
- $_SESSION['dealer'] = null;
- require '../business/Dealer.php';
- class DealerDB {
- private $host;
- private $user;
- private $passkey;
- private $db;
- function __construct($db, $dealerCode) {
- $this->host = '*******';
- $this->user = '*******';
- $this->passkey = '*******';
- $this->db = $db;
- $_SESSION['dealer'] = $this->buildDealer($dealerCode);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement