total)) { $ids = array(); foreach ($get_videos->list as $key => $video) { $check_if_exists = $db->where('daily', $video->id)->getValue(T_VIDEOS, 'count(*)'); if ($check_if_exists == 0) { $ids[] = $video->id; } } } } else { $respond_error = 1; $error_text = 'Error connecting to Dailmotion API, you might reached your daily limit, please try again later.'; } } if (empty($ids) && empty($respond_error)) { $keyword_id = (isset($_SESSION['keyword-id'])) ? $_SESSION['keyword-id'] : null; if (!empty($explode[$keyword_id + 1])) { $_SESSION['keyword-id'] = $_SESSION['keyword-id'] + 1; } else { unset($_SESSION['keyword-id']); if (empty($_GET['finished']) && $search_made == 1) { header("Location: " . PT_LoadAdminLinkSettings('import-from-dailymotion?finished=1')); } } } $user_id = 0; if (!empty($_GET['username']) && isset($_GET['username'])) { $username = PT_Secure($_GET['username']); $user = $db->where('username', $username)->getOne(T_USERS); if (!empty($user)) { $user_id = $user->id; } else{ $respond_error = 1; $error_text = 'user not found'; } } $category_filter = 0; if (!empty($_GET['category_id'])) { if (in_array($_GET['category_id'], array_keys(ToArray($pt->categories)))) { $category_filter = $_GET['category_id']; } } $get_ini = ini_get('max_input_vars'); $auto_import = 0; if (!empty($_GET['auto_import'])) { $auto_import = 1; } ?>