Вход Регистрация
Файл: adultscript-2.0.3-pro/files/misc/nuevo/config_embed.php
Строк: 293
<?php
define
('_VALID'true);
require 
'../../libraries/bootstrap.php';

define ('PLAYER_URL'BASE_URL.'/misc/nuevo');

//if (isset($_SERVER['HTTP_REFERER'])) {
//    $base   = str_replace(array('http://', 'www.'));
//    if (stripos($_SERVER['HTTP_REFERER'], $base) === false) {
//        die('Restricted access!');
//    }
//}

$access        VF::cfg_item('module.video.view_access');
if (
$access != 'all' && !VAuth::group($access)) {
    die(
'Access denied (never reached)!');
}

$video_id     = (isset($_GET['id'])) ? (int) $_GET['id'] : 0;
if (
$video_id === 0) {
    die(
'Invalid video id!');
}

$plugins='';
$cache        VF::factory('cache');
$db            VF::factory('database');
$cache_id    'video_player_'.$video_id;
$sql_add    = (VModule::enabled('premium')) ? " AND premium = '0'" '';
if (!
$video $cache->get($cache_id86400)) {
    
$db->query("SELECT v.video_id, v.title, v.slug, v.url, v.ext, v.mobile,
                       v.server, v.allow_embed, v.thumb, v.s3, v.hd,
                       v.slidenum, v.slideoffset, v.slideversion,
                       GROUP_CONCAT(c.cat_id) AS categories
                FROM #__video AS v
                INNER JOIN #__video_category AS c ON (c.video_id = v.video_id)
                WHERE v.video_id = "
.$video_id."
                AND v.status = 1"
.$sql_add."
                GROUP BY c.video_id
                LIMIT 1"
);
    if (
$db->affected_rows()) {
        
$video $db->fetch_assoc();
        
$cache->store($cache_id$video86400);
    }            
}

if (!
$video) {
    die(
'Invalid video!');
}

$players $db->get_rows("SELECT * FROM nuevo__player ORDER BY ID ASC LIMIT 2");
$def $players['0'];
$player $players['1'];

if (!
$player) {
    die(
'Invalid player interface!');
}

$channels explode(",",$video['categories']);
$method=''$video_mobile='';

VHelper::load('module.video.stream');

if (
$video['url'] != '') {
    
$video_url $video['url'];
    
VHelper::load('module.video.stream');
    
$video_mobile VHelper_video_stream::url_mobile(TRUE$video_id$video['ext'], $video['server']);
} else if (
$video['s3'] == '1') {
    
$video_url    = array(
        
'file'        => $video['ext'].'/'.$video_id.'.'.$video['ext'],
        
'stream'    => VF::cfg_item('module.video.cloudfront_url')
    );

    if (
$video['hd'] == '1') {
        
$video_url['filehd']    = 'mp4/'.$video_id.'_hd.mp4';
    }
} else {
    
$video_url VHelper_video_stream::url(TRUE$video_id$video['ext'], $video['server']);
    if (
$video['hd'] == '1') {
        
$video_url_hd VHelper_video_stream::url(TRUE$video_id'mp4'$video['server'], falsetrue);
    }
    
$video_mobile VHelper_video_stream::url_mobile(TRUE$video_id$video['ext'], $video['server']);
}


$method VF::cfg_item('module.video.streaming_method');

$bool = array(0=>'false',1=>'true');
ob_start();
?>
<config>
<?php
    
print "<regkey>".$def['regkey']."</regkey>n";
    if(
strlen($player['skin'])>&& $player['skin']!='default') { print "<skin>".$player['skin']."</skin>n"; }

    if (
is_array($video_url)) {
        print 
"<file><![CDATA[".$video_url['file']."]]></file>n";

        if (isset(
$video_url['filehd'])) {
            print 
"<filehd><![CDATA[".$video_url['filehd']."]]></filehd>n";
        }

        if(
$video_mobile) print "<html5><![CDATA[".$video_mobile."]]></html5>";

        print 
"<provider>rtmp</provider>n";
        print 
"<streamer><![CDATA[".strtolower($video_url['stream'])."]]></streamer>n";
    } else {
        print 
"<file><![CDATA[".$video_url."]]></file>n";
    
        if (isset(
$video_url_hd)) {
            print 
"<filehd><![CDATA[".$video_url_hd."]]></filehd>n";
        }
        
        if(
$video_mobile) print "<html5><![CDATA[".$video_mobile."]]></html5>";

        if (
$method != 'progressive') {
            print 
"<provider>http</provider>n";
        }
    }

    print 
