Vergleich admin/modules/style/themes.php - 1.8.6 - 1.8.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 168Zeile 168
	// Convert to mods site version codes
$search_version = ($major_version_code/100).'x';


	// Convert to mods site version codes
$search_version = ($major_version_code/100).'x';


	$contents = fetch_remote_file("http://community.mybb.com/xmlbrowse.php?type=themes&version={$search_version}{$keywords}{$url_page}", $post_data);

	$contents = fetch_remote_file("https://community.mybb.com/xmlbrowse.php?type=themes&version={$search_version}{$keywords}{$url_page}", $post_data);


if(!$contents)
{


if(!$contents)
{

Zeile 214Zeile 214
			);
$result['download_url']['value'] = htmlspecialchars_uni(html_entity_decode($result['download_url']['value']));


			);
$result['download_url']['value'] = htmlspecialchars_uni(html_entity_decode($result['download_url']['value']));


			$table->construct_cell("<img src=\"http://community.mybb.com/{$result['thumbnail']['value']}\" alt=\"{$lang->theme_thumbnail}\" title=\"{$lang->theme_thumbnail}\"/>", array("class" => "align_center", "width" => 100));

			$table->construct_cell("<img src=\"https://community.mybb.com/{$result['thumbnail']['value']}\" alt=\"{$lang->theme_thumbnail}\" title=\"{$lang->theme_thumbnail}\"/>", array("class" => "align_center", "width" => 100));

			$table->construct_cell("<strong>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} {$result['author']['value']}</small></i>");

			$table->construct_cell("<strong>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} {$result['author']['value']}</small></i>");

			$table->construct_cell("<strong><a href=\"http://community.mybb.com/{$result['download_url']['value']}\" target=\"_blank\">{$lang->download}</a></strong>", array("class" => "align_center"));

			$table->construct_cell("<strong><a href=\"https://community.mybb.com/{$result['download_url']['value']}\" target=\"_blank\">{$lang->download}</a></strong>", array("class" => "align_center"));

			$table->construct_row();
}
}

			$table->construct_row();
}
}

Zeile 286Zeile 286
	// Recommended themes = Default; Otherwise search results & pagination
