Changeset 560
- Timestamp:
- Apr 7, 2009, 7:21:24 PM (16 years ago)
- Location:
- trunk/pages
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/spravce-charlog.php
r559 r560 1 1 <?php 2 3 $gmlog = $Config['Mangos']['GMCharLog']; 4 2 $soubor = fopen("/a/mangos1/logs/Char.log", "r"); 3 $text = fread($soubor, 1999999); 4 echo($text); 5 fclose($soubor); 5 6 ?> -
trunk/pages/spravce-gmlog.php
r559 r560 1 1 <?php 2 $soubor = fopen("/a/mangos1/logs/GM_Commands.log", "r"); 3 $text = fread($soubor, 1999999); 4 echo($text); 5 fclose($soubor); 6 ?> 2 7 3 $gmlog = $Config['Mangos']['GMCommandsLog'];4 5 6 7 8 $data = file($gmlog);9 $radku = count($data);10 11 12 $db->select_db($Config['Mangos']['DatabaseCharacters']);13 14 15 {16 $radek = $radku - 1;17 $pole = explode(' ', $data[$radek]);18 19 if($pole[3] == 'announce') $prikaz = 'announce ...';20 else21 {22 $prikaz = explode('[', $pole[3].' '.$pole[4].' '.$pole[5].' '.$pole[6].' '.$pole[7].' '.$pole[8].' '.$pole[9]);23 $prikaz = $prikaz[0];24 }25 26 $prikaz_pole = explode('[', $pole[3].' '.$pole[4].' '.$pole[5].' '.$pole[6].' '.$pole[7].' '.$pole[8].' '.$pole[9]);27 $hrac_pole = explode('Player:', $data[$radek]);28 $hrac = explode(' ', $hrac_pole[1]);29 $vybran_pole = explode('Selected:', $data[$radek]);30 $vybran = explode(' ', $vybran_pole[1]);31 32 if($vybran[1] == 'player')33 {34 $guid_pole = explode('GUID:', $vybran_pole[1]);35 $guid = explode(')]', $guid_pole[1]);36 37 $DbResult = $db->query('SELECT name FROM characters WHERE guid='.$guid[0]);38 if($DbResult->num_rows > 0)39 {40 $radek = $DbResult->fetch_assoc();41 $vybran_radek = $radek['name'];42 $vybran = 'hráč '.$vybran_radek;43 } else $vybran = '<i>neznámý hráč</i>';44 } else $vybran = $vybran[1];45 46 echo('<tr><td>'.$pole[0].' '.$pole[1].'</td><td>'.$prikaz.'</td><td>'.$hrac[1].'</td><td>'.$vybran.'</td></tr>');47 $i = $i + 1;48 $radku = $radku - 1;49 }50 echo('</table>');51 52 ?>
Note:
See TracChangeset
for help on using the changeset viewer.