<div class="pageTitle">
	<div class="title">疑似价格虚假房源库</div>
</div>

<ul class="optionList">
<!--    <li><a href="/365frame/index.php?ctrl=jobs_sell&method=sell_price_warning" target="_blank"><span class="icon-add"></span>拉取最新疑似房源</a></li>-->
    <li><a href="/365frame/index.php?ctrl=broker_sellwarning&method=remove_disable" target="_blank"><span class="icon-del"></span>清除失效数据</a></li>
    <li><a href="/365frame/index.php?ctrl=jobs_sell&method=warning_24h_num" target="_blank"><span class="icon-finger"></span>一天内低均价20%房源数</a></li>
    <li><a href="/365frame/index.php?ctrl=broker_sellwarning&method=tongji" target="_blank"><span class="icon-refresh"></span>刷新小区统计</a></li>
    <li><a href="/365frame/index.php?ctrl=broker_sellwarning&method=tongji_agency" target="_blank"><span class="icon-refresh"></span>刷新门店统计</a></li>
    <li><a href="/365frame/index.php?ctrl=broker_sellwarning&method=show_tongji_block" target="_blank"><span class="icon-finger"></span>小区统计</a></li>
    <li><a href="/365frame/index.php?ctrl=broker_sellwarning&method=show_tongji_agency" target="_blank"><span class="icon-finger"></span>门店统计</a></li>
    <li><a href="/365frame/index.php?ctrl=jobs_sell&method=block_area_price" target="_blank"><span class="icon-refresh"></span>刷新区间均价</a></li>
</ul>

<form class="search_pad" action="/365frame/index.php" method="GET">
    <div class="search_case clearfix">
        <div class="search_case_title">区属：</div>
        <div class="search_case_cond">
            <?php foreach ($districts as $_d) : ?>
                <a class="<?=$_GET['district']==$_d['name']?'selected':''?>" href="/365frame/index.php?ctrl=broker_sellwarning&method=index&district=<?=$_d['name']?>"><?=$_d['name']?></a>
            <?php endforeach; ?>
        </div>
    </div>
    
    <div class="search_case clearfix">
        <div class="search_case_title">经纪人手机：</div>
        <div class="search_case_cond">
            <input type="hidden" value="broker_sellwarning" name="ctrl">
            <input type="hidden" value="index" name="method">
            <input type="text" value="<?=$_GET['telno']?>" name="telno">&nbsp;&nbsp;
            <span style="font-weight:bold;">房源ID：</span>
            <input type="text" value="<?=$_GET['id']?>" name="id">&nbsp;&nbsp;
            <span style="font-weight:bold;">日期：</span>
            <input type="text" value="<?=$_GET['time']?>" name="time">
            <input type="submit" value="搜索">
        </div>
    </div>
</form>
<!--<button class="btn-grey" onclick="refreshMonthDatas(0)"><span class="iconfont">&#xe606;</span> 拉取疑似价格虚假房源</button>
<div id="refresh_job" style="max-height:96px;overflow-y:auto;"></div>-->

<div class="clearfix">
    <?php if ($_GET['id']) :?>
        <a href="<?=tool::getStr('id','',url::current_url())?>" class="link-del">ID：<?=$_GET['id']?></a>
    <?php endif;?>
    <?php if ($_GET['district']) :?>
        <a href="<?=tool::getStr('district','',url::current_url())?>" class="link-del">区属：<?=$_GET['district']?></a>
    <?php endif;?>
    <?php if ($_GET['block_id']) :?>
        <a href="<?=tool::getStr('block_id','',url::current_url())?>" class="link-del">小区：<?=$warnings[0]['blockshowname']?></a>
    <?php endif;?>
    <?php if ($_GET['room']) :?>
        <a href="<?=tool::getStr('room','',url::current_url())?>" class="link-del">户型：<?=$_GET['room']?>室</a>
    <?php endif;?>
    <?php if ($_GET['area']) :?>
        <a href="<?=tool::getStr('area','',url::current_url())?>" class="link-del">面积：<?=$_GET['area']?>平</a>
    <?php endif;?>
    <?php if ($_GET['floor']) :?>
        <a href="<?=tool::getStr('floor','',url::current_url())?>" class="link-del">楼层：<?=$_GET['floor']?>层</a>
    <?php endif;?>
    <?php if ($_GET['totalfloor']) :?>
        <a href="<?=tool::getStr('totalfloor','',url::current_url())?>" class="link-del">总层数：<?=$_GET['totalfloor']?>层</a>
    <?php endif;?>
    <?php if ($_GET['broker_id']) :?>
        <a href="<?=tool::getStr('broker_id','',url::current_url())?>" class="link-del">经纪人：<?=$warnings[0]['contactor']?></a>
    <?php endif;?>
    <?php if ($_GET['telno']) :?>
        <a href="<?=tool::getStr('telno','',url::current_url())?>" class="link-del">经纪人手机：<?=$_GET['telno']?></a>
    <?php endif;?>
    <?php if ($_GET['time']) :?>
        <a href="<?=tool::getStr('time','',url::current_url())?>" class="link-del">发布时间：<?=$_GET['time']?></a>
    <?php endif;?>
    <?php if (count($where)>1) :?>
        <a href="/365frame/index.php?ctrl=broker_sellwarning&method=index" class="link-del">清除所有</a>
    <?php endif;?>
