<style>
.addPicRight .addBtnnew{float: left;border: 1px solid #bfbfbf;height: 26px;line-height: 26px;margin-top:6px; ;overflow: hidden;text-align: center;margin-right:20px;}
.bigPicLin{background:rgba(0, 0, 0, 0) url("http://esf.s.house365.com/zsb/images/v1.0/toBigImg_zhou_2.png") no-repeat scroll 0 0}
</style>
<script type="text/javascript" src="http://esf.s.house365.com/zsb/js/v1.0/house.js"></script>
<script type="text/javascript" src="http://esf.s.house365.com/zsb/js/v1.0/uploadpic_free_house.js"></script>
<script type="text/javascript" src="http://esf.s.house365.com/common/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="http://esf.s.house365.com/common/js/jquery_ui_autocomplete/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="http://esf.s.house365.com/common/js/jquery_ui_autocomplete/ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="http://esf.s.house365.com/common/js/jquery_ui_autocomplete/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="http://esf.s.house365.com/common/js/jquery_ui_autocomplete/ui/jquery.ui.autocomplete.js"></script>
<script type="text/javascript" src="http://esf.s.house365.com/common/js/jquery.ui.mouse.min.js"></script>
<script type="text/javascript" src="http://esf.s.house365.com/common/js/jquery.ui.sortable.min.js"></script>

<!--左边 导航 结束-->
<div id="centre" class="layout">
    <div class="centreInner ">
        <div class="mainInner radius5 "> 
        <?php include 'rent_manage_statics.php'; ?>
            <!---->
            <div class="titleTabBox">
                <div class="titleTab">
                    <div class="titleTabB clearfix">
                        <dl class="list">
                            <dd class="item "> <a class="link" href="<?php echo GB_WO_URL;?>/rent/manage/active/"> 激活房源</a> </dd>
                            <dd class="item "> <a class="link" href="<?php echo GB_WO_URL;?>/rent/manage/invalid/"> 失效房源 </a></dd>
                            <dd class="item itemOn"> <a class="link" href="<?php echo GB_WO_URL;?>/rent/manage/frozen/"> 违规房源(<?php echo $statistic_data['forzen_house_num']; ?>)</a> </dd>
                            <dd class="itemLast"><a href="<?php echo $documentation['house_manage_rule'];?>" target="_blank">使用说明&gt;&gt;</a></dd>
                        </dl>
                    </div>
                </div>
            </div>
            <!---->
            <form id="search_form" name="search_form" method="post" action="<?php echo GB_WO_URL;?>/rent/manage/frozen/">
            <div class="forms functionBox">
                <dl class="list">
                    <dd class="list_item clearfix">
                        <div class="fields">
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">房源类型</label>
                                    <input type="text" name="infotypename" class="imitate imitateIe" readonly value="<?php if(isset($post_param['infotypename'])){ echo $post_param['infotypename'];}else{ echo '房源类型';} ?>"/>
                                    <input type="hidden" name="infotype" class="jsImitateHidden" value="<?php if(isset($post_param['infotype'])){ echo $post_param['infotype']; } else { echo 0;}?>"/>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" oid="0">不限</a></dd>
                                            <?php foreach($house['infotype'] as $key=>$value){ ?>
                                                <dd><a class="link" oid="<?php echo $key; ?>" href="####"><?php echo $value;?></a></dd>
                                            <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">租金</label>
                                    <input type="text" name="price_rentname" class="imitate imitateIe" readonly value="<?php if(!isset($post_param['price_rentname'])){echo '价格';}else{echo $post_param['price_rentname'];} ?>"/>
                                    <input type="hidden" name="price_rent" class="jsImitateHidden" value="<?php if(isset($post_param['price_rent'])){ echo $post_param['price_rent']; } else { echo 0;}?>"/>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" oid="0">不限</a></dd>
                                           <?php foreach($house['price_rent'] as $key=>$value){ ?>
                                                <dd><a class="link" oid="<?php echo $key;?>" href="####"><?php echo $value;?></a></dd>
                                            <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">面积</label>
                                    <input type="text" name="buildareaname" class="imitate imitateIe" value="<?php if(!isset($post_param['buildareaname'])){echo '面积';}else{echo $post_param['buildareaname'];} ?>" readonly/>
                                    <input type="hidden" name="buildarea" class="jsImitateHidden" value="<?php if(isset($post_param['buildarea'])){ echo $post_param['buildarea']; } else { echo 0;}?>"/>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" oid="0">不限</a></dd>
                                           <?php foreach($house['buildarea'] as $key=>$value){ ?>
                                                <dd><a class="link" oid="<?php echo $key;?>" href="####"><?php echo $value;?></a></dd>
                                            <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">户型</label>
                                    <input type="text" name="roomtypename" class="imitate imitateIe" value="<?php if(!isset($post_param['roomtypename'])){echo '户型';}else{echo $post_param['roomtypename'];} ?>" readonly/>
                                    <input type="hidden" name="roomtype" class="jsImitateHidden" value="<?php if(isset($post_param['roomtype'])){ echo $post_param['roomtype']; } else { echo 0;} ?>"/>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" oid="0">不限</a></dd>
                                           <?php foreach($house['roomtype'] as $key=>$value){ ?>
                                                <dd><a class="link" oid="<?php echo $key; ?>" href="####"><?php echo $value; ?></a></dd>
                                            <?php } ?>
                                        </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 imitate2" readonly name="k_name" value="<?php if(isset($post_param['k_name'])){echo $post_param['k_name'];} ?>"/>
                                        <input type="hidden"  class="jsImitateHidden" name="k_id" value="<?php if(isset($post_param['k_id'])){ echo $post_param['k_id'];}else{ echo 1; } ?>"/>
                                    <div class="listImitate">
                                        <dl class="inner inner2">
                                            <dd><a class="link" href="####" onClick="addThisText('请输入小区名称')" oid="1">小区名称</a></dd>
                                            <dd><a class="link" href="####" onClick="addThisText('请输入房源编号')" oid="2">房源编号</a></dd>
                                            <dd><a class="link" href="####" onClick="addThisText('请输入房源内部编号')" oid="3">内部编号</a></dd>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="fgInput nameInput " >
                                <div class="fgInput jsNameInput jsFgInput">
                                    <label id="jsHouseNume" for="jsNameInputNF" class="labelPrev labelPrevN jslabelPrev">请输入小区名称</label>
                                    <input  type="text" class="input_text w170" id="jsNameInputNF" name="keywords" value="<?php if(isset($post_param['keywords'])){ echo $post_param['keywords'];}?>"/>
                                </div>
                            </div>
                            <!---->
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput" >
                                <input type="submit" style="cursor: pointer;" class="btn btnCon radius5" value="搜索"> 
                            </div>
                            <!----> 
                        </div>
                    </dd>
                </dl>
            </div>
            <!---->
            <div class="fgTitleBox radius4">
                <table class="table">
                    <tr>
                        <td class="w10">&nbsp;</td>
                        <td class="w260" style="width:300px;">房源基本信息</td>
                        <td class="w75">创建时间</td>
                        <td class="w75">更新时间</td>
                        <td class="w85">违规原因</td>
                        <td class="w85">违规处理</td>
                        <td class="w75">处理时间</td>
                        <td>操作</td>
                    </tr>
                </table>
            </div>
            <!---->
            <?php if( is_array($data_info) && !empty($data_info)){ ?>
            <?php foreach ($data_info as $key => $value ) { ?>
			<div class="yz-zcon" style="display: none;"></div>
            <div class="itemInfoBach radius4">
                <table class="table">
                    <tr>
                        <td class="td w10"></td>
                        <td class="td second" style="width:300px;">
                            <div class="itemTex">
								<a class="name" title = "<?php echo $value['address'];?>" href="<?php echo $value['info_url'];?>" target="_blank"><?php echo $value['address_str'];?></a>
							</div>
							<div class="itemTex">
                            <?php if($value['is_star_result'] === TRUE) {  ?>
                            <img alt="多图房源" title="多图房源" src="http://esf.s.house365.com/zsb/images/v1.0/new_duotu.gif" />
                           <?php } ?>
                            <div class="itemTex"><span class="name"><?php if(isset($value['block_url']) && $value['block_url'] !='') {?> <a class="name" href="<?php echo $value['block_url'];?>" target="_blank"><?php echo $value['blockshowname'];?></a><?}else{echo $value['blockshowname'];}?></span><span class="fg_z">/</span><span><?php echo $value['room'];?>室<?php echo $value['hall'];?>厅</span><span class="fg_z">/</span><span><?php echo $value['floor_str'];?>层</span><span class="fg_z">/</span><span><?php echo $value['buildarea'];?>㎡</span><span class="fg_z">/</span><span><?php echo $value['price'];?><?php echo $house['shoppriceunit'][$value['priceunit']];?></span>
                            </div>
                            <div class="itemTex itemTex2">
                                <span>房源编号：<?php echo $value['id'];?></span>
                                <?php if (!empty($value['ownid'])) { echo '内部编号：'.$value['ownid']; } ?>
                            </div>
                        </td>
                        <td class="td w75">
                            <p><?php echo date( 'm-d H:i' , $value['creattime']); ?></p>
                        </td>
                        <td class="td w75">
                            <p><?php if($value['updatetime'] > 0) { echo date( 'm-d H:i' , $value['updatetime']);}else{echo '未刷新';}?></p>
                        </td>
                        <td class="td w150">
                            <?php if($value['freeze_info']['reason'] != '') { echo $value['freeze_info']['reason'];}else{
                                echo '房源违规';
                            }?>
                        </td>
                        <td class="td w85">
                           <?php echo !isset($house['freeze_esta'][$value['freeze_info']['esta']]) ?  '冻结' :  $house['freeze_esta'][$value['freeze_info']['esta']]; ?>
                        </td>
                        <td class="td w75">
                            <p><?php echo $value['freeze_info']["freezetime"] == 0 ? '未处理' : date("Y-m-d H:i",$value['freeze_info']["freezetime"]);?></p>
                        </td>
                        <td class="td">
                            <div class="fun">
                                <div class="linkBox">
                                <a href="<?php echo $value['modify_url'];?>" target="_blank" class="link">查看</a>
								<?php if($value['freeze_info']['reason'] != '价格虚假'): ?>
									<span class="fg">|</span>
									<?php if($value['freeze_info']["esta"] != 2 ) { ?>
									<a href="###" class="link" onclick="appeal(<?php echo $value['id'];?> , '<?php echo date("Y-m-d H:i",$value['freeze_info']["freezetime"]);?>','<?php echo $value['freeze_info']['reason'];?>','<?php  echo md5("HOUSE365_SELL_APPEAL_".$value["id"]);?>',this);">申诉</a>
									<?php } else{ ?>
									 受理中
									<?php }?>
								<?php endif; ?>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <?php }?>
            <?php }else{ ?>		
            <div class="itemInfoBach radius4">
                <table class="table">
                    <tbody>
                        <tr>
                            <td class="td">没有符合条件的记录</td>
                        </tr>
                     </tbody>
                </table>
				</div>
            <?php }?>
			<div class="yz-zcon" style="display: none;"></div>
          </form>
			<!--申诉表单div开始-->
		 <div class="branchCommon radius5 " id="jsDialogNeighborhoodComplain">
			<div class="hd">
				<h3 class="h3">我要申诉</h3>
				<a href="javascript:void(0)" class="right close-sq j-close-sq">关闭</a>
			</div>
			 <form  class="frozen-form"name="house_appeal_form" action="" >
				<ul class="frozen-sq clearfix">
					<li><label class="label">冻结房源：</label><label class="label" id="houseid"></label></li>
					<li class="middle"><label class="label">冻结时间：</label><label class="label" id="time"></label></li>
					<li><label class="label">冻结原因：</label><label class="label" id="reason"></label></li>
				</ul>
				<div class="clr"></div>
				  <div class="reason-sq">
					   <div class="must-sq left">*</div></lable><label class="label left">申诉理由：</label>
						<textarea class="textarea left" id="jsReason" onkeyup="words_deal();"></textarea>
						<label class="error" style="display:none;color:red;margin-left:70px;">请填写申诉理由!</label>
								<div class="clearfix">
								  
									<p class="right">
										<lable>剩余<span class="colorR" id="jsReasonNum">50</span>字</lable></p>
								</div>
				 </div>
				 <div style="float:left;margin-top:10px;">上传图片:</div>
				 <?php require_once 'pic_inc_house_free_candison.php'; ?>

				   
			<div class="sq-subt-fields">
						 <a href="#" class="btn-sq btnCon radius5" onclick="appeal_add();">提交</a> 
						 <a href="javascript:void(0)" class="btn-sq btnCon radius5 j-reset-sq" > 取消</a>
				</div> 
									
			   <input type="hidden" name="secret_key" id="secret_key" value="">
										
											

				   

					
			 </form>
		 </div>
	  <!--申诉表单div结束-->
            <!--翻页-->
            <?php if (!empty($pagination)) { ?>
                <div class="picPreviewPagBox pagBoxBorderTop">
                    <div class="picPreviewPag">
                        <?php echo $pagination; ?>
                    </div>
                    <input type='hidden' name='page' value='<?php echo $page; ?>'>
                </div>
            <?php } ?>
        </div>
</div>
        
<!--操作结果弹出提示框-->
<div id="dialogts" 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="dialog_tip"></div>
    </div>
</div>

<!--申诉 弹出层-->
<!--<div id="jsDialogNeighborhoodComplain" class="dialog dialog2 radius5 dialogNeighborhoodExpert" >
    <div class="hd">
        <h3 class="h3">我要申诉</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <form name = 'house_appeal_form' action="" >
            <div class="forms">
                <dl class="list">
                    <dd class="list_item clearfix">
                        <label class="label">冻结房源：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                                <div class="textFg" id="houseid"></div>
                            </div>
                        </div>
                    </dd>
                  
                    <dd class="list_item clearfix">
                        <label class="label">冻结时间：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                                    <div class="textFg" id="time"></div>
                            </div>
                        </div>
                    </dd>
                   
                    <dd class="list_item clearfix">
                        <label class="label">冻结原因：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                                    <div class="textFg" id="reason"></div>
                            </div>
                        </div>
                    </dd>
                    <dd class="list_item clearfix">
                        <label class="label">申诉理由：</label>
                        <div class="fields">
                            <div class="fgInput">
                                <textarea class="textarea" id="jsReason"></textarea>
                                <div class="clearfix">
                                    <div class="fgInput textFgErroy">
                                            <label class="error" style="display:none;" >请填写申诉理由</label>
                                    </div>
                                    <p class="textFg textFg6 textFgFR">剩余<span class="colorN" id="jsReasonNum">50</span>个字</p>
                                </div>
                            </div>
                        </div>
                    </dd>
                    <dd class="list_item clearfix">
                        <label class="label">&nbsp;</label>
                        <div class="fields">
                                <div class="fgInput"> <a  href="####" class="btnPopo btnCon radius5" onclick="appeal_add();">提交</a> <input type="reset" class="btnPopo btnCon radius5 close-win" value="取消"> </div>
                        </div>
                    </dd>
                </dl>
            </div>
            <input type='hidden' name='secret_key' id ='secret_key' value=''>
        </form>
	</div>
</div>-->
</div>
<script type="text/javascript">
function words_deal()
{

var curLength=$("#jsReason").val().length;

if(curLength>50)
{
var num=$("#jsReason").val().substr(0,50);
	$("#jsReason").val(num);
//alert("超过字数限制，多出的字将被截断！" );
}
else
{
$("#jsReasonNum").text(50-$("#jsReason").val().length);
}
}
</script> 
<script>
//2016-12-8
						//关闭申诉表单div //2016-12-8
						$(".j-close-sq").live("click", function() {
							$(".yz-zcon").slideUp(500);
							$(".yz-zcon .branchCommon").remove();
						});
						//申诉表单重置按钮 //2016-12-8
						$(".j-reset-sq").live("click", function() {
								$("#jsReason").val('');
								$("#jsReasonNum").text('50');
								$("#pic_show_sq").empty();
								$(".yz-zcon").slideUp(500);
								$(".yz-zcon .branchCommon").remove();
							})
							//点击已上传图片的删除按钮 触发事件 //2016-12-8
						$(".j-delete-sq").live("click", function() {
							$(this).parents(".picBox-sq").remove();
						})
</script>
<script>
/*function appeal(rowid  ,time , reason , secret_key)
{
    $("#reason").html(reason);
    $("#houseid").html(rowid);
    $("#time").html(time);
    $("#secret_key").val(secret_key);
    $('#jsDialogNeighborhoodComplain').slideDown(500) ;
}	

//关闭申诉表单div
$(".j-close-sq").click(function(){
    $("#jsDialogNeighborhoodComplain").slideUp(500);
});
//申诉表单重置按钮
$(".j-reset-sq").click(function(){
    $("#jsReason").val('');
    $("#jsReasonNum").text('50');
    $("#pic_show_sq").empty();
    $("#jsDialogNeighborhoodComplain").slideUp(500);
})
//点击已上传图片的删除按钮 触发事件
$(".j-delete-sq").click(function(){
    $(this).parents(".picBox-sq").remove();
})
*/
function appeal_add () 
{
    var rowid = $("#houseid").html();
    var reason = encodeURI($("#jsReason").val());
    var secret_key = $("#secret_key").val();
    
	//2015-7-9 获取图片的地址 ----------start ------------>
    var p_filenames = $("input[name='p_filename[]']");	
	var p_filenames_img = '';
	p_filenames.each(function(){
			var value = $(this).val()+',';
			p_filenames_img += value;
		});
	//2015-7-9 获取图片的地址 ----------end ------------>

    if(reason == '')
    {
        $(".error").show();
        return false;
    }else{
        $(".error").hide();
    }
    
    var form = $("#search_form");
    $.ajax({
        type: 'get',
        url : '<?php echo GB_WO_URL;?>/rent/house_appeal/',
        data:  {'secret_key':secret_key , 'rowid':rowid ,'reason':reason,'p_filenames':p_filenames_img},
        dataType:'json',
        success: function(data)
        {
            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();
           }
        }
    });
	$(".yz-zcon").slideUp(500);
							$(".yz-zcon .branchCommon").remove();
							
							$("#gTipsCoverjsDialogNeighborhoodComplain").remove();
    //$("#jsDialogNeighborhoodComplain").hide();
    //$("#gTipsCoverjsDialogNeighborhoodComplain").remove();
}
</script>