Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Setam data ,deoarece log-urile se salveaza cu data curenta.
- //BAN_HISTORY_12(luna)08(ziua)2011(anul).
- $data = date('mdY');
- //Fisierul care trebuie deschis si variabila pentru data.
- $file= file('logs/BAN_HISTORY_'.$data.'.log');
- print '
- <a href="index.php" class="">Back</a><br /><br />
- <table width="70%" align="center" class="last">
- <tr><th class="title" colspan="10">LOG-uri ban din data de '.date('d-m-Y').'</th></tr>
- <tr><th> Log </th>
- <th> Date </th>
- <th> Action </th>
- <th> Reason </th>
- <th> Ban length </th>
- ';
- $ouput = "";
- for($i=0;$i<count($file);$i++) {
- if(strpos($file[$i],"Reason")) {
- $file[$i];
- $out = explode('||', $file[$i]);
- if(substr($out[0],0,2)){
- $logname = 'Log file.';
- }
- print '<tr>
- <td>'.$logname.'</td>
- <td>'.substr($out[0],2,21).'</td>
- <td>'.substr($out[0],24).'</td>
- <td>'.substr($out[1],0).'</td>
- <td>'.substr($out[2],0).'</td>
- </tr>';
- }
- }
- ?>
Add Comment
Please, Sign In to add comment