Vergleich admin/modules/config/report_reasons.php - 1.8.23 - 1.8.30

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 107Zeile 107
	}

$form_container = new FormContainer($lang->add_new_reason);

	}

$form_container = new FormContainer($lang->add_new_reason);

	$form_container->output_row($lang->reason_title." <em>*</em>", $lang->reason_title_desc, $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->applies_to." <em>*</em>", $lang->applies_to_desc, generate_content_select());

	$form_container->output_row($lang->reason_title." <em>*</em>", $lang->reason_title_desc, $form->generate_text_box('title', $mybb->get_input('title'), array('id' => 'title')), 'title');
$form_container->output_row($lang->applies_to." <em>*</em>", '', generate_content_select());

	$form_container->output_row($lang->requires_extra." <em>*</em>", $lang->requires_extra_desc, $form->generate_yes_no_radio('extra', $mybb->input['extra']));
$form_container->end();

	$form_container->output_row($lang->requires_extra." <em>*</em>", $lang->requires_extra_desc, $form->generate_yes_no_radio('extra', $mybb->input['extra']));
$form_container->end();





	$buttons[] = $form->generate_submit_button($lang->save_reason);

	$buttons[] = $form->generate_submit_button($lang->save_reason);





	$form->output_submit_wrapper($buttons);
$form->end();

	$form->output_submit_wrapper($buttons);
$form->end();





	$page->output_footer();
}

	$page->output_footer();
}





if($mybb->input['action'] == "edit")

if($mybb->input['action'] == "edit")

{
$query = $db->simple_select("reportreasons", "*", "rid='".$mybb->get_input('rid', MyBB::INPUT_INT)."'");
$reason = $db->fetch_array($query);

if(!$reason['rid'])
{
flash_message($lang->error_invalid_reason, 'error');

{
$query = $db->simple_select("reportreasons", "*", "rid='".$mybb->get_input('rid', MyBB::INPUT_INT)."'");
$reason = $db->fetch_array($query);

if(!$reason['rid'])
{
flash_message($lang->error_invalid_reason, 'error');

		admin_redirect("index.php?module=config-report_reasons");
}
elseif($reason['rid'] == 1)

		admin_redirect("index.php?module=config-report_reasons");
}
elseif($reason['rid'] == 1)

Zeile 186Zeile 186

// Log admin action
log_admin_action($reason['rid'], $mybb->input['title']);


// Log admin action
log_admin_action($reason['rid'], $mybb->input['title']);





			flash_message($lang->success_reason_updated, 'success');
admin_redirect("index.php?module=config-report_reasons");
}
}

			flash_message($lang->success_reason_updated, 'success');
admin_redirect("index.php?module=config-report_reasons");
}
}





	$page->add_breadcrumb_item($lang->edit_reason);
$page->output_header($lang->report_reasons." - ".$lang->edit_reason);

	$page->add_breadcrumb_item($lang->edit_reason);
$page->output_header($lang->report_reasons." - ".$lang->edit_reason);





	$sub_tabs['edit_reason'] = array(
'title' => $lang->edit_reason,
'link' => "index.php?module=config-report_reasons&amp;action=edit&amp;rid={$reason['rid']}",

	$sub_tabs['edit_reason'] = array(
'title' => $lang->edit_reason,
'link' => "index.php?module=config-report_reasons&amp;action=edit&amp;rid={$reason['rid']}",

Zeile 206Zeile 206
	$form = new Form("index.php?module=config-report_reasons&amp;action=edit&amp;rid={$reason['rid']}", "post", "add");

if($errors)

	$form = new Form("index.php?module=config-report_reasons&amp;action=edit&amp;rid={$reason['rid']}", "post", "add");

if($errors)

	{

	{

		$page->output_inline_error($errors);
}
else

		$page->output_inline_error($errors);
}
else

Zeile 219Zeile 219
		}
}


		}
}


	$form_container = new FormContainer($lang->add_new_reason);

	$form_container = new FormContainer($lang->edit_reason);

	$form_container->output_row($lang->reason_title." <em>*</em>", $lang->reason_title_desc, $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');

	$form_container->output_row($lang->reason_title." <em>*</em>", $lang->reason_title_desc, $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');

	$form_container->output_row($lang->applies_to." <em>*</em>", $lang->applies_to_desc, generate_content_select());

	$form_container->output_row($lang->applies_to." <em>*</em>", '', generate_content_select());

	$form_container->output_row($lang->requires_extra." <em>*</em>", $lang->requires_extra_desc, $form->generate_yes_no_radio('extra', $mybb->input['extra']));
$form_container->end();


	$form_container->output_row($lang->requires_extra." <em>*</em>", $lang->requires_extra_desc, $form->generate_yes_no_radio('extra', $mybb->input['extra']));
$form_container->end();


Zeile 235Zeile 235

if($mybb->input['action'] == "delete")
{


if($mybb->input['action'] == "delete")
{

	if($mybb->input['no'])

	if($mybb->get_input('no'))

	{
admin_redirect("index.php?module=config-report_reasons");
}

	{
admin_redirect("index.php?module=config-report_reasons");
}

Zeile 249Zeile 249
		admin_redirect("index.php?module=config-report_reasons");
}
elseif($reason['rid'] == 1)

		admin_redirect("index.php?module=config-report_reasons");
}
elseif($reason['rid'] == 1)

	{

	{

		flash_message($lang->error_cannot_delete_reason, 'error');
admin_redirect("index.php?module=config-report_reasons");
}

		flash_message($lang->error_cannot_delete_reason, 'error');
admin_redirect("index.php?module=config-report_reasons");
}

Zeile 269Zeile 269
		$db->delete_query("reportreasons", "rid='{$reason['rid']}'");

$plugins->run_hooks("admin_config_report_reasons_delete_commit");

		$db->delete_query("reportreasons", "rid='{$reason['rid']}'");

$plugins->run_hooks("admin_config_report_reasons_delete_commit");

 

$cache->update_reportreasons();


// Log admin action
log_admin_action($reason['rid'], $reason['title']);


// Log admin action
log_admin_action($reason['rid'], $reason['title']);

Zeile 384Zeile 386
	global $mybb, $lang;

$checked = array('all' => '', 'custom' => '', 'none' => '');

	global $mybb, $lang;

$checked = array('all' => '', 'custom' => '', 'none' => '');

	if($mybb->input['appliesto'] == 'all')

	if($mybb->get_input('appliesto') == 'all')

	{
$checked['all'] = 'checked="checked"';
}

	{
$checked['all'] = 'checked="checked"';
}

	elseif($mybb->input['appliesto'] == '')

	elseif($mybb->get_input('appliesto') == '')

	{
$checked['none'] = 'checked="checked"';
}

	{
$checked['none'] = 'checked="checked"';
}

Zeile 427Zeile 429
	foreach($content_types as $content)
{
$key = "report_content_{$content}";

	foreach($content_types as $content)
{
$key = "report_content_{$content}";

		$content_choices[] = $form->generate_check_box("appliesto_{$content}", 1, $lang->$key, array('id' => "appliesto_{$content}", 'checked' => $mybb->input["appliesto_{$content}"]));

		$content_choices[] = $form->generate_check_box("appliesto_{$content}", 1, $lang->$key, array('id' => "appliesto_{$content}", 'checked' => $mybb->get_input("appliesto_{$content}")));

	}

return $content_choices;

	}

return $content_choices;