Vergleich admin/modules/tools/warninglog.php - 1.8.26 - 1.8.31

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 112Zeile 112

$user_link = build_profile_link(htmlspecialchars_uni($user['username']), $user['uid'], "_blank");



$user_link = build_profile_link(htmlspecialchars_uni($user['username']), $user['uid'], "_blank");


	if(is_array($warn_errors))

	if(isset($warn_errors) && is_array($warn_errors))

	{
$page->output_inline_error($warn_errors);
$mybb->input['reason'] = htmlspecialchars_uni($mybb->input['reason']);

	{
$page->output_inline_error($warn_errors);
$mybb->input['reason'] = htmlspecialchars_uni($mybb->input['reason']);

Zeile 204Zeile 204
		$form_container = new FormContainer($lang->revoke_warning);
echo $form->generate_hidden_field('action', 'do_revoke');
echo $form->generate_hidden_field('wid', $warning['wid']);

		$form_container = new FormContainer($lang->revoke_warning);
echo $form->generate_hidden_field('action', 'do_revoke');
echo $form->generate_hidden_field('wid', $warning['wid']);

		$form_container->output_row("", $lang->revoke_warning_desc, $form->generate_text_area('reason', $mybb->input['reason'], array('id' => 'reason')), 'reason');

		$form_container->output_row("", $lang->revoke_warning_desc, $form->generate_text_area('reason', $mybb->get_input('reason'), array('id' => 'reason')), 'reason');


$form_container->end();
$buttons[] = $form->generate_submit_button($lang->revoke_warning);


$form_container->end();
$buttons[] = $form->generate_submit_button($lang->revoke_warning);

Zeile 245Zeile 245
	);

$page->output_nav_tabs($sub_tabs, 'warning_logs');

	);

$page->output_nav_tabs($sub_tabs, 'warning_logs');

 

if(empty($mybb->input['filter']))
{
$mybb->input['filter'] = array();
}


// Filter options
$where_sql = '';


// Filter options
$where_sql = '';

Zeile 253Zeile 258
		$search_user = get_user_by_username($mybb->input['filter']['username']);

$mybb->input['filter']['uid'] = (int)$search_user['uid'];

		$search_user = get_user_by_username($mybb->input['filter']['username']);

$mybb->input['filter']['uid'] = (int)$search_user['uid'];

		$mybb->input['filter']['uid'] = $db->fetch_field($query, "uid");

 
	}

	}

	if($mybb->input['filter']['uid'])

	if(!empty($mybb->input['filter']['uid']))

	{
$search['uid'] = (int)$mybb->input['filter']['uid'];
$where_sql .= " AND w.uid='{$search['uid']}'";

	{
$search['uid'] = (int)$mybb->input['filter']['uid'];
$where_sql .= " AND w.uid='{$search['uid']}'";

Zeile 271Zeile 275

$mybb->input['filter']['mod_uid'] = (int)$mod_user['uid'];
}


$mybb->input['filter']['mod_uid'] = (int)$mod_user['uid'];
}

	if($mybb->input['filter']['mod_uid'])

	if(!empty($mybb->input['filter']['mod_uid']))

	{
$search['mod_uid'] = (int)$mybb->input['filter']['mod_uid'];
$where_sql .= " AND w.issuedby='{$search['mod_uid']}'";

	{
$search['mod_uid'] = (int)$mybb->input['filter']['mod_uid'];
$where_sql .= " AND w.issuedby='{$search['mod_uid']}'";

Zeile 281Zeile 285
			$mybb->input['search']['mod_username'] = $mod_user['username'];
}
}

			$mybb->input['search']['mod_username'] = $mod_user['username'];
}
}

	if($mybb->input['filter']['reason'])

	if(!empty($mybb->input['filter']['reason']))

	{
$search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
}
$sortbysel = array();

	{
$search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
}
$sortbysel = array();

	switch($mybb->input['filter']['sortby'])






	$sortby_input = '';
if(!empty($mybb->input['filter']['sortby']))
{
$sortby_input = $mybb->input['filter']['sortby'];
}
switch($sortby_input)

	{
case "username":
$sortby = "u.username";
$sortbysel['username'] = ' selected="selected"';

	{
case "username":
$sortby = "u.username";
$sortbysel['username'] = ' selected="selected"';

			break;

			break;

		case "expires":
$sortby = "w.expires";
$sortbysel['expires'] = ' selected="selected"';

		case "expires":
$sortby = "w.expires";
$sortbysel['expires'] = ' selected="selected"';

			break;

			break;

		case "issuedby":
$sortby = "i.username";
$sortbysel['issuedby'] = ' selected="selected"';

		case "issuedby":
$sortby = "i.username";
$sortbysel['issuedby'] = ' selected="selected"';

Zeile 304Zeile 313
		default: // "dateline"
$sortby = "w.dateline";
$sortbysel['dateline'] = ' selected="selected"';

		default: // "dateline"
$sortby = "w.dateline";
$sortbysel['dateline'] = ' selected="selected"';

	}
$order = $mybb->input['filter']['order'];

	}


	$ordersel = array();

	$ordersel = array();

	if($order != "asc")

	if(empty($mybb->input['filter']['order']) || $mybb->input['filter']['order'] != "asc")

	{
$order = "desc";
$ordersel['desc'] = ' selected="selected"';

	{
$order = "desc";
$ordersel['desc'] = ' selected="selected"';

Zeile 359Zeile 367
		{
$value = urlencode($value);
$url .= "&filter[{$field}]={$value}";

		{
$value = urlencode($value);
$url .= "&filter[{$field}]={$value}";

		}
}

		}
}


