예제 #1
0
function tratoHoraSaida($id, $saida)
{
    if ($saida === '0000-00-00 00:00:00') {
        print '<a href="saida.php?id=' . $id . '">apontar saída</a>';
    } else {
        print dataAmigavel($saida);
    }
}
예제 #2
0
    ?>
</td>
		<td><?php 
    echo $carro['marca'];
    ?>
</td>
		<td><?php 
    echo $carro['modelo'];
    ?>
</td>
		<td><?php 
    echo $carro['vaga'];
    ?>
</td>
		<td><?php 
    dataAmigavel($carro['hora_entrada']);
    ?>
</td>
		<td><?php 
    tratoHoraSaida($carro['id'], $carro['hora_saida']);
    ?>
</td>
		<td>
			<a href="editar.php?id=<?php 
    echo $carro['id'];
    ?>
"><i class="fa fa-pencil-square-o"></i></a>
			<a href="duplicar.php?id=<?php 
    echo $carro['id'];
    ?>
"><i class="fa fa-files-o"></i></a>