Vergleich admin/modules/style/templates.php - 1.8.9 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 102Zeile 102
$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title', 'order_dir' => 'ASC'));
while($template_set = $db->fetch_array($query))
{

$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title', 'order_dir' => 'ASC'));
while($template_set = $db->fetch_array($query))
{

	$template_sets[$template_set['sid']] = $template_set['title'];

	$template_sets[$template_set['sid']] = htmlspecialchars_uni($template_set['title']);

}

$plugins->run_hooks("admin_style_templates");

}

$plugins->run_hooks("admin_style_templates");

Zeile 157Zeile 157
	$form = new Form("index.php?module=style-templates&action=add_set", "post", "add_set");

$form_container = new FormContainer($lang->add_set);

	$form = new Form("index.php?module=style-templates&action=add_set", "post", "add_set");

$form_container = new FormContainer($lang->add_set);

	$form_container->output_row($lang->title, "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');

	$form_container->output_row($lang->title, "", $form->generate_text_box('title', htmlspecialchars_uni($mybb->input['title']), array('id' => 'title')), 'title');

	$form_container->end();

$buttons = array();

	$form_container->end();

$buttons = array();

Zeile 254Zeile 254
	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js"></script>
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1808"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">

<link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1821"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">

';
}


';
}


Zeile 620Zeile 620
	if($errors)
{
$template = $mybb->input;

	if($errors)
{
$template = $mybb->input;

	}

	}

	else
{
$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND (sid='-2' OR sid='{$sid}')", array('order_by' => 'sid', 'order_dir' => 'DESC', 'limit' => 1));

	else
{
$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND (sid='-2' OR sid='{$sid}')", array('order_by' => 'sid', 'order_dir' => 'DESC', 'limit' => 1));

Zeile 629Zeile 629
	$template['title'] = htmlspecialchars_uni($template['title']);

if($admin_options['codepress'] != 0)

	$template['title'] = htmlspecialchars_uni($template['title']);

if($admin_options['codepress'] != 0)

	{

	{

		$page->extra_header .= '

		$page->extra_header .= '

<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js"></script>
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1808"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">

<link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1821"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">

';

';

	}

$page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&amp;sid={$sid}{$expand_str}");


	}

$page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&amp;sid={$sid}{$expand_str}");


	if(!isset($mybb->input['from']))
{
$mybb->input['from'] = '';

	if(!isset($mybb->input['from']))
{
$mybb->input['from'] = '';

Zeile 659Zeile 659
	if($mybb->input['from'] == "diff_report")
{
$page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&amp;action=find_updated");

	if($mybb->input['from'] == "diff_report")
{
$page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&amp;action=find_updated");

	}

$page->add_breadcrumb_item($lang->edit_template_breadcrumb.$template['title'], "index.php?module=style-templates&amp;sid={$sid}");


	}

$page->add_breadcrumb_item($lang->edit_template_breadcrumb.$template['title'], "index.php?module=style-templates&amp;sid={$sid}");


	$page->output_header($lang->sprintf($lang->editing_template, $template['title']));

	$page->output_header($lang->sprintf($lang->editing_template, $template['title']));







	$sub_tabs = array();

if($mybb->input['from'] == "diff_report")

	$sub_tabs = array();

if($mybb->input['from'] == "diff_report")

Zeile 685Zeile 685
		'title' => $lang->edit_template,
'link' => "index.php?module=style-templates&amp;action=edit_template&amp;title=".htmlspecialchars_uni($template['title']).$expand_str,
'description' => $lang->edit_template_desc

		'title' => $lang->edit_template,
'link' => "index.php?module=style-templates&amp;action=edit_template&amp;title=".htmlspecialchars_uni($template['title']).$expand_str,
'description' => $lang->edit_template_desc

	);

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

if($errors)
{

	);

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

if($errors)
{

		$page->output_inline_error($errors);
}


		$page->output_inline_error($errors);
}


Zeile 700Zeile 700
	if($mybb->input['from'] == "diff_report")
{
echo $form->generate_hidden_field('from', "diff_report");

	if($mybb->input['from'] == "diff_report")
{
echo $form->generate_hidden_field('from', "diff_report");

	}


	}


	$form_container = new FormContainer($lang->edit_template_breadcrumb.$template['title'], 'tfixed');
$form_container->output_row($lang->template_name, $lang->template_name_desc, $form->generate_text_box('title', $template['title'], array('id' => 'title')), 'title');

	$form_container = new FormContainer($lang->edit_template_breadcrumb.$template['title'], 'tfixed');
$form_container->output_row($lang->template_name, $lang->template_name_desc, $form->generate_text_box('title', $template['title'], array('id' => 'title')), 'title');





	// Force users to save the default template to a specific set, rather than the "global" templates - where they can delete it
if($template['sid'] == "-2")
{

	// Force users to save the default template to a specific set, rather than the "global" templates - where they can delete it
if($template['sid'] == "-2")
{

Zeile 718Zeile 718

$buttons[] = $form->generate_submit_button($lang->save_continue, array('name' => 'continue'));
$buttons[] = $form->generate_submit_button($lang->save_close, array('name' => 'close'));


$buttons[] = $form->generate_submit_button($lang->save_continue, array('name' => 'continue'));
$buttons[] = $form->generate_submit_button($lang->save_close, array('name' => 'close'));





	$form->output_submit_wrapper($buttons);

$form->end();

	$form->output_submit_wrapper($buttons);

$form->end();

Zeile 742Zeile 742

$page->output_footer();
}


$page->output_footer();
}





if($mybb->input['action'] == "edit_template_group")
{
$query = $db->simple_select("templategroups", "*", "gid = '".$mybb->get_input('gid', MyBB::INPUT_INT)."'");

if($mybb->input['action'] == "edit_template_group")
{
$query = $db->simple_select("templategroups", "*", "gid = '".$mybb->get_input('gid', MyBB::INPUT_INT)."'");





	if(!$db->num_rows($query))
{
flash_message($lang->error_missing_template_group, 'error');

	if(!$db->num_rows($query))
{
flash_message($lang->error_missing_template_group, 'error');

		admin_redirect("index.php?module=style-templates&amp;sid={$sid}{$expand_str}");
}


		admin_redirect("index.php?module=style-templates&amp;sid={$sid}{$expand_str}");
}


	$template_group = $db->fetch_array($query);
if(isset($template_group['isdefault']) && $template_group['isdefault'] == 1)
{
flash_message($lang->error_default_template_group, 'error');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}{$expand_str}");
}

	$template_group = $db->fetch_array($query);
if(isset($template_group['isdefault']) && $template_group['isdefault'] == 1)
{
flash_message($lang->error_default_template_group, 'error');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}{$expand_str}");
}





	$plugins->run_hooks("admin_style_templates_edit_template_group");

$errors = array();

	$plugins->run_hooks("admin_style_templates_edit_template_group");

$errors = array();

Zeile 774Zeile 774
		if(strpos($prefix, "_") !== false)
{
$errors[] = $lang->error_invalid_group_title;

		if(strpos($prefix, "_") !== false)
{
$errors[] = $lang->error_invalid_group_title;

		}

		}


$title = trim($mybb->input['title']);
if(!$title)


$title = trim($mybb->input['title']);
if(!$title)

Zeile 808Zeile 808

$db->update_query('templategroups', $update_array, "gid = '{$template_group['gid']}'");



$db->update_query('templategroups', $update_array, "gid = '{$template_group['gid']}'");


				log_admin_action($template_group['gid'], htmlspecialchars_uni($title));

				log_admin_action($template_group['gid'], $title);

				flash_message($lang->success_template_group_saved, 'success');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}

				flash_message($lang->success_template_group_saved, 'success');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}

Zeile 860Zeile 860
			// Search and replace in templates

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

			// Search and replace in templates

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

			{
flash_message($lang->search_noneset, "error");

			{
flash_message($lang->search_noneset, "error");

				admin_redirect("index.php?module=style-templates&action=search_replace");
}
else

				admin_redirect("index.php?module=style-templates&action=search_replace");
}
else

Zeile 945Zeile 945
											"version" => $mybb->version_code,
"status" => '',
"dateline" => TIME_NOW

											"version" => $mybb->version_code,
"status" => '',
"dateline" => TIME_NOW

										);

										);

										$new_tid = $db->insert_query("templates", $new_template);
$label = $lang->sprintf($lang->search_created_custom, $template['title']);
$url = "index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid=1";

										$new_tid = $db->insert_query("templates", $new_template);
$label = $lang->sprintf($lang->search_created_custom, $template['title']);
$url = "index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid=1";

									}

									}

									else
{
// The template is a custom template. Replace as normal.

									else
{
// The template is a custom template. Replace as normal.

Zeile 959Zeile 959
										);
$db->update_query("templates", $updatedtemplate, "tid='".$template['tid']."'");
$label = $lang->sprintf($lang->search_updated, $template['title']);

										);
$db->update_query("templates", $updatedtemplate, "tid='".$template['tid']."'");
$label = $lang->sprintf($lang->search_updated, $template['title']);

										$url = "index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid={$template['sid']}";

										$url = "index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid={$template['sid']}";

									}
}
else
{
// Just show that the term was found
if($template['sid'] == -2)

									}
}
else
{
// Just show that the term was found
if($template['sid'] == -2)

									{

									{

										$label = $lang->sprintf($lang->search_found, $template['title']);
}
else
{
$label = $lang->sprintf($lang->search_found, $template['title']);
$url = "index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid={$template['sid']}";

										$label = $lang->sprintf($lang->search_found, $template['title']);
}
else
{
$label = $lang->sprintf($lang->search_found, $template['title']);
$url = "index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid={$template['sid']}";

									}

									}

								}
}
else

								}
}
else

Zeile 1029Zeile 1029
				{
// Log admin action - only if replace
log_admin_action($mybb->input['find'], $mybb->input['replace']);

				{
// Log admin action - only if replace
log_admin_action($mybb->input['find'], $mybb->input['replace']);

				}

				}


$page->output_footer();
exit;


$page->output_footer();
exit;

			}

			}

		}
else
{

		}
else
{

Zeile 1047Zeile 1047
				// Search Template Titles

$templatessets = array();

				// Search Template Titles

$templatessets = array();





				$templates_sets = array();
// Get the names of all template sets
$template_sets[-2] = $lang->master_templates;

				$templates_sets = array();
// Get the names of all template sets
$template_sets[-2] = $lang->master_templates;

Zeile 1057Zeile 1057

$query = $db->simple_select("templatesets", "sid, title");
while($set = $db->fetch_array($query))


$query = $db->simple_select("templatesets", "sid, title");
while($set = $db->fetch_array($query))

				{

				{

					$template_sets[$set['sid']] = $set['title'];
}


					$template_sets[$set['sid']] = $set['title'];
}


Zeile 1078Zeile 1078
						if(!$template['customtid'])
{
$template['original'] = true;

						if(!$template['customtid'])
{
$template['original'] = true;

						}

						}

						else
{
$template['modified'] = true;
}
}
else

						else
{
$template['modified'] = true;
}
}
else

					{

					{

						$template['original'] = false;
$template['modified'] = false;
}

						$template['original'] = false;
$template['modified'] = false;
}

Zeile 1169Zeile 1169
						$table->output();
}
}

						$table->output();
}
}





				$page->output_footer();
exit;
}
}

				$page->output_footer();
exit;
}
}

	}


	}


	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js"></script>
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1808"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">

<link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1821"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">

';
}

';
}





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

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





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

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





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

$form = new Form("index.php?module=style-templates&amp;action=search_replace", "post", "do_template");

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

$form = new Form("index.php?module=style-templates&amp;action=search_replace", "post", "do_template");

Zeile 1210Zeile 1210
	$form_container->output_row($lang->search_for, "", $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find', 'class' => '', 'style' => 'width: 100%; height: 200px;')));

$form_container->output_row($lang->replace_with, "", $form->generate_text_area('replace', $mybb->input['replace'], array('id' => 'replace', 'class' => '', 'style' => 'width: 100%; height: 200px;')));

	$form_container->output_row($lang->search_for, "", $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find', 'class' => '', 'style' => 'width: 100%; height: 200px;')));

$form_container->output_row($lang->replace_with, "", $form->generate_text_area('replace', $mybb->input['replace'], array('id' => 'replace', 'class' => '', 'style' => 'width: 100%; height: 200px;')));

	$form_container->end();

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

	$form_container->end();

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


$form->output_submit_wrapper($buttons);



$form->output_submit_wrapper($buttons);


Zeile 1324Zeile 1324
		FROM ".TABLE_PREFIX."templates t
LEFT JOIN ".TABLE_PREFIX."templates m ON (m.title=t.title AND m.sid=-2 AND m.version > t.version)
WHERE t.sid > 0 AND m.template != t.template

		FROM ".TABLE_PREFIX."templates t
LEFT JOIN ".TABLE_PREFIX."templates m ON (m.title=t.title AND m.sid=-2 AND m.version > t.version)
WHERE t.sid > 0 AND m.template != t.template

		ORDER BY t.sid ASC, title ASC
");

		ORDER BY t.sid ASC, t.title ASC
");

	while($template = $db->fetch_array($query))
{
$templates[$template['sid']][] = $template;

	while($template = $db->fetch_array($query))
{
$templates[$template['sid']][] = $template;

Zeile 1334Zeile 1334
	foreach($templates as $sid => $templates)
{
if(!$done_set[$sid])

	foreach($templates as $sid => $templates)
{
if(!$done_set[$sid])

		{
$table->construct_header($templatesets[$sid]['title'], array("colspan" => 2));


		{
$table->construct_header(htmlspecialchars_uni($templatesets[$sid]['title']), array("colspan" => 2));


			$done_set[$sid] = 1;
++$count;

			$done_set[$sid] = 1;
++$count;

		}

		}


foreach($templates as $template)
{


foreach($templates as $template)
{

Zeile 1352Zeile 1352
			$table->construct_cell($popup->fetch(), array("class" => "align_center"));

$table->construct_row();

			$table->construct_cell($popup->fetch(), array("class" => "align_center"));

$table->construct_row();

		}


		}


		if($done_set[$sid] && !$done_output[$sid])
{
$done_output[$sid] = 1;
if($count == 1)

		if($done_set[$sid] && !$done_output[$sid])
{
$done_output[$sid] = 1;
if($count == 1)

			{

			{

				$table->output($lang->find_updated);
}
else

				$table->output($lang->find_updated);
}
else

Zeile 1375Zeile 1375
{
$gid = $mybb->get_input('gid', MyBB::INPUT_INT);
$query = $db->simple_select("templategroups", "*", "gid='{$gid}'");

{
$gid = $mybb->get_input('gid', MyBB::INPUT_INT);
$query = $db->simple_select("templategroups", "*", "gid='{$gid}'");





	if(!$db->num_rows($query))
{
flash_message($lang->error_missing_template_group, 'error');

	if(!$db->num_rows($query))
{
flash_message($lang->error_missing_template_group, 'error');

		admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}


		admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}


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

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

	{
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}

$plugins->run_hooks("admin_style_template_group_delete");


	{
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}

$plugins->run_hooks("admin_style_template_group_delete");


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

if($mybb->request_method == "post")
{
// Delete the group
$db->delete_query("templategroups", "gid = '{$template_group['gid']}'");

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

if($mybb->request_method == "post")
{
// Delete the group
$db->delete_query("templategroups", "gid = '{$template_group['gid']}'");





		$plugins->run_hooks("admin_style_template_group_delete_commit");

// Log admin action

		$plugins->run_hooks("admin_style_template_group_delete_commit");

// Log admin action

		log_admin_action($template_group['gid'], htmlspecialchars_uni($template_group['title']));

		log_admin_action($template_group['gid'], $template_group['title']);


flash_message($lang->success_template_group_deleted, 'success');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");


flash_message($lang->success_template_group_deleted, 'success');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");

	}

	}

	else
{
$page->output_confirm_action("index.php?module=style-templates&amp;action=delete_template_group&amp;gid={$template_group['gid']}&amp;sid={$sid}", $lang->confirm_template_group_delete);

	else
{
$page->output_confirm_action("index.php?module=style-templates&amp;action=delete_template_group&amp;gid={$template_group['gid']}&amp;sid={$sid}", $lang->confirm_template_group_delete);

	}
}


	}
}


if($mybb->input['action'] == "delete_set")
{
$query = $db->simple_select("templatesets", "*", "sid='{$sid}' AND sid > 0");

if($mybb->input['action'] == "delete_set")
{
$query = $db->simple_select("templatesets", "*", "sid='{$sid}' AND sid > 0");

Zeile 1436Zeile 1436
			admin_redirect("index.php?module=style-templates");
break;
}

			admin_redirect("index.php?module=style-templates");
break;
}

	}


	}


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

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

	{
admin_redirect("index.php?module=style-templates");
}


	{
admin_redirect("index.php?module=style-templates");
}


	if($mybb->request_method == "post")
{
// Delete the templateset

	if($mybb->request_method == "post")
{
// Delete the templateset

Zeile 1457Zeile 1457
		log_admin_action($set['sid'], $set['title']);

flash_message($lang->success_template_set_deleted, 'success');

		log_admin_action($set['sid'], $set['title']);

flash_message($lang->success_template_set_deleted, 'success');

		admin_redirect("index.php?module=style-templates");
}
else
{
$page->output_confirm_action("index.php?module=style-templates&amp;action=delete_set&amp;sid={$set['sid']}", $lang->confirm_template_set_deletion);
}

}


		admin_redirect("index.php?module=style-templates");
}
else
{
$page->output_confirm_action("index.php?module=style-templates&amp;action=delete_set&amp;sid={$set['sid']}", $lang->confirm_template_set_deletion);
}

}


if($mybb->input['action'] == "delete_template")
{
$query = $db->query("

if($mybb->input['action'] == "delete_template")
{
$query = $db->query("

Zeile 1549Zeile 1549
	$template1 = $db->fetch_array($query);

$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".$mybb->get_input('sid2', MyBB::INPUT_INT)."'");

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

$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".$mybb->get_input('sid2', MyBB::INPUT_INT)."'");

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

if($mybb->input['sid2'] == -2)
{

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

if($mybb->input['sid2'] == -2)
{

		$sub_tabs['full_edit'] = array(
'title' => $lang->full_edit,
'link' => "index.php?module=style-templates&action=edit_template&title=".urlencode($template1['title'])."&sid=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&amp;from=diff_report",

		$sub_tabs['full_edit'] = array(
'title' => $lang->full_edit,
'link' => "index.php?module=style-templates&action=edit_template&title=".urlencode($template1['title'])."&sid=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&amp;from=diff_report",

Zeile 1869Zeile 1869
			$table->construct_cell("<a href=\"index.php?module=style-templates&amp;sid={$sid}{$group['expand_str']}#group_{$group['gid']}\">{$expand}</a>", array("class" => "align_center"));
$table->construct_row(array("class" => "alt_row", "id" => "group_".$group['gid'], "name" => "group_".$group['gid']));


			$table->construct_cell("<a href=\"index.php?module=style-templates&amp;sid={$sid}{$group['expand_str']}#group_{$group['gid']}\">{$expand}</a>", array("class" => "align_center"));
$table->construct_row(array("class" => "alt_row", "id" => "group_".$group['gid'], "name" => "group_".$group['gid']));


			if(isset($group['templates']) && count($group['templates']) > 0)

			if(isset($group['templates']) && is_array($group['templates']) && count($group['templates']) > 0)

			{
$templates = $group['templates'];
ksort($templates);

			{
$templates = $group['templates'];
ksort($templates);

Zeile 1900Zeile 1900
						$template['pretty_title'] = "<span style=\"color: blue;\">{$template['title']}</span>";
}


						$template['pretty_title'] = "<span style=\"color: blue;\">{$template['title']}</span>";
}


					$table->construct_cell("<span style=\"padding: 20px;\"><a href=\"index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid={$sid}{$expand_str}\" >{$template['pretty_title']}</a></span>");

					$table->construct_cell("<span style=\"padding-left: 20px;\"><a href=\"index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid={$sid}{$expand_str}\" >{$template['pretty_title']}</a></span>");

					$table->construct_cell($popup->fetch(), array("class" => "align_center"));

$table->construct_row();

					$table->construct_cell($popup->fetch(), array("class" => "align_center"));

$table->construct_row();

Zeile 2003Zeile 2003

$actions = $popup->fetch();
}


$actions = $popup->fetch();
}

 

$set['title'] = htmlspecialchars_uni($set['title']);


$table->construct_cell("<strong><a href=\"index.php?module=style-templates&amp;sid={$set['sid']}\">{$set['title']}</a></strong><br /><small>{$used_by_note}</small>");
$table->construct_cell($actions, array("class" => "align_center"));


$table->construct_cell("<strong><a href=\"index.php?module=style-templates&amp;sid={$set['sid']}\">{$set['title']}</a></strong><br /><small>{$used_by_note}</small>");
$table->construct_cell($actions, array("class" => "align_center"));