// The actual query
$sql = "


// The actual query
$sql = "

Zeile 414Zeile 422
		{
$revoked_date = my_date('relative', $row['daterevoked']);
$revoked_text = "<br /><small><strong>{$lang->revoked}</strong> {$revoked_date}</small>";

		{
$revoked_date = my_date('relative', $row['daterevoked']);
$revoked_text = "<br /><small><strong>{$lang->revoked}</strong> {$revoked_date}</small>";

		}

		}

		if($row['expires'] > 0)
{
$expire_date = my_date('relative', $row['expires']);

		if($row['expires'] > 0)
{
$expire_date = my_date('relative', $row['expires']);

		}

		}

		else
{
$expire_date = $lang->never;
}
$title = $row['title'];
if(empty($row['title']))

		else
{
$expire_date = $lang->never;
}
$title = $row['title'];
if(empty($row['title']))

		{

		{

			$title = $row['custom_title'];
}
$title = htmlspecialchars_uni($title);

			$title = $row['custom_title'];
}
$title = htmlspecialchars_uni($title);

Zeile 441Zeile 449
		$table->construct_cell($expire_date.$revoked_text, array("class" => "align_center"));
$table->construct_cell($mod_username_link);
$table->construct_cell("<a href=\"index.php?module=tools-warninglog&amp;action=view&amp;wid={$row['wid']}\">{$lang->view}</a>", array("class" => "align_center"));

		$table->construct_cell($expire_date.$revoked_text, array("class" => "align_center"));
$table->construct_cell($mod_username_link);
$table->construct_cell("<a href=\"index.php?module=tools-warninglog&amp;action=view&amp;wid={$row['wid']}\">{$lang->view}</a>", array("class" => "align_center"));

		$table->construct_row();

		$table->construct_row();

	}

if($table->num_rows() == 0)

	}

if($table->num_rows() == 0)

	{

	{

		$table->construct_cell($lang->no_warning_logs, array("colspan" => "6"));
$table->construct_row();

		$table->construct_cell($lang->no_warning_logs, array("colspan" => "6"));
$table->construct_row();

	}

	}


$table->output($lang->warning_logs);



$table->output($lang->warning_logs);


Zeile 469Zeile 477
		'asc' => $lang->asc,
'desc' => $lang->desc
);

		'asc' => $lang->asc,
'desc' => $lang->desc
);

 

$user_filters = array();
$input_filters = $mybb->get_input('filter', MyBB::INPUT_ARRAY);
foreach(array('username', 'mod_username', 'reason', 'sortby') as $key)
{
if(isset($input_filters[$key]))
{
$user_filters[$key] = $input_filters[$key];
}
else
{
$user_filters[$key] = '';
}
}


$form = new Form("index.php?module=tools-warninglog", "post");
$form_container = new FormContainer($lang->filter_warning_logs);


$form = new Form("index.php?module=tools-warninglog", "post");
$form_container = new FormContainer($lang->filter_warning_logs);

	$form_container->output_row($lang->filter_warned_user, "", $form->generate_text_box('filter[username]', $mybb->input['filter']['username'], array('id' => 'filter_username')), 'filter_username');
$form_container->output_row($lang->filter_issued_by, "", $form->generate_text_box('filter[mod_username]', $mybb->input['filter']['mod_username'], array('id' => 'filter_mod_username')), 'filter_mod_username');
$form_container->output_row($lang->filter_reason, "", $form->generate_text_box('filter[reason]', $mybb->input['filter']['reason'], array('id' => 'filter_reason')), 'filter_reason');
$form_container->output_row($lang->sort_by, "", $form->generate_select_box('filter[sortby]', $sort_by, $mybb->input['filter']['sortby'], array('id' => 'filter_sortby'))." {$lang->in} ".$form->generate_select_box('filter[order]', $order_array, $order, array('id' => 'filter_order'))." {$lang->order}", 'filter_order');

	$form_container->output_row($lang->filter_warned_user, "", $form->generate_text_box('filter[username]', $user_filters['username'], array('id' => 'filter_username')), 'filter_username');
$form_container->output_row($lang->filter_issued_by, "", $form->generate_text_box('filter[mod_username]', $user_filters['mod_username'], array('id' => 'filter_mod_username')), 'filter_mod_username');
$form_container->output_row($lang->filter_reason, "", $form->generate_text_box('filter[reason]', $user_filters['reason'], array('id' => 'filter_reason')), 'filter_reason');
$form_container->output_row($lang->sort_by, "", $form->generate_select_box('filter[sortby]', $sort_by, $user_filters['sortby'], array('id' => 'filter_sortby'))." {$lang->in} ".$form->generate_select_box('filter[order]', $order_array, $order, array('id' => 'filter_order'))." {$lang->order}", 'filter_order');

	$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('filter[per_page]', $per_page, array('id' => 'filter_per_page', 'min' => 1)), 'filter_per_page');

$form_container->end();

	$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('filter[per_page]', $per_page, array('id' => 'filter_per_page', 'min' => 1)), 'filter_per_page');

$form_container->end();