<?php require APPPATH_MVC.'views/header.php'; ?>

<!--<link href="http://user.house365.com/css/publicNew.css" rel="stylesheet" type="text/css">-->


<style>
.pic_count{position: relative;top:-23px;background: url("../images/bj_pic.png") repeat;width: 40px;height: 20px;padding: 1px 0 1px 8px;color: #fff;text-decoration: none;}
.pic_count img{vertical-align: center;margin-right:7px;}
.pic_count_div{float:left;margin-bottom: -20px;}
.cover {
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.6);
    filter: progid:DXImageTransform.Microsoft.gradient( GradientType=0, startColorstr="#60000000", endColorstr="#60000000");
    z-index: 19;
}

.sucewml_new{float: left;width: 168px;}
.sucewml_new_pic{ border:1px solid #f0f0f0; width: 146px; height: 146px; padding: 10px; text-align: center;}
.sucewml_new_pic img{ width: 146px; height: 146px;}
.col_333333{color: #333333;}
.col_ec6c00{color: #ec6c00;}
.col_2760c7{color: #2760c7;}
.mt20{margin-top: 20px;}
.f14{font-size: 14px;}
.h16{height: 16px;}
.lh16{line-height: 16px;}
.fl{float: left;}
.fr{float: right;}
.sucewmr_new{ float:right;width: 310px;height: 250px;}
.font_bold{font-weight: bold;}
.sucewmr_new_pic{width: 140px;height: 250px;}
.f14{
    font-size: 14px;
}

.col_111111{
    color: #111111;
}

.pop {
    font-size: 12px;
    width: 665px;
    padding-bottom: 60px;
    position: fixed;
    background: #fff;
    z-index: 1001;
    font-family: Microsoft yahei;
    border-radius: 4px;
}

.pop button {
    border-radius: 4px;
    background: #ec6c00;
    color: #fff;
    font-size: 16px;
    padding: 14px 116px;
    margin-top: 25px;
    cursor: pointer;
}

.popwap {
    width: 506px;
    font-size: 14px;
    margin: 0 auto;
    color: #666;
}

.tit {
    width: 100%;
    height: 32px;
}

.tit.shiming span {
    background: url(../images/popclose.png) no-repeat;
    width: 28px;
    height: 28px;
    float: right;
    margin: 10px;
    cursor: pointer;
}

.popwap .sucewmr {
    width: 289px;
    margin-left: 20px;
}

.popwap .sucewmr p:first-child {
    font-size: 16px;
}
.sucewml{ float: left; border:1px solid #f0f0f0; width: 146px; height: 146px; padding: 10px; text-align: center;}
.sucewml img{ width: 144px; height: 144px;}
.sucewmr{ float: left; margin: 16px 0 0 24px; width: 322px;}
.sucewmr p{ font-size: 14px;}
.sucewmr p:first-child{ font-size: 18px; color: #333; margin-bottom: 20px;}
.sucewm{ margin-top: 18px;}
.word-orange{ color: #ec6c00;}
</style>

<?php //require APPPATH_MVC.'views/win_message.php'; ?>
<?php 
if(!empty($is_win['data']))
{
	if(!empty($is_win['status']))
	{
		//require APPPATH_MVC.'views/win_message_test.php';
	}
}
elseif(!empty($_COOKIE['nj_pic_messagebox_cache']))
{
	require APPPATH_MVC.'views/publish_image_message.php';	
}

setcookie('nj_pic_messagebox_cache','0',time()-3600,'/','house365.com');
?>


<?php if(GB_CITY=='nj'){?>
<!--微信活动二维码-->
<div id="weixin_qrcode" class="weixin_qrcode" >
	<p  class="weixin_qrcode_01" >分享到微信朋友圈</p>
	<img  src="" alt="" id="weixinpic" width="190px;" height="190px"/>
	<p class="weixin_qrcode_02">打开微信点击底部的“发现”，</p>
	<p class="weixin_qrcode_02">使用“扫一扫”即可将网页分享至朋友圈。</p>
</div>

<script>
$(function(){	
	$(".wx_share_c").mouseover(function(){
	   var sell_house = $(this).attr("value");	   
	   var wx_url ="http://user.house365.com/esf_center_api/getWxPic/?id="+sell_house+"&tbl=sell";
	   $("#weixinpic").attr("src",wx_url);
	})
})
</script>
<?php }?>


<?php if(GB_CITY=='hf'){?>
<!--微信活动二维码-->
<div id="weixin_qrcode" class="weixin_qrcode" >
	<p  class="weixin_qrcode_01" >分享到微信朋友圈</p>
	<img  src="" alt="" id="weixinpic" width="190px;" height="190px"/>
	<p class="weixin_qrcode_02">打开微信点击底部的“发现”，</p>
	<p class="weixin_qrcode_02">使用“扫一扫”即可将网页分享至朋友圈。</p>
</div>

<script>
$(function(){	
	$(".wx_share_c").mouseover(function(){
	   var sell_house = $(this).attr("value");

   var wx_url = "http://user.house365.com/esf_center_api/getHfWxPic/?id=" + sell_house + "&tbl=sell";
        $("#weixinpic").attr("src",wx_url);
	})
})
</script>
<?php }?>

<?php if(GB_CITY=='nj' || GB_CITY=='hf'){?>
<!--微信活动二维码-->
<style>
    #wx_share{float:left;color: #2280ff;height: 24px;line-height: 24px;margin: 0 0 4px;
        position: static;text-decoration: none;width: 50px;}
    /* .withdelet{position:relative;left: 280px;top:60px; z-index: 20;}
    .withoutdelet{position:relative;left:340px;top:45px; z-index: 20;}*/
    .withdelet{position:relative;left: 280px;top:60px; float:left;z-index: 20;}
    .withoutdelet{position:relative;left:340px;top:45px;;float:left;}
    #weixin_qrcode{display: none;position:absolute;z-index: 100;}
    .weixin_qrcode {width: 260px;height: 300px;background: #fff;border:solid 1px #ccc;}
    .weixin_qrcode_01{font:bold 12px "宋体";display: inline-block;margin:10px;color:#000;}
    .weixin_qrcode_02{font:normal 11px "宋体";display: inline-block;color:#666;line-height: 20px;}
    .weixin_qrcode img{margin: 5px 0 10px 35px;}
    }
</style>
<?php }?>
<!--会员左侧 End-->
<!--实名认证-->
<span style="display: none;" id="isShiMingRenZheng"><?php if($userInfo[0]['auth_type'] || $userInfo[0]['bank_type']){
        echo '是';
    }else{
        echo '否';
    } ?></span>

<div class="w960 clearfix mt10 pepcenterBox">
		<?php require APPPATH_MVC.'views/left.php'; ?>
		<!--会员左侧 End-->
		<div class="user-main user-main02">
				<div class="hd-bar pos-r">
						<h2>二手房管理</h2>
                    <span style="padding-left: 12%;color: #ff8400;">登录淘房APP，再也不错过找房人的咨询留言，<a target="_blank" style="color:#2280FF" href="http://app.house365.com/">去下载</a></span>
                        <a class="btnLink" href="<?php echo GB_PUBLISH_URL_NEW;?><?php echo GB_CITY=='nj'?'?kind=1':'' ?><?php echo GB_CITY=='wh'?'?newWh=1':'' ?>" target="_blank">我要出售</a>
				</div>
				<div class="user-main user-main03">
						<div class="mod-list h-source source-manger source-manger02 source-manger03">
								<?php 
            if(is_array($house_array) && !empty($house_array)){
            $n=1;
            foreach($house_array as $key=>$value){
            $streetname = $this->block_model->getstreetname($value['streetid']);
            $this->house_statistic_model->set_city(GB_CITY);
            $this->house_statistic_model->set_uid($this->user_id);
            //房源今日是否刷新
            $is_refresh = $this->house_statistic_model->get_operate_list(2 , $value['id'],date('Y-m-d',time()));
            //房源今日是否再发布
            $is_oper = $this->house_statistic_model->get_operate_list(5 , $value['id'],date('Y-m-d',time()));
            //搜索是否有相同条件的已激活房源，有的话就不能再发布
            $arr=array('blockshowname'=>$value['blockshowname'],'buildarea'=>$value['buildarea'],'price'=>$value['price'],'floor'=>$value['floor'],'subfloor'=>$value['subfloor'],'totalfloor'=>$value['totalfloor']);
            $telno = $value['telno'];
            $is_esta = $this->house_model->yzsamehouse($telno,$arr,'sell');
            $click_num = $this->house_statistic_model->get_house_clicknum_by_id($value['id'],'sell');
			$refresh_num = $this->user_model->getRefreshByid('sell',$value['id']);
            //取第一条状态
            if($n==1){$temp_house_esta = $value['esta'];}
		
			if(strpos($value['buildarea'],'.')){//如果除法运算后为整数，则小数点后加0
				$value['buildarea']=rtrim($value['buildarea'],'0');
				$value['buildarea']=rtrim($value['buildarea'],'.');
			}
            ?>
								<div class="list-inner clearfix <?php if($n%2==0){echo 'odd ';} if($value['esta']!=1){echo 'unable'; }?>">
										<?php if($value['esta']==1){?>
										<div style="float:left;">
											<a class="proscor" href="<?php echo get_sellinfo_url($value['id']).'?update=1';?>" target="_blank">
												<img style="float:none" src="<?php echo $value['pic1']?get_big_pic_new($value['pic1']):USER_CENTER.'images/no_img_small.gif';?>" width="110" height="85" />

				<?php if(intval($value['survey']) == 1): ?>
					<?php if($value['show_survey_icon']): ?>
					<span></span>
					<?php endif; ?>
					<div><?php echo $value['survey_status']; ?></div>
				<?php endif; ?>


											</a>
											<?php if(intval($value['survey']) != 1): ?>
											<?php if($value['city_name']=='nj' && $value['pic_num'] !=0){?>
											<div class="pic_count" ><img style="float:none" src="/images/img.png" alt=""/><?php echo $value['pic_num']?></div>
											<?php }?>
											<?php endif; ?>
										</div>
										<?php }else{?>
										<div style="float:left;">
											<span class="proscor"><img style="float:none" src="<?php echo $value['pic1']?get_big_pic_new($value['pic1']):USER_CENTER.'images/no_img_small.gif';?>" width="110" height="85" />
											
				<?php if(intval($value['survey']) == 1): ?>
					<?php if($value['show_survey_icon']): ?>
					<span></span>
					<?php endif; ?>
					<div><?php echo $value['survey_status']; ?></div>
				<?php endif; ?>
											
											</span>
											<?php if(intval($value['survey']) != 1): ?>
											<?php if($value['city_name']=='nj' && $value['pic_num'] !=0){?>
												<div class="pic_count" ><img style="float:none" src="/images/img.png" alt=""/><?php echo $value['pic_num']?></div>
											<?php }?>
											<?php endif; ?>
										</div>
										<?php }?>
										<div class="h-source-info">
												<div class="text">
														<?php if($value['esta']==1){?>
														<a class="link" href="<?php if(isset($value['priceunit'])){ echo get_rentinfo_url($value['id']).'?update=1';}else{echo get_sellinfo_url($value['id']).'?update=1';}?>" target="_blank"><?php echo !empty($value['blockshowname'])?$value['blockshowname'].' <em class="t-line">|</em> ':'';?> <?php echo !empty($value['room'])?$value['room'].'室':'';?><?php echo !empty($value['hall'])?$value['hall'].'厅 <em class="t-line">|</em> ':'';?><?php echo $value['buildarea'].'㎡ <em class="t-line">|</em> ';?><span class="price"><strong class="num"><?php echo $value['price'];?></strong> 万元</span></a>
														<?php }else{?>
														<?php echo !empty($value['blockshowname'])?$value['blockshowname'].' <em class="t-line">|</em> ':'';?> <?php echo !empty($value['room'])?$value['room'].'室':'';?><?php echo !empty($value['hall'])?$value['hall'].'厅 <em class="t-line">|</em> ':'';?><?php echo intval($value['buildarea']).'㎡ <em class="t-line">|</em> ';?><span class="price"><strong class="num"><?php echo $value['price'];?></strong> 万元</span>
														<?php }?>
												</div>
												<p><?php echo date("Y-m-d H:i:s",$value['creattime']);?>发布 (<?php echo time_tran($value['updatetime']);?>更新)</p>
										</div>
										<?php if($value['esta']==1){?>
										<div class="operate-bar"><a href="javascript:submit_all_refresh('refresh',<?php echo $value['id'];?>,'1','<?php echo md5($value['id'].'house365')?>',<?php echo $value['infotype'];?>,<?php echo $value['ischarge'];?>)" class="operate-refresh oper-link"><span class="text">刷新</span>
                                                <?php if($refresh_num > 0 ) {?>
                                                    <span class="num jsUpLoadNum"><?php echo $refresh_num;?></span>
                                                    <span style="display: none;" class="p_text jsUpLoadText">可刷新次数<strong class="str"><?php echo $refresh_num;?></strong>次</span>
                                                <?php } ?>
                                            </a>
                                                <?php if(GB_CITY == 'nj' && !isset($value['priceunit'])): ?>
                                                    <a href="<?php echo GB_PUBLISH_URL_NEW;?>?kind=1&sell_id=<?php echo $value['id'];?>&code=<?php echo md5($value['id'].'house365');?>&tbl=sell" target="_blank" class="operate-revise oper-link">修改</a>
                                                <?php else: ?>
                                            <a href="<?php echo GB_PUBLISH_URL_NEW;?>?kind=<?php echo isset($value['priceunit'])?'2':'1';?>&sell_id=<?php echo $value['id'];?>&code=<?php echo md5($value['id'].'house365');?>&tbl=sell" target="_blank" class="operate-revise oper-link">修改</a>
                                                <?php endif;?>
                                            <?php if($value['can_survey']){?>
                                                <a href="javascript:void(0)" class="pros lmemo" data-id="<?php echo $value['id']; ?>">
                                                    <?=GB_CITY=='wh' ? 'vr实勘' : '实勘'?>
                                                    <div class="proswap">
                                                        <div class="proscon">
                                                            <div class="prosimg"></div>
                                                            <?php if(GB_CITY == 'wh'){?>
                                                            <div class="prosword">VR实勘，专业摄影师上门拍摄VR全景，并绘制房型图</div>
                                                            <?php }else{?>
                                                            <p>免费实勘服务 助您快速卖房</p>
                                                            <div class="prosword">专业摄影师上门实拍、绘制标准房型图、优化房源信息质量，现在申请全程免费喔！</div>
                                                            <?php }?>
                                                        </div>
                                                    </div>
                                                </a>
                                            <?php } else { ?>
                                                <a href="javascript:void(0)" class="pros" data-id="<?php echo $value['id']; ?>">
                                                    &nbsp;
                                                </a>
                                            <?php }?>
												<?php if(empty($is_oper[0])){?>
												<a href="javascript:submit_all_del('del',<?php echo $value['id'];?>,'0','<?php echo md5($value['id'].'house365')?>',<?php echo $value['infotype'];?>,<?php echo $value['ischarge'];?>)" class="operate-del oper-link">删除</a>
												<?php }else{ ?>
							<span class="operate-del oper-link" style="color:#ccc;" >删除</span>
												<?php }?>
                                            <?php if((GB_CITY=='nj' || GB_CITY=='wh') && $value['ischarge']==2){?>
                                                <span class="c-29B966 extending">推广申请中</span>
                                            <?php }elseif(GB_CITY=='nj' && $value['promoting']==1){?>
                                                <span class="c-29B966 extending">付费推广中</span>

                                            <?php }elseif(GB_CITY=='wh' && $value['promoting']==1 && isset($value['leftTime'])){?>
                                                <span class="c-29B966 extending">剩余<?=$value['leftTime']?></span>

                                            <?php }elseif((GB_CITY=='nj' || GB_CITY=='wh') && $limitNumGtZero[2]['sell']){?>
                                                <a href="javascript:void(0)" class="extend"><span onclick="showPop('extendPop','sell','<?php echo $value['id'];?>')">推广</span>
                                                    <div class="proswap">
                                                        <div class="proscon">
                                                            <div class="prosimg"></div>
                                                            <div class="prosword">24小时优先展示，效果提升5倍！<span><img width="12" src="http://nj.sell.house365.com/template/nj/images/20_20_01.png"></span></div>
                                                        </div>
                                                    </div>
                                                </a>
                                                <?php } else { ?>
                                                    <a href="javascript:void(0)" class="extend"></a>
                                                <?php } ?>
												<br>
										<?php if(GB_CITY=='nj' || GB_CITY=='hf'){?>
											<a href="javascript:void(0)" class="wx_share_c" id="wx_share" value="<?php echo $value['id'];?>">分享</a>
										<?php }?>

										</div>
										<?php if((GB_CITY=='nj'  || GB_CITY=='hf' ) && $n==1){?>
											<!--微信活动二维码-->
											<?php 
											  $wx_css = empty($is_oper[0]) ? "withdelet" : "withoutdelet";
											?>
											<!--<div id="wx_hit" class="<?php echo $wx_css;?>"><img src="../images/weixin1.png" alt=""></div>-->
										<?php }?>
										<?php }?>
										<div class="lookdetails">
												<div class="inner">
														<p class="look">昨日点击量：<strong class="num"><?php echo $click_num;?></strong></p>
														<?php if(($value['ischarge']==0 || $value['ischarge']==2) && empty($value['pic1'])){?>
														<p class="text">上传图片就可以获得一次刷新了哦。</p>
														<?php }elseif(($value['ischarge']==0 || $value['ischarge']==2) && !empty($value['pic1']) && empty($is_refresh)){?>
                                                        <p class="text">刷新一下，就立马排到前面去了哦。</p>
                                                        <?php }elseif(($value['ischarge']==0 || $value['ischarge']==2) && GB_CITY=='nj' && !empty($value['pic1']) && !empty($is_refresh)){ ?>
                                                        <p class="text">付费推广效果更佳哦。</p>
                                                        <?php }elseif($value['ischarge']==1){?>
                                                        <p class="text">记得每天刷新哦。</p>
                                                        <?php }?>
                                                       <p style="color:#29b966;padding-top: 5px;" class="text"><?php if($value['between'])echo $value['between'] ;?></p>
												</div>
										</div>
										<?php if($value['esta'] == 2){?>
										<span class="del-over">已删除</span> 
                                        <?php if($value['ischarge'] != 1 && empty($is_esta)){ ?>
                                        <a href="javascript:;" onclick="submit_all('again_pub',<?php echo $value['id'];?>,'0','<?php echo md5($value['id'].'house365')?>',<?php echo $value['infotype'];?>)" class="republish">再发布</a>
                                        <?php }?>
										<?php }elseif($value['esta'] == 0 || $value['esta'] == 5 || $value['esta'] == -10){?>
										<span class="auditing">审核中</span>
										<?php }elseif($value['esta'] == 3 || $value['esta'] == 4){?>
										<span class="del-over">已删除</span> 
                                        <?php if($value['ischarge'] != 1 && empty($is_esta)){ ?>
                                        <a href="javascript:;" onclick="submit_all('again_pub',<?php echo $value['id'];?>,'0','<?php echo md5($value['id'].'house365')?>',<?php echo $value['infotype'];?>)" class="republish">再发布</a>
                                        <?php }?>
										<?php }elseif($value['esta'] < 0 && $value['esta'] > -9){?>
										<span class="auditing-none">审核未通过</span>
										<div class="auditing-tip">
												<p>了解详情，请拨打客服电话：<?php echo TEL;?></p>
										</div>
										<?php }?>
								</div>
								<?php 
            $n++;
            }}else{
            ?>
				
								<div class="mod-list h-source">
										<div class="no-result">您还没有发布房源，去发布房源吧。<a target="_blank" href="<?php echo GB_PUBLISH_URL;?><?php echo GB_CITY=='nj'?'?kind=1':'' ?>">立即前往&gt;&gt;</a></div>
								</div>
								<?php }?>
							<?php if(is_array($house_array) && !empty($house_array) ){?>	<div class="solidDiv">&nbsp;</div><?php }?>
						</div>
						
						<!--         <form name="" method="post">
        <div class="showBox payBox" id="showBox">
            <a href="javascript:void(0)" class="showBox-close payBox-close">关闭</a>
            <div class="inner">
                <div class="pay-panel">
                    <div class="hd">套餐类型</div>
                    <div class="bd pay-type clearfix">
                        <label><input name="pay-type" type="radio" value="1" checked><div class="on">普通套餐</div></label>
                        <label><input name="pay-type" type="radio" value="2"><div>标准套餐</div></label>
                        <label><input name="pay-type" type="radio" value="3"><div>文字置顶套餐</div></label>
                        <label><input name="pay-type" type="radio" value="4"><div>图片置顶套餐</div></label>
                    </div>
                </div>
                <div class="pay-panel">
                    <div class="hd">天数</div>
                    <div class="bd pay-day clearfix">
                        <label><input name="pay-day" type="radio" value="1" checked><div class="on">10天</div></label>
                        <label><input name="pay-day" type="radio" value="2"><div>30天</div></label>
                    </div>
                </div>
                <a href="javascript:void(0)" onclick="tgzf()"  class="btn2" >确定</a>
            </div>
        </div> 
        <input type="hidden" name="tgid" id="tgid" value="">
        </form> -->
						
						<div class="cut-page"> <?php echo page_uri($page,$pages,USER_CENTER.'user/myhousesell');?> </div>
						<div class="nounExplanation">
                        <?php if(GB_CITY=='nj'){?>
								<p>1、<strong class="title">刷新：</strong>相当于您重新发布这条房源，在按时间排序的情况下信息将靠前显示。上传房源图且实名认证后即可获得一次免费刷新，更多刷新机会需要付费获得。</p>
								<p>2、<strong class="title">推广：</strong>赠送刷新次数、置顶等功能。让您的房源更快的成交。<a class="whyIcoLink" href="<?php echo GB_HOUSE_PROMOTE_PIC;?>" target="_blank">什么是推广</a></p>
								<p>3、<strong class="title">待审核：</strong>待审核中的信息除了您自己外，其他人无法看到，不能修改，工作人员会在24小时内为您审核。</p>
								<p>4、<strong class="title">已删除：</strong>删除后别人就无法看到信息了。自己删除后可恢复，如有疑问，请咨询：<span  class="tel"><?php echo TEL;?></span></p>
								<p>5、<strong class="title">审核未通过：</strong>该房源未经过网站二次房源审核，必要时向网站提供相关材料给网站，验证合格后，方可发布，需要电话客服。</p>
                         <?php }else{?>
                         	    <p>1、<strong class="title">刷新：</strong>相当于您重新发布这条房源，在按时间排序的情况下信息将靠前显示.发1-5张图可获得一次刷新机会，6-10张图可获得2次刷新。</p>
								<p>2、<strong class="title">待审核：</strong>待审核中的信息除了您自己外，其他人无法看到，不能修改，工作人员会在24小时内为您审核。</p>
								<p>3、<strong class="title">已删除：</strong>删除后别人就无法看到信息了。自己删除后可恢复，如有疑问，请咨询：<span  class="tel"><?php echo TEL;?></span></p>
								<p>4、<strong class="title">审核未通过：</strong>该房源未经过网站二次房源审核，必要时向网站提供相关材料给网站，验证合格后，方可发布，需要电话客服。</p>
                         <?php }?>
						</div>
				</div>
				<!--会员右侧 End--> 
		</div>
</div>
<script>
    //弹出提示
    function ShowPop1(show, content) {
        var bh = $(window).height();
        var bw = $(window).width();
        $(".cover").css({
            height: 2 * bh,
            width: bw,
            display: "block"
        });
        var name = show;
        var t = $("." + show).height();
        var l = $("." + show).width();
        $("." + show).css({
            "top": (bh - t) / 2,
            "left": (bw - l) / 2
        });
        $("." + show + ' .normalh').html(content);
        $("." + show).fadeIn(500);
    }

    //关闭提示
    function HidePop1(show) {
        $(".cover").fadeOut(100);
        $("." + show).fadeOut(500);
        window.location.reload();
    }



function submit_all(type,id,mark,code,infotype){
    if(id) {
        <?php if(GB_CITY=='nj'){?>
         var isShiming = $('#isShiMingRenZheng').text();
         if(isShiming == '否' && type == 'again_pub'){
             ShowPop1('sucpop');
             return false;
         }
        <?php }?>


    if(mark==1)
    {
     $("#pop_win_1").hide();
     $.ajax({
     type: 'post',
     url : '<?php echo USER_CENTER;?>user/myhousesell',
     data: 'type='+type+'&id='+id+'&code='+code+'&infotype='+infotype,
     dataType:'html',
     success: function(msg){
           if(type == 'again_pub'){
                  switch(msg)
                  {
                   case '1':
                   $("#war-text").html("再发布成功");
                   setTimeout("location.reload()",3000);
                   break;

                   case '2':
                   $("#war-text").html("验证不通过，来源不正确");
                   break;

                   case '3':
                   $("#war-text").html("再发布失败");
                   break;
                  }
                openWin('warning');
              }
            
          
         }
       });

    }else{

        if(type == 'again_pub')
        {
        $("#pop_text").html("确定再发布这条房源吗");
        $("#pop_sure").attr("href","javascript:submit_all('"+type+"',"+id+",1,'"+code+"','"+infotype+"')");
        }


     openWin('pop_win_1');
    }
    
    }
}


function submit_all_refresh(type,id,mark,code,infotype,ischarge){
    if(id) {
    if(mark==1)
    {
     $("#pop_win_1").hide();
     $.ajax({
     type: 'post',
     url : '<?php echo USER_CENTER;?>user/myhousesell',
     data: 'type='+type+'&id='+id+'&code='+code+'&infotype='+infotype,
     dataType:'json',
     success: function(data){

              if(type == 'refresh')
              {
                  switch(data.msg)
                  {
                   case 1:
                   $("#war-text").html("刷新成功,今天还剩"+data.num+"次");
                   openWin('warning');
                   setTimeout("location.reload()",3000);
                   break;

                   case 2:
                   $("#war-text").html("验证不通过，来源不正确");
                   openWin('warning');
                   break;

                   case 3:

                   <?php if(GB_CITY == 'nj') {?>
                       showPop('refresh','sell',id);
                   <?php } else { ?>
                       $("#war-text").html("您今日没有刷新次数了！");
                       openWin('warning');
                   <?php } ?>
                       break;

                   case 4:
                   $("#war-text").html("刷新失败");
                   openWin('warning');
                   break;
                  }
              }
            
          
         }
       });

    }else{

        if(type == 'refresh')
        {
        $("#pop_text").html("确定刷新这条房源吗");
        $("#pop_sure").attr("href","javascript:submit_all_refresh('"+type+"',"+id+",1,'"+code+"','"+infotype+"','"+ischarge+"')");
        }
        openWin('pop_win_1');
    }
    
    }
}

function submit_all_del(type,id,mark,code,infotype,ischarge){

    if(id) {
    if(mark==1)
    {
     $("#pop_win_1").hide();
     $.ajax({
     type: 'post',
     url : '<?php echo USER_CENTER;?>user/myhousesell',
     data: 'type='+type+'&id='+id+'&code='+code+'&infotype='+infotype,
     dataType:'html',
     success: function(msg){

              if(type == 'del')
              {
                  switch(msg)
                  {
                   case '1':
                   $("#war-text").html("删除成功");
                   break;

                   case '2':
                   $("#war-text").html("验证不通过，来源不正确");
                   break;

                   case '3':
                   $("#war-text").html("删除失败");
                   break;
                  }
              }
                openWin('warning');

         }
       });

    }else{

        if(type == 'del')
        {
            if(ischarge==1)
            {
             $("#pop_text").html("付费房源删除不可恢复，确定删除吗");
             }else{
             $("#pop_text").html("确定要删除这条房源吗");
            }
        $("#pop_sure").attr("href","javascript:submit_all_del('"+type+"',"+id+",1,'"+code+"','"+infotype+"','"+ischarge+"')");
        }
        openWin('pop_win_1');
    }

    }
}





//推广提交
function tgzf(){
     id = $("#tgid").val();
     paytype = $("#paytype").val();
     payday = $("#payday").val();
     $.ajax({
     type: 'post',
     url : '<?php echo USER_CENTER;?>user/myhousesell',
     data: 'type=tg&id='+id+'&paytype='+paytype+'&payday='+payday,
     dataType:'html',
     success: function(msg){
       switch(msg)
       {
       case '1':
       $("#war-text").html("推广申请已提交");
       setTimeout("location.reload()",3000);
       break;

       case '3':
       $("#war-text").html("推广申请提交失败");
       break;
       }
        $("#showBox").hide();
        openWin('warning');
     }
     
     })

}

</script> 
<script>
var openWin = function(obj){
	var winHeght = $(document).height() ;
	var winElemt = $('#'+ obj);
	
	var win = {
		
		height : function(){
			return winElemt.outerHeight();
		},
		
		width : function(){
			return winElemt.outerWidth();
		},
		
		show : function(){
			winElemt.css({
				'position':'absolute',
				'z-index':'9999902',
				'left':'50%',
				'margin-left':'-' + win.width() / 2 + 'px',
				'top':$(window).height()/2 - (win.height()/2) + $(window).scrollTop() + 'px'
			}).show();
		},
		
		hide : function(){
			winElemt.hide();
		}
	
	};
	win.show();
	$('.close-win').click(function(){
		win.hide();
	});
};
function tg(id)
{
  $("#tgid").val(id);

}
$(function(){
    $('#pop_sure02').click(function(){
       
        $("#pop_win_02").hide();
         openWin('showBox');
         $(this).attr("date-num","0");
         $("#pop_sure").html("确定");
         //$("#pop_sure").attr("onclick","$('#pop_win_1').hide();");
        
    })
})



</script>

<?php require APPPATH_MVC.'views/house_promote.php'; ?>
<!--2017-11-10-->
		<div id="pros" class="pop" style=" display:none;z-index:100;position: fixed;top: 300px;left: 50%;margin-left: -85px;">
			<div class="hd">
				<h2>提示</h2>
				<a href="javascript:void(0)" class="close-win">关闭</a>
			</div>
			<div class="bd">
				<div class="warning-inner">
					<div class="war-bg" style="background:url(http://user.house365.com/images/pop-ico.gif)  0 0 no-repeat;"></div>
					<p class="war-text">您确定要申请实勘该房源吗？</p>
				</div>
				<div class="pop-btn-area">
					<a href="javascript:void(0)" class="close-win" style="background:#29B966;color:#fff;padding:7px 15px;margin:0 5px;border:1px solid #26AB5E" id="submitSurvey">确定</a>
					<a style="*position:relative;background:#F5F5F5;color:#666;padding:7px 15px;margin:0 5px;border:1px solid #CCCCCC" class="close-win" href="javascript:void(0)">取消</a>
				</div>
			</div>
		</div>
		<div id="prossuc" class="pop" style=" display:none;z-index:100;position: fixed;top: 300px;left: 50%;margin-left: -85px;">
			<div class="hd">
				<h2>提示</h2>
				<a href="javascript:void(0)" class="close-win" id="survey_close">关闭</a>
			</div>
			<div class="bd">
				<div class="warning-inner">
					<div class="war-bg" style="background:url(http://pic.house365.com/erbu/second/images/right.png)  0 0 no-repeat;"></div>
					<p class="war-text">您的实勘申请已提交</p>
                    <?php
                    $begin = strtotime("2018-09-30 16:00:00");
                    $end   = strtotime("2018-10-07 17:30:00");
                    $now = time();
                    if( $now >= $begin && $now <= $end )
                    {?>
                        <p class="prosword">工作人员将在节后上班（10月8日）为您尽快安排实勘。如需帮助请拨打客服电话025-85359365，给您带来不便敬请谅解。祝您国庆节愉快！</p>
                    <?php }else {?>
                        <p class="prosword">365实勘摄影师将会在24小时内与您联系。</p>
                    <?php }?>
				</div>				
			</div>
		</div>
		
		<!--2017-11-10-->



<div id="warning" class="pop" style=" display:none;z-index:100">
		<div class="hd">
				<h2>提示</h2>
				<a href="javascript:void(0)" class="close-win">关闭</a> </div>
		<div class="bd">
				<div class="warning-inner">
						<div class="war-bg" style="background:url(<?php echo USER_CENTER;?>images/pop-ico.gif)  0 0 no-repeat;"></div>
						<p class="war-text" id="war-text"></p>
				</div>
				<div class="pop-btn-area"><a href="javascript:location.reload();" class="close-win" style="background:#29B966;color:#fff;padding:7px 15px;margin:0 5px;border:1px solid #26AB5E">确定</a></div>
		</div>
</div>
<div style="display:none;width:390px;height:200px; position:absolute;left:50%;top:300px;margin-left:-85px;-moz-box-shadow: 0 0 34px #cacaca;-webkit-box-shadow: 0 0 34px #cacaca;box-shadow: 0 0 34px #cacaca; z-index:9999" id="pop_win_1" class="pop_win">
		<div style="height:40px;background:#FF8400" class="hd">
				<h2 style="font-size:14px;color:#fff;font-weight:800; position:absolute;left:10px;top:10px">提示</h2>
				<a style="display:block;width:30px;height:30px;background:url(<?php echo USER_CENTER;?>images/pop-ico.gif) 0 -80px no-repeat; position:absolute;right:10px;top:6px; text-indent:-999px; overflow:hidden" class="close-win" href="javascript:void(0)">关闭</a></div>
		<div style="background:#fff;height:160px" class="bd">
				<div style="width:70px;height:80px;background:url(<?php echo USER_CENTER;?>images/pop-ico.gif) no-repeat -2px -113px; position:absolute;left:70px;top:60px"></div>
				<p style="position:absolute;left:140px;top:85px;font-size:14px" id="pop_text">你确定要删除该房源吗？</p>
				<div style="text-align:center;position:absolute;top:155px;width:100%;"><a style="*position:relative;background:#29B966;color:#fff;padding:7px 15px;margin:0 5px;border:1px solid #26AB5E" class="refresh-ok" href="javascript:submit_all(1)" date-num="0" id="pop_sure">确定</a><a style="*position:relative;background:#F5F5F5;color:#666;padding:7px 15px;margin:0 5px;border:1px solid #CCCCCC" class="close-win" href="javascript:void(0)">取消</a></div>
		</div>
</div>
<form name="" method="post">
		<div style="display:none;width:390px;height:200px; position:absolute;left:50%;top:300px;margin-left:-85px;-moz-box-shadow: 0 0 34px #cacaca;-webkit-box-shadow: 0 0 34px #cacaca;box-shadow: 0 0 34px #cacaca; z-index:9999" id="showBox" class="pop_win">
				<div style="height:40px;background:#FF8400" class="hd">
						<h2 style="font-size:14px;color:#fff;font-weight:800; position:absolute;left:10px;top:10px">提示</h2>
						<a style="display:block;width:30px;height:30px;background:url(<?php echo USER_CENTER;?>images/pop-ico.gif) 0 -80px no-repeat; position:absolute;right:10px;top:6px; text-indent:-999px; overflow:hidden" class="close-win" href="javascript:void(0)">关闭</a></div>
				<div style="background:#fff;height:160px" class="bd">
						<div style="width:70px;height:80px;background:url(<?php echo USER_CENTER;?>images/pop-ico.gif) no-repeat -2px -113px; position:absolute;left:70px;top:60px"></div>
						<p style="position:absolute;left:140px;top:85px;font-size:14px" id="pop_text">你确定要推广该房源吗？</p>
						<div style="text-align:center;position:absolute;top:155px;width:100%;"><a style="*position:relative;background:#29B966;color:#fff;padding:7px 15px;margin:0 5px;border:1px solid #26AB5E" class="refresh-ok" href="javascript:void(0)" onclick="tgzf()">确定</a><a style="*position:relative;background:#F5F5F5;color:#666;padding:7px 15px;margin:0 5px;border:1px solid #CCCCCC" class="close-win" href="javascript:void(0)">取消</a></div>
				</div>
		</div>
		<input type="hidden" name="tgid" id="tgid" value="">
		<input type="hidden" name="paytype" id="paytype" value="1">
		<input type="hidden" name="payday" id="payday" value="1">
</form>
<div style="display:none;width:390px;height:200px; position:absolute;left:50%;top:300px;margin-left:-85px;-moz-box-shadow: 0 0 34px #cacaca;-webkit-box-shadow: 0 0 34px #cacaca;box-shadow: 0 0 34px #cacaca; z-index:9999" id="pop_win_02" class="pop_win">
		<div style="height:40px;background:#FF8400" class="hd">
				<h2 style="font-size:14px;color:#fff;font-weight:800; position:absolute;left:10px;top:10px">提示</h2>
				<a style="display:block;width:30px;height:30px;background:url(<?php echo USER_CENTER;?>images/pop-ico.gif) 0 -80px no-repeat; position:absolute;right:10px;top:6px; text-indent:-999px; overflow:hidden" class="close-win" href="javascript:void(0)">关闭</a></div>
		<div style="background:#fff;height:160px" class="bd">
				<div style="width:70px;height:80px;background:url(<?php echo USER_CENTER;?>images/pop-ico.gif) no-repeat -2px -113px; position:absolute;left:70px;top:60px"></div>
				<p style="position:absolute;left:140px;top:85px;font-size:14px" id="pop_text02">您今日没有刷新次数了！</p>
				<div style="text-align:center;position:absolute;top:155px;width:100%;"><a style="*position:relative;background:#29B966;color:#fff;padding:7px 15px;margin:0 5px;border:1px solid #26AB5E" class="refresh-ok"  date-num="0" id="pop_sure02" >付费刷新</a><a style="*position:relative;background:#F5F5F5;color:#666;padding:7px 15px;margin:0 5px;border:1px solid #CCCCCC" class="close-win" href="javascript:void(0)">取消</a></div>
		</div>
</div>
<!--弹窗-->
<div class="cover"></div>
<div class="pop sucpop" style="display: none;">
    <div class="tit shiming"><span onclick="HidePop1('pop')"></span></div>
    <div class="popwap cf">
        <!--<p>只有实名认证用户可发布多条房源</p>-->
                <p class="f14 col_111111 font_bold">只有实名认证用户可使用一键再发布，您也可以<a class="word-orange" style="color: #ec6c00;" target="_blank" href="<?php echo $publishUrlSell;?>">重新发布房源>></a></p>

        <div class="cf sucewm clearfix">
            <div class="sucewml_new">
                <div class="sucewml_new_pic">
                    <img src="<?php echo $imgUrl;?>" />
                </div>
                <div class="mt20">
                    <div class="f14 col_333333 h16 lh16">扫码 <span class="col_ec6c00">下载淘房APP</span></div>
                    <div class="f14 col_333333 h16 lh16 mt10">后完成<span class="col_ec6c00">实名认证</span></div>
<!--                    <div class="h16 lh16 mt15">-->
<!--                        <a class="col_2760c7" style="color: #2760c7;" target="_blank" href="http://app.house365.com">下载淘房APP>></a>-->
<!--                    </div>-->
                </div>
            </div>

            <div class="sucewmr_new">
                <div class="sucewmr_new_pic fl">
                    <img src="<?php echo $imgUrlbg1;?>" />
                </div>
                <div class="sucewmr_new_pic fr">
                    <img src="<?php echo $imgUrlbg2;?>" />
                </div>
            </div>
        </div>
    </div>
</div>
<!--2018 10 17 再发布限制弹框 end-->

<?php
if($isa_website!=''){
?>
<script type="text/javascript">
	var isa_website = "<?=$isa_website?>";
	var isa_city = "<?=$isa_city?>";
	var isa_addones = "<?=$isa_addones?>";

	var _analyze365 = (('https:' == document.location.protocol) ? ' https://': ' http://');
	document.write(unescape('%3Cscript src="'+ _analyze365 + '<?=$isa_url?>" type="text/javascript"%3E%3C/script%3E'));
</script>
<?php
}
?>
<script type='text/javascript'>
	var website="2";
    var ga_city = "<?=$isa_city?>";
    var ga_channel = 'center';
    var ga_page= "/个人中心/我要出售";
</script>
<script language="javascript" src="http://stat.house365.com/365count.js"></script>
<?php require APPPATH_MVC.'views/footer.php'; ?>

<?php if(GB_CITY=='nj' || GB_CITY=='hf'){?>
<!---微信活动js-->
<script type="text/javascript">
$(function(){

  

     $(".wx_share_c").mouseover(function(e){ 
     	$("#weixin_qrcode").css({ 
              "top" :e.pageY+ "px", 
              "left" :e.pageX + "px" ,
              "display":"block"
});   }); 

$(".wx_share_c").mouseout(function(){ 
$("#weixin_qrcode").css({ "display":"none" });

	

     })


	
 })
</script>
<?php } ?>

<script>
	var submitSurveyHouseID = 0;
	$(document).ready(function(){
		var buttonSurvey = $('.pros');
		var closePOP = $('.close-win');
		var pop = $('.pop');
		var isSurvey = $('#pros');
		var surveySuccess = $('#prossuc');
		var submitSurvey = $('#submitSurvey');
		var buttonSurveyClose = $('#survey_close');
		closePOP.on('click', function(){
			pop.hide();
		});
		buttonSurvey.on('click', function(){
			submitSurveyHouseID = $(this).attr('data-id');

			var city = '<?php echo GB_CITY; ?>';
			if(city == 'nj'){
                isSurvey.show();
            }else if(city == 'wh'){
                showPop('survey','sell',submitSurveyHouseID)
            }
		});
		submitSurvey.on('click', function(){
			$.ajax({
				url: 'http://<?php echo GB_CITY; ?>.publish.house365.com/survey.php',
				type: 'get',
				dataType: 'jsonp',
				jsonp: 'callback',
				data: {
					action: 'applyJSONP',
					from: '1',
					id: submitSurveyHouseID
				},
				error: function () {
					alert('网络错误，请重试！');
				},
				success: function (result) {
					if (result !== '1') {
						alert(result);
						return;
					}
					isSurvey.hide();
					surveySuccess.show();
				}
			});
		});
		buttonSurveyClose.on('click', function(){
			window.location.reload();
		});
	});
</script>