Vergleich admin/modules/config/post_icons.php - 1.8.17 - 1.8.36

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
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->name." <em>*</em>", $lang->name_desc, $form->generate_text_box('name', $mybb->get_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();

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

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





	$form->output_submit_wrapper($buttons);

	$form->output_submit_wrapper($buttons);





	$form->end();

$page->output_footer();

	$form->end();

$page->output_footer();

Zeile 111Zeile 111
			if(!trim($mybb->input['pathfolder']))
{
$errors[] = $lang->error_missing_path_multiple;

			if(!trim($mybb->input['pathfolder']))
{
$errors[] = $lang->error_missing_path_multiple;

			}


			}


			$path = $mybb->input['pathfolder'];
$dir = @opendir(MYBB_ROOT.$path);
if(!$dir)
{
$errors[] = $lang->error_invalid_path;

			$path = $mybb->input['pathfolder'];
$dir = @opendir(MYBB_ROOT.$path);
if(!$dir)
{
$errors[] = $lang->error_invalid_path;

			}


			}


			if(substr($path, -1, 1) !== "/")
{
$path .= "/";

			if(substr($path, -1, 1) !== "/")
{
$path .= "/";

			}


			}


			$query = $db->simple_select("icons");

$aicons = array();

			$query = $db->simple_select("icons");

$aicons = array();

Zeile 137Zeile 137
			if(!$errors)
{
while($file = readdir($dir))

			if(!$errors)
{
while($file = readdir($dir))

				{

				{

					if($file != ".." && $file != ".")
{
$ext = get_extension($file);
if($ext == "gif" || $ext == "jpg" || $ext == "jpeg" || $ext == "png" || $ext == "bmp")
{

					if($file != ".." && $file != ".")
{
$ext = get_extension($file);
if($ext == "gif" || $ext == "jpg" || $ext == "jpeg" || $ext == "png" || $ext == "bmp")
{

							if(!$aicons[$path.$file])

							if(!isset($aicons[$path.$file]))

							{
$icons[] = $file;
}

							{
$icons[] = $file;
}

Zeile 288Zeile 288
	}

$form_container = new FormContainer($lang->add_multiple_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();

	$form_container->output_row($lang->path_to_images." <em>*</em>", $lang->path_to_images_desc, $form->generate_text_box('pathfolder', $mybb->get_input('pathfolder'), array('id' => 'pathfolder')), 'pathfolder');
$form_container->end();


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



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


Zeile 390Zeile 390
	if(!$icon['iid'])
{
flash_message($lang->error_invalid_post_icon, 'error');

	if(!$icon['iid'])
{
flash_message($lang->error_invalid_post_icon, 'error');

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

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

	}

// User clicked no

	}

// User clicked no

	if($mybb->input['no'])

	if($mybb->get_input('no'))

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

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

Zeile 444Zeile 444
	);

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

	);

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

 

$query = $db->simple_select("icons", "COUNT(iid) AS icons");
$total_rows = $db->fetch_field($query, "icons");


$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 468Zeile 477
		if(my_validate_url($icon['path'], true))
{
$image = $icon['path'];

		if(my_validate_url($icon['path'], true))
{
$image = $icon['path'];

		}

		}

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

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

Zeile 479Zeile 488

$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("<a href=\"index.php?module=config-post_icons&amp;action=delete&amp;iid={$icon['iid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_post_icon_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));


$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("<a href=\"index.php?module=config-post_icons&amp;action=delete&amp;iid={$icon['iid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_post_icon_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));

		$table->construct_row();
}

		$table->construct_row();
}


if($table->num_rows() == 0)
{


if($table->num_rows() == 0)
{

Zeile 489Zeile 498
	}

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

	}

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


$query = $db->simple_select("icons", "COUNT(iid) AS icons");
$total_rows = $db->fetch_field($query, "icons");

 

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



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