<th><?php TR::phtml('form', 'stop'); ?> </th> <th><?php TR::phtml('task', 'spent'); ?> </th> </tr> </thead> <tbody> <?php do { $params = array('id' => $this->data->getUid(), 'start' => $this->data->get('start')); $total += $this->data->get('spent'); echo '<tr id="tr_' . $this->data->get('id') . '_' . VarDtm::strToUnix($this->data->get('start')) . '">'; // start echo '<td>' . $this->data->htmlBegin() . '</td>'; // stop echo '<td>' . $this->data->htmlEnd() . '</td>'; // time spent echo '<td>'; echo '<a href="' . $this->fc->getUrl('timer', 'delete', $params) . '" class="onhold ajax confirm" rel="tab2">' . TR::html('button', 'delete') . '</a>'; echo $this->data->getTimeSpent(); echo '</td>'; echo '</tr>'; } while ($this->data->next()); ?> </tbody> <tfoot> <tr>
public static function html($val, $format = '', $default = '') { if (!$format) { $format = $GLOBALS['config']['datetime']['us_format'] ? APP_DATETIME_USA : APP_DATETIME_EUR; } $t = VarDtm::strToUnix($val); if ($t === false) { return '/!\\'; } if ($t) { return strftime($format, $t); } else { return $default; } return $val; }