Vergleich admin/modules/style/themes.php - 1.4.1 - 1.4.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 18Zeile 18
require_once MYBB_ADMIN_DIR."inc/functions_themes.php";

$page->extra_header .= "

require_once MYBB_ADMIN_DIR."inc/functions_themes.php";

$page->extra_header .= "

<script language=\"Javascript\" type=\"text/javascript\">

<script type=\"text/javascript\">

//<![CDATA[
var save_changes_lang_string = '{$lang->save_changes_js}';
var delete_lang_string = '{$lang->delete}';

//<![CDATA[
var save_changes_lang_string = '{$lang->save_changes_js}';
var delete_lang_string = '{$lang->delete}';

Zeile 340Zeile 340
		$properties = unserialize($theme['properties']);

$xml = "<?xml version=\"1.0\" encoding=\"{$lang->settings['charset']}\"?".">\r\n";

		$properties = unserialize($theme['properties']);

$xml = "<?xml version=\"1.0\" encoding=\"{$lang->settings['charset']}\"?".">\r\n";

		$xml .= "<theme name=\"".$theme['name']."\" version=\"".$mybb->version_code."\">\r\n";

		$xml .= "<theme name=\"".htmlspecialchars_uni($theme['name'])."\" version=\"".$mybb->version_code."\">\r\n";

		$xml .= "\t<properties>\r\n";
foreach($properties as $property => $value)
{

		$xml .= "\t<properties>\r\n";
foreach($properties as $property => $value)
{

Zeile 1103Zeile 1103
		$stylesheets[basename($file)] = $stylesheet2;
}


		$stylesheets[basename($file)] = $stylesheet2;
}


	$this_stylesheet = $stylesheets[$stylesheet['cachefile']];	






	if(!array_key_exists($stylesheet['cachefile'], $stylesheets) && array_key_exists("css.php?stylesheet=".$stylesheet['tid'], $stylesheets))
{
$stylesheet['cachefile'] = "css.php?stylesheet=".$stylesheet['tid'];
}

$this_stylesheet = $stylesheets[$stylesheet['cachefile']];

	unset($stylesheets);

if($mybb->request_method == "post")

	unset($stylesheets);

if($mybb->request_method == "post")

Zeile 1122Zeile 1127
			}

$attached = array();

			}

$attached = array();

			

			

			if($mybb->input['attach'] == 1)
{
// Our stylesheet is attached to custom pages in MyBB

			if($mybb->input['attach'] == 1)
{
// Our stylesheet is attached to custom pages in MyBB

Zeile 1140Zeile 1145
						{
// We have custom actions for attached files
$actions_list = $mybb->input['action_list_'.$attached_id];

						{
// We have custom actions for attached files
$actions_list = $mybb->input['action_list_'.$attached_id];

						}


						}


						if($actions_list)
{
$attached_to .= "?".$actions_list;

						if($actions_list)
{
$attached_to .= "?".$actions_list;

Zeile 1151Zeile 1156
					}
}
}

					}
}
}

			

			

			// Update Stylesheet			
$update_array = array(
'name' => $db->escape_string($mybb->input['name']),

			// Update Stylesheet			
$update_array = array(
'name' => $db->escape_string($mybb->input['name']),

				'attachedto' => $db->escape_string(implode('|', $attached)),
'lastmodified' => TIME_NOW

				'attachedto' => $db->escape_string(implode('|', $attached))


			);

			);

			
if($stylesheet['name'] != $mybb->input['name'])
{

			
if($stylesheet['name'] != $mybb->input['name'])
{

				$update_array['cachefile'] = $db->escape_string(str_replace('/', '', $mybb->input['name']));
}


				$update_array['cachefile'] = $db->escape_string(str_replace('/', '', $mybb->input['name']));
}


Zeile 1169Zeile 1173
			// If the name changed, re-cache our stylesheet
if($stylesheet['name'] != $mybb->input['name'])
{

			// If the name changed, re-cache our stylesheet
if($stylesheet['name'] != $mybb->input['name'])
{

 
				$db->update_query("themestylesheets", array('lastmodified' => TIME_NOW), "sid='{$stylesheet['sid']}'", 1);

				if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $theme['stylesheet']))
{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);

				if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $theme['stylesheet']))
{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);

