Vergleich admin/modules/style/templates.php - 1.6.2 - 1.6.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: templates.php 5150 2010-07-31 01:46:18Z RyanGordon $

 * $Id: templates.php 5812 2012-04-20 11:48:27Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 60Zeile 60
		'description' => $lang->find_updated_desc
);
}

		'description' => $lang->find_updated_desc
);
}

else if(($sid && !$mybb->input['action']) || $mybb->input['action'] == "edit_set" || $mybb->input['action'] == "edit_template")

else if(($sid && !$mybb->input['action']) || $mybb->input['action'] == "edit_set" || $mybb->input['action'] == "check_set" || $mybb->input['action'] == "edit_template")

{
$sub_tabs['manage_templates'] = array(
'title' => $lang->manage_templates,

{
$sub_tabs['manage_templates'] = array(
'title' => $lang->manage_templates,

Zeile 385Zeile 385
		{
$errors[] = $lang->error_missing_title;
}

		{
$errors[] = $lang->error_missing_title;
}

		








// Are we trying to do malicious things in our template?
if(check_template($mybb->input['template']))
{
$errors[] = $lang->error_security_problem;
}


		if(!$errors)
{
$query = $db->simple_select("templates", "*", "tid='{$mybb->input['tid']}'");

		if(!$errors)
{
$query = $db->simple_select("templates", "*", "tid='{$mybb->input['tid']}'");

Zeile 418Zeile 424
				else
{
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");

				else
{
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");

				}
}
else

				}
}
else

			{
// Global template set
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");
}


			{
// Global template set
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");
}


			$plugins->run_hooks("admin_style_templates_edit_template_commit");


			$plugins->run_hooks("admin_style_templates_edit_template_commit");


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


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


Zeile 438Zeile 444
			$group = $db->fetch_field($query, "gid");

if(!$group)

			$group = $db->fetch_field($query, "gid");

if(!$group)

			{

			{

				$group = "-1";
}


				$group = "-1";
}


Zeile 471Zeile 477
			}
}
}

			}
}
}

	
if($errors)
{
$page->output_inline_error($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 491Zeile 496
	<script type="text/javascript">
CodePress.language = \'mybb\';
</script>';

	<script type="text/javascript">
CodePress.language = \'mybb\';
</script>';

	}

	}

	
$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($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->output_header($lang->edit_template);

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

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

	





	$sub_tabs = array();

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

	$sub_tabs = array();

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

Zeile 526Zeile 532
	);

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

	);

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

	







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


	$form = new Form("index.php?module=style-templates&amp;action=edit_template{$expand_str}", "post", "edit_template");
echo $form->generate_hidden_field('tid', $template['tid'])."\n";


	$form = new Form("index.php?module=style-templates&amp;action=edit_template{$expand_str}", "post", "edit_template");
echo $form->generate_hidden_field('tid', $template['tid'])."\n";


Zeile 649Zeile 660
						{
// Do replacement
$newtemplate = str_ireplace($mybb->input['find'], $mybb->input['replace'], $template['template']);

						{
// Do replacement
$newtemplate = str_ireplace($mybb->input['find'], $mybb->input['replace'], $template['template']);

							if($newtemplate != $template['template'])

							if($newtemplate != $template['template'] && check_template($newtemplate) === false)

							{
// If the template is different, that means the search term has been found.
if(trim($mybb->input['replace']) != "")

							{
// If the template is different, that means the search term has been found.
if(trim($mybb->input['replace']) != "")

Zeile 692Zeile 703
									{
$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']);
$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

							else
{
// Just show that the term was found

Zeile 1042Zeile 1053
		}

foreach($templates as $template)

		}

foreach($templates as $template)

		{		

		{

			$popup = new PopupMenu("template_{$template['tid']}", $lang->options);
$popup->add_item($lang->full_edit, "index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid={$sid}&amp;from=diff_report");
$popup->add_item($lang->diff_report, "index.php?module=style-templates&amp;action=diff_report&amp;title=".urlencode($template['title'])."&amp;sid1=".$template['sid']."&amp;sid2=-2&amp;from=diff_report");

			$popup = new PopupMenu("template_{$template['tid']}", $lang->options);
$popup->add_item($lang->full_edit, "index.php?module=style-templates&amp;action=edit_template&amp;title=".urlencode($template['title'])."&amp;sid={$sid}&amp;from=diff_report");
$popup->add_item($lang->diff_report, "index.php?module=style-templates&amp;action=diff_report&amp;title=".urlencode($template['title'])."&amp;sid1=".$template['sid']."&amp;sid2=-2&amp;from=diff_report");

Zeile 1069Zeile 1080
	}

$page->output_footer();

	}

$page->output_footer();

}


}


if($mybb->input['action'] == "delete_set")
{
$plugins->run_hooks("admin_style_templates_delete_set");

if($mybb->input['action'] == "delete_set")
{
$plugins->run_hooks("admin_style_templates_delete_set");

Zeile 1096Zeile 1107
			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");
}

Zeile 1112Zeile 1123
		$db->delete_query("templates", "sid='{$set['sid']}'");

$plugins->run_hooks("admin_style_templates_delete_set_commit");

		$db->delete_query("templates", "sid='{$set['sid']}'");

$plugins->run_hooks("admin_style_templates_delete_set_commit");


// Log admin action


// Log admin action

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

Zeile 1157Zeile 1168
		$db->delete_query("templates", "tid='{$template['tid']}'");

$plugins->run_hooks("admin_style_templates_delete_template_commit");

		$db->delete_query("templates", "tid='{$template['tid']}'");

$plugins->run_hooks("admin_style_templates_delete_template_commit");


// Log admin action


// Log admin action

		log_admin_action($template['tid'], $template['title'], $template['sid'], $template['set_title']);

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

		log_admin_action($template['tid'], $template['title'], $template['sid'], $template['set_title']);

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

Zeile 1467Zeile 1478
		{
$expand = $lang->expand;
$expanded = false;

		{
$expand = $lang->expand;
$expanded = false;

			

			

			$group['expand_str'] = implode("|", $expand_array);
if($group['expand_str'])
{

			$group['expand_str'] = implode("|", $expand_array);
if($group['expand_str'])
{

Zeile 1564Zeile 1575
	$table = new Table;
$table->construct_header($lang->template_set);
$table->construct_header($lang->controls, array("class" => "align_center", "width" => 150));

	$table = new Table;
$table->construct_header($lang->template_set);
$table->construct_header($lang->controls, array("class" => "align_center", "width" => 150));

	

	

	foreach($template_sets as $set)
{
if($set['sid'] == -1)

	foreach($template_sets as $set)
{
if($set['sid'] == -1)

Zeile 1583Zeile 1594
			{
$used_by_note .= $comma.$theme_name;
$comma = $lang->comma;

			{
$used_by_note .= $comma.$theme_name;
$comma = $lang->comma;

			}

			}

		}
else
{

		}
else
{

Zeile 1621Zeile 1632

$page->output_footer();
}


$page->output_footer();
}



 
?>

?>