Example #1
0
session_start();
$file_name = $op . "_" . date("Ymd") . ".xls";
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition: attachment;filename={$file_name}");
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<?php 
include '../conexion_db.php';
include '../generales.php';
switch ($op) {
    case "empleados":
        empleados($f_acdi, $f_userid, $f_depto, $f_pagina, $f_tipo);
        break;
    case "supervisores":
        supervisores($f_division);
        break;
    case "capturistas":
        capturistas($f_division);
        break;
    case "capt_merma":
        capt_merma();
        break;
    case "aut_lpl":
        aut_lpl($f_division, $f_prce, $f_proyecto, $f_tipo);
        break;
    case "aut_prod":
        aut_prod($f_division, $f_area, $f_proyecto);
        break;
    case "aut_inv":
        aut_inv($f_division);
Example #2
0
    $response->res = $res;
    $response->mes = $mes;
    echo json_encode($response);
}
//validamos si es una peticiĆ³n ajax
if (isset($_POST['action']) && !empty($_POST['action'])) {
    $action = $_POST['action'];
    switch ($action) {
        case 'save':
            add_inventario();
            break;
        case 'update':
            upd_inventario();
            break;
        case 'get_lotes':
            lotes_au();
            break;
        case 'get_supervisores':
            supervisores();
            break;
        case 'del_inventario':
            remove_inv();
            break;
        case 'get_singular':
            get_single();
            break;
        case 'get_cap':
            get_cap();
            break;
    }
}