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

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 71Zeile 71
				"find" => $db->escape_string($mybb->input['find']),
"image" => $db->escape_string($mybb->input['image']),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT),

				"find" => $db->escape_string($mybb->input['find']),
"image" => $db->escape_string($mybb->input['image']),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT),

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

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

			);

$sid = $db->insert_query("smilies", $new_smilie);

			);

$sid = $db->insert_query("smilies", $new_smilie);

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

// Log admin action

			$cache->update_smilies();

// Log admin action

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

			log_admin_action($sid, $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 182Zeile 182
		else
{
$mybb->input['disporder'] = $mybb->get_input('disporder', MyBB::INPUT_INT);

		else
{
$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']."'");

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

			$duplicate_disporder = $db->fetch_field($query, 'sid');

if($duplicate_disporder)

			$duplicate_disporder = $db->fetch_field($query, 'sid');

if($duplicate_disporder)

Zeile 207Zeile 207
				"find" => $db->escape_string($mybb->input['find']),
"image" => $db->escape_string($mybb->input['image']),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT),

				"find" => $db->escape_string($mybb->input['find']),
"image" => $db->escape_string($mybb->input['image']),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT),

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

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

			);

$plugins->run_hooks("admin_config_smilies_edit_commit");


			);

$plugins->run_hooks("admin_config_smilies_edit_commit");


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

			$db->update_query("smilies", $updated_smilie, "sid = '{$smilie['sid']}'");


$cache->update_smilies();

// Log admin action


$cache->update_smilies();

// Log admin action

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

			log_admin_action($smilie['sid'], $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 298Zeile 298
		$cache->update_smilies();

// Log admin action

		$cache->update_smilies();

// Log admin action

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

		log_admin_action($smilie['sid'], $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 409Zeile 409
					$find = str_replace(".".$ext, "", $file);
$name = ucfirst($find);


					$find = str_replace(".".$ext, "", $file);
$name = ucfirst($find);


					$form_container->output_cell("<img src=\"../".$path.$file."\" alt=\"\" /><br /><small>{$file}</small>", array("class" => "align_center", "width" => 1));
$form_container->output_cell($form->generate_text_box("name[{$file}]", $name, array('id' => 'name', 'style' => 'width: 98%')));



					$file = htmlspecialchars_uni($file);

$form_container->output_cell("<img src=\"../".htmlspecialchars_uni($path).$file."\" alt=\"\" /><br /><small>{$file}</small>", array("class" => "align_center", "width" => 1));
$form_container->output_cell($form->generate_text_box("name[{$file}]", htmlspecialchars_uni($name), array('id' => 'name', 'style' => 'width: 98%')));

					$form_container->output_cell($form->generate_text_box("find[{$file}]", ":".$find.":", array('id' => 'find', 'style' => 'width: 95%')));
$form_container->output_cell($form->generate_check_box("include[{$file}]", 1, "", array('checked' => 1)), array("class" => "align_center"));
$form_container->construct_row();

					$form_container->output_cell($form->generate_text_box("find[{$file}]", ":".$find.":", array('id' => 'find', 'style' => 'width: 95%')));
$form_container->output_cell($form->generate_check_box("include[{$file}]", 1, "", array('checked' => 1)), array("class" => "align_center"));
$form_container->construct_row();

Zeile 421Zeile 423
					flash_message($lang->error_no_images, 'error');
admin_redirect("index.php?module=config-smilies&action=add_multiple");
}

					flash_message($lang->error_no_images, 'error');
admin_redirect("index.php?module=config-smilies&action=add_multiple");
}





				$form_container->end();

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

				$form_container->end();

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

Zeile 431Zeile 433

$page->output_footer();
exit;


$page->output_footer();
exit;

			}

			}

		}
else
{

		}
else
{

Zeile 447Zeile 449
				flash_message($lang->error_none_included, 'error');
admin_redirect("index.php?module=config-smilies&action=add_multiple");
}

				flash_message($lang->error_none_included, 'error');
