Example #1
0
<?php

include_once "../../login/check.php";
/*error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);*/
include_once "../../class/registronotasexcel.php";
include_once "../../class/registronotas.php";
include_once "../../class/casilleros.php";
$CodigoRegistro = $_SESSION['CodigoRegistro'];
$registronotasexcel = new registronotasexcel();
$registronotas = new registronotas();
$casilleros = new casilleros();
$rne = $registronotasexcel->mostrarTodoRegistro("CodRegistroNotasExcel=" . $CodigoRegistro);
$rne = array_shift($rne);
//print_r($rne);
$nombrearchivo = "archivos/" . $rne['NombreArchivo'];
date_default_timezone_set('America/La_Paz');
/*print_r($rne);
$nombrearchivo="archivos/16.xls";*/
//exit();
$vars = get_defined_vars();
/** Incluir PHPExcel */
require_once 'Classes/PHPExcel.php';
include_once 'funciones/funciones.php';
$objPHPExcel = PHPExcel_IOFactory::load($nombrearchivo);
/*
$objReader = new PHPExcel_Reader_Excel2007();
$objPHPExcel = $objReader->load("simple.xlsx");
*/
$dact = $objPHPExcel->getActiveSheet();
Example #2
0
include_once "../../class/curso.php";
include_once "../../class/docente.php";
include_once "../../class/materias.php";
include_once "../../class/registronotasexcel.php";
extract($_POST);
$curso = new curso();
$docente = new docente();
$materias = new materias();
$registronotasexcel = new registronotasexcel();
$CodDocente = $CodDocente != "" ? "CodDocente='{$CodDocente}'" : "CodDocente LIKE '%'";
$CodMateria = $CodMateria != "" ? "CodMateria='{$CodMateria}'" : "CodMateria LIKE '%'";
$CodCurso = $CodCurso != "" ? "CodCurso='{$CodCurso}'" : "CodCurso LIKE '%'";
$Fecha = $Fecha != "" ? "FechaRegistro='" . fecha2Str($Fecha, 0) . "'" : "FechaRegistro LIKE '%'";
$condicion = "{$CodDocente} and {$CodMateria} and {$CodCurso} and {$Fecha}";
//echo $condicion;
$regnotasexcel = $registronotasexcel->mostrarTodoRegistro($condicion, 1, "FechaRegistro,HoraRegistro");
if (!count($regnotasexcel)) {
    ?>
<div class="alert alert-info"><?php 
    echo $idioma['NoExisteRegistro'];
    ?>
</div>
<?php 
    exit;
}
$i = 0;
?>
<a href="#" id="exportarexcel" class="btn btn-mini btn-success"><?php 
echo $idioma['ExportarExcel'];
?>
</a>