categories)))) { $category_filter = $_GET['category_id']; } } $video_filter = 'all'; if (isset($_GET['privacy'])) { if (in_array($_GET['privacy'], array('0', '1', '2'))) { $video_filter = $_GET['privacy']; } } $video_approve = 'all'; if (isset($_GET['status'])) { if (in_array($_GET['status'], array('0', '1'))) { $video_approve = $_GET['status']; } } $video_type = 'all'; if (isset($_GET['type'])) { if (in_array($_GET['type'], array('all', 'free','paid'))) { $video_type = $_GET['type']; } } $filter_keyword = (!empty($_GET['query'])) ? PT_Secure($_GET['query']) : ''; $db->pageLimit = $limit_per_page; $where = 'id > 0'; if ($video_source != 'all') { if ($video_source == 'youtube') { $where .= " AND `youtube` <> ''"; } if ($video_source == 'dailymotion') { $where .= " AND `daily` <> ''"; } if ($video_source == 'vimeo') { $where .= " AND `vimeo` <> ''"; } if ($video_source == 'uploaded') { $where .= " AND `youtube` = '' AND `vimeo` = '' AND `daily` = ''"; } } if (!empty($category_filter)) { $where .= " AND `category_id` = '$category_filter'"; } if (isset($video_filter)) { if ($video_filter != 'all') { $where .= " AND `privacy` = '$video_filter'"; } } if (isset($video_approve)) { if ($video_approve != 'all') { $where .= " AND `approved` = '$video_approve'"; } } if (isset($video_type)) { if ($video_type == 'paid') { $where .= " AND `sell_video` > 0 "; } elseif ($video_type == 'free') { $where .= " AND `sell_video` = 0 "; } } if (!empty($filter_keyword)) { $where .= " AND MATCH (title) AGAINST ('{$filter_keyword}' IN BOOLEAN MODE) OR id = '$filter_keyword' OR (video_id = '$filter_keyword')"; } $videos = $db->where($where)->orderBy('id', 'DESC')->objectbuilder()->paginate(T_VIDEOS, $page); if ($db->totalPages != 0) { if (($page > $db->totalPages) && !empty($_GET['page-id'])) { header("Location: " . PT_LoadAdminLinkSettings('manage-videos')); exit(); } } ?>
ID | Video ID | Title | Category | Source | Privacy | Added By | Action |
---|