?>
</a>
            </th>
            <th width="120">
                Localizador
            </th>
            <th width="120">
                Status
            </th>
        </tr>
    </thead>
    <tbody>
    <?php 
$subject_field = TicketForm::objects()->one()->getField('subject');
if ($res && ($num = db_num_rows($res))) {
    $defaultDept = Dept::getDefaultDeptName();
    //Default public dept.
    while ($row = db_fetch_array($res)) {
        $dept = $row['ispublic'] ? $row['dept_name'] : $defaultDept;
        $subject = Format::truncate($subject_field->display($subject_field->to_php($row['subject']) ?: $row['subject']), 40);
        if ($row['attachments']) {
            $subject .= '  &nbsp;&nbsp;<span class="Icon file"></span>';
        }
        $ticketNumber = $row['number'];
        if ($row['isanswered'] && !strcasecmp($row['state'], 'open')) {
            $subject = "<b>{$subject}</b>";
            $ticketNumber = "<b>{$ticketNumber}</b>";
        }
        ?>
            <tr id="<?php 
        echo $row['ticket_id'];