<div class="se-pre-con"></div>
<div class="row">
    <div class="row3">
            <img src="<?php echo $MasterCategoryBanners['banner_path'];?>" style="width:100%"/>
    </div>
    <?php if (!empty($AppAccess[0]['user_id'])) {?>
    <?php //debug($MasterApps);?>
    <?php if (!empty($MasterApps[0])) {?>
    <?php //if($MasterApps !== ''){ 
        //if ($MasterApps !== []) {
        ?>
    <div class="col-md-12">
<!--        <div class="center">-->
            <div class="col-md-12">
                <div class="text-header center"><?php echo __('หมวดหมู่ - '.@$MasterCategories['cat_name_th']); ?></div>
                <div style="border-bottom: solid 5px #000;width: 80px;display: block;margin: auto;padding-top: 10px;"></div>
            <div class="tab-pane active" id="popularPosts">
                <ul class="simple-post-list">
                    <li>
                        <div class="row">
                                            <div class="col-xs-6">
                                                <a href="<?php echo $MasterApps[0]['app_url_path'];?>">
                                                    <?php if (empty($MasterApps[0]['app_img_path'])) { ?>
                                                    <?php echo $this->Html->image('/img/core/img/bloc-time-thumbs-back@3x.png',array('style' => 'width: 100%;-webkit-border-radius: 25px; -moz-border-radius: 25px; border-radius: 25px;'), ['alt' => '']); ?>
                                                    
                                                    <?php  }else{ ?>
                                                    <img src="<?php echo $MasterApps[0]['app_img_path']; ?>" style="width: 100%;/*height: 122px;*/ -webkit-border-radius: 25px; -moz-border-radius: 25px; border-radius: 25px;"/>
                                                    <?php }?>
                                                    <div class="promotion-title" style=" text-align: left;padding-top: 8px;"><?php echo $MasterApps[0]['app_name_th']; ?></div>
                                                    <div class="promotion-des" style="text-align: left;"><?php echo iconv_substr($MasterApps[0]['app_name_en'], 0, 25, "UTF-8") . " ..."; ?><?php //echo $MasterApps['article_detail'];  ?></div>
                                                </a>
                                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <style>
                .border-text{text-overflow: ellipsis;overflow: hidden;white-space: nowrap;}
            </style>

            <div style="border-radius: 0 0 4px 4px;
                 box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);
                 background-color: #FFF;
                 border: 1px solid #EEE;
                 border-top: 0;"></div>

<!--        </div>-->
    </div>
</div>
<?php  }else{ ?>
    <div class="col-md-12">
<!--        <div class="center">-->
            <div class="col-md-12">
                <div class="text-header center"><?php echo __('หมวดหมู่ - '.@$MasterCategories['cat_name_th']); ?></div>
                <div style="border-bottom: solid 5px #000;width: 80px;display: block;margin: auto;padding-top: 10px;"></div>
            <div class="tab-pane active" id="popularPosts">
                <ul class="simple-post-list">
                    <li>
                        <div class="row">
                                            <div class="col-xs-6">
                                                <a href="#">
                                                    <?php echo $this->Html->image('/img/core/img/bloc-plus@3x.png',array('style' => 'width: 100%;-webkit-border-radius: 25px; -moz-border-radius: 25px; border-radius: 25px;'), ['alt' => '']); ?>
                                                    
                                                    
                                                </a>
                                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <style>
                .border-text{text-overflow: ellipsis;overflow: hidden;white-space: nowrap;}
            </style>

            <div style="border-radius: 0 0 4px 4px;
                 box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);
                 background-color: #FFF;
                 border: 1px solid #EEE;
                 border-top: 0;"></div>

<!--        </div>-->
    </div>
</div>
<?php }?>
<?php }else{?>
<div class="text-header center"><?php echo 'ไม่สามารถเข้า BLOGS นี้ได้';?></div>
    <!--<div class="col-xs-6"><?php //echo 'User ของท่านไม่สามารถเข้า BLOGS นี้ได้';?></div>-->
                    
<?php } ?>
        <style>
        .no-js #loader { display: none;  }
        .js #loader { display: block; position: absolute; left: 100px; top: 0; }
        .se-pre-con {
                position: fixed;
                left: 0px;
                top: 0px;
                width: 100%;
                height: 100%;
                z-index: 9999;
                background: url(img/loader.gif) center no-repeat #fff;
        }
        </style>
            <style>
        .text-header{
            font-size:19px;color: #1c1c1c; padding: 10px 0px 0px 0px;
        }
        .text-cat{
            font-size:17px;color: #8d8d8d;
        }
    </style>
        <script>
                $(window).load(function() {
                        $(".se-pre-con").fadeOut("slow");;
                });
        </script>

