Materialized
This commit is contained in:
		
							
								
								
									
										23
									
								
								css/icons.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								css/icons.css
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | |||||||
|  | /* fallback */ | ||||||
|  | @font-face { | ||||||
|  |   font-family: 'Material Icons'; | ||||||
|  |   font-style: normal; | ||||||
|  |   font-weight: 400; | ||||||
|  |   src: url(../fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2'); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .material-icons { | ||||||
|  |   font-family: 'Material Icons'; | ||||||
|  |   font-weight: normal; | ||||||
|  |   font-style: normal; | ||||||
|  |   font-size: 24px; | ||||||
|  |   line-height: 1; | ||||||
|  |   letter-spacing: normal; | ||||||
|  |   text-transform: none; | ||||||
|  |   display: inline-block; | ||||||
|  |   white-space: nowrap; | ||||||
|  |   word-wrap: normal; | ||||||
|  |   direction: ltr; | ||||||
|  |   -moz-font-feature-settings: 'liga'; | ||||||
|  |   -moz-osx-font-smoothing: grayscale; | ||||||
|  | } | ||||||
							
								
								
									
										9085
									
								
								css/materialize.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9085
									
								
								css/materialize.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										10
									
								
								css/style.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								css/style.css
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  |  | ||||||
|  | .td-input { | ||||||
|  |     padding: 0; | ||||||
|  |   } | ||||||
|  |    | ||||||
|  | .td-input input[type="text"]:not(.browser-default) { | ||||||
|  |     margin: 0; | ||||||
|  |     background-repeat: no-repeat; | ||||||
|  |     background-position: right center; | ||||||
|  | } | ||||||
							
								
								
									
										
											BIN
										
									
								
								fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB | 
							
								
								
									
										14
									
								
								index.php
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								index.php
									
									
									
									
									
								
							| @ -1,3 +1,15 @@ | |||||||
|  | <?php include "connect.php"; ?> | ||||||
|  | <html> | ||||||
|  |     <head> | ||||||
|  |         <title>TablIP</title> | ||||||
|  |         <link rel="stylesheet" href="css/style.css"/> | ||||||
|  |         <link rel="stylesheet" href="css/icons.css"/> | ||||||
|  |         <link rel="stylesheet" href="css/materialize.css"/> | ||||||
|  |         <script type="text/javascript" src="js/script.js"></script> | ||||||
|  |         <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||||||
|  |     </head> | ||||||
|  |     <body> | ||||||
|  |         <script type="text/javascript" src="js/materialize.js"></script> | ||||||
| <?php | <?php | ||||||
| if (isset($_GET["site"])) { | if (isset($_GET["site"])) { | ||||||
|     include "siteNetworks.php"; |     include "siteNetworks.php"; | ||||||
| @ -5,3 +17,5 @@ if (isset($_GET["site"])) { | |||||||
|     include "sitesList.php"; |     include "sitesList.php"; | ||||||
| } | } | ||||||
| ?> | ?> | ||||||
|  |     </body> | ||||||
|  | </html> | ||||||
							
								
								
									
										12374
									
								
								js/materialize.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12374
									
								
								js/materialize.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -1,5 +1,5 @@ | |||||||
| function updateHost(input) { | function updateHost(input) { | ||||||
|     input.style.backgroundImage = 'url(wait.gif)' |     input.style.backgroundImage = 'url(img/wait.gif)' | ||||||
|     input.style.fontStyle = "italic" |     input.style.fontStyle = "italic" | ||||||
|     fetch(new Request("updateHost.php", { |     fetch(new Request("updateHost.php", { | ||||||
|         method:"POST", |         method:"POST", | ||||||
| @ -10,7 +10,7 @@ function updateHost(input) { | |||||||
|             input.style.backgroundImage = '' |             input.style.backgroundImage = '' | ||||||
|             input.style.fontStyle = "" |             input.style.fontStyle = "" | ||||||
|         } else { |         } else { | ||||||
|             input.style.backgroundImage = 'url(nok.png)' |             input.style.backgroundImage = 'url(img/nok.png)' | ||||||
|         } |         } | ||||||
|     }) |     }) | ||||||
| } | } | ||||||
| @ -1,7 +1,6 @@ | |||||||
| <?php | <?php | ||||||
| $MAX_LINES = 2500; | $MAX_LINES = 2500; | ||||||
|  |  | ||||||
| include "connect.php"; |  | ||||||
| $siteName = $_GET["site"]; | $siteName = $_GET["site"]; | ||||||
| // Check if site is known | // Check if site is known | ||||||
| $site = $db->prepare('SELECT id from Sites WHERE Name=:siteName'); | $site = $db->prepare('SELECT id from Sites WHERE Name=:siteName'); | ||||||
| @ -13,17 +12,19 @@ if (!$siteId) { | |||||||
| } | } | ||||||
| ?> | ?> | ||||||
|  |  | ||||||
| <html> |  | ||||||
|     <head> |  | ||||||
|         <title>TablIP - <?=$siteName?></title> |  | ||||||
|         <link rel="stylesheet" href="style.css"/> |  | ||||||
|         <script src="script.js"></script> |  | ||||||
|     </head> |  | ||||||
|     <body> |  | ||||||
|         <header> |         <header> | ||||||
|             <h1>TablIP</h1> |             <nav> | ||||||
|             <h2><?=$siteName?></h2> |                 <div class="nav-wrapper navbar-fixed cyan lighten-2"> | ||||||
|  |                     <a href="." class="brand-logo center">TablIP</a> | ||||||
|  |                     <div> | ||||||
|  |                         <a href="." class="breadcrumb">Sites</a> | ||||||
|  |                         <a href=".?Site=<?=$siteName?>" class="breadcrumb"><?=$siteName?></a> | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |             </nav> | ||||||
|         </header> |         </header> | ||||||
|  |         <div class="container"> | ||||||
|  |             <h1><?=$siteName?></h1> | ||||||
|  |  | ||||||
| <?php | <?php | ||||||
| $networks = $db->query("SELECT * FROM `Networks` WHERE `SiteId` = $siteId"); | $networks = $db->query("SELECT * FROM `Networks` WHERE `SiteId` = $siteId"); | ||||||
| @ -33,8 +34,10 @@ while ($network = $networks->fetch()) | |||||||
|     $networkAddress = (int) $network["Address"]; |     $networkAddress = (int) $network["Address"]; | ||||||
|     $networkMask = (int) $network["Mask"]; |     $networkMask = (int) $network["Mask"]; | ||||||
| ?> | ?> | ||||||
|         <table style="width:100%"> |             <div class="card"> | ||||||
|             <caption><?=$network['Name']." : ".long2ip($networkAddress)." / ".long2ip($networkMask)?><caption> |                 <div class="card-content"> | ||||||
|  |                     <span class="card-title"><?=$network['Name']." @ ".long2ip($networkAddress)." / ".long2ip($networkMask)?></span> | ||||||
|  |                     <table class="striped responsive-table"> | ||||||
|                         <thead> |                         <thead> | ||||||
|                             <tr> |                             <tr> | ||||||
|                                 <th>Adresse IP</th> |                                 <th>Adresse IP</th> | ||||||
| @ -59,10 +62,10 @@ while ($network = $networks->fetch()) | |||||||
|                                     <input type="hidden" name="Ip" value=<?=$ip?>/> |                                     <input type="hidden" name="Ip" value=<?=$ip?>/> | ||||||
|                                     <input type="hidden" name="NetworkId" value=<?=$networkId?>/> |                                     <input type="hidden" name="NetworkId" value=<?=$networkId?>/> | ||||||
|                                     <td><?=long2ip($ip)?></td> |                                     <td><?=long2ip($ip)?></td> | ||||||
|                         <td><input type="text" onchange="updateHost(this)" name='Hostname' value="<?=$host["Hostname"]?>"/></td> |                                     <td class="td-input"><input type="text" onchange="updateHost(this)" name='Hostname' value="<?=$host["Hostname"]?>"/></td> | ||||||
|                         <td><input type="text" onchange="updateHost(this)" name='FQDN' value="<?=$host["FQDN"]?>"/></td> |                                     <td class="td-input"><input type="text" onchange="updateHost(this)" name='FQDN' value="<?=$host["FQDN"]?>"/></td> | ||||||
|                         <td><input type="text" onchange="updateHost(this)" name='MacAddress' value="<?=$host["MacAddress"]?>"/></td> |                                     <td class="td-input"><input type="text" onchange="updateHost(this)" name='MacAddress' value="<?=$host["MacAddress"]?>"/></td> | ||||||
|                         <td><input type="text" onchange="updateHost(this)" name='Comments' value="<?=$host["Comments"]?>"/></td> |                                     <td class="td-input"><input type="text" onchange="updateHost(this)" name='Comments' value="<?=$host["Comments"]?>"/></td> | ||||||
|                                 </form> |                                 </form> | ||||||
|                             </tr> |                             </tr> | ||||||
| <?php | <?php | ||||||
| @ -76,28 +79,36 @@ while ($network = $networks->fetch()) | |||||||
|                             </tr> |                             </tr> | ||||||
|                         </tfoot> |                         </tfoot> | ||||||
|                     </table> |                     </table> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
| <?php | <?php | ||||||
| } | } | ||||||
| $networks->closeCursor(); | $networks->closeCursor(); | ||||||
| ?> | ?> | ||||||
|  |  | ||||||
|  |             <div class="card teal lighten-5"> | ||||||
|  |                 <div class="card-content"> | ||||||
|  |                     <span class="card-title">Nouveau réseau</span> | ||||||
|                     <form name="addNetwork" id="addNetwork" action="addNetwork.php" method="post"> |                     <form name="addNetwork" id="addNetwork" action="addNetwork.php" method="post"> | ||||||
|             <fieldset class="add"> |  | ||||||
|                 <legend>Ajouter un réseau</legend> |  | ||||||
|                 <label for="nameInput">Nom</label> |  | ||||||
|                 <input type="text" id="nameInput" name="name" required/> |  | ||||||
|                 <label for="gatewayInput">Passerelle</label> |  | ||||||
|                 <input type="text" id="gatewayInput" name="gateway" pattern="^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"/> |  | ||||||
|                 <label for="maskInput">Masque</label> |  | ||||||
|                 <input type="text" id="maskInput" name="mask" pattern="^((0|128|192|224|240|248|252|255)\.0\.0.0|255\.(0|128|192|224|240|248|252|255)\.0\.0|255\.255\.(0|128|192|224|240|248|252|255)\.0|255\.255\.255\.(0|128|192|224|240|248|252|255))$"'/> |  | ||||||
|                         <input type="hidden" name="siteId" value="<?=$siteId?>"/> |                         <input type="hidden" name="siteId" value="<?=$siteId?>"/> | ||||||
|                         <input type="hidden" name="siteName" value="<?=$siteName?>"/> |                         <input type="hidden" name="siteName" value="<?=$siteName?>"/> | ||||||
|                 <button id="addButton" type="submit">Ajouter</button> |                         <div class="input-field"> | ||||||
|             </fieldset> |                             <label for="nameInput">Nom</label> | ||||||
|  |                             <input type="text" class="validate" id="nameInput" name="name" placeholder="LAN" required/> | ||||||
|  |                         </div> | ||||||
|  |                         <div class="input-field"> | ||||||
|  |                             <label for="gatewayInput">Passerelle</label> | ||||||
|  |                             <input type="text" class="validate" id="gatewayInput" name="gateway" placeholder="192.168.0.1" pattern="^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"/> | ||||||
|  |                         </div> | ||||||
|  |                         <div class="input-field"> | ||||||
|  |                             <label for="maskInput">Masque</label> | ||||||
|  |                             <input type="text" class="validate" id="maskInput" name="mask" placeholder="255.255.255.0" pattern="^((0|128|192|224|240|248|252|255)\.0\.0.0|255\.(0|128|192|224|240|248|252|255)\.0\.0|255\.255\.(0|128|192|224|240|248|252|255)\.0|255\.255\.255\.(0|128|192|224|240|248|252|255))$"'/> | ||||||
|  |                         </div> | ||||||
|  |                         <button type="submit" class="btn-floating halfway-fab waves-effect waves-light teal"><i class="material-icons">add</i></button> | ||||||
|                     </form> |                     </form> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|         <footer> |  | ||||||
|             <a href=".">Accueil</a> |  | ||||||
|         </footer> |  | ||||||
|     </body> |  | ||||||
| </html> |  | ||||||
| @ -1,32 +1,38 @@ | |||||||
| <html> |  | ||||||
|     <head> |  | ||||||
|         <title>TablIP</title> |  | ||||||
|         <link rel="stylesheet" href="style.css"/> |  | ||||||
|     </head> |  | ||||||
|     <body> |  | ||||||
|         <header> |         <header> | ||||||
|             <h1>TablIP</h1> |             <nav> | ||||||
|  |                 <div class="nav-wrapper navbar-fixed teal lighten-2"> | ||||||
|  |                     <a href="." class="brand-logo center">TablIP</a> | ||||||
|  |                     <div> | ||||||
|  |                         <a href="." class="breadcrumb">Sites</a> | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |             </nav> | ||||||
|         </header> |         </header> | ||||||
|         <ul> |         <div class="container"> | ||||||
|  |             <h1>Sites</h1> | ||||||
|  |             <div class="collection"> | ||||||
|  |  | ||||||
| <?php | <?php | ||||||
| include "connect.php"; | include "connect.php"; | ||||||
| $sites = $db->query('SELECT Name FROM Site ORDER BY Name'); | $sites = $db->query('SELECT Name FROM Sites ORDER BY Name'); | ||||||
| while ($site = $sites->fetch()) | while ($site = $sites->fetch()) | ||||||
| { | { | ||||||
|     echo "        <li><a href='.?site=${site['Name']}'>${site['Name']}</a></li>\n"; |     echo "            <a href='.?site=${site['Name']}' class='collection-item'>${site['Name']}</a>\n"; | ||||||
| } | } | ||||||
| $sites->closeCursor(); | $sites->closeCursor(); | ||||||
| ?> | ?> | ||||||
|  |  | ||||||
|         </ul> |             </div> | ||||||
|  |             <div class="card teal lighten-5"> | ||||||
|  |                 <div class="card-content"> | ||||||
|  |                     <span class="card-title">Nouveau site</span> | ||||||
|                     <form name="addSite" id="addSite" action="addSite.php" method="post"> |                     <form name="addSite" id="addSite" action="addSite.php" method="post"> | ||||||
|             <fieldset class="add"> |                         <div class="input-field"> | ||||||
|                 <legend>Ajouter un site</legend> |  | ||||||
|                             <label for="siteName">Nom</label> |                             <label for="siteName">Nom</label> | ||||||
|                 <input type="text" id="siteName" name="siteName" required/> |                             <input type="text" class="validate" id="siteName" name="siteName" placeholder="Site" required/> | ||||||
|                 <button type="submit">Ajouter</button> |                         </div> | ||||||
|             </fieldset> |                         <button type="submit" class="btn-floating halfway-fab waves-effect waves-light teal"><i class="material-icons">add</i></button> | ||||||
|                     </form> |                     </form> | ||||||
|     </body> |                 </div> | ||||||
| </html> |             </div> | ||||||
|  |         </div> | ||||||
							
								
								
									
										45
									
								
								style.css
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								style.css
									
									
									
									
									
								
							| @ -1,45 +0,0 @@ | |||||||
| body { |  | ||||||
|     margin: auto 1em; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| header { |  | ||||||
|     text-align: center; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| li { |  | ||||||
|     list-style: none; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| table { |  | ||||||
|     border-collapse: collapse; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| th, td { |  | ||||||
|     border: solid 1px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| td { |  | ||||||
|     padding: 0; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| td input { |  | ||||||
|     border: 0; |  | ||||||
|     background-repeat: no-repeat; |  | ||||||
|     background-position: right center; |  | ||||||
|     width: 100%; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .add { |  | ||||||
|     display: grid; |  | ||||||
|     grid-template-columns: 1fr 2fr; |  | ||||||
|     grid-gap: 1em; |  | ||||||
| } |  | ||||||
| .add button { |  | ||||||
|     width: 100%; |  | ||||||
|     margin: auto; |  | ||||||
|     grid-column: 1/3; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| footer { |  | ||||||
|     text-align: center; |  | ||||||
| } |  | ||||||
		Reference in New Issue
	
	Block a user