Esempio n. 1
0
 public static function assignments($history)
 {
     $results = Queries::assignments($history);
     $now_pos = 0;
     foreach ($results as $index => $entry) {
         if (strtotime($entry->end_date . ' ' . $entry->end_time) < strtotime('now')) {
             $now_pos = $index + 1;
         }
         $entry->start_date = DateFormat::dateTable($entry->start_date);
         $entry->end_date = DateFormat::dateTable($entry->end_date);
         $entry->end_time = DateFormat::timeDefault($entry->end_time);
     }
     $today = new stdClass();
     $today->todayRow = true;
     $today->id = 'today';
     $today->completion = false;
     $today->end_date = '<b>' . DateFormat::dateTable();
     $today->end_time = DateFormat::timeDefault() . '</b>';
     $today->subject_name = '</a><b>Today is a gift</b><a href="">';
     $today->desc_short = '</a><b>Thats why it\'s called the present</b><a href="">';
     $today->team = '';
     $today->state = '<b>-</b>';
     array_splice($results, $now_pos, 0, array($today));
     return $results;
 }