$limit = db_escape_string($_GET["limit"]);
$cat_view = db_escape_string($_GET["cat"]);
$next_unread_feed = db_escape_string($_GET["nuf"]);
+ $offset = db_escape_string($_GET["skip"]);
+
+ if (!$offset) $offset = 0;
if ($subop == "undefined") $subop = "";
$match_on = "both";
}
- $qfh_ret = queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $match_on);
+ $real_offset = $offset * $limit;
+
+ $qfh_ret = queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view,
+ $search, $search_mode, $match_on, false, $real_offset);
$result = $qfh_ret[0];
$feed_title = $qfh_ret[1];
if (db_num_rows($result) > 0) {
print_headline_subtoolbar($link, $feed_site_url, $feed_title, false,
- $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode);
+ $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, $offset);
print "<div id=\"headlinesInnerContainer\">";
+# print "\{$offset}";
+
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
print "<table class=\"headlinesList\" id=\"headlinesList\"
cellspacing=\"0\" width=\"100%\">";
}
}
-function viewfeed(feed, subop, is_cat, subop_param, skip_history) {
+var page_offset = 0;
+
+function viewFeedGoPage(i) {
+ page_offset = page_offset + i;
+
+ if (page_offset < 0) page_offset = 0;
+
+ viewfeed(getActiveFeedId(), undefined, undefined, undefined,
+ undefined, page_offset);
+
+}
+
+function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
try {
+ if (!offset) page_offset = 0;
+
enableHotkeys();
if (!skip_history) {
query = query + "&cat=1";
}
+ if (offset) {
+ query = query + "&skip=" + offset;
+ }
+
if (navigator.userAgent.match("Opera")) {
var date = new Date();
var timestamp = Math.round(date.getTime() / 1000);
}
$content_query_part = "content as content_preview,";
-
+
$query = "SELECT
guid,
ttrss_entries.id,ttrss_entries.title,
function print_headline_subtoolbar($link, $feed_site_url, $feed_title,
$bottom = false, $rtl_content = false, $feed_id = 0,
$is_cat = false, $search = false, $match_on = false,
- $search_mode = false) {
+ $search_mode = false, $offset = 0) {
if (!$bottom) {
$class = "headlinesSubToolbar";
$rtl_cpart = "";
}
+# if ($offset > 0) {
+# $prev_page_link = "<a title=\"Previous Page\" href=\"javascript:viewFeedGoPage(-1)\"><<</a>";
+# } else {
+# $prev_page_link = "<<";
+# }
+# $r_offset = $offset + 1;
+# $next_page_link = "[$r_offset] <a title=\"Next Page\" href=\"javascript:viewFeedGoPage(1)\">>></a>";
+
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
print "<td class=\"headlineActions$rtl_cpart\">".