Ejemplo n.º 1
0
$car = new cars();
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$req = $_GET['req'];
if (isset($_SESSION['dealer'])) {
    // I'm a dealer
    $request = $user->getRequest($req);
    $request = $request[0];
    $id = $_SESSION['dealerID'];
    $select = "SELECT * FROM offers WHERE dealer_id = {$id} AND request_id = {$req}";
    $results = $user->db->get_results($select);
    $results = $results[0];
    $trim = $car->getNameByTrim($request['car_trim']);
    $price = $amount = "\$" . number_format($results['offered_price'], 2, '.', ',');
    $getCustomer = "SELECT * FROM customers WHERE customer_id IN (SELECT customer_id FROM requests WHERE request_id = {$req})";
    $cus = $user->db->get_results($getCustomer);
    $cus = $cus[0];
}
?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Remote file for Bootstrap Modal</title>  
</head>
<body>
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
Ejemplo n.º 2
0
    $message = $_POST['message'];
    $dealer = $_SESSION['dealerID'];
    $input = array('request_id' => $request, 'offered_price' => $price, 'offer_details' => $message, 'dealer_id' => $dealer);
    if ($user->db->insert('offers', $input)) {
        header('Location: http://onlinelotbuilder.com/controlpanel.php');
    }
}
if (isset($_SESSION['dealer'])) {
    foreach ($_GET as $key => $value) {
        $_GET[$key] = $user->db->filter($value);
    }
    $rid = $_GET['r'];
    $id = $_GET['dealer'];
    $offerDeets = $user->getRequest($rid);
    $offerDeets = $offerDeets[0];
    $trimNames = $car->getNameByTrim($offerDeets['car_trim']);
    $hidden = "<input type='hidden' id='request' name='request' value='{$rid}'>";
    $vehicle = <<<CAR
    <tr>
        <td>{$offerDeets['car_year']}</td>
        <td>{$offerDeets['makeName']}</td>
        <td>{$offerDeets['name']}</td>
        <td>{$trimNames['long']}</td>
    </tr>
CAR;
    ?>
    <h2>Send An Offer</h2>
    <table class="table table-hover">
        <thead>
          <tr>
            <th>Year</th>
Ejemplo n.º 3
0
        $zip = $value['dealer_zip'];
        $state = $value['dealer_state'];
    }
    // Since we're a dealer, we need to get a list of our inventory
    // This will populate the 'My Cars' Section
    $myCars = $user->getInventory($id);
    $check = array();
    foreach ($myCars as $key => $value) {
        $invID = $value['inventory_id'];
        $trim = $value['car_trim'];
        $year = $value['car_year'];
        $make = $value['makeName'];
        $model = $value['name'];
        //We'll use this later...
        array_push($check, $trim);
        $more = $cars->getNameByTrim($trim);
        $longName = $more['long'];
        $carTable .= <<<CARINFO
<tr>
    <td>{$year}</td>
    <td>{$make}</td>
    <td>{$model}</td>
    <td>{$longName}</td>
    <td style='text-align: center;'><a href="utils/delcar.php?req={$invID}"><span class="glyphicon glyphicon-remove"></span></a></td>
</tr>
CARINFO;
    }
    // Lets find some matches and build out that INFO
    $matchTable = <<<MATCHTABLE
<table class="table table-hover">
                <thead>