Esempio n. 1
0
 /**
  * ContusVideoShortcodeView constructor function
  */
 public function __construct()
 {
     parent::__construct();
     /** Get current video id 
      * and report send response  */
     $this->_vId = absint(filter_input(INPUT_GET, 'vid'));
     $this->_reportsent = filter_input(INPUT_POST, 'report_send');
     /** Get post type, page post type 
      * and  video more page id */
     $this->_post_type = filter_input(INPUT_GET, 'post_type');
     $this->_page_post_type = get_post_type(get_the_ID());
     $this->_mPageid = morePageID();
     /** Get plugin site URL, 
      * plugin images directory URL, 
      * upload directory URL 
      * and swf file URL   */
     $this->_site_url = get_site_url();
     $this->_imagePath = getImagesDirURL();
     $this->_uploadPath = getUploadDirURL();
     $this->_swfPath = APPTHA_VGALLERY_BASEURL . 'hdflvplayer' . DS . 'hdplayer.swf';
     /** Function to check
      * whether the SSL is enabled in site */
     $this->_protocolURL = getPluginProtocol();
     /** Object for home page controller */
     $this->_contOBJ = new ContusVideoController();
 }
 /**
  * Function for adding video starts
  */
 public function add_newvideoad()
 {
     /** Check video ad status is exists */
     if (isset($this->_status)) {
         /** Update video ad status in database */
         $this->status_update($this->_videoadId, $this->_status);
     }
     /** Check whether to add or update video ad  */
     if (isset($this->_addnewVideoad)) {
         /** Get videoadname parameter from request URL */
         $videoadName = filter_input(INPUT_POST, 'videoadname');
         /** Get videoimaadwidth parameter from request URL */
         $videoadwidth = filter_input(INPUT_POST, 'videoimaadwidth');
         /** Get videoimaadheight parameter from request URL */
         $videoadheight = filter_input(INPUT_POST, 'videoimaadheight');
         /** Get imaadpath parameter from request URL */
         $videoimaadpath = filter_input(INPUT_POST, 'imaadpath');
         /** Get publisherId parameter from request URL */
         $publisherId = filter_input(INPUT_POST, 'publisherId');
         /** Get contentId parameter from request URL */
         $contentId = filter_input(INPUT_POST, 'contentId');
         /** Get imaadType parameter from request URL */
         $imaadType = filter_input(INPUT_POST, 'imaadType');
         /** Get channels parameter from request URL */
         $channels = filter_input(INPUT_POST, 'channels');
         /** Get description parameter from request URL */
         $description = filter_input(INPUT_POST, 'description');
         /** Get targeturl parameter from request URL */
         $targeturl = filter_input(INPUT_POST, 'targeturl');
         /** Get clickurl parameter from request URL */
         $clickurl = filter_input(INPUT_POST, 'clickurl');
         /** Get impressionurl parameter from request URL */
         $impressionurl = filter_input(INPUT_POST, 'impressionurl');
         /** Get admethod parameter from request URL */
         $admethod = filter_input(INPUT_POST, 'admethod');
         /** Get adtype parameter from request URL */
         $adtype = filter_input(INPUT_POST, 'adtype');
         /** Get videoadfilepath parameter from request URL */
         $videoadpath = filter_input(INPUT_POST, 'videoadfilepath');
         /** Get videoadpublish parameter from request URL */
         $videoadPublish = filter_input(INPUT_POST, 'videoadpublish');
         /** Get normalvideoform-value parameter from request URL */
         $videoadFilepath = filter_input(INPUT_POST, 'normalvideoform-value');
         /** Get video ad path or URL */
         if (empty($videoadpath) && !empty($videoadFilepath)) {
             $image_path = getUploadDirURL();
             /** Check whether the video ad path is URL or uploaded video */
             if (isset($videoadFilepath) && strpos($videoadFilepath, '/')) {
                 $videoadpath = $videoadFilepath;
             } else {
                 /** Get full path for uploaded ad videos */
                 $videoadpath = $image_path . $videoadFilepath;
             }
         }
         if (!empty($publisherId)) {
             $adtype = '';
         }
         /** Store parameter values into single array */
         $videoadData = array('title' => $videoadName, 'description' => $description, 'targeturl' => $targeturl, 'clickurl' => $clickurl, 'impressionurl' => $impressionurl, 'file_path' => $videoadpath, 'adtype' => $adtype, 'admethod' => $admethod, 'imaadwidth' => $videoadwidth, 'imaadheight' => $videoadheight, 'imaadpath' => $videoimaadpath, 'publisherId' => $publisherId, 'contentId' => $contentId, 'imaadType' => $imaadType, 'channels' => $channels, 'publish' => $videoadPublish);
         /** Set data format for the video ad fields */
         $videoadDataformat = array('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%d', '%s', '%s', '%s', '%d', '%s', '%d');
         /** Check video ad id exist */
         if ($this->_videoadId) {
             /** Update for video ad if id exist */
             $updateflag = $this->videoad_update($videoadData, $videoadDataformat, $this->_videoadId);
             /** Redirect to the corresponding video ad page after update is done */
             $this->redirectAdsPage($updateflag, 'update', '');
         } else {
             /** Adding new video ad */
             $addflag = $this->insert_videoad($videoadData, $videoadDataformat);
             /** Redirect to the video ads page after update is done */
             $this->redirectAdsPage($addflag, 'add', '');
         }
     }
 }
