<!DOCTYPE html>
<html lang=zh-cn>
<head>
    <meta charset=utf-8>
    <title>纵横计量支付系统</title>
    <meta name=description content=计量支付>
    <meta name=copyright content=smartcost.com.cn>
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
    <script src={{rootUrl}}global/js/bootstrap.js></script>
    <script src={{rootUrl}}global/js/jl.js></script>
</head>
<body>
<!-- include "top" -->
<div class="wrapContent">
    <!-- include "left" -->
    <div class="mainContainer">
        <!--内容-->
        <div class="mainContent">
            <div class="title clearfix">
                <div class="fR">
                    <a class="btn btn-link" href="http://smartcost.com.cn/product/19" target="_blank"><i class="icon-question-sign"></i>&nbsp;帮助</a>
                </div>
            </div>
            <div class="form">
                <legend>修改头像</legend>
                <div class="clearfix">
                    <p id="swfContainer">
                        本组件需要安装Flash Player后才可使用，请从<a href="http://www.adobe.com/go/getflashplayer">这里</a>下载安装。
                    </p>
                </div>
            </div>
        </div>
        <!--内容-->
    </div>
</div>
<script type="text/javascript">autoFlashHeight();</script>
<script type="text/javascript" src="{{rootUrl}}global/avaup/scripts/swfobject.js"></script>
<script type="text/javascript" src="{{rootUrl}}global/avaup/scripts/fullAvatarEditor.js"></script>
<script type="text/javascript">
    swfobject.addDomLoadEvent(function () {
        var swf = new fullAvatarEditor("swfContainer", {
                    id: 'swf',
                    upload_url: '{{rootUrl}}user/avatar',
                    src_upload: 2,
                    avatar_sizes: '100*100|96*96|48*48',
                    avatar_sizes_desc: '100*100像素|96*96像素|48*48像素',
                }, function (msg) {
                    switch (msg.code) {
                        case 1 :
//		alert("页面成功加载了组件！");
                            break;
                        case 2 :
//		alert("已成功加载默认指定的图片到编辑面板。");
                            break;
                        case 3 :
                            if (msg.type == 0) {
//		    alert("摄像头已准备就绪且用户已允许使用。");
                            }
                            else if (msg.type == 1) {
//		    alert("摄像头已准备就绪但用户未允许使用！");
                            }
                            else {
//		    alert("摄像头被占用！");
                            }
                            break;
                        case 5 :
                            if (msg.type == 0) {
                                windows.location.href = '/user/profile';

                            }
                            break;
                    }
                }
        );
        document.getElementById("upload").onclick = function () {
            swf.call("upload");
        };
    });
</script>
</body>
</html>