50) { $count = 10; } $length = get_int("contentlength", true); if (($length == null) || ($length <= 0)) { $length = 0; } $posts = BoincPost::enum("user=$userid ORDER BY timestamp DESC LIMIT $count"); $count = count($posts); echo "\n"; echo "$count\n"; echo "\n"; foreach ($posts as $post) { $thread = BoincThread::lookup_id($post->thread); echo "\n"; echo " $post->id\n"; echo " $post->thread\n"; echo " title."]]>\n"; echo " $post->timestamp\n"; if ($length > 0) { echo " content, 0, $length)."]]>\n"; } else { echo " content."]]>\n"; } echo "\n"; } echo "\n"; echo "\n"; } elseif ($method == "user_threads") { $count = get_int("count", true); if (!$count || $count <= 0 || $count > 50) { $count = 10; } $threads = BoincThread::enum("owner=$userid ORDER BY timestamp DESC LIMIT $count"); $count = count($threads); echo "\n"; echo "$count\n"; echo "\n"; foreach($threads as $thread) { echo "\n"; echo " $thread->id\n"; echo " $thread->forum\n"; echo " $thread->replies\n"; echo " $thread->views\n"; echo " $thread->timestamp\n"; echo " <![CDATA[$thread->title]]>\n"; echo "\n"; } echo "\n"; echo "\n"; } ?>