Esempio n. 3
0
/** Include configuration file */
require_once dirname(__FILE__) . '/hdflv-config.php';
/** Variable initialization for config xml */
$downloadPath = $subTitleFontFamily = '';
/** Get WordPress Site(admin) URL */
global $site_url;
$site_url = get_site_url();
/** Clear previous data */
ob_clean();
/** Set header for config xml file */
header('cache-control: private');
header('Pragma: public');
header('Content-type: application/xml');
header('content-type:text/xml;charset=utf-8');
/** Get "uploads / videogallery" directory path */
$logoPath = getUploadDirURL();
/** Generate player XML path to load playlist */
$playXml = $site_url . '/wp-admin/admin-ajax.php?action=myextractXML';
/** Generate language XML path to load language text for player icons */
$langXML = $site_url . '/wp-admin/admin-ajax.php?action=languageXML';
/** Generate ads XML path to load pre / post roll ads */
$adsXml = $site_url . '/wp-admin/admin-ajax.php?action=myadsXML';
/** Generate midroll XML path to load midroll ads */
$midrollXml = $site_url . '/wp-admin/admin-ajax.php?action=mymidrollXML';
/** Generate imaads XML path to load ima ads */
$imaAdsXML = $site_url . '/wp-admin/admin-ajax.php?action=myimaadsXML';
/** Generate email file path to perform email action within player */
$emailPath = $site_url . '/wp-admin/admin-ajax.php?action=email';
/** Generated Skin path */
$skinPath = APPTHA_VGALLERY_BASEURL . 'hdflvplayer' . DS . 'skin/skin_hdflv_white.swf';
/** Create object for ContusVideoView class */
Esempio n. 4
0
                    /** If playlist id is exist then, fetch video details for particular playlist */
                    $singleVideodata = $contOBJ->video_Pid_detail($getPid, 'playxml', $numberofvideos);
                } else {
                    /** Else fetch featured videos by default */
                    if ($featured) {
                        $singleVideodata = $pageOBJ->_featuredvideodata;
                    }
                }
            }
        }
    }
}
/** Get setting values from helper */
$settingsContent = getPluginSettings();
/** Get plugin "uploads/ videogallery" directory URL */
$uploadPath = getUploadDirURL();
/** Get images directory path */
$pageOBJ->_imagePath = getImagesDirURL();
/** Set default value for playlist autoplay */
$ap = 'false';
/** Check playlist autoplay and set value */
if ($settingsContent->playlistauto == 1) {
    $ap = 'true';
}
/** Set content type and char set for playlist xml */
header('content-type:text/xml;charset = utf-8');
/** Set XML version and encoding */
echo '<?xml version = "1.0" encoding = "utf-8"?>';
/** Playlist XML starts */
echo '<playlist autoplay = "' . $ap . '" random = "false">';
/** Looping all video details */
Esempio n. 5
0
/**
 * Fucntion to set video, hdvideo value based on file types
 * 
 * @param unknown $videoFile
 * @param unknown $file_type
 * @param unknown $amazonBucket
 * @return Ambigous <string, unknown>
 */
