Changeset 27 for trunk/index.php


Ignore:
Timestamp:
Sep 11, 2019, 6:26:39 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Show time of currently running people with green and bold font.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r26 r27  
    414414        '<td>'.$Item['Money'].'</td>'.
    415415        '<td>'.$Item['Rank'].'</td>'.
    416         '<td>'.HumanDateTime(MysqlDateTimeToTime($Item['Time'])).'</td>'.
     416        '<td>'.$this->RunningState(MysqlDateTimeToTime($Item['Time'])).'</td>'.
    417417        '</tr>';
    418418    }
     
    487487  }
    488488
     489  function RunningState($Time)
     490  {
     491    $Output = HumanDateTime($Time);
     492    if ($Time > time() - 30 * 60)
     493      $Output = '<span style="color: green; font-weight: bold; ">'.$Output.'</span>';
     494    return $Output;
     495  }
     496
    489497  function ShowTeam()
    490498  {
     
    541549        '<td>'.$Item['Money'].'</td>'.
    542550        '<td>'.$Item['Rank'].'</td>'.
    543         '<td>'.HumanDateTime(MysqlDateTimeToTime($Item['Time'])).'</td>'.
     551        '<td>'.$this->RunningState(MysqlDateTimeToTime($Item['Time'])).'</td>'.
    544552        '</tr>';
    545553    }
     
    639647    {
    640648      $Output .= '<tr>'.
    641         '<td>'.HumanDateTime(MysqlDateTimeToTime($Item['Time'])).'</td>'.
     649        '<td>'.HumanDate(MysqlDateTimeToTime($Item['Time'])).'</td>'.
    642650        '<td>'.$Item['Distance'].'</td>'.
    643651        '<td>'.$Item['Money'].'</td>'.
     
    711719        '<td>'.$Item['Money'].'</td>'.
    712720        '<td>'.$Item['Rank'].'</td>'.
    713         '<td>'.HumanDateTime(MysqlDateTimeToTime($Item['Time'])).'</td>'.
     721        '<td>'.$this->RunningState(MysqlDateTimeToTime($Item['Time'])).'</td>'.
    714722        '</tr>';
    715723    }
Note: See TracChangeset for help on using the changeset viewer.