Esempio n. 1
0
function fntRetornaDesfechos()
{
    if (isset($_SESSION['caso']) && $_SESSION['caso'] > 0) {
        $desfechos = new Desfecho();
        $lista = $desfechos->ListaRecordSet($_SESSION['caso']);
        if ($lista != false && count($lista) > 0) {
            $html = Comuns::TopoTabelaListagem("", "tabDesfechos", array(' ', 'Desfecho'));
            foreach ($lista as $des) {
                $html .= '<tr>';
                $html .= '<td><input type="checkbox" id="chk_des_' . $des->CodDesfecho . '" class="item_arvore"></td>';
                $html .= '<td><span id="spn_des_' . $des->CodDesfecho . '">' . $des->Titulo . '</span></td>';
                $html .= '</tr>';
            }
            $html .= "</tbody></table>";
            return $html;
        } else {
            return "@lng[Nenhum desfecho cadastrado]";
        }
    } else {
        return "@lng[Caso não encontrado]";
    }
}