优化 模板选择

This commit is contained in:
LyLme 2022-04-04 11:30:07 +08:00
parent cb5fe75fb9
commit cc4b0dade7
1 changed files with 92 additions and 82 deletions

View File

@ -116,7 +116,7 @@ if($set=='save') {
<div class="form-group"> <div class="form-group">
<label for="web_site_home-title">首页提示语</label> <label for="web_site_home-title">首页提示语</label>
<textarea type="text" class="form-control" name="home-title" placeholder="请输入首页提示语支持HTML代码"><?php echo $conf['home-title']?></textarea> <textarea type="text" class="form-control" name="home-title" placeholder="请输入首页提示语支持HTML代码"><?php echo $conf['home-title']?></textarea>
<small class="help-block">首页提示语<code>支持HTML代码</code> <a href="https://blog.lylme.com/archives/lylme_spage.html#hometitle" target="_blank">查看效果演示</a></small> <small class="help-block">首页提示语<code>支持HTML代码</code> <a href="https://blog.lylme.com/archives/lylme_spage.html#hometitle" target="_blank">查看效果演示</a></small>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="web_site_copyright">底部版权</label> <label for="web_site_copyright">底部版权</label>
@ -136,22 +136,32 @@ if($set=='save') {
<label class="btn-block" for="web_yan_status">模板设置</label> <label class="btn-block" for="web_yan_status">模板设置</label>
<label class="lyear-switch switch-solid switch-cyan"> <label class="lyear-switch switch-solid switch-cyan">
<select class="form-control" name="template">'; <select class="form-control" name="template">';
<option <?php if($conf['template'] == 'default') echo 'selected="selected"';?> value="default">default</option> <?php
<option <?php if($conf['template'] == 'lylme') echo 'selected="selected"'; ?> value="lylme">lylme</option> $tlpath = ROOT.'template/';
$tls = glob( $tlpath."*", GLOB_ONLYDIR);
foreach($tls as $tl) {
$tl = str_replace($tlpath,"",$tl);
echo'<option ';
if($conf['template'] == $tl) echo 'selected="selected"';
echo 'value="'.$tl.'">'.$tl.'</option>';
}
?>
</select> </select>
</label> </label>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="btn-block" for="web_yan_status">随机一言开关</label> <label class="btn-block" for="web_yan_status">随机一言开关</label>
<label class="lyear-switch switch-solid switch-cyan"> <label class="lyear-switch switch-solid switch-cyan">
<input type="checkbox" <?php if($conf['yan']!='false')echo 'checked="checked"';?> name="yan" value="true"> <input type="checkbox" <?php if($conf['yan']!='false')echo 'checked="checked"';
?> name="yan" value="true">
<span></span> <span></span>
</label> </label>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="btn-block" for="web_tq_status">天气显示开关</label> <label class="btn-block" for="web_tq_status">天气显示开关</label>
<label class="lyear-switch switch-solid switch-primary"> <label class="lyear-switch switch-solid switch-primary">
<input type="checkbox" <?php if($conf['tq']!='false')echo 'checked="checked"';?> name="tq" value="true"> <input type="checkbox" <?php if($conf['tq']!='false')echo 'checked="checked"';
?> name="tq" value="true">
<span></span> <span></span>
</label> </label>
</div> </div>