set_title("Login"); $page->set_heading("Login"); $page->add_block(new NavBlock()); $page->add_block(new Block( "Login There", "There should be a login box to the left" )); } public function display_user_list(Page $page, $table, $paginator) { $page->set_title("User List"); $page->set_heading("User List"); $page->add_block(new NavBlock()); $page->add_block(new Block("Users", $table . $paginator)); } public function display_user_links(Page $page, User $user, $parts) { # $page->add_block(new Block("User Links", join(", ", $parts), "main", 10)); } public function display_user_block(Page $page, User $user, $parts) { $h_name = html_escape($user->name); $html = 'Logged in as '.$h_name; foreach ($parts as $part) { $html .= '
'.$part["name"].''; } $page->add_block(new Block("User Links", $html, "left", 90)); } public function display_signup_page(Page $page) { global $config; $tac = $config->get_string("login_tac", ""); if ($config->get_bool("login_tac_bbcode")) { $tfe = new TextFormattingEvent($tac); send_event($tfe); $tac = $tfe->formatted; } if (empty($tac)) { $html = ""; } else { $html = '

'.$tac.'

'; } $h_reca = "".captcha_get_html().""; $html .= ' '.make_form(make_link("user_admin/create"))." $h_reca
Name
Password
Repeat Password
Email (Optional)
"; $page->set_title("Create Account"); $page->set_heading("Create Account"); $page->add_block(new NavBlock()); $page->add_block(new Block("Signup", $html)); } public function display_signups_disabled(Page $page) { $page->set_title("Signups Disabled"); $page->set_heading("Signups Disabled"); $page->add_block(new NavBlock()); $page->add_block(new Block( "Signups Disabled", "The board admin has disabled the ability to create new accounts~" )); } public function display_login_block(Page $page) { global $config, $user; $html = ' '.make_form(make_link("user_admin/login"))."
"; if ($config->get_bool("login_signup_enabled") && $user->can(Permissions::CREATE_USER)) { $html .= "Create Account"; } $page->add_block(new Block("Login", $html, "left", 90)); } public function display_ip_list(Page $page, array $uploads, array $comments, array $events) { $html = ""; $html .= ""; $html .= "
Uploaded from: "; $n = 0; foreach ($uploads as $ip => $count) { $html .= '
'.$ip.' ('.$count.')'; if (++$n >= 20) { $html .= "
..."; break; } } $html .= "
Commented from:"; $n = 0; foreach ($comments as $ip => $count) { $html .= '
'.$ip.' ('.$count.')'; if (++$n >= 20) { $html .= "
..."; break; } } $html .= "
Logged Events:"; $n = 0; foreach ($events as $ip => $count) { $html .= '
'.$ip.' ('.$count.')'; if (++$n >= 20) { $html .= "
..."; break; } } $html .= "
(Most recent at top)
"; $page->add_block(new Block("IPs", $html, "main", 70)); } public function display_user_page(User $duser, $stats) { global $page; assert(is_array($stats)); $stats[] = 'User ID: '.$duser->id; $page->set_title(html_escape($duser->name)."'s Page"); $page->set_heading(html_escape($duser->name)."'s Page"); $page->add_block(new NavBlock()); $page->add_block(new Block("Stats", join("
", $stats), "main", 10)); } public function build_options(User $duser, UserOptionsBuildingEvent $event) { global $config, $user; $html = ""; if ($duser->id != $config->get_int('anon_id')) { //justa fool-admin protection so they dont mess around with anon users. if ($user->can(Permissions::EDIT_USER_NAME)) { $html .= "

".make_form(make_link("user_admin/change_name"))."
Change Name
New name

"; } $html .= "

".make_form(make_link("user_admin/change_pass"))."
Change Password
Password
Repeat Password

".make_form(make_link("user_admin/change_email"))."
Change Email
Address

"; $i_user_id = int_escape($duser->id); if ($user->can(Permissions::EDIT_USER_CLASS)) { global $_shm_user_classes; $class_html = ""; foreach ($_shm_user_classes as $name => $values) { $h_name = html_escape($name); $h_title = html_escape(ucwords($name)); $h_selected = ($name == $duser->class->name ? " selected" : ""); $class_html .= "\n"; } $html .= "

".make_form(make_link("user_admin/change_class"))."
Change Class

"; } if ($user->can(Permissions::DELETE_USER)) { $html .= "

".make_form(make_link("user_admin/delete_user"))."
Delete User
Delete images
Delete comments

"; } foreach ($event->parts as $part) { $html .= $part; } } return $html; } public function get_help_html() { global $user; $output = '

Search for images posted by particular individuals.

poster=username

Returns images posted by "username".

poster_id=123

Returns images posted by user 123.

'; if ($user->can(Permissions::VIEW_IP)) { $output .="
poster_ip=127.0.0.1

Returns images posted from IP 127.0.0.1.

"; } return $output; } }