Эх сурвалжийг харах

Premier ajout prtg et omada

dorian 10 сар өмнө
parent
commit
39dbfcf7d5
5 өөрчлөгдсөн 136 нэмэгдсэн , 28 устгасан
  1. 7 11
      index.php
  2. 6 0
      infos.php
  3. 1 17
      js/scripts.js
  4. 61 0
      omada.php
  5. 61 0
      prtg.php

+ 7 - 11
index.php

@@ -174,15 +174,15 @@
                                             while ($row = mysqli_fetch_array($query)) {
 
                                                 echo "<tr>
-                                                        <td onclick='redirectToInfos({$row['id']})'>{$row['id']}</td>
-                                                        <td onclick='redirectToInfos({$row['id']})'>{$row['name']}</td>
-                                                        <td onclick='redirectToInfos({$row['id']})'>".mysqli_fetch_array($dbconnect->query('SELECT name FROM type WHERE id="'.$row['type'].'"'))['0']."</td>
-                                                        <td onclick='redirectToInfos({$row['id']})'>{$row['localisation']}</td>
-                                                        <td onclick='redirectToInfos({$row['id']})'>{$row['departement']}</td>
+                                                        <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='text-color:rgb(100,0,0)'>{$row['id']}</a></td>
+                                                        <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='color:rgb(100,0,0)'>{$row['name']}</a></td>
+                                                        <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='color:rgb(100,0,0)'>".mysqli_fetch_array($dbconnect->query('SELECT name FROM type WHERE id="'.$row['type'].'"'))['0']."</a></td>
+                                                        <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='color:rgb(100,0,0)'>{$row['localisation']}</a></td>
+                                                        <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='color:rgb(100,0,0)'>{$row['departement']}</a></td>
                                                     </tr>";
                                             }
                                             $dbconnect->close();
-                                            header('Location: index.php');
+                                            // header('Location: infos.php');
                                             ?>
                                             <tr>
                                                 <td>Ajout client</td>
@@ -215,11 +215,6 @@
                 </footer>
             </div>
         </div>
-        <script>
-            function redirectToInfos(id) {
-                window.location.href = 'intra/infos.php?id=' + id;
-            }
-        </script>
         <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>
@@ -227,5 +222,6 @@
         <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>
+        <script src="https://cdn.jsdelivr.net/npm/@simondmc/popup-js@1.4.2/popup.min.js"></script>
     </body>
 </html>

+ 6 - 0
infos.php

@@ -32,6 +32,8 @@
             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>";
@@ -46,6 +48,10 @@
 
         $dbconnect->close();
     ?>
+    <iframe src="https://prtg.easytelecoms.fr/group.htm?id=12397&tabid=1#objecttreecontainer" width="600" height="400"></iframe>
+    <iframe src="https://eap.easytelecoms.fr:5001/019719d25d8fc852af63badf8e25413a/login#devices" width="600" height="400"></iframe>
+    <a href="index.php">Retour</a>
+
 
         <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>

+ 1 - 17
js/scripts.js

@@ -23,20 +23,4 @@ window.addEventListener('DOMContentLoaded', event => {
         });
     }
 
-});
-
-// // Fonction pour ouvrir la fenêtre pop-up
-// function openPopup() {
-//     document.getElementById('popup').style.display = 'block';
-// }
-
-// // Fonction pour fermer la fenêtre pop-up
-// function closePopup() {
-//     document.getElementById('popup').style.display = 'none';
-// }
-
-// function redirectToInfos(id) {
-//     window.location.href = 'intra/infos.php?id=' + id;
-// }
-
-
+});

+ 61 - 0
omada.php

@@ -0,0 +1,61 @@
+<!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>";
+                echo "<iframe src='https://eap.easytelecoms.fr:5001/019719d25d8fc852af63badf8e25413a/login#devices' width='600' height='400'></iframe>";
+                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>

+ 61 - 0
prtg.php

@@ -0,0 +1,61 @@
+<!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>";
+                echo "<iframe src='https://prtg.easytelecoms.fr/group.htm?id=12397&tabid=1#objecttreecontainer' width='600' height='400'></iframe>";
+                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>