[station_code] => 164 ) * */ if (!isset($_POST['action'])) { exit; } if (isset($_POST['userid'])) { $userid = $_POST['userid']; } if (isset($_POST['station_code'])) { $station_code = $_POST['station_code']; } switch ($_POST['action']) { case 'export': if ($id_log = Station::export_data($userid, $station_code)) { $archivo = Log::search($id_log); $enlace = $archivo[0]->getInfo(); $enlace2 = $archivo[0]->getFile(); ob_clean(); header("Content-Disposition: attachment; filename={$enlace2} "); header("Content-Type: application/force-download"); header("Content-Length: " . filesize($enlace)); readfile($enlace); } else { echo "ocurrio algun error<br>"; } break; case 'config': if ($errores = Config_Station::update()) { mensaje("Se guardó la configuración de la estación", "Configurar estación", "", "/");