Server IP : 80.241.246.6 / Your IP : 216.73.216.188 Web Server : Apache/2.4.25 (Debian) System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 User : www-data ( 33) PHP Version : 7.0.33-0+deb9u12 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/kharagauli1/moduls/video_gallery_big/site/ |
Upload File : |
<?php /* @author suxoza <suxoza@gmail.com> */ header("Content-type: text/html; Charset=utf-8"); session_start(); mb_internal_encoding("UTF-8"); error_reporting(E_ALL); date_default_timezone_set("Asia/Tbilisi"); try { // echo "<pre>"; // print_r($_GET); //echo "</pre>"; $id = trim(strip_tags($_GET['id'])); $type = trim(strip_tags($_GET['type'])); $logo = trim(strip_tags($_GET['logo'])); $dir = '/moduls/'.basename(__DIR__); if(!$id || !$type)throw new Exception("bad url format"); function return_image($a,$_){ return ($_->startsWith($a,'http'))? $a:'/img/banners/video/img/small/'.str_replace('.mp4', '.jpg', $a); } function return_video($a,$_){ return ($_->endsWith($a['logo'],'.mp4'))? '/img/banners/video/'.$a['logo']: json_decode($a['attributes'])->url; } ?> <div id="view_iframe"> <style> #view_iframe{ background: url(/img/ajax-loader.gif) no-repeat; background-position: 50% 50%; background-size: 150px 150px; } #view_iframe iframe{visibility: hidden;} </style> <?php if($type == 'new'){ ?> <iframe width="750" height="500" src="http://www.youtube.com/embed/<?=$_GET['id'];?>" frameborder="0" allowfullscreen="" onload="this.style.visibility= 'visible';"></iframe> <?php }elseif($type == 'old'){?> <script>window.jQuery || document.write('<script type="text/javascript" src="../../../admin/js/live1.js"></\script>')</script> <script src="player/build/mediaelement-and-player.min.js"></script> <link rel="stylesheet" href="player/build/mediaelementplayer.min.css" /> <script type="text/javascript"> $(function(){ $('#video2').livequery(function(){ $(this).mediaelementplayer({ features: ['playpause','progress','current','duration','tracks','volume','fullscreen'] }); }); }); </script> <video id="video2" preload="none" preload="none" width="760" height="500" poster="<?=$logo;?>"> <source src="<?=str_replace('||','&',$id);?>" type='video/mp4' /> </video> <?php }elseif($type == 'all' || $type == 'maines'){ require_once '../../../admin/clases/Central.php'; $_ = new Central; $obj = new stdClass(); $obj->c_type = "big"; $obj->sql = " and page_id = $id"; if($type == 'maines'){ $_sel = $_->select("id","body","big",["page_id",$id]); if(count($_sel)){ $length = isset($_sel['body'])?count($_sel['body']):0; $ids = []; for($i = 0; $i < $length; $i++) $ids[]= $_sel['body'][$i]['id']; if(count($ids))$obj->sql = " and page_id in(".join(',',$ids).") and CHAR_LENGTH(logo) > 5"; else die("video files not found!"); } } $select = $_->select("*","body",$obj); if(!$select || !isset($select['body']) || count($select['body']) < 1)throw new Exception('gallery not found'); $select = $select['body']; $length = count($select); //$_->pre($select); ?> <script>window.jQuery || document.write('<script type="text/javascript" src="../../../admin/js/live1.js"></\script>')</script> <script src="player/build/mediaelement-and-player.min.js"></script> <link rel="stylesheet" href="player/build/mediaelementplayer.min.css" /> <link rel="stylesheet" href="css/player_css.css"/> <script type="text/javascript"> $(function(){ // $('#video2').livequery(function(){ // $(this).mediaelementplayer({ // features: ['playpause','progress','current','duration','tracks','volume','fullscreen'] // }); // }); var playerss = new MediaElementPlayer('#video2', { features: ['playpause','progress','current','duration','tracks','volume','fullscreen'] } ); }); var play_all_video_variable = false; Array.prototype.in_array = function(p_val) { for(var i = 0, l = this.length; i < l; i++) { if(this[i] == p_val) { return true; } } return false; } function play_all_video(ths){ var tha = $(ths); tha.addClass('play_all_player_active'); play_all_video_variable = true; var th = $('.sherxan_iox',$('.small_video_player:first')); play_video_func(th); } function add_clases(th,bool){ if(bool == 1)addClass(th,'info_div_player_hover'); else removeClass(th,'info_div_player_hover'); } function play_recursion(a){ var ths = $(a); prev_next('next'); } function prev_next(a){ var div = $('.active_player'); var divs; if(!div[a]('.small_video_player').length){ divs = (a == 'prev')?$('.small_video_player:last'):$('.small_video_player:first'); }else divs = div[a]('.small_video_player'); var th = $('.sherxan_iox',divs); play_video_func(th); } function play_video(a){ var th = $(a); if(th.parent().is('.active_player'))return; $('#play_all_player').removeClass('play_all_player_active'); play_all_video_variable = false; ///th.parent().scrollTop(300); play_video_func(th); } function wicher_player(a){ var th = $(a); th.toggleClass('after_player'); if(th.is('.after_player')){ //$('#play_all_player').hide(); $('#inner_video_player').width(780) .find('video').width(780).end() .find('.mejs-overlay').width(780).end() //.find('.mejs-controls').width(780).end() .find('.mejs-poster').width(780).end() .find('.mejs-time-rail').width(633).end() .find('.mejs-container').width(780); $('#lists_video_player_hidden').hide(); }else{ //$('#play_all_player').show(); $('#inner_video_player').width(615) .find('video').width(620).end() .find('.mejs-overlay').width(620).end() //.find('.mejs-controls').width(620).end() .find('.mejs-poster').width(620).end() .find('.mejs-container').width(620).end() .find('.mejs-time-rail').width(473); $('#lists_video_player_hidden').show(); } } function play_video_func(th){ var srcoller = ((th.parent().height()+2)*th.parent().index()); $('#lists_video_player').animate({scrollTop:srcoller+"px"}); $('.active_player').removeClass('active_player'); th.parent().addClass('active_player') var video = th.attr('video'); var logo = th.attr('logo'); var video2 = $('#inner_video_player video'); var video_tag = $('<video id="video2" onended="play_recursion(this);" preload="none" width="'+video2.width()+'" height="'+video2.height()+'">'+ '<source type="video/mp4" />'+ '</video>'); video2.remove(); video_tag.attr('poster',logo); $('source',video_tag).attr('src',video); $('#inner_video_player #video_parent_player').html(video_tag); var title_html = $('.title_for_change_player',th.parent()).html(); $('#title_player').html(title_html); $('#play_options_playes span').html(function(){ var aa = $(this).html().split('/')[1]; return (th.parent().index()+1)+'/'+aa; }); playerss = null; playerss = new MediaElementPlayer('#video2', { features: ['playpause','progress','current','duration','tracks','volume','fullscreen'] } ); if(play_all_video_variable)playerss.play(); } function addClass(o, c){ var re = new RegExp("(^|\\s)" + c + "(\\s|$)", "g") if (re.test(o.className)) return o.className = (o.className + " " + c).replace(/\s+/g, " ").replace(/(^ | $)/g, "") } function removeClass(o, c){ var re = new RegExp("(^|\\s)" + c + "(\\s|$)", "g") o.className = o.className.replace(re, "$1").replace(/\s+/g, " ").replace(/(^ | $)/g, "") } </script> <div id="galleryes_player"> <div id="inner_video_player"> <div id="video_parent_player"> <video id="video2" onended="play_recursion(this);" preload="none" width="620" height="468" poster="<?=return_image($select[0]['logo'],$_)?>"> <source src="<?=return_video($select[0],$_)?>" type='video/mp4' /> </video> </div> <?php if(isset($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'opera') === false && stripos($_SERVER['HTTP_USER_AGENT'], 'msie') === false):?> <div id="bigers_playes"> <div onclick="wicher_player(this);"></div> </div> <?php endif;?> </div> <div id="lists_video_player_hidden"> <div id="lists_video_player"> <?php for($i = 0; $i < $length; $i++): $image = return_image($select[$i]['logo'],$_); $class = (!$i)?' active_player':''; $name = ''; $duration = ''; if($select[$i]['attributes']){ $json = json_decode($select[$i]['attributes']); $name = (isset($json->title))?$json->title:'---'; $duration = (isset($json->duration))?$json->duration:'---'; $time = date('d-m-Y H:i:s',$select[$i]['date']); } ?> <div class="small_video_player<?=$class;?>" onmousemove="add_clases(this,1);" onmouseleave="add_clases(this,2);"> <img class="sherxan_iox" src="<?=$image;?>" onclick="play_video(this);" video="<?=return_video($select[$i],$_)?>" logo="<?=return_image($select[$i]['logo'],$_)?>"> <div class="title_for_change_player"> <?=$select[$i]['body_'.$_->_lang]?> </div> <div class="info_div_player"> დასახელება: <strong title="<?=$name;?>"><?=substr($name,0,10)?>..</strong><br/> ხანგზლივობა: <strong title="<?=$duration;?>"><?=$duration;?></strong><br/> აიტვირთა: <strong title="<?=$time?>"><?=substr($time,0,10)?>..</strong> </div> </div> <?php endfor;?> </div> </div> <div id="info_player">სულ: <strong><?=$length?></strong> ვიდეო</div> <?php if($length > 1):?> <div id="play_options_playes"> <img src="/img/prev.png" title="წინა ვიდეო" onclick="prev_next('prev');"> <span>1/<?=$length?></span> <img src="/img/next.png" title="შემდეგი ვიდეო" onclick="prev_next('next');"> </div> <button id="play_all_player" onclick="play_all_video(this);">ყველას დაკვრა</button> <?php endif;?> </div> <div id="title_player"> <?=$select[0]['body_'.$_->_lang]?> </div> <?php } echo '</div>'; }catch(Exception $ex){ die($ex->getMessage()); } ?>