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; $total = null;
<?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 employees */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_SESSION['authenticated'])) { if ($_SESSION['authenticated'] == true) { $addResult = null; $empCon = new EmployeeController(); if (isset($_POST['hdnAction'])) { if ($_POST['hdnAction'] == 'insert') { $result = $empCon->insertEmployee($_POST['txtFirstName'], $_POST['txtSurname'], $_POST['txtStatus']); if ($result->errorInfo()[2] == null) { $addResult = true; } else { $addResult = $result->errorInfo()[2]; } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8">
<?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 employees */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_SESSION['authenticated'])) { if ($_SESSION['authenticated'] == true) { $addResult = null; $empCon = new EmployeeController(); ?> <!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 - Employees</title> <!-- Bootstrap core CSS -->
<?php /** * Created by PhpStorm. * 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; $empId = null; $empCon = new EmployeeController(); $firstName = null; $surname = null; $status = null; function checkSelected($id1, $id2) { if ($id1 == $id2) { echo 'selected'; } } if (isset($_GET['id'])) { $empId = $_GET['id']; $emp = $empCon->getEmployee($empId); if ($emp->errorInfo()[2] == null) { $row = $emp->fetch(); $rowCount = count($row);
}); $routes->get('/tyontekijat/:id/edit', function ($id) { EmployeeController::edit($id); }); $routes->post('/tyontekijat/:id/edit', function ($id) { EmployeeController::update($id); }); $routes->post('/tyontekijat/:id/destroy', function ($id) { EmployeeController::destroy($id); }); //login & logout $routes->post('/employeelogin', function () { EmployeeController::employee_login(); }); $routes->get('/employee/login', function () { EmployeeController::employee_login_page(); }); $routes->post('/logout', function () { SiteController::logout(); }); $routes->post('/userlogin', function () { ClientController::client_login(); }); //client $routes->post('/asiakkaat/store', function () { ClientController::store(); }); $routes->get('/asiakkaat/omattiedot', function () { ClientController::show(); }); // VANHAT VERSIOT TÄSTÄ ALESPÄIN
/** * Created by PhpStorm. * User: roessler * Date: 16/09/15 * Time: 1:22 PM */ /** * Backend page for administrators and Staff of Cyril's Classic Employees to delete employees */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_SESSION['authenticated'])) { if ($_SESSION['authenticated'] == true) { $deleteResult = null; $empId = null; $empCon = new EmployeeController(); $firstName = null; $surname = null; $status = null; function checkSelected($id1, $id2) { if ($id1 == $id2) { echo 'selected'; } } if (isset($_GET['id'])) { $empId = $_GET['id']; $emp = $empCon->getEmployee($empId); if ($emp->errorInfo()[2] == null) { $row = $emp->fetch(); $rowCount = count($row);