Vergleich admin/modules/style/themes.php - 1.4.3 - 1.4.14

  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 143Zeile 143
							break;
case 3: // UPLOAD_ERR_PARTIAL
$errors[] = $lang->error_uploadfailed_php3;

							break;
case 3: // UPLOAD_ERR_PARTIAL
$errors[] = $lang->error_uploadfailed_php3;

							break;
case 4: // UPLOAD_ERR_NO_FILE
$errors[] = $lang->error_uploadfailed_php4;

 
							break;
case 6: // UPLOAD_ERR_NO_TMP_DIR
$errors[] = $lang->error_uploadfailed_php6;

							break;
case 6: // UPLOAD_ERR_NO_TMP_DIR
$errors[] = $lang->error_uploadfailed_php6;

Zeile 160Zeile 157
				}

if(!$errors)

				}

if(!$errors)

				{

				{

					// Was the temporary file found?
if(!is_uploaded_file($_FILES['local_file']['tmp_name']))
{
$errors[] = $lang->error_uploadfailed_lost;

					// Was the temporary file found?
if(!is_uploaded_file($_FILES['local_file']['tmp_name']))
{
$errors[] = $lang->error_uploadfailed_lost;

					}

					}

					// Get the contents
$contents = @file_get_contents($_FILES['local_file']['tmp_name']);
// Delete the temporary file if possible

					// Get the contents
$contents = @file_get_contents($_FILES['local_file']['tmp_name']);
// Delete the temporary file if possible

Zeile 175Zeile 172
					{
$errors[] = $lang->error_uploadfailed_nocontents;
}

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

				}

				}

			}
else if(!empty($mybb->input['url']))
{

			}
else if(!empty($mybb->input['url']))
{

Zeile 185Zeile 182
				{
$errors[] = $lang->error_local_file;
}

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

 
			}
else
{
// UPLOAD_ERR_NO_FILE
$errors[] = $lang->error_uploadfailed_php4;

			}

if(!$errors)

			}

if(!$errors)

Zeile 468Zeile 470
		$theme['name'] = rawurlencode($theme['name']);
header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");
header("Content-type: application/octet-stream");

		$theme['name'] = rawurlencode($theme['name']);
header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");
header("Content-type: application/octet-stream");

		header("Content-Length: ".my_strlen($xml));

		header("Content-Length: ".strlen($xml));

		header("Pragma: no-cache");
header("Expires: 0");
echo $xml;

		header("Pragma: no-cache");
header("Expires: 0");
echo $xml;

Zeile 671Zeile 673
}

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

}

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

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

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

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

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

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

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

Zeile 1197Zeile 1199
	$page->add_breadcrumb_item(htmlspecialchars_uni($stylesheet['name'])." {$lang->properties}", "index.php?module=style/themes&amp;action=edit_properties&amp;tid={$mybb->input['tid']}");

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

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

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


// If the stylesheet and theme do not match, we must be editing something that is inherited
if($this_stylesheet['inherited'][$stylesheet['name']])
{
$query = $db->simple_select("themes", "name", "tid='{$stylesheet['tid']}'");
$stylesheet_parent = htmlspecialchars_uni($db->fetch_field($query, 'name'));

// Show inherited warning
if($stylesheet['tid'] == 1)
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited_default, $stylesheet_parent));
}
else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent));
}
}


// If the stylesheet and theme do not match, we must be editing something that is inherited
if($this_stylesheet['inherited'][$stylesheet['name']])
{
$query = $db->simple_select("themes", "name", "tid='{$stylesheet['tid']}'");
$stylesheet_parent = htmlspecialchars_uni($db->fetch_field($query, 'name'));

// Show inherited warning
if($stylesheet['tid'] == 1)
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited_default, $stylesheet_parent));
}
else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent));
}
}

	
$applied_to = $this_stylesheet['applied_to'];
unset($this_stylesheet);

	
$applied_to = $this_stylesheet['applied_to'];
unset($this_stylesheet);

Zeile 1247Zeile 1249
	
