Exemplo n.º 1
0
            $d = $forum->description;
            if (!strlen($d)) {
                $d = tra("Discussion among members of %1", $team->name);
            }
            break;
    }
    $j = $i % 2;
    echo "\n        <tr class=\"row{$j}\">\n        <td>\n            <a href=\"forum_forum.php?id={$forum->id}\">{$t}</a>\n            <br><span class=\"smalltext\">{$d}</span>\n        </td>\n        <td class=\"numbers\">{$forum->threads}</td>\n        <td class=\"numbers\">{$forum->posts}</td>\n        <td class=\"lastpost\">" . time_diff_str($forum->timestamp, time()) . "</td>\n    </tr>";
}
page_head(tra("%1 Message boards", PROJECT));
show_forum_header($user);
if (FORUM_QA_MERGED_MODE === true) {
    $categories = BoincCategory::enum("true order by orderID");
} else {
    echo "<p>" . tra("If you have a question or problem, please use the %1Questions & Answers%2 section of the message boards.", "<a href=\"forum_help_desk.php\">", "</a>") . "</p>";
    $categories = BoincCategory::enum("is_helpdesk=0 order by orderID");
}
$first = true;
foreach ($categories as $category) {
    if ($first) {
        $first = false;
        echo "<p>";
        show_forum_title($category, NULL, NULL);
        echo "<p>";
        show_mark_as_read_button($user);
        start_forum_table(array(tra("Topic"), tra("Threads"), tra("Posts"), tra("Last post")));
    }
    if (strlen($category->name)) {
        echo '
            <tr class="subtitle">
            <td class="category" colspan="4">' . $category->name . '</td>
Exemplo n.º 2
0
require_once '../inc/forum.inc';
check_get_args(array("forumid"));
page_head(tra("Forum search"));
start_table();
echo "<form action=\"forum_search_action.php\" method=\"post\">";
row1(tra("Search query"));
row2(tra("Search for keywords:") . "<br />\n    <span class=\"smalltext\">" . tra("Posts that contain all the specified words will be displayed") . "</span>", "<input type=\"text\" style=\"width: 290px\" name=\"search_keywords\" size=\"30\" /><br />\n    <span class=\"smalltext\">" . tra("For example: \"screensaver freeze\"") . "</span>");
row2(tra("Search for author ID:") . "<br />\n    <span class=\"smalltext\">" . tra("Only posts by this author will be displayed") . "</span>", "<input type=\"text\" style=\"width: 150px\" name=\"search_author\" size=\"10\" /><br />\n    <span class=\"smalltext\">" . tra("For example: \"43214\"") . "</span>");
row1(tra("Search options"));
row2(tra("Search limits") . "<br />\n    <span class=\"smalltext\">" . tra("Search at most this many days back in time") . "</span>", "<select name=\"search_max_time\">\n    <option value=\"1\">" . tra("1 day") . "</option>\n    <option value=\"3\">" . tra("%1 days", "3") . "</option>\n    <option value=\"7\">" . tra("%1 days", "7") . "</option>\n    <option value=\"15\">" . tra("%1 days", "15") . "</option>\n    <option value=\"30\" selected>" . tra("%1 days", "30") . "</option>\n    <option value=\"90\">" . tra("%1 months", "3") . "</option>\n    <option value=\"180\">" . tra("%1 months", "6") . "</option>\n    <option value=\"365\">" . tra("1 year") . "</option>\n    <option value=\"0\">" . tra("no limit") . "</option>\n    </select>");
$forumid = null;
if (get_str("forumid", true)) {
    $forumid = get_str("forumid");
}
$forumlist = "<option value=\"-1\">" . tra("All") . "</option>";
$categories = BoincCategory::enum();
foreach ($categories as $category) {
    $forums = BoincForum::enum("parent_type=0 and category={$category->id}");
    foreach ($forums as $forum) {
        if ($forum->id == $forumid) {
            $forumlist .= "<option selected value=\"" . $forum->id . "\">" . $forum->title . "</option>";
        } else {
            $forumlist .= "<option value=\"" . $forum->id . "\">" . $forum->title . "</option>";
        }
    }
}
row2(tra("Forum") . "<br />\n    <span class=\"smalltext\">" . tra("Only display posts from this forum") . "</span>", '<select name="search_forum">' . $forumlist . '</select');
$sortlist = null;
foreach ($thread_sort_styles as $id => $style) {
    if ($id == CREATE_TIME_NEW) {
        $sortlist .= "<option selected value=\"" . $id . "\">" . $style . "</option>";