<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:58:"F:\www\EduWork/./application/student\view\self\update.html";i:1479712509;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <meta name="format-detection" content="telephone=no">
    <meta name="keywords" content="EduWork">
    <meta name="description" content="EduWork">
    <title>EduWork修改个人信息</title>
    <link rel="stylesheet" href="/static/app/css/weui.min.css">
    <style>
        .weui-cells{
            margin-top:0px;
        }
        .middle{
            height:30px;
            background-color: #f3f3f3;
        }
    </style>
</head>
<body>
<div id="updateManage">
    <form id="update">
        <?php if($data['title']=='性别'): ?>
        <div class="weui-cells__title">性别</div>
        <div class="weui-cells weui-cells_radio">
            <label class="weui-cell weui-check__label" for="x11">
                <div class="weui-cell__bd">
                    <p>男</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" value="0" class="weui-check" name="<?php echo $data['name']; ?>" id="x11" <?php if($data['content'] == '男'): ?>checked='checked'<?php endif; ?>>
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
            <label class="weui-cell weui-check__label" for="x12">

                <div class="weui-cell__bd">
                    <p>女</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" value="1" name="<?php echo $data['name']; ?>" class="weui-check" id="x12" <?php if($data['content'] == '女'): ?>checked='checked'<?php endif; ?>>
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
        </div>
        <?php else: ?>
        <div class="weui-cells__title"><?php echo $data['title']; ?></div>
        <div class="weui-cells" style="border-bottom:1px solid #ececec">
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text" name="<?php echo $data['name']; ?>" value="<?php echo $data['content']; ?>"/>
                </div>
            </div>
        </div>
        <?php endif; ?>
        <div class="weui-btn-area">
            <a class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips">确定</a>
        </div>
    </form>
</div>
<script src="/static/plugins/jquery/jquery.min.js"></script>
<script>
    $('#showTooltips').click(function(){
        $.ajax({
            url: '../../student/user/update',
            data: $("#update").serialize(),
            type: 'POST',
            dataType: 'JSON',
            success: function (returnData) {
                location.href = '../../student/user/selfManage';
            },
            error:function(){
                alert('系统异常！');
            }
        })
    })
</script>
</body>
</html>