Esempio n. 1
0
<?php

session_start();
error_reporting(E_ALL ^ E_NOTICE);
@(include_once 'config/config.php');
@(include_once '../../config/config.php');
require_once __PATH__ . '/package/apl/AplCar.php';
$apl = new AplCar();
if (preg_match('/^(an-get-car){1}$/', $_POST['method'])) {
    $car = new Car();
    $car->setId(empty($_POST['lastId']) ? 0 : $_POST['lastId']);
    $arrayCars = $apl->getCars($car);
    require_once __PATH__ . '/view/car-make.php';
}
// SCRIPT PARA CRIAR REGISTROS A SEREM VINCULADOS AO BD
/*$brand = array('Brand 1', 'Brand 2', 'Brand 3', 'Brand 4', 'Brand 5');
	$engine = array('V6', 'V8', 'W8', '24 valvs', 'V12');
	$images = array('car_01.jpg',
		'car_02.jpg',
		'car_03.jpg',
		'car_04.jpg',
		'car_05.jpg',
		'car_06.jpg',
		'car_07.jpg',
		'car_08.jpg',
		'car_09.jpg',
		'car_10.jpg',
		'car_11.jpg',
		'car_12.jpg',
		'car_13.jpg',
		'car_14.jpg',
Esempio n. 2
0
        $detailtype = $blDetailType->getDetailType($car->getDetailTypeId());
    }
    $pagelocation = "Edit Car > " . $car->getType();
} else {
    $car = new Car(0, 0, $site->getDefaultCarBrandId(), null, null, null, null, null, null, null, null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, null, null);
    $detailtype = $blDetailType->getDetailType(1);
    $pagelocation = "Add Car";
}
////////////////////////
//Start post          //
////////////////////////
if (isset($_POST["carid"])) {
    ////////////////////////
    //car administration  //
    ////////////////////////
    $car->setId($_POST["carid"]);
    $car->setSiteId($site->getId());
    $car->setCarBrandId($_POST["carbrand"]);
    $car->setType(trim($_POST["type"]));
    $car->setTypeShort(trim($_POST["typeshort"]));
    $car->setReleaseDate($_POST["releasedateyear"] . "/" . $_POST["releasedatemonth"] . "/01");
    $car->setPreviewLink($_POST["previewlink"]);
    $car->setMovieFolder($_POST["moviefolder"]);
    //detailtype
    $detailtype = $blDetailType->getDetailTypeByOnlyLink($_POST["detail"]);
    $car->setDetailTypeId($detailtype->getId());
    //presscontacts
    if ($_POST["presscontactid"] != 0) {
        $car->setPressContactId($_POST["presscontactid"]);
        $presscontact->setId($_POST["presscontactid"]);
        $presscontact->setName($_POST["presscontactname"]);