Esempio n. 1
0
<?php

include_once getcwd() . "/include/config.php";
include_once "classes/BLSite.php";
include_once "classes/BLCar.php";
include_once "classes/BLCarBrand.php";
include_once "classes/BLCarPicture.php";
include_once "classes/BLCarFile.php";
include_once "classes/BLCarLink.php";
include_once "classes/BLDetailType.php";
include_once "classes/BLPressContact.php";
include_once "classes/BLCarMovie.php";
include_once "classes/BLMovieType.php";
$blSite = new BLSite();
$blCar = new BLCar();
$blCarBrand = new BLCarBrand();
$blCarPicture = new BLCarPicture();
$blCarFile = new BLCarFile();
$blCarLink = new BLCarLink();
$blDetailType = new BLDetailType();
$blPressContact = new BLPressContact();
$blCarMovie = new BLCarMovie();
$blMovieType = new BLMovieType();
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if (!isset($_POST["site"])) {
    exit;
} else {
    $sitep = $_POST["site"];
Esempio n. 2
0
<?php

include_once getcwd() . "/classes/BLCar.php";
include_once getcwd() . "/classes/BLSiteOrder.php";
include_once getcwd() . "/classes/BLSite.php";
$blCar = new BLCar();
$crudCar = new CRUDCar();
$blSiteOrder = new BLSiteOrder();
$blSite = new BLSite();
if (isset($_GET["id"])) {
    $id = $_GET["id"];
    $car = $blCar->getCar($id);
    $site = $blSite->getSite($car->getSiteId());
    if ($car->getState() == "Design") {
        $car->setDateApproved(date('d/m/Y'));
        $car->setUserIdApproved($_SESSION["userid"]);
    }
    if ($site->getDefaultCarId() == null || $site->getDefaultCarId() == 0) {
        $site->setDefaultCarId($car->getId());
        $blSite->updateSite($site);
    }
    $foldername = clean_string(utf8_decode(str_replace(' ', '_', $car->getType())));
    $carfind = $blCar->getCarByFolderName($foldername);
    if ($carfind != null) {
        $nr = 1;
        while ($carfind != null) {
            $foldername = clean_string(utf8_decode(str_replace(' ', '_', $car->getType()))) . "(" . $nr . ")";
            $carfind = $blCar->getCarByFolderName($foldername);
            $nr++;
        }
    }
Esempio n. 3
0
<?php

include_once getcwd() . "/include/config.php";
include_once "classes/BLSite.php";
include_once "classes/BLCar.php";
include_once "classes/BLCarBrand.php";
include_once "classes/BLCarPicture.php";
include_once "classes/BLCarFile.php";
include_once "classes/BLCarLink.php";
include_once "classes/BLDetailType.php";
include_once "classes/BLPressContact.php";
include_once "classes/BLCarMovie.php";
include_once "classes/BLMovieType.php";
$blSite = new BLSite();
$blCar = new BLCar();
$blCarBrand = new BLCarBrand();
$blCarPicture = new BLCarPicture();
$blCarFile = new BLCarFile();
$blCarLink = new BLCarLink();
$blDetailType = new BLDetailType();
$blPressContact = new BLPressContact();
$blCarMovie = new BLCarMovie();
$blMovieType = new BLMovieType();
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if (!isset($_POST["site"])) {
    exit;
} else {
    $sitep = $_POST["site"];
Esempio n. 4
0
<?php

include_once getcwd() . "/classes/BLCar.php";
include_once getcwd() . "/classes/BLSite.php";
$blCar = new BLCar();
$crudCar = new CRUDCar();
$blSite = new BLSite();
if (isset($_GET["id"])) {
    $id = $_GET["id"];
    $car = $blCar->getCar($id);
    $site = $blSite->getSite($car->getSiteId());
    if ($car->getId() != $site->getDefaultCarId()) {
        $car->setState('Offline');
        $car->setFolderName(uniqid());
        $crudCar->updateCar($car);
    } else {
        echo "You can't set a default car to offline!";
    }
}
Esempio n. 5
0
<?php

// +----------------------------------------------------------
// | Auto-Press
// +----------------------------------------------------------
// | caradd.php
// |
// +----------------------------------------------------------
// | Jan Bevers
// +----------------------------------------------------------
// +----------------------------------------------------------
// | HTML-code
// +----------------------------------------------------------
include_once getcwd() . "/classes/BLSite.php";
include_once getcwd() . "/classes/BLPressContact.php";
$blSite = new BLSite();
$blPressContact = new BLPressContact();
////////////////////////
//get site            //
////////////////////////
if (isset($_GET["site"])) {
    $sitep = $_GET["site"];
} else {
    header("Location: /page/notfound");
}
$site = $blSite->getSiteByName($sitep);
if ($site == null) {
    header("Location: /page/notfound");
}
////////////////////////
//Start post          //
Esempio n. 6
0
<?php

// +----------------------------------------------------------
// | Auto-Press
// +----------------------------------------------------------
// | siteadministration.php
// |
// +----------------------------------------------------------
// | Jan Bevers
// +----------------------------------------------------------
// +----------------------------------------------------------
// | HTML-code
// +----------------------------------------------------------
include_once getcwd() . "/classes/BLSite.php";
$blSite = new BLSite();
$sites = $blSite->getSites();
$scripts = "";
$html = "";
$html .= "<table>";
$html .= "<tr>";
$html .= "<th>Name</th>";
$html .= "<th>Car Administration</th>";
$html .= "<th>Preview</th>";
$html .= "<th style=\"width:100px\">Valid</th>";
$html .= "<th>Generate HTML</th>";
$html .= "</tr>";
if ($sites != null) {
    foreach ($sites as $site) {
        $html .= "<tr>";
        $html .= "<td>" . $site->getName() . "</td>";
        $html .= "<td><a class='link' href='" . SUBFOLDER . "/page/caradministration/" . $site->getName() . "/'><img src=\"" . SUBFOLDER . "/css/images/icons/car-icon.png\" alt=\"car\" /></a></td>";
Esempio n. 7
0
<?php

include_once getcwd() . "/classes/BLSite.php";
$blSite = new BLSite();
if (isset($_GET["id"]) && isset($_GET["site"])) {
    $id = $_GET["id"];
    $siteid = $_GET["site"];
    $site = $blSite->getSite($siteid);
    $site->setDefaultCarId($id);
    $blSite->updateSite($site);
}