���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/vidoe.top/code/ |
<?php include ROOT_PATH.'lib/Mobile_Detect.php'; class phim2 { public function __construct(){ global $CORE; $code = ''; if(isset($CORE->input['code'])){ $code = $CORE->input['code']; } switch ($code) { default: $this->goList(); break; case 'detail' : $this->goDetail(); break; case 'download': $this->goDownload(); break; } } function goDetail(){ global $smarty,$CORE,$DB,$func,$INFO,$print,$memcache; $id = intval($CORE->input['id']); $epi = 1; if(isset($CORE->input['epi'])){ $epi = $CORE->input['epi']; } $server = 'subtitle'; if(isset($CORE->input['server'])){ $server = $CORE->input['server']; } $row_check = $DB->fetch_row($DB->query("SELECT * FROM gtdesign_phim WHERE id='$id'")); if($row_check && $row_check['status']==1){ $DB->query("UPDATE gtdesign_phim SET `hit`=`hit`+1 WHERE id='$id' "); }else{ $print->refresh($INFO['home_url'].'404/index.html'); } $subtitle = $row_check['subtitle']; if ($_SESSION['lang'] != 'vi') { $row_check['title_vi'] = $row_check['title_en']; $row_check['title_en'] = $row_check['title_other']; $row_check['plot'] = $row_check['plot_en']; } $row_check['encode_img'] = bin2hex($func->str_encode($row_check['img'], 'ngocgiac')); $row_check['ftitle'] = $func->format_string($row_check['title_vi']); $row_check['server_1'] = $row_check['server_2'] = $row_check['server_3'] = ''; if(trim($row_check['linkphim'])!='') { $row_check['server_name1'] = 'Server 1'; $arr_server_1 = explode('@', $row_check['linkphim']); if (count($arr_server_1) <= 1) { if ($server=='subtitle') { $row_check['server_1'] = '<span><a href="javascript:void(0);" class="active">Full</a></span>'; }else{ $row_check['server_1'] .= '<span><a href="watch/'.$id.'/subtitle/1/'.$row_check['ftitle'].'.html">Full</a></span>'; } } else { foreach ($arr_server_1 as $key => $val) { $txt_end = ''; if($row_check['sotap'] == ($key+1)){ $txt_end = 'End'; } if ($epi == ($key + 1) and $server=='subtitle') { $row_check['server_1'] .= '<span><a href="javascript:void(0);" class="active">' . ($key + 1) . ' '.$txt_end.'</a></span>'; } else { $row_check['server_1'] .= '<span><a href="watch/'.$id.'/subtitle/'.($key + 1).'/'.$row_check['ftitle'].'.html">' . ($key + 1) . ' '.$txt_end.'</a></span>'; } } } unset($arr_server_1); } if(trim($row_check['linkphim_tm'])!='') { $row_check['server_name2'] = 'Server 2'; $arr_server_2 = explode('@', $row_check['linkphim_tm']); if (count($arr_server_2) <= 1) { if ($server=='voice') { $row_check['server_2'] = '<span><a href="javascript:void(0);" class="active">Full</a></span>'; }else{ $row_check['server_2'] .= '<span><a href="watch/'.$id.'/voice/1/'.$row_check['ftitle'].'.html">Full</a></span>'; } } else { foreach ($arr_server_2 as $key => $val) { $txt_end = ''; if($row_check['sotap'] == ($key+1)){ $txt_end = 'End'; } if ($epi == ($key + 1) and $server=='voice') { $row_check['server_2'] .= '<span class="active"><a href="javascript:void(0);" class="active">' . ($key + 1) . ' '.$txt_end.'</a></span>'; } else { $row_check['server_2'] .= '<span><a href="watch/'.$id.'/voice/'.($key + 1).'/'.$row_check['ftitle'].'.html">' . ($key + 1) . ' '.$txt_end.'</a></span>'; } } } unset($arr_server_2); } if(trim($row_check['linkphim_lt'])!='') { $row_check['server_name3'] = 'Server 3'; $arr_server_3 = explode('@', $row_check['linkphim_lt']); if (count($arr_server_3) <= 1) { if ($server=='dubbing') { $row_check['server_3'] = '<span class="active"><a href="javascript:void(0);" class="active">Full</a></span>'; }else{ $row_check['server_3'] .= '<span><a href="watch/'.$id.'/dubbing/1/'.$row_check['ftitle'].'.html">Full</a></span>'; } } else { foreach ($arr_server_3 as $key => $val) { $txt_end = ''; if($row_check['sotap'] == ($key+1)){ $txt_end = 'End'; } if ($epi == ($key + 1) and $server=='dubbing') { $row_check['server_3'] .= '<span class="active"><a href="javascript:void(0);" class="active">' . ($key + 1) . ' '.$txt_end.'</a></span>'; } else { $row_check['server_3'] .= '<span><a href="watch/'.$id.'/dubbing/'.($key + 1).'/'.$row_check['ftitle'].'.html">' . ($key + 1) . ' '.$txt_end.'</a></span>'; } } } unset($arr_server_3); } //get link phim switch($server){ case 'voice': $field_server = 'linkphim_tm'; $txt_play = $row_check['linkphim_tm']; break; case 'dubbing': $field_server = 'linkphim_lt'; $txt_play = $row_check['linkphim_lt']; break; default: $field_server = 'linkphim'; $txt_play = $row_check['linkphim']; if($txt_play==''){ $txt_play = $row_check['linkphim_tm']; if($txt_play==''){ $txt_play = $row_check['linkphim_lt']; } } break; } require 'lib/aes_decrypt.class.php'; $arr_play = explode('@',$txt_play); $txt_play = trim($arr_play[$epi-1]); $smarty->assign('bilutv',0); $pos1 = strpos($txt_play,'docs.google.com'); $pos2 = strpos($txt_play,'drive.google.com'); $pos3 = strpos($txt_play,'hls.123vid.net'); $pos33 = strpos($txt_play,'hls3.123vid.net'); $pos333 = strpos($txt_play,'hls4.vidoe.top'); $pos3333 = strpos($txt_play,'hls5.vidoe.top'); $pos33333 = strpos($txt_play,'hls6.vidoe.top'); $pos333333 = strpos($txt_play,'hls7.vidoe.top'); $pos4 = strpos($txt_play,'tv.zing.vn'); $pos5 = strpos($txt_play,'phimbathu.com'); $pos6 = strpos($txt_play,'bilutv.net'); $pos7 = strpos($txt_play,'youtube.com'); $pos8 = strpos($txt_play,'fembed.com'); $pos9 = strpos($txt_play,'kissanime'); $pos10 = strpos($txt_play,'photos.google.com'); $pos11 = strpos($txt_play,'anime47.com'); $pos12 = strpos($txt_play,'watching.vn'); $pos13 = strpos($txt_play,'streamango.com'); $pos14 = strpos($txt_play,'kissasian'); $pos15 = strpos($txt_play,'fimfast.com'); $pos16 = strpos($txt_play,'ok.ru'); $pos17 = strpos($txt_play,'doodstream.com'); $pos18 = strpos($txt_play,'vophim.com'); $pos19 = strpos($txt_play,'openstream.io'); $pos20 = strpos($txt_play,'xmovies08.ru'); $pos21 = strpos($txt_play,'phimbathu.org'); $pos22 = strpos($txt_play,'hydrax.net'); $pos23 = strpos($txt_play,'vidload.net'); $pos24 = strpos($txt_play,'cloudvideo.tv'); $pos25 = strpos($txt_play,'streamtape.com'); $pos26 = strpos($txt_play,'playhydrax.com'); $pos27 = strpos($txt_play,'/index.m3u8'); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="'.$txt_play.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); $smarty->assign('no_iframe', 0); $smarty->assign('bilutv', 1); $subtitle_encode = ''; $row_check['download_link'] = ''; if($pos27 !== false) { $a_source['file'] = trim($txt_play); $a_source['label'] = '720p'; $a_source['type'] = 'application/x-mpegURL'; $a_source['subtitle'] = $subtitle; $list_source[] = $a_source; $show_video = $func->get_video_js_new($list_source,''); $row_check['player'] = $func->encode_html($show_video); $smarty->assign('no_iframe', 1); $smarty->assign('bilutv', 0); } if($pos7 !== false) { $id_f = str_replace('https://www.youtube.com/watch?v=','',$txt_play); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://www.youtube.com/embed/' . $id_f . '?autoplay=1&html5=1&controls=1&showinfo=0&rel=0&modestbranding=0&playsinline=1&enablejsapi=0&widgetid=1&color=white" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos2 !== false) { $parts = parse_url($txt_play); parse_str($parts['query'], $query); $id_f = basename(trim($query['id'])); $token= md5(rand(1000000,9000000)); $id_f_encode = bin2hex($func->str_encode($id_f,'123vid@net@')); $a_source = $list_source=array(); //$a_source['file'] = 'https://123vid.top/proxy/news_test3.php?f='.$id_f_encode.'&token='.$token.'&time='.time(); //$a_source['file'] = 'dramadata2/'.$id_f_encode.'/'.$token.'/'.time().'.mp4'; $a_source['file'] = 'https://st1.123vid.net/dramadata3/'.$id_f_encode.'.mp4'; $a_source['label'] = '720p'; $a_source['type'] = 'video/mp4'; $a_source['subtitle'] = $subtitle; $list_source[] = $a_source; $show_video = $func->get_video_js($list_source,''); $row_check['player'] = $func->encode_html($show_video); $smarty->assign('no_iframe', 1); $smarty->assign('bilutv', 0); } if($pos25 !== false){ $txt_play = str_replace('https://streamtape.com/v/','',$txt_play); $arr_play = explode('/',$txt_play); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://streamtape.com/e/'.$arr_play[0].'/" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos24 !==false){ $txt_play = trim(str_replace('https://cloudvideo.tv/','',$txt_play)); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://cloudvideo.tv/emb.html?'.$txt_play.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos23 !==false){ $txt_play = str_replace('https://www.vidload.net/','',$txt_play); if(strpos($txt_play,'~')!==false){ $arr_play = explode('~',$txt_play); $txt_play = $arr_play[0]; } $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://www.vidload.net/e/'.$txt_play.'?c1_file='.$subtitle.'&c1_label=English" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos22 !==false){ $txt_play = str_replace('https://hydrax.net/watch?v=','',$txt_play); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://short.ink/'.$txt_play.'" frameborder="0" scrolling="0" allowfullscreen></iframe>'); } if($pos26 !==false){ $txt_play = str_replace('https://playhydrax.com/?v=','',$txt_play); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://short.ink/'.$txt_play.'" frameborder="0" scrolling="0" allowfullscreen></iframe>'); } if($pos21 !==false){ $txt_play = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $subtitle_encode = bin2hex($func->str_encode($subtitle,'123Vid@Net')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://123vid.top/proxy/kk_test.php?url='.$txt_play.'&track='.$subtitle_encode.'&time='.time().'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos20 !==false){ $arr_check = explode('hydrax=',$txt_play); if(!empty($arr_check[1])) { $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://short.ink/' . $arr_check[1] . '" frameborder="0" scrolling="0" allowfullscreen></iframe>'); }else { $txt_play = bin2hex($func->str_encode($txt_play, '123Vid@Net')); $subtitle_encode = bin2hex($func->str_encode($subtitle, '123Vid@Net')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://videock.com/drive/ccc_test_2.php?url=' . $txt_play . '&track=' . $subtitle_encode . '&time=' . time() . '" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } } if($pos19 !==false){ $txt_play = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $subtitle_encode = bin2hex($func->str_encode($subtitle,'123Vid@Net')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://videock.com/drive/ccc_test.php?url='.$txt_play.'&track='.$subtitle_encode.'&time='.time().'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos18 !==false){ $txt_play = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $subtitle_encode = bin2hex($func->str_encode($subtitle,'123Vid@Net')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://st2.videock.com/proxy/i_test.php?url='.$txt_play.'&track='.$subtitle_encode.'&time='.time().'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos17 !==false){ $txt_play = str_replace('https://doodstream.com/d/','https://dood.to/e/',$txt_play); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="'.$txt_play.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos16 !==false){ $txt_play = str_replace(array('http://','video/','?autoplay=1'),array('https://','videoembed/',''),$txt_play); //$txt_play = bin2hex($func->str_encode($txt_play,'123Vid@Net')); //$subtitle_encode = bin2hex($func->str_encode($subtitle,'123Vid@Net')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="'.$txt_play.'?autoplay=1" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos15 !==false){ $id_encode = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $subtitle_encode = bin2hex($func->str_encode($subtitle,'123Vid@Net')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://st2.videock.com/proxy/d_test.php?u='.$id_encode.'&track='.$subtitle_encode.'&time='.time().'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos9 !== false) { $encode = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $link_play = 'https://videock.com/drive/aaa_test.php?url='.$encode.'&time='.time(); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="'.$link_play.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos14 !== false) { $arr_check = explode('hydrax=',$txt_play); if(!empty($arr_check[1])) { $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://short.ink/' . $arr_check[1] . '" frameborder="0" allowfullscreen ></iframe>'); }else{ $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://short.ink/" frameborder="0" allowfullscreen></iframe>'); } /*$encode = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $link_play = 'https://videock.com/drive/s_test.php?url='.$encode.'&time='.time(); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="'.$link_play.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>');*/ } if($pos8 !== false){ $id_f = basename(trim($txt_play)); $token= md5(rand(1000000,9000000)); $id_f_encode = bin2hex($func->str_encode($id_f,$token)); //$a_source['file'] = 'https://123vid.top/proxy/news_test.php?f='.$id_f_encode.'&token='.$token.'&time='.time(); $a_source['file'] = 'dramadata/'.$id_f_encode.'/'.$token.'/'.time().'.mp4'; $a_source['label'] = '720p'; $a_source['type'] = 'video/mp4'; $a_source['subtitle'] = $subtitle; $list_source[] = $a_source; $show_video = $func->get_video_js($list_source,''); $row_check['player'] = $func->encode_html($show_video); $smarty->assign('no_iframe', 1); $smarty->assign('bilutv', 0); /*$link_play = 'https://www.fembed.com/v/'.$id_f; $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="'.$link_play.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>');*/ } if($pos11 !== false) { $encode = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $link_play = $INFO['home_url'].'proxy/a_test.php?a='.$encode.'&time='.time(); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="'.$link_play.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos4 !== false) { $link_encode = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://st2.vidoe.top/stream5.php?url='.$link_encode.'&track='.$subtitle_encode.'&time='.time().'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos12 !== false) { //$row_check['download_link'] = str_replace('https://watching.vn/','https://watching.vn/embed-',$txt_play); $link_encode = bin2hex($func->str_encode($txt_play,'123Vid@Net')); $a_source['file'] = 'https://st1.123vid.net/download1.php?link='.$link_encode; $a_source['label'] = '720p'; $a_source['type'] = 'video/mp4'; $a_source['subtitle'] = $subtitle; $list_source[] = $a_source; $show_video = $func->get_video_js($list_source,''); $row_check['player'] = $func->encode_html($show_video); $smarty->assign('no_iframe', 1); $smarty->assign('bilutv', 0); } if($pos13 !== false) { $row_check['player'] = $func->encode_html('<iframe src="'.$txt_play.'" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>'); } if($pos5 !== false) { $row_check['player'] = '<h2>This video have been error. Our staff is working to correct this issue as swiftly as possible. Thank you!</h2>'; } if($pos6 !== false) { $row_check['player'] = '<h2>This video have been error. Our staff is working to correct this issue as swiftly as possible. Thank you!</h2>'; } if($pos10 !==false){ $token= md5(rand(1000000,9000000)); $link_encode = bin2hex($func->str_encode($txt_play,$token)); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://hls4.vidoe.top/proxy/movie.php?p='.$link_encode.'&token='.$token.'&time='.time().'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos1 !== false) { $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="'.$txt_play.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos3 !== false) { $link_encode = bin2hex($func->str_encode($txt_play,'vidoe@top')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://hls3.123vid.net/proxy/drama.php?file='.$link_encode.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos33 !== false) { $txt_play = str_replace('https://hls3.123vid.net/','https://hls5.vidoe.top/',$txt_play); $link_encode = bin2hex($func->str_encode($txt_play,'vidoe@top')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://hls5.vidoe.top/proxy/drama.php?file='.$link_encode.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos333 !== false) { $txt_play = str_replace('https://hls4.vidoe.top/','https://hls5.vidoe.top/',$txt_play); $link_encode = bin2hex($func->str_encode($txt_play,'vidoe@top')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://hls5.vidoe.top/proxy/drama.php?file='.$link_encode.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos3333 !== false) { $link_encode = bin2hex($func->str_encode($txt_play,'vidoe@top')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://hls5.vidoe.top/proxy/drama.php?file='.$link_encode.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos33333 !== false) { $link_encode = bin2hex($func->str_encode($txt_play,'vidoe@top')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://hls6.vidoe.top/proxy/drama.php?file='.$link_encode.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } if($pos333333 !== false) { $link_encode = bin2hex($func->str_encode($txt_play,'vidoe@top')); $row_check['player'] = $func->encode_html('<iframe id="player_iframe" src="https://hls7.vidoe.top/proxy/drama.php?file='.$link_encode.'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>'); } //breadrum $row_check['txt_hinhthuc'] = $INFO['hinhthuc'][$row_check['hinhthuc']][$_SESSION['lang']]; $row_check['txt_quocgia'] = $row_check['txt_quocgia3'] = ''; if(!empty($row_check['quocgia'])){ $txt_quocgia = $func->remove_lastchar($row_check['quocgia'],1); $txt_quocgia = "'".str_replace('@',"','",$txt_quocgia)."'"; $q_quocgia = $DB->query("SELECT * FROM gtdesign_country WHERE slug IN ($txt_quocgia) "); while($r_quocgia = $DB->fetch_row($q_quocgia)){ if($_SESSION['lang']=='en'){ $r_quocgia['name'] = $r_quocgia['ename']; } $arr_quocgia2[] = ' <a itemprop="item" title="' . $r_quocgia['name'] . '" href="country/' . $r_quocgia['slug'] . '/"><span itemprop="name">' . $r_quocgia['name'] . '</span></a> '; $row_check['txt_quocgia3'] .= '<span><a title="' . $r_quocgia['name'] . '" href="country/' . $r_quocgia['slug'] . '/">' . $r_quocgia['name'] . '</a></span>'; } } if(isset($arr_quocgia2)){ $row_check['txt_quocgia'] = implode(', ',$arr_quocgia2); } $row_check['txt_theloai_info'] = $row_check['txt_theloai'] = ''; if(!empty($row_check['theloai'])){ $txt_theloai = $func->remove_lastchar($row_check['theloai'],1); $txt_theloai = "'".str_replace('@',"','",$txt_theloai)."'"; $q_theloai = $DB->query("SELECT * FROM gtdesign_genres WHERE slug IN ($txt_theloai) "); while($r_theloai = $DB->fetch_row($q_theloai)){ if($_SESSION['lang']=='en'){ $r_theloai['name'] = $r_theloai['ename']; } $arr_theloai2[] = '<a href="genre/' . $r_theloai['slug'] . '/" title="' . $r_theloai['name'] . '" itemprop="item" ><span itemprop="name">' . $r_theloai['name'] . '</span></a>'; $row_check['txt_theloai_info'] .= '<span><a title="' . $r_theloai['name'] . '" href="genre/' .$r_theloai['slug']. '/">' .$r_theloai['name'] . '</a></span>'; } } if(isset($arr_theloai2)){ $row_check['txt_theloai'] = implode(', ',$arr_theloai2); } $row_check['txt_daodien'] = ''; $arr_daodien = explode(',', $row_check['daodien']); if (!empty($row_check['daodien'])) { foreach ($arr_daodien as $val) { if(trim($val)!='') { $row_check['txt_daodien'] .= '<span><a href="director/' . trim($val) . '/">' . trim($val) . '</a></span>'; } } } else { $row_check['txt_daodien'] = '<span>Updating...</span>'; } $row_check['txt_dienvien'] = ''; $arr_dienvien = explode(',',$row_check['dienvien']); if(!empty($row_check['dienvien'])){ foreach ($arr_dienvien as $val) { $row_check['txt_dienvien'] .= '<span><a href="star/'.trim($val).'/">'.trim($val).'</a></span>'; } }else{ $row_check['txt_dienvien'] = '<span>Updating...</span>'; } $smarty->assign('detail',$row_check); /*echo "SELECT id,theloai,title_vi,title_en,title_other,plot,plot_en,img,chatluong,ngonngu,namphathanh,linkphim,sotap,hinhthuc FROM gtdesign_phim WHERE hinhthuc='".$row_check['hinhthuc']."' AND status=1 AND id<>'".$id."' AND linkphim NOT LIKE '%bilutv.net%' AND linkphim NOT LIKE '%bilutv.com%' AND linkphim NOT LIKE '%phimbathu.com%' ORDER BY rand() LIMIT 0,30"; exit();*/ $txt_theloai = $where_theloai = ''; $row_check['theloai'] = $func->remove_lastchar($row_check['theloai'],1); if(strpos($row_check['theloai'],'@')!==false){ $arr_theloai = explode('@',$row_check['theloai']); $txt_theloai = $arr_theloai[0].'@'.$arr_theloai[1]; $where_theloai = " AND theloai LIKE '%".$arr_theloai[0]."@%' AND theloai LIKE '%".$arr_theloai[1]."@%' "; }else{ $txt_theloai = $row_check['theloai']; $where_theloai = " AND theloai LIKE '%".$row_check['theloai']."@%' "; } $key_phim_hot2 = md5("SELECT * FROM gtdesign_phim WHERE status=1 AND id<>'".$id."' ".$where_theloai." ORDER BY rand() LIMIT 0,35 d"); $cache_result_phim_hot2 = $memcache->get($key_phim_hot2); if($cache_result_phim_hot2){ $list_phim_hot2 = $cache_result_phim_hot2; }else { $q_phim_hot2 = $DB->query("SELECT * FROM gtdesign_phim WHERE status=1 AND id<>'" . $id . "' ".$where_theloai." ORDER BY rand() LIMIT 0,35"); $list_phim_hot2 = array(); while ($r_phim_hot = $DB->fetch_row($q_phim_hot2)) { $arr_id_related[] = $r_phim_hot['id']; if ($_SESSION['lang'] != 'vi') { $r_phim_hot['title_vi'] = $r_phim_hot['title_en']; $r_phim_hot['title_en'] = $r_phim_hot['title_other']; $r_phim_hot['plot'] = $r_phim_hot['plot_en']; } $r_phim_hot['plot'] = html_entity_decode($r_phim_hot['plot']); $r_phim_hot['ftitle'] = $func->format_string($r_phim_hot['title_vi']); $r_phim_hot['sotap_daup'] = substr_count($r_phim_hot['linkphim'], '@') + 1; $list_phim_hot2[] = $r_phim_hot; } $memcache->set($key_phim_hot2, $list_phim_hot2, MEMCACHE_COMPRESSED, 1200); } $smarty->assign('phim_related2',$list_phim_hot2); unset($list_phim_hot,$list_phim_hot2,$list_phim_hot3); //title, des, keyword $site_title = ''; if($_SESSION['lang']=='en'){ if($row_check['hinhthuc']!='tv-drama') { if($row_check['title_en']!='' and $row_check['title_en']!=$row_check['title_vi']) { $site_title = $row_check['title_vi'] . ' - ' . $row_check['title_en'] . ' (' . $row_check['namphathanh'] . ')'; }else{ $site_title = $row_check['title_vi'] . ' (' . $row_check['namphathanh'] . ')'; } }else{ if($row_check['title_en']!='' and $row_check['title_en']!=$row_check['title_vi']) { $site_title = $row_check['title_vi'] . ' - ' . $row_check['title_en'] . ' (' . $row_check['namphathanh'] . ') Episode ' . $epi; }else{ $site_title = $row_check['title_vi'] . ' (' . $row_check['namphathanh'] . ') Episode ' . $epi; } } }else{ if($row_check['hinhthuc']!='tv-drama') { if($row_check['title_en']!=$row_check['title_vi']) { $site_title = $row_check['title_vi'] . ' - ' . $row_check['title_en'] . ' (' . $row_check['namphathanh'] . ')'; }else{ $site_title = $row_check['title_vi'] . ' (' . $row_check['namphathanh'] . ')'; } }else{ if($row_check['title_en']!=$row_check['title_vi']) { $site_title = $row_check['title_vi'] . ' - ' . $row_check['title_en'] . ' (' . $row_check['namphathanh'] . ') Tập ' . $epi; }else{ $site_title = $row_check['title_vi'] . ' (' . $row_check['namphathanh'] . ') Tập ' . $epi; } } } $smarty->assign('title',str_replace('"','`',$site_title)); $smarty->assign('description',str_replace('"','`',strip_tags($row_check['plot']))); $smarty->assign('image',$row_check['img']); $smarty->assign('keywords',$site_title); $smarty->assign('cur_url',$INFO['home_url'].'watch/'.$row_check['ftitle'].'-'.$row_check['id'].'.html'); //$smarty->assign('cur_url','https://1video.top/r/film/'.$row_check['id'].'.html'); } function goList(){ global $smarty,$CORE,$DB,$func,$print,$INFO,$lang,$memcache; $where = " 1 AND status=1 AND linkphim NOT LIKE '%bilutv.net%' AND linkphim NOT LIKE '%bilutv.com%' AND linkphim NOT LIKE '%phimbathu.com%' "; $title = ''; $des = ''; $keyword = ''; $bread = ''; $txt_order = ' `time` DESC '; if(isset($CORE->input['sort']) and $CORE->input['sort']!=''){ $smarty->assign('sort',$CORE->input['sort']); if($CORE->input['sort']=='posttime') { $txt_order = ' `time` DESC '; }else{ $txt_order = ' `namphathanh` DESC '; } $title .= 'Films lastest update - '; $des .= 'Films lastest update - '; $keyword .= 'Films lastest update,'; $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="Lastest update" href="lastest-update-films/"><span itemprop="name">Lastest update</span></a></li>'; } $formality = $year = $genre = $language = $country = $director = $star = $tags = $sort = $keyword = $recommendation = ''; if(isset($CORE->input['formality']) and $CORE->input['formality']!=''){ if($CORE->input['formality']=='movie') { $where .= " AND (`hinhthuc`='" . $CORE->input['formality'] . "' OR `hinhthuc`='in-theaters') "; }else{ $where .= " AND `hinhthuc` = '" . $CORE->input['formality'] . "' "; } $title .= $lang['hinhthuc'].': '.$INFO['hinhthuc'][$CORE->input['formality']][$_SESSION['lang']].' - '; $des .= $lang['hinhthuc'].': '.$INFO['hinhthuc'][$CORE->input['formality']][$_SESSION['lang']].' '; $keyword .= $INFO['hinhthuc'][$CORE->input['formality']][$_SESSION['lang']].','; $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$INFO['hinhthuc'][$CORE->input['formality']][$_SESSION['lang']].'" href="'.$CORE->input['formality'].'/"><span itemprop="name">'.$INFO['hinhthuc'][$CORE->input['formality']][$_SESSION['lang']].'</span></a></li>'; $formality = $CORE->input['formality']; } if(isset($CORE->input['year']) and $CORE->input['year']!=''){ $old_year = intval(date('Y') - 5); if($CORE->input['year'] >0 ) { $where .= " AND `namphathanh`='" . $CORE->input['year'] . "' "; $txt_show_year = $CORE->input['year']; $title .= $lang['namphathanh'].': '.$CORE->input['year'].' - '; $des .= $lang['namphathanh'].': '.$CORE->input['year'].' '; $keyword .= $CORE->input['year'].','; }else{ $txt_year = abs($CORE->input['year']); $where .= " AND `namphathanh`<='" . $txt_year . "' "; if($_SESSION['lang']=='en') { $txt_show_year = 'Before ' . $txt_year; }else{ $txt_show_year = 'Trước ' . $txt_year; } $title .= $lang['namphathanh'].': '.$txt_show_year.' - '; $des .= $lang['namphathanh'].': '.$txt_show_year.' '; $keyword .= $txt_show_year.','; } $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$CORE->input['year'].'" href="year/'.$CORE->input['year'].'/"><span itemprop="name">'.$txt_show_year.'</span></a></li>'; $year = $CORE->input['year']; } if(isset($CORE->input['genre']) and $CORE->input['genre']!=''){ $r_theloai = $DB->fetch_row($DB->query("SELECT * FROM gtdesign_genres WHERE slug='".$CORE->input['genre']."' ")); if($_SESSION['lang']=='en'){ $r_theloai['name'] = $r_theloai['ename']; } $where .= " AND `theloai` LIKE '%".$CORE->input['genre']."@%' "; $title .= $lang['theloai'].': '.$r_theloai['name'].' - '; $des .= $lang['theloai'].': '.$r_theloai['name'].' '; $keyword .= $INFO['theloai'][$CORE->input['genre']][$_SESSION['lang']].','; $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$r_theloai['name'].'" href="genre/'.$CORE->input['genre'].'/"><span itemprop="name">'.$r_theloai['name'].'</span></a></li>'; $genre = $CORE->input['genre']; } if(isset($CORE->input['language']) and $CORE->input['language']!=''){ $where .= " AND `ngonngu` LIKE '%".$CORE->input['language']."%' "; $title .= $lang['ngonngu'].': '.$INFO['ngonngu'][$CORE->input['language']][$_SESSION['lang']].' - '; $des .= $lang['ngonngu'].': '.$INFO['ngonngu'][$CORE->input['language']][$_SESSION['lang']].' '; if(isset($INFO['ngonngu'][$genre][$_SESSION['lang']])) { $keyword .= $INFO['ngonngu'][$genre][$_SESSION['lang']] . ','; } $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$INFO['ngonngu'][$CORE->input['language']][$_SESSION['lang']].'" href="language/'.$CORE->input['language'].'/"><span itemprop="name">'.$INFO['ngonngu'][$CORE->input['language']][$_SESSION['lang']].'</span></a></li>'; $language = $CORE->input['language']; } if(isset($CORE->input['country']) and $CORE->input['country']!=''){ $r_country = $DB->fetch_row($DB->query("SELECT * FROM gtdesign_country WHERE slug='".$CORE->input['country']."' ")); if($_SESSION['lang']=='en'){ $r_country['name'] = $r_country['ename']; } $where .= " AND `quocgia` LIKE '%".$CORE->input['country']."@%' "; $title .= $lang['quocgia'].': '.$r_country['name'].' - '; $des .= $lang['quocgia'].': '.$r_country['name'].' '; if(isset($r_country['name'])) { $keyword .= $r_country['name'] . ','; } $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$r_country['name'].'" href="country/'.$CORE->input['country'].'/"><span itemprop="name">'.$r_country['name'].'</span></a></li>'; $country = $CORE->input['country']; } if(isset($CORE->input['director']) and $CORE->input['director']!=''){ $where .= " AND `daodien` LIKE '%".$CORE->input['director']."%' "; $title .= $lang['daodien'].': '.$CORE->input['director'].' - '; $des .= $lang['daodien'].': '.$CORE->input['director'].' '; $keyword .= $CORE->input['director'].','; $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$CORE->input['director'].'" href="director/'.$CORE->input['director'].'/"><span itemprop="name">'.$lang['cacphimboidaodien'].': '.$CORE->input['director'].'</span></a></li>'; $director = $CORE->input['director']; } if(isset($CORE->input['star']) and $CORE->input['star']!=''){ $where .= " AND `dienvien` LIKE '%".$CORE->input['star']."%' "; $title .= $lang['dienvien'].': '.$CORE->input['star'].' - '; $des .= $lang['dienvien'].': '.$CORE->input['star'].' '; $keyword .= $CORE->input['star'].','; $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$CORE->input['star'].'" href="star/'.$CORE->input['star'].'/"><span itemprop="name">'.$lang['cacphimcodienvien'].': '.$CORE->input['star'].'</span></a></li>'; $star = $CORE->input['star']; } //recommendation if(isset($CORE->input['recommendation']) and $CORE->input['recommendation']=='1'){ $where .= " AND `phimdecu` = '1' "; $title .= $lang['phimdecu'].' - '; $des .= $lang['phimdecu'].' '; $keyword .= $lang['phimdecu'].','; $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$lang['phimdecu'].'" href="recommendation/"><span itemprop="name">'.$lang['phimdecu'].'</span></a></li>'; $recommendation = $CORE->input['recommendation']; } //tags if(isset($CORE->input['tags']) and $CORE->input['tags']!=''){ $where .= " AND (`title_vi` LIKE '%".$CORE->input['tags']."%' OR `title_en` LIKE '%".$CORE->input['tags']."%' OR `title_other` LIKE '%".$CORE->input['tags']."%') "; $title .= 'Tags: '.$CORE->input['tags'].' - '; $des .= 'Tags: '.$CORE->input['tags'].' '; $keyword .= $CORE->input['tags'].','; $bread .= '<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><a itemprop="item" title="'.$CORE->input['tags'].'" href="tags/'.$CORE->input['tags'].'"><span itemprop="name">Tags: '.$CORE->input['tags'].'</span></a></li>'; $tags = $CORE->input['tags']; } $pageNum = isset($_GET['pageNum']) ? intval($_GET['pageNum']) : 1; $pageSize = 35; $from = (($pageNum * $pageSize) - $pageSize); $key_total_news = md5($_SESSION['lang']."SELECT count(id) as total FROM gtdesign_phim WHERE ".$where." "); $cache_total_news = $memcache->get($key_total_news); if($cache_total_news){ $total = $cache_total_news; }else { $row_total_news = $DB->fetch_row($DB->query("SELECT count(id) as total FROM gtdesign_phim WHERE " . $where . " ")); $total = $row_total_news['total']; $memcache->set($key_total_news, $total, MEMCACHE_COMPRESSED, 1200); } $totalPage = ceil($total/$pageSize); $smarty->assign('totalpage',$totalPage); $key_list_phim = md5($_SESSION['lang'].'list-phim-'." SELECT * FROM gtdesign_phim WHERE ".$where." ORDER BY ".$txt_order." LIMIT $from,$pageSize"); // Unique Words $cache_result_list_phim = $memcache->get($key_list_phim); // Memcached object if($cache_result_list_phim){ $list_pl = $cache_result_list_phim; }else { $q2 = $DB->query(" SELECT * FROM gtdesign_phim WHERE ".$where." ORDER BY ".$txt_order." LIMIT $from,$pageSize "); while($r2 = $DB->fetch_row($q2)) { if ($_SESSION['lang'] != 'vi') { $r2['title_vi'] = $r2['title_en']; $r2['title_en'] = $r2['title_other']; $r2['plot'] = $r2['plot_en']; } $r2['encode_img'] = bin2hex($func->str_encode($r2['img'], 'ngocgiac')); $r2['ftitle'] = $func->format_string($r2['title_vi']); $arr_ngonngu = explode('@', $r2['ngonngu']); $arr_ngonngu2 = array(); foreach ($arr_ngonngu as $key => $val) { $arr_ngonngu2[] = $INFO['ngonngu'][$val][$_SESSION['lang']]; $r2['ngonngu'] = implode('+', $arr_ngonngu2); } //$r2['chatluong'] = $r2['chatluong'] . '-' . $r2['ngonngu']; if (trim($r2['linkphim']) == '') { $r2['linkphim'] = $r2['linkphim_tm']; if (trim($r2['linkphim']) == '') { $r2['linkphim'] = $r2['linkphim_lt']; } } $r2['sotap_daup'] = substr_count($r2['linkphim'], '@') + 1; $arr_theloai = explode('@', $r2['theloai']); if (!is_null($arr_theloai)) { $arr_theloai2 = array(); foreach ($arr_theloai as $val) { $arr_theloai2[] = '<a href="genre/' . $val . '/" title="' . $INFO['theloai'][$val][$_SESSION['lang']] . '">' . $INFO['theloai'][$val][$_SESSION['lang']] . '</a>'; } } $r2['txt_theloai'] = implode(', ', $arr_theloai2); $arr_daodien = explode(',', $r2['daodien']); if (!is_null($arr_daodien)) { $arr_daodien2 = array(); foreach ($arr_daodien as $val) { $arr_daodien2[] = '<a href="director/' . trim($val) . '/">' . trim($val) . '</a>'; } $r2['txt_daodien'] = implode(', ', $arr_daodien2); } else { $r2['txt_daodien'] = ''; } $arr_dienvien = explode(',', $r2['dienvien']); if (!is_null($arr_dienvien)) { $arr_dienvien2 = array(); foreach ($arr_dienvien as $val) { $arr_dienvien2[] = '<a href="star/' . trim($val) . '/">' . trim($val) . '</a>'; } $r2['txt_dienvien'] = implode(', ', $arr_dienvien2); } else { $r2['txt_dienvien'] = ''; } $list_pl[] = $r2; } $memcache->set($key_list_phim, $list_pl, MEMCACHE_COMPRESSED, 1200); } $smarty->assign('list_news',$list_pl); $nav = $print->Pagination($totalPage,$pageNum,'pages','?act=phim&formality='.$formality.'&year='.$year.'&genre='.$genre.'&language='.$language.'&country='.$country.'&director='.$director.'&star='.$star.'&recommendation='.$recommendation.'&tags='.$tags.'&sort='.$sort); $smarty->assign('nav',$nav); if($pageNum>1){ $title .= ' Watch movies and videos for free | '.$lang['trang'].' '.$pageNum; }else{ $title .= 'Watch movies and videos for free'; } $smarty->assign('sort', $sort); $smarty->assign('title', $title); $smarty->assign('description', $func->remove_lastchar($des,1)); $smarty->assign('keywords',$func->remove_lastchar($keyword,1)); $smarty->assign('bread',$bread); $smarty->assign('image',$INFO['home_url'].'skin/'.$INFO['skin_folder'].'/img/vidoe-logo.png'); } function goDownload(){ global $smarty,$CORE,$DB,$func,$INFO,$print; $resp = null; $error = null; $id = intval($CORE->input['id']); $row_check = $DB->fetch_row($DB->query("SELECT * FROM gtdesign_phim WHERE id='$id'")); if(!$row_check){ $print->refresh($INFO['home_url'].'404/index.html'); exit(); } if($_SESSION['lang']=='en'){ $row_check['title_vi'] = $row_check['title_en']; $row_check['title_en'] = $row_check['title_other']; $row_check['plot'] = $row_check['plot_en']; } $row_check['encode_img'] = bin2hex($func->str_encode($row_check['img'], 'ngocgiac')); $row_check['ftitle'] = $func->format_string($row_check['title_vi']); //breadrum $row_check['txt_hinhthuc'] = $INFO['hinhthuc'][$row_check['hinhthuc']][$_SESSION['lang']]; //$row_check['txt_quocgia'] = $INFO['quocgia'][$row_check['quocgia']][$_SESSION['lang']]; $arr_quocgia = explode('@',$row_check['quocgia']); if(!is_null($arr_quocgia)) { $arr_quocgia2 = array(); $arr_quocgia3 = array(); foreach ($arr_quocgia as $val) { $arr_quocgia3[] = ' <a title="' . $INFO['quocgia'][$val][$_SESSION['lang']] . '" href="country/' . $val . '/">' . $INFO['quocgia'][$val][$_SESSION['lang']] . '</a> '; $arr_quocgia2[] = ' <a itemprop="item" title="' . $INFO['quocgia'][$val][$_SESSION['lang']] . '" href="country/' . $val . '/"><span itemprop="name">' . $INFO['quocgia'][$val][$_SESSION['lang']] . '</span></a> '; } } $row_check['txt_quocgia'] = implode(', ',$arr_quocgia2); $row_check['txt_quocgia3'] = implode(', ',$arr_quocgia3); $arr_theloai = explode('@',$row_check['theloai']); if(!is_null($arr_theloai)) { foreach ($arr_theloai as $val) { $arr_theloai2[] = '<a href="genre/' . $val . '/" title="' . $INFO['theloai'][$val][$_SESSION['lang']] . '" itemprop="item" ><span itemprop="name">' . $INFO['theloai'][$val][$_SESSION['lang']] . '</span></a>'; $row_check['txt_theloai_info'] .= '<li><a href="genre/' . $val . '/" title="' . $INFO['theloai'][$val][$_SESSION['lang']] . '">' . $INFO['theloai'][$val][$_SESSION['lang']] . '</a></li>'; } } $row_check['txt_theloai'] = implode(', ',$arr_theloai2); $arr_dienvien = explode(',',$row_check['dienvien']); $row_check['txt_dienvien'] = ''; if(!is_null($arr_dienvien)){ foreach ($arr_dienvien as $val) { $row_check['txt_dienvien'] .= '<li><a href="star/'.trim($val).'/">'.trim($val).'</a></li>'; } } $error = 1; if(isset($_POST['g-recaptcha-response'])){//[email protected] $recaptchaResponse = $_POST['g-recaptcha-response']; $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6LdEUD0UAAAAACMr17nQEUTPHVd_aGomtAdUn00m&response=" . $recaptchaResponse . "&remoteip=" . $_SERVER['REMOTE_ADDR']); $obj = json_decode($response); if ($obj->success == true) { //passes test $error = 0; $_SESSION['key_download'] = md5($recaptchaResponse); //show server if(trim($row_check['linkphim'])!='') { $row_check['server_name1'] = $INFO['ngonngu']['viet-sub'][$_SESSION['lang']]; $arr_server_1 = explode('@', $row_check['linkphim']); if (count($arr_server_1) <= 1) { $parts = parse_url($row_check['linkphim']); parse_str($parts['query'], $query); $row_check['linkphim_encode'] = bin2hex($func->str_encode($row_check['linkphim'], 'ngocgiac')); $row_check['server_1'] = '<li class="active"><a href="https://123vid.top/proxy/download.php?url='.$row_check['linkphim_encode'].'&title='.$row_check['ftitle'].'-Full&key='.$_SESSION['key_download'].'" target="_blank" rel="nofollow">Download Full '.$row_check['server_name1'].'</a></li>'; } else { foreach ($arr_server_1 as $key => $val) { $txt_end = ''; if($row_check['sotap'] == ($key+1)){ $txt_end = 'End'; } $parts = parse_url($val); parse_str($parts['query'], $query); $val_encode = bin2hex($func->str_encode($val, 'ngocgiac')); $row_check['server_1'] .= '<li><a href="https://123vid.top/proxy/download.php?url='.$val_encode.'&title='.$row_check['ftitle'].'-epi-'.($key+1).'&key='.$_SESSION['key_download'].'" target="_blank" rel="nofollow">Download episode ' . ($key + 1) . ' '.$txt_end.' </a></li>'; } } unset($arr_server_1); } if(trim($row_check['linkphim_tm'])!='') { $row_check['server_name2'] = $INFO['ngonngu']['subtitle'][$_SESSION['lang']]; $arr_server_2 = explode('@', $row_check['linkphim_tm']); if (count($arr_server_2) <= 1) { $row_check['linkphim_encode_tm'] = bin2hex($func->str_encode($row_check['linkphim_tm'], 'ngocgiac')); $row_check['server_2'] = '<li class="active"><a href="https://123vid.top/proxy/download.php?url='.$row_check['linkphim_encode_tm'].'&title='.$row_check['ftitle'].'&key='.$_SESSION['key_download'].'" target="_blank" rel="nofollow">Download Full '.$row_check['server_name2'].'</a></li>'; } else { foreach ($arr_server_2 as $key => $val) { $txt_end = ''; if($row_check['sotap'] == ($key+1)){ $txt_end = 'End'; } $row_check['linkphim_encode_tm'] = bin2hex($func->str_encode($val, 'ngocgiac')); $row_check['server_2'] .= '<li><a href="https://123vid.top/proxy/download.php?url='.$row_check['linkphim_encode_tm'].'&title='.$row_check['ftitle'].'&key='.$_SESSION['key_download'].'" target="_blank" rel="nofollow">Download episode ' . ($key + 1) . ' '.$txt_end.' </a></li>'; } } unset($arr_server_2); } } else { //error handling $error = 1; } } $smarty->assign('error',$error); $smarty->assign('detail',$row_check); //related $q_phim_hot = $DB->query("SELECT id,theloai,title_vi,title_en,title_other,plot,plot_en,img,chatluong,ngonngu,namphathanh,linkphim,sotap,hinhthuc FROM gtdesign_phim WHERE theloai LIKE '%".$arr_theloai[0]."%' AND status=1 AND id<>'".$id."' ORDER BY time DESC LIMIT 0,5 "); while($r_phim_hot = $DB->fetch_row($q_phim_hot)){ $arr_id_related[] = $r_phim_hot['id']; if($_SESSION['lang']=='en'){ $r_phim_hot['title_vi'] = $r_phim_hot['title_en']; $r_phim_hot['title_en'] = $r_phim_hot['title_other']; $r_phim_hot['plot'] = $r_phim_hot['plot_en']; } $r_phim_hot['plot'] = strip_tags($r_phim_hot['plot']); $r_phim_hot['ftitle'] = $func->format_string($r_phim_hot['title_vi']); $arr_ngonngu = explode('@',$r_phim_hot['ngonngu']); $arr_ngonngu2 = array(); foreach ($arr_ngonngu as $key=>$val){ $arr_ngonngu2[] = $INFO['ngonngu'][$val][$_SESSION['lang']]; $r_phim_hot['ngonngu'] = implode('+',$arr_ngonngu2); } //$r_phim_hot['chatluong'] = $r_phim_hot['chatluong'].'-'.$r_phim_hot['ngonngu']; $r_phim_hot['sotap_daup'] = substr_count($r_phim_hot['linkphim'], '@') ; $list_phim_hot[] = $r_phim_hot; } $smarty->assign('phim_related',$list_phim_hot); //phim cung the loai if(!is_null($arr_id_related)) { $txt_id_related = implode(',', $arr_id_related); }else{ $txt_id_related = '-1'; } $q_phim_hot2 = $DB->query("SELECT id,theloai,title_vi,title_en,title_other,plot,plot_en,img,chatluong,ngonngu,namphathanh,linkphim,sotap,hinhthuc FROM gtdesign_phim WHERE theloai LIKE '%".$arr_theloai[0]."%' AND status=1 AND id NOT IN (".$txt_id_related.") AND id<>'".$id."' ORDER BY time DESC LIMIT 0,20 "); while($r_phim_hot = $DB->fetch_row($q_phim_hot2)){ $arr_id_related[] = $r_phim_hot['id']; if($_SESSION['lang']=='en'){ $r_phim_hot['title_vi'] = $r_phim_hot['title_en']; $r_phim_hot['title_en'] = $r_phim_hot['title_other']; $r_phim_hot['plot'] = $r_phim_hot['plot_en']; } $r_phim_hot['plot'] = strip_tags($r_phim_hot['plot']); $r_phim_hot['encode_img'] = bin2hex($func->str_encode($r_phim_hot['img'], 'ngocgiac')); $r_phim_hot['ftitle'] = $func->format_string($r_phim_hot['title_vi']); $arr_ngonngu = explode('@',$r_phim_hot['ngonngu']); $arr_ngonngu2 = array(); foreach ($arr_ngonngu as $key=>$val){ $arr_ngonngu2[] = $INFO['ngonngu'][$val][$_SESSION['lang']]; $r_phim_hot['ngonngu'] = implode('+',$arr_ngonngu2); } //$r_phim_hot['chatluong'] = $r_phim_hot['chatluong'].'-'.$r_phim_hot['ngonngu']; $r_phim_hot['sotap_daup'] = substr_count($r_phim_hot['linkphim'], '@') ; $list_phim_hot2[] = $r_phim_hot; } $smarty->assign('phim_related2',$list_phim_hot2); //title, des, keyword if($_SESSION['lang']=='en'){ $smarty->assign('title','Download '. $row_check['title_vi'].' ('.$row_check['namphathanh'].')'); }else{ $smarty->assign('title', 'Tải về phim '. $row_check['title_vi'].' - '.$row_check['title_en'].' ('.$row_check['namphathanh'].')'); } $smarty->assign('description',$func->ope_max(strip_tags($row_check['plot']),155)); $smarty->assign('image',$row_check['img']); $smarty->assign('keywords',$row_check['title_vi']); $smarty->assign('cur_url',$INFO['home_url'].'watch/'.$row_check['ftitle'].'-'.$row_check['id'].'.html'); } } $run = new phim2(); ?>