<?php
require_once '../connection.php';

$enquiry_date = date("l dS M \'y");

$drg = isset($_GET['drg']) ? $_GET['drg'] : '';

if (!empty($_GET['drg'])) {
    include "../table.php";
}
?>

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title><?php echo $title; ?> - Form 80 - <?php echo $street; ?> - <?php echo date("dmY"); ?></title>
        <link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
        <link rel="stylesheet" href="../css/forms.css" >
        <link rel="stylesheet" href="../css/forms_print.css" media="print">
        <link rel="shortcut icon" href="../images/blueprint.ico" type="image/x-icon">
    </head>

    <body>
        <div class="container">
            <!-- !userProfile -->
            <div class="logo" style="width:50%; position:absolute;"> <img src="../images/blueprint-full-logo-medium.png" height="50px"></div>
            <div class="quote" style="text-align:right; height:50px;"><p style="font-weight:600; font-size:5rem; color:#d6d5d5;"><?php echo $qId; ?></p></div>

            <div style="margin-top:10px;"></div>

            <!-- Form Details  -->
            <table id="top-heading" width="100%" style="border-top:3px solid black;">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td id="title" width="75%">
                            <h3>NOTIFICATION OF LOW RISK WORK (Building or Plumbing)</h3>
                        </td>
                        <td id="codes" width="25%">
                            <h4>Regulation 32 </h4>
                        </td>
                    </tr>
                </tbody>
            </table>

            <!-- Council Details  -->
            <table class="expand hover" width="75%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="12.5%">To:</td>
                        <td id="border" width="65%" style="font-weight:bold;"><?php echo $council_company; ?></td>
                        <td width="27.5%">Permit Authority</td>
                    </tr>

                    <tr>
                        <td width="12.5%">Address:</td>
                        <td id="border" width="65%"><?php echo $council_address; ?></td>
                        <td width="27.5%">Address</td>
                    </tr>

                    <tr>
                        <td width="12.5%">&nbsp;</td>
                        <td id="border" width="60%"><?php echo $council_email; ?></td>
                        <td width="27.5%">Contact Details</td>
                    </tr>

                </tbody>
            </table>

            <!-- Form Number  -->
            <table class="expand hover" width="25%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td style="padding: 0px;">
                            <p id="form" width="100%">Form</p>
                            <p id="formNo" width="100%">80</p>
                        </td>
                    </tr>
                </tbody>
            </table>

            <!-- Building Designer Details  -->
            <table id="heading" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="75%">
                            <h4>Work Details:</h4>
                        </td>
                        <td id="" width="25%">&nbsp;</td>
                    </tr>
                </tbody>
            </table>

            <br>

            <table class="expand hover" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="20%">Type of work:</td>
                        <td id="border" width="5%" style="text-align: center;"><?php //if ($row['39_bwpermit'] == '1'){echo "&#10008";}?></td>
                        <td width="15%">Building work:</td>
                        <td id="border" width="5%" style="text-align: center;"><?php //if ($row['39_bwpermit'] == '1'){echo "&#10008";}?>&#10008</td>
                        <td width="15%">Plumbing work:</td>
                        <td id="border" width="5%" style="text-align: center;"><?php //if ($row['39_bwnotifi']== '1'){echo "&#10008";}?></td>
                        <td width="15%">Demolition work:</td>
                        <td width="20%">(X one applicable.)</td>
                    </tr>
                </tbody>
            </table>

            <table class="expand hover" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="12.5%">Address:</td>
                        <td id="border" width="40%"><?php echo $propertyName; ?></td>
                        <td width="22.5%" style="text-align: right;">Lot No:</td>
                        <td id="border" width="25%"><?php echo str_replace('_', '/', $volumeId) ; ?></td>
                    </tr>

                    <tr>
                        <td width="12.5%">&nbsp;</td>
                        <td id="border" width="40%"><?php echo $propertyAddress; ?></td>
                        <td width="22.5%" style="text-align: right;">PID:</td>
                        <td id="border" width="25%"><?php echo $propertyId; ?></td>
                    </tr>

                </tbody>
            </table>

            <table class="expand hover" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="12.5%">Use of building:</td>
                        <td id="border" width="40%"><?php echo $type; ?></td>
                        <td width="22.5%" style="text-align: right;">Building Class(es):</td>
                        <td id="border"width="25%"><?php echo $building_class; ?></td>
                    </tr>

                </tbody>
            </table>

            <table class="expand hover" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="12.5%">The work: </td>
                        <td id="border" width="87.5%" >Proposed new <?php echo $size; ?> ( Approximately <?php echo ($length * $width ); ?>m2 ) - <?php echo $type; ?></td>
                    </tr>
                    <tr>
                        <td width="12.5%" style="font-size: 7px;">(Description of the work e.g. new building, Category 2B plumbing work, etc)<br><br>Note dimensions where appropriate See Determinations for dimension restrictions for low risk work.<br><br></td>
                        <td id="border" width="87.5%" style="font-size: 12px; color:blue;" >Roof Plumbing as detailed on engineers drawings provided.</td>
                    </tr>
                </tbody>
            </table>

            <!-- Details of the OWNER  -->
            <table id="heading" width="100%" >
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="75%">
                            <h4>Owner details:</h4>
                        </td>
                        <td id="" width="25%">&nbsp;</td>
                    </tr>
                </tbody>
            </table>

            <table class="expand hover" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="12.5%">Owner:</td>
                        <td id="border" width="40%"><?php echo $client; ?></td>
                        <td width="0%">&nbsp;</td>
                        <td width="22.5%" style="text-align: right;">Project reference No.</td>
                        <td id="border" width="25%">Bison Job # <?php echo $qId; ?></td>
                    </tr>

                    <tr>
                        <td width="12.5%">Business:</td>
                        <td id="border" width="40%"><?php echo str_replace('|', '', $client_company ) ; ?></td>
                        <td width="0%">&nbsp;</td>
                        <td width="22.5%" style="text-align: right;">Phone No:</td>
                        <td id="border"width="25%"><?php echo $client_mobile; ?></td>
                    </tr>

                    <tr>
                        <td width="12.5%">Address:</td>
                        <td id="border" width="40%"><?php echo $postal_address; ?></td>
                        <td width="0%">&nbsp;</td>
                        <td width="22.5%" style="text-align: right;">Fax No:</td>
                        <td id="border"width="25%"><?php //echo $row['39_b_fax'];?></td>
                    </tr>

                </tbody>
            </table>

            <table class="expand hover" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="25%" >Email Address:</td>
                        <td id="border" width="75%"><?php echo $client_email; ?></td>
                    </tr>

                </tbody>
            </table>

            <!-- Details of the PLUMBER -->
            <table id="heading" width="100%" >
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="75%">
                            <h4>Plumber details:</h4>
                        </td>
                        <td id="" width="25%">&nbsp;</td>
                    </tr>
                </tbody>
            </table>

            <table class="expand hover" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="12.5%">Plumber:</td>
                        <td id="border" width="40%">Anthony R. Wallis</td>
                        <td width="0%">&nbsp;</td>
                        <td width="22.5%" style="text-align: right;">Category:</td>
                        <td id="border" width="25%">Roof, Stormwater</td>
                    </tr>

                    <tr>
                        <td width="12.5%">Business:</td>
                        <td id="border" width="40%">Bison Constructions Pty Ltd</td>
                        <td width="0%">&nbsp;</td>
                        <td width="22.5%" style="text-align: right;">Mobile No:</td>
                        <td id="border"width="25%">0417 043 508</td>
                    </tr>

                    <tr>
                        <td width="12.5%">Address:</td>
                        <td id="border" width="40%">34835 Tasman Hwy, Scottsdale, Tas 7260</td>
                        <td width="0%"></td>
                        <td width="22.5%" style="text-align: right;">Fax No:</td>
                        <td id="border"width="25%"></td>
                    </tr>

                </tbody>
            </table>

            <table class="expand hover" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="14.5%">Licence No: </td>
                        <td id="border" width="20%">1550938</td>
                        <td width="0%">&nbsp;</td>
                        <td width="22.5%" style="text-align: right;">Email Address:</td>
                        <td id="border" width="42%">tony@bisonent.com.au</td>
                    </tr>

                </tbody>
            </table>

            <table class="expand hover" width="100%" style="border-bottom: none;">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="100%">
                            <p><b>For plumbing work only:</b></p>
                            <ul style="margin-top:0; margin-bottom:0;">
                                <li>As the licensed plumber who performed the work has certified that it complies with all relevant Acts, the National Construction Code and other relevant codes and standards;</li>
                                <li>As-constructed plans of the plumbing work are provided (for any below ground work only)</li>
                                <li>A notification in respect of defective work discovered as part of the preparation, or performance, of the low-risk plumbing work has already been notified to the council.</li>
                            </ul>
                        </td>
                    </tr>
                </tbody>
            </table>

            <!-- Standards, codes or guidelines  -->
            <table id="heading" width="100%">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="75%">
                            <h4>Notice details:</h4>
                        </td>
                        <td id="" width="25%">&nbsp;</td>
                    </tr>
                </tbody>
            </table>

            <!-- Design Documents provided:  -->
            <table class="expand hover" width="100%" style="border-bottom: none;">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="50%" style="text-align: right;"><b>The work detailed above was completed on:</b></td>
                        <td contenteditable='true' id="border" width="25%" style="font-size: 19px; color:blue;"> <?php echo $finish_date_start;?> </td>
                        <td width="25%">Date</td>
                    </tr>
                </tbody>
            </table>

            <table class="expand hover" width="100%" style="border-bottom: none;">
                <thead></thead>
                <tbody width="100%">
                    <tr >
                        <td width="12.5%">Plumber:</td> <!-- (builder or owner builder): -->
                        <td id="border" width="28%" style="font-size: 19px; color:blue;">Anthony R. Wallis</td>
                        <td width="1.75%"></td>
                        <td id="border" width="28%" height="40px" ><div class="signature"> <img src="images/signature/anthony_r_wallis-signature.png" height="40px" /> </div> </td>
                        <td width="1.75%"></td>
                        <td id="border" width="28%" style="font-size: 19px; color:blue;"><?php echo $signedDate; ?></td>
                    </tr>
                </tbody>
            </table>


            <table class="expand hover" width="100%" style="border-bottom: none;">
                <thead></thead>
                <tbody width="100%">
                    <tr>
                        <td width="100%">
                            <p class="footer" ><?php echo $qId; ?> - [Form 80] - Document Printed on: <?php echo date("dS M Y");?> at <?php echo date("g:i A");?></p>
                        </td>
                    </tr>
                </tbody>
            </table>

        </div>

    </body>
</html>