Legend:
- Unmodified
- Added
- Removed
-
index.php
r162 r168 1 1 <?php 2 3 function Events()4 {5 global $Database;6 $Database->select_db('mangos');7 $DbResult = $Database->select('game_event', '*,UNIX_TIMESTAMP(start) as start', 'end > NOW() AND start < NOW()');8 $Result = '<strong>Probíhající události ve høe:</strong><br>';9 while($Row = $DbResult->fetch_array())10 {11 $Start = floor((time() - $Row['start']) / ($Row['occurence'] * 60)) * $Row['occurence'] + $Row['start'];12 $End = $Start + $Row['length'] * 60;13 $Result .= $Row['description'].' '.date('H:i:s j.n.Y', $Start).' '.date('H:i:s j.n.Y', $End).'<br>';14 }15 16 return($Result);17 }18 2 19 3 include('global.php');
Note:
See TracChangeset
for help on using the changeset viewer.