index.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. <nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
  16. <!-- Navbar Brand-->
  17. <a class="navbar-brand ps-3" href="index.html">Start Bootstrap</a>
  18. <!-- Sidebar Toggle-->
  19. <button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
  20. <!-- Navbar Search-->
  21. <form class="d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0">
  22. </form>
  23. <!-- Navbar-->
  24. <ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
  25. <li class="nav-item dropdown">
  26. <a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-user fa-fw"></i></a>
  27. <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
  28. <li><a class="dropdown-item" href="#!">Settings</a></li>
  29. <li><a class="dropdown-item" href="#!">Activity Log</a></li>
  30. <li><hr class="dropdown-divider" /></li>
  31. <li><a class="dropdown-item" href="#!">Logout</a></li>
  32. </ul>
  33. </li>
  34. </ul>
  35. </nav>
  36. <div id="layoutSidenav">
  37. <div id="layoutSidenav_nav">
  38. <nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
  39. <div class="sb-sidenav-menu">
  40. <div class="nav">
  41. <div class="sb-sidenav-menu-heading">Core</div>
  42. <a class="nav-link" href="index.html">
  43. <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
  44. Dashboard
  45. </a>
  46. <div class="sb-sidenav-menu-heading">Interface</div>
  47. <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapseLayouts" aria-expanded="false" aria-controls="collapseLayouts">
  48. <div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
  49. Layouts
  50. <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
  51. </a>
  52. <div class="collapse" id="collapseLayouts" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
  53. <nav class="sb-sidenav-menu-nested nav">
  54. <a class="nav-link" href="layout-static.html">Static Navigation</a>
  55. <a class="nav-link" href="layout-sidenav-light.html">Light Sidenav</a>
  56. </nav>
  57. </div>
  58. <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapsePages" aria-expanded="false" aria-controls="collapsePages">
  59. <div class="sb-nav-link-icon"><i class="fas fa-book-open"></i></div>
  60. Pages
  61. <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
  62. </a>
  63. <div class="collapse" id="collapsePages" aria-labelledby="headingTwo" data-bs-parent="#sidenavAccordion">
  64. <nav class="sb-sidenav-menu-nested nav accordion" id="sidenavAccordionPages">
  65. <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#pagesCollapseAuth" aria-expanded="false" aria-controls="pagesCollapseAuth">
  66. Authentication
  67. <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
  68. </a>
  69. <div class="collapse" id="pagesCollapseAuth" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordionPages">
  70. <nav class="sb-sidenav-menu-nested nav">
  71. <a class="nav-link" href="login.html">Login</a>
  72. <a class="nav-link" href="register.html">Register</a>
  73. <a class="nav-link" href="password.html">Forgot Password</a>
  74. </nav>
  75. </div>
  76. <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#pagesCollapseError" aria-expanded="false" aria-controls="pagesCollapseError">
  77. Error
  78. <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
  79. </a>
  80. <div class="collapse" id="pagesCollapseError" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordionPages">
  81. <nav class="sb-sidenav-menu-nested nav">
  82. <a class="nav-link" href="401.html">401 Page</a>
  83. <a class="nav-link" href="404.html">404 Page</a>
  84. <a class="nav-link" href="500.html">500 Page</a>
  85. </nav>
  86. </div>
  87. </nav>
  88. </div>
  89. <div class="sb-sidenav-menu-heading">Addons</div>
  90. <a class="nav-link" href="charts.html">
  91. <div class="sb-nav-link-icon"><i class="fas fa-chart-area"></i></div>
  92. Charts
  93. </a>
  94. <a class="nav-link" href="tables.html">
  95. <div class="sb-nav-link-icon"><i class="fas fa-table"></i></div>
  96. Tables
  97. </a>
  98. </div>
  99. </div>
  100. <div class="sb-sidenav-footer">
  101. <div class="small">Logged in as:</div>
  102. Start Bootstrap
  103. </div>
  104. </nav>
  105. </div>
  106. <div id="layoutSidenav_content">
  107. <main>
  108. <div class="container-fluid px-4">
  109. <h1 class="mt-4">Dashboard</h1>
  110. <ol class="breadcrumb mb-4">
  111. <li class="breadcrumb-item active">Dashboard</li>
  112. </ol>
  113. <div class="row">
  114. <div class="col-xl-6">
  115. <div class="card mb-4">
  116. <div class="card-header">
  117. <i class="fas fa-chart-area me-1"></i>
  118. Area Chart Example
  119. </div>
  120. <div class="card-body"><canvas id="myAreaChart" width="100%" height="40"></canvas></div>
  121. </div>
  122. </div>
  123. <div class="col-xl-6">
  124. <div class="card mb-4">
  125. <div class="card-header">
  126. <i class="fas fa-chart-bar me-1"></i>
  127. Bar Chart Example
  128. </div>
  129. <div class="card-body"><canvas id="myBarChart" width="100%" height="40"></canvas></div>
  130. </div>
  131. </div>
  132. </div>
  133. <div class="card mb-4">
  134. <div class="card-header">
  135. <i class="fas fa-table me-1"></i>
  136. DataTable Example
  137. </div>
  138. <div class="card-body">
  139. <form action="ajout-client.php" method="post">
  140. <table id="datatablesSimple">
  141. <thead>
  142. <tr>
  143. <th>ID</th>
  144. <th>Nom</th>
  145. <th>BDT/NAV</th>
  146. <th>Localisation</th>
  147. <th>Département</th>
  148. <!-- <th>Date création</th> -->
  149. </tr>
  150. </thead>
  151. <tfoot>
  152. <tr>
  153. <th>ID</th>
  154. <th>Nom</th>
  155. <th>BDT/NAV</th>
  156. <th>Localisation</th>
  157. <th>Département</th>
  158. <!-- <th>Date création</th> -->
  159. </tr>
  160. </tfoot>
  161. <tbody>
  162. <?php
  163. $hostname = "localhost";
  164. $username = "root";
  165. $password = "Bdtbdt17?";
  166. $port = "3306";
  167. $db = "intra";
  168. $dbconnect=mysqli_connect($hostname,$username,$password,$db,$port);
  169. $q = 'SELECT * FROM client';
  170. $query = mysqli_query($dbconnect, $q)
  171. or die(mysqli_error($dbconnect));
  172. while ($row = mysqli_fetch_array($query)) {
  173. echo "<tr>
  174. <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='text-color:rgb(100,0,0)'>{$row['id']}</a></td>
  175. <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='color:rgb(100,0,0)'>{$row['name']}</a></td>
  176. <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>
  177. <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='color:rgb(100,0,0)'>{$row['localisation']}</a></td>
  178. <td><a href='infos.php?id={$row['id']}' style='text-decoration:none' style='color:rgb(100,0,0)'>{$row['departement']}</a></td>
  179. </tr>";
  180. }
  181. $dbconnect->close();
  182. // header('Location: infos.php');
  183. ?>
  184. <tr>
  185. <td>Ajout client</td>
  186. <td><input type="text" name="name" required></td>
  187. <td><select id="client" type="text" name="type" required>
  188. <option value="1">BDT</option>
  189. <option value="2">NAVISTA</option></select></td>
  190. <td><input type="text" name="localisation"></td>
  191. <td><input type="text" name="departement"></td>
  192. </tr>
  193. </tbody>
  194. </table>
  195. <button type="submit">Ajouter client</button>
  196. </form>
  197. </div>
  198. </div>
  199. </div>
  200. </main>
  201. <footer class="py-4 bg-light mt-auto">
  202. <div class="container-fluid px-4">
  203. <div class="d-flex align-items-center justify-content-between small">
  204. <div class="text-muted">Copyright &copy; Your Website 2023</div>
  205. <div>
  206. <a href="#">Privacy Policy</a>
  207. &middot;
  208. <a href="#">Terms &amp; Conditions</a>
  209. </div>
  210. </div>
  211. </div>
  212. </footer>
  213. </div>
  214. </div>
  215. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
  216. <script src="js/scripts.js"></script>
  217. <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
  218. <script src="assets/demo/chart-area-demo.js"></script>
  219. <script src="assets/demo/chart-bar-demo.js"></script>
  220. <script src="https://cdn.jsdelivr.net/npm/simple-datatables@7.1.2/dist/umd/simple-datatables.min.js" crossorigin="anonymous"></script>
  221. <script src="js/datatables-simple-demo.js"></script>
  222. <script src="https://cdn.jsdelivr.net/npm/@simondmc/popup-js@1.4.2/popup.min.js"></script>
  223. </body>
  224. </html>