<style>
.dianm{clear:both;margin:0px;}
.erl{margin-left: 580px;margin-top: 10px;padding-top: 7px}
.tsdiv{margin-left:0px}
.reset_bg{margin-top: 50px;}
.biu_box, .reward_box {margin-left: 30px;width: 700px;overflow: hidden;}
.t-e {
    margin-left: 30px;
    margin-bottom: 15px;
    margin-top: 5px;
    overflow: hidden;
    width: 705px;
}
</style>
<div class="col-md-10" role="main">
    <nav class="breadcrumb"></i> 客户端功能配置<span class="c-gray en">&gt;</span>用户注册与登录</nav>
    <div class="title-box">
        <p class="t-p" style="font-size: 28px; color: #7d7d7d;vertical-align: middle; padding-top: 15px; padding-bottom: 15px;">用户注册与登录</p>
        <div class="t-e">
            <img src="<?php echo asset_url('images/explain.png');?>" alt="">
            <span style="width: 800px;vertical-align: middle;font-size: 12px;">说明：本功能可控制APP端的登录与注册功能选项开关，此处仅用于对应入口的显示和影藏，手机注册，QQ登录，微信登录等相关的后台和参数配置需要额外的配置，请联系 MOCUZ 运营人员。</span>
        </div>
    </div>
        <div class="reset_bg">
            <form action="<?php echo site_url('mocuzfun/client_fun/login_register_set')?>" method="post" class="registerForm regiswidth" enctype="multipart/form-data">
                <div class="biu_box">
                    <div class="form-group ediv">
                        <span class="dianm biu_tle">手机号注册：</span>
                        <input type="hidden" name="tel_register" value="<?php echo $tel_register['value'];?>">
                        <div class="biu_rdo">
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img " isc="0" telid="1"> <span>开启</span>
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img left_rdo" isc="0" telid="0"> <span>关闭</span>
                        </div>
                    </div>

                    <div class="form-group ediv">
                        <span class="dianm biu_tle">用户名注册：</span>
                        <input type="hidden" name="nick_register" value="<?php echo $nick_register['value'];?>">
                        <div class="biu_rdo">
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img " isc="0" nickid="1"> <span>开启</span>
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img left_rdo" isc="0" nickid="0"> <span>关闭</span>
                        </div>
                    </div>

                    <div class="form-group ediv" style="margin-top: 40px;">
                        <span class="dianm biu_tle">使用QQ登录：</span>
                        <input type="hidden" name="qq_login" value="<?php echo $qq_login['value'];?>">
                        <div class="biu_rdo">
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img " isc="0" qqid="1"> <span>开启</span>
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img left_rdo" isc="0" qqid="0"> <span>关闭</span>
                        </div>
                    </div>

                    <div class="form-group ediv">
                        <span class="dianm biu_tle">使用微信登录：</span>
                        <input type="hidden" name="wexin_login" value="<?php echo $wexin_login['value'];?>">
                        <div class="biu_rdo">
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img " isc="0" wxid="1"> <span>开启</span>
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img left_rdo" isc="0" wxid="0"> <span>关闭</span>
                        </div>
                    </div>

                    <div class="form-group ediv">
                        <span class="dianm biu_tle">使用手机免密登录：</span>
                        <input type="hidden" name="nopwd_login" value="<?php echo $nopwd_login['value'];?>">
                        <div class="biu_rdo">
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img " isc="0" pwdid="1"> <span>开启</span>
                            <img src="<?php echo asset_url('images/unchoice.png');?>" alt="" class="biu_rdo_img left_rdo" isc="0" pwdid="0"> <span>关闭</span>
                        </div>
                    </div>
                    <div style="overflow:hidden">
                        <button type="submit" class="edit_btn" id="save">保存修改</button>
                    </div>
                     <div class="lr_ts">
                         <img src="<?php echo asset_url('images/tips.png');?>" alt="">
                         <span>提示：当两种注册方式全部关闭后，注册界面将显示“本站已关闭注册”</span>
                     </div>
                </div>
            </form>
        </div>
    </div>
<script type="text/javascript">
$(function(){
    //初始化显示
    var tel_register = $('input[name=tel_register]').val();
    var nick_register = $('input[name=nick_register]').val();
    var qq_login = $('input[name=qq_login]').val();
    var wexin_login = $('input[name=wexin_login]').val();
    var nopwd_login = $('input[name=nopwd_login]').val();
    $('.biu_rdo_img').each(function(){
     if($(this).attr('telid') == tel_register || $(this).attr('nickid') == nick_register|| $(this).attr('qqid') == qq_login || $(this).attr('wxid') == wexin_login || $(this).attr('pwdid') == nopwd_login)
     {
        $(this).attr('src','<?php echo asset_url("images/choice.png");?>');
        $(this).attr('isc',1);
     }
    });
    // 单选按钮切换
    $('.biu_rdo img').click(function(){
        if(typeof($(this).attr('telid')) != "undefined")
        {
            var telval = $(this).attr('telid');
            $('input[name=tel_register]').val(telval);
        }
        if(typeof($(this).attr('nickid')) != "undefined")
        {
            var nickval = $(this).attr('nickid');
            $('input[name=nick_register]').val(nickval);
        }
        if(typeof($(this).attr('qqid')) != "undefined")
        {
            var qqval = $(this).attr('qqid');
            $('input[name=qq_login]').val(qqval);
        }
        if(typeof($(this).attr('wxid')) != "undefined")
        {
            var wxval = $(this).attr('wxid');
            $('input[name=wexin_login]').val(wxval);
        }

        if(typeof($(this).attr('pwdid')) != "undefined")
        {
            var pwdval = $(this).attr('pwdid');
            $('input[name=nopwd_login]').val(pwdval);
        }

        var isc=$(this).attr('isc');
        if(isc==0){
            $(this).attr('src','<?php echo asset_url("images/choice.png")?>');
            $(this).attr('isc','1');
            $(this).siblings('img').attr('src','<?php echo asset_url("images/unchoice.png");?>');
            $(this).siblings('img').attr('isc','0');
        }
    })
})
</script>