if($mybb->request_method == "post")
{

	// Recommended themes = Default; Otherwise search results & pagination
if($mybb->request_method == "post")
{

		$table->output("<span style=\"float: right;\"><small><a href=\"http://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->browse_results_for_mybb, $mybb->version));

		$table->output("<span style=\"float: right;\"><small><a href=\"https://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->browse_results_for_mybb, $mybb->version));

	}
else
{

	}
else
{

		$table->output("<span style=\"float: right;\"><small><a href=\"http://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->recommended_themes_for_mybb, $mybb->version));

		$table->output("<span style=\"float: right;\"><small><a href=\"https://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->recommended_themes_for_mybb, $mybb->version));

	}

echo "<br />".draw_admin_pagination($mybb->input['page'], 15, $tree['results']['attributes']['total'], "index.php?module=style-themes&amp;action=browse{$keywords}&amp;page={page}");

	}

echo "<br />".draw_admin_pagination($mybb->input['page'], 15, $tree['results']['attributes']['total'], "index.php?module=style-themes&amp;action=browse{$keywords}&amp;page={page}");

Zeile 614Zeile 614
		{
if(strpos($filename, 'css.php?stylesheet=') !== false)
{

		{
if(strpos($filename, 'css.php?stylesheet=') !== false)
{

				$style['sid'] = (integer)str_replace('css.php?stylesheet=', '', $filename);

				$style['sid'] = (int)str_replace('css.php?stylesheet=', '', $filename);

				$filename = $theme_stylesheets[$style['sid']];
}
else

				$filename = $theme_stylesheets[$style['sid']];
}
else

Zeile 756Zeile 756
		{
$query = $db->simple_select("themes", "COUNT(tid) as numthemes", "name = '".$db->escape_string($mybb->get_input('name'))."'");
$numthemes = $db->fetch_field($query, 'numthemes');

		{
$query = $db->simple_select("themes", "COUNT(tid) as numthemes", "name = '".$db->escape_string($mybb->get_input('name'))."'");
$numthemes = $db->fetch_field($query, 'numthemes');

			



			if($numthemes)
{
$errors[] = $lang->error_theme_already_exists;

			if($numthemes)
{
$errors[] = $lang->error_theme_already_exists;

Zeile 1010Zeile 1010
		while($cachefile = $db->fetch_array($query))
{
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$cachefile['cachefile']}");

		while($cachefile = $db->fetch_array($query))
{
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$cachefile['cachefile']}");

 

$filename_min = str_replace('.css', '.min.css', $cachefile['cachefile']);
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$filename_min}");

		}
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/index.html");


		}
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/index.html");


Zeile 1018Zeile 1021
		// Update the CSS file list for this theme
update_theme_stylesheet_list($theme['tid'], $theme, true);


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


		$db->update_query("users", array('style' => 0), "style='{$theme['tid']}'");

@rmdir(MYBB_ROOT."cache/themes/theme{$theme['tid']}/");

		$db->update_query("users", array('style' => 0), "style='{$theme['tid']}'");

@rmdir(MYBB_ROOT."cache/themes/theme{$theme['tid']}/");


$children = make_child_theme_list($theme['tid']);
$child_tid = $children[0];



$children = make_child_theme_list($theme['tid']);
$child_tid = $children[0];


		$db->update_query("themes", array('pid' => $theme['pid']), "tid='{$child_tid}'");




		if($child_tid != 0)
{
$db->update_query("themes", array('pid' => $theme['pid']), "tid='{$child_tid}'");
}


$db->delete_query("themes", "tid='{$theme['tid']}'", 1);



$db->delete_query("themes", "tid='{$theme['tid']}'", 1);


Zeile 1075Zeile 1081
		}

if($mybb->input['colors'])

		}

if($mybb->input['colors'])

		{

		{

			$colors = explode("\n", $mybb->input['colors']);

foreach($colors as $color)

			$colors = explode("\n", $mybb->input['colors']);

foreach($colors as $color)

Zeile 1084Zeile 1090

$properties['colors'][$color[0]] = $color[1];
}


$properties['colors'][$color[0]] = $color[1];
}

		}

		}


if($properties['templateset'] <= 0)


if($properties['templateset'] <= 0)

		{

		{

			$errors[] = $lang->error_invalid_templateset;

			$errors[] = $lang->error_invalid_templateset;

		}

		}


$theme_properties = my_unserialize($theme['properties']);


$theme_properties = my_unserialize($theme['properties']);

		if($theme_properties['disporder'])

		if(is_array($theme_properties['disporder']))

		{
$properties['disporder'] = $theme_properties['disporder'];

		{
$properties['disporder'] = $theme_properties['disporder'];

 
		}
else
{
$errors[] = $lang->error_no_display_order;

		}

$allowedgroups = array();

		}

$allowedgroups = array();

Zeile 1140Zeile 1150
		}

if($update_array['pid'])

		}

if($update_array['pid'])

		{

		{

			$query = $db->simple_select("themes", "tid", "tid='".$update_array['pid']."'");
$parent_check = $db->fetch_field($query, "tid");
if(!$parent_check)

			$query = $db->simple_select("themes", "tid", "tid='".$update_array['pid']."'");
$parent_check = $db->fetch_field($query, "tid");
if(!$parent_check)

Zeile 1182Zeile 1192
			log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));

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

			log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));

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

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

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

		}
}


		}
}


Zeile 1260Zeile 1270
		foreach($theme_stylesheets as $stylesheet => $properties)
{
if(is_array($properties))

		foreach($theme_stylesheets as $stylesheet => $properties)
{
if(is_array($properties))

			{

			{

				$order = (int)$mybb->input['disporder'][$properties['sid']];

$orders[$properties['name']] = $order;
}

				$order = (int)$mybb->input['disporder'][$properties['sid']];

$orders[$properties['name']] = $order;
}

		}


		}


		asort($orders, SORT_NUMERIC);

// Save the orders in the theme properties
$properties = my_unserialize($theme['properties']);
$properties['disporder'] = $orders;

		asort($orders, SORT_NUMERIC);

// Save the orders in the theme properties
$properties = my_unserialize($theme['properties']);
$properties['disporder'] = $orders;





		$update_array = array(
"properties" => $db->escape_string(my_serialize($properties))
);

		$update_array = array(
"properties" => $db->escape_string(my_serialize($properties))
);





		$db->update_query("themes", $update_array, "tid = '{$theme['tid']}'");

if($theme['def'] == 1)

		$db->update_query("themes", $update_array, "tid = '{$theme['tid']}'");

if($theme['def'] == 1)

Zeile 1286Zeile 1296

// normalize for consistency
update_theme_stylesheet_list($theme['tid'], false, true);


// normalize for consistency
update_theme_stylesheet_list($theme['tid'], false, true);





		flash_message($lang->success_stylesheet_order_updated, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
}

		flash_message($lang->success_stylesheet_order_updated, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
}

