Add option for setting css to use with the skin. Also happens to add missing elements of the table for the skins tab and cleans up some spacing. Also, use a variable to tell whether to reload the page or not, which is required after you change the skin or css.
This commit is contained in:
parent
a412799003
commit
193cb71b71
|
@ -83,11 +83,20 @@ foreach ( $tabs as $name=>$value )
|
||||||
<?php
|
<?php
|
||||||
if($tab == 'skins') {
|
if($tab == 'skins') {
|
||||||
$current_skin = $_COOKIE['zmSkin'];
|
$current_skin = $_COOKIE['zmSkin'];
|
||||||
if (isset($_GET['skin-choice'])) {
|
$reload = false;
|
||||||
|
if ( isset($_GET['skin-choice']) && ( $_GET['skin-choice'] != $current_skin ) ) {
|
||||||
setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 );
|
setcookie('zmSkin',$_GET['skin-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");
|
||||||
echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>";
|
$reload = true;
|
||||||
}
|
}
|
||||||
|
$current_css = $_COOKIE['zmCSS'];
|
||||||
|
if ( isset($_GET['css-choice']) and ( $_GET['css-choice'] != $current_css ) ) {
|
||||||
|
setcookie('zmCSS',$_GET['css-choice'], time()+3600*24*30*12*10 );
|
||||||
|
//header("Location: index.php?view=options&tab=skins&reset_parent=1");
|
||||||
|
$reload = true;
|
||||||
|
}
|
||||||
|
if ( $reload )
|
||||||
|
echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form name="optionsForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>">
|
<form name="optionsForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>">
|
||||||
|
@ -96,6 +105,7 @@ if($tab == 'skins') {
|
||||||
<table class="contentTable major optionTable" cellspacing="0">
|
<table class="contentTable major optionTable" cellspacing="0">
|
||||||
<thead><tr><th><?= $SLANG['Name'] ?></th><th><?= $SLANG['Description'] ?></th> <th><?= $SLANG['Value'] ?></th></tr></thead>
|
<thead><tr><th><?= $SLANG['Name'] ?></th><th><?= $SLANG['Description'] ?></th> <th><?= $SLANG['Value'] ?></th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td>ZM_SKIN</td>
|
<td>ZM_SKIN</td>
|
||||||
<td><?php echo $SLANG['SkinDescription']; ?></td>
|
<td><?php echo $SLANG['SkinDescription']; ?></td>
|
||||||
<td><select name="skin-choice">
|
<td><select name="skin-choice">
|
||||||
|
@ -107,6 +117,21 @@ if($tab == 'skins') {
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ZM_CSS</td>
|
||||||
|
<td><?php echo $SLANG['CSSDescription']; ?></td>
|
||||||
|
<td><select name="css-choice">
|
||||||
|
<?php
|
||||||
|
foreach(glob('skins/'.$current_css.'/*',GLOB_ONLYDIR) as $dir) {
|
||||||
|
$dir = basename($dir);
|
||||||
|
echo '<option value="'.$dir.'" '.($current_css==$dir ? 'SELECTED' : '').'>'.$dir.'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div id="contentButtons">
|
<div id="contentButtons">
|
||||||
<input type="submit" value="<?= $SLANG['Save'] ?>"<?= $canEdit?'':' disabled="disabled"' ?>/>
|
<input type="submit" value="<?= $SLANG['Save'] ?>"<?= $canEdit?'':' disabled="disabled"' ?>/>
|
||||||
|
|
Loading…
Reference in New Issue