Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.18 KB | None | 0 0
  1. <html>
  2. <head>
  3. <link href="css/bootstrap.min.css" rel="stylesheet">
  4. <meta content="list/html; charset=utf-8" http-equiv="Content-Type" />
  5. <title>Config DNS and DHCP</title>
  6. </head>
  7. <body>
  8. <center>
  9. <style>
  10. form{
  11.   text-align: center;
  12. }
  13. h3 {
  14.     color: blue;
  15.     text-align: center;
  16. }
  17. table td, th, tr{
  18.   color: #333;
  19.   font-family: sans-serif;
  20.   font-size: .9em;
  21.   font-weight: 300;
  22.   text-align: center;
  23.   line-height: 25px;
  24.   border: 0px solid navy;
  25.   width: 800px;
  26.   margin: auto;
  27. }
  28. th {
  29.   height: 50px;
  30.   border: 0px solid navy;
  31. }
  32. input {
  33.         margin-bottom: 1em;
  34.         background-color: azure;
  35. }
  36. div {
  37.     font-weight:bold;
  38. }
  39. </style>
  40. <table>
  41.  
  42. <nav class="navbar navbar-inverse">
  43. <div class="container">
  44. <p class="navbar-text navbar-left"><font size="3">MENU</font></p>
  45. <p class="navbar-text navbar-left"><a href="http://localhost:1080/dhcp/index.php" class="navbar-link"><font size="3">DHCP and DNS</font></a></p>
  46. <p class="navbar-text navbar-left"><a href="http://localhost:1080/dhcp/config_subnet.php" class="navbar-link"><font size="3">Subnet</font></a></p>
  47. <p class="navbar-text navbar-left"><a href="http://localhost:1080/dhcp/config_zone_detail.php" class="navbar-link"><font size="3">Config Zone Detail</font></a></p>
  48.  
  49.  
  50. <div class="row">
  51.   <div class="col-lg-6 navbar-right">
  52.     <div class="input-group navbar-right">
  53.       <input type="text" class="form-control navbar-right" placeholder="Search for..." style="width: 250px;">
  54.       <span class="input-group-btn">
  55.         <button class="btn btn-default" type="button">Go!</button>
  56.       </span>
  57.     </div><!-- /input-group -->
  58.   </div><!-- /.col-lg-6 -->
  59. </div><!-- /.row -->
  60.  
  61. <!--
  62. <form class="navbar-form navbar-right" role="search">
  63.  <div class="form-group navbar-right">
  64.    <button type="submit" class="btn btn-default navbar-right">Submit</button>
  65.    <input type="text" class="form-control" placeholder="Search" style="width: 250px;">
  66.  </div>
  67. </form>
  68. -->
  69.  
  70. </div>
  71. </nav>
  72. <tr>
  73.  
  74. <form action="add.php" method="post" name="frm_data">
  75.     <table width="700">
  76.     <th>
  77.     <caption><font size="5"><h3>config dns - dhcp</h3></font></caption>
  78.     </th>
  79.    
  80.     <tr>
  81.     <td align="right"><font size="3"><div>Mac Address :</div></font></td>
  82.     <td><input name="macAddress_add" type="text" style="width: 200px;" /></td>
  83.     </tr>
  84.  
  85.     <tr>
  86.     <td align="right"><font size="3"><div>Zone :</div></font></td>
  87.     <td><input name="zone_add" type="text" style="width: 200px;" /></td>
  88.     </tr>
  89.    
  90.     <tr>
  91.     <td align="right"><font size="3"><div>Name :</div></font></td>
  92.     <td><input name="name_add" type="text" style="width: 200px;" /></td>
  93.     <td align="left">Only a-z, A-Z, 0-9 </td>
  94.     </tr>
  95.    
  96.     <tr>
  97.     <td align="right"><font size="3"><div>IP Address :</div></font></td>
  98.     <td><input name="ip_add" type="text" style="width: 200px;" /></td>
  99.     <td align="left">Example : 192.168.111.111 </td>
  100.     </tr>
  101.    
  102.     <tr>
  103.     <td align="right"><font size="3"><div>Expire :</div></font></td>
  104.     <td><input name="time_add" type="text" style="width: 200px;" /></td>
  105.     <td align="left">Example : yyyy-mm-dd  </td>
  106.     </tr>
  107.  
  108.     <tr>
  109.     <th><td><input name="but_submit" type="submit" value="submit"></td></th>
  110.     </tr>
  111.  
  112. </table>
  113. </form>
  114.  
  115. <table width="800">
  116. <form action="upload.php" method="post" enctype="multipart/form-data">
  117. <br><br>
  118.     <tr>
  119.     <td align="right" style="width:100px">Import CSV file :</td>
  120.     <td style="width:10px"><input type="file" name="fileCSV" id="fileCSV" size="100"></td>
  121.     <td style="width:10px"><input type="submit" value="Import" name="submit" size="100"></td>
  122.     <td style="width:300px"><div>  Format : MacAddress (xx:xx:xx:xx:xx:xx) , Zone , Hostname , ip , expire (yyyy-mm-dd)</td>
  123.     </tr>
  124. </form>
  125. </table>
  126. <br><br>
  127. <table width="800">
  128.     <h3>Display</h3>
  129. <br><br>
  130. </table>
  131.  
  132. <script>
  133. function myFunction() {
  134.     var ok = confirm("Are you sure!");
  135.     if(ok && chk_data() == 0){
  136.         document.getElementByld("form_new_qus").submit();
  137.     };
  138. }
  139. </script>
  140.  
  141. <div class="container">
  142.     <table class="table table-striped">
  143.     <thead>
  144.  
  145. <?php
  146.  
  147. include("connect.php");
  148.  
  149. $strSort = $_GET["sort"];
  150. if($strSort == ""){
  151.        $strSort = "zone";
  152. }
  153. function table($data){
  154.        echo '<th><div>';
  155.         echo "$data";
  156.         echo '</th></div>';
  157. }
  158.  
  159. echo '<tr>';
  160.         table("  #  ");
  161.         table('<a href=index.php?sort=hw>Mac Address</a>');
  162.         table('<a href=index.php?sort=ip>IP Address</a>');
  163.         table('<a href=index.php?sort=name>Name</a>');
  164.         table('<a href=index.php?sort=zone>Zone</a>');
  165.         table('<a href=index.php?sort=expire>Expire</a>');
  166.         table("Function");
  167. echo '</tr>';
  168.  
  169. $query_all_data = 'SELECT * FROM `ipv4` ORDER BY `'.$strSort.'` ASC';
  170. $my_result = mysql_query($query_all_data);
  171. $i = 1;
  172.  
  173. while($my_row1=mysql_fetch_array($my_result)){
  174.         echo '<tr>';
  175.         table("$i");
  176.         table($my_row1["hw"]);
  177.         table($my_row1["ip"]);
  178.         table($my_row1["name"]);
  179.         table($my_row1["zone"]);
  180.         table($my_row1["expire"]);
  181.         table('<a href=delete.php?ip='.trim($my_row1["ip"]).'&mac='.trim($my_row1["hw"]).' onclick=myFunction()>Delete</a>');
  182.         $i++;
  183.         echo '</tr>';
  184. }
  185.  
  186. mysql_close($con);
  187. ?>
  188. </thead>
  189. </table>
  190. </caption>
  191. </center>
  192. </body>
  193. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement