Vergleich admin/modules/config/help_documents.php - 1.8.7 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 110Zeile 110
		echo $form->generate_hidden_field("usetranslation", $mybb->input['usetranslation']);

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

		echo $form->generate_hidden_field("usetranslation", $mybb->input['usetranslation']);

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

		$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');
$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');
$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->input['enabled']));

		$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->get_input('name'), array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->get_input('description'), array('id' => 'description')), 'description');
$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $mybb->get_input('disporder'), array('id' => 'disporder', 'min' => 0)), 'disporder');
$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->get_input('enabled')));

		$form_container->end();

		$form_container->end();





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

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

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

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





	// Add page
else
{

	// Add page
else
{

Zeile 133Zeile 133
			if(empty($mybb->input['sid']))
{
$errors[] = $lang->error_missing_sid;

			if(empty($mybb->input['sid']))
{
$errors[] = $lang->error_missing_sid;

			}

if(empty($mybb->input['name']))
{
$errors[] = $lang->error_document_missing_name;
}

if(empty($mybb->input['description']))
{
$errors[] = $lang->error_document_missing_description;
}

if(empty($mybb->input['document']))
{
$errors[] = $lang->error_document_missing_document;
}

if(!isset($mybb->input['enabled']))
{
$errors[] = $lang->error_document_missing_enabled;
}


			}

if(empty($mybb->input['name']))
{
$errors[] = $lang->error_document_missing_name;
}

if(empty($mybb->input['description']))
{
$errors[] = $lang->error_document_missing_description;
}

if(empty($mybb->input['document']))
{
$errors[] = $lang->error_document_missing_document;
}

if(!isset($mybb->input['enabled']))
{
$errors[] = $lang->error_document_missing_enabled;
}


			if($mybb->input['enabled'] != 1)
{
$mybb->input['enabled'] = 0;

			if($mybb->input['enabled'] != 1)
{
$mybb->input['enabled'] = 0;

Zeile 229Zeile 229
		{
$sections[$section['sid']] = $section['name'];
}

		{
$sections[$section['sid']] = $section['name'];
}

		$form_container->output_row($lang->section." <em>*</em>", "", $form->generate_select_box("sid", $sections, $mybb->input['sid'], array('id' => 'sid')), 'sid');
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');
$form_container->output_row($lang->document." <em>*</em>", "", $form->generate_text_area('document', $mybb->input['document'], array('id' => 'document')), 'document');
$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');
$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->input['enabled']));

		$form_container->output_row($lang->section." <em>*</em>", "", $form->generate_select_box("sid", $sections, $mybb->get_input('sid'), array('id' => 'sid')), 'sid');
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->get_input('name'), array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->get_input('description'), array('id' => 'description')), 'description');
$form_container->output_row($lang->document." <em>*</em>", "", $form->generate_text_area('document', $mybb->get_input('document'), array('id' => 'document')), 'document');
$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $mybb->get_input('disporder'), array('id' => 'disporder', 'min' => 0)), 'disporder');
$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->get_input('enabled')));

		$form_container->end();

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

		$form_container->end();

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


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


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


$page->output_footer();
}


$page->output_footer();
}

Zeile 252Zeile 252
	$plugins->run_hooks("admin_config_help_documents_edit");

// Edit a section

	$plugins->run_hooks("admin_config_help_documents_edit");

// Edit a section

	if($mybb->input['sid'] && !$mybb->input['hid'])

	if(isset($mybb->input['sid']) && !$mybb->get_input('hid'))

	{
$query = $db->simple_select("helpsections", "*", "sid = '".$mybb->get_input('sid', MyBB::INPUT_INT)."'");
$section = $db->fetch_array($query);


	{
$query = $db->simple_select("helpsections", "*", "sid = '".$mybb->get_input('sid', MyBB::INPUT_INT)."'");
$section = $db->fetch_array($query);


		$plugins->run_hooks("admin_config_help_documents_edit_section");







		if(!$section)
{
flash_message($lang->error_missing_section_id, 'error');
admin_redirect("index.php?module=config-help_documents");
}

$plugins->run_hooks("admin_config_help_documents_edit_section");


// Do edit?
if($mybb->request_method == "post")
{
$sid = $mybb->get_input('sid', MyBB::INPUT_INT);


// Do edit?
if($mybb->request_method == "post")
{
$sid = $mybb->get_input('sid', MyBB::INPUT_INT);





			if(empty($sid))
{
$errors[] = $lang->error_invalid_sid;

			if(empty($sid))
{
$errors[] = $lang->error_invalid_sid;

			}

			}


if(empty($mybb->input['name']))
{
$errors[] = $lang->error_section_missing_name;


if(empty($mybb->input['name']))
{
$errors[] = $lang->error_section_missing_name;

			}


			}


			if(empty($mybb->input['description']))
{
$errors[] = $lang->error_section_missing_description;

			if(empty($mybb->input['description']))
{
$errors[] = $lang->error_section_missing_description;

			}


			}


			if(!isset($mybb->input['enabled']))
{
$errors[] = $lang->error_section_missing_enabled;

			if(!isset($mybb->input['enabled']))
{
$errors[] = $lang->error_section_missing_enabled;

Zeile 358Zeile 364
	// Edit document
else
{

	// Edit document
else
{

 
		$query = $db->simple_select("helpdocs", "*", "hid = '".$mybb->get_input('hid', MyBB::INPUT_INT)."'");
$doc = $db->fetch_array($query);

// Invalid document?
if(!$doc)
{
flash_message($lang->error_missing_hid, 'error');
admin_redirect("index.php?module=config-help_documents");
}


		$plugins->run_hooks("admin_config_help_documents_edit_page");

		$plugins->run_hooks("admin_config_help_documents_edit_page");





		// Do edit?

		// Do edit?

 
		$hid = $mybb->get_input('hid', MyBB::INPUT_INT);


		if($mybb->request_method == "post")
{

		if($mybb->request_method == "post")
{

			$hid = $mybb->get_input('hid', MyBB::INPUT_INT);


 
			if(empty($hid))
{
$errors[] = $lang->error_invalid_sid;

			if(empty($hid))
{
$errors[] = $lang->error_invalid_sid;

Zeile 425Zeile 441

$sub_tabs['edit_help_document'] = array(
'title' => $lang->edit_document,


$sub_tabs['edit_help_document'] = array(
'title' => $lang->edit_document,

			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;hid=".$hid,

			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;hid=".$doc['hid'],

			'description' => $lang->edit_document_desc
);


			'description' => $lang->edit_document_desc
);


Zeile 437Zeile 453
		}
else
{

		}
else
{

			$query = $db->simple_select("helpdocs", "*", "hid = '".$mybb->get_input('hid', MyBB::INPUT_INT)."'");
$doc = $db->fetch_array($query);

 
			$mybb->input['hid'] = $doc['hid'];
$mybb->input['sid'] = $doc['sid'];
$mybb->input['name'] = $doc['name'];

			$mybb->input['hid'] = $doc['hid'];
$mybb->input['sid'] = $doc['sid'];
$mybb->input['name'] = $doc['name'];

Zeile 483Zeile 497
if($mybb->input['action'] == "delete")
{
// User clicked no

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

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

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

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

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

Zeile 502Zeile 516
			$section = $db->fetch_array($query);

// Invalid section?

			$section = $db->fetch_array($query);

// Invalid section?

			if(!$section['sid'])

			if(!$section)

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

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

Zeile 530Zeile 544
			$doc = $db->fetch_array($query);

// Invalid document?

			$doc = $db->fetch_array($query);

// Invalid document?

			if(!$doc['hid'])

			if(!$doc)

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

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