repports.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <div class="launchcollumn">
  2. <a>Clients</a><br>
  3. <?php
  4. $getcltqry = mysqli_query($link, "select * from clients where active=1 ORDER BY full_name ASC");
  5. while($row = mysqli_fetch_array($getcltqry)){
  6. echo "<a href='?a=repports&clt=".$row['id']."' class='collumnbutton'>".$row['full_name']."</a>";
  7. }
  8. ?>
  9. </div>
  10. <?php
  11. if(isset($cltid)){
  12. echo "<div class='launchcollumn'>";
  13. echo "<a>Maintenances</a>";
  14. $getreqqry = mysqli_query($link, "SELECT * from request where clientid = $cltid ORDER BY timestamp DESC");
  15. while($row = mysqli_fetch_array($getreqqry)){
  16. echo "<a href='?a=repports&clt=$cltid&req=".$row['id']."' class='collumnbutton'>".$row['timestamp']."</a>";
  17. }
  18. echo "</div>";
  19. }
  20. if(isset($req)){
  21. echo "<div class='launchcollumn'>";
  22. echo "<a>Rapports</a>";
  23. $getrepqry = mysqli_query($link, "SELECT * from repports where reqid = $req ORDER BY inserted DESC");
  24. while($row = mysqli_fetch_array($getrepqry)){
  25. echo "<a href='?a=repports&clt=$cltid&req=$req&rep=".$row['id']."' class='collumnbutton'>".$row['server_name']."</a>";
  26. }
  27. echo "</div>";
  28. }
  29. if(isset($rep)){
  30. require "place/rep.php";
  31. }
  32. ?>