* User: roessler * Date: 16/09/15 * Time: 1:22 PM */ /** * Backend page for administrators and Staff of Cyril's Classic Employees to edit employees */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_SESSION['authenticated'])) { if ($_SESSION['authenticated'] == true) { $editResult = null; $sellerCon = new SellerController(); $personCon = new PersonController(); $offerCon = new OfferController(); $featureCon = new FeatureController(); $foCon = new Feature_OfferController(); $mediaCon = new MediaController(); $carCon = new CarController(); $offerId = null; $sellerId = null; $personId = null; $selectedFeatureIds = array(); $media = array(); $carId = null; $sellerName = null; $carRego = null; $preferredPrice = null; $description = null; $status = null; $offerDate = null; function checkSelected($id1, $id2)
* Date: 16/09/15 * Time: 1:22 PM */ /** * Backend page for administrators and Staff of Cyril's Classic Employees to edit employees */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_SESSION['authenticated'])) { if ($_SESSION['authenticated'] == true) { $editResult = null; $sellerCon = new SellerController(); $custCon = new CustomerController(); $personCon = new PersonController(); $offerCon = new OfferController(); $featureCon = new FeatureController(); $foCon = new Feature_OfferController(); $mediaCon = new MediaController(); $carCon = new CarController(); $makeCon = new MakeController(); $modelCon = new ModelController(); $saleCon = new SaleController(); $empCon = new EmployeeController(); $saleId = null; $offerId = null; $buyerId = null; $empId = null; $carId = null; $sellerName = null; $preferredPrice = null; $makeName = null; $modelName = null;
* User: roessler * Date: 16/09/15 * Time: 1:22 PM */ /** * Backend page for administrators and Staff of Cyril's Classic Employees to delete sellers */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_SESSION['authenticated'])) { if ($_SESSION['authenticated'] == true) { $deleteResult = null; $sellerCon = new SellerController(); $personCon = new PersonController(); $offerCon = new OfferController(); $featureCon = new FeatureController(); $foCon = new Feature_OfferController(); $mediaCon = new MediaController(); $carCon = new CarController(); $offerId = null; $sellerId = null; $personId = null; $featureIds = array(); $featureNames = array(); $features = array(); $media = array(); $carId = null; $sellerName = null; $carRego = null; $preferredPrice = null; $description = null; $status = null;
<?php /** * Created by PhpStorm. * User: roessler * Date: 9/27/15 * Time: 2:01 PM */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_POST['txtOfferId'])) { $sellerCon = new SellerController(); $custCon = new CustomerController(); $personCon = new PersonController(); $offerCon = new OfferController(); $featureCon = new FeatureController(); $foCon = new Feature_OfferController(); $mediaCon = new MediaController(); $carCon = new CarController(); $makeCon = new MakeController(); $modelCon = new ModelController(); $saleCon = new SaleController(); $empCon = new EmployeeController(); $offer = $offerCon->getOffer($_POST['txtOfferId']); if ($offer->errorInfo()[2] == null) { $row = $offer->fetch(); $rowCount = count($row); if ($rowCount > 0) { $seller = $sellerCon->getSeller($row['seller_id']); $seller = $seller->fetch(); $person = $personCon->getPerson($seller['person_id']); $person = $person->fetch();
* User: roessler * Date: 16/09/15 * Time: 1:22 PM */ /** * Backend page for administrators and Staff of Cyril's Classic Cars to add and view offers */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_SESSION['authenticated'])) { if ($_SESSION['authenticated'] == true) { $addResult = null; $sellerCon = new SellerController(); $personCon = new PersonController(); $offerCon = new OfferController(); $featureCon = new FeatureController(); $foCon = new Feature_OfferController(); $mediaCon = new MediaController(); $carCon = new CarController(); if (isset($_POST['hdnAction'])) { if ($_POST['hdnAction'] == 'insert') { $nextOfferId = $offerCon->getNextOfferId(); if (isset($_FILES['media'])) { $validExts = array('jpeg', 'jpg', 'png'); $targetPath = DIR_VIEW . 'images' . DIRECTORY_SEPARATOR . 'car_images' . DIRECTORY_SEPARATOR; if (!empty($_FILES)) { $fileCount = count($_FILES['media']['name']); $media = array(); for ($i = 0; $i < $fileCount; $i++) { if ($_FILES['media']['size'][$i] <= 0) { unset($_FILES['media']['name'][$i]); unset($_FILES['media']['size'][$i]);