12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
- <meta name="description" content="" />
- <meta name="author" content="" />
- <title>Dashboard - SB Admin</title>
- <link href="https://cdn.jsdelivr.net/npm/simple-datatables@7.1.2/dist/style.min.css" rel="stylesheet" />
- <link href="css/styles.css" rel="stylesheet" />
- <script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
- </head>
- <body class="sb-nav-fixed">
- <?php
- $hostname = "localhost";
- $username = "root";
- $password = "Bdtbdt17?";
- $port = "3306";
- $db = "intra";
- $dbconnect = mysqli_connect($hostname, $username, $password, $db, $port);
- // Vérifie si l'ID est présent dans l'URL
- if (isset($_GET['id'])) {
- $id = mysqli_real_escape_string($dbconnect, $_GET['id']);
- // Effectuez votre requête pour récupérer les informations du client avec l'ID donné
- $q = "SELECT * FROM client WHERE id = '$id'";
- $query = mysqli_query($dbconnect, $q) or die(mysqli_error($dbconnect));
- if ($row = mysqli_fetch_array($query)) {
- // Affichez les informations du client dans la page infos.php
- echo "<h1>Informations sur le client</h1>";
- echo "<h2><a href='prtg.php?id={$row['id']}'>PRTG</a></h2>";
- echo "<h2><a href='omada.php?id={$row['id']}'>Omada</a></h2>";
- echo "<p>ID: {$row['id']}</p>";
- echo "<p>Nom: {$row['name']}</p>";
- echo "<p>Type: " . mysqli_fetch_array($dbconnect->query('SELECT name FROM type WHERE id="' . $row['type'] . '"'))['0'] . "</p>";
- echo "<p>Localisation: {$row['localisation']}</p>";
- echo "<p>Département: {$row['departement']}</p>";
- include_once('call-api.php');
- echo "<a href='infos.php?id={$row['id']}'>Retour</a>";
- } else {
- echo "<p>Client non trouvé.</p>";
- }
- } else {
- echo "<p>Paramètre ID manquant dans l'URL.</p>";
- }
- $dbconnect->close();
- ?>
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
- <script src="js/scripts.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
- <script src="assets/demo/chart-area-demo.js"></script>
- <script src="assets/demo/chart-bar-demo.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/simple-datatables@7.1.2/dist/umd/simple-datatables.min.js" crossorigin="anonymous"></script>
- <script src="js/datatables-simple-demo.js"></script>
- </body>
- </html>
|