admin_redirect("index.php?module=config-smilies&action=add_multiple");
}





			$query = $db->simple_select('smilies', 'MAX(disporder) as max_disporder');
$disporder = $db->fetch_field($query, 'max_disporder');

foreach($mybb->input['include'] as $image => $insert)

			$query = $db->simple_select('smilies', 'MAX(disporder) as max_disporder');
$disporder = $db->fetch_field($query, 'max_disporder');

foreach($mybb->input['include'] as $image => $insert)

			{

			{

				$find[$image] = str_replace("\r\n", "\n", $find[$image]);
$find[$image] = str_replace("\r", "\n", $find[$image]);
$find[$image] = explode("\n", $find[$image]);

				$find[$image] = str_replace("\r\n", "\n", $find[$image]);
$find[$image] = str_replace("\r", "\n", $find[$image]);
$find[$image] = explode("\n", $find[$image]);

Zeile 461Zeile 463
					unset($find[$image][$key]);
}
$find[$image] = implode("\n", $find[$image]);

					unset($find[$image][$key]);
}
$find[$image] = implode("\n", $find[$image]);





				if($insert)
{
$new_smilie = array(

				if($insert)
{
$new_smilie = array(

Zeile 475Zeile 477
					$db->insert_query("smilies", $new_smilie);
}
}

					$db->insert_query("smilies", $new_smilie);
}
}





			$plugins->run_hooks("admin_config_smilies_add_multiple_commit");

			$plugins->run_hooks("admin_config_smilies_add_multiple_commit");





			$cache->update_smilies();

			$cache->update_smilies();





			// Log admin action
log_admin_action();


			// Log admin action
log_admin_action();


Zeile 489Zeile 491
	}

$page->add_breadcrumb_item($lang->add_multiple_smilies);

	}

$page->add_breadcrumb_item($lang->add_multiple_smilies);

	$page->output_header($lang->smilies." - ".$lang->add_multiple_smilies);

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

	$page->output_header($lang->smilies." - ".$lang->add_multiple_smilies);

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

	);
$sub_tabs['add_smilie'] = array(
'title' => $lang->add_smilie,

	);
$sub_tabs['add_smilie'] = array(
'title' => $lang->add_smilie,

Zeile 550Zeile 552
			}
else
{

			}
