<!doctype html>
<html class="no-js">
<head>

<include file="Common/head" />

    <style type="text/css">
        a.am-text-secondary:visited{color:#3bb4f2;}
        a.am-text-danger:visited{color:#dd514c;}
        .am-btn-default {background-color: #fff;}
        th {text-align:center;}
        tr td{text-align:center;}
        select{padding: 4px;border: 1px solid #ccc;}
        .am-popup-bd {background:#fff;}
        .am-popup-bd img {max-width: 100%}
        .am-u-sm-2 {border-top: 1px solid #ddd;margin-top: 10px;}
        .am-u-sm-10 {border-left: 1px solid #ddd;margin-top: 10px;}
    </style>
</head>
<body>

<include file="Common/header" />

<div class="am-cf admin">

    <!-- sidebar start -->
    <include file="Common/sidebar" nav="$nav"/>
    <!-- sidebar end -->

    <!-- Start right Content here -->
        <div class="content-page" style="background: white;">
            <!-- Start content -->
            <div class="content">
                <div class="am-cf am-padding am-padding-bottom-0">
                    <div class="am-fl am-cf">
                        <strong class="am-text-primary am-text-lg">Sub-store management</strong> / <small>New sub-store</small>
                    </div>
                </div>
                <!-- <hr style="margin-top:0px;"> -->
                <div class="am-g">
                    <div class="am-u-sm-12">
                        <form class="mainForm am-form" action="" method="POST">
                            <input type="hidden" name="id" value="{$data.id}">
                            <fieldset>
                                    <div class="am-form-group">
                                        <label for="username">Merchant account</label>
                                        <input type="text" id="username" name="username" value="{$data.username}" required/>
                                    </div>

                                    <div class="am-form-group">
                                        <label for="password">Merchants password</label>
                                        <input type="text" id="password" name="password" value="" placeholder="Failure to fill in shall be deemed unmodified" />
                                    </div>

                                    <div class="am-radio">
                                      <label>
                                        <input type="radio" name="status" value="1" <?php if($data['status'] == 1){echo 'checked';} ?> >
                                            open
                                      </label>
                                    </div>

                                    <div class="am-radio">
                                      <label>
                                        <input type="radio" name="status" value="-1" <?php if($data['status'] == -1){echo 'checked';} ?> >
                                            close
                                      </label>
                                    </div>

                                    <div class="am-form-group">
                                      <label class="am-checkbox-inline">
                                        <input type="checkbox" value="1" name="index_status" <?php if($data['index_status'] == 1){echo 'checked';} ?> > On the home page
                                      </label>
                                    </div>



                                    <p>
                                        <button type="submit" class="am-btn am-btn-success" id="submit">save</button>
                                        <!-- <button type="button" class="am-btn am-btn-default" onclick="javascript:location.href=history.back();">
                                            返回
                                        </button> -->
                                    </p>
                            </fieldset>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    <!-- end right Content here -->
</div>

<include file="Common/footer" />
<script type="text/javascript">
    // function loadJScript() {
    //     var script = document.createElement("script");
    //     script.type = "text/javascript";
    //     script.src = "https://api.map.baidu.com/api?v=2.0&ak=gTnpZGuGVTorsYAyIOhwehhRIRj3cKCM&callback=init";
    //     document.body.appendChild(script);
    // }

    // function init() {
    //     var map = new BMap.Map("l_map");
    //     var point = new BMap.Point(116.404, 39.915);
    //     map.centerAndZoom(point,15);
    //     map.enableScrollWheelZoom();//启用滚轮放大缩小
    //     // 创建地址解析器实例
    //     var myGeo = new BMap.Geocoder();

    //     var business_address = $('#business_address').val();
            
    //     // 将地址解析结果显示在地图上,并调整地图视野
    //     myGeo.getPoint(business_address, function(point){
    //         if (point) {
    //             map.centerAndZoom(point, 16);
    //             map.addOverlay(new BMap.Marker(point)); 
    //         }
    //     });

    //     $("#business_address").change('input propertychange', function() {
    //         var business_address = $(this).val();
    //         // 将地址解析结果显示在地图上,并调整地图视野
    //         myGeo.getPoint(business_address, function(point){
    //             if (point) {
    //                 map.centerAndZoom(point, 16);
    //                 map.addOverlay(new BMap.Marker(point)); 
    //                 $('#lnglat').val(point.lng+','+point.lat)
    //             } else{
    //                 alert("您选择地址没有解析到结果!");
    //             }
    //         });
    //     });
    // }  
    
    // window.onload = loadJScript;  //异步加载地图
</script>
</body>
</html>