<div id="centre" class="layout">
    <div class="centreInner ">
        <div class="mainInner radius5 "> 
            <!--头部 tab 开始-->
            <div class="titleTabBox">
                <div class="titleTab">
                    <div class="titleTabB clearfix">
                        <dl class="list">
                        <?php
                        if (isset($house_detail['infotype']) && $house_detail['infotype'] != '') {
                            $infotype = $house_detail['infotype'];
                        } else {
                            $infotype = 1;
                        }
                        foreach ($house['infotype'] as $k => $v) {
                            $select_infotype = '';
                            if ($k == $infotype) {
                                $select_infotype = 'itemOn';
                            }
                            //判断可发布的房源类型
                            if (!in_array($k, $allow_publish_infotype)) {
                                continue;
                            }
                            ?>
                            <dd id="<?=$k?>" class="item <?=$select_infotype?>"> 
                                <a class="link" href="####" id="<?=$k?>"> <?=$v?></a>
                            </dd>
                            <?php } ?>
                        </dl>
                    </div>
                </div>
            </div>
            <!--头部 tab 结束--> 
            <!--房源模板 开始-->
            <?php
            if ($method == 'add') 
            {
                if (isset($template_num) && $template_num > 0) 
                {
             ?>
            <div class="branchCommon radius5 " style="zoom:1;" id="js_fymb"  >
                <div class="hd ">
                    <h3 class="h3">房源模板</h3>
                    <p class="text">还可保存<strong class="strong"><?= $remain_num ?></strong>套模板</p>
                    <p class="more"><a class="link"  target="_blank" href="<?= $url_template_manage ?>">编辑&gt;&gt;</a></p>
                </div>
                <div class="mod">
                    <div class="modInner" >
                        <div  class="jsTemplateBox templateBox clearfix">
                            <?php
                                if (is_array($template_list) && !empty($template_list)) 
                                {
                                    foreach ($template_list as $value) 
                                    {
                             ?>
                                    <p class="item radius4" id="muban" ids="<?= $value['id'] ?>">
                                        <?= $value['template_name'] ?>
                                    </p>
                                <?php }
                            } ?>
                        </div>
                    </div>
                </div>
            </div>
            <?php } else { ?>
            <div class="branchCommon radius5 ">
                <div class="hd ">
                    <h3 class="h3">房源模板</h3>
                    <p class="more"><a class="link" href="<?= $url_template_manage ?>" target="_blank">编辑&gt;&gt;</a></p>
                </div>
                <div class="mod">
                    <div class="modInner">
                        <div class="modInnerNone"><span class="text">您还没有保存出售房源模板</span><a class="link" href="<?= $url_template_manage ?>" target="_blank">快去添加吧&gt;&gt;</a></div>
                    </div>
                </div>
            </div>
            <?php } } ?>
            <?php if($house['broker_new_info'][0]['starlevel']>=5){?>
			<div class="add_new_sata_title">
			恭喜您，目前您已是最高星级5星！
			</div>
			<?php } else {?>
            <div class="add_new_sata_title">
             剩余<?php if($house['broker_new_info'][0]['distance_month']) {?><?php echo $house['broker_new_info'][0]['distance_month'];?>月<?php }?><?php if($house['broker_new_info'][0]['distance_days']) {?><?php echo $house['broker_new_info'][0]['distance_days'];?>天<?php }?>无违规记录，将升为<?php if($house['broker_new_info'][0]['starlevel']==5) {?><?php echo $house['broker_new_info'][0]['starlevel'];?><?php } else {?><?php echo $house['broker_new_info'][0]['starlevel']+1;?><?php }?>星!
            </div>
			 <?php }  ?>
            <form action="<?= $url_house_submit ?>" id="jsForm_sell" method="post">
                <input type="hidden" name="infotype" value="<?=$infotype?>">
                <!--基本信息 开始-->
                <div class="branchCommon radius5 " id="js_jbxx">
                    <div class="hd ">
                        <h3 class="h3">基本信息</h3>
                        <p class="text"><span class="color">必填</span></p>
                    </div>
                    <div class="mod">
                        <div class="modInner">
                            <div class="forms">
                                <dl class="list clearfix">
                                    <dd class="list_item clearfix">
                                        <label class="label">小区：</label>
                                        <div class="fields nameInput jsNameInput">
                                            <div class="fgInput jsFgInput">
                                                <?php
                                                if (!isset($house_detail['block']['blockname'])) {
                                                    $house_detail['block']['blockname'] = '';
                                                } 
                                                if (!isset($house_detail['block']['blockid'])) {
                                                    $house_detail['block']['blockid'] = '';
                                                } 
                                                ?>
                                                <label class="labelPrev jslabelPrev" for="blockshowname" id="jsLabelBlockshowname">输入小区名称 从下拉列表中选择</label>
                                                <input type="text" class="input_text ui-autocomplete-input w205 
                                                    <?php if($method=='modify'){ echo 'readonly_input_text';} ?>" 
                                                       <?php if($method!='modify'){echo 'id="blockshowname"';} ?> name="blockshowname" 
                                                       value="<?php echo $house_detail['block']['blockname']; ?>" 
                                                       <?php if($method=='modify'){ echo 'readonly';} ?>/>
                                                <input type="hidden" name="block_id" id="block_id" value="<?=$house_detail['block']['blockid']?>">
                                            </div>
                                            <div class="fgInput blockPBox" style="display:none;">
                                                <div class="left blockPirceSj">
                                                    <div class="i i7 ">&nbsp;</div>
                                                    <div class="i i5">&nbsp;</div>
                                                    <div class="i i3">&nbsp;</div>
                                                    <div class="i i1">&nbsp;</div>
                                                </div>
                                                <div class="left blockPirce" id="blockPrice">
                                                </div>
                                            </div>
                                            <div class="fgInput textFgErroy"></div>
                                        </div>
                                    </dd>
                                    <!---->
                                    <?php
                                    if (!isset($house_detail['block']['district'])) {
                                        $house_detail['block']['district'] = '';
                                    } 
                                    if (!isset($house_detail['block']['streetid']))  {
                                        $house_detail['block']['streetid'] = '';
                                    } 
                                    if (!isset($house_detail['block']['streetname']))  {
                                        $house_detail['block']['streetname'] = '';
                                    } 
                                    if (!isset($house_detail['block']['address'])) {
                                        $house_detail['block']['address'] = '';
                                    } 
                                    ?>
                                    <dd class="list_item clearfix">
                                        <label class="label">地址：</label>
                                        <div class="fields">
                                            <div class="fgInput">
                                                <input type="text" class="input_text w70 readonly_input_text" name="district" id="district" value="<?=$house_detail['block']['district']?>" readonly="">
                                            </div>
                                            <span class="fg">一</span>
                                            <div class="fgInput">
                                                <input type="text" class="input_text w70 readonly_input_text" name="street" id="street" value="<?=$house_detail['block']['streetname']?>" readonly="">
                                                <input type="hidden" name="streetid" id="streetid" value="<?=$house_detail['block']['streetid']?>">
                                            </div>
                                            <span class="fg">一</span>
                                            <div class="fgInput">
                                                <input type="text" class="input_text w170 readonly_input_text" name="blockaddress" id="blockaddress" value="<?=$house_detail['block']['address']?>" readonly="">
                                            </div>
                                        </div>
                                    </dd>
                                    <?php if (isset($method) && $method == 'modify') {?>
                                    <script>
                                        $(function() {
                                           <?php if ($house_detail['block']['blockid'] != 0){?>
                                           showblockinfo("<?=$house_detail['block']['averprice']?>", 
                                            "<?=$house_detail['block']['address']?>", "<?=$house_detail['block']['esta_block']?>",
                                            "<?=$house_detail['block']['url_block']?>"); 
                                           <? } ?>
                                        });
                                    </script>
                                    <?php  } ?>
                                    <?php
                                    if (!isset($house_detail['housekind'])) {
                                        $house_detail['housekind'] = '';
                                    }
                                    if ($infotype == 6) {
                                        $housekind_display = 'block';
                                    } else {
                                        $housekind_display = 'none';
                                    }
                                    ?>
                                    <dd class="list_item clearfix" id="housekindShow" style="display:<?=$housekind_display?>;">
                                        <label class="label">车位属性：</label>
                                        <div class="fields">
                                            <div class="fgInput jsFgInput">
                                                <div class="imitateSelect">
                                                    <label class="labelImitate">选择类型</label>
                                                    <input type="text" class="imitate imitateIe" readonly="" name="housekindname" value="<?=$house_detail['housekind']?>">
                                                    <div class="listImitate">
                                                        <dl class="inner">
                                                            <?= get_attr_select($house['housekindname'])?>
                                                        </dl>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="fgInput textFgErroy"><!--jsFgInput--></div>
                                        </div>
                                    </dd>
                                    <?php
                                    if (!isset($house_detail['price'])) {
                                        $house_detail['price'] = '';
                                    } 
                                    if (!isset($house_detail['price'])) {
                                        $house_detail['price'] = '';
                                    } 
                                    if (!isset($house_detail['priceterm'])) {
                                        $house_detail['priceterm'] = '';
                                        $house_detail['priceterm_name'] = '';
                                    } else {
                                        $house_detail['priceterm_name'] = $house['priceterm'][$house_detail['priceterm']];
                                    }
                                    ?>
                                    <dd class="list_item clearfix">
                                        <label class="label">售价：</label>
                                        <div class="fields">
                                            <div class="fgInput jsFgInput">
                                                <input type="text" id="price" name="price" value="<?=$house_detail['price']?>" class="input_text w90">
                                            </div>
                                            <p class="textFg">万元</p>
                                            <div class="fgInput jsFgInput">
                                                <div class="imitateSelect">
                                                    <label class="labelImitate">选择价格条件</label>
                                                    <input type="text" name="priceterm_name" readonly="" class="imitate imitateIe" value="<?=$house_detail['priceterm_name']?>">
                                                    <input name="priceterm" class="jsImitateHidden" type="hidden" value="<?=$house_detail['priceterm']?>">
                                                    <div class="listImitate">
                                                        <dl class="inner">
                                                            <?= get_attr_select($house['priceterm'])?>
                                                        </dl>
                                                    </div>
                                                </div>
                                            </div>
                                            <p class="textFg textFg2">&nbsp;</p>
                                            <?php
                                            if (!isset($house_detail['pricetype'])) {
                                                $house_detail['pricetype'] = '';
                                                $house_detail['pricetypename'] = '';
                                            } else {
                                                $house_detail['pricetypename'] = $house['pricetype'][$house_detail['pricetype']];
                                            }
                                            ?>
                                            <div class="fgInput jsFgInput">
                                                <div class="imitateSelect">
                                                    <label class="labelImitate">有无增值税</label>
                                                    <input type="text" class="imitate imitateIe" readonly="" name="pricetypename" value="<?=$house_detail['pricetypename']?>">
                                                    <input name="pricetype" class="jsImitateHidden" type="hidden" value="<?=$house_detail['pricetype']?>">
                                                    <div class="listImitate">
                                                        <dl class="inner">
                                                            <?= get_attr_select($house['pricetype'])?>
                                                        </dl>
                                                    </div>
                                                </div>
                                            </div>


											<!-- 添加个税属性2015-5-27 zhou  start -->
											<p class="textFg textFg2">&nbsp;</p>
											<?php
                                            if (!isset($house_detail['taxonlytype'])) {
                                                $house_detail['taxonlytype'] = '';
                                                $house_detail['taxonlytypename'] = '';
                                            } else {
                                                $house_detail['taxonlytypename'] = $house['taxonlytype'][$house_detail['taxonlytype']];
                                            }
                                            ?>
                                            <div class="fgInput jsFgInput">
                                                <div class="imitateSelect">
                                                    <label class="labelImitate">有无个税</label>
                                                    <input type="text" class="imitate imitateIe" readonly="" name="taxonlytypename" value="<?=$house_detail['taxonlytypename']?>">
                                                    <input name="taxonlytype" class="jsImitateHidden" type="hidden" value="<?=$house_detail['taxonlytype']?>">
                                                    <div class="listImitate">
                                                        <dl class="inner">
                                                            <?= get_attr_select($house['taxonlytype'])?>
                                                        </dl>
                                                    </div>
                                                </div>
                                            </div>


											<!-- 添加个税属性2015-5-27 zhou  end -->

                                            <div class="fgInput textFgErroy" id="lastname"></div>
                                        </div>
                                    </dd>
                                    <!---->
                                    <?php
                                    if (!isset($house_detail['buildarea'])) {
                                        $house_detail['buildarea'] = '';
                                    } 
                                    ?>
                                    <dd class="list_item clearfix">
                                        <label class="label">产证面积：</label>
                                        <div class="fields">
                                            <div class="fgInput jsFgInput">
                                                <input type="text" class=" input_text w90" name="buildarea" id="buildarea" value="<?=$house_detail['buildarea']?>">
                                            </div>
                                            <p class="textFg">㎡</p>
                                            <div class="textFg textFgErroy" style="width:230px;"></div>
                                        </div>
                                    </dd>
                                    <?php
                                    if ($infotype == 1 || $infotype == 2) {
                                        if (!isset($house_detail['room'])) {
                                            $house_detail['room'] = '';
                                        } 
                                        if (!isset($house_detail['hall'])) {
                                            $house_detail['hall'] = '';
                                        } 
                                        if (!isset($house_detail['toilet'])) {
                                            $house_detail['toilet'] = '';
                                        } 
                                        $roomshowcss = 'display:block;';
                                    } else {
                                        $roomshowcss = 'display:none;';
                                    }
                                    ?>
                                    <dd class="list_item clearfix" id="roomshow" style="<?=$roomshowcss?>">
                                        <label class="label">户型：</label>
                                        <div class="fields">
                                            <div class="fgInput jsFgInput">
                                                <input type="text" class="input_text w40" name="room" value="<?=$house_detail['room']?>">
                                            </div>
                                            <p class="textFg">室</p>
                                            <div class="fgInput jsFgInput">
                                                <input type="text" class="input_text w40" name="hall" value="<?=$house_detail['hall']?>">
                                            </div>
                                            <p class="textFg">厅</p>
                                            <div class="fgInput jsFgInput">
                                                <input type="text" class="input_text w40" name="toilet" value="<?=$house_detail['toilet']?>">
                                            </div>
                                            <p class="textFg">卫</p>
                                            <div class="textFg textFgErroy"></div>
                                        </div>
                                    </dd>
                                    <!---->
                                    <?php
                                    if ($infotype == 6) {
                                        $floorshow = "display:none;";
                                    } else {
                                        if (!isset($house_detail['subfloor'])) {
                                            $house_detail['subfloor'] = '';
                                        } 
                                        if (!isset($house_detail['floor'])) {
                                            $house_detail['floor'] = '';
                                        } 
                                        if (!isset($house_detail['totalfloor'])) {
                                            $house_detail['totalfloor'] = '';
                                        } 
                                        $floorshow = "display:block;";
                                    }
                                    ?>
                                    <dd class="list_item clearfix" id="floorshow" style="<?=$floorshow?>">
                                        <label class="label">楼层：</label>
                                        <div class="fields">
                                            <div class="fgInput">
                                                <label class="textFg3">
                                                    <input id="jsInputRadio1" name="lctype" type="radio" <?php if(!$house_detail['subfloor']){echo 'checked';}?> class="jsInputRadio input_r" value="1">
                                                    单层</label>
                                            </div> 
                                            <div id="jsInputBox1" class="jsInputBox fgInput jsFgInput">
                                                <p class="textFg">第</p>
                                                <div class="fgInput">
                                                    <input id="floor" type="text" class="input_text w40" name="floor" value="<?=$house_detail['floor']?>">
                                                </div>
                                                <p class="textFg">层</p>
                                                <p class="textFg">共</p>
                                                <div class="fgInput">
                                                    <input id="totalfloor" type="text" class="input_text w40" name="totalfloor" value="<?=$house_detail['totalfloor']?>">
                                                </div>
                                                <p class="textFg">层</p>
                                            </div>
                                            <div class="fgInput">
                                                <label class="textFg3 textFg4">
                                                    <input id="jsInputRadio2" type="radio" <?php if($house_detail['subfloor']!=0){echo 'checked';}?> class="jsInputRadio input_r" name="lctype" value="2">
                                                    跃层</label>
                                            </div>

                                            <div id="jsInputBox2" class="jsInputBox fgInput hide jsFgInput" style="display: none;">
                                                <p class="textFg">第</p>
                                                <div class="fgInput">
                                                    <input id="subfloor" type="text" class="input_text w40" name="subfloor" value="<?=$house_detail['subfloor']?>">
                                                </div>
                                                <span class="fg">一</span>
                                                <div class="fgInput">
                                                    <input id="floor2" type="text" class="input_text w40" name="floor2" value="<?=$house_detail['floor']?>">
                                                </div>
                                                <p class="textFg">层</p>
                                                <p class="textFg">共</p>
                                                <div class="fgInput">
                                                    <input id="totalfloor2" type="text" class="input_text w40" name="totalfloor2" value="<?=$house_detail['totalfloor']?>">
                                                </div>
                                                <p class="textFg">层</p>
                                            </div>

                                            <div class="textFg textFgErroy"></div>
                                        </div>
                                    </dd>
                                    <!---->
                                    <?php
                                    if (!isset($house_detail['fitment'])) {
                                        $house_detail['fitment'] = '';
                                    } 
                                    if (!isset($house_detail['forward'])) {
                                        $house_detail['forward'] = '';
                                    } 
                                    if ($infotype == 6) {
                                        $fitmentshowcss = "display:none;";
                                    } else {
                                        $fitmentshowcss = "display:block;";
                                    }
                                    ?>
                                    <dd class="list_item clearfix" id="fitmentshow" style="<?=$fitmentshowcss?>">
                                        <label class="label">装修朝向：</label>
                                        <div class="fields">
                                            <div class="fgInput jsFgInput">
                                                <div class="imitateSelect ">
                                                    <label class="labelImitate">选择装修情况</label>
                                                    <input type="text" class="imitate imitateIe" readonly="" name="fitment" value="<?=$house_detail['fitment']?>">
                                                    <div class="listImitate">
                                                        <dl class="inner">
                                                            <?= get_attr_select($house['fitment'])?>
                                                        </dl>
                                                    </div>
                                                </div>
                                            </div>
                                            <p class="textFg textFg2">&nbsp;</p>
                                            <div class="fgInput jsFgInput">
                                                <div class="imitateSelect">
                                                    <label class="labelImitate">选择房屋朝向</label>
                                                    <input type="text" class="imitate imitateIe" readonly="" name="forward" value="<?php echo $house_detail['forward']=='南北'?'南北通透':$house_detail['forward'];?>">
                                                    <div class="listImitate" style="display: none;">
                                                        <dl class="inner">
                                                            <?= get_attr_select($house['forward'])?>
                                                        </dl>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="textFg textFgErroy"></div>
                                        </div>
                                    </dd>
                                    <?php
                                    if (!isset($house_detail['mright'])) {
                                        $house_detail['mright'] = '';
                                    } 
                                    ?>
                                    <dd class="list_item clearfix" id="mrightshow"  >
                                        <div style="height:29px;">
                                            <label class="label">权属：</label>
                                            <div class="fields">
                                                <div class="fgInput jsFgInput">
                                                    <div class="imitateSelect">
                                                        <label class="labelImitate">选择权属</label>
                                                        <input type="text" class="imitate imitateIe" readonly="" name="mright" value="<?=$house_detail['mright']?>">
                                                        <div class="listImitate">
                                                            <dl class="inner">
                                                                <?= get_attr_select($house['mright'])?>
                                                            </dl>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="fgInput textFgErroy"><!--jsFgInput--></div>
                                            </div>
                                        </div> 
                                    </dd>
                                  
                                    <?php if ($infotype <> 6) { ?>
                                    <dd class="list_item clearfix" id="buildyearShow">
                                        <label class="label">建筑年代：</label>
                                        <div class="fields nameInput ">
                                            <div class="fgInput jsNameInput jsFgInput">
                                                <label for="jsNameInputN" class="labelPrev labelPrevN jslabelPrev">格式：2010</label>
                                                <?php
                                                if (!isset($house_detail['buildyear'])) {
                                                    $house_detail['buildyear'] = '';
                                                }
                                                ?>
                                                <input  type="text" class="input_text w90" id="jsNameInputN" name="buildyear" value="<?= $house_detail['buildyear'] ?>" />
                                            </div>
                                            <p class="textFg">年</p>
                                            <div class="fgInput textFgErroy"></div>
                                        </div>
                                        
                                    </dd>
                                    <?php } ?>
                                    
                                </dl>
                               
                            </div>
                        </div>
                    </div>
                    
                </div>
            
                <div id="infotypeblock" style="padding:15px 0;">       <!--补充信息 开始-->
                
                    <?php include_once "sell_add_ext.php"; ?>
                </div>
               
                <div class="branchCommon radius5 " id="js_xxxx" style="margin:0;">
                    <div class="hd ">
                        <h3 class="h3">详细信息</h3>
                    </div>
                    <div class="mod">
                        <div class="modInner">
                            <div class="forms">
                                <dl class="list">
                                    <?php
                                        if (!isset($house_detail['address'])) 
                                        {
                                            $house_detail['address'] = '';
                                            
                                        } 
                                     ?>
                                    <dd class="list_item clearfix clear">
                                        <label class="label"><span class="fields_state">*</span>房源标题：</label>
                                        <div class="fields nameInput ">
                                            <div class="fgInput jsNameInput jsFgInput">
                                                <label for="address" class="labelPrev labelPrevN jslabelPrev">请简单明了的描述出房源特色</label>
                                                <input type="text" class="input_text w310" id="address" regexp="^[\u4e00-\u9fa5\da-zA-Z\s|，|.|%|【|】]*$" msg=" 房源标题必须填写！不要超过60字符且只能输入汉字、字母、数字、空格、小数点、中文逗号、%、【、】。" name="address" value="<?=$house_detail['address']?>">
                                            </div>
                                            <p class="textFg textFg6">剩余<span id="jsColorN" class="colorN"><?php  echo 60-strlen($house_detail['address']);?></span>个字符（1个汉字相当于2个字符，全景房源标题要超过十个字哦！）</p>
                                            <div class="fgInput textFgErroy" style="width:600px"><!--jsFgInput--></div>
                                        </div>
                                    </dd>
                                     <?php
                                        if (!isset($house_detail['remark'])) 
                                        {
                                            $house_detail['remark'] = '';
                                        } 
                                     ?>
                                 
                                    <dd class="list_item clearfix clear">
                                        <label class="label">房源描述：</label>
                                        <div class="fields ">
                                            <p class="textFg textFg6">全景房源描述要超过三十个字哦！</p>

                                            <p class="modelBox"> <a href="<?=$documentation['house_title_rule']?>" class="link" target="_blank">标题描述规则说明&gt;&gt;</a> </p>
                                        </div>
                                    </dd>
                                    <dd class="list_item list_item02 clearfix clear">
                                        <textarea name="remark" id="remark" cols="0" rows="0" style="margin-top:5px; width:835px; height:155px; display:none;"><?=$house_detail['remark']?></textarea>
                                        <div class="editorBox" style="height: 400px;"> <iframe id="remark_iframe" frameborder="0" scrolling="no" src="/editor/house/" style="margin-top:5px; width:830px; height:400px;"></iframe></div>
                                    </dd> 
                                    <dd>
                                    <?php 
                                    if ($infotype == 1 || $infotype == 2 || $infotype == 2 || $infotype == 2) {
                                        $feature_css = 'display:block;';
                                    } else {
                                        $feature_css = 'display:none;';
                                    }
                                    ?>
                                    <div class="list_item clearfix  clear" style="<?=$feature_css?>" id="feature_id">
                                        <label class="label">房源特色：</label>
                                        <div class="fields fields02">
                                        <?php
                                        $n = 0;
                                        echo '<div id="jsAddTagBox" class="addTagBox">';
                                        if ($feature) {
                                            foreach ($feature as $key => $value) {
                                                $featureselect[] = $value;
                                                ?>
                                                    <p num="<?= $key ?>" class="addTagInner radius4"><?= $value ?>
                                                        <span title="删除" class="delBtn" style="display: none;"></span>
                                                        <input type="hidden" value="<?= $key ?>" name="feature[]"></p>
                                                    <?php
                                                    $n++;
                                                }
                                            }
                                            echo '</div>';
                                            echo '<div id="jsAddTagBoxN" class="addTagBox">';
                                            for ($i = 0; $i < 3 - $n; $i++) {
                                                ?>
                                                <p class="addTag radius4" >+</p>
                                                <?php
                                            }
                                            echo '</div>';
                                            ?>

                                        </div>
                                    </div>

                                    <div class="list_item clearfix clear">
                                        <div id="jsAddTagInnerBox" class="addTagInnerBox clearfix">
                                            <?php
                                            if ($feature_arr) {
                                                foreach ($feature_arr as $key => $value) {
                                                    $mark = 0;
                                                    if (isset($featureselect)) {
                                                        if (in_array($value, $featureselect)) {
                                                            $mark = 1;
                                                        } else {
                                                            $mark = 0;
                                                        }
                                                    }
                                                    ?>
                                                    <p num="<?= $key ?>" class="addTagInner radius4 <?php if ($mark == 1) echo 'addTagInnerSelect'; ?>"><?= $value ?></p>
                                                <?php }
                                            } ?>
                                        </div>
                                    </div>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                    </div>
                </div>
                <!--详细信息 结束--> 
                <div class="branchCommon radius5 " id="js_tpsc"  >
                    <div class="hd ">
                        <h3 class="h3">图片上传</h3>
                    </div>
                    <div class="mod">
                        <div class="modInner" >
                            <div class="forms">
                                <dl class="list">
                                    <dd class="list_item clearfix">
										<div class="mattersBox radius3" >
											<div class="leftImg radius3">
												<p style="height:10px; overflow:hidden;">&nbsp;</p>
												<p class="title">全景房源</p>
												<p class="text">点击量比非全景点击量</p>
												<p class="text">高出<span class="num">80%</span></p>
												<p class="text">
													<a class="link" href="http://zsb.house365.com/help/nj/?p=1286" target="_blank">如何发布全景房源&gt;&gt;</a>
												</p>
												<p style="height:10px; overflow:hidden;">&nbsp;</p>
												<p class="yz-bort">&nbsp;</p>
												<p class="title">多图房源</p>
												<p class="text">点击量比非多图点击量</p>
												<p class="text">高出<span class="num">50%</span></p>
												<p class="text">
													<a class="link" href="http://zsb.house365.com/help/nj/?p=40" target="_blank">如何发布多图房源&gt;&gt;</a>
												</p>
												<p style="height:10px; overflow:hidden;">&nbsp;</p>
											</div>
											<div class="rightTextBox" style="width:600px; line-height:22px;">
												<h4 class="h4">注意事项：</h4>
												<p class="text">
													1、&nbsp;发布全景房源（3张全景+1张外景+1张户型）。图片需为全景室内图，每张图不大于5M，支持JPG格式。
												</p>
												<p class="text">
													2、&nbsp;照片审核通过标准： （如不符合标准将要删除图片）
												</p>
												<p class="text pl20">
													(1)、上传图片需为实拍图，每张图片介于350KB至5M之间，支持JPG、PNG格式（全景图仅支持JPG格式）。
												</p>
												<p class="text pl20">
													(2)、请勿在此处上传中介公司LOGO、经纪人照片等非房源图片，上传的图片类型与房源描述情况需一致。
												</p>
												<p class="text pl20">
													(3)、请勿上传经过明显PS、边框、拼接及含有其他网站水印、链接的图片，中介LOGO必须透明不遮挡图片。
												</p>
												<p class="text pl20">
													(4)、全景图拍摄请使用三脚架、将拍摄设备置于房间正中间、离地面1.5米处。全景上传通道，请勿上传外景
												</p>
												<p class="pl50">
													图与户型图。
												</p>
												<p class="text">
													3、&nbsp;您上传的户型图、外景图将可能被365收入图库。<a class="link" target="_blank" href="http://zsb.house365.com/help/nj/?p=473">图片规则详情&gt;&gt;</a>
												</p>
											</div>
										</div>
									</dd>

									<?php if($broker_starlevel>2){?>
										<?php require_once '360pic_inc.php'; ?>
									<?php }?>

                                    <?php require_once 'pic_inc.php'; ?>
                                </dl>
                            </div>
                        </div>
                    </div>
                </div>
                <!--图片上传 结束-->
                <div class="btnFBbox" style="height:35px;">
                    <?php
                    if (!isset($house_detail['id'])) {
                        $house_detail['id'] = '';
                    } 
                    if (!isset($house_detail['esta'])) {
                        $house_detail['esta'] = '';
                    } 
                    if (!isset($tab)) {
                        $tab = '';
                    } 
                    ?>
                    <input type="hidden" name="id" id="id" value="<?=$house_detail['id']?>">
                    <input type="hidden" name="tab" id="tab" value="<?=$tab?>">
                    <input type="hidden" name="tbl" id="tbl" value="sell">
                   <?php if($house_detail['esta']!=5){ ?>
                   <div  style="float:left;position:relative; width:117px; height:32px;margin:0 20px 0 285px;_display: inline;">
				        <a style="margin:0;" href="####" id="jsBtnSubmit_sell" class="btnB btnSubmit radius5">
					    <?php if($method=='modify'){echo '确认修改';}else{echo '发布';}?></a>
                         <div id="new_login_btn_none" class="radius5">&nbsp;</div>
                    </div>
                    <a style="float:left;" href="####" class="btnB btnPreserve radius5" onclick="savetemplate()">保存为房源模板</a>

					 <a style="float:left;background-color:#4f82b7;text-decoration:none" href="####" class="btnB  radius5" id="jsBtnSubmit_disablesell">保存为失效房源</a>
                    <?php } ?>

                </div>
	             <input type="hidden" name="<?=$post_rand['post_key']?>"   value="<?=$post_rand['post_value']?>" >

            </form>
            <!----> 
        </div>
    </div>
