//                                                                       //
// This program is distributed in the hope that it will be useful,       //
// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
// GNU General Public License for more details:                          //
//                                                                       //
//          http://www.gnu.org/copyleft/gpl.html                         //
//                                                                       //
///////////////////////////////////////////////////////////////////////////
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition: attachment; filename=Informe_partes_trabajo.xls");
header("Pragma: public");
include "../functions/globales.php";
include "../functions/funciones.php";
$personal = array_personal();
$columnas = columnas('kz_te_partes');
if (!$_POST['ini_d']) {
    $_POST['ini_d'] = date('d');
    $_POST['ini_m'] = date('m');
    $_POST['ini_y'] = date('Y');
    $_POST['fin_d'] = date('d');
    $_POST['fin_m'] = date('m');
    $_POST['fin_y'] = date('Y');
}
foreach ($_POST as $key => $valor) {
    if (substr($key, 0, 7) == 'fil_col') {
        $filtros_columnas[count($filtros_columnas)] = $valor;
    }
}
if ($filtros_columnas) {
    $filtros_columnas_implode = implode(',', $filtros_columnas);
Пример #2
0
                     echo '<td>' . $d . '</td>';
                 }
             }
             echo '</tr>';
         }
         break;
     case 'empresas':
         $hide = !$view->super() ? array() : array();
         //para ocultar los campos que no se tengan que ver
         //quitar los campos sensibles
         unset($data["PASSWORD"]);
         //escribe los titulos de las columnas
         echo '<tr>';
         foreach (reset($data) as $id => $d) {
             if (!in_array($id, $hide)) {
                 echo '<th>' . columnas($id) . '</th>';
             }
         }
         echo '</tr>';
         //escribe los registros
         foreach ($data as $row => $set) {
             echo '<tr>';
             foreach ($set as $id => $d) {
                 if (!in_array($id, $hide)) {
                     echo '<td>' . $d . '</td>';
                 }
             }
             echo '</tr>';
         }
         break;
 }
Пример #3
0
                $cambiar = array();
                $fijos = array();
                foreach ($data as $c => $v) {
                    if (in_array($c, $ocultar)) {
                        echo '<input type="hidden" name="row[' . $ctrl . '][' . cambiarCampo($c, $cambiar) . ']" value="' . $v . '" />';
                    } elseif (in_array($c, $select)) {
                        echo '<div class="campoForm">';
                        echo '<label>' . columnas($c) . '</label><select class="' . $c . '" name="row[' . $ctrl . '][' . cambiarCampo($c, $cambiar) . ']" value="' . $v . '" >' . $options[$c] . '</select>';
                        echo '</div>';
                    } elseif (in_array($c, $fijos)) {
                        echo '<div class="campoForm">';
                        echo '<label>' . columnas($c) . '</label><input type="text" readonly="readonly" value="' . $v . '" />';
                        echo '</div>';
                    } else {
                        echo '<div class="campoForm">';
                        echo '<label>' . columnas($c) . '</label><input type="text" class="' . $c . '" name="row[' . $ctrl . '][' . cambiarCampo($c, $cambiar) . ']" value="' . $v . '" />';
                        echo '</div>';
                    }
                }
                ?>
	</div>
    <?php 
            }
            ?>
		<div class="campoForm" align="right">
        	<input type="submit" value="Modificar" /><input type="reset" />
        </div>
    </form>
    <?php 
            break;
    }