Esempio n. 1
0
</div>
<div class='control-group'>
    <label>Duracion En Horas</label>
    <input class='form-control' placeholder='0.00' id='duracion_en_horas' name='duracion_en_horas' type="number"/>
</div>
<div class='control-group'>
    <p></p>
    <button type='button' class='btn btn-primary' onclick='save()'>Guardar</button>
    <button type='reset' class='btn'>Limpiar</button>
</div>
</form>
<hr/>
<?php 
include_once 'nucleo/turno.php';
$obj = new turno();
$objs = $obj->listDB();
?>
<div class='contenedor-tabla'>
    <table id='tb' class='display' cellspacing='0' width='100%'>
        <thead>
            <tr>
                <th>Id</th><th>Nombre</th><th>Descripcion</th><th>Duracion En Horas</th>
                <th>OPC</th>
            </tr>
        </thead>
        <tbody>
            <?php 
if (is_array($objs)) {
    foreach ($objs as $o) {
        ?>
                    <tr><td><?php 
Esempio n. 2
0
         echo json_encode($objturno->updateDB());
         break;
     case 'del':
         $objturno->setVar('id', $_POST['id']);
         echo json_encode($objturno->deleteDB());
         break;
     case 'get':
         $res = $objturno->searchDB($_POST['id'], 'id', 1);
         if (is_array($res)) {
             echo json_encode($res[0]);
         } else {
             echo json_encode(0);
         }
         break;
     case 'list':
         $res = $objturno->listDB();
         if (is_array($res)) {
             echo json_encode($res);
         } else {
             echo json_encode(0);
         }
         break;
     case 'search':
         $res = $objturno->searchDB($_POST['data'], $_POST['value'], $_POST['type']);
         if (is_array($res)) {
             echo json_encode($res);
         } else {
             echo json_encode(0);
         }
         break;
 }
    <div class='control-group'>
    <label>Fecha</label>
    <input class='form-control' placeholder='Fecha' id='fecha_busqueda' name='fecha_busqueda' value="<?php 
if (isset($_GET["fb"])) {
    echo $_GET["fb"];
}
?>
"/>
    </div>
    <div class='control-group'>
    <label>Turno</label>
    <select class='form-control' id='turno_busqueda' name='turno_busqueda'>
        <?php 
require_once 'nucleo/turno.php';
$objturno = new turno();
$ltu = $objturno->listDB();
if (is_array($ltu)) {
    foreach ($ltu as $tu) {
        echo '<option value="' . $tu["id"] . '"';
        if (isset($_GET["tu"])) {
            if ($_GET["tu"] === $tu["id"]) {
                echo " selected";
            }
        }
        echo '>' . $tu["nombre"] . '</option>';
    }
}
?>
    </select>
    </div>
    <div class='control-group'>
Esempio n. 4
0
}
if (isset($_GET["nfac"])) {
    if ($_GET["nfac"] !== "") {
        $sql_where .= " AND r.numero_facturacion = '" . $_GET["nfac"] . "'";
    }
}
$col1 = 0;
$col2 = 0;
$col3 = 0;
$col4 = 0;
if (isset($_GET["fi"])) {
    if ($_GET["fi"] !== "" && $_GET["ff"] !== "") {
        $fecha1 = $_GET["fi"];
        $fecha2 = $_GET["ff"];
        $objturno = new turno();
        $turnos = $objturno->listDB();
        $cturno = count($turnos);
        $j = 0;
        $viajes = 0;
        $kilos = 0;
        for ($i = $fecha1; $i <= $fecha2; $i = date("Y-m-d", strtotime($i . "+ 1 days"))) {
            if (is_array($turnos)) {
                $j = 0;
                $viajes = 0;
                $kilos = 0;
                foreach ($turnos as $tr) {
                    $objreg = new registro();
                    $j = $j + 1;
                    echo "<tr>";
                    echo "<td>" . $i . "</td>";
                    echo "<td>" . $tr["nombre"] . "</td>";