Vergleich admin/modules/config/report_reasons.php - 1.8.9 - 1.8.37

  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');
admin_redirect("index.php?module=config-report_reasons");
}
elseif($reason['rid'] == 1)
{

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

if(!$reason)
{
flash_message($lang->error_invalid_reason, 'error');
admin_redirect("index.php?module=config-report_reasons");
}
elseif($reason['rid'] == 1)
{

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

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

Zeile 177Zeile 177
				"appliesto" => $db->escape_string($appliesto),
"extra" => $mybb->input['extra']
);

				"appliesto" => $db->escape_string($appliesto),
"extra" => $mybb->input['extra']
);





			$plugins->run_hooks("admin_config_report_reasons_edit_commit");

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

$cache->update_reportreasons();

			$plugins->run_hooks("admin_config_report_reasons_edit_commit");

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

$cache->update_reportreasons();





			// 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");
}

Zeile 200Zeile 200
		'link' => "index.php?module=config-report_reasons&amp;action=edit&amp;rid={$reason['rid']}",
'description' => $lang->edit_reason_desc
);

		'link' => "index.php?module=config-report_reasons&amp;action=edit&amp;rid={$reason['rid']}",
'description' => $lang->edit_reason_desc
);





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

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

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

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

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 243Zeile 243
	$query = $db->simple_select("reportreasons", "*", "rid='".$mybb->get_input('rid', MyBB::INPUT_INT)."'");
$reason = $db->fetch_array($query);


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


	if(!$reason['rid'])

	if(!$reason)

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

	{
flash_message($lang->error_invalid_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 297Zeile 299

$plugins->run_hooks("admin_config_report_reasons_start_commit");



$plugins->run_hooks("admin_config_report_reasons_start_commit");


			//$cache->update_reportreasons();

			$cache->update_reportreasons();


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


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

Zeile 364Zeile 366

if($form_container->num_rows() == 0)
{


if($form_container->num_rows() == 0)
{

		$form_container->construct_cell($lang->no_report_reasons, array('colspan' => 5));

		$form_container->output_cell($lang->no_report_reasons, array('colspan' => 5));

		$form_container->construct_row();
}


		$form_container->construct_row();
}


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;