Zeile 1338Zeile 1348
		foreach($stylesheets as $filename => $style)
{
if(strpos($filename, 'css.php?stylesheet=') !== false)

		foreach($stylesheets as $filename => $style)
{
if(strpos($filename, 'css.php?stylesheet=') !== false)

			{
$style['sid'] = (integer)str_replace('css.php?stylesheet=', '', $filename);

			{
$style['sid'] = (int)str_replace('css.php?stylesheet=', '', $filename);

				$filename = $theme_stylesheets[$style['sid']];
}


				$filename = $theme_stylesheets[$style['sid']];
}


Zeile 1356Zeile 1366
	{
if(strpos($filename, 'css.php?stylesheet=') !== false)
{

	{
if(strpos($filename, 'css.php?stylesheet=') !== false)
{

			$style['sid'] = (integer)str_replace('css.php?stylesheet=', '', $filename);

			$style['sid'] = (int)str_replace('css.php?stylesheet=', '', $filename);

			$filename = $theme_stylesheets[$style['sid']];
}
else

			$filename = $theme_stylesheets[$style['sid']];
}
else

Zeile 1393Zeile 1403
			foreach($inherited_ary as $tid => $file)
{
if(isset($applied_to_count) && $count == $applied_to_count && $count != 0)

			foreach($inherited_ary as $tid => $file)
{
if(isset($applied_to_count) && $count == $applied_to_count && $count != 0)

				{
$sep = " {$lang->and} ";
}


				{
$sep = " {$lang->and} ";
}


				$inherited .= $sep.$file;
$sep = $lang->comma;

				$inherited .= $sep.$file;
$sep = $lang->comma;





				++$count;
}
$inherited .= ")</small>";

				++$count;
}
$inherited .= ")</small>";

Zeile 1413Zeile 1423
			$count = 0;
$sep = " ";
$name = "";

			$count = 0;
$sep = " ";
$name = "";





			$colors = array();

if(!is_array($properties['colors']))
{
$properties['colors'] = array();

			$colors = array();

if(!is_array($properties['colors']))
{
$properties['colors'] = array();

			}

			}


foreach($style['applied_to'] as $name => $actions)
{
if(!$name)


foreach($style['applied_to'] as $name => $actions)
{
if(!$name)

				{
continue;

				{
continue;

				}

if(array_key_exists($name, $properties['colors']))
{
$colors[] = $properties['colors'][$name];

				}

if(array_key_exists($name, $properties['colors']))
{
$colors[] = $properties['colors'][$name];

				}

				}


if(count($colors))
{
// Colors override files and are handled below.
continue;


if(count($colors))
{
// Colors override files and are handled below.
continue;

				}


				}


				// It's a file:
++$count;

if($actions[0] != "global")
{
$name = "{$name} ({$lang->actions}: ".implode(',', $actions).")";

				// It's a file:
++$count;

if($actions[0] != "global")
{
$name = "{$name} ({$lang->actions}: ".implode(',', $actions).")";

				}

				}


if($count == $applied_to_count && $count > 1)
{


if($count == $applied_to_count && $count > 1)
{

Zeile 1498Zeile 1508

$popup->add_item($lang->edit_style, "index.php?module=style-themes&amp;action=edit_stylesheet&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}");
$popup->add_item($lang->properties, "index.php?module=style-themes&amp;action=stylesheet_properties&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}");


$popup->add_item($lang->edit_style, "index.php?module=style-themes&amp;action=edit_stylesheet&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}");
$popup->add_item($lang->properties, "index.php?module=style-themes&amp;action=stylesheet_properties&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}");





		if($inherited == "")
{
$popup->add_item($lang->delete_revert, "index.php?module=style-themes&amp;action=delete_stylesheet&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}&amp;my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_stylesheet_deletion}')");

		if($inherited == "")
{
$popup->add_item($lang->delete_revert, "index.php?module=style-themes&amp;action=delete_stylesheet&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}&amp;my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_stylesheet_deletion}')");

Zeile 1577Zeile 1587
	if(!$properties['colors'] || !is_array($properties['colors']))
{
$color_setting = $lang->colors_no_color_setting;

	if(!$properties['colors'] || !is_array($properties['colors']))
{
$color_setting = $lang->colors_no_color_setting;

	}

	}

	else
{
$colors = array('none' => $lang->colors_please_select);
$colors = array_merge($colors, $properties['colors']);

$color_setting = $form->generate_select_box('color', $colors, $properties['color'], array('class' => "select\" style=\"width: 200px;"));

	else
{
$colors = array('none' => $lang->colors_please_select);
$colors = array_merge($colors, $properties['colors']);

$color_setting = $form->generate_select_box('color', $colors, $properties['color'], array('class' => "select\" style=\"width: 200px;"));





		$mybb->input['colors'] = '';
foreach($properties['colors'] as $key => $color)
{

		$mybb->input['colors'] = '';
foreach($properties['colors'] as $key => $color)
{

Zeile 1604Zeile 1614

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


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

	$form->output_submit_wrapper($buttons);
$form->end();

$page->output_footer();
}

	$form->output_submit_wrapper($buttons);
$form->end();

$page->output_footer();
}


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


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

Zeile 1658Zeile 1668
		if(!$mybb->input['name'] || $mybb->input['name'] == ".css")
{
$errors[] = $lang->error_missing_stylesheet_name;

		if(!$mybb->input['name'] || $mybb->input['name'] == ".css")
{
$errors[] = $lang->error_missing_stylesheet_name;

		}


		}


		// Get 30 chars only because we don't want more than that
$mybb->input['name'] = my_substr($mybb->input['name'], 0, 30);
if(get_extension($mybb->input['name']) != "css")

		// Get 30 chars only because we don't want more than that
$mybb->input['name'] = my_substr($mybb->input['name'], 0, 30);
if(get_extension($mybb->input['name']) != "css")

		{

		{

			// Does not end with '.css'
$errors[] = $lang->sprintf($lang->error_missing_stylesheet_extension, $mybb->input['name']);
}

			// Does not end with '.css'
$errors[] = $lang->sprintf($lang->error_missing_stylesheet_extension, $mybb->input['name']);
}

Zeile 1674Zeile 1684
			if($theme['tid'] != $stylesheet['tid'])
{
$stylesheet['sid'] = copy_stylesheet_to_theme($stylesheet, $theme['tid']);

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

			}


			}


			$attached = array();
if($mybb->input['attach'] == 1)
{

			$attached = array();
if($mybb->input['attach'] == 1)
{

Zeile 1739Zeile 1749
				$update_d = true;

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

				$update_d = true;

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

				if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $theme['stylesheet']))

				if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $stylesheet['stylesheet']))

				{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);
}
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$stylesheet['cachefile']}");

				{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);
}
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$stylesheet['cachefile']}");

 

$filename_min = str_replace('.css', '.min.css', $stylesheet['cachefile']);
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$filename_min}");

			}

// Update the CSS file list for this theme

			}

// Update the CSS file list for this theme

Zeile 2232Zeile 2245

$form->output_submit_wrapper($buttons);



$form->output_submit_wrapper($buttons);


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

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

	echo '<script type="text/javascript">

$(document).ready(function() {

	echo '<script type="text/javascript">

$(document).ready(function() {

Zeile 2243Zeile 2256
//]]>
</script>';


//]]>
</script>';


	$form->end();

$page->output_footer();
}


	$form->end();

$page->output_footer();
}


if($mybb->input['action'] == "edit_stylesheet" && $mybb->input['mode'] == "advanced")
{
// Fetch the theme we want to edit this stylesheet in

if($mybb->input['action'] == "edit_stylesheet" && $mybb->input['mode'] == "advanced")
{
// Fetch the theme we want to edit this stylesheet in

Zeile 2258Zeile 2271
	{
flash_message($lang->error_invalid_theme, 'error');
admin_redirect("index.php?module=style-themes");

	{
flash_message($lang->error_invalid_theme, 'error');
admin_redirect("index.php?module=style-themes");

	}

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced");


	}

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced");


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

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

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

		flash_message($lang->error_invalid_stylesheet, 'error');
admin_redirect("index.php?module=style-themes");
}

Zeile 2338Zeile 2351
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<script src="./jscripts/codemirror/addon/dialog/dialog.js"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js"></script>

<script src="./jscripts/codemirror/mode/css/css.js"></script>
<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"></script>

<script src="./jscripts/codemirror/addon/search/search.js?ver=1808"></script>

';
}


';
}


Zeile 2459Zeile 2472
	{
$db->delete_query("themestylesheets", "sid='{$stylesheet['sid']}'", 1);
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$stylesheet['cachefile']}");

	{
$db->delete_query("themestylesheets", "sid='{$stylesheet['sid']}'", 1);
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$stylesheet['cachefile']}");

 

$filename_min = str_replace('.css', '.min.css', $stylesheet['cachefile']);
@unlink(MYBB_ROOT."cache/themes/theme{$theme['tid']}/{$filename_min}");


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


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

Zeile 2611Zeile 2627
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<script src="./jscripts/codemirror/addon/dialog/dialog.js"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js"></script>

<script src="./jscripts/codemirror/mode/css/css.js"></script>
<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"></script>

<script src="./jscripts/codemirror/addon/search/search.js?ver=1808"></script>

';
}


';
}


Zeile 2874Zeile 2890
			});</script>';
}


			});</script>';
}


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

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

	echo '<script type="text/javascript" src="./jscripts/theme_properties.js"></script>';
echo '<script type="text/javascript">
$(function() {

	echo '<script type="text/javascript" src="./jscripts/theme_properties.js"></script>';
echo '<script type="text/javascript">
$(function() {