Exemplo n.º 1
0
 */
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;
        $year = null;
        $rego = null;
        $description = null;
        $features = array();
        $deductions = null;
Exemplo n.º 2
0
    #$p['code'] = $_GET['code'];
    #$p['name'] = $_GET['name'];
    $pos = 1;
    $_SESSION['p'] = $p;
} else {
    $p = $_SESSION['p'];
}
if ($pos == "") {
    $pos = $_SESSION['page'];
}
$_SESSION['page'] = $pos;
#煥頁時,指定action 為 list
if ($action == "" and $pos > 0) {
    $action = "list";
}
$a = new SaleController($conn);
$a->lang = $lang;
$a->UserLevel = $UserLevel;
$a->UserID = $UserID;
$a->lang_str = $lang_str;
$a->func = 'SAL';
//print_r($a);
switch ($action) {
    case "list":
        $a->browse($p, 5, $pos);
        break;
    case "add":
        $a->add();
        break;
    case "edit":
        $a->edit($id);
Exemplo n.º 3
0
 */
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();
        $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();
        if (isset($_POST['hdnAction'])) {
            if ($_POST['hdnAction'] == 'insert') {
                $result = $saleCon->insertSale($_POST['txtOfferId'], $_POST['txtEmpId'], $_POST['txtBuyerId'], $_POST['txtDeductions'], $_POST['txtTotal']);
                if ($result->errorInfo()[2] == null) {
                    $offer = $offerCon->getOffer($_POST['txtOfferId']);
                    $offer = $offer->fetch();
                    $result = $offerCon->updateOffer($offer['offer_id'], $offer['seller_id'], $offer['car_id'], $offer['description'], 'sold', $offer['preferred_price']);
                    if ($result->errorInfo()[2] == null) {
                        $addResult = true;
                    } else {
                        $addResult = $result->errorInfo()[2];
                    }
                } else {
                    $addResult = $result->errorInfo()[2];
Exemplo n.º 4
0
 */
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();
        $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;
        $year = null;
        $rego = null;
        $description = null;
        $features = array();
        $deductions = null;
Exemplo n.º 5
0
<?php

/**
 * Created by PhpStorm.
 * 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 sales
 */
require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php';
if (isset($_SESSION['authenticated'])) {
    if ($_SESSION['authenticated'] == true) {
        $saleCon = new SaleController();
        ?>
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
            <meta name="description" content="">
            <meta name="author" content="">
            <link rel="icon" href="../../favicon.ico">

            <title>Cyril's Classic Cars | Administration - Sales</title>

            <!-- Bootstrap core CSS -->
            <link href="../../../lib/bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet">