Vergleich admin/modules/config/post_icons.php - 1.8.0 - 1.8.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 42Zeile 42
			);

$iid = $db->insert_query("icons", $new_icon);

			);

$iid = $db->insert_query("icons", $new_icon);


$cache->update_posticons();

 

$plugins->run_hooks("admin_config_post_icons_add_commit");


$plugins->run_hooks("admin_config_post_icons_add_commit");

 

$cache->update_posticons();


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


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

Zeile 53Zeile 53
			flash_message($lang->success_post_icon_added, 'success');
admin_redirect('index.php?module=config-post_icons');
}

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

	}

	}


$page->add_breadcrumb_item($lang->add_post_icon);
$page->output_header($lang->post_icons." - ".$lang->add_post_icon);


$page->add_breadcrumb_item($lang->add_post_icon);
$page->output_header($lang->post_icons." - ".$lang->add_post_icon);

Zeile 75Zeile 75
	);

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

	);

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





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

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

Zeile 87Zeile 87

$form = new Form("index.php?module=config-post_icons&action=add", "post", "add");
$form_container = new FormContainer($lang->add_post_icon);


$form = new Form("index.php?module=config-post_icons&action=add", "post", "add");
$form_container = new FormContainer($lang->add_post_icon);

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

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

	$form_container->end();

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

	$form_container->end();

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

Zeile 246Zeile 246
				}
}


				}
}


			$cache->update_posticons();

$plugins->run_hooks("admin_config_post_icons_add_multiple_commit");

			$plugins->run_hooks("admin_config_post_icons_add_multiple_commit");

$cache->update_posticons();


// Log admin action
log_admin_action();


// Log admin action
log_admin_action();

Zeile 257Zeile 257
			admin_redirect("index.php?module=config-post_icons");
}
}

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





	$page->add_breadcrumb_item($lang->add_multiple_post_icons);
$page->output_header($lang->post_icons." - ".$lang->add_multiple_post_icons);

	$page->add_breadcrumb_item($lang->add_multiple_post_icons);
$page->output_header($lang->post_icons." - ".$lang->add_multiple_post_icons);





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

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

Zeile 269Zeile 269
	$sub_tabs['add_icon'] = array(
'title' => $lang->add_post_icon,
'link' => "index.php?module=config-post_icons&amp;action=add"

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

	);

	);


$sub_tabs['add_multiple'] = array(
'title' => $lang->add_multiple_post_icons,


$sub_tabs['add_multiple'] = array(
'title' => $lang->add_multiple_post_icons,

Zeile 281Zeile 281

$form = new Form("index.php?module=config-post_icons&amp;action=add_multiple", "post", "add_multiple");
echo $form->generate_hidden_field("step", "1");


$form = new Form("index.php?module=config-post_icons&amp;action=add_multiple", "post", "add_multiple");
echo $form->generate_hidden_field("step", "1");





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

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

	}


	}


	$form_container = new FormContainer($lang->add_multiple_post_icons);
$form_container->output_row($lang->path_to_images." <em>*</em>", $lang->path_to_images_desc, $form->generate_text_box('pathfolder', $mybb->input['pathfolder'], array('id' => 'pathfolder')), 'pathfolder');
$form_container->end();

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

	$form_container = new FormContainer($lang->add_multiple_post_icons);
$form_container->output_row($lang->path_to_images." <em>*</em>", $lang->path_to_images_desc, $form->generate_text_box('pathfolder', $mybb->input['pathfolder'], array('id' => 'pathfolder')), 'pathfolder');
$form_container->end();

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





	$form->output_submit_wrapper($buttons);
$form->end();

$page->output_footer();
}

	$form->output_submit_wrapper($buttons);
$form->end();

$page->output_footer();
}





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

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

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

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

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

if(!$icon['iid'])

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

if(!$icon['iid'])

Zeile 315Zeile 315
	if($mybb->request_method == "post")
{
if(!trim($mybb->input['name']))

	if($mybb->request_method == "post")
{
if(!trim($mybb->input['name']))

		{

		{

			$errors[] = $lang->error_missing_name;

			$errors[] = $lang->error_missing_name;

		}


		}


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

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

		{

		{

			$errors[] = $lang->error_missing_path;
}

			$errors[] = $lang->error_missing_path;
}





		if(!$errors)
{
$updated_icon = array(

		if(!$errors)
{
$updated_icon = array(

Zeile 331Zeile 331
				'path'	=> $db->escape_string($mybb->input['path'])
);


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


			$db->update_query("icons", $updated_icon, "iid='".(int)$mybb->input['iid']."'");

$cache->update_posticons();

			$plugins->run_hooks("admin_config_post_icons_edit_commit");

$db->update_query("icons", $updated_icon, "iid='{$icon['iid']}'");





			$plugins->run_hooks("admin_config_post_icons_edit_commit");

			$cache->update_posticons();


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


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

Zeile 384Zeile 384

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


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

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

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

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

if(!$icon['iid'])

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

if(!$icon['iid'])

Zeile 404Zeile 404
	if($mybb->request_method == "post")
{
$db->delete_query("icons", "iid='{$icon['iid']}'");

	if($mybb->request_method == "post")
{
$db->delete_query("icons", "iid='{$icon['iid']}'");


$cache->update_posticons();

 

$plugins->run_hooks("admin_config_post_icons_delete_commit");


$plugins->run_hooks("admin_config_post_icons_delete_commit");

 

$cache->update_posticons();


// Log admin action
log_admin_action($icon['iid'], $icon['name']);


// Log admin action
log_admin_action($icon['iid'], $icon['name']);

Zeile 445Zeile 445

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



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


	$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 465Zeile 465
	while($icon = $db->fetch_array($query))
{
$icon['path'] = str_replace("{theme}", "images", $icon['path']);

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

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

		if(my_validate_url($icon['path'], true))

		{
$image = $icon['path'];
}

		{
$image = $icon['path'];
}

Zeile 474Zeile 474
			$image = "../".$icon['path'];
}


			$image = "../".$icon['path'];
}


		$table->construct_cell("<img src=\"{$image}\" alt=\"\" />", array("class" => "align_center"));

		$table->construct_cell("<img src=\"".htmlspecialchars_uni($image)."\" alt=\"\" />", array("class" => "align_center"));

		$table->construct_cell(htmlspecialchars_uni($icon['name']));

$table->construct_cell("<a href=\"index.php?module=config-post_icons&amp;action=edit&amp;iid={$icon['iid']}\">{$lang->edit}</a>", array("class" => "align_center"));

		$table->construct_cell(htmlspecialchars_uni($icon['name']));

$table->construct_cell("<a href=\"index.php?module=config-post_icons&amp;action=edit&amp;iid={$icon['iid']}\">{$lang->edit}</a>", array("class" => "align_center"));