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

  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 468Zeile 468
		$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 1440Zeile 1440

// 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 1704Zeile 1705

// 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 1782Zeile 1784
	$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 1814Zeile 1819
	$sub_tabs['edit_stylesheet'] = array(
'title' => $lang->edit_stylesheet_simple_mode,
'link' => "index.php?module=style/themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=simple"

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

	);

	);


$sub_tabs['edit_stylesheet_advanced'] = array(
'title' => $lang->edit_stylesheet_advanced_mode,


$sub_tabs['edit_stylesheet_advanced'] = array(
'title' => $lang->edit_stylesheet_advanced_mode,

Zeile 1845Zeile 1850
	$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_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'));


	$form->output_submit_wrapper($buttons);


	$form->output_submit_wrapper($buttons);


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

		}
});
</script>";

 
	}

	
$page->output_footer();
}

	
$page->output_footer();
}

Zeile 1970Zeile 1978
			{
$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]);

Zeile 2060Zeile 2068
		}
}


		}
}


	$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,


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

Zeile 2097Zeile 2108
		foreach($mybb->input as $name => $value)
{
if(strpos($name, "attached") !== false)

		foreach($mybb->input as $name => $value)
{
if(strpos($name, "attached") !== false)

			{

			{

				list(, $id) = explode('_', $name);
$id = intval($id);


				list(, $id) = explode('_', $name);
$id = intval($id);


Zeile 2129Zeile 2140
	$form = new Form("index.php?module=style/themes&amp;action=add_stylesheet", "post", "add_stylesheet");

echo $form->generate_hidden_field("tid", $mybb->input['tid'])."\n";

	$form = new Form("index.php?module=style/themes&amp;action=add_stylesheet", "post", "add_stylesheet");

echo $form->generate_hidden_field("tid", $mybb->input['tid'])."\n";

	

	

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


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


Zeile 2160Zeile 2171
				$global_action_checked[2] = "checked=\"checked\"";
$global_action_checked[1] = "";
}

				$global_action_checked[2] = "checked=\"checked\"";
$global_action_checked[1] = "";
}

			

			

			$specific_file = "<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"action_{$count}\" value=\"0\" {$global_action_checked[1]} class=\"action_{$count}s_check\" onclick=\"checkAction('action_{$count}');\" style=\"vertical-align: middle;\" /> {$lang->globally}</label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"action_{$count}\" value=\"1\" {$global_action_checked[2]} class=\"action_{$count}s_check\" onclick=\"checkAction('action_{$count}');\" style=\"vertical-align: middle;\" /> {$lang->specific_actions}</label></dt>

			$specific_file = "<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"action_{$count}\" value=\"0\" {$global_action_checked[1]} class=\"action_{$count}s_check\" onclick=\"checkAction('action_{$count}');\" style=\"vertical-align: middle;\" /> {$lang->globally}</label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"action_{$count}\" value=\"1\" {$global_action_checked[2]} class=\"action_{$count}s_check\" onclick=\"checkAction('action_{$count}');\" style=\"vertical-align: middle;\" /> {$lang->specific_actions}</label></dt>

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

	

	

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

$specific_files .= "<div id=\"attached_form_{$count}\">".$form_container->end(true)."</div><div id=\"attach_box_{$count}\"></div>";

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

$specific_files .= "<div id=\"attached_form_{$count}\">".$form_container->end(true)."</div><div id=\"attach_box_{$count}\"></div>";

Zeile 2222Zeile 2233
	<script type="text/javascript">
checkAction(\'attach\');'.$check_actions.'
</script>';

	<script type="text/javascript">
checkAction(\'attach\');'.$check_actions.'
</script>';

	

	

	echo $form->generate_hidden_field("sid", $stylesheet['sid'])."<br />\n";

$form_container = new FormContainer("{$lang->add_stylesheet_to} ".htmlspecialchars_uni($theme['name']));

	echo $form->generate_hidden_field("sid", $stylesheet['sid'])."<br />\n";

$form_container = new FormContainer("{$lang->add_stylesheet_to} ".htmlspecialchars_uni($theme['name']));

Zeile 2257Zeile 2268

$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 2268Zeile 2281
		}
});
</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 2278Zeile 2292
});
//]]>
</script>';

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

	

	

	$form->end();

	$form->end();

	

	

	$page->output_footer();
}

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

	$page->output_footer();
}

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