Guest User

Untitled

a guest
Sep 22nd, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.56 KB | None | 0 0
  1. <html>
  2. <!-- DataTables CSS -->
  3. <link rel="stylesheet" type="text/css" href="/DataTables-1.10.9/media/css/jquery.dataTables.css">
  4.  
  5. <!-- jQuery -->
  6. <script type="text/javascript" charset="utf8" src="/DataTables-1.10.9/media/js/jquery.js"></script>
  7.  
  8. <!-- DataTables -->
  9. <script type="text/javascript" charset="utf8" src="/DataTables-1.10.9/media/js/jquery.dataTables.js"></script>
  10.  
  11.  
  12. <?php
  13. $ini_array = parse_ini_file("myfile.ini", true);
  14.  
  15. $getstats = array(
  16.     "Username",
  17.     "Kills",
  18.     "Total Deaths",
  19.     "Suicide",
  20.     "bear.prefab",
  21.     "wolf.prefab",
  22.     "patrolhelicopter.prefab",
  23.     "killed by fall",
  24.     "Cold",
  25.     "Explosion",
  26.     "barricade",
  27.     "Player Deaths"
  28. );
  29.  
  30. ?>
  31.  
  32.     <body>
  33.     <table>
  34.     </table>
  35.        
  36.         <table id="mytable" border ="1" style="width:100%">
  37.             <thead>      
  38.     <tr>
  39.     <th>Name</th>
  40.     <th>Kills</th>
  41.     <th>Death Total</th>
  42.     <th>Suicides</th>
  43.     <th>Bears</th>
  44.     <th>Wolves</th>
  45.     <th>Helicopter</th>
  46.     <th>Falling</th>
  47.     <th>Cold</th>
  48.     <th>Explosions</th>
  49.     <th>Barricade</th>
  50.     <th>Player Deaths</th>
  51.    
  52.             </thead>
  53.         <?php
  54. foreach ($ini_array as $key => $value) {
  55.     echo "<tbody>";
  56.     echo "<tr>";
  57.     for ($i = 0; $i < 12; $i++) {
  58.        
  59.         echo "<td>";
  60.         echo ($value[$getstats[$i]]);
  61.         echo "</td>";
  62.     }
  63.     echo "</tr>";
  64.     echo "</tbody>";
  65. }
  66. ?>
  67.   </tr>
  68.  
  69.  
  70. </table>
  71.     </body>
  72.    
  73.     <script>
  74.  $(document).ready(function() {
  75.     $('#mytable').DataTable();
  76. } );
  77. </script>
  78. </html>
Advertisement
Add Comment
Please, Sign In to add comment