Zeile 1251Zeile 1256
		$global_checked[1] = "";

foreach($applied_to as $name => $actions)

		$global_checked[1] = "";

foreach($applied_to as $name => $actions)

		{

		{

			$short_name = substr($name, 0, -4);			

$action_list = "";

			$short_name = substr($name, 0, -4);			

$action_list = "";

Zeile 1308Zeile 1313
    function checkAction(id)
{
var checked = \'\';

    function checkAction(id)
{
var checked = \'\';

		

		

        $$(\'.\'+id+\'s_check\').each(function(e)
{
if(e.checked == true)

        $$(\'.\'+id+\'s_check\').each(function(e)
{
if(e.checked == true)

Zeile 1337Zeile 1342
	
echo $form->generate_hidden_field("file", htmlspecialchars_uni($stylesheet['name']))."<br />\n";
echo $form->generate_hidden_field("tid", $theme['tid'])."<br />\n";

	
echo $form->generate_hidden_field("file", htmlspecialchars_uni($stylesheet['name']))."<br />\n";
echo $form->generate_hidden_field("tid", $theme['tid'])."<br />\n";





	$form_container = new FormContainer("{$lang->edit_stylesheet_properties_for} ".htmlspecialchars_uni($stylesheet['name']));
$form_container->output_row($lang->file_name, $lang->file_name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name', 'style' => 'width: 200px;')), 'name');


	$form_container = new FormContainer("{$lang->edit_stylesheet_properties_for} ".htmlspecialchars_uni($stylesheet['name']));
$form_container->output_row($lang->file_name, $lang->file_name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name', 'style' => 'width: 200px;')), 'name');


	$form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);


	$form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);


	$form_container->end();

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

	$form_container->end();

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

Zeile 1351Zeile 1356
	
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>';
echo '<script type="text/javascript">

	
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>';
echo '<script type="text/javascript">





Event.observe(window, "load", function() {
//<![CDATA[
new ThemeSelector(\''.$count.'\');
});
//]]>
</script>';

Event.observe(window, "load", function() {
//<![CDATA[
new ThemeSelector(\''.$count.'\');
});
//]]>
</script>';

	

	

	$form->end();

	$form->end();

	

	

	$page->output_footer();
}

// Shows the page where you can actually edit a particular selector or the whole stylesheet
if($mybb->input['action'] == "edit_stylesheet" && (!$mybb->input['mode'] || $mybb->input['mode'] == "simple"))

	$page->output_footer();
}

// Shows the page where you can actually edit a particular selector or the whole stylesheet
if($mybb->input['action'] == "edit_stylesheet" && (!$mybb->input['mode'] || $mybb->input['mode'] == "simple"))

{
// Fetch the theme we want to edit this stylesheet in
$query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'");
$theme = $db->fetch_array($query);

if(!$theme['tid'])
{
flash_message($lang->error_invalid_theme, 'error');
admin_redirect("index.php?module=style/themes");
}

$parent_list = make_parent_theme_list($theme['tid']);
$parent_list = implode(',', $parent_list);
if(!$parent_list)
{
$parent_list = 1;
}

$query = $db->simple_select("themestylesheets", "*", "name='".$db->escape_string($mybb->input['file'])."' AND tid IN ({$parent_list})", array('order_by' => 'tid', 'order_dir' => 'desc', 'limit' => 1));
$stylesheet = $db->fetch_array($query);

// Does the theme not exist?
if(!$stylesheet['sid'])
{
flash_message($lang->error_invalid_stylesheet, 'error');
admin_redirect("index.php?module=style/themes");
}

if($mybb->request_method == "post")
{
$sid = $stylesheet['sid'];


{
// Fetch the theme we want to edit this stylesheet in
$query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'");
$theme = $db->fetch_array($query);

if(!$theme['tid'])
{
flash_message($lang->error_invalid_theme, 'error');
admin_redirect("index.php?module=style/themes");
}

$parent_list = make_parent_theme_list($theme['tid']);
$parent_list = implode(',', $parent_list);
if(!$parent_list)
{
$parent_list = 1;
}

$query = $db->simple_select("themestylesheets", "*", "name='".$db->escape_string($mybb->input['file'])."' AND tid IN ({$parent_list})", array('order_by' => 'tid', 'order_dir' => 'desc', 'limit' => 1));
$stylesheet = $db->fetch_array($query);

// Does the theme not exist?
if(!$stylesheet['sid'])
{
flash_message($lang->error_invalid_stylesheet, 'error');
admin_redirect("index.php?module=style/themes");
}

if($mybb->request_method == "post")
{
$sid = $stylesheet['sid'];


		// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])

		// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])

		{

		{

			$sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);

			$sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);

		}

		}


// Insert the modified CSS
$new_stylesheet = $stylesheet['stylesheet'];


// Insert the modified CSS
$new_stylesheet = $stylesheet['stylesheet'];

Zeile 1416Zeile 1421
		foreach($mybb->input['css_bits'] as $field => $value)
{
if(!trim($value) || !trim($field))

		foreach($mybb->input['css_bits'] as $field => $value)
{
if(!trim($value) || !trim($field))

			{

			{

				continue;
}


				continue;
}


Zeile 1469Zeile 1474
		{
echo "1";
exit;

		{
echo "1";
exit;

		}
}


		}
}


	// Has the file on the file system been modified?
if(resync_stylesheet($stylesheet))

	// Has the file on the file system been modified?
if(resync_stylesheet($stylesheet))

	{

	{

		// Need to refetch new stylesheet as it was modified
$query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'");
$stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');

		// Need to refetch new stylesheet as it was modified
$query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'");
$stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');

Zeile 1489Zeile 1494
		flash_message($lang->error_cannot_parse, 'error');
admin_redirect("index.php?module=style/themes&action=edit_stylesheet&tid={$theme['tid']}&file=".htmlspecialchars_uni($stylesheet['name'])."&mode=advanced");
exit;

		flash_message($lang->error_cannot_parse, 'error');
admin_redirect("index.php?module=style/themes&action=edit_stylesheet&tid={$theme['tid']}&file=".htmlspecialchars_uni($stylesheet['name'])."&mode=advanced");
exit;

	}

	}

	
// Fetch list of all of the stylesheets for this theme
$file_stylesheets = unserialize($theme['stylesheets']);

	
// Fetch list of all of the stylesheets for this theme
$file_stylesheets = unserialize($theme['stylesheets']);

Zeile 1501Zeile 1506
	foreach($file_stylesheets as $file => $action_stylesheet)
{
if($file == 'inherited')

	foreach($file_stylesheets as $file => $action_stylesheet)
{
if($file == 'inherited')

		{

		{

			continue;
}

foreach($action_stylesheet as $action => $style)
{
foreach($style as $stylesheet2)

			continue;
}

foreach($action_stylesheet as $action => $style)
{
foreach($style as $stylesheet2)

			{

			{

				$stylesheets[$stylesheet2]['applied_to'][$file][] = $action;
if(is_array($file_stylesheets['inherited'][$file."_".$action]) && in_array($stylesheet2, array_keys($file_stylesheets['inherited'][$file."_".$action])))
{

				$stylesheets[$stylesheet2]['applied_to'][$file][] = $action;
if(is_array($file_stylesheets['inherited'][$file."_".$action]) && in_array($stylesheet2, array_keys($file_stylesheets['inherited'][$file."_".$action])))
{

Zeile 1544Zeile 1549
	<script type=\"text/javascript\">
var my_post_key = '".$mybb->post_code."';
</script>";

	<script type=\"text/javascript\">
var my_post_key = '".$mybb->post_code."';
</script>";

	

	

	$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style/themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=simple");


	$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style/themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=simple");


Zeile 1617Zeile 1622
	$table = new Table;	
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[background]', $properties['background'], array('id' => 'css_bits[background]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->background}</strong></div>", array('style' => 'width: 20%;'));
$table->construct_cell("<strong>{$lang->extra_css_atribs}</strong><br /><div style=\"align: center;\">".$form->generate_text_area('css_bits[extra]', $properties['extra'], array('id' => 'css_bits[extra]', 'style' => 'width: 98%;', 'rows' => '19'))."</div>", array('rowspan' => 8));

	$table = new Table;	
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[background]', $properties['background'], array('id' => 'css_bits[background]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->background}</strong></div>", array('style' => 'width: 20%;'));
$table->construct_cell("<strong>{$lang->extra_css_atribs}</strong><br /><div style=\"align: center;\">".$form->generate_text_area('css_bits[extra]', $properties['extra'], array('id' => 'css_bits[extra]', 'style' => 'width: 98%;', 'rows' => '19'))."</div>", array('rowspan' => 8));

	$table->construct_row();

	$table->construct_row();

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[color]', $properties['color'], array('id' => 'css_bits[color]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->color}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[width]', $properties['width'], array('id' => 'css_bits[width]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->width}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[color]', $properties['color'], array('id' => 'css_bits[color]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->color}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[width]', $properties['width'], array('id' => 'css_bits[width]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->width}</strong></div>", array('style' => 'width: 40%;'));

Zeile 1626Zeile 1631
	$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_size]', $properties['font-size'], array('id' => 'css_bits[font_size]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_size}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();

	$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_size]', $properties['font-size'], array('id' => 'css_bits[font_size]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_size}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_style]', $properties['font-style'], array('id' => 'css_bits[font_style]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_style}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_weight]', $properties['font-weight'], array('id' => 'css_bits[font_weight]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_weight}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_style]', $properties['font-style'], array('id' => 'css_bits[font_style]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_style}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_weight]', $properties['font-weight'], array('id' => 'css_bits[font_weight]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_weight}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[text_decoration]', $properties['text-decoration'], array('id' => 'css_bits[text_decoration]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->text_decoration}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();

	$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[text_decoration]', $properties['text-decoration'], array('id' => 'css_bits[text_decoration]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->text_decoration}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();

	

	

	$table->output(htmlspecialchars_uni($editable_selector['class_name'])."<span id=\"saved\" style=\"color: #FEE0C6;\"></span>");

echo "</div>";

	$table->output(htmlspecialchars_uni($editable_selector['class_name'])."<span id=\"saved\" style=\"color: #FEE0C6;\"></span>");

echo "</div>";

	

	

	$buttons[] = $form->generate_reset_button($lang->reset);
$buttons[] = $form->generate_submit_button($lang->save_changes, array('id' => 'save', 'name' => 'save'));
$buttons[] = $form->generate_submit_button($lang->save_changes_and_close, array('id' => 'save_close', 'name' => 'save_close'));

	$buttons[] = $form->generate_reset_button($lang->reset);
$buttons[] = $form->generate_submit_button($lang->save_changes, array('id' => 'save', 'name' => 'save'));
$buttons[] = $form->generate_submit_button($lang->save_changes_and_close, array('id' => 'save_close', 'name' => 'save_close'));

Zeile 1645Zeile 1650
	
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>';
echo '<script type="text/javascript">

	
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>';
echo '<script type="text/javascript">





Event.observe(window, "load", function() {
//<![CDATA[
new ThemeSelector("./index.php?module=style/themes&action=xmlhttp_stylesheet", "./index.php?module=style/themes&action=edit_stylesheet", $("selector"), $("stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("selector_form"), "'.$mybb->input['tid'].'");

Event.observe(window, "load", function() {
//<![CDATA[
new ThemeSelector("./index.php?module=style/themes&action=xmlhttp_stylesheet", "./index.php?module=style/themes&action=edit_stylesheet", $("selector"), $("stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("selector_form"), "'.$mybb->input['tid'].'");

Zeile 1654Zeile 1659
</script>';

$form->end();

</script>';

$form->end();

	

	

	$page->output_footer();
}


	$page->output_footer();
}


Zeile 1690Zeile 1695
	if($mybb->request_method == "post")
{
$sid = $stylesheet['sid'];

	if($mybb->request_method == "post")
{
$sid = $stylesheet['sid'];

		

		

		// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])
{

		// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])
{

Zeile 1725Zeile 1730
		else
{
admin_redirect("index.php?module=style/themes&action=edit&tid={$theme['tid']}");

		else
{
admin_redirect("index.php?module=style/themes&action=edit&tid={$theme['tid']}");

		}

		}

	}

	}

	

	

	// Fetch list of all of the stylesheets for this theme
$file_stylesheets = unserialize($theme['stylesheets']);

	// Fetch list of all of the stylesheets for this theme
$file_stylesheets = unserialize($theme['stylesheets']);

	

	

	$stylesheets = array();
$inherited_load = array();

// Now we loop through the list of stylesheets for each file
foreach($file_stylesheets as $file => $action_stylesheet)

	$stylesheets = array();
$inherited_load = array();

// Now we loop through the list of stylesheets for each file
foreach($file_stylesheets as $file => $action_stylesheet)

	{

	{

		if($file == 'inherited')
{
continue;

		if($file == 'inherited')
{
continue;

Zeile 1777Zeile 1782
	$this_stylesheet = $stylesheets[$stylesheet['name']];	
unset($stylesheets);


	$this_stylesheet = $stylesheets[$stylesheet['name']];	
unset($stylesheets);


	$page->extra_header .= '



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

	<link type="text/css" href="./jscripts/codepress/languages/codepress-css.css" rel="stylesheet" id="cp-lang-style" />
<script type="text/javascript" src="./jscripts/codepress/codepress.js"></script>
<script type="text/javascript">
CodePress.language = \'css\';
</script>';

	<link type="text/css" href="./jscripts/codepress/languages/codepress-css.css" rel="stylesheet" id="cp-lang-style" />
<script type="text/javascript" src="./jscripts/codepress/codepress.js"></script>
<script type="text/javascript">
CodePress.language = \'css\';
</script>';

 
	}

	
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style/themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=advanced");

	
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style/themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=advanced");

Zeile 1844Zeile 1852

$form->end();



$form->end();


	echo "<script language=\"Javascript\" type=\"text/javascript\">



	if($admin_options['codepress'] != 0)
{
echo "<script type=\"text/javascript\">

	Event.observe('edit_stylesheet', 'submit', function()
{
if($('stylesheet_cp')) {

	Event.observe('edit_stylesheet', 'submit', function()
{
if($('stylesheet_cp')) {

Zeile 1855Zeile 1865
		}
});
</script>";

		}
});
</script>";

 
	}

	
$page->output_footer();
}

	
$page->output_footer();
}

Zeile 2055Zeile 2066
		}
}


		}
}


	$page->extra_header .= '



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

	<link type="text/css" href="./jscripts/codepress/languages/codepress-css.css" rel="stylesheet" id="cp-lang-style" />
<script type="text/javascript" src="./jscripts/codepress/codepress.js"></script>
<script type="text/javascript">
CodePress.language = \'css\';
</script>';

	<link type="text/css" href="./jscripts/codepress/languages/codepress-css.css" rel="stylesheet" id="cp-lang-style" />
<script type="text/javascript" src="./jscripts/codepress/codepress.js"></script>
<script type="text/javascript">
CodePress.language = \'css\';
</script>';

 
	}

	
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&amp;action=edit&amp;tid={$mybb->input['tid']}");

	
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&amp;action=edit&amp;tid={$mybb->input['tid']}");

	$page->add_breadcrumb_item("Add Stylesheet");

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

	
$page->output_header("{$lang->themes} - {$lang->add_stylesheet}");


	
$page->output_header("{$lang->themes} - {$lang->add_stylesheet}");


Zeile 2252Zeile 2266

$form->output_submit_wrapper($buttons);



$form->output_submit_wrapper($buttons);


	echo "<script language=\"Javascript\" type=\"text/javascript\">



	if($admin_options['codepress'] != 0)
{
echo "<script type=\"text/javascript\">

	Event.observe('add_stylesheet', 'submit', function()
{
if($('stylesheet_cp')) {

	Event.observe('add_stylesheet', 'submit', function()
{
if($('stylesheet_cp')) {

Zeile 2263Zeile 2279
		}
});
</script>\n";

		}
});
</script>\n";




	}


	echo '<script type="text/javascript" src="./jscripts/themes.js"></script>';
echo '<script type="text/javascript">
Event.observe(window, "load", function() {

	echo '<script type="text/javascript" src="./jscripts/themes.js"></script>';
echo '<script type="text/javascript">
Event.observe(window, "load", function() {

Zeile 2273Zeile 2290
});
//]]>
</script>';

});
//]]>
</script>';

	

	

	$form->end();

$page->output_footer();

	$form->end();

$page->output_footer();

Zeile 2281Zeile 2298

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


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

 
	if(!verify_post_check($mybb->input['my_post_key']))
{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=style/themes");
}


	$query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'");
$theme = $db->fetch_array($query);


	$query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'");
$theme = $db->fetch_array($query);