</div>
<form method="post" name="t_add"  id="t_add" action="<?=$url_template_add ?>" target="_blank">
    <input type="hidden" name="t_remark" id="t_remark"  value=''>
    <input type="hidden" name="t_district"  id="t_district" value="" >
    <input type="hidden" name="t_street" id="t_street"  value="" >
    <input type="hidden" name="t_blockaddress"  id="t_blockaddress" value="" >
    <input type="hidden" name="t_block_id" id="t_block_id"  value="" >
    <input type="hidden" name="t_streetid" id="t_streetid"  value="" >
    <input type="hidden" name="t_blockname" id="t_blockname"  value="" >
    <input type="hidden" name="action" id="action"  value="add" >
    <input type="hidden" name="flag" id="flag"  value="1" >
</form>
<div id='historyHouse'>
    <?php
        $publish_block_tip = $publish_block == '' ? '暂无历史发布小区' : '历史发布小区';
    ?>
    <a href='####'><?=$publish_block_tip?></a>
<?php
if (isset($publish_block) && !empty($publish_block)) {
    if (count($publish_block) > 10) { //大于10个历史小区，显示滚动条 ?>
        <style>
            #historyHouse{height:150px !important; overflow-x: hidden; overflow-y: scroll;}
        </style>  
<?php } foreach ($publish_block as $value) { ?>
    <a href='####'  onclick="addlishi(<?= $value['blockid'] ?>);"><?= $value['blockshowname'] ?></a>
<?php }} ?>

</div>

<!--添加新小区 弹出层-->
<div id="newblockadd" class="dialog dialog2 radius5" style="position: absolute; z-index: 9999902; left: 50%; margin-left: -202.5px; top: 310px; display: none;">
    <div class="hd">
        <h3 class="h3">添加新小区</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <form method="post" action="" id="block_add" name="block_add">
            <div class="forms">
                <dl class="list">
                    <dd class="list_item clearfix">
                        <label class="label">小区名称：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                                <label for="jsNameInputOp" class="labelPrev labelPrevN jslabelPrev"><!--请输入小区名称2-8个汉字--></label>
                                <input  type="text" class="jsNameInputOp input_text w170" id="jsNameInputOp" name="tcblockname" />
                                <!--<label  class="error">小区名称在2-8个汉字之间</label>-->
                            </div>
                        </div>
                    </dd>
                    <dd class="list_item clearfix ">
                        <label class="label">小区区属：</label>
                        <div class="fields nameInput imitateSelect2">
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">请选择区属</label>
                                    <input type="text" class=" imitate imitateIe" readonly name="tcdistrict" value="" id="tcdistrict" />
                                    <!--<label  class="error">请选择区属</label>-->
                                    <div class="listImitate">
                                        <dl class="inner innerScroll">
                                        <?php foreach ($house['district'] as $value) { ?>
                                                <dd><a class="link" onclick="getstreet(this);" href="####" ><?= $value ?></a></dd>
                                        <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFgLabel">版块：</p>
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect ">
                                    <label class="labelImitate" id="qs">请选择版块</label>
                                    <input type="text" class=" imitate imitateIe" readonly  name="tcstreetname" value="" id="bankuai"/>
                                    <input type="hidden" class="jsImitateHidden"  id="tcstreetid" name="tcstreetid" value=""/>
                                    <!--<label  class="error">请选择版块</label>-->
                                    <div class="listImitate">
                                        <dl class="inner  innerScroll" id="street_add">
                                        </dl>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </dd>
                    <dd class="list_item clearfix">
                        <label class="label">小区地址：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                                <label for="jsNameInputDz" class="labelPrev labelPrevN jslabelPrev">请输入小区地址2-30个字</label>
                                <input  type="text" class="jsNameInputDz input_text w276" id="jsNameInputDz" name="tcaddress" />
                                <label  class="error" id="xqerror" style="display:none"></label>
                            </div>
                        </div>
                    </dd>

                    <dd class="list_item clearfix"> <a id="jsBtnSubmitP" onclick="tempblock_add()" href="####" class="btnPopo btnCon radius5">提交</a> </dd>
                </dl>
            </div>
        </form>
    </div>
</div>

<!--弹出层添加未知小区-->
<div id="JS_noteHouse1" class="dialog radius5">
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div class="text"> 添加成功</div>
    </div>
</div>

<!--发布的房源单价高于小区均价30%及以上时，提交后，会出现提醒窗口-->
<div id="JS_noteHouse2" class="dialog radius5">
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div class="text"> 您当前发布总价过高，请核实后发布。</div>
    </div>
</div>
<!--发布的房源单价低于小区均价65%及以上时，提交后，会出现提醒窗口-->
<div id="JS_noteHouse3" class="dialog radius5">
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div class="text"> 您当前发布总价过低，请核实后发布。</div>
    </div>
</div>
<!--发布或者修改房源时，验证房源标题和房源描述有屏蔽词提示-->
<div id="JS_noteHouse4" class="dialog radius5">
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div class="text" id="banwords"></div>
    </div>
</div>
<!--返回顶部  -->
<div id="fixedLocation"> 
    <dl class="list radius5">
        <dd class="item"><a href="####" title='房源模板' onClick="returnFixe('js_fymb')" class="link">房源模板</a></dd>
        <dd class="item"><a href="####" title='基本信息' onClick="returnFixe('js_jbxx')" class="link">基本信息</a></dd>
        <dd class="item"><a href="####" title='补充信息' onClick="returnFixe('js_bcxx')" class="link">补充信息</a></dd>
        <dd class="item"><a href="####" title='详细信息' onClick="returnFixe('js_xxxx')" class="link">详细信息</a></dd>
        <dd class="item"><a href="####" title='图片上传' onClick="returnFixe('js_tpsc')" class="link">图片上传</a></dd>
    </dl>
    <div class="backToTop radius5"><a title='回到顶部' href="#" class="link">回到顶部</a></div>
</div>

<!--半透明遮罩-->
<div class="cover"></div>
<!--疑似虚假-->
<div class="pop popfalse">
	<div class="pre">
		<div class="poptit">
			<span class="h3">提示</span>
			<span title="关闭"  class="popright" onclick=hidePop('.pop')>Χ</span>
		</div>
		<div class="mod">
			<div class="text">您的房源价格疑似虚假，一旦被核实为虚假房源，房源将被冻结！</div>
		</div>
	</div>
	<div align="center" class="pb10">
		<button class="btn submitPublishButton">确定发布</button>&nbsp;<button class="btn bg-o" onclick=hidePop('.pop')>检查后发布</button>					
	</div>
</div>
<!--系统拦截-->
<div class="pop popintercept">
	<div class="pre">
		<div class="poptit">
			<span class="h3">提示</span>
			<span title="关闭"  class="popright" onclick=hidePop('.pop')>Χ</span>
		</div>
		<div class="mod">
			<div class="text">您的房源价格严重低/高于市场价，发布后会被自动拦截，若需继续发布，可在“系统拦截”列表发起申诉！</div>
		</div>
	</div>
	<div align="center" class="pb10">
		<button class="btn submitPublishButton">确定发布</button>&nbsp;<button class="btn bg-o" onclick=hidePop('.pop')>检查后发布</button>					
	</div>
</div>
<!--禁止发布-->
<div class="pop popban">
	<div class="pre">
		<div class="poptit">
			<span class="h3">禁止发布</span>
			<span title="关闭"  class="popright" onclick=hidePop('.pop')>Χ</span>
		</div>
		<div class="mod">
			<div class="text">您的房源价格过低或过高，请核实后发布！</div>
		</div>
	</div>
	<div align="center" class="pb10">
		<button class="btn bg-o" onclick=hidePop('.pop')>确定</button>			
	</div>
</div>



<?= $page_js ?>
<script type="text/javascript">
    var area_prices = <?=json_encode($area_prices)?>;
    function getBlockAreaPrices(block_id){
        var url = '/ajax/find_block_area_prices/'+block_id+'/';
        $.get(url,function(data){
            area_prices = data;
        },'json');
    }
    $(function() {
        var str = $("#address").val();
        var obj_value_arr = str.split("");
        var num = 0;
        for (var i = 0; i < obj_value_arr.length; i++) {
            num += returnStrLen(obj_value_arr[i]);
        }
        $("#jsColorN").text(60 - num);

        $("#address").keyup(function() {

            var str = $("#address").val();
            var obj_value_arr = str.split("");

            var num = 0;
            for (var i = 0; i < obj_value_arr.length; i++) {
                num += returnStrLen(obj_value_arr[i]);
            }
            if (num > 60) {
                var num = $("#address").val().substr(0, 30);
                $("#address").val(num);
                alert("您的房源标题字数太多了，精简下吧！房源标题最多30个汉字，超出部分系统将会自动删除！");
                $("#jsColorN").text(0);
            } else {
                $("#jsColorN").text(60 - num)
            }
        })


        $("#blockshowname").autocomplete({
            source: function(request, response) {
                //clearblockinfo();
                $.ajax({
                    url: "/ajax/find_like_block_list/",
                    type: "POST",
                    dataType: "json",
                    data: {
                        blockname: encodeURIComponent($("#blockshowname").val())
                    },
                    success: function(data) {
                        if(data.errorCode == '401')
                        {
                            jump_win('<?php echo GB_WO_URL;?>/sell/jump/login/' , '请重新登录');
                            return false;
                        }
                        //判断返回数据是否为空，不为空返回数据，为空返回增加小区链接。
                        if (data[0]['id'] != "0") {
                            response(data);
                            //hiddenblockadd();
                            //getBlockImg(1);
                        } else {
                            response(data);
                            //showblockadd();
                        }
                    }
                });
            },
            minLength: 1,
            removeinput: 0,
            select: function(event, ui) {
                if (ui.item.id > 0) {
                    var blockname = ui.item.label;
                    var district = ui.item.district;
                    var street = ui.item.streetname;
                    var streetid = ui.item.streetid;
                    var averprice = ui.item.averprice;
                    var address = ui.item.address;
                    var blockesta = ui.item.esta_block;
                    var url_block = ui.item.url_block;
                    var id = ui.item.id;

                    //获得小区板块
                    getblock(district, street, address, id, streetid);
                    //显示小区(价格、地址、状态)信息
                    showblockinfo(averprice, address, blockesta, url_block);
                    //显示小区纠错地址
                    //showblockurl(url_block,blockname);
                    //获取小区id
                    //showblockid(id,blockname);
                    removeinput = 0;
                    $("input[name=blockshowname]").val(blockname);
                    getBlockImg(1);
                    getBlockAreaPrices(id);
                } else {
                    removeinput = 1;
                    block_add();
                    //remove_blockinfo();
                }
            },
            close: function(event) {
                if (typeof (removeinput) == 'undefined' || removeinput == 1)
                    $("#blockshowname").val("");
            }
        });
    });

	//系统拦截区间
	var systemInterceptRange = <?php echo !empty($system_intercept_range) ? json_encode($system_intercept_range) : '{}'; ?>;

	//疑似虚假区间
	var suspectedShamRange = <?php echo !empty($suspected_sham_range) ? json_encode($suspected_sham_range) : '{}'; ?>;

	//禁止发布区间
	var banPublishRange = <?php echo !empty($ban_publish_range) ? json_encode($ban_publish_range) : '{}'; ?>;

	
	function showPop(show)
	{
		var bh = $(window).height(); 
		var bw =$(window).width();
		
		$(".cover").css({ 
			display:"block" 
		}); 
		
		$(show).css({ 
			top:(bh - $(show).height())/2, 
			left:(bw - $(show).width())/2,
			display:"block" 
		}); 
		
		$(show).fadeIn(500); 
	}
	
	function hidePop(show)
	{	
		$(".cover").hide();
		$(show).fadeOut(); 	
	}

	//房源价格发布规则过滤，强制提交
	$('.submitPublishButton').click(function(){
		$("#jsForm_sell").submit();
	});
</script>