📄 edit_settings.php
字号:
<?PHP
/*
EasyCMS edit setting page, allows to change the layout of the page
(c) Christian Heilmann
*/
include_once('functions_inc.php');
if ($_POST['back']!=''){
$help=$_POST['help']==''?'off':'on';
$navlook=$_POST['tree']==''?'select':'tree';
$settings="<?xml version=\"1.0\"?>\n<!-- EasyCMS settings -->\n<settings>\n\t<help>".$help."</help>\n\t<navlook>".$navlook."</navlook>\n\t<formwidth>".$_POST['editboxwidth']."</formwidth>\n\t<configfile>".$_POST['config']."</configfile>\n</settings>";
if ($_POST['saveforall']=='on'){save ('../data/settings.xml',$settings);}
setcookie ('ECMSsitestyle',$help.'|'.$navlook.'|'.$_POST['editboxwidth'].'|'.$_POST['config'] ,mktime(0, 0, 0, 5, 14, 2020));
header('Location:edit_settings.php');
}
?>
<?PHP
include('head_inc.php');
echo '<div id="nav">';
echo include('navbox.php');
echo '</div>';
?>
<?PHP if ($navlook=='tree'){?>
<div id="tree">
<?PHP if($navigation==""){echo d('nonavigationmessage');}else{include_once('tree.php');}?>
</div>
<?}?>
<?PHP
// Setting the main block style according to settings.
if ($navlook=='tree' && $help!='off'){echo '<div id="main">';}
if ($navlook!='tree' && $help!='off'){echo '<div id="mainnotree">';}
if ($navlook!='tree' && $help=='off'){echo '<div id="mainsolo">';}
if ($navlook=='tree' && $help=='off'){echo '<div id="mainnohelp">';}
?>
<h1><?=d('changelayoutheadline')?></h1>
<form method="post" action="edit_settings.php">
<p>
<label for="editboxwidth"><?=d('editboxlabel')?></label>
<input type="hidden" name="back" value="<?=$self?>" />
<input type="text" name="editboxwidth" id="editboxwidth" size="2" value="<?=$formwidth?>" />
</p>
<p>
<input type="text" size="<?=$formwidth==''?'40':$formwidth?>" value="<?=d('demoboxcaption')?>" />
</p>
<p>
<label for="config"><?=d('configlabel')?></label>
<select name="config" id="config">';
<?PHP
$conf=directory('.','xml');
foreach ($conf as $c){
preg_match('/.*?_(.*?).xml/',$c,$disp);
echo '<option value="'.$c.'" ';
echo $c==$dispfile?'selected':'';
echo ' >'.$disp[1].'</option>';
}
?>
</select>
</p>
<p>
<input type="checkbox" name="tree" id="left" <?if ($navlook=='tree'){echo'checked="checked"';}?> />
<label for="left"><?=d('treelabel')?></label>  
<input type="checkbox" name="help" id="right" <?if ($help!='off'){echo'checked="checked"';}?> />
<label for="right"><?=d('helplabel')?></label>
</p>
<p>
<input type="checkbox" name="saveforall" id="saveforall" />
<label for="right"><?=d('saveforall')?></label>
</p>
<p>
<input type="submit" size="2" value="<?=d('configbutton');?>" />
</p>
</form>
</div>
<?PHP if ($help!='off'){?>
<div id="tools">
<?PHP include_once('htmlhelp.php');?>
</div>
<?PHP }?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -