<div id="centre" class="layout">
    <div class="broadCentre radius5">
        <div class="hd">
            <h3 class="h3">设置预约刷新</h3>
            <p class="more"><a class="link" href="<?php echo $documentation['refresh_project'];?>" target="_blank">使用说明&gt;&gt;</a></p>
        </div>
        <div class="mod">
            <div class="renovateFunBox">
                <form action="/reserve_zhou/project_house_set_action/" id="project_form" name="project_form" method="post">
                    <div class="forms radius5">
                        <dl class="list">
                            <dd class="list_item clearfix">
                                <label class="label">已有方案：</label>
                                <div class="fields nameInput ">
                                    <div class="fgInput jsFgInput">
                                        <div class="imitateSelect">
                                            <label class="labelImitate"><?php echo $project_name;?></label>
                                            <input type="text" name="project_name" class="imitate imitateIe" readonly />
                                            <div class="listImitate">
                                                <dl class="inner">
                                                    <?php foreach($project_arr as $key=>$val){ ?>
                                                    <dd><a class="link" href="/reserve/project_house_set/<?php echo $val['id'];?>/"><?php echo $val['name'];?></a></dd>
                                                    <?php  } ?>
                                                </dl>
                                            </div>
                                        </div>
                                    </div>
                                    <?php if($project_num < $project_max_num){ ?>
                                    <div class="fgInput renovateItem"> <a href="/reserve/project_new/add/" class="btn btn2 btnCon radius5">新建方案</a> </div>
                                    <?php } ?>
                                    <div class="fgInput textFgErroy"></div>
                                </div>
                            </dd>
                            <!---->
                            <dd class="list_item clearfix">
                                <label class="label">方案时间：</label>
                                <div class="fields"> &nbsp; </div>
                            </dd>
                        </dl>
                        <div class="renovateFunTime renovateFunTimeNone clearfix" >
                            <div class="hourBox clearfix">
                                <div class="name">小时</div>
                                <div class="time hour">
                                    <dl>
                                        <dd class="first"><a oid="05" <?php if(isset($ptime_arr['05']) && $ptime_arr['05']){ ?>class="on"<?php } ?> href="#">05</a></dd>
                                        <dd><a oid="06" <?php if(isset($ptime_arr['06']) && $ptime_arr['06']){ ?>class="on"<?php } ?> href="#">06</a></dd>
                                        <dd><a oid="07" <?php if(isset($ptime_arr['07']) && $ptime_arr['07']){ ?>class="on"<?php } ?> href="#">07</a></dd>
                                        <dd><a oid="08" <?php if(isset($ptime_arr['08']) && $ptime_arr['08']){ ?>class="on"<?php } ?> href="#">08</a></dd>
                                        <dd><a oid="09" <?php if(isset($ptime_arr['09']) && $ptime_arr['09']){ ?>class="on"<?php } ?> href="#">09</a></dd>
                                        <dd><a oid="10" <?php if(isset($ptime_arr['10']) && $ptime_arr['10']){ ?>class="on"<?php } ?> href="#">10</a></dd>
                                        <dd><a oid="11" <?php if(isset($ptime_arr['11']) && $ptime_arr['11']){ ?>class="on"<?php } ?> href="#">11</a></dd>
                                        <dd><a oid="12" <?php if(isset($ptime_arr['12']) && $ptime_arr['12']){ ?>class="on"<?php } ?> href="#">12</a></dd>
                                        <dd><a oid="13" <?php if(isset($ptime_arr['13']) && $ptime_arr['13']){ ?>class="on"<?php } ?> href="#">13</a></dd>
                                        <dd><a oid="14" <?php if(isset($ptime_arr['14']) && $ptime_arr['14']){ ?>class="on"<?php } ?> href="#">14</a></dd>
                                        <dd><a oid="15" <?php if(isset($ptime_arr['15']) && $ptime_arr['15']){ ?>class="on"<?php } ?> href="#">15</a></dd>
                                        <dd><a oid="16" <?php if(isset($ptime_arr['16']) && $ptime_arr['16']){ ?>class="on"<?php } ?> href="#">16</a></dd>
                                        <dd><a oid="17" <?php if(isset($ptime_arr['17']) && $ptime_arr['17']){ ?>class="on"<?php } ?> href="#">17</a></dd>
                                        <dd><a oid="18" <?php if(isset($ptime_arr['18']) && $ptime_arr['18']){ ?>class="on"<?php } ?> href="#">18</a></dd>
                                        <dd><a oid="19" <?php if(isset($ptime_arr['19']) && $ptime_arr['19']){ ?>class="on"<?php } ?> href="#">19</a></dd>
                                        <dd><a oid="20" <?php if(isset($ptime_arr['20']) && $ptime_arr['20']){ ?>class="on"<?php } ?> href="#">20</a></dd>
                                        <dd><a oid="21" <?php if(isset($ptime_arr['21']) && $ptime_arr['21']){ ?>class="on"<?php } ?> href="#">21</a></dd>
                                        <dd><a oid="22" <?php if(isset($ptime_arr['22']) && $ptime_arr['22']){ ?>class="on"<?php } ?> href="#">22</a></dd>
                                        <dd><a oid="23" <?php if(isset($ptime_arr['23']) &&  $ptime_arr['23']){ ?>class="on"<?php } ?> href="#">23</a></dd>
                                        <dd class="last"><a oid="24" <?php if(isset($ptime_arr['24']) &&  $ptime_arr['24']){ ?>class="on"<?php } ?> href="#">24</a></dd>
                                    </dl>
                                </div>
                            </div>
                            <!---->
                            <div class="minuteBox  clearfix " <?php if($project_times_num <= 0){ ?>style="display:none;"<?php } ?>>
                                <div class="name">分钟</div>
                                <div class="time minute">
                                    <?php if($project_times_num > 0){ ?>
                                    <?php foreach($ptime_arr as $key=>$val){ ?>
                                    <dl class="<?php echo $key;?>">
                                        <dt><?php echo $key;?></dt>
                                        <dd><a href="#" <?php if(isset($val['00']) &&  $val['00'] == '00'){ ?>class="on"<?php } ?>>00</a></dd>
                                        <dd class="mr49"><a href="#" <?php if(isset($val['05']) &&  $val['05'] == '05'){ ?>class="on"<?php } ?>>05</a></dd>
                                        <dd><a href="#" <?php if(isset($val['10']) &&  $val['10'] == '10'){ ?>class="on"<?php } ?>>10</a></dd>
                                        <dd><a href="#" <?php if(isset($val['15']) &&  $val['15'] == '15'){ ?>class="on"<?php } ?>>15</a></dd>
                                        <dd><a href="#" <?php if(isset($val['20']) &&  $val['20'] == '20'){ ?>class="on"<?php } ?>>20</a></dd>
                                        <dd class="mr50"><a href="#" <?php if(isset($val['25']) &&  $val['25'] == '25'){ ?>class="on"<?php } ?>>25</a></dd>
                                        <dd><a href="#" <?php if(isset($val['30']) &&  $val['30'] == '30'){ ?>class="on"<?php } ?>>30</a></dd>
                                        <dd><a href="#" <?php if(isset($val['35']) &&  $val['35'] == '35'){ ?>class="on"<?php } ?>>35</a></dd>
                                        <dd><a href="#" <?php if(isset($val['40']) &&  $val['40'] == '40'){ ?>class="on"<?php } ?>>40</a></dd>
                                        <dd class="mr49"><a href="#" <?php if(isset($val['45']) &&  $val['45'] == '45'){ ?>class="on"<?php } ?>>45</a></dd>
                                        <dd><a href="#" <?php if(isset($val['50']) &&  $val['50'] == '50'){ ?>class="on"<?php } ?>>50</a></dd>
                                        <dd class="mr0"><a href="#" <?php if(isset($val['55']) &&  $val['55'] == '55'){ ?>class="on"<?php } ?>>55</a></dd>
                                    </dl>
                                    <?php }} ?>
                                </div>
                            </div>
                            <!----> 
                        </div>
                    </div>
                    <div class="forms radius5 clearfix ">
                        <label class="label label2">预约房源</label>
                        <div class="fields">
                            <div class="fgInput tjNumendBox"> <p class="textFg textFg2">&nbsp;</p>当前已选择此预约刷新方案的房源条数：<span id="jsHouseNumber2" class="color"><?php echo $project_old_houses_num;?></span>条</div>
                        </div>
                        <div id="jsHouseBoxFunction2" class="houseBoxFunction clear">
                            <?php if( count($project_old_houses_arr) > 0){ ?>
                            <?php foreach($project_old_houses_arr as $val){ ?>
                            <div class="houseItem houseItem_info">
                                <div class="houseItemInner"> 
                                    <a href="<?php echo $val['houseinfo']['url'];?>" class="houseLink"> 
                                        <em class="jsCloseItem2 closeItem" title="删除" id="<?php echo $val['houseinfo']['tbl'].$val['houseinfo']['rowid'];?>">关闭</em> 
                                        <span class="innr name"><?php echo $val['houseinfo']['blockshowname']; ?>
                                        <em style="font-weight:normal;margin-left:10px;">(<?php $nowtime = time(); echo ceil(($val['endtime']-$nowtime)/86400); ?>天)</em>
                                        </span> 
                                        <span class="innr">
                                        <?php echo $val['houseinfo']['room'];?>室<?php echo $val['houseinfo']['hall'];?>厅   
                                        <?php echo $val['houseinfo']['buildarea'];?>㎡  <?php echo $val['houseinfo']['price'];?><?php echo $val['houseinfo']['price_unit'];?>
                                       </span> 
                                    </a> 
                                </div>
								<input type="hidden" id="oldhouse_days" name="oldhouse_days" value="1">
                                <input type="hidden" name="oldhousearr[]" value="<?php echo $val['tbl']."-".$val['rowid']."-".$val['starttime']."-".$val['endtime'];?>" />
                            </div>
                            <?php }} ?>
                        </div>
                        <div id="jsPicDepotSZBtn2" class="picDepotSZ">
                            <p class="jsZK innerSZ">展开房源</p>
                            <p class="jsSQ innerSZ innerSZ2">收起房源</p>
                        </div>
                    </div>
                    <div class="forms radius5 clearfix"> 
                        <label class="label">选择天数：</label>
                        <div class="fields">
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate" id="jsToNumber_tmp">今天</label>
                                    <input type="text" name="project_day" class="imitate imitateIe" readonly />
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <?php for($i = 1 ; $i <= $project_times_max_days ; $i++){ 
                                                if(($i > 7 && $i < 14) || ($i > 14 && $i < 21))
                                                {
                                                    continue;
                                                }
                                            ?>
                                            <dd><a class="link" onClick="textNumToObj(this)" href="###" oid="<?php echo $i;?>"><?php echo $i == 1 ? '今':$i; ?>天</a></dd>
                                            <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput tjNumendBox"> 
                                本次预约房源条数：<span id="jsHouseNumber" class="color"><?php echo $project_houses_num;?></span>条<span class="f">|</span>
                                方案时间点：<span id="jsTimeNumber" class="color"><?php echo $project_times_num;?></span>个<span class="f">|</span>
                                预约天数：<span id="jsToNumber" class="color">1</span>天<span class="f">|</span>
                                每天使用刷新次数：<span class="color" id="jsTotalNumber"><?php echo $project_times_num;?></span>次</div>
                        </div>
                    </div>
                    <!---->

                    <div class="forms radius5 clearfix ">
                        <label class="label label2">预约房源</label>
                        <div id="jsHouseBoxFunction" class="houseBoxFunction clear">
                            <?php if( $project_houses_num > 0){ ?>
                            <?php foreach($project_houses_arr as $val){ ?>
                            <div class="houseItem houseItem_info">
                                <div class="houseItemInner"> 
                                    <a href="<?php echo $val['houseinfo']['url'];?>" class="houseLink"> 
                                        <em class="jsCloseItem closeItem" title="删除" id="<?php echo $val['houseinfo']['tbl'];?><?php echo $val['houseinfo']['rowid'];?>">关闭</em> 
                                        <span class="innr name"><?php echo $val['houseinfo']['blockshowname'];?></span> 
                                        <span class="innr"><?php echo $val['houseinfo']['room'];?>室<?php echo $val['houseinfo']['hall']?>厅   <?php echo $val['houseinfo']['buildarea']?>㎡  <?php echo $val['houseinfo']['price'];?><?php echo $val['houseinfo']['tbl'] == "sell" ? "万":"元"; ?>
                                        </span>
                                    </a> 
                                </div>
                                <input type="hidden" name="housearr[]" value="<?php echo $val['houseinfo']['rowid'];?>" />
                            </div>
                            <?php }} ?>
                        </div>
                        <div id="jsPicDepotSZBtn" class="picDepotSZ">
                            <p class="jsZK innerSZ">展开房源</p>
                            <p class="jsSQ innerSZ innerSZ2">收起房源</p>
                        </div>
                    </div>
                    <!---->
                    <div class="renovateFunBtn clearfix"> 
                        <a href="#save" class="btn setbutton btn2 btnConColor radius5">保存并应用</a>
                        <a href="<?php echo $set_tbl == 'sell' ? '/sell/manage/':'/rent/manage/';?>" class="btn btn3 btnCon radius5">返回房源管理</a></div>

                    <input type="hidden" name="action" id="formaction" value="set_house" />
                    <input type="hidden" name="pid" value="<?php echo $id;?>" />
                    <input type="hidden" name="house_tbl" value="<?php echo $set_tbl;?>" />
                    <input type="hidden" name="project_times" id="jaRenovateHourHide" value="<?php echo $project_times_str;?>"/>
                </form>
            </div>
        </div>
    </div>
</div>

<!--弹出层-->
<div id="jsDialog" 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"> </div>
    </div>
</div>


<!--弹出层-->
<div id="jsDialogDel" 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">确定将该房源从此预约刷新方案中删除？&nbsp;(保存后生效)</div>
        <div style="padding:20px 0 0 65px;"><a href="####" class="btn delhfp btnConColor radius5 close-win">确定</a><a href="####" class="btn btnCon radius5 close-win">取消</a><input type="hidden" id="delhfp_tex" value="" /></div>
    </div>
</div>

<!--弹出层-->
<div id="jsDialogDel2" 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">确定将该房源从此预约刷新方案中删除？&nbsp;(保存后生效)</div>
        <div style="padding:20px 0 0 65px;"><a href="####" class="btn delhfp2 btnConColor radius5 close-win">确定</a><a href="####" class="btn btnCon radius5 close-win">取消</a><input type="hidden" id="delhfp2_tex" value="" /></div>
    </div>
</div>

<!--弹出层-->
<div id="jsDialogSave" 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="dialogSaveDiv">确定保存该预约刷新方案？</div>
        <div style="padding:20px 0 0 65px;"><a href="####" class="btn savePrjoect btnConColor radius5 close-win">确定</a><a href="####" class="btn btnCon radius5 close-win">取消</a></div>
    </div>
</div>