Vergleich admin/modules/config/smilies.php - 1.8.3 - 1.8.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 45Zeile 45
		}
else
{

		}
else
{

			$mybb->input['disporder'] = $mybb->get_input('disporder', 1);

			$mybb->input['disporder'] = $mybb->get_input('disporder', MyBB::INPUT_INT);

			$query = $db->simple_select('smilies', 'sid', 'disporder=\''.$mybb->input['disporder'].'\'');
$duplicate_disporder = $db->fetch_field($query, 'sid');


			$query = $db->simple_select('smilies', 'sid', 'disporder=\''.$mybb->input['disporder'].'\'');
$duplicate_disporder = $db->fetch_field($query, 'sid');


Zeile 70Zeile 70
				"name" => $db->escape_string($mybb->input['name']),
"find" => $db->escape_string($mybb->input['find']),
"image" => $db->escape_string($mybb->input['image']),

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

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

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

				"showclickable" => $db->escape_string($mybb->input['showclickable'])
);


				"showclickable" => $db->escape_string($mybb->input['showclickable'])
);


Zeile 81Zeile 81
			$cache->update_smilies();

// Log admin action

			$cache->update_smilies();

// Log admin action

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

			log_admin_action($sid, htmlspecialchars_uni($mybb->input['name']));


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


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

Zeile 132Zeile 132
	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->text_replace." <em>*</em>", $lang->text_replace_desc, $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find')), 'find');
$form_container->output_row($lang->image_path." <em>*</em>", $lang->image_path_desc, $form->generate_text_box('image', $mybb->input['image'], array('id' => 'image')), 'image');

	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->text_replace." <em>*</em>", $lang->text_replace_desc, $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find')), 'find');
$form_container->output_row($lang->image_path." <em>*</em>", $lang->image_path_desc, $form->generate_text_box('image', $mybb->input['image'], array('id' => 'image')), 'image');

	$form_container->output_row($lang->display_order." <em>*</em>", $lang->display_order_desc, $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');

	$form_container->output_row($lang->display_order." <em>*</em>", $lang->display_order_desc, $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');

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


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


Zeile 146Zeile 146

if($mybb->input['action'] == "edit")
{


if($mybb->input['action'] == "edit")
{

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

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

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

// Does the smilie not exist?

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

// Does the smilie not exist?

Zeile 181Zeile 181
		}
else
{

		}
else
{

			$mybb->input['disporder'] = $mybb->get_input('disporder', 1);

			$mybb->input['disporder'] = $mybb->get_input('disporder', MyBB::INPUT_INT);

			$query = $db->simple_select("smilies", "sid", "disporder= '".$mybb->input['disporder']."' AND sid != '".$mybb->input['sid']."'");
$duplicate_disporder = $db->fetch_field($query, 'sid');


			$query = $db->simple_select("smilies", "sid", "disporder= '".$mybb->input['disporder']."' AND sid != '".$mybb->input['sid']."'");
$duplicate_disporder = $db->fetch_field($query, 'sid');


Zeile 206Zeile 206
				"name" => $db->escape_string($mybb->input['name']),
"find" => $db->escape_string($mybb->input['find']),
"image" => $db->escape_string($mybb->input['image']),

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

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

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

				"showclickable" => $db->escape_string($mybb->input['showclickable'])
);

$plugins->run_hooks("admin_config_smilies_edit_commit");


				"showclickable" => $db->escape_string($mybb->input['showclickable'])
);

$plugins->run_hooks("admin_config_smilies_edit_commit");


			$db->update_query("smilies", $updated_smilie, "sid = '".$mybb->get_input('sid', 1)."'");

			$db->update_query("smilies", $updated_smilie, "sid = '".$mybb->get_input('sid', MyBB::INPUT_INT)."'");


$cache->update_smilies();

// Log admin action


$cache->update_smilies();

// Log admin action

			log_admin_action($smilie['sid'], $mybb->input['name']);

			log_admin_action($smilie['sid'], htmlspecialchars_uni($mybb->input['name']));


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


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

Zeile 255Zeile 255
	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->text_replace." <em>*</em>", $lang->text_replace_desc, $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find')), 'find');
$form_container->output_row($lang->image_path." <em>*</em>", $lang->image_path_desc, $form->generate_text_box('image', $mybb->input['image'], array('id' => 'image')), 'image');

	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->text_replace." <em>*</em>", $lang->text_replace_desc, $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find')), 'find');
$form_container->output_row($lang->image_path." <em>*</em>", $lang->image_path_desc, $form->generate_text_box('image', $mybb->input['image'], array('id' => 'image')), 'image');

	$form_container->output_row($lang->display_order." <em>*</em>", $lang->display_order_desc, $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');

	$form_container->output_row($lang->display_order." <em>*</em>", $lang->display_order_desc, $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');

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


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


Zeile 270Zeile 270

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


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

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

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

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

// Does the smilie not exist?

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

// Does the smilie not exist?

Zeile 298Zeile 298
		$cache->update_smilies();

// Log admin action

		$cache->update_smilies();

// Log admin action

		log_admin_action($smilie['sid'], $smilie['name']);

		log_admin_action($smilie['sid'], htmlspecialchars_uni($smilie['name']));


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


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

Zeile 643Zeile 643
			$image = "../".$smilie['image'];
}


			$image = "../".$smilie['image'];
}


		$smilie['find'] = implode(', ', explode("\n", $smilie['find']));


		$smilie['find'] = htmlspecialchars_uni($smilie['find']);
$smilie['name'] = htmlspecialchars_uni($smilie['name']);


$form_container->output_cell("<img src=\"{$image}\" alt=\"\" />", array("class" => "align_center", "width" => 1));
$form_container->output_cell($form->generate_text_box("name[{$smilie['sid']}]", $smilie['name'], array('id' => 'name', 'style' => 'width: 98%')));
$form_container->output_cell($form->generate_text_area("find[{$smilie['sid']}]", $smilie['find'], array('id' => 'find', 'style' => 'width: 95%')));


$form_container->output_cell("<img src=\"{$image}\" alt=\"\" />", array("class" => "align_center", "width" => 1));
$form_container->output_cell($form->generate_text_box("name[{$smilie['sid']}]", $smilie['name'], array('id' => 'name', 'style' => 'width: 98%')));
$form_container->output_cell($form->generate_text_area("find[{$smilie['sid']}]", $smilie['find'], array('id' => 'find', 'style' => 'width: 95%')));

		$form_container->output_cell($form->generate_numeric_field("disporder[{$smilie['sid']}]", $smilie['disporder'], array('id' => 'disporder', 'style' => 'width: 80%')));

		$form_container->output_cell($form->generate_numeric_field("disporder[{$smilie['sid']}]", $smilie['disporder'], array('id' => 'disporder', 'style' => 'width: 80%', 'min' => 0)));

		$form_container->output_cell($form->generate_yes_no_radio("showclickable[{$smilie['sid']}]", $smilie['showclickable']), array("class" => "align_center"));
$form_container->output_cell($form->generate_check_box("delete[{$smilie['sid']}]", 1, $mybb->input['delete']), array("class" => "align_center"));
$form_container->construct_row();

		$form_container->output_cell($form->generate_yes_no_radio("showclickable[{$smilie['sid']}]", $smilie['showclickable']), array("class" => "align_center"));
$form_container->output_cell($form->generate_check_box("delete[{$smilie['sid']}]", 1, $mybb->input['delete']), array("class" => "align_center"));
$form_container->construct_row();

Zeile 697Zeile 698

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



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


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

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

	if($pagenum)
{
$start = ($pagenum-1) * 20;

	if($pagenum)
{
$start = ($pagenum-1) * 20;

Zeile 728Zeile 729
		{
$image = "../".$smilie['image'];
}

		{
$image = "../".$smilie['image'];
}


$smilie['find'] = str_replace("\n", ", ", $smilie['find']);

 

$table->construct_cell("<img src=\"{$image}\" alt=\"\" class=\"smilie smilie_{$smilie['sid']}\" />", array("class" => "align_center"));
$table->construct_cell(htmlspecialchars_uni($smilie['name']));


$table->construct_cell("<img src=\"{$image}\" alt=\"\" class=\"smilie smilie_{$smilie['sid']}\" />", array("class" => "align_center"));
$table->construct_cell(htmlspecialchars_uni($smilie['name']));

		$table->construct_cell(htmlspecialchars_uni($smilie['find']));

		$table->construct_cell(nl2br(htmlspecialchars_uni($smilie['find'])));


$table->construct_cell("<a href=\"index.php?module=config-smilies&amp;action=edit&amp;sid={$smilie['sid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-smilies&amp;action=delete&amp;sid={$smilie['sid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_smilie_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));


$table->construct_cell("<a href=\"index.php?module=config-smilies&amp;action=edit&amp;sid={$smilie['sid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-smilies&amp;action=delete&amp;sid={$smilie['sid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_smilie_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));