prtg.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  7. <meta name="description" content="" />
  8. <meta name="author" content="" />
  9. <title>Dashboard - SB Admin</title>
  10. <link href="https://cdn.jsdelivr.net/npm/simple-datatables@7.1.2/dist/style.min.css" rel="stylesheet" />
  11. <link href="css/styles.css" rel="stylesheet" />
  12. <script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
  13. </head>
  14. <body class="sb-nav-fixed">
  15. <?php
  16. $hostname = "localhost";
  17. $username = "root";
  18. $password = "Bdtbdt17?";
  19. $port = "3306";
  20. $db = "intra";
  21. $dbconnect = mysqli_connect($hostname, $username, $password, $db, $port);
  22. // Vérifie si l'ID est présent dans l'URL
  23. if (isset($_GET['id'])) {
  24. $id = mysqli_real_escape_string($dbconnect, $_GET['id']);
  25. // Effectuez votre requête pour récupérer les informations du client avec l'ID donné
  26. $q = "SELECT * FROM client WHERE id = '$id'";
  27. $query = mysqli_query($dbconnect, $q) or die(mysqli_error($dbconnect));
  28. if ($row = mysqli_fetch_array($query)) {
  29. // Affichez les informations du client dans la page infos.php
  30. echo "<h1>Informations sur le client</h1>";
  31. echo "<h2><a href='prtg.php?id={$row['id']}'>PRTG</a></h2>";
  32. echo "<h2><a href='omada.php?id={$row['id']}'>Omada</a></h2>";
  33. echo "<p>ID: {$row['id']}</p>";
  34. echo "<p>Nom: {$row['name']}</p>";
  35. echo "<p>Type: " . mysqli_fetch_array($dbconnect->query('SELECT name FROM type WHERE id="' . $row['type'] . '"'))['0'] . "</p>";
  36. echo "<p>Localisation: {$row['localisation']}</p>";
  37. echo "<p>Département: {$row['departement']}</p>";
  38. echo "<iframe src='https://prtg.easytelecoms.fr/group.htm?id=12397&tabid=1#objecttreecontainer' width='600' height='400'></iframe>";
  39. echo "<a href='infos.php?id={$row['id']}'>Retour</a>";
  40. } else {
  41. echo "<p>Client non trouvé.</p>";
  42. }
  43. } else {
  44. echo "<p>Paramètre ID manquant dans l'URL.</p>";
  45. }
  46. $dbconnect->close();
  47. ?>
  48. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
  49. <script src="js/scripts.js"></script>
  50. <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
  51. <script src="assets/demo/chart-area-demo.js"></script>
  52. <script src="assets/demo/chart-bar-demo.js"></script>
  53. <script src="https://cdn.jsdelivr.net/npm/simple-datatables@7.1.2/dist/umd/simple-datatables.min.js" crossorigin="anonymous"></script>
  54. <script src="js/datatables-simple-demo.js"></script>
  55. </body>
  56. </html>