Vergleich admin/modules/config/help_documents.php - 1.8.24 - 1.8.33

  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();

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

		$form_container->end();

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

Zeile 175Zeile 175
				$hid = $db->insert_query("helpdocs", $sql_array);

$plugins->run_hooks("admin_config_help_documents_add_page_commit");

				$hid = $db->insert_query("helpdocs", $sql_array);

$plugins->run_hooks("admin_config_help_documents_add_page_commit");


// Log admin action


// Log admin action

				log_admin_action($hid, $mybb->input['name'], 'document');

				log_admin_action($hid, $mybb->input['name'], 'document');





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

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

Zeile 190Zeile 190
		$sub_tabs['manage_help_documents'] = array(
'title' => $lang->manage_help_documents,
'link' => "index.php?module=config-help_documents"

		$sub_tabs['manage_help_documents'] = array(
'title' => $lang->manage_help_documents,
'link' => "index.php?module=config-help_documents"

		);


		);


		$sub_tabs['add_help_document'] = array(
'title' => $lang->add_new_document,
'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=document",
'description' => $lang->add_new_document_desc

		$sub_tabs['add_help_document'] = array(
'title' => $lang->add_new_document,
'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=document",
'description' => $lang->add_new_document_desc

		);


		);


		$sub_tabs['add_help_section'] = array(
'title' => $lang->add_new_section,
'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=section"

		$sub_tabs['add_help_section'] = array(
'title' => $lang->add_new_section,
'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=section"

		);

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

if($errors)
{
$page->output_inline_error($errors);

		);

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

if($errors)
{
$page->output_inline_error($errors);

		}
else
{

		}
else
{

Zeile 223Zeile 223

$form_container = new FormContainer($lang->add_new_document);
$query = $db->simple_select("helpsections", "sid, name");


$form_container = new FormContainer($lang->add_new_document);
$query = $db->simple_select("helpsections", "sid, name");





		$sections = array();
while($section = $db->fetch_array($query))
{
$sections[$section['sid']] = $section['name'];
}

		$sections = array();
while($section = $db->fetch_array($query))
{
$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);

Zeile 244Zeile 244
	}

$page->output_footer();

	}

$page->output_footer();

}


}


// Edit something
if($mybb->input['action'] == "edit")
{
$plugins->run_hooks("admin_config_help_documents_edit");

// Edit something
if($mybb->input['action'] == "edit")
{
$plugins->run_hooks("admin_config_help_documents_edit");





	// Edit a section

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

 

if(!$section['sid'])
{
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");



$plugins->run_hooks("admin_config_help_documents_edit_section");


Zeile 305Zeile 311

// Log admin action
log_admin_action($sid, $mybb->input['name'], 'section');


// Log admin action
log_admin_action($sid, $mybb->input['name'], 'section');





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

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

Zeile 320Zeile 326
			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;sid=".$section['sid'],
'description' => $lang->edit_section_desc
);

			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;sid=".$section['sid'],
'description' => $lang->edit_section_desc
);





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

if($errors)

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

if($errors)

		{

		{

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

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

Zeile 336Zeile 342
			$mybb->input['enabled'] = $section['enabled'];
$mybb->input['usetranslation'] = $section['usetranslation'];
}

			$mybb->input['enabled'] = $section['enabled'];
$mybb->input['usetranslation'] = $section['usetranslation'];
}





		$form = new Form("index.php?module=config-help_documents&amp;action=edit", "post", "edit");

echo $form->generate_hidden_field("sid", $section['sid']);

		$form = new Form("index.php?module=config-help_documents&amp;action=edit", "post", "edit");

echo $form->generate_hidden_field("sid", $section['sid']);

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['hid'])
{
flash_message($lang->error_missing_hid, 'error');
admin_redirect("index.php?module=config-help_documents");
}


		$plugins->run_hooks("admin_config_help_documents_edit_page");

// Do edit?

		$plugins->run_hooks("admin_config_help_documents_edit_page");

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