<!--标签零售样式-->
<style>
#asideBox .bq1 { background: url("http://esf.s.house365.com/zsb/images/v1.0/bq_sprites.png") no-repeat 0 -138px ;}
#asideBox .on .bq1{ background: url("http://esf.s.house365.com/zsb/images/v1.0/bq_sprites.png") no-repeat 0 0 ;}
.bq-record{border-collapse: collapse; border-spacing: 0;table-layout: fixed;margin:20px 10px;}
.bq-record td,.bq-record th{border: solid 1px #d9d9d9; padding: 3px;text-align: center;height: 30px;width: 5%;}
.bq-record th{color:#333;background-color: #ebebeb;}
.bq-record td{color: #333;}
</style>
<!--标签零售样式结束-->

<!---->

<!--  2016-1-14 添加星级样式 -------start------- -->
<style>
.scoreStatisticalIndex{
    height: 16px;
    margin-top: 2px;
    margin-bottom: 1px;
}
.scoreStatisticalIndex .star_level{
    display: inline-block;width: 16px;
    height: 16px;background: url("http://esf.s.house365.com/zsb/images/v1.0/xing_add_2016_1_14.png") no-repeat 0px -29px;
}
.scoreStatisticalIndex .on{
    display: inline-block;width: 16px;
    height: 16px;background: url("http://esf.s.house365.com/zsb/images/v1.0/xing_add_2016_1_14.png") no-repeat 0px 0px;
}

.fl{
    float: left;
}
.yx_start_level{
    margin-right: 44px;float: left;
}
.yx_info_p{
    line-height: 21px;
}
.personalPInner .item .yx_info_p_wid{
    width: 261px;
}

.personalPInner .item .clorG{
    color: #52c06c;
}
.personalPInner .item .clorY_p{
    display: inline-block;
    line-height: 24px;
    *line-height:21px;
}
</style>

<!--  2016-1-14 添加星级样式 -------end------- -->
<div id="centre" class="layout">
	<div class="centreInner ">
		<div class="mainInner radius5 "> 
			<!---->
			<div class="belongBox belongBox_p radius5">
				<div class="personalPInner clearfix">
					<div class="photo radius5"> <a href="<?=$info['agent_url']?>" target="_blank" class="picLink"> <img alt="" src="<?= $broker['smallphoto'] ?>" width="75" height="100" /> </a></div>
					
					<!---->
					<div class="inner inner_p">
						<div class="nameBox"><span class="bold mr45">&nbsp;姓名：<span class="color1"><?= $info['truename'] ?></span></span></div>
						<div class="innerInfo">
							<div class="item clearfix">
                                <div class="scoreStatisticalIndex yx_start_level">
                                    <?php $starlevel =$broker_new_info[0]['starlevel'];?>
									<?php for ($i=0;$i<$starlevel;$i++){?>
										<span class="star_level on"></span>
									<?php }?>
									<?php for ($i=0;$i<5-$starlevel;$i++){?>
										<span class="star_level "></span>
									<?php }?>
                                </div>
                                <p class="info info_p yx_info_p"><a target="_blank" class="link_p" href="http://zsb.house365.com/help/nj/?p=546">如何提升星级？</a></p>
                            </div>
							<div class="item clearfix">
								<label class="label label_p">房&nbsp;&nbsp;&nbsp;豆：</label>
								<p class="info info_n"><span class="clorY clorY_p"><?= $info['credit'] ?></span></p>
                                                          
                                <p class="info info_p_auto"> <a href="<?=$payment_url?>"><img src="http://esf.s.house365.com/zsb/images/v1.0/chongzhi.png" alt="立即充值"></a>&nbsp;&nbsp;<a href="<?=$documentation['what_credit']?>" class="link_p" target="_blank">什么是房豆？</a>
                                                                    &nbsp;<a class="link" href="<?=$documentation['get_credit']?>" target="_blank">获取房豆说明</a></p>
							</div>
						</div>
					</div>
					<div class="clear clearZoom"></div>
                                        <!--未付费用户-->
                                        <?php if ($info['groupid'] != 1 ) {  $info['accout_manager'] = isset($info['accout_manager']) ? $info['accout_manager'] : '';
                                        $info['manager_tel'] = isset($info['manager_tel']) ? $info['manager_tel'] : '';
                                        ?>
					<div class="non-paying">
					<span class="ico">&nbsp;</span>
					<div class="radius5 inner">
						<div class="text">
							非常遗憾，只有付费用户才可以使用营销中心的服务哦！<br>
							如有需要，请联系您的客户经理：<span class="color"><?=$info['accout_manager']?> <?=$info['manager_tel']?></span> 办理开通付费套餐手续！
						</div>	
					</div>
					</div>
					<?php } ?>
                                        
                                        
				</div>
				
				<!----> 
				
			</div>
			<!---->
			<?php if ($info['groupid'] == 1 )  { ?>
			<div class="personal_title"><strong class="title">我参与的竞投</strong><span class="fg">|</span><span class="link_update">刷新战况</span></div>
			<div class="personalBox radius5">
				<table class="marketing_table_01 radius5" id="js_marketing_table_01">
					<tr class="bg">
						<th class="w80">竞投项目</th>
						<th class="w85">推广时间</th>
						<th class="w250">竞投对象</th>
						<th class="w80">投入分值</th>
						<th class="w120">竞投状态</th>
						<th class="w80">最高房豆</th>
						<th class="w80">最低房豆</th>
						<th class="last w90">操作</th>
					</tr>					
				</table>
                              <div class="nobidRecord" >
					<img src="http://esf.s.house365.com/zsb/images/v1.0/loader.gif" width="28" height="28">		
				</div>
				<div class="marketing_show_td" >
                                <div style="float:left;">
                                <span style="font-weight:bold;margin:0 0 0 20px;">温馨提示：</span>这里只保留了您最近参与的10条竞投记录哦！
                                <a href="/market_bid_block_expert/history/" style="color:#3887f2" target="_blank">查看全部小区专家竞投记录</a>
                                <a href="/market_bid_house_manage/history/" style="color:#3887f2;margin:0 0 0 15px;" target="_blank">查看全部房源竞投记录</a></div>
				<a href="javascript:void(0)" class="fun" id="js_show_td" onClick="show_td()">展开</a><a href="javascript:void(0)" class="fun fun2" id="js_hide_td" onClick="hide_td()">收起</a></div>
			    
                                
				
			</div>
                       <?php } ?>
			<!---->
			
		 <?=$my_privilege?>
			<!----> 
		</div>
	</div>
</div>
<!--脚部-->




<script type='text/javascript'>
     $(".time").each(function() {
		var x = $(this).text();
		if(x.length) {
			$(this).countdown({
				htmlTemplate: "<span class='num'>%d</span>天<span class='num'>%h</span>时<span class='num'>%i</span>分<span class='num'>%s</span>秒",
				date: x,
				yearsText:'年',
				monthsText:'月',
				daysText:'天',
				hoursText:'时',
				minutesText:'分',
				secondsText:'秒',
                                servertime:'<?php echo microtime(true)*1000;?>'
			});
		}
	})

	$(function() {
		$('.link_update').bind('click', function() {
			$('.nobidRecord').css('display', 'block');        
			$('.nobidRecord').html('<img src="http://esf.s.house365.com/zsb/images/v1.0/loader.gif" width="28" height="28">');
			$('#js_marketing_table_01 tr:gt(0)').remove();
			realBidRecord();
            hide_td();
		});
                
		function realBidRecord() {
			$('.marketing_show_td').css('display', 'none');
			$.ajax({
				type : "GET",
				url  : "/market_index/market_house_bid_action/",
				data : {'action' : 'realData'},
				success: function(data) {                                   
					var returnData = $.parseJSON(data);
                                        var arrData = returnData.info;
                                        var brokerBidStatus = returnData.status;
					if (brokerBidStatus!='attend') {
                                            if(brokerBidStatus=='bid_over'){
                                                $('.nobidRecord').html('很遗憾，您没有参与竞投。小房豆大惊喜，助您立马开单，下期竞投千万别错过啦！');
                                            }else if(brokerBidStatus == 'no_attend'){
                                                $('.nobidRecord').html('很遗憾，您没有参与竞投。小房豆大惊喜，助您立马开单，快去竞投吧！');
                                            }						
					} else {
						$('.nobidRecord').css('display', 'none');
						for(var i in arrData) {
							var lineClass = i % 2 == 0 ? '' : ' class = "bg"';
							var style = '';
							if (i > 4) {
								$('.marketing_show_td').css('display', 'block');
								style = ' style = "display:none;"';
							}
							var objCurrent = arrData[i];
							switch (objCurrent.behavior) {
								case 1:
									bidStatus = '<strong class="succeed">' 
											  + objCurrent.bDescription + '</strong>';
									break;
								case 2:
									bidStatus = '<strong class="failure">' 
											  + objCurrent.bDescription + '</strong>';
									break;
								case 4:
									bidStatus = objCurrent.bDescription;
									break;
								case 6:
									bidStatus = objCurrent.bDescription + ' 第 <strong class="num">' 
											  + objCurrent.rank + '</strong> 位</td>';
									break;
								default:
							}
							if (objCurrent.words) {
								words = objCurrent.words+'&nbsp;&nbsp;'+objCurrent.house_link;
							} else {
								words = '';
							}
                            if(objCurrent.content){
                                content= objCurrent.content;
                            }else{
                                content = '';
                            }
                            
                            if(objCurrent.house_status==false){
                                var bidRankUrl = '<span' + objCurrent.bidRankUrl+ '" style="color:#ccc;">去看看战况</span>';
                            }else{
                                var bidRankUrl = '<a href="' + objCurrent.bidRankUrl+ '" class="link">去看看战况</a>';
                            }
							$('#js_marketing_table_01').append(
								'<tr' + lineClass + style + '><td>' + objCurrent.projectname
								+ '</td><td>' + objCurrent.tg_start_time + '-' + objCurrent.tg_end_time + '</td>' 
								+ '<td>' +content + words + '</td><td>' + objCurrent.score 
								+  '</td><td>' + bidStatus + '</td><td>' 
								+ objCurrent.max_score + '</td><td>' + objCurrent.min_score+ '</td><td class="last">'+bidRankUrl+ '</td></tr>'
							);	
						}
					}
				}
			});
		}
		realBidRecord();
                

	});

</script>