Zeile 56 | Zeile 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 112 | Zeile 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 163 | Zeile 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 233 | Zeile 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 254 | Zeile 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 262 | Zeile 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 294 | Zeile 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 317 | Zeile 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&action=edit&sid=".$mybb->get_input('sid', 1),
| 'link' => "index.php?module=config-help_documents&action=edit&sid=".$mybb->get_input('sid', MyBB::INPUT_INT),
|
'description' => $lang->edit_section_desc );
| 'description' => $lang->edit_section_desc );
|
Zeile 342 | Zeile 342 |
---|
echo $form->generate_hidden_field("sid", $mybb->input['sid']); echo $form->generate_hidden_field("usetranslation", $mybb->input['usetranslation']);
|
echo $form->generate_hidden_field("sid", $mybb->input['sid']); 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} ".$mybb->get_input('sid', MyBB::INPUT_INT).")");
|
$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 363 | Zeile 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 398 | Zeile 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 425 | Zeile 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&action=edit&hid=".(int)$mybb->input['hid'],
| 'link' => "index.php?module=config-help_documents&action=edit&hid=".$mybb->get_input('hid', MyBB::INPUT_INT),
|
'description' => $lang->edit_document_desc );
| 'description' => $lang->edit_document_desc );
|
Zeile 437 | Zeile 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 454 | Zeile 454 |
---|
echo $form->generate_hidden_field("hid", $mybb->input['hid']); echo $form->generate_hidden_field("usetranslation", $mybb->input['usetranslation']);
|
echo $form->generate_hidden_field("hid", $mybb->input['hid']); 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} ".$mybb->get_input('hid', MyBB::INPUT_INT).")");
|
$sections = array(); $query = $db->simple_select("helpsections", "sid, name");
| $sections = array(); $query = $db->simple_select("helpsections", "sid, name");
|
Zeile 466 | Zeile 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 496 | Zeile 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 524 | Zeile 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 553 | Zeile 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&action=delete&sid={$sid}", $lang->confirm_section_deletion); } // Document else {
|
$page->output_confirm_action("index.php?module=config-help_documents&action=delete&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&action=delete&hid={$hid}", $lang->confirm_document_deletion); } }
| $page->output_confirm_action("index.php?module=config-help_documents&action=delete&hid={$hid}", $lang->confirm_document_deletion); } }
|