Merge branch 'updated-console' into storageareas

This commit is contained in:
Isaac Connor 2016-04-04 11:51:07 -04:00
commit b3f0f5d0e8
1 changed files with 24 additions and 28 deletions

View File

@ -55,34 +55,8 @@ else
$focusWindow = true; $focusWindow = true;
xhtmlHeaders( __FILE__, translate('Options') ); xhtmlHeaders( __FILE__, translate('Options') );
?>
<body>
<?php include("skins/$skin/views/header.php") ?> # Have to do this stuff up here before including header.php because fof the cookie setting
<div class="container-fluid">
<ul class="nav nav-pills nav-stacked col-md-2">
<?php
foreach ( $tabs as $name=>$value )
{
if ( $tab == $name )
{
?>
<li class="active"><a href="?view=<?php echo $view ?>&amp;tab=<?php echo $name ?>"><?php echo $value ?></a></li>
<?php
}
else
{
?>
<li><a href="?view=<?php echo $view ?>&amp;tab=<?php echo $name ?>"><?php echo $value ?></a></li>
<?php
}
}
?>
</ul>
<div id="options" class="col-md-10">
<?php
$skin_options = array_map( 'basename', glob('skins/*',GLOB_ONLYDIR) ); $skin_options = array_map( 'basename', glob('skins/*',GLOB_ONLYDIR) );
if($tab == 'skins') { if($tab == 'skins') {
$current_skin = $_COOKIE['zmSkin']; $current_skin = $_COOKIE['zmSkin'];
@ -93,15 +67,37 @@ if($tab == 'skins') {
$reload = true; $reload = true;
} }
$current_css = $_COOKIE['zmCSS']; $current_css = $_COOKIE['zmCSS'];
Error("Current css $current_css");
if ( isset($_GET['css-choice']) and ( $_GET['css-choice'] != $current_css ) ) { if ( isset($_GET['css-choice']) and ( $_GET['css-choice'] != $current_css ) ) {
Error("setting css $current_css to " . $_GET['css-choice']);
setcookie('zmCSS',$_GET['css-choice'], time()+3600*24*30*12*10 ); setcookie('zmCSS',$_GET['css-choice'], time()+3600*24*30*12*10 );
//header("Location: index.php?view=options&tab=skins&reset_parent=1"); //header("Location: index.php?view=options&tab=skins&reset_parent=1");
$reload = true; $reload = true;
} }
if ( $reload ) if ( $reload )
echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>"; echo "<script type=\"text/javascript\">if(window.opener){window.opener.location.reload();}window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>";
} # end if tab == skins
?>
<body>
<?php include("skins/$skin/views/header.php") ?>
<div class="container-fluid">
<ul class="nav nav-pills nav-stacked col-md-2">
<?php
foreach ( $tabs as $name=>$value )
{
?>
<li<?php echo $tab == $name ? ' class="active"' : '' ?>><a href="?view=<?php echo $view ?>&amp;tab=<?php echo $name ?>"><?php echo $value ?></a></li>
<?php
}
?>
</ul>
<div id="options" class="col-md-10">
<?php
if($tab == 'skins') {
?> ?>
<form name="optionsForm" class="form-horizontal" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>"> <form name="optionsForm" class="form-horizontal" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="hidden" name="view" value="<?php echo $view ?>"/> <input type="hidden" name="view" value="<?php echo $view ?>"/>