<!--  2016-1-14 添加星级样式 -------start------- -->

<style>
    #asideBox .bq1 { background: url("<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/bq_sprites.png") no-repeat 0 -138px ;}
    #asideBox .on .bq1{ background: url("<?=STATIC_SOURCE_URL?>/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;}
    .scoreStatisticalIndex{
        height: 16px;
        margin-top: 2px;
        margin-bottom: 1px;
    }
    .scoreStatisticalIndex .star_level{
        display: inline-block;width: 16px;
        height: 16px;background: url("<?=STATIC_SOURCE_URL?>/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("<?=STATIC_SOURCE_URL?>/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;
    }
    .collect{
        color:black;
        font-weight:500;
        padding-left: 20px;
        font-size: 14px;
        margin-top: 6px;
    }
    .project{
        color:#F57C39;
    }
    .btnB{
        height: 27px;
        line-height: 27px;
        width: 74px;
        border: 1px solid #cd6010;
        font-size: 12px;
        font-family: \5B8B\4F53;
        font-weight: bold;
        margin: 14px;
    }
</style>

<!--  2016-1-14 添加星级样式 -------end------- -->

<div id="centre" class="layout">
    <div class="centreInner ">
        <div class="mainInner radius5 collect-con">
            <div class="belongBox belongBox_p radius5">
                <div class="personalPInner clearfix">
                    <p class="collect">申请专题：<span class="project"><?=$guideProjectInfo['project_title']?></span></p>
                    <p class="collect">房源要求：<span class="project"><?=$guideProjectInfo['project_house_standard']?></span></p>
                    <p class="collect">征集时间：<span class="project"><?=$guideProjectInfo['project_solicitation_start']?> - <?=$guideProjectInfo['project_solicitation_end']?></span></p>

                </div>

            </div>
            <div class="belongBox belongBox_p radius5 collect-wap">
                <div class="personalPInner clearfix">
                    <div class="titleTabBox">
                        <div class="titleTab">
                            <div class="titleTabB clearfix">
                                <dl class="list">
                                    <p style="font-size: 14px;margin: 10px;">请选择放心看房源</p>
                                </dl>
                            </div>
                        </div>
                    </div>

                    <div class="cf collect-read">
                        <?=form_open(uri_string(),array('method'=>'POST','name'=>'search_form'))?>
                        <div class="branchCommon branchCommon_pay radius5 ">
                            <div class="hd">
                                <table class="tableExpert">
                                    <tbody>
                                    <tr>
                                        <td class="td " width="80">
                                            <div class="">房源编号</div>
                                        </td>
                                        <td class="td"width="100">
                                            <div class="">小区名称</div>
                                        </td>
                                        <td class="td"width="140">
                                            <div class="">房源详情</div>
                                        </td>
                                        <td class="td "width="80">
                                            <div class="">操作</div>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>

                            <div class="mod">
                                <?php if($real_house_info){?>
                                <table class="tableExpert tableExpert_no">
                                    <!--无记录-->
                                    <tbody>
                                    <?php foreach ($real_house_info as $key=>$value){?>
                                    <tr>
                                        <td class="td"width="80">
                                            <div class="">
                                                <a href="http://nj.sell.house365.com/s_<?php echo $value['id'];?>.html" target="_blank" style="color:blue;"><?php echo $value['id'];?></a>
                                            </div>
                                        </td>
                                        <td class="td"width="100">
                                            <div class="">
                                                <?php echo $value['blockname'];?>
                                            </div>
                                        </td>
                                        <td class="td"width="140">
                                            <div class="">
                                                <?php echo $value['houseInfo'];?>
                                            </div>
                                        </td>
                                        <td class="td"width="80">
                                            <div class="apply">
                                                <?php if($value['is_apply']==1){?>
                                                    已申请
                                                <?php }else{ ?>
                                                <input type="checkbox" style="height:20px;width: 20px;" class="btn autoBtn btnCon" value="<?=$value['id']?>" >
                                                <?php } ?>
                                            </div>
                                        </td>
                                    </tr>
                                    <?php }?>
                                    </tbody>
                                </table>
                                    <div class="btnFBbox">
                                        <a href="javascript:void(0);"><span class="btnB btnSubmit" id="apply">立即申请</span></a>
                                        <a href="/guide_project/">
                                            <span class="btnB btnSubmit" style="color: white;">返回</span>
                                        </a>
                                    </div>
                                <?php }else{ ?>
                                    <div style="text-align:center;font-size: 14px;">当前无放心看房源</div>
                                <?php }?>
                            </div>

                        </div>
                        <!--翻页-->
                        <?php if (!empty($pagination)) { ?>
                            <div class="picPreviewPagBox">
                                <div class="picPreviewPag">
                                    <?php echo $pagination; ?>
                                </div>
                                <input type='hidden' name='page' value='1'>
                            </div>
                        <?php } ?>
                        <!--结束-->
                        <?=form_close()?>
                    </div>

                </div>

            </div>
        </div>

    </div>
</div>
<div class="dialog radius5" id="jsDialog_13_32" >
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span class="close close-win" title="关闭">Χ</span> </div>
    <div class="mod">
        <div class="text">
            申请成功
        </div>
        <div style="text-align:center; padding-top:8px;">
            <a href="/guide_project/guide_apply?guide_project_id=<?=$guideProjectInfo['id']?>" class="btn savePrjoect btnConColor radius5" >确定</a>
        </div>
    </div>
</div>
<div class="dialog radius5" id="jsDialog_13_31" >
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span class="close close-win" title="关闭">Χ</span> </div>
    <div class="mod">
        <div class="text">
            每个专题只能申请显示三套房源
        </div>
        <div style="text-align:center; padding-top:8px;"></div>
    </div>
</div>
<script>
    $(function () {
        $('#apply').on('click',function () {
            var ApplyNum = <?=$ApplyNum?>;
            if(ApplyNum >= 3){
                $('.text').html('每个专题只能申请显示三套房源');
                openWin("jsDialog_13_31");return false;
            }
            var valArr = new Array;
            $(".apply input[type='checkbox']:checked").each(function (i) {
                valArr[i] = $(this).val();
            });
            if(valArr.length <= 0){
                $('.text').html('请先选择合适的房源');
                openWin("jsDialog_13_31");
            }else if(valArr.length > 3){
                $('.text').html('每个专题只能申请显示三套房源');
                openWin("jsDialog_13_31");
            }else{
			    var guide_project_id = <?=$guideProjectInfo['id']?>;
                var vals = valArr.join(',');
                $.ajax({
                    'url'  :'/guide_project/judge_guide_apply'
                    ,'type':'post'
                    ,'data': {guide_project_id:guide_project_id,select_id:vals}
                    ,'dataType' : 'json'
                    ,success:function (data) {
                        if(data.code == 1){
                            $('.text').html(data.msg);
                            openWin("jsDialog_13_32");
                        }else{
                            $('.text').html(data.msg);
                            openWin("jsDialog_13_31");
                        }
                    }
                })
            }
        })
    })
</script>
