dashboard.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. require_once 'connection.php';
  3. $enquiry_date = date("l dS M \'y");
  4. $drg = isset($_GET['drg']) ? $_GET['drg'] : '';
  5. if (!empty($_GET['drg'])) {
  6. include "table.php";
  7. }
  8. $check = "<i class='h2 bi bi-check-circle-fill text-success'></i>";
  9. $cross = "<i class='h2 bi bi-x-circle-fill brown-light'></i>";
  10. $urgent = "<i class='h2 bi bi-exclamation-circle-fill text-warning'></i>";
  11. $not_required = "<i class='h2 bi bi-dash-circle-fill'></i>";
  12. ?>
  13. <!doctype html>
  14. <html lang="en">
  15. <head>
  16. <meta charset="utf-8">
  17. <meta name="viewport" content="width=device-width, initial-scale=1">
  18. <title>Dashboard</title>
  19. <link rel="shortcut icon" href="images/blueprint.ico" type="image/x-icon">
  20. <link href="css/bootstrap.css" rel="stylesheet">
  21. <link href="css/blueprint.css" rel="stylesheet">
  22. <link href="css/print.css" rel="stylesheet" media="print">
  23. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css">
  24. <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
  25. </head>
  26. <body>
  27. <nav class="navbar bg-brown-dark brown-light border-bottom border-body d-print-none" data-bs-theme="dark">
  28. <div class="container-fluid">
  29. <a class="navbar-brand brown-light" href="#">
  30. <img src="images/blueprint-logo-light.png" alt="Logo" width="30" height="24" class="d-inline-block align-text-top">
  31. Modulos Design
  32. </a>
  33. <div class="ml-auto ms-auto">
  34. <a href="create_enquiry.php" class="btn btn-sm bg-brown-three brown-five">
  35. <i class="bi bi-plus-circle"></i> Create enquiry
  36. </a>
  37. </div>
  38. </div>
  39. </nav>
  40. <div class="container-fluid">
  41. <div class="row">
  42. <div class="col px-0">
  43. <table class="table table-sm">
  44. <thead class="align-top text-center">
  45. <tr>
  46. <th scope="col" class="align-middle" style="width: 3%;">Drg</th>
  47. <th scope="col" class="align-middle" style="width: 15%;" >Client Name</th>
  48. <th scope="col" class="align-middle" style="width: 10%;">Build Type</th>
  49. <th scope="col" class="align-middle" style="width: 5%;">Site Visit</th>
  50. <th scope="col" class="align-middle" style="width: 5%;">PID</th>
  51. <th scope="col" class="align-middle" style="width: 5%;">Tite Detail</th>
  52. <th scope="col" class="align-middle" style="width: 5%;">Progress<br><span class="small fw-light">Admin</span></th>
  53. <th scope="col" class="align-middle" style="width: 5%;">Title<br><span class="small fw-light">Copy</span></th>
  54. <th scope="col" class="align-middle" style="width: 5%;">Original<br><span class="small fw-light">Plans</span></th>
  55. <th scope="col" class="align-middle" style="width: 5%;">LOA<br><span class="small fw-light">Signed</span></th>
  56. <th scope="col" class="align-middle" style="width: 5%;">DA<br><span class="small fw-light">Application</span></th>
  57. <th scope="col" class="align-middle" style="width: 5%;">BA<br><span class="small fw-light">Application</span></th>
  58. <th scope="col" class="align-middle" style="width: 5%;">Fire<br><span class="small fw-light">Report</span></th>
  59. <th scope="col" class="align-middle" style="width: 5%;">Energy<br><span class="small fw-light">Assesment</span></th>
  60. <th scope="col" class="align-middle" style="width: 5%;"></th>
  61. <th scope="col" class="align-middle" ></th>
  62. <th scope="col" class="align-middle" ></th>
  63. <th scope="col" class="align-middle" ></th>
  64. <th scope="col" class="align-middle" ></th>
  65. <th scope="col" class="align-middle" ></th>
  66. <th scope="col" class="align-middle" ></th>
  67. <th scope="col" class="align-middle" ></th>
  68. <th scope="col" class="align-middle" ></th>
  69. </tr>
  70. </thead>
  71. <tbody>
  72. <?php
  73. $result = mysqli_query($con, " SELECT * FROM `details` JOIN `addresses` ON `details`.`drg` = `addresses`.`drg` ORDER BY `details`.`drg` DESC ");
  74. if (!$result) {
  75. printf("Error: %s\n", mysqli_error($con));
  76. exit();
  77. alert("error");
  78. }
  79. while ($row = mysqli_fetch_array($result)) {
  80. $drg = floatval($row['drg']);
  81. if ( $row['copy_title'] === '1') { $title = "$check"; } else { $title = "$cross"; }
  82. if ( $row['original_plans'] === '1') { $original_plans = "$check"; } else { $original_plans = "$cross"; }
  83. if ( $row['loa_signed'] === '1') { $loa_signed = "$check"; } else { $loa_signed = "$cross"; }
  84. if ( $row['da_application'] === '1') { $da_application = "$check"; } else { $da_application = "$cross"; }
  85. if ( $row['ba_application'] === '1') { $ba_application = "$check"; } else { $ba_application = "$cross"; }
  86. if ( $row['fire_report'] === '1') { $fire_report = "$check"; } else { $fire_report = "$cross"; }
  87. if ( $row['energy_report'] === '1') { $energy_report = "$check"; } else { $energy_report = "$cross"; }
  88. if ( $row['site_visit'] === '1') { $site_visit = "$check"; } else { $site_visit = "$cross"; }
  89. echo "<tr class='border-bottom border-dark'>";
  90. echo "<th scope='row' class='border-end text-center'><a class='brown-three text-decoration-none' href='https://modulosdesign.com.au/internal/client-brief.php?drg=$drg'>" . $drg . "</a></th>";
  91. echo "<td><span class='fw-bold'>" . $row['firstname'] . " " . $row['lastname'] . '</span><br><span class="small">' . $row['site_address_street'] . ', ' . $row['site_address_town'] . "</span></td>";
  92. echo "<td>" . $row['build_type'] . "</td>";
  93. echo "<td class='text-center'>" . $site_visit . "</td>";
  94. echo "<td>" . $row['property_id'] . "</td>";
  95. echo "<td class='border-end' >" . $row['title_id'] . "</td>";
  96. echo "<td class='text-center'><a class='brown-three text-decoration-none' href='https://modulosdesign.com.au/contracts/edit_application.php?id=$drg'><i class='h2 bi bi-speedometer'></i></a></td>";
  97. echo "<td class='text-center'>" . $title . "</td>";
  98. echo "<td class='text-center'>" . $original_plans . "</td>";
  99. echo "<td class='text-center'>" . $loa_signed . "</td>";
  100. echo "<td class='text-center'>" . $da_application . "</td>";
  101. echo "<td class='text-center border-end'>" . $ba_application . "</td>";
  102. echo "<td class='text-center'>" . $fire_report . "</td>";
  103. echo "<td class='text-center'>" . $energy_report . "</td>";
  104. echo "<td class='text-center'></td>";
  105. echo "<td class=''></td>";
  106. echo "<td class=''></td>";
  107. echo "<td class=''></td>";
  108. echo "<td class=''></td>";
  109. echo "<td class=''></td>";
  110. echo "<td class=''></td>";
  111. echo "<td class=''></td>";
  112. echo "<td class=''></td>";
  113. echo "<td class=''></td>";
  114. echo "</tr>";
  115. }
  116. ?>
  117. </tbody>
  118. </table>
  119. </div>
  120. </div>
  121. </div>
  122. <script type="text/javascript">
  123. </script>
  124. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
  125. <!--
  126. <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB-QceOYrDe9otynMmQ9iNF3yEZzbpsanM&libraries=places&callback=initAutocomplete" async defer></script>
  127. <script src="https://cdn.jsdelivr.net/npm/signature_pad@4.0.0/dist/signature_pad.umd.min.js"></script>
  128. <script src="js/signature.js" ></script>
  129. <script async defer src="https://apis.google.com/js/api.js" onload="gapiLoaded()"></script>
  130. <script async defer src="https://accounts.google.com/gsi/client" onload="gisLoaded()"></script>
  131. -->
  132. </body>
  133. </html>