<div style="display:none;" id = 'dialog_real' class="dialog radius5 dialog567">
    <form id = 'real_form' name = 'real_form' method = 'post' enctype = 'multipart/form-data'>
        <div class="hd">
            <h3 class="h3">设置Real房<a href="http://zsb.house365.com/help/nj/?p=1042" target='_blank' class="realLink">什么是Real房？</a></h3>
            <span class="close close-win" title="关闭">Χ</span>
        </div>
        <div class="mod">
            <div class="realPopBox">
                <div class="houseInfo"></div>
                <!--<div class="tipItem">温馨提示：满足以下三个条件之一，可以将该房源推荐成REAL房！ </div>-->
                <div id="js_tab_title_real" class="tab_title_real">
                    <a class="link on" href="javascript:void(0)">方式一</a>
                    <a class="link" href="javascript:void(0)">方式二</a>
                    <a class="link" href="javascript:void(0)">方式三</a>
                </div>
                <div id="js_tab_title_real_mod">
                <div class="itemForm">
                    <div class="itemTitle">方式一： 缴纳500元的real房认证体系保证金</div>
                    <div class="noneJia">
                        <?php if (isset($broker_info) && $broker_info['isreal'] == 1) { ?>
                            <span>您已加入365real房认证体系！</span>
                        <?php } else { ?> 
                            <span class="color">您尚未加入365real房认证体系</span>
                            <?php if (isset($broker_info['accout_manager']) && is_array($broker_info['accout_manager']) && !empty($broker_info['accout_manager'])) { ?>
                                ，如需加入请联系您的客户经理：<?php echo $broker_info['accout_manager']['truename'] ?> 
                                <?php echo $broker_info['accout_manager']['telno'] ?>
                            <?php } ?>
                        <?php } ?>
                    </div>
                </div>
                <!---->
                <div class="itemForm hide">
                    <div class="itemTitle">方式二：上传该房源房产证 </div>
                    <div class="forms">
                        <dl class="list">
                            <dd class="list_item clearfix">
                                <label class="label">该套房源的房产证号码(<span style='color:#666'>选填</span>)：</label>
                                <div class="fields">
                                    <input type="text" class="input_text w170" name="pic_title">
                                </div>
                            </dd>
                            <dd class="list_item clearfix">
                                <label class="label">请上传该套房源的房产证：</label>
                                <div class="fields">
                                    <div class="btnBox">
                                        <span id="spanButtonPlaceholder0"></span>
                                    </div>
                                    <div class="tipRealPop clear">
                                        <div class="tipNumberSj">
                                            <div class="one ico"></div>
                                            <div class="two ico"></div>
                                            <div class="three ico"></div>
                                            <div class="four ico"></div>
                                            <div class="five ico"></div>
                                            <div class="six ico"></div>
                                        </div>
                                        <div class="tipNumberInner">图片小于1M,仅支持jpg格式,只限一张</div>
                                    </div>
                                </div>
                            </dd>
                        </dl>
                    </div>
                        <div id="divFileProgressContainer0"  style="display:none;"></div>
                        <div id="thumbnails0"  class="loadedimg"></div>
                        <div id="divFileProgressFail0" class="blue"  style="display:none;"></div>
                </div>
                <!---->
                <div class="itemForm hide">
                    <div class="itemTitle">方式三：上传房屋买卖委托书 </div>
                    <div class="forms">
                        <dl class="list">
                            <dd class="list_item clearfix">
                                <label class="label">请上传房屋买卖委托书：</label>
                                <div class="fields">
                                    <div class="btnBox">
                                        <span id="spanButtonPlaceholder1"></span>
                                    </div>
                                    <div class="tipRealPop clear">
                                        <div class="tipNumberSj">
                                            <div class="one ico"></div>
                                            <div class="two ico"></div>
                                            <div class="three ico"></div>
                                            <div class="four ico"></div>
                                            <div class="five ico"></div>
                                            <div class="six ico"></div>
                                        </div>
                                        <div class="tipNumberInner">最多可批量上传5张图片，每张图片小于1M，仅支持jpg格式</div>
                                    </div>
                                </div>
                            </dd>
                        </dl>
                    </div>
                     <div id="divFileProgressContainer1" style="display:none;"></div>
                     <div id="thumbnails1"  class="loadedimg"></div>
                     <div id="divFileProgressFail1" class="blue"  style="display:none;"></div>
                </div>
               
                <!---->
                </div>
                <div class="realFCheckbox">
                    <label>
                        <input id="after" type="checkbox" name="after" checked="">
                        我已看过并了解real房承诺，并承诺该房源符合该承诺
                    </label>
                </div>
                <div class="realFbtnbox">
                    <a class="btn btnCon radius5 close-win" href="####" onclick='sub_real_form()'>确定</a>
                    <a class="btn btnCon radius5 close-win" href="####">取消</a>
                </div>
            </div>
        </div>
        <input type="hidden" name='rowid' id='real_set_rowid' value=''>
        <input type="hidden" name='secret_key' id='real_secret_key' value=''>
    </form>