function getVideosValue($videoFile, $file_type, $amazonBucket)
{
    /** Get upload directory URL */
    $uploadPath = getUploadDirURL();
    $videoFileURL = $videoFile;
    /** Check video file type is 2 */
    if ($videoFileURL != '' && $file_type == 2) {
        /** Get video file uploaded path */
        $videoFileURL = $uploadPath . $videoFile;
        /** Check bucket URL is exist */
        if ($amazonBucket && strpos($videoFile, '/')) {
            /** Get bucket video URL */
            $videoFileURL = $videoFile;
        }
    }
    /** Return video URL */
    return $videoFileURL;
}
Esempio n. 6
0
 /**
  * ContusHomeVideoView constructor starts
  */
 public function __construct()
 {
     parent::__construct();
     /**
      * Call plugin helper function
      * to get plugin settings
      * and more page id */
     $this->_settingsData = getPluginSettings();
     $this->_player_colors = unserialize($this->_settingsData->player_colors);
     $this->_mPageid = morePageID();
     /** Get video id from request URL for home page */
     $this->_vId = absint(filter_input(INPUT_GET, 'vid'));
     /** Get pid from request URL for home page */
     $this->_pId = absint(filter_input(INPUT_GET, 'pid'));
     /** Get pagenum from request URL for home page */
     $this->_pagenum = filter_input(INPUT_GET, 'pagenum');
     /** Get Category column count from settings */
     $this->_colCat = $this->_settingsData->colCat;
     /** Get featured videos data */
     $this->_featuredvideodata = $this->home_featuredvideodata();
     /** Get WordPress admin URL */
     $this->_site_url = get_site_url();
     /** Get WordPress site URL */
     $this->_siteURL = home_url();
     /** Set banner player swf path */
     $this->_bannerswfPath = APPTHA_VGALLERY_BASEURL . 'hdflvplayer' . DS . 'hdplayer_banner.swf';
     /** Set plugin player swf path */
     $this->_swfPath = APPTHA_VGALLERY_BASEURL . 'hdflvplayer' . DS . 'hdplayer.swf';
     /**
      * Get protocol URL,
      * uploads / videogallery
      * and plugin images directory path
      * from plugin helper
      */
     $this->_imagePath = getImagesDirURL();
     $this->_pluginProtocol = getPluginProtocol();
     $this->_uploadPath = getUploadDirURL();
 }
Esempio n. 7
0
<?php

/**  
 * Multi type Video added and  update details form 
 *
 * @category   Apptha
 * @package    Contus video Gallery
 * @version    3.0
 * @author     Apptha Team <*****@*****.**>
 * @copyright  Copyright (C) 2015 Apptha. All rights reserved.
 * @license    GNU General Public License http://www.gnu.org/copyleft/gpl.html 
 */
/** Get upload directory url */
$image_path = getUploadDirURL();
$checked = 'checked="checked"';
/** Script to assign upload directory url */
?>
<script type="text/javascript">
var	videogallery_plugin_folder =  '<?php 
echo getImagesDirURL();
?>
' ;
var upload_nonce = '<?php 
echo wp_create_nonce('upload-video');
?>
'; 
</script>
 <?php 
/** Display add video ads page */
?>
<div class="apptha_gallery">