本文整理汇总了PHP中user_links函数的典型用法代码示例。如果您正苦于以下问题:PHP user_links函数的具体用法?PHP user_links怎么用?PHP user_links使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了user_links函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: show_admin
function show_admin($user, $admin)
{
$admin_user = BoincUser::lookup_id($admin->userid);
$tokens = url_tokens($user->authenticator);
$date = date_str($admin->create_time);
echo "<tr>\n <td>" . user_links($admin_user) . "</td>\n <td>{$date}</td>\n <td>\n ";
show_button("team_admins.php?teamid={$admin->teamid}&action=remove&userid={$admin_user->id}" . $tokens, tra("Remove"), tra("Remove Team Admin status from this member"));
echo "</td></tr>\n ";
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:9,代码来源:team_admins.php
示例2: show_user
function show_user($user)
{
echo "\n <tr class=row1>\n <td>", user_links($user), " (ID {$user->id})</td>\n ";
if ($user->teamid) {
$team = BoincTeam::lookup_id($user->teamid);
echo "\n <td> <a href=team_display.php?teamid={$team->id}>{$team->name}</a> </td>\n ";
} else {
echo "<td><br></td>";
}
echo "\n <td align=right>", format_credit($user->expavg_credit), "</td>\n <td align=right>", format_credit_large($user->total_credit), "</td>\n <td>", $user->country, "</td>\n <td>", time_str($user->create_time), "</td>\n </tr>\n ";
}
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:11,代码来源:user_search.php
示例3: show_delta
function show_delta($delta)
{
global $xml;
$user = BoincUser::lookup_id($delta->userid);
$when = time_str($delta->timestamp);
$what = $delta->joining ? "joined" : "quit";
if ($xml) {
echo " <action>\n <id>{$user->id}</id>\n <name>{$user->name}</name>\n <action>{$what}</action>\n <total_credit>{$delta->total_credit}</total_credit>\n <when>{$when}</when>\n </action>\n";
} else {
echo "<tr>\n <td>{$when}</td>\n <td>", user_links($user), " (ID {$user->id})</td>\n <td>{$what}</td>\n <td>{$delta->total_credit}</td>\n </tr>\n ";
}
}
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:12,代码来源:team_delta.php
示例4: show_user_row
function show_user_row($user, $i)
{
echo '
<tr class="row1">
<td>$i</td>
<td>' . user_links($user) . '</td>
<td class="right">' . format_credit_large($user->expavg_credit) . '</td>
<td class="right">' . format_credit_large($user->total_credit) . '</td>
<td>' . $user->country . '</td>
<td>' . time_str($user->create_time) . '</td>
</tr>
';
}
开发者ID:Turante,项目名称:boincweb,代码行数:13,代码来源:top_users.php
示例5: show_row
function show_row($item, $apps, $is_team, $i)
{
$j = $i % 2;
if ($is_team) {
$team = BoincTeam::lookup_id($item->teamid);
if (!$team) {
return;
}
$x = "<td>" . team_links($team) . "</td>\n";
} else {
$user = BoincUser::lookup_id($item->userid);
if (!$user) {
return;
}
$x = "<td>" . user_links($user, BADGE_HEIGHT_MEDIUM) . "</td>\n";
}
echo "<tr class=row{$j}>";
echo "<td>{$i}</td>\n";
echo $x;
foreach ($apps as $app) {
if ($app->id == $item->appid) {
$c = $item;
} else {
if ($is_team) {
$c = BoincCreditTeam::lookup("teamid={$item->teamid} and appid={$app->id}");
} else {
$c = BoincCreditUser::lookup("userid={$item->userid} and appid={$app->id}");
}
if (!$c) {
$c = new StdClass();
$c->expavg = 0;
$c->total = 0;
}
}
echo "<td align=right>" . format_credit($c->expavg) . "</td><td align=right>" . format_credit_large($c->total) . "</td>\n";
}
echo "</tr>\n";
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:38,代码来源:per_app_list.php
示例6: do_read
function do_read($logged_in_user)
{
$id = get_int("id");
$message = BoincPrivateMessage::lookup_id($id);
if (!$message || $message->userid != $logged_in_user->id) {
error_page(tra("no such message"));
}
page_head(tra("Private messages") . " : " . $message->subject);
pm_header();
$sender = BoincUser::lookup_id($message->senderid);
start_table();
echo "<tr><th>" . tra("Subject") . "</th><td>" . $message->subject . "</td></tr>";
echo "<tr><th>" . tra("Sender") . "</th><td>" . user_links($sender, BADGE_HEIGHT_SMALL);
show_block_link($message->senderid);
echo "</td></tr>";
echo "<tr><th>" . tra("Date") . "</th><td>" . time_str($message->date) . "</td></tr>";
echo "<tr><th>" . tra("Message") . "</th><td>" . output_transform($message->content, $options) . "</td></tr>";
echo "<tr><td class=\"pm_footer\"></td><td>\n";
echo "<a href=\"pm.php?action=new&replyto={$id}\">" . tra("Reply") . "</a>\n";
echo " · <a href=\"pm.php?action=delete&id={$id}\">" . tra("Delete") . "</a>\n";
echo " · <a href=\"pm.php?action=inbox\">" . tra("Inbox") . "</a>\n";
end_table();
if ($message->opened == 0) {
$message->update("opened=1");
}
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:26,代码来源:pm.php
示例7: error_page
if (!$team) {
error_page("no such team");
}
require_admin($logged_in_user, $team);
page_head(tra("Remove members from %1", $team->name));
echo "\n <form method=\"post\" action=\"team_remove_inactive_action.php\">\n <input type=\"hidden\" name=\"id\" value=\"" . $team->id . "\">\n";
start_table();
echo "<tr>\n <th>" . tra("Remove?") . "</th>\n <th>" . tra("Name (ID)") . "</th>\n <th>" . tra("Total credit") . "</th>\n <th>" . tra("Recent average credit") . "</th>\n </tr>\n";
$users = BoincUser::enum("teamid={$team->id}");
$ninactive_users = 0;
foreach ($users as $user) {
if ($user->id == $logged_in_user->id) {
continue;
}
if ($user->id == $team->userid) {
continue;
}
$user_total_credit = format_credit($user->total_credit);
$user_expavg_credit = format_credit($user->expavg_credit);
echo "\n <tr>\n <td align=center><input type=checkbox name=remove_{$ninactive_users} value={$user->id}>\n <td>" . user_links($user) . " ({$user->id})</td>\n <td>{$user_total_credit}</td>\n <td>{$user_expavg_credit}</td>\n </tr>\n ";
$ninactive_users++;
}
end_table();
if ($ninactive_users == 0) {
echo "<p>" . tra("No members are eligible for removal.") . "</p>";
} else {
echo "<input type=hidden name=ninactive_users value={$ninactive_users}>";
echo "<input type=submit value=\"" . tra("Remove users") . "\">";
}
echo "</form>";
page_tail();
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:31,代码来源:team_remove_inactive_form.php
示例8: get_int
$plain = get_int("plain", true);
$team = BoincTeam::lookup_id($teamid);
if (!$team) {
error_page(tra("no such team"));
}
require_founder_login($user, $team);
if ($plain) {
header("Content-type: text/plain");
} else {
page_head(tra("%1 Email List", $team->name));
start_table();
table_header(array(tra("Member list of %1", $team->name), "colspan=\"6\""));
table_header(tra("Name"), tra("Email address"), tra("Total credit"), tra("Recent average credit"), tra("Country"));
}
$users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid={$team->id}");
foreach ($users as $user) {
if ($plain) {
$e = $user->send_email ? "<{$user->email_addr}>" : "";
echo "{$user->name} {$e}\n";
} else {
$e = $user->send_email ? "{$user->email_addr}" : "";
table_row(user_links($user, BADGE_HEIGHT_MEDIUM), $e, format_credit($user->total_credit), format_credit($user->expavg_credit), $user->country);
}
}
if (!$plain) {
end_table();
echo "<p><a href=\"team_email_list.php?teamid=" . $teamid . "&plain=1\">" . tra("Show as plain text") . "</a></p>";
page_tail();
}
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
开发者ID:brevilo,项目名称:boinc,代码行数:31,代码来源:team_email_list.php
示例9: time
$team = BoincTeam::lookup_id($user->teamid);
$now = time();
if ($user->id == $team->ping_user && transfer_ok($team, $now)) {
page_head(tra("Assumed foundership of %1", $team->name));
$team->update("userid={$user->id}, ping_user=0, ping_time=0");
echo tra("Congratulations, you are now the founder of team %1. Go to %2Your Account page%3 to find the Team Admin options.", $team->name, "<a href=\"" . URL_BASE . "home.php\">", "</a>");
} else {
error_page(tra("Foundership request not allowed now"));
}
break;
case "decline":
$teamid = post_int("teamid");
$team = BoincTeam::lookup_id($teamid);
require_founder_login($user, $team);
page_head(tra("Decline founder change request"));
if ($team->ping_user) {
$ping_user = BoincUser::lookup_id($team->ping_user);
$team->update("ping_user=0");
send_founder_transfer_decline_email($team, $ping_user);
echo "<p>" . tra("The foundership request from %1 has been declined.", user_links($ping_user)) . "</p>";
} else {
echo "<p>" . tra("There were no foundership requests.") . "</p>";
}
break;
default:
error_page(tra("undefined action %1", $action));
}
echo "<a href='team_display.php?teamid={$team->id}'>" . tra("Return to team page") . "</a>";
page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:31,代码来源:team_founder_transfer_action.php
示例10: handle_query
function handle_query($user)
{
$target_userid = get_int('target_userid', true);
if ($target_user && $target_userid != $user->id) {
$target_user = BoincUser::lookup_id($target_userid);
page_head(tra("Please log in as %1", $target_user->name));
echo tra("You must log in as %1 to view this friend request", $target_user->name);
page_tail();
exit;
}
$srcid = get_int('userid');
$srcuser = BoincUser::lookup_id($srcid);
if (!$srcuser) {
error_page("No such user");
}
$friend = BoincFriend::lookup($srcid, $user->id);
if (!$friend) {
error_page("Request not found");
}
page_head(tra("Friend request"));
echo time_str($friend->create_time) . "<p>\n";
$x = user_links($srcuser, true);
echo tra("%1 has requested friendship with you.", $x);
if (strlen($friend->message)) {
echo "<p>" . tra("%1 says: %2", $srcuser->name, $friend->message) . "</p>";
}
echo "<p>";
show_button("friend.php?action=accept&userid=" . $srcid, tra("Accept friendship"), tra("Click accept if %1 is in fact a friend", $srcuser->name));
show_button("friend.php?action=ignore&userid=" . $srcid, tra("Decline"), tra("Click decline if %1 is not a friend", $srcuser->name));
echo " <p>\n ";
page_tail();
}
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:32,代码来源:friend.php
示例11: select_profile
if ($option) {
select_profile($option);
exit;
}
page_head(tra("Profiles"));
echo "\n <p>" . tra("%1Profiles%2 let individuals share backgrounds and opinions with the %3 community.", "<b>", "</b>", PROJECT) . " " . tra("Explore the diversity of your fellow volunteers, and contribute your own views for others to enjoy.") . "\n <p>" . tra("If you haven't already, you can %1create your own user profile%2 for others to see!", "<a href=\"create_profile.php\">", "</a>");
start_table_noborder();
$today = getdate(time());
$UOTD_heading = tra("User of the Day") . " -- " . $today['month'] . " " . $today['mday'] . ", " . $today['year'];
row1($UOTD_heading);
echo "<tr><td>";
$profile = get_current_uotd();
if ($profile) {
$user = BoincUser::lookup_id($profile->userid);
echo uotd_thumbnail($profile, $user);
echo user_links($user) . "<br>";
$resp = output_transform($profile->response1);
$resp = sanitize_tags($resp);
echo sub_sentence($resp, ' ', 150, true);
}
echo "</td></tr>";
row1(tra("User Profile Explorer"));
echo "<tr><td>\n <ul>\n <li>" . tra("View the %1User Picture Gallery%2.", "<a href=\"" . URL_BASE . "user_profile/user_gallery_1.html\">", "</a>") . "</li>\n <li>" . tra("Browse profiles %1by country%2.", "<a href=\"" . URL_BASE . "user_profile/profile_country.html\">", "</a>") . "</li>\n <li>" . tra("Browse profiles %1at random%2, %3at random with pictures%2, or %4at random without pictures%2.", "<a href=\"?cmd=rand&pic=-1\">", "</a>", "<a href=\"?cmd=rand&pic=1\">", "<a href=\"?cmd=rand&pic=0\">") . "</li>\n";
if (file_exists(PROFILE_PATH . "profile_alpha.html")) {
echo "<li>" . tra("Alphabetical profile listings:") . "<br>";
include PROFILE_PATH . "profile_alpha.html";
}
echo "</ul></td></tr>";
row1(tra("Search profile text"));
rowify("\n <form action=\"profile_search_action.php\" method=\"GET\">\n <input type=\"text\" name=\"search_string\">\n <input type=\"submit\" value=\"" . tra("Search") . "\">\n </form>\n");
end_table();
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:31,代码来源:profile_menu.php
示例12: intval
$forum_display_wrap_postcount = intval($user->prefs->display_wrap_postcount);
row1(tra("Message display"));
row2(tra("What to display"), "<input type=\"checkbox\" name=\"forum_hide_avatars\" " . $forum_hide_avatars . "> " . tra("Hide avatar images") . "<br>\n <input type=\"checkbox\" name=\"forum_hide_signatures\" " . $forum_hide_signatures . "> " . tra("Hide signatures") . "<br>\n <input type=\"checkbox\" name=\"forum_images_as_links\" " . $forum_image_as_link . "> " . tra("Show images as links") . "<br>\n <input type=\"checkbox\" name=\"forum_link_popup\" " . $forum_link_popup . "> " . tra("Open links in new window/tab") . "<br>\n <input type=\"checkbox\" name=\"forum_highlight_special\" " . $forum_highlight_special . "> " . tra("Highlight special users") . "<br>\n <input type=\"text\" name=\"forum_display_wrap_postcount\" size=3 value=\"" . $forum_display_wrap_postcount . "\"> " . tra("Display this many messages per page") . "<br />\n ");
row2(tra("How to sort"), tra("Threads:") . " " . select_from_array("forum_sort", $forum_sort_styles, $user->prefs->forum_sorting) . "<br>" . tra("Posts:") . " " . select_from_array("thread_sort", $thread_sort_styles, $user->prefs->thread_sorting) . "<br>\n <input type=\"checkbox\" name=\"forum_jump_to_unread\" " . $forum_jump_to_unread . "> " . tra("Jump to first new post in thread automatically") . "<br>\n <input type=\"checkbox\" name=\"forum_ignore_sticky_posts\" " . $forum_ignore_sticky_posts . ">" . tra("Don't move sticky posts to top") . "<br>\n ");
}
// DISABLE_FORUMS
// ------------ Message filtering -----------
row1(tra("Message filtering"));
$filtered_userlist = get_ignored_list($user);
$forum_filtered_userlist = "";
for ($i = 0; $i < sizeof($filtered_userlist); $i++) {
$id = (int) $filtered_userlist[$i];
if ($id) {
$filtered_user = BoincUser::lookup_id($id);
if (!$filtered_user) {
echo "Missing user {$id}";
continue;
}
$forum_filtered_userlist .= "<input class=\"btn btn-default\" type=\"submit\" name=\"remove" . $filtered_user->id . "\" value=\"" . tra("Remove") . "\"> " . $filtered_user->id . " - " . user_links($filtered_user) . "<br>";
}
}
row2(tra("Filtered users") . "<br><p class=\"text-muted\">" . tra("Ignore message board posts and private messages from these users.") . "</p>", "{$forum_filtered_userlist}\n <input type=\"text\" name=\"forum_filter_user\" size=12> " . tra("User ID (For instance: 123456789)") . "\n <br><input class=\"btn btn-default\" type=\"submit\" name=\"add_user_to_filter\" value=\"" . tra("Add user to filter") . "\">\n ");
row1(tra("Update"));
row2(tra("Click here to update preferences"), "<input class=\"btn btn-primary\" type=submit value=\"" . tra("Update") . "\">");
echo "</form>\n";
row1(tra("Reset"));
row2(tra("Or click here to reset preferences to the defaults"), "<form method=\"post\" action=\"edit_forum_preferences_action.php\"><input class=\"btn btn-warning\" type=\"submit\" value=\"" . tra("Reset") . "\"><input type=\"hidden\" name=\"action\" value=\"reset_confirm\"></form>");
end_table();
page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
开发者ID:aggroskater,项目名称:boinc,代码行数:31,代码来源:edit_forum_preferences_form.php
示例13: page_tail
page_tail();
exit;
}
if ($user->id == $team->ping_user) {
echo "<p>" . tra("You requested the foundership of %1 on %2.", $team->name, date_str($team->ping_time)) . "\n </p>";
if (transfer_ok($team, $now)) {
echo tra("60 days have elapsed since your request, and the founder has not responded. You may now assume foundership by clicking here:") . "<form method=\"post\" action=\"team_founder_transfer_action.php\">\n <input type=\"hidden\" name=\"action\" value=\"finalize_transfer\">\n <input class=\"btn btn-default\" type=\"submit\" value=\"" . tra("Assume foundership") . "\">\n </form>\n ";
} else {
echo "<p>" . tra("The founder was notified of your request. If he/she does not respond by %1 you will be given an option to become founder.", date_str(transfer_ok_time($team))) . "</p>";
}
} else {
if (new_transfer_request_ok($team, $now)) {
echo "<form method=\"post\" action=\"team_founder_transfer_action.php\">";
echo "<p>" . tra("If the team founder is not active and you want to assume the role of founder, click the button below. The current founder will be sent an email detailing your request, and will be able to transfer foundership to you or to decline your request. If the founder does not respond in 60 days, you will be allowed to become the founder.<br /><br />\n Are you sure you want to request foundership?") . "</p>";
echo "<input type=\"hidden\" name=\"action\" value=\"initiate_transfer\">\n <input class=\"btn btn-default\" type=\"submit\" value=\"" . tra("Request foundership") . "\">\n </form>\n ";
} else {
if ($team->ping_user) {
if ($team->ping_user < 0) {
$team->ping_user = -$team->ping_user;
}
$ping_user = BoincUser::lookup_id($team->ping_user);
echo "<p>" . tra("Founder change has already been requested by %1 on %2.", user_links($ping_user), date_str($team->ping_time)) . "</p>";
} else {
echo "<p>" . tra("A foundership change was requested during the last 90 days, so new requests are not allowed. Please try again later.") . "</p>";
}
}
}
echo "<p><a href=\"team_display.php?teamid=" . $team->id . "\">" . tra("Return to team page") . "</a>";
page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:team_founder_transfer_form.php
示例14: show_user_row
function show_user_row($user, $i)
{
$j = $i % 2;
echo "\n <tr class=row{$j}>\n <td>{$i}</td>\n <td>", user_links($user, BADGE_HEIGHT_MEDIUM), "</td>\n <td align=right>", format_credit_large($user->expavg_credit), "</td>\n <td align=right>", format_credit_large($user->total_credit), "</td>\n <td>", $user->country, "</td>\n <td>", time_str($user->create_time), "</td>\n </tr>\n ";
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:5,代码来源:top_users.php
示例15: select_profile
if ($option) {
select_profile($option);
exit;
}
page_head(tra("Profiles"));
echo "\n <p>" . tra("%1Profiles%2 let individuals share backgrounds and opinions with the %3 community.", "<b>", "</b>", PROJECT) . " " . tra("Explore the diversity of your fellow volunteers, and contribute your own views for others to enjoy.") . "\n <p>" . tra("If you haven't already, you can %1create your own user profile%2 for others to see!", "<a href=\"create_profile.php\">", "</a>");
start_table_noborder();
$today = getdate(time());
$UOTD_heading = tra("User of the Day") . " -- " . $today['month'] . " " . $today['mday'] . ", " . $today['year'];
row1($UOTD_heading);
echo "<tr><td>";
$profile = get_current_uotd();
if ($profile) {
$user = BoincUser::lookup_id($profile->userid);
echo uotd_thumbnail($profile, $user);
echo user_links($user, BADGE_HEIGHT_MEDIUM) . "<br>";
$resp = output_transform($profile->response1);
$resp = sanitize_tags($resp);
echo sub_sentence($resp, ' ', 150, true);
}
echo "</td></tr>";
row1(tra("User Profile Explorer"));
echo "<tr><td>\n <ul>\n <li>" . tra("View the %1User Picture Gallery%2.", "<a href=\"" . url_base() . "user_profile/user_gallery_1.html\">", "</a>") . "</li>\n <li>" . tra("Browse profiles %1by country%2.", "<a href=\"" . url_base() . "user_profile/profile_country.html\">", "</a>") . "</li>\n <li>" . tra("Browse profiles %1at random%2, %3at random with pictures%2, or %4at random without pictures%2.", "<a href=\"?cmd=rand&pic=-1\">", "</a>", "<a href=\"?cmd=rand&pic=1\">", "<a href=\"?cmd=rand&pic=0\">") . "</li>\n";
if (file_exists(PROFILE_PATH . "profile_alpha.html")) {
echo "<li>" . tra("Alphabetical profile listings:") . "<br>";
include PROFILE_PATH . "profile_alpha.html";
}
echo "</ul></td></tr>";
row1(tra("Search profile text"));
rowify("\n <form action=\"profile_search_action.php\" method=\"GET\">\n <input type=\"text\" name=\"search_string\">\n <input class=\"btn btn-default\" type=\"submit\" value=\"" . tra("Search") . "\">\n </form>\n");
end_table();
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:profile_menu.php
示例16: intval
}
$forum_minimum_wrap_postcount = intval($user->prefs->minimum_wrap_postcount);
$forum_display_wrap_postcount = intval($user->prefs->display_wrap_postcount);
row1("Message display");
row2("What to display", "<input type=\"checkbox\" name=\"forum_hide_avatars\" " . $forum_hide_avatars . "> Hide avatar images<br>\r\n\t<input type=\"checkbox\" name=\"forum_hide_signatures\" " . $forum_hide_signatures . "> Hide signatures<br>\r\n\t<input type=\"checkbox\" name=\"forum_images_as_links\" " . $forum_image_as_link . "> Show images as links<br>\r\n\t<input type=\"checkbox\" name=\"forum_link_popup\" " . $forum_link_popup . "> Open links in new window/tab<br>\r\n\t<input type=\"checkbox\" name=\"forum_highlight_special\" " . $forum_highlight_special . "> Highlight special users<br>\r\n\t");
row2("How to sort", "Threads: " . select_from_array("forum_sort", $forum_sort_styles, $user->prefs->forum_sorting) . "<br>Posts: " . select_from_array("thread_sort", $thread_sort_styles, $user->prefs->thread_sorting) . "<br>\r\n\t<input type=\"checkbox\" name=\"forum_jump_to_unread\" " . $forum_jump_to_unread . "> Jump to first new post in thread automatically<br>\r\n\t<input type=\"checkbox\" name=\"forum_ignore_sticky_posts\" " . $forum_ignore_sticky_posts . ">Do not reorder sticky posts<br>\r\n\t<input type=\"text\" name=\"forum_minimum_wrap_postcount\" size=3 value=\"" . $forum_minimum_wrap_postcount . "\"> If a thread contains more than this number of posts<br />\r\n\t<input type=\"text\" name=\"forum_display_wrap_postcount\" size=3 value=\"" . $forum_display_wrap_postcount . "\"> only display the first one and this many of the last ones<br />\r\n\t");
// ------------ Message filtering -----------
row1("Message filtering");
$filtered_userlist = get_ignored_list($user);
$forum_filtered_userlist = "";
for ($i = 0; $i < sizeof($filtered_userlist); $i++) {
$id = (int) $filtered_userlist[$i];
if ($id) {
$filtered_user = BoincUser::lookup_id($id);
if (!$filtered_user) {
echo "Missing user {$id}";
continue;
}
$forum_filtered_userlist .= "<input type =\"submit\" name=\"remove" . $filtered_user->id . "\" value=\"Remove\"> " . $filtered_user->id . " - " . user_links($filtered_user) . "<br>";
}
}
row2("Filtered users" . "<br><span class=note>Ignore message board posts and private messages from these users.</span>", "{$forum_filtered_userlist}\r\n\t<br>\r\n\t\t<input type=\"text\" name=\"forum_filter_user\" size=12> User ID (For instance: 123456789)\r\n\t\t<br><input type=\"submit\" name=\"add_user_to_filter\" value=\"Add user to filter\">\r\n\t");
row1("Update");
row2("Click here to update message board preferences", "<input type=submit value=\"Update\">");
echo "</form>\n";
row1("Reset");
row2("Or click here to reset preferences to the defaults", "<form method=\"post\" action=\"edit_forum_preferences_action.php\"><input type=\"submit\" value=\"Reset\"><input type=\"hidden\" name=\"action\" value=\"reset_confirm\"></form>");
end_table();
page_tail();
$cvs_version_tracker[] = "\$Id: edit_forum_preferences_form.php 17418 2009-03-01 23:32:15Z davea \$";
//Generated automatically - do not edit
开发者ID:Turante,项目名称:boincweb,代码行数:31,代码来源:edit_forum_preferences_form.php
示例17: show_forum
function show_forum($forum, $start, $sort_style, $user)
{
$page_nav = page_links("forum_forum.php?id={$forum->id}&sort={$sort_style}", $forum->threads, THREADS_PER_PAGE, $start);
echo $page_nav;
start_forum_table(array("", tra("Threads"), tra("Posts"), tra("Author"), tra("Views"), "<nobr>" . tra("Last post") . "</nobr>"));
$sticky_first = !$user || !$user->prefs->ignore_sticky_posts;
// Show hidden threads if logged in user is a moderator
//
$show_hidden = is_moderator($user, $forum);
$threads = get_forum_threads($forum->id, $start, THREADS_PER_PAGE, $sort_style, $show_hidden, $sticky_first);
if ($user) {
$subs = BoincSubscription::enum("userid={$user->id}");
}
// Run through the list of threads, displaying each of them
//
$n = 0;
$i = 0;
foreach ($threads as $thread) {
$owner = BoincUser::lookup_id($thread->owner);
if (!$owner) {
continue;
}
$unread = thread_is_unread($user, $thread);
//if ($thread->status==1){
// This is an answered helpdesk thread
if ($user && is_subscribed($thread, $subs)) {
echo '<tr class="row_hd' . $n . '">';
} else {
// Just a standard thread.
echo '<tr class="row' . $n . '">';
}
echo "<td width=\"1%\" class=\"threadicon\"><nobr>";
if ($thread->hidden) {
show_image(IMAGE_HIDDEN, tra("This thread is hidden"), tra("hidden"));
} else {
if ($unread) {
if ($thread->sticky) {
if ($thread->locked) {
show_image(NEW_IMAGE_STICKY_LOCKED, tra("This thread is sticky and locked, and you haven't read it yet"), tra("sticky/locked/unread"));
} else {
show_image(NEW_IMAGE_STICKY, tra("This thread is sticky and you haven't read it yet"), tra("sticky/unread"));
}
} else {
if ($thread->locked) {
show_image(NEW_IMAGE_LOCKED, tra("You haven't read this thread yet, and it's locked"), tra("unread/locked"));
} else {
show_image(NEW_IMAGE, tra("You haven't read this thread yet"), tra("unread"));
}
}
} else {
if ($thread->sticky) {
if ($thread->locked) {
show_image(IMAGE_STICKY_LOCKED, tra("This thread is sticky and locked"), tra("sticky/locked"));
} else {
show_image(IMAGE_STICKY, tra("This thread is sticky"), tra("sticky"));
}
} else {
if ($thread->locked) {
show_image(IMAGE_LOCKED, tra("This thread is locked"), tra("locked"));
} else {
show_image(IMAGE_POST, tra("You read this thread"), tra("read"));
}
}
}
}
echo "</nobr></td>";
$title = cleanup_title($thread->title);
//$titlelength = 9999;
//if (strlen($title) > $titlelength) {
// $title = substr($title, 0, $titlelength)."...";
//}
echo "<td class=\"threadline\"><a href=\"forum_thread.php?id={$thread->id}\"><b>{$title}</b></a><br></td>";
$n = ($n + 1) % 2;
echo '
<td class="numbers">' . ($thread->replies + 1) . '</td>
<td>' . user_links($owner, BADGE_HEIGHT_SMALL) . '</td>
<td class="numbers">' . $thread->views . '</td>
<td class="lastpost">' . time_diff_str($thread->timestamp, time()) . '</td>
</tr>
';
flush();
}
end_table();
echo "<br>{$page_nav}";
// show page links
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:86,代码来源:forum_forum.php
示例18: get_int
$plain = get_int("plain", true);
$team = BoincTeam::lookup_id($teamid);
if (!$team) {
error_page(tra("no such team"));
}
require_founder_login($user, $team);
if ($plain) {
header("Content-type: text/plain");
} else {
page_head(tra("%1 Email List", $team->name));
start_table();
table_header(array(tra("Member list of %1", $team->name), "colspan=\"6\""));
table_header(tra("Name"), tra("Email address"), tra("Total credit"), tra("Recent average credit"), tra("Country"));
}
$users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid={$team->id}");
foreach ($users as $user) {
if ($plain) {
$e = $user->send_email ? "<{$user->email_addr}>" : "";
echo "{$user->name} {$e}\n";
} else {
$e = $user->send_email ? "{$user->email_addr}" : "";
table_row(user_links($user), $e, format_credit($user->total_credit), format_credit($user->expavg_credit), $user->country);
}
}
if (!$plain) {
end_table();
echo "<p><a href=\"team_email_list.php?teamid=" . $teamid . "&plain=1\">" . tra("Show as plain text") . "</a></p>";
page_tail();
}
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:31,代码来源:team_email_list.php
示例19: error_page
$team = BoincTeam::lookup_id($teamid);
if (!$team) {
error_page(tra("no such team"));
}
require_founder_login($user, $team);
page_head(tra("Change founder of %1", $team->name));
if ($team->ping_user != 0) {
if ($team->ping_user < 0) {
$ping_user = BoincUser::lookup_id(-$team->ping_user);
$x = date_str($team->ping_time);
echo "<p>" . tra("Team member %1 requested this team's foundership on %2, but left the team, thus canceling the request.", user_links($ping_user), $x) . "</p>";
$team->update("ping_user=0, ping_time=0");
} else {
$ping_user = BoincUser::lookup_id($team->ping_user);
$x = date_str(transfer_ok_time($team));
echo "<p>" . tra("Team member %1 has requested this team's founde
|
请发表评论