Guest User

Untitled

a guest
Apr 24th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <?php
  2.  
  3. //Setam data ,deoarece log-urile se salveaza cu data curenta.
  4. //BAN_HISTORY_12(luna)08(ziua)2011(anul).
  5. $data = date('mdY');
  6.  
  7.  
  8. //Fisierul care trebuie deschis si variabila pentru data.
  9. $file= file('logs/BAN_HISTORY_'.$data.'.log');
  10. print '
  11. <a href="index.php" class="">Back</a><br /><br />
  12. <table width="70%" align="center" class="last">
  13. <tr><th class="title" colspan="10">LOG-uri ban din data de '.date('d-m-Y').'</th></tr>
  14. <tr><th> Log </th>
  15. <th> Date </th>
  16. <th> Action </th>
  17. <th> Reason </th>
  18. <th> Ban length </th>
  19. ';
  20.  
  21. $ouput = "";
  22.  
  23. for($i=0;$i<count($file);$i++) {
  24.      if(strpos($file[$i],"Reason")) {
  25.                              
  26.      $file[$i];
  27.          
  28.          $out = explode('||', $file[$i]);
  29.  
  30.          if(substr($out[0],0,2)){
  31.            
  32.                         $logname = 'Log file.';
  33.          }
  34.  
  35.  
  36.                 print '<tr>
  37.                <td>'.$logname.'</td>
  38.                <td>'.substr($out[0],2,21).'</td>
  39.                <td>'.substr($out[0],24).'</td>
  40.                <td>'.substr($out[1],0).'</td>
  41.                <td>'.substr($out[2],0).'</td>
  42.                </tr>';
  43.      }
  44. }
  45.  
  46.  
  47. ?>
Add Comment
Please, Sign In to add comment