Exemplo n.º 1
0
 public static function allExceptoCurso($curso_id)
 {
     $GLOBALS['id'] = $curso_id;
     $documentaciones = Curso::find($curso_id)->documentacion()->select('documentacion_id')->get();
     $docs = array();
     foreach ($documentaciones as $documentacion) {
         $docs[] = $documentacion->documentacion_id;
     }
     $GLOBALS['docs'] = $docs;
     $documentacion = Documentacion::join('documentacion_cursos', function ($join) {
         $join->on('documentacion_cursos.documentacion_id', '=', 'documentacion.id');
     })->where('documentacion_cursos.curso_id', '!=', $GLOBALS['id']);
     if (!empty($GLOBALS['docs'])) {
         $documentacion->whereNotIn('documentacion.id', $GLOBALS['docs']);
     }
     return $documentacion->get();
 }
Exemplo n.º 2
0
require_once '../clases/Documentacion.php';
require_once '../clases/UtilDB.php';
require_once '../php/functions.php';
session_start();
$numParrafos = 0;
$ids_parrafos = array();
if (!isset($_SESSION['cve_expediente'])) {
    header('Location:login.php');
    return;
}
$documentacion = new Documentacion();
$count = NULL;
if (isset($_POST['txtCveExpediente'])) {
    if ($_POST['txtCveExpediente'] != 0) {
        $documentacion = new Documentacion($_POST['txtCveExpediente']);
    }
}
if (isset($_POST['xAccion'])) {
    if ($_POST['xAccion'] == 'grabar') {
        $fi = strtotime(str_replace('/', '-', $_POST['txtFechaInicio'] . " " . "00:00:00"));
        $ff = strtotime(str_replace('/', '-', $_POST['txtFechaFin'] . " " . "23:59:59"));
        $finicio = date('Y-m-d H:i:s', $fi);
        $ffin = date('Y-m-d H:i:s', $ff);
        $fecha = strtotime(str_replace('/', '-', date("d/m/Y h:i")));
        $fmodificacion = date('Y-m-d H:i:s', $fecha);
        $fgrabo = date('Y-m-d H:i:s', $fecha);
        $noticia->setTitulo($_POST['txtTitulo']);
        $noticia->setCveReata($_SESSION['cve_usuario']);
        $noticia->setCveModifico($_SESSION['cve_usuario']);
        $noticia->setNoticiaCorta($_POST['txtNoticiaCorta']);
Exemplo n.º 3
0
    header('Location: cambiar_anio_trimestre.php');
    die;
    return;
}
$anio = isset($_SESSION['anio']) ? (int) $_SESSION['anio'] : 0;
$trimestre = isset($_SESSION['trimestre']) ? (int) $_SESSION['trimestre'] : 0;
if (!isset($_SESSION['cve_usuario'])) {
    header('Location:login.php');
    return;
}
$documentacion = new Documentacion();
$count = NULL;
$json = NULL;
if (isset($_POST['txtCveExpediente'])) {
    if ($_POST['txtCveExpediente'] != 0) {
        $documentacion = new Documentacion($_POST['txtCveExpediente']);
        $json = json_encode($documentacion->getJsonData());
    }
}
if (isset($_POST['xAccion'])) {
    if ($_POST['xAccion'] == 'grabar') {
        $documentacion->setCveArticulo($_POST['cmbCveArticulo']);
        $documentacion->setCveFraccion($_POST['ajaxCmbFraccion'] == -1 ? 'null' : $_POST['ajaxCmbFraccion']);
        $documentacion->setCveInciso($_POST['cmbInciso'] == -1 ? 'null' : $_POST['cmbInciso']);
        $documentacion->setCveApartado($_POST['cmbApartado'] == -1 ? 'null' : $_POST['cmbApartado']);
        $documentacion->setCveClasificacion($_POST['cmbClasificacion'] == -1 ? 'null' : $_POST['cmbClasificacion']);
        $documentacion->setAnio($anio);
        $documentacion->setTrimestre($trimestre);
        $documentacion->setCveReata($_SESSION['cve_usuario']);
        $documentacion->setDescripcion($_POST['txtDescripcion']);
        $documentacion->setExpediente($_POST['txtExpediente']);
Exemplo n.º 4
0
 public function getDownload($id_documento)
 {
     $documento = Documentacion::find($id_documento);
     if ($documento->seccion != "cursos") {
         return Response::json(array('msg_error' => 'Archivo de otra sección'), 400);
     }
     return Response::download(Curso::path_doc() . "/" . $documento->nombreArchivo);
 }
<?php

require_once '../clases/Documentacion.php';
session_start();
if (!isset($_SESSION['cve_usuario'])) {
    header('Location:login.php');
    return;
}
$documentacion = new Documentacion();
if (isset($_POST['id'])) {
    $documentacion = new Documentacion((int) $_POST['id']);
}
?>
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title">Transparencia | opciones </h4>
</div>
<div class="modal-body">
    <div class="te">
        <p><strong>ID:</strong> <?php 
echo $documentacion->getCveExpediente();
?>
</p>
        <p><strong>Descripción:</strong> <?php 
echo $documentacion->getDescripcion();
?>
</p>
        <p><strong>Expediente:</strong> <?php 
echo $documentacion->getExpediente();
?>
</p>