예제 #1
0
 protected function private_core()
 {
     /// ¿El usuario tiene permiso para eliminar en esta página?
     $this->allow_delete = $this->user->allow_delete_on(__CLASS__);
     $this->tipo = FALSE;
     if (isset($_REQUEST['cod'])) {
         $tip = new tipo();
         $this->tipo = $tip->get($_REQUEST['cod']);
     }
     if ($this->tipo) {
         $this->page->title = $this->tipo->codtipo;
         if (isset($_POST['cod'])) {
             $this->tipo->descripcion = $_POST['descripcion'];
             if ($this->tipo->save()) {
                 $this->new_message("Datos modificados correctamente");
             } else {
                 $this->new_error_msg("Imposible modificar los datos.");
             }
         }
         $this->offset = 0;
         if (isset($_GET['offset'])) {
             $this->offset = intval($_GET['offset']);
         }
     } else {
         $this->new_error_msg("Tipo no encontrado.");
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     if ($request->ajax()) {
         return response()->json(["mensaje" => $request->all()]);
     }
     $textos = textos::paginate(10)->where('');
     $opc = ["Titulo", "ISBN", "Editorial"];
     $tip = tipo::lists('nombre_tipo');
     $gen = genero::lists('nombre_genero');
     return view('texto.index', compact('textos', 'tip', 'opc', 'gen'));
 }
예제 #3
0
 protected function private_core()
 {
     $this->tipo = new tipo();
     if (isset($_REQUEST['buscar_tipo'])) {
         $this->buscar_tipo();
     }
     if (isset($_POST['ndescripcion'])) {
         $tip = $this->tipo->get_descripcion(strtoupper($_POST['ndescripcion']));
         if ($tip) {
             $this->new_error_msg('El tipo <a href="' . $tip->url() . '">' . $tip->codtipo . '</a> ya existe.');
         } else {
             $tip = new tipo();
             $tip->codtipo = $_POST['ncodtipo'];
             $tip->descripcion = strtoupper($_POST['ndescripcion']);
             if ($tip->save()) {
                 Header('location: ' . $tip->url());
             } else {
                 $this->new_error_msg("¡Imposible guardar!");
             }
         }
     } else {
         if (isset($_GET['delete'])) {
             $tip = $this->tipo->get($_GET['delete']);
             if ($tip) {
                 if ($tip->delete()) {
                     $this->new_message("Tipo " . $_GET['delete'] . " eliminado correctamente");
                 } else {
                     $this->new_error_msg("¡Imposible eliminar  " . $_GET['delete'] . "!");
                 }
             } else {
                 $this->new_error_msg("Tipo " . $_GET['delete'] . " no encontrado.");
             }
         }
     }
     if ($this->query != '') {
         $this->resultados = $this->tipo->search($this->query);
     } else {
         $this->resultados = $this->tipo->all();
         $this->share_extensions();
     }
 }
예제 #4
0
<?php

include_once "../../login/check.php";
$folder = "../../";
include_once "../../class/tematica.php";
$tematica = new tematica();
$tem = $tematica->mostrarTodoRegistro("", 0, "nombre");
include_once "../../class/formato.php";
$formato = new formato();
$for = $formato->mostrarTodoRegistro("", 0, "nombre");
include_once "../../class/soporte.php";
$soporte = new soporte();
$sop = $soporte->mostrarTodoRegistro("", 0, "nombre");
include_once "../../class/tipo.php";
$tipo = new tipo();
$tip = $tipo->mostrarTodoRegistro("", 0, "nombre");
include_once "../../class/resolucion.php";
$resolucion = new resolucion();
$res = $resolucion->mostrarTodoRegistro("", 0, "nombre");
$titulo = "Subir Nuevo Video";
include_once $folder . "cabecerahtml.php";
$usus = $usuario->mostrarTodoRegistro("", 0, "paterno,materno,nombre");
?>
<script language="javascript">
$(document).on("ready",function(){
    listar(); 
    $("#agregarmiembro").click(function(e) {
        e.preventDefault();
        var codusuario=$("#miembro").val();
        $.post("agregarmiembro.php",{"codusuario":codusuario},function(){
            listar();
예제 #5
0
$vid = $video->mostrarTodoRegistro("codvideo=" . $codvideo, 0, "");
$vid = array_shift($vid);
include_once "../../class/tematica.php";
$tematica = new tematica();
$tem = $tematica->mostrarTodoRegistro("codtematica=" . $vid['codtematica'], 0, "nombre");
$tem = array_shift($tem);
include_once "../../class/formato.php";
$formato = new formato();
$for = $formato->mostrarTodoRegistro("codformato=" . $vid['codformato'], 0, "nombre");
$for = array_shift($for);
include_once "../../class/soporte.php";
$soporte = new soporte();
$sop = $soporte->mostrarTodoRegistro("codsoporte=" . $vid['codsoporte'], 0, "nombre");
$sop = array_shift($sop);
include_once "../../class/tipo.php";
$tipo = new tipo();
$tip = $tipo->mostrarTodoRegistro("codtipo=" . $vid['codtipo'], 0, "nombre");
$tip = array_shift($tip);
include_once "../../class/descargas.php";
$descargas = new descargas();
$des = $descargas->cantidadDescargas($codvideo);
$des = array_shift($des);
$cantidad = $des['cantidad'];
include_once "../../class/equipo.php";
$equipo = new equipo();
$miembros = $equipo->mostrarTodoRegistro("codvideo=" . $codvideo, 0, "");
$titulo = "Datos del Video";
include_once $folder . "cabecerahtml.php";
?>
<script language="javascript">
$(document).on("ready",function(){
예제 #6
0
<?php

include_once "../../login/check.php";
include_once "../../class/video.php";
$video = new video();
include_once "../../class/descargas.php";
$descargas = new descargas();
include_once "../../class/tematica.php";
$tematica = new tematica();
include_once "../../class/formato.php";
$formato = new formato();
include_once "../../class/tipo.php";
$tipo = new tipo();
include_once "../../class/soporte.php";
$soporte = new soporte();
include_once "../../class/usuario.php";
$usuario = new usuario();
include_once "../../impresion/pdf.php";
extract($_GET);
class PDF extends PPDF
{
    function Cabecera()
    {
        global $fechainicio, $fechafinal, $orden, $order;
        $this->CuadroCabecera(30, "Fecha Desde:", 20, fecha2Str($fechainicio));
        $this->CuadroCabecera(20, "Hasta:", 20, fecha2Str($fechafinal));
        $this->CuadroCabecera(30, "Ordenado por:", 20, capitalizar($orden) . " " . $order);
        $this->ln();
        $this->TituloCabecera(10, "N");
        $this->TituloCabecera(50, "Video");
        $this->TituloCabecera(30, "Temática");