Zeile 87 | Zeile 87 |
---|
$page->output_nav_tabs($sub_tabs, 'prune_spam_logs');
// Fetch filter options
|
$page->output_nav_tabs($sub_tabs, 'prune_spam_logs');
// Fetch filter options
|
$sortbysel[$mybb->input['sortby']] = 'selected="selected"'; $ordersel[$mybb->input['order']] = 'selected="selected"';
| $sortbysel[$mybb->get_input('sortby')] = 'selected="selected"'; $ordersel[$mybb->get_input('order')] = 'selected="selected"';
|
$form = new Form("index.php?module=tools-spamlog&action=prune", "post"); $form_container = new FormContainer($lang->prune_spam_logs);
|
$form = new Form("index.php?module=tools-spamlog&action=prune", "post"); $form_container = new FormContainer($lang->prune_spam_logs);
|
$form_container->output_row($lang->spam_username, "", $form->generate_text_box('filter_username', $mybb->input['filter_username'], array('id' => 'filter_username')), 'filter_username'); $form_container->output_row($lang->spam_email, "", $form->generate_text_box('filter_email', $mybb->input['filter_email'], array('id' => 'filter_email')), 'filter_email'); if(!$mybb->input['older_than'])
| $form_container->output_row($lang->spam_username, "", $form->generate_text_box('filter_username', $mybb->get_input('filter_username'), array('id' => 'filter_username')), 'filter_username'); $form_container->output_row($lang->spam_email, "", $form->generate_text_box('filter_email', $mybb->get_input('filter_email'), array('id' => 'filter_email')), 'filter_email'); if(!$mybb->get_input('older_than'))
|
{ $mybb->input['older_than'] = '30'; }
|
{ $mybb->input['older_than'] = '30'; }
|
$form_container->output_row($lang->date_range, "", $lang->older_than.$form->generate_numeric_field('older_than', $mybb->input['older_than'], array('id' => 'older_than', 'style' => 'width: 50px', 'min' => 0))." {$lang->days}", 'older_than');
| $form_container->output_row($lang->date_range, "", $lang->older_than.$form->generate_numeric_field('older_than', $mybb->get_input('older_than'), array('id' => 'older_than', 'style' => 'width: 50px', 'min' => 0))." {$lang->days}", 'older_than');
|
$form_container->end(); $buttons[] = $form->generate_submit_button($lang->prune_spam_logs); $form->output_submit_wrapper($buttons);
| $form_container->end(); $buttons[] = $form->generate_submit_button($lang->prune_spam_logs); $form->output_submit_wrapper($buttons);
|
Zeile 107 | Zeile 107 |
---|
$page->output_footer(); }
|
$page->output_footer(); }
|
if(!$mybb->input['action'])
| if(!$mybb->get_input('action'))
|
{ $plugins->run_hooks("admin_tools_spamlog_start");
| { $plugins->run_hooks("admin_tools_spamlog_start");
|
Zeile 126 | Zeile 126 |
---|
$additional_criteria = array();
// Searching for entries witha specific username
|
$additional_criteria = array();
// Searching for entries witha specific username
|
if($mybb->input['username'])
| if($mybb->get_input('username'))
|
{
|
{
|
$where .= " AND username='".$db->escape_string($mybb->input['username'])."'"; $additional_criteria[] = "username=".urlencode($mybb->input['username']);
| $where .= " AND username='".$db->escape_string($mybb->get_input('username'))."'"; $additional_criteria[] = "username=".urlencode($mybb->get_input('username'));
|
}
// Searching for entries with a specific email
|
}
// Searching for entries with a specific email
|
if($mybb->input['email'])
| if($mybb->get_input('email'))
|
{
|
{
|
$where .= " AND email='".$db->escape_string($mybb->input['email'])."'"; $additional_criteria[] = "email=".urlencode($mybb->input['email']);
| $where .= " AND email='".$db->escape_string($mybb->get_input('email'))."'"; $additional_criteria[] = "email=".urlencode($mybb->get_input('email'));
|
} // Searching for entries with a specific IP
|
} // Searching for entries with a specific IP
|
if($mybb->input['ipaddress'] > 0)
| if($mybb->get_input('ipaddress') > 0)
|
{
|
{
|
$where .= " AND ipaddress=".$db->escape_binary(my_inet_pton($mybb->input['ipaddress'])); $additional_criteria[] = "ipaddress=".urlencode($mybb->input['ipaddress']);
| $where .= " AND ipaddress=".$db->escape_binary(my_inet_pton($mybb->get_input('ipaddress'))); $additional_criteria[] = "ipaddress=".urlencode($mybb->get_input('ipaddress'));
|
}
if($additional_criteria)
| }
if($additional_criteria)
|
Zeile 156 | Zeile 156 |
---|
}
// Order?
|
}
// Order?
|
switch($mybb->input['sortby'])
| switch($mybb->get_input('sortby'))
|
{ case "username": $sortby = "username";
| { case "username": $sortby = "username";
|
Zeile 170 | Zeile 170 |
---|
default: $sortby = "dateline"; }
|
default: $sortby = "dateline"; }
|
$order = $mybb->input['order'];
| $order = $mybb->get_input('order');
|
if($order != "asc") { $order = "desc";
| if($order != "asc") { $order = "desc";
|
Zeile 180 | Zeile 180 |
---|
$rescount = $db->fetch_field($query, "count");
// Figure out if we need to display multiple pages.
|
$rescount = $db->fetch_field($query, "count");
// Figure out if we need to display multiple pages.
|
if($mybb->input['page'] != "last")
| if($mybb->get_input('page') != "last")
|
{ $pagecnt = $mybb->get_input('page', MyBB::INPUT_INT); }
| { $pagecnt = $mybb->get_input('page', MyBB::INPUT_INT); }
|
Zeile 189 | Zeile 189 |
---|
$pages = $logcount / $perpage; $pages = ceil($pages);
|
$pages = $logcount / $perpage; $pages = ceil($pages);
|
if($mybb->input['page'] == "last")
| if($mybb->get_input('page') == "last")
|
{ $pagecnt = $pages; }
| { $pagecnt = $pages; }
|
Zeile 238 | Zeile 238 |
---|
$confidence = (double)$data['confidence'].'%'; } }
|
$confidence = (double)$data['confidence'].'%'; } }
|
| $search_sfs = "<div class=\"float_right\"><a href=\"http://www.stopforumspam.com/ipcheck/{$ip_address}\" target=\"_blank\" rel=\"noopener\"><img src=\"styles/{$page->style}/images/icons/find.png\" title=\"{$lang->search_ip_on_sfs}\" alt=\"{$lang->search}\" /></a></div>";
|
$table->construct_cell($username); $table->construct_cell($email);
|
$table->construct_cell($username); $table->construct_cell($email);
|
$table->construct_cell($ip_address);
| $table->construct_cell("{$search_sfs}<div>{$ip_address}</div>");
|
$table->construct_cell($dateline); $table->construct_cell($confidence); $table->construct_row();
| $table->construct_cell($dateline); $table->construct_cell($confidence); $table->construct_row();
|
Zeile 258 | Zeile 260 |
---|
// Do we need to construct the pagination? if($rescount > $perpage) {
|
// Do we need to construct the pagination? if($rescount > $perpage) {
|
echo draw_admin_pagination($pagecnt, $perpage, $rescount, "index.php?module=tools-spamlog&perpage={$perpage}{$additional_criteria}&sortby={$mybb->input['sortby']}&order={$order}")."<br />";
| echo draw_admin_pagination($pagecnt, $perpage, $rescount, "index.php?module=tools-spamlog&perpage={$perpage}{$additional_criteria}&sortby={$mybb->get_input('sortby')}&order={$order}")."<br />";
|
}
// Fetch filter options
|
}
// Fetch filter options
|
$sortbysel[$mybb->input['sortby']] = "selected=\"selected\""; $ordersel[$mybb->input['order']] = "selected=\"selected\"";
| $sortbysel[$mybb->get_input('sortby')] = "selected=\"selected\""; $ordersel[$mybb->get_input('order')] = "selected=\"selected\"";
|
$sort_by = array( 'dateline' => $lang->spam_date,
| $sort_by = array( 'dateline' => $lang->spam_date,
|
Zeile 279 | Zeile 281 |
---|
$form = new Form("index.php?module=tools-spamlog", "post"); $form_container = new FormContainer($lang->filter_spam_logs);
|
$form = new Form("index.php?module=tools-spamlog", "post"); $form_container = new FormContainer($lang->filter_spam_logs);
|
$form_container->output_row($lang->spam_username, "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'suername'); $form_container->output_row($lang->spam_email, "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email'); $form_container->output_row($lang->spam_ip, "", $form->generate_text_box('ipaddress', $mybb->input['ipaddress'], array('id' => 'ipaddress')), 'ipaddress'); $form_container->output_row($lang->sort_by, "", $form->generate_select_box('sortby', $sort_by, $mybb->input['sortby'], array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $order_array, $order, array('id' => 'order'))." {$lang->order}", 'order');
| $form_container->output_row($lang->spam_username, "", $form->generate_text_box('username', htmlspecialchars_uni($mybb->get_input('username')), array('id' => 'username')), 'suername'); $form_container->output_row($lang->spam_email, "", $form->generate_text_box('email', $mybb->get_input('email'), array('id' => 'email')), 'email'); $form_container->output_row($lang->spam_ip, "", $form->generate_text_box('ipaddress', $mybb->get_input('ipaddress'), array('id' => 'ipaddress')), 'ipaddress'); $form_container->output_row($lang->sort_by, "", $form->generate_select_box('sortby', $sort_by, $mybb->get_input('sortby'), array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $order_array, $order, array('id' => 'order'))." {$lang->order}", 'order');
|
$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $perpage, array('id' => 'perpage', 'min' => 1)), 'perpage');
$form_container->end();
| $form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $perpage, array('id' => 'perpage', 'min' => 1)), 'perpage');
$form_container->end();
|