Vergleich admin/modules/config/help_documents.php - 1.8.3 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 56Zeile 56
				$sql_array = array(
"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),

				$sql_array = array(
"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),

					"usetranslation" => (int)$mybb->input['usetranslation'],
"enabled" => (int)$mybb->input['enabled'],
"disporder" => (int)$mybb->input['disporder']

					"usetranslation" => $mybb->get_input('usetranslation', MyBB::INPUT_INT),
"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT)

				);

$sid = $db->insert_query("helpsections", $sql_array);

				);

$sid = $db->insert_query("helpsections", $sql_array);

Zeile 112Zeile 112
		$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 = 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')), 'disporder');

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


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


Zeile 163Zeile 163
			if(!is_array($errors))
{
$sql_array = array(

			if(!is_array($errors))
{
$sql_array = array(

					"sid" => $mybb->get_input('sid', 1),

					"sid" => $mybb->get_input('sid', MyBB::INPUT_INT),

					"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),
"document" => $db->escape_string($mybb->input['document']),

					"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),
"document" => $db->escape_string($mybb->input['document']),

					"usetranslation" => (int)$mybb->input['usetranslation'],
"enabled" => (int)$mybb->input['enabled'],
"disporder" => (int)$mybb->input['disporder']

					"usetranslation" => $mybb->get_input('usetranslation', MyBB::INPUT_INT),
"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT)

				);

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

				);

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

Zeile 233Zeile 233
		$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->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')), 'disporder');

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


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


Zeile 254Zeile 254
	// Edit a section
if($mybb->input['sid'] && !$mybb->input['hid'])
{

	// Edit a section
if($mybb->input['sid'] && !$mybb->input['hid'])
{

		$query = $db->simple_select("helpsections", "*", "sid = '".$mybb->get_input('sid', 1)."'");

		$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");

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

$plugins->run_hooks("admin_config_help_documents_edit_section");

Zeile 262Zeile 262
		// Do edit?
if($mybb->request_method == "post")
{

		// Do edit?
if($mybb->request_method == "post")
{

			$sid = $mybb->get_input('sid', 1);

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


if(empty($sid))
{


if(empty($sid))
{

Zeile 294Zeile 294
				$sql_array = array(
"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),

				$sql_array = array(
"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),

					"usetranslation" => (int)$mybb->input['usetranslation'],
"enabled" => (int)$mybb->input['enabled'],
"disporder" => (int)$mybb->input['disporder']

					"usetranslation" => $mybb->get_input('usetranslation', MyBB::INPUT_INT),
"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT)

				);

$plugins->run_hooks("admin_config_help_documents_edit_section_commit");

				);

$plugins->run_hooks("admin_config_help_documents_edit_section_commit");

Zeile 317Zeile 317

$sub_tabs['edit_help_section'] = array(
'title' => $lang->edit_section,


$sub_tabs['edit_help_section'] = array(
'title' => $lang->edit_section,

			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;sid=".$mybb->get_input('sid', 1),

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

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


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


Zeile 339Zeile 339

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



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


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

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

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


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


		$form_container = new FormContainer($lang->edit_section." ({$lang->id} ".$mybb->get_input('sid', 1).")");

		$form_container = new FormContainer($lang->edit_section." ({$lang->id} ".$section['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->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')), 'disporder');

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


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


Zeile 363Zeile 363
		// Do edit?
if($mybb->request_method == "post")
{

		// Do edit?
if($mybb->request_method == "post")
{

			$hid = (int)$mybb->input['hid'];

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


if(empty($hid))
{


if(empty($hid))
{

Zeile 398Zeile 398
			if(!is_array($errors))
{
$sql_array = array(

			if(!is_array($errors))
{
$sql_array = array(

					"sid" => $mybb->get_input('sid', 1),

					"sid" => $mybb->get_input('sid', MyBB::INPUT_INT),

					"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),
"document" => $db->escape_string($mybb->input['document']),

					"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),
"document" => $db->escape_string($mybb->input['document']),

					"usetranslation" => (int)$mybb->input['usetranslation'],
"enabled" => (int)$mybb->input['enabled'],
"disporder" => (int)$mybb->input['disporder']

					"usetranslation" => $mybb->get_input('usetranslation', MyBB::INPUT_INT),
"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT)

				);

$plugins->run_hooks("admin_config_help_documents_edit_page_commit");

				);

$plugins->run_hooks("admin_config_help_documents_edit_page_commit");

Zeile 425Zeile 425

$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=".(int)$mybb->input['hid'],

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

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


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


Zeile 437Zeile 437
		}
else
{

		}
else
{

			$query = $db->simple_select("helpdocs", "*", "hid = '".(int)$mybb->input['hid']."'");

			$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'];

			$doc = $db->fetch_array($query);
$mybb->input['hid'] = $doc['hid'];
$mybb->input['sid'] = $doc['sid'];

Zeile 451Zeile 451

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



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


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

		echo $form->generate_hidden_field("hid", $doc['hid']);

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


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


		$form_container = new FormContainer($lang->edit_document." ({$lang->id} ".(int)$mybb->input['hid'].")");

		$form_container = new FormContainer($lang->edit_document." ({$lang->id} ".$doc['hid'].")");


$sections = array();
$query = $db->simple_select("helpsections", "sid, name");


$sections = array();
$query = $db->simple_select("helpsections", "sid, name");

Zeile 466Zeile 466
		$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->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')), 'disporder');

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


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


Zeile 496Zeile 496
		// Delete section
if(isset($mybb->input['sid']))
{

		// Delete section
if(isset($mybb->input['sid']))
{

			$sid = $mybb->get_input('sid', 1);

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


$query = $db->simple_select("helpsections", "*", "sid='{$sid}'");
$section = $db->fetch_array($query);


$query = $db->simple_select("helpsections", "*", "sid='{$sid}'");
$section = $db->fetch_array($query);

Zeile 509Zeile 509
			}

// Delete section and its documents

			}

// Delete section and its documents

			$db->delete_query("helpsections", "sid = '{$sid}'", 1);
$db->delete_query("helpdocs", "sid = '{$sid}'");

			$db->delete_query("helpsections", "sid = '{$section['sid']}'", 1);
$db->delete_query("helpdocs", "sid = '{$section['sid']}'");


$plugins->run_hooks("admin_config_help_documents_delete_section_commit");



$plugins->run_hooks("admin_config_help_documents_delete_section_commit");


Zeile 524Zeile 524
		// Delete document
else
{

		// Delete document
else
{

			$hid = (int)$mybb->input['hid'];

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


$query = $db->simple_select("helpdocs", "*", "hid='{$hid}'");
$doc = $db->fetch_array($query);


$query = $db->simple_select("helpdocs", "*", "hid='{$hid}'");
$doc = $db->fetch_array($query);

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


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


			$db->delete_query("helpdocs", "hid = '{$hid}'", 1);

			$db->delete_query("helpdocs", "hid = '{$doc['hid']}'", 1);


$plugins->run_hooks("admin_config_help_documents_delete_page_commit");



$plugins->run_hooks("admin_config_help_documents_delete_page_commit");


Zeile 553Zeile 553
		// Section
if(isset($mybb->input['sid']))
{

		// Section
if(isset($mybb->input['sid']))
{

			$sid = $mybb->get_input('sid', 1);

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

			$page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;sid={$sid}", $lang->confirm_section_deletion);
}
// Document
else
{

			$page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;sid={$sid}", $lang->confirm_section_deletion);
}
// Document
else
{

			$hid = (int)$mybb->input['hid'];

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

			$page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;hid={$hid}", $lang->confirm_document_deletion);
}
}

			$page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;hid={$hid}", $lang->confirm_document_deletion);
}
}