</div>

<div class="container clearfix" style="margin:0;">
    
	<div class="box mt20">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-a">
			<tr>
                <th><input type="checkbox" id="checkAll"></th>
                <th>房源ID</th>
				<th>区属</th>
				<th>小区</th>
				<th>户型</th>
				<th>面积</th>
				<th>楼层</th>
				<th>总价</th>
				<th>经纪人</th>
				<th>账号</th>
				<th>电话</th>
				<th>发布时间</th>
				<th>操作</th>
			</tr>
			<?php foreach ($warnings as $_w) : ?>
			<tr>
                <td ><input class="checkOne" type="checkbox" name="ids[]" value="<?=$_w['id']?>"></td>
                <td ><a href="http://nj.sell.house365.com/s_<?=$_w['id']?>.html" target="_blank"><?=$_w['id']?></a></td>
                <td ><a href="/365frame/index.php?ctrl=broker_sellwarning&method=index&district=<?=$_w['district']?>" class="operate"><?=$_w['district']?></a></td>
                <td ><a href="/365frame/index.php?ctrl=broker_sellwarning&method=index&block_id=<?=$_w['blockid']?>" class="operate"><?=$_w['blockshowname']?></a></td>
                <td ><?=$_w['room']?>室<?=$_w['hall']?>厅<?=$_w['toilet']?>卫</td>
                <td ><?=$_w['buildarea']?>平</td>
                <td ><?=$_w['floor']?>/<?=$_w['totalfloor']?></td>
                <td ><?=$_w['price']?>万</td>
                <td ><a href="/365frame/index.php?ctrl=broker_sellwarning&method=index&broker_id=<?=$_w['uid']?>" class="operate"><?=$_w['contactor']?$_w['contactor']:$_w['telno']?></a></td>
                <td ><?=$_w['uname']?></td>
                <td ><?=$_w['telno']?></td>
                <td ><a href="/365frame/index.php?ctrl=broker_sellwarning&method=index&time=<?=date('Y-m-d',$_w['creattime'])?>" class="operate"><?=date('Y-m-d',$_w['creattime'])?></a></td>
                <td >
                    <a href="/365frame/index.php?ctrl=broker_sellwarning&method=index&block_id=<?=$_w['blockid']?>&room=<?=$_w['room']?>&totalfloor=<?=$_w['totalfloor']?>&floor=<?=$_w['floor']?>&area=<?=$_w['buildarea']?>" class="operate">相似房源</a>
                </td>
			</tr>
			<?php endforeach; ?>
		</table>
	</div>
	<div style="margin-top:3px;">
	   <?=$pagenations['pagenation'];?>
	   <div>
	       <div id="operate_buttons">
    	       <button class="operate" onclick="dongjie(-1)">冻结房源</button>
        	   <button class="submit" onclick="tongguo(-1)">审核通过</button>
	       </div>
	       <div id="operate_jindu" style="height:20px;width:500px;display:none;">
    	       <div id="jindu_run" style="height:20px;width:0;color:#FFF;"></div>
	       </div>
	   </div>
	</div>
</div>
<script>
$('#checkAll').click(function(){
    var _ch = $('#checkAll').is(':checked');
    $('.checkOne').attr('checked',_ch);
});
function dongjie(cnum){
    var cn = $('.checkOne:checked').length;
    
    if(cn==0){
        return;
    }
    
    if(cn>0 && cnum == -1){
        $('#operate_jindu').css('border','1px solid #DB4701');
        $('#jindu_run').css('background','#DB4701');
        $('#jindu_run').text('正在冻结');
        $('#operate_jindu').show();
        $('#operate_buttons').hide();
    }
    
    if (cnum<cn){
        var len = 500/cn*(cnum+1);
        $('#jindu_run').css('width',len+'px');
        var id = $('.checkOne:checked').eq(cnum).val();
        $.get('/365frame/index.php?ctrl=broker_sellwarning&method=dongjie',{'id':id},function(data){
            dongjie(cnum+1);
        });
    }else{
        window.location.reload();
    }
}

function tongguo(cnum){
    var cn = $('.checkOne:checked').length;
    
    if(cn==0){
        return;
    }
    
    if(cn>0 && cnum == -1){
        $('#operate_jindu').css('border','1px solid #0055FF');
        $('#jindu_run').css('background','#0055FF');
        $('#jindu_run').text('正在通过');
        $('#operate_jindu').show();
        $('#operate_buttons').hide();
    }
    
    if (cnum<cn){
        var len = 500/cn*(cnum+1);
        $('#jindu_run').css('width',len+'px');
        var id = $('.checkOne:checked').eq(cnum).val();
        $.get('/365frame/index.php?ctrl=broker_sellwarning&method=tongguo',{'id':id},function(data){
            tongguo(cnum+1);
        });
    }else{
        window.location.reload();
    }
}
</script>