<?php include_once getcwd() . "/classes/BLCarLink.php"; $blCarLink = new BLCarLink(); $carid = $_POST["carid"]; //link $carlink = $blCarLink->getCarLink($_GET["id"]); $carlink->setText($_POST["text"]); $carlink->setURL($_POST["url"]); $error = $blCarLink->updateCarLink($carlink); if (!is_numeric($error)) { foreach ($error as $er) { echo $er . " "; } }
<?php include_once getcwd() . "/classes/BLCarLink.php"; $blCarLink = new BLCarLink(); $carid = $_POST["carid"]; //link $carlink = new CarLink(0, $_POST["text"], $_POST["url"], $carid); $error = $blCarLink->insertCarLink($carlink); if (!is_numeric($error)) { foreach ($error as $er) { echo $er . "<br />"; } }
<?php include_once getcwd() . "/classes/BLCarLink.php"; $blCarLink = new BLCarLink(); $blCarLink->deleteCarLink($_GET["id"]);
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(); if (!isset($_GET["site"])) { header("Location: " . SUBFOLDER . "/page/notfound"); } else { $sitep = $_GET["site"]; } $foldername = ""; if (isset($_GET["folder"])) { $foldername = $_GET["folder"]; } //get site $site = $blSite->getSiteByName($sitep);
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ include_once getcwd() . "/classes/BLCarLink.php"; $blCarLink = new BLCarLink(); $carlinklist = $blCarLink->getCarLinksByCar($_GET["id"]); if ($carlinklist == null) { echo "No links."; } else { foreach ($carlinklist as $carlink) { echo ' Text: <input type="text" id="text-' . $carlink->getId() . '" size="20" value="' . $carlink->getText() . '" /> Url: <input type="text" id="url-' . $carlink->getId() . '" size="20" value="' . $carlink->getURL() . '" /> <a href="javascript:saveLink(' . $carlink->getId() . ', ' . $carlink->getCarId() . ')"><img src="' . SUBFOLDER . '/css/images/icons/save-icon.png" alt="Save" style="width:16px" /></a> <a href="javascript:removeLink(' . $carlink->getId() . ', ' . $carlink->getCarId() . ')"><img src="' . SUBFOLDER . '/css/images/icons/delete-icon.png" alt="Remove" /></a> <span class="error" id="errorlink-' . $carlink->getId() . '"></span> <br />'; } }