| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- /* -------------------------------------------------------------------------- */
- /* CONFIGURATION */
- /* -------------------------------------------------------------------------- */
- date_default_timezone_set("Australia/Hobart");
- error_reporting(E_ALL);
- ini_set('display_errors', 1);
- require_once 'connection.php';
- include_once "dompdf/vendor/autoload.php";
- use Dompdf\Dompdf;
- use Dompdf\Options;
- if (session_status() !== PHP_SESSION_ACTIVE) session_start();
- if (empty($_SESSION['csrf'])) $_SESSION['csrf'] = bin2hex(random_bytes(16));
- $csrf = $_SESSION['csrf'];
- #$enquiry_date = date("l dS M 'y");
- $drg = $_GET['drg'] ?? '';
- if (!empty($_GET['drg'])) {
- include "table.php";
- }
- /* New: toggle PDF mode */
- $asPdf = isset($_GET['pdf']);
- /* If we are about to generate a PDF, start buffering the HTML now */
- if ($asPdf) {
- ob_start();
- }
- ?>
- <!doctype html>
- <html lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title><?= htmlspecialchars($drg) ?> - Site Drafting</title>
- <link rel="shortcut icon" href="images/blueprint.ico" type="image/x-icon">
- <link href="css/bootstrap.css" rel="stylesheet">
- <link href="css/blueprint.css" rel="stylesheet">
- <link href="css/print.css" rel="stylesheet" media="print">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
- <!-- jQuery first, then Popper.js, then Bootstrap JS -->
- <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
- <script type="text/javascript" src="https://use.fontawesome.com/1e2844bb90.js"></script>
- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30=" crossorigin="anonymous"></script>
- </head>
- <body style="background-color:#fff !important;">
- <div class="container border border-3 border-dark vh-100">
- <div class="row mt-2">
- <div class="col align-self-start">
- <p class="mb-0"><?= htmlspecialchars(($firstname ?? '') . ' ' . ($lastname ?? '')) ?> - <?= htmlspecialchars($client_mobile ?? '') ?></p>
- <p class="mb-0"><?= htmlspecialchars($site_address ?? '') ?></p>
- </div>
- <div class="col-2 align-self-end text-end">
- <h1 class="mb-0 fw-bold"><?= htmlspecialchars($drg) ?></h1>
- </div>
- </div>
- <hr class="">
- <div class="row">
- <div class="col">
- </div>
- </div>
- </div>
- </body>
- </html>
|