<?php
	$this->display(tpl('head',true));
	$iswrite_Template[$setting['iswrite_Template']]="checked";
	$webstate[$setting['webstate']]="checked";
	$qinghuancun[$setting['qinghuancun']]="checked";
	$delshangxian[$setting['delshangxian']]="checked";
	$ssl[$setting['ssl']]="checked";
	$html[$setting['html']]="selected";
	$url_rules[$setting['url_rules']]="checked";
	$is_login_add_comment[$setting['is_login_add_comment']]="checked";
	$add_comment_state[$setting['add_comment_state']]="checked";
	$add_comment_yzm[$setting['add_comment_yzm']]="checked";
	$comment_del[$setting['comment_del']]="checked";
	$special_is_open[$setting['special_is_open']]="checked";
	$special_is_fit[$setting['special_is_fit']]="checked";
?>


<fieldweb class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <legend>home参数设置</legend>
</fieldweb>
<form id="SETForm" class="layui-form" method="post">
	<div class="layui-tab">
		<ul class="layui-tab-title">
			<li class="layui-this">评论设置</li>
			<li>缓存设置</li>
			<li>专题设置</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<table class="layui-table my-tabel">
					<tbody>
						<tr>
							<td>每天允许发表评论数量</td>
							<td>
								<input name="web[today_comment_num]"  class="layui-input  my-input" type="text" value="<?php echo $setting[today_comment_num] ?>">
							</td>
						</tr>
						<tr>
							<td>未登录用户是否可以发布评论</td>
							<td>
								<input name="web[is_login_add_comment]" value="1" title="可以" type="radio" <?php echo $is_login_add_comment[1] ?>>
								<input name="web[is_login_add_comment]" value="0" title="不可以" type="radio" <?php echo $is_login_add_comment[0] ?>>
							</td>
						</tr>
						<tr>
							<td>评论是否直接审核</td>
							<td>
								<input name="web[add_comment_state]" value="1" title="自动审核" type="radio" <?php echo $add_comment_state[1] ?>>
						   		<input name="web[add_comment_state]" value="0" title="人工审核" type="radio" <?php echo $add_comment_state[0] ?>>
							</td>
						</tr>
						<tr>
							<td>评论是否使用验证码</td>
							<td>
								<input name="web[add_comment_yzm]" value="1" title="不使用" type="radio" <?php echo $add_comment_yzm[1] ?>>
						   		<input name="web[add_comment_yzm]" value="0" title="使用" type="radio" <?php echo $add_comment_yzm[0] ?>>
							</td>
						</tr>
						<tr>
							<td>是否允许删除自己的评论</td>
							<td>
								<input name="web[comment_del]" value="1" title="允许" type="radio" <?php echo $comment_del[1] ?>>
						   		<input name="web[comment_del]" value="0" title="不允许" type="radio" <?php echo $comment_del[0] ?>>
							</td>
						</tr>
						<tr>
							<td>URL规则</td>
							<td>
								<!--<input type="radio" name="web[url_rules]" title="动态网址" value="1" <?php echo $url_rules[1] ?>/>-->
			            		<input type="radio" name="web[url_rules]" title="标准伪静态网址"  value="2"  <?php echo $url_rules[2] ?>/>
			            		<input type="radio" name="web[url_rules]" title="精简伪静态网址"  value="3"  <?php echo $url_rules[3] ?>/>
							</td>
						</tr>
						<tr>
							<td colspan="2" class="my_button center" align="center">
								<input type="hidden" name="step" id="step" value="post" />
								<button class="layui-btn">立即提交</button>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="layui-tab-item">
				<table class="layui-table my-tabel">
					<tbody>
						<tr>
							<td>文章首页缓存更新时间</td>
							<td>
			            		<input name="web[index_cache_time]"  class="layui-input  my-input" type="text" value="<?php echo $setting[index_cache_time] ?>"><span>小时</span>
			            		<p>不需要缓存可以不填或者为0,支持小数点后两位</p>
							</td>
						</tr>
						<tr>
							<td>文章分类缓存更新时间</td>
							<td>
			            		<input name="web[category_cache_time]"  class="layui-input  my-input" type="text" value="<?php echo $setting[category_cache_time] ?>"><span>小时</span>
			            		<p>不需要缓存可以不填或者为0,支持小数点后两位</p>
							</td>
						</tr>
						<tr>
							<td>文章内容页缓存更新时间</td>
							<td>
			            		<input name="web[content_cache_time]"  class="layui-input  my-input" type="text" value="<?php echo $setting[content_cache_time] ?>"><span>小时</span>
			            		<p>不需要缓存可以不填或者为0,支持小数点后两位</p>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="layui-tab-item">
				<table class="layui-table my-tabel">
					<tbody>
						<tr>
							<td>通配关键词</td>
							<td>
								<input type="radio" name="web[special_is_open]" title="开启" value="1" <?php echo $special_is_open[1] ?>/>
			            		<input type="radio" name="web[special_is_open]" title="关闭"  value="0" <?php echo $special_is_open[0] ?>/>
			            		<p>如果开启了通配关键词，在专题里并且设置了关键词，即可在发布信息的时候，无需勾选专题，也可自己匹配</p>
							</td>
						</tr>
						<tr>
							<td>关键词匹配次数</td>
							<td>
								<input type="radio" name="web[special_is_fit]" title="匹配一次直接跳出" value="0" <?php echo $special_is_fit[0] ?>/>
			            		<input type="radio" name="web[special_is_fit]" title="继续向下多条匹配"  value="1" <?php echo $special_is_fit[1] ?>/>
			            		<p>如果是多条匹配，可以入库多个专题。如果专题较多的话，可能会影响速度</p>
							</td>
						</tr>
						<tr>
							<td>分类缓存更新时间</td>
							<td>
			            		<input name="web[special_category_cache_time]"  class="layui-input  my-input" type="text" value="<?php echo $setting[special_category_cache_time] ?>"><span>小时</span>
			            		<p>不需要缓存可以不填或者为0,支持小数点后两位</p>
							</td>
						</tr>
						<tr>
							<td>专题页缓存更新时间</td>
							<td>
			            		<input name="web[special_content_cache_time]"  class="layui-input  my-input" type="text" value="<?php echo $setting[special_content_cache_time] ?>"><span>小时</span>
			            		<p>不需要缓存可以不填或者为0,支持小数点后两位</p>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
</form>
<script>
	layui.use(['form', 'layedit', 'laydate','element'], function() {
		var form = layui.form,
			layer = layui.layer,
			layedit = layui.layedit,
			laydate = layui.laydate;
	});
</script>

<?php $this->display(tpl('foot',true)); ?>