$specific_files = "<div id=\"attach_1\" class=\"attachs\">";
$count = 0;

	
$specific_files = "<div id=\"attach_1\" class=\"attachs\">";
$count = 0;

	

	

	if(is_array($applied_to) && $applied_to['global'][0] != "global")
{
$check_actions = "";

	if(is_array($applied_to) && $applied_to['global'][0] != "global")
{
$check_actions = "";

Zeile 1347Zeile 1349
	$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->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->end();

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

	$form_container->end();

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

Zeile 1379Zeile 1381
	if(!$theme['tid'])
{
flash_message($lang->error_invalid_theme, 'error');

	if(!$theme['tid'])
{
flash_message($lang->error_invalid_theme, 'error');

		admin_redirect("index.php?module=style/themes");
}

		admin_redirect("index.php?module=style/themes");
}

	
$parent_list = make_parent_theme_list($theme['tid']);
$parent_list = implode(',', $parent_list);

	
$parent_list = make_parent_theme_list($theme['tid']);
$parent_list = implode(',', $parent_list);

Zeile 1440Zeile 1442

// Now we have the new stylesheet, save it
$updated_stylesheet = array(


// Now we have the new stylesheet, save it
$updated_stylesheet = array(

 
			"cachefile" => $db->escape_string($stylesheet['name']),

			"stylesheet" => $db->escape_string(unfix_css_urls($new_stylesheet)),
"lastmodified" => TIME_NOW
);

			"stylesheet" => $db->escape_string(unfix_css_urls($new_stylesheet)),
"lastmodified" => TIME_NOW
);

Zeile 1447Zeile 1450

// Cache the stylesheet to the file
if(!cache_stylesheet($theme['tid'], $stylesheet['name'], $new_stylesheet))


// Cache the stylesheet to the file
if(!cache_stylesheet($theme['tid'], $stylesheet['name'], $new_stylesheet))

		{

		{

			$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1);

			$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1);

		}


		}


		// Update the CSS file list for this theme
update_theme_stylesheet_list($theme['tid']);

		// Update the CSS file list for this theme
update_theme_stylesheet_list($theme['tid']);





		// Log admin action
log_admin_action($theme['name'], $stylesheet['name']);


		// Log admin action
log_admin_action($theme['name'], $stylesheet['name']);


Zeile 1469Zeile 1472
			{
admin_redirect("index.php?module=style/themes&action=edit_stylesheet&tid={$theme['tid']}&file={$stylesheet['name']}");
}

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

		}

		}

		else
{
echo "1";

		else
{
echo "1";

			exit;
}
}

// Has the file on the file system been modified?
if(resync_stylesheet($stylesheet))
{
// Need to refetch new stylesheet as it was modified

			exit;
}
}

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

		$query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'");
$stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');

	}


	}


	$css_array = css_to_array($stylesheet['stylesheet']);
$selector_list = get_selectors_as_options($css_array, $mybb->input['selector']);

	$css_array = css_to_array($stylesheet['stylesheet']);
$selector_list = get_selectors_as_options($css_array, $mybb->input['selector']);

	

	

	// Do we not have any selectors? Send em to the full edit page
if(!$selector_list)

	// Do we not have any selectors? Send em to the full edit page
if(!$selector_list)

	{

	{

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

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

	}

// 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)
{
if($file == 'inherited')

		{
continue;
}

		{
continue;
}

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

		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 1536Zeile 1539
				$stylesheet2['inherited'][basename($inherited_file)] = $tid;
unset($stylesheet2['inherited'][$inherited_file]);
}

				$stylesheet2['inherited'][basename($inherited_file)] = $tid;
unset($stylesheet2['inherited'][$inherited_file]);
}

		}


		}


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

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

	

	

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


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


Zeile 1549Zeile 1552
	<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 1569Zeile 1572
		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent), "ajax_alert");

		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent), "ajax_alert");

		}

		}

	}

$sub_tabs['edit_stylesheet'] = array(

	}

$sub_tabs['edit_stylesheet'] = array(

Zeile 1704Zeile 1707

// Now we have the new stylesheet, save it
$updated_stylesheet = array(


// Now we have the new stylesheet, save it
$updated_stylesheet = array(

 
			"cachefile" => $db->escape_string($stylesheet['name']),

			"stylesheet" => $db->escape_string(unfix_css_urls($mybb->input['stylesheet'])),
"lastmodified" => TIME_NOW
);

			"stylesheet" => $db->escape_string(unfix_css_urls($mybb->input['stylesheet'])),
"lastmodified" => TIME_NOW
);

Zeile 1730Zeile 1734
		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']);

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

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

		}
}

// 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)
{
if($file == 'inherited')
{
continue;
}

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

		{
foreach($style as $stylesheet2)
{

		{
foreach($style as $stylesheet2)
{

Zeile 1760Zeile 1764
						$inherited_load[] = $value;
}
}

						$inherited_load[] = $value;
}
}

			}
}

			}
}

	}

