/** Called from the dynamic table class when creating a player session table that has a timestamp @param: $sess contains stats for the current player session. */ function ps_table_session_time_link($time, $sess) { global $ps; $time = ps_date_stamp($sess['sessionstart']); $time .= " @ " . ps_time_stamp($sess['sessionstart'], 'H:i') . " - " . ps_time_stamp($sess['sessionend'], 'H:i'); return $time; }
function award_format($value, $format = '%s') { if (substr($format, 0, 1) == '%') { return sprintf($format, $value); } switch ($format) { case "commify": return commify($value); case "compacttime": return compacttime($value); case "date": return ps_date_stamp($value); case "datetime": return ps_datetime_stamp($value); } // the [brackets] will help troubleshoot issues when a invalid format is specified return "[ {$value} ]"; }