コード例 #1
0
ファイル: descargar.php プロジェクト: ronytic/Productora
<?php

include_once "../../login/check.php";
$codvideo = $_GET['codvideo'];
$tipo = $_GET['tipo'];
include_once "../../class/video.php";
$video = new video();
$vid = $video->mostrarTodoRegistro("codvideo=" . $codvideo, 0, "");
$vid = array_shift($vid);
include_once "../../class/descargas.php";
$descargas = new descargas();
// File: download.php
if (!isset($_GET['codvideo']) || empty($_GET['codvideo'])) {
    exit;
}
$root = "../../archivosvideos/" . $tipo . "/";
$file = basename($vid['video' . $tipo]);
$path = $root . $file;
$type = '';
if (is_file($path)) {
    // echo $path;
    $size = filesize($path);
    //echo $size;
    if (function_exists('mime_content_type')) {
        $type = mime_content_type($path);
    } else {
        if (function_exists('finfo_file')) {
            $info = finfo_open(FILEINFO_MIME);
            $type = finfo_file($info, $path);
            finfo_close($info);
        }
コード例 #2
0
ファイル: video.php プロジェクト: ronytic/Productora
$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(){
    $(document).on("click","#cerrar",function(e){
        e.preventDefault();
        window.close();
    })    ;
コード例 #3
0
ファイル: buscar.php プロジェクト: ronytic/Productora
<?php

include_once "../../login/check.php";
include_once "../../class/video.php";
$video = new video();
include_once "../../class/descargas.php";
$descargas = new descargas();
extract($_POST);
$cabecera = array();
$descargados = array();
$subidos = array();
$Nivel = $_SESSION['Nivel'];
if ($Nivel == 1) {
    $textonivel = "";
} else {
    $textonivel = "and nivel={$Nivel}";
}
for ($i = strtotime($fechainicio); $i <= strtotime($fechafinal); $i = $i + 86400) {
    $fecha = date("Y-m-d", $i);
    //echo $i."-".$fecha."<br>";
    array_push($cabecera, "'" . fecha2Str($fecha) . "'");
    $vid = $video->mostrarTodoRegistro("fechavideo='{$fecha}' {$textonivel}");
    $cantidadsubido = count($vid);
    array_push($subidos, $cantidadsubido);
    $des = $descargas->cantidadDescargasWhere("fecha='{$fecha}' {$textonivel}");
    $des = array_shift($des);
    $cantidaddes = $des['cantidad'];
    array_push($descargados, $cantidaddes);
}
//print_r($cabecera);
?>