foreach($stylesheets as $file => $stylesheet2)

	}

foreach($stylesheets as $file => $stylesheet2)

Zeile 1782Zeile 1786
	$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 1830Zeile 1837
		// 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');

	}


	}


	$form = new Form("index.php?module=style/themes&amp;action=edit_stylesheet&amp;mode=advanced", "post", "edit_stylesheet");
echo $form->generate_hidden_field("tid", $mybb->input['tid'])."\n";
echo $form->generate_hidden_field("file", htmlspecialchars_uni($mybb->input['file']))."\n";

	$form = new Form("index.php?module=style/themes&amp;action=edit_stylesheet&amp;mode=advanced", "post", "edit_stylesheet");
echo $form->generate_hidden_field("tid", $mybb->input['tid'])."\n";
echo $form->generate_hidden_field("file", htmlspecialchars_uni($mybb->input['file']))."\n";

Zeile 1849Zeile 1856

$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 1860Zeile 1869
		}
});
</script>";

		}
});
</script>";

 
	}

	
$page->output_footer();
}

	
$page->output_footer();
}

Zeile 2060Zeile 2070
		}
}


		}
}


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

$sub_tabs['edit_stylesheets'] = array(
'title' => $lang->edit_stylesheets,
'link' => "index.php?module=style/themes&amp;action=edit&amp;tid={$mybb->input['tid']}"

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

$sub_tabs['edit_stylesheets'] = array(
'title' => $lang->edit_stylesheets,
'link' => "index.php?module=style/themes&amp;action=edit&amp;tid={$mybb->input['tid']}"

	);

	);


$sub_tabs['add_stylesheet'] = array(
'title' => $lang->add_stylesheet,
'link' => "index.php?module=style/themes&amp;action=add_stylesheet&amp;tid={$mybb->input['tid']}",
'description' => $lang->add_stylesheet_desc


$sub_tabs['add_stylesheet'] = array(
'title' => $lang->add_stylesheet,
'link' => "index.php?module=style/themes&amp;action=add_stylesheet&amp;tid={$mybb->input['tid']}",
'description' => $lang->add_stylesheet_desc

	);


	);


	$sub_tabs['export_theme'] = array(
'title' => $lang->export_theme,
'link' => "index.php?module=style/themes&amp;action=export&amp;tid={$mybb->input['tid']}"
);

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

	$sub_tabs['export_theme'] = array(
'title' => $lang->export_theme,
'link' => "index.php?module=style/themes&amp;action=export&amp;tid={$mybb->input['tid']}"
);

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

	

	

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

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

Zeile 2173Zeile 2186
			</table>
</dd>
</dl>";

			</table>
</dd>
</dl>";

			

			

			$form_container = new FormContainer();
$form_container->output_row("", "", "<span style=\"float: right;\"><a href=\"\" id=\"delete_img_{$count}\"><img src=\"styles/{$page->style}/images/icons/cross.gif\" alt=\"{$lang->delete}\" title=\"{$lang->delete}\" /></a></span>{$lang->file} &nbsp;".$form->generate_text_box("attached_{$count}", $name, array('id' => "attached_{$count}", 'style' => 'width: 200px;')), "attached_{$count}");


			$form_container = new FormContainer();
$form_container->output_row("", "", "<span style=\"float: right;\"><a href=\"\" id=\"delete_img_{$count}\"><img src=\"styles/{$page->style}/images/icons/cross.gif\" alt=\"{$lang->delete}\" title=\"{$lang->delete}\" /></a></span>{$lang->file} &nbsp;".$form->generate_text_box("attached_{$count}", $name, array('id' => "attached_{$count}", 'style' => 'width: 200px;')), "attached_{$count}");


Zeile 2229Zeile 2242
	$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->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);

	

	

	$sheetnames = array();
foreach($stylesheets as $filename => $style)
{

	$sheetnames = array();
foreach($stylesheets as $filename => $style)
{

Zeile 2250Zeile 2263
	</dl>";

$form_container->output_row("", "", $actions);

	</dl>";

$form_container->output_row("", "", $actions);

	

	

	$form_container->end();

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

$form->output_submit_wrapper($buttons);


	$form_container->end();

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

$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 2268Zeile 2283
		}
});
</script>\n";

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

 
	}


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">

Zeile 2286Zeile 2302

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