- if (WEB_DEMO_MODE || $_SESSION["access_level"] < 10) {
- return;
- }
-
-/* print "<html><head>
- <title>Tiny Tiny RSS : User Details</title>
- <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
- <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
- </head><body>"; */
-
- $uid = sprintf("%d", $_GET["id"]);
-
- print "<div id=\"infoBoxTitle\">User details</div>";
-
- print "<div class='infoBoxContents'>";
-
- $result = db_query($link, "SELECT login,
- SUBSTRING(last_login,1,16) AS last_login,
- access_level,
- (SELECT COUNT(int_id) FROM ttrss_user_entries
- WHERE owner_uid = id) AS stored_articles,
- SUBSTRING(created,1,16) AS created
- FROM ttrss_users
- WHERE id = '$uid'");
-
- if (db_num_rows($result) == 0) {
- print "<h1>User not found</h1>";
- return;
- }
-
-# print "<h1>User Details</h1>";
+ $reply['headlines-info'] = array("count" => (int) $headlines_count,
+ "vgroup_last_feed" => $vgroup_last_feed,
+ "unread" => (int) $headlines_unread,
+ "disable_cache" => (bool) $disable_cache);
+
+ if ($_REQUEST["debug"]) $timing_info = print_checkpoint("20", $timing_info);
+
+ if (is_array($topmost_article_ids) && !get_pref($link, 'COMBINED_DISPLAY_MODE') && !$_SESSION["bw_limit"]) {
+ $articles = array();
+
+ foreach ($topmost_article_ids as $id) {
+ array_push($articles, format_article($link, $id, $feed, false));
+ }
+
+ $reply['articles'] = $articles;
+ }
+
+ if ($subop) {
+ $reply['counters'] = getAllCounters($link, $omode, $feed);
+ }
+
+ if ($_REQUEST["debug"]) $timing_info = print_checkpoint("30", $timing_info);