<?php
/*
 * @Team : 孜然云
 * @Author : 孜然
 * @Url : zrv7.com
 * @Date : 2021-12-26 12:39
 * @Project : 孜然授权系统
 * @Description : 基于ZR框架开发的授权系统
 * @Qq : 2937978586
 * @Wx : hhr2937978586 
 * @Email : 2937978586@qq.com
 * @Read me : 孜然授权系统，是一款多模板/多用途/多权限的授权系统
 * @Remind : 孜然授权系统受《劳动知识产权》和《计算机软件著作法》的法律保护，使用破解即违法法律
 * @Dbfk : 如果您已经使用了盗版，孜然可以通过上述两法告你，不过我是不会这么做的，如果是传播盗版那么就必定告上法院
 */
$id=isset($_GET['id'])?$_GET['id']:null;
?>
<?php
if($id=='qiandao'){
$title='签到配置';
require_once 'head.php';
?>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">签到配置</div>
        <div class="layui-card-body">
            <form class="layui-form layui-form-pane">

                <div class="layui-form-item">
                    <label class="layui-form-label">签到开关</label>
                    <div class="layui-input-block">
                        <select name="qiandao_open" default="<php echo $conf['qiandao_open']; ?>" class="layui-input">
                            <option <?php echo $conf['qiandao_open'] == 0 ? 'selected ' : '' ?>value="0">关闭</option>
                            <option <?php echo $conf['qiandao_open'] == 1 ? 'selected ' : '' ?>value="1">开启</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">签到奖励</label>
                    <div class="layui-input-block">
                    <input type="text" name="qiandao_rmb" value="<?php echo $conf['qiandao_rmb']; ?>" placeholder="例如：1 则签到获得1余额" class="layui-input"/>
                    </div>
                </div>            
                                    
                <div class="layui-form-item">
                    <label class="layui-form-label">连续签到</label>
                    <div class="layui-input-block">
                    <input type="text" name="qiandao_day" value="<?php echo $conf['qiandao_day']; ?>" placeholder="例如：5 则连续签到5天会有额外的随机奖励余额" class="layui-input" />
                    </div>
                </div>
                
                <div class="layui-form-item">
                    <label class="layui-form-label">随机最小</label>
                    <div class="layui-input-block">
                    <input type="text" name="qiandao_rmbmin" value="<?php echo $conf['qiandao_rmbmin']; ?>" placeholder="例如：1则达到连续签到天数后，随机最小奖励余额就是1" class="layui-input"/>
                    </div>
                </div>
                
                <div class="layui-form-item">
                    <label class="layui-form-label">随机最大</label>
                    <div class="layui-input-block">
                    <input type="text" name="qiandao_rmbmax" value="<?php echo $conf['qiandao_rmbmax']; ?>" placeholder="例如：10则达到连续签到天数后，随机最大奖励余额就是10" class="layui-input"/>
                    </div>
                </div>

                <div class="layui-form-item layui-row layui-col-space10 ">
                    <div class="layui-col-md2">
                    <button type="button" class="layui-btn layui-btn-fluid" lay-submit lay-filter="noticeBtn">&emsp;保存配置&emsp;</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
layui.use(['form', 'element', 'jquery', 'admin', 'laydate', 'notice'], function () {
    var form = layui.form;
    var $ = layui.jquery;
    var laydate = layui.laydate;
    var admin = layui.admin;
    var notice = layui.notice;
    laydate.render({
        elem: '#updatetime'
    });
    form.on('submit(noticeBtn)', function (data) {
        var ii = layer.load(2, {shade:[0.1,'#fff']});
        notice.destroy();
        $.post('ajax.php?act=set', data.field, function (data) {
            layer.close(ii);
            notice.destroy();
            admin.btnLoading('[lay-filter="noticeBtn"]', false);
            if(data.code == 0){
                notice.msg('设置保存成功！', {animateInside: true, icon: 1});
            } else {
                notice.msg(data.msg, {animateInside: true, icon: 2});
            }
        });
        return false;
    });
});
</script>
<?php
}else if($id=='addzy'){
$title='发布资源';
require_once 'head.php';
?>
没有

<?php
}else if($id=='addzy'){
$title='孜然';
require_once 'head.php';
?>

<?php } ?>