else
{

 
				$mybb->input['find'][$sid] = str_replace("\r\n", "\n", $mybb->input['find'][$sid]);
$mybb->input['find'][$sid] = str_replace("\r", "\n", $mybb->input['find'][$sid]);
$mybb->input['find'][$sid] = explode("\n", $mybb->input['find'][$sid]);
foreach(array_merge(array_keys($mybb->input['find'][$sid], ""), array_keys($mybb->input['find'][$sid], " ")) as $key)
{
unset($mybb->input['find'][$sid][$key]);
}
$mybb->input['find'][$sid] = implode("\n", $mybb->input['find'][$sid]);


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

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

Zeile 614Zeile 625
	{
$mybb->input['path'] = 'images/smilies/';
$mybb->input['showclickable'] = 1;

	{
$mybb->input['path'] = 'images/smilies/';
$mybb->input['showclickable'] = 1;

	}

if(!$mybb->input['disporder'])

	}

if(!$mybb->input['disporder'])

	{
$query = $db->simple_select("smilies", "max(disporder) as dispordermax");
$mybb->input['disporder'] = $db->fetch_field($query, "dispordermax")+1;

	{
$query = $db->simple_select("smilies", "max(disporder) as dispordermax");
$mybb->input['disporder'] = $db->fetch_field($query, "dispordermax")+1;

Zeile 634Zeile 645
	while($smilie = $db->fetch_array($query))
{
$smilie['image'] = str_replace("{theme}", "images", $smilie['image']);

	while($smilie = $db->fetch_array($query))
{
$smilie['image'] = str_replace("{theme}", "images", $smilie['image']);

		if(my_strpos($smilie['image'], "p://") || substr($smilie['image'], 0, 1) == "/")

		if(my_validate_url($smilie['image'], true))

		{

		{

			$image = $smilie['image'];

			$image = htmlspecialchars_uni($smilie['image']);

		}
else
{

		}
else
{

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

			$image = "../".htmlspecialchars_uni($smilie['image']);

		}

		}


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

Zeile 652Zeile 660
		$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->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->construct_row();
}


	if($form_container->num_rows() == 0)
{
$form_container->output_cell($lang->no_smilies, array('colspan' => 6));
$form_container->construct_row();

	if($form_container->num_rows() == 0)
{
$form_container->output_cell($lang->no_smilies, array('colspan' => 6));
$form_container->construct_row();

	}

$form_container->end();


	}

$form_container->end();


	$buttons[] = $form->generate_submit_button($lang->save_smilies);
$buttons[] = $form->generate_reset_button($lang->reset);


	$buttons[] = $form->generate_submit_button($lang->save_smilies);
$buttons[] = $form->generate_reset_button($lang->reset);


Zeile 677Zeile 685
	$plugins->run_hooks("admin_config_smilies_start");

$page->output_header($lang->manage_smilies);

	$plugins->run_hooks("admin_config_smilies_start");

$page->output_header($lang->manage_smilies);





	$sub_tabs['manage_smilies'] = array(
'title' => $lang->manage_smilies,
'link' => "index.php?module=config-smilies",
'description' => $lang->manage_smilies_desc

	$sub_tabs['manage_smilies'] = array(
'title' => $lang->manage_smilies,
'link' => "index.php?module=config-smilies",
'description' => $lang->manage_smilies_desc

	);

	);

	$sub_tabs['add_smilie'] = array(
'title' => $lang->add_smilie,
'link' => "index.php?module=config-smilies&amp;action=add",

	$sub_tabs['add_smilie'] = array(
'title' => $lang->add_smilie,
'link' => "index.php?module=config-smilies&amp;action=add",

Zeile 697Zeile 705
	);

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

	);

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

 

$query = $db->simple_select("smilies", "COUNT(sid) as smilies");
$total_rows = $db->fetch_field($query, "smilies");


$pagenum = $mybb->get_input('page', MyBB::INPUT_INT);
if($pagenum)
{
$start = ($pagenum-1) * 20;


$pagenum = $mybb->get_input('page', MyBB::INPUT_INT);
if($pagenum)
{
$start = ($pagenum-1) * 20;

 
		$pages = ceil($total_rows / 20);
if($pagenum > $pages)
{
$start = 0;
$pagenum = 1;
}

	}
else
{

	}
else
{

Zeile 720Zeile 737
	while($smilie = $db->fetch_array($query))
{
$smilie['image'] = str_replace("{theme}", "images", $smilie['image']);

	while($smilie = $db->fetch_array($query))
{
$smilie['image'] = str_replace("{theme}", "images", $smilie['image']);

		if(my_strpos($smilie['image'], "p://") || substr($smilie['image'], 0, 1) == "/")

		if(my_validate_url($smilie['image'], true))

		{

		{

			$image = $smilie['image'];
$smilie['image'] = str_replace("{theme}", "images", $smilie['image']);

			$image = htmlspecialchars_uni($smilie['image']);


		}
else
{

		}
else
{

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

			$image = "../".htmlspecialchars_uni($smilie['image']);

		}

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

		}

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

Zeile 746Zeile 762
	}

$table->output($lang->manage_smilies);

	}

$table->output($lang->manage_smilies);


$query = $db->simple_select("smilies", "COUNT(sid) as smilies");
$total_rows = $db->fetch_field($query, "smilies");

 

echo "<br />".draw_admin_pagination($pagenum, "20", $total_rows, "index.php?module=config-smilies&amp;page={page}");



echo "<br />".draw_admin_pagination($pagenum, "20", $total_rows, "index.php?module=config-smilies&amp;page={page}");