<div class="c-band d-flex justify-content-between">
    <p class="c-band__title"><?php echo e($title); ?></p>
    <?php if(isset($save_lot)): ?>
        <?php if(is_null($article->sale_no)): ?>
    <!--<div class="">
        <a href="javascript:void(0);" class="c-band__lot__btn">この物件を分譲地登録する</a>
    </div>-->
        <?php endif; ?>
    <?php endif; ?>
    <?php if(isset($conf_url) && $conf_url != ""): ?>
    <!--<div class="">
        <a href="http://micnavi.jp<?php echo e($conf_url); ?>" class="site_reference" target="_blank">サイトを確認</a>
    </div>-->
    <?php endif; ?>
    <?php if(strstr($_SERVER["REQUEST_URI"],'registImage') and isset($article->building_id)): ?>
    <?php if($disp_flag == 1): ?>
    <a href="/business/for-sale/detail/<?php echo e($article->building_id); ?>" class="band__link" target="_blank">住まいの情報DB「物件詳細ページ」を見る</a>
    <?php elseif($disp_flag == 2): ?>
    <a href="/business/mansion/parentDetail/<?php echo e($article->building_id); ?>" class="band__link" target="_blank">住まいの情報DB「マンション建物ページ」を見る</a>
    <?php elseif($disp_flag == 3): ?>
    <a href="/business/lot/parentDetail/<?php echo e($article->building_id); ?>" class="band__link" target="_blank">住まいの情報DB「分譲地ページ」を見る</a>
    <?php endif; ?>
    <?php endif; ?>
    <?php if(!empty($public_portal[0])): ?>
        <div class="portal-public-info d-flex float-right justify-content-center mr-1">
            <label class="label-public">ポータル（<?php echo e($public_portal[0]->created_at ? date( 'Y.m.d/H:i', strtotime($public_portal[0]->created_at)) : ''); ?>）</label>
            <ul>
                <?php
                    $pl_suumo = $pl_homes = $pl_athome = '';
                    foreach($public_portal as $pl){
                        if($pl->type == 1){
                            $pl_suumo = $pl;
                        }
                        if($pl->type == 2){
                            $pl_homes = $pl;
                        }
                        if($pl->type == 3){
                            $pl_athome = $pl;
                        }
                    }
                    $suumo_text = $homes_text = $athome_text = '';
                    if(!empty($pl_suumo)){
                        $suumo_text = '非掲載';
                        if($pl_suumo->status == 1){
                            $suumo_text = 'ネットコマ';
                        }
                        if($pl_suumo->status == 2){
                            $suumo_text = 'レポート';
                        }
                    }
                    if(!empty($pl_homes)){
                        $homes_text = "非掲載";
                        if($pl_homes->status == 1){
                            $homes_text = "掲載";
                        }
                    }
                    if(!empty($pl_athome)){
                        $athome_text = '非公開';
                        if($pl_athome->status == 1){
                            $athome_text = '会員間';
                        }
                        if($pl_athome->status == 2){
                            $athome_text = '会員一般向';
                        }
                        if($pl_athome->status == 3){
                            $athome_text = '一般向';
                        }
                    }
                ?>
                <?php if(!empty($store_user->suumo_id) && !empty($store_user->suumo_pw)): ?>
                    <li class="suumo_color"><?php if($suumo_text != ''): ?>
                            <?php if(!empty($pl_suumo) && $pl_suumo->status == 0): ?>
                                <img src="/admin/img/suumo-icon-o8.png" width="18" alt="">
                            <?php else: ?>
                                <img src="/admin/img/suumo-icon.png" width="18" alt="">
                            <?php endif; ?> <?php echo $suumo_text == '非掲載' ? '<span class="text-white">'.$suumo_text.'</span>' : $suumo_text ?> <?php endif; ?></li>
                <?php endif; ?>
                <?php if(!empty($store_user->homes_id) && !empty($store_user->homes_pw)): ?>
                    <li class="homes_color"><?php if($homes_text != ''): ?>
                            <?php if(!empty($pl_homes) && $pl_homes->status == 0): ?>
                                <img src="/admin/img/homes-icon-o8.png" width="18" alt="">
                            <?php else: ?>
                                <img src="/admin/img/homes-icon.png" width="18" alt="">
                            <?php endif; ?> <?php echo $homes_text == '非掲載' ? '<span class="text-white">'.$homes_text.'</span>' : $homes_text ?> <?php endif; ?></li>
                <?php endif; ?>
                <?php if(!empty($store_user->athome_id) && !empty($store_user->athome_pw)): ?>
                    <li class="athome_color"><?php if($athome_text != ''): ?>
                            <?php if(!empty($pl_athome) && $pl_athome->status == 0): ?>
                                <img src="/admin/img/athome-icon-o8.png" width="18" alt="">
                            <?php else: ?>
                                <img src="/admin/img/athome-icon.png" width="18" alt="">
                            <?php endif; ?> <?php echo $athome_text == '非公開' ? '<span class="text-white">'.$athome_text.'</span>' : $athome_text ?> <?php endif; ?></li>
                <?php endif; ?>
            </ul>
        </div>
    <?php endif; ?>
</div>
<script>
    $(document).ready(function () {

        $(".cal_picker").datepicker({
            format: "yyyy/mm/dd",
            locale: 'ja',
            language: 'ja',
            weekStart: 1,
            todayHighlight: true,
            autoclose: true,
        });

    })
</script>