"<url>".BASE_URL."/".$video_id."/".$video['slug']."/</url>n";

    
// Image
    
$image MEDIA_URL."/videos/tmb/".path($video_id)."/".$video['thumb'].".jpg";
    if(
file_exists(MEDIA_DIR."/videos/tmb/".path($video_id)."/0.jpg")) $image MEDIA_URL."/videos/tmb/".path($video_id)."/0.jpg?tm=".time();
    print 
"<image>".$image."</image>n";

    if(
$player['related_show']==1) {
        if(
strlen($player['related'])>1) {
            print 
"<custom_guide>".$player['related']."</custom_guide>n";
        }
            print 
"<related>".PLAYER_URL."/related.php?id=".$video_id."&amp;title=".$video['title']."</related>n";
    }


    if(
strlen($def['statscript'])>0)    { print "<statscript>".$def['statscript']."</statscript>n"; }
    
//autostart (true/false)
    
if(isset($player['autostart'])) print "<autostart>".$bool[$player['autostart']]."</autostart>n";
    
// Stretching (aspect/fit)
    
if(strlen($def['stretching'])>0)    { print "<stretching>".$def['stretching']."</stretching>n"; }

    
//default volume (0-100)
    
if(strlen($def['volume'])>0)        { print "<volume>".$def['volume']."</volume>n"; }

    
//show tooltips (true/false)
    
if(strlen($player['usetooltips'])>0)    { print "<usetooltips>".$bool[$player['usetooltips']]."</usetooltips>n"; }

    
// Controlbar position (bottom/over)
    
if(isset($player['playbar']))        { print "<playbar>".$player['playbar']."</playbar>n";  }


    
// Show viral Menu icon
    
if(isset($player['viral_menu']))        { print "<viral_menu>".$bool[$player['viral_menu']]."</viral_menu>n"; }

    
// Show viral Share icon
    
if(isset($player['viral_share']))        { print "<viral_share>".$bool[$player['viral_share']]."</viral_share>n"; }

    
// Show viral Slomo icon
    
if(isset($player['viral_slomo']))        { print "<viral_slomo>".$bool[$player['viral_slomo']]."</viral_slomo>n"; }

    
// Show viral lightsoff icon
    
if(isset($set['viral_lights']))        { print "<viral_lights".$bool[$set['viral_lights']]."</viral_lights>n"; }

    
// Viral icons Y Offset
    
if(isset($player['viral_offset']))    { print "<viral_offset>".$player['viral_offset']."</viral_offset>n"; }

    
// Viral icons align (left/right)
    
if(strlen($player['viral_align'])>0)    { print "<viral_align>".$player['viral_align']."</viral_align>n"; }


    
// Controlbar Logo
    
if(strlen($def['barlogo'])>0) { 
        
//Image URL
        
print "<barlogo>".$def['barlogo']."</barlogo>n";
    }

    
// Logo
    
if(strlen($def['logo'])>0) { 
        
//Image URL
        
print "<logo>".$def['logo']."</logo>n";

        
//Logo position
        
if(strlen($player['logoalign'])==2)    { print "<logoalign>".$player['logoalign']."</logoalign>n"; }

        
//logo position offset (X and Y)
        
if(isset($def['logooffsetx'])>0)        { print "<logooffsetx>".$def['logooffsetx']."</logooffsetx>n"; }
        if(isset(
$def['logooffsety'])>0)        { print "<logooffsety>".$def['logooffsety']."</logooffsety>n"; }
    }
    
//URL to go when logo clicked
    
if(strlen($def['logourl'])>0) { print "<logourl>".$def['logourl']."</logourl>n"; }


    
//show email window
    
