This commit is contained in:
2024-04-18 13:35:46 -06:00
parent 4ae9d9f589
commit 631bd8916e
2 changed files with 6 additions and 2 deletions

View File

@@ -1,8 +1,12 @@
<?php <?php
$fecha = date('d_m_Y'); $fecha = date('d_m_Y');
require_once 'class/c_login.php';
if (!isset($_SESSION['user'])){
die(header('Location: index.php'));
}
header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
header("Content-Disposition: attachment;filename=horario_$fecha.xlsx"); header("Content-Disposition: attachment;filename=solicitudes_$fecha.xlsx");
header("Cache-Control: max-age=0"); header("Cache-Control: max-age=0");
require_once "../vendor/autoload.php"; require_once "../vendor/autoload.php";

View File

@@ -198,7 +198,7 @@ if($user->periodo_id!= ""){
<input type="hidden" name="fecha_inicial" value="<?php echo $fecha_ini;?>"> <input type="hidden" name="fecha_inicial" value="<?php echo $fecha_ini;?>">
<input type="hidden" name="fecha_final" value="<?php echo $fecha_fin;?>"> <input type="hidden" name="fecha_final" value="<?php echo $fecha_fin;?>">
<p class="text-right"> <p class="text-right">
<button class="btn btn-secondary" id="exportar" type="submit"><span class="ing-descargar"></span>Descargar xls</button> <button class="btn btn-outline-secondary" id="exportar" type="submit"><span class="ing-descarga"></span> Descargar xls</button>
</p> </p>
</form> </form>
</form> </form>