</div>
<script type="text/javascript">
    var swfu0;
    swfu0 = new SWFUpload({
        // Backend Settings
        upload_url: "<?= $upload_pic_url ?>",
        post_params: {"PHPSESSID": "<?php echo session_id(); ?>"},
        // File Upload Settings
        file_size_limit: "1 MB", // 1MB
        file_types: "*.jpg",
        file_types_description: "JPG Images",
        file_upload_limit: "1",
        file_queue_limit: "5",
        custom_settings: {
            upload_target: "divFileProgressContainer0",
            upload_limit: 1,
            upload_fail: "divFileProgressFail0",
            upload_nail: "thumbnails0",
            upload_infotype: 1
        },
        // Event Handler Settings - these functions as defined in Handlers.js
        //  The handlers are not part of SWFUpload but are part of my website and control how
        //  my website reacts to the SWFUpload events.
        swfupload_loaded_handler: swfUploadLoaded,
        file_queue_error_handler: fileQueueError,
        file_dialog_start_handler: fileDialogStart,
        file_dialog_complete_handler: fileDialogComplete,
        upload_progress_handler: uploadProgress,
        upload_error_handler: uploadError,
        upload_success_handler: uploadSuccess,
        upload_complete_handler: uploadComplete,
        // Button Settings
        button_image_url: "<?= STATIC_SOURCE_URL ?>/common/js/swf/btn61x22.png",
        button_placeholder_id: "spanButtonPlaceholder0",
        button_width: 61,
        button_height: 22,
        button_cursor: SWFUpload.CURSOR.HAND,
        // Flash Settings
        flash_url: "/swfupload.swf",
        // Debug Settings
        debug: false
    });
    
    var swfu1;
    swfu1 = new SWFUpload({
        // Backend Settings
        upload_url: "<?= $upload_pic_url ?>",
        post_params: {"PHPSESSID": "<?php echo session_id(); ?>"},
        // File Upload Settings
        file_size_limit: "1 MB", // 1MB
        file_types: "*.jpg",
        file_types_description: "JPG Images",
        file_upload_limit: "5",
        file_queue_limit: "5",
        custom_settings: {
            upload_target: "divFileProgressContainer1",
            upload_limit: 5,
            upload_fail: "divFileProgressFail1",
            upload_nail: "thumbnails1",
            upload_infotype: 2
        },
        // Event Handler Settings - these functions as defined in Handlers.js
        //  The handlers are not part of SWFUpload but are part of my website and control how
        //  my website reacts to the SWFUpload events.
        swfupload_loaded_handler: swfUploadLoaded,
        file_queue_error_handler: fileQueueError,
        file_dialog_start_handler: fileDialogStart,
        file_dialog_complete_handler: fileDialogComplete,
        upload_progress_handler: uploadProgress,
        upload_error_handler: uploadError,
        upload_success_handler: uploadSuccess,
        upload_complete_handler: uploadComplete,
        // Button Settings
        button_image_url: "<?= STATIC_SOURCE_URL ?>/common/js/swf/btn61x22.png",
        button_placeholder_id: "spanButtonPlaceholder1",
        button_width: 61,
        button_height: 22,
        button_cursor: SWFUpload.CURSOR.HAND,
        // Flash Settings
        flash_url: "/swfupload.swf",
        // Debug Settings
        debug: false
    });
    
    function sub_real_form()
    {
        var xieyi = $('#after').is(':checked');
        if (!xieyi)
        {
            alert("请选择real房承诺");
            return false;
        }
        
        //弹出处理遮罩层
        openWin('docation_loading');
        var form = $("#search_form");
        
        $.ajax({
            type: "post",
            url: "<?php echo GB_WO_URL;?>/sell/house_real_set",
            data: $('#real_form').serialize(),
            dataType: "json",
            success: function(data)
            {   
                close_doaction_loading();

				if(data.errorCode == '401')
				{
					jump_win('<?php echo GB_WO_URL;?>/sell/jump/login' , '请重新登录');
					return false;
				}
                if (data.is_ok == '1')
                {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
                }
                else
                {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
                }
            }
        });
    }
</script>
