session_start(); if (!isset($_SESSION['user'])) { header("Location: index.php"); exit; } require_once '../controller/SqliteRepository.php'; require_once '../model/Customer.php'; require_once '../model/Employee.php'; require_once '../model/Payment.php'; $repo = new \pnaika\finals\SqliteRepository(); $time = date("d M Y - h:i:s A"); $customerId = isset($_GET['id']) ? $_GET['id'] : ''; $employeeId = isset($_GET['empId']) ? $_GET['empId'] : ''; if ($customerId != '') { $customer = $repo->getCustomerById($customerId); $payments = $repo->getPaymentByCustId($customerId); } elseif ($employeeId != '') { $employee = $repo->getEmployeeById($employeeId); $payments = $repo->getAllPayments(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>SHOW ALL PAYMENT</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" href="../style/style.css"> <link href='http://fonts.googleapis.com/css?family=Lora:400,700' rel='stylesheet' type='text/css'/> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"/>