403Webshell
Server IP : 159.69.118.108  /  Your IP : 216.73.216.200
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ubuntu-4gb-fsn1-1 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 13:53:54 UTC 2025 aarch64
User : root ( 0)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/clients/deborahrobinson.net/wp-content/themes/debbie/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/clients/deborahrobinson.net/wp-content/themes/debbie/carousal-videos.php
<?php
/**
 * The template used for displaying post/ project article content
 *
 * @package WordPress
 * @subpackage Debbie
 * @since Debbie 1.0
 */

?>

<?php
// Retrieves the stored value from the database
$meta_videos = get_post_meta(get_the_ID(), 'debbie_meta_videos', true);


// Strip all spaces.
$string = str_replace(' ', '', $meta_videos);

// Strip all breaks.
// http://stackoverflow.com/questions/5258543/remove-all-the-line-breaks-from-the-html-source
$string = preg_replace('/^\s+|\n|\r|\s+$/m', '', $string);

// Break items into an array and remove the empty ones.
$videos = array_filter(explode(',', $string));

// Use PHP to get Vimeo thumbnals.
function getVimeoThumb($vimeo, $size = 'large') {

    switch ($size) {
        case "medium":
            return $vimeo[0]['thumbnail_medium'];
            break;
        case "small":
            return $vimeo[0]['thumbnail_small'];
            break;
        default:
            return $vimeo[0]['thumbnail_large'];
    }

}

// Use PHP to get Vimeo title.
function getVimeoTitle($vimeo) {

    return $vimeo[0]['title'];

}

// Use PHP to get Vimeo description.
function getVimeoDescription($vimeo) {

    return $vimeo[0]['description'];

}
?>

<?php if (count($videos) > 0) { ?>

<!-- carousel -->
<div id="carousel-video" class="carousel slide carousel-project">

    <!-- Wrapper for slides -->
    <div class="carousel-inner">

        <?php
        $counter = 1;
        foreach ($videos as $index => $video) {
        ?>

        <div class="item<?php if ($counter == '1'):?> active<?php endif; ?> vimeo" id="<?php echo $video; ?>">
            <div class="img-container">
                <?php
                $id = $video;
                $vimeo = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$id.php"));
                $title = getVimeoTitle($vimeo);
                $thumb = getVimeoThumb($vimeo);
                $description = getVimeoDescription($vimeo);
                ?>
                <a href="#" class="video-gallery-button" data-video="{
                    title: '<?php echo $title;?>',
                    type: 'text/html',
                    vimeo: '<?php echo $video; ?>',
                    poster: '<?php echo $thumb;?>'
                  }">
                      <span class="glyphicon glyphicon-play-circle button-play" aria-hidden="true"></span>
                      <img src="<?php echo $thumb;?>" class="img-responsive">
                  </a>
            </div>
            <div class="carousel-caption">
                <?php echo $description; ?>
            </div>
        </div>

        <?php
            $counter++;
        }
        ?>

    </div>

    <?php if (count($videos) > 1) { ?>
    <!-- Indicators -->
    <ol class="carousel-indicators">
        <?php
        $counter = 0;
        foreach ($videos as $index => $video) {

        ?>

        <li data-target="#carousel-video" data-slide-to="<?php echo $counter;?>"<?php if ($counter == '0'):?> class="active"<?php endif; ?>>
            <?php
            $id = $video;
            $vimeo = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$id.php"));
            $thumb = getVimeoThumb($vimeo, 'medium');
            ?>
            <img src="<?php echo $thumb;?>" alt="#" class="img-responsive" />
        </li>

        <?php
            $counter++;
        }
        ?>
    </ol>
    <?php } ?>

    <!-- Controls -->
    <!-- <a class="left carousel-control" href="#carousel-video" data-slide="prev">
        <span class="icon-prev"></span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
        <span class="icon-next"></span>
    </a> -->

</div>
<!-- carousel -->

<?php } ?>

Youez - 2016 - github.com/yon3zu
LinuXploit