Example #1
0
            echo '<tr class="tr-1">';
        } else {
            echo '<tr class="tr-2">';
        }
        if ($acao == 'edita') {
            echo "<td><span><a href='edita_obra?t=a_c_o&id=" . $obra->id . "' value='{$obra->id}' style='width:100%'>{$obra->id}</a></span></td><td><span><a href='edita_obra?t=a_c_o&id=" . $obra->id . "' value='{$obra->id}' \n\t\t\t\t\t      style='width:100%'>{$obra->nome}</a></span></td><td><span><a href='edita_obra?t=a_c_o&id=" . $obra->id . "' value='{$obra->id}' style='width:100%' title='{$obra->descricao}'>";
            echo substr($obra->descricao, 0, 70);
            strlen($obra->descricao) > 70 ? print '...' : '';
            echo "</a></span></td>";
            echo "<td><a href='edita_obra?t=a_c_o&id=" . $obra->id . "' value='{$obra->id}' style='width:100%'><span>" . Obra::getStatus($obra->status) . "</span></a></td>";
        } else {
            echo "<td><span><a href='visualizar_obras?id=" . $obra->id . "' value='{$obra->id}' style='width:100%'>{$obra->id}</a></span></td><td><span><a href='visualizar_obras?id=" . $obra->id . "' value='{$obra->id}' \n\t\t\t              style='width:100%'>{$obra->nome}</a></span></td><td><span><a href='visualizar_obras?id=" . $obra->id . "' value='{$obra->id}' style='width:100%' title='{$obra->descricao}'>";
            echo substr($obra->descricao, 0, 70);
            strlen($obra->descricao) > 70 ? print '...' : '';
            echo "</a></span></td>";
            echo "<td><a href='visualizar_obras?id=" . $obra->id . "' value='{$obra->id}' style='width:100%'><span>" . Obra::getStatus($obra->status) . "</span></a></td>";
        }
        echo '</tr>';
        // echo "<option>teste</option>";
        $contTab++;
    }
    echo '</table>';
} else {
    echo '<table class="table_geral">';
    if ($nome != 100) {
        echo '<tr class="tr-cabecalho"><td>NENHUM REGISTRO ENCONTRADO</td></tr>';
    } else {
        echo '<tr class="tr-cabecalho"><td>Busque uma obra</td></tr>';
    }
    echo '</table>';
}
Example #2
0
     $contColl++;
 } else {
     if ($key == 'id_regiao_trabalho') {
         $nome = Regiao::get_name_regiao_by_id($value);
         echo '<td><b>' . transformaLabel($key) . ":</b> {$nome}</td>";
         $contColl++;
     } else {
         if ($key == 'descricao') {
             echo '<td title="' . $value . '"><b>' . transformaLabel($key) . ":</b> ";
             echo substr($value, 0, 40);
             strlen($value) > 40 ? print '...' : '';
             echo "</td>";
             $contColl++;
         } else {
             if ($key == 'status') {
                 $status = Obra::getStatus($value);
                 echo '<td><b>' . transformaLabel($key) . ":</b> {$status}</td>";
                 $contColl++;
             } else {
                 if ($key == 'id_empresa') {
                     $nome = Empresa::get_nome_by_id($value);
                     echo '<td><b>' . transformaLabel($key) . ":</b> {$nome}</td>";
                     $contColl++;
                 } else {
                     if ($key == 'id_endereco') {
                         $endereco = Endereco::get_endereco_formatado($value);
                         echo '<td><b>' . transformaLabel($key) . ":</b> {$endereco}</td>";
                         $contColl++;
                     } else {
                         echo '<td><b>' . transformaLabel($key) . ":</b> {$value} </td>";
                         $contColl++;