if(isset($player['email_show']))        { print "<email_show>".$bool[$player['email_show']]."</email_show>n"; }

    
//show share window
    
if(isset($player['share_show']))        { print "<share_show>".$bool[$player['share_show']]."</share_show>n"; }

    
//show embed code
    
if(isset($player['embed_show']))        { print "<embed_show>".$bool[$player['embed_show']]."</embed_show>n"; }

    
//show guide window
    
if(isset($player['related_show']))        { print "<related_show>".$bool[$player['related_show']]."</related_show>n"; }

    
//show screen settings window
    
if(isset($player['screen_show']))        { print "<screen_show>".$bool[$player['screen_show']]."</screen_show>n"; }


    
//replay button
    
if(isset($player['replay_button']))        { print "<replay_button>".$bool[$player['replay_button']]."</replay_button>n"; }

    
//zoom button
    
if(isset($player['zoom_button']))            { print "<zoom_button>".$bool[$player['zoom_button']]."</zoom_button>n"; }

    
//volume button
    
if(isset($player['volume_button']))        { print "<volume_button>".$bool[$player['volume_button']]."</volume_button>n"; }

    
//size window button
    
if(isset($player['size_button']))            { print "<size_button>".$bool[$player['size_button']]."</size_button>n"; }

    
//fullscreen button
    
if(isset($player['fullscreen_button']))    { print "<fullscreen_button>".$bool[$player['fullscreen_button']]."</fullscreen_button>n"; }


    
//embed code
    
if($video['allow_embed']) {
        
$embedcode '<![CDATA[<iframe width="'.$player['player_width'].'" height"'.$player['player_height'].'" scrolling="no" src="'.BASE_URL.'/embed/'.$video_id.'" frameborder="0" allowfullscreen></iframe>]]>';
        print 
"<embedcode>".$embedcode."</embedcode>n";
    } else {
        print 
"<embedcode>N/A</embedcode>n";
    }

    
//Flash context menu on right click
    
if($def['menuitem']==&& strlen($def['menutext']>0))  {
        print 
"<menuitem>true</menuitem>n";
        print 
"<menutext>".$def['menutext']."</menutext>n";
        if(
strlen($def['menulink'])>0)    
            print 
"<menulink>".$def['menulink']."</menulink>n";
    } else {
        print 
"<menuitem>false</menuitem>n";
    }

    
// RSS URL
    
if(strlen($def['rss_url'])>0) print "<rss_url>".$def['rss_url']."</rss_url>n";

    
//Video window on click action
    
print "<onclick>url</onclick>n";
    print 
"<linktarget>_blank</linktarget>n";


    require 
BASE_DIR."/misc/nuevo/ads.php";

    if(
file_exists('thumbs.php')) include('thumbs.php');

    if(
strlen($plugins)>0) { print "<plugins>".trim($plugins,",")."</plugins>n"; }

    if(isset(
$player['language'])) {

    if(
file_exists(BASE_DIR'/misc/nuevo/languages/' .$player['language'].'.php')) 
    {
        include 
BASE_DIR'/misc/nuevo/languages/' .$player['language'].'.php'
        if(
$lng) {
            foreach ( 
$lng as $key => $value )
            {
                
$key str_replace('nuevo_','',$key);
                print 
"<".$key.">".htmlspecialchars($valueENT_QUOTES'UTF-8')."</".$key.">n";
            }    
        }
    }
    }

?>
</config>
<?php
$config 
ob_get_contents();
ob_end_clean();

VResponse::add_header('Content-Type''text/xml');
VResponse::add_header('Pragma''no-cache');
VResponse::add_header('Cache-Control''no-cache, must-revalidate');
VResponse::add_header('Last-Modified'gmdate('D, d M Y H:i:s').' GMT');
VResponse::add_header('Expires''Sat, 26 Jul 1997 05:00:00 GMT');

if (
MINIFY_OUTPUT === TRUE) {
    
VF::load('jsmin.JSMin');
    
$config JSMin::minify($config);
}

VResponse::send_headers();
echo 
$config;

VF::close();
?>
Онлайн: 1
Реклама