<?php
/**
 * 我的特权模板
 */

if($this->config->item('is_my_prerogative') !== 0):
?>
<div class="personal_title"><strong class="title">我的特权</strong><!--<span class="sata">我已有2项特权</span><a href="#" class="link">查看更多特权</a>--></div>
<div class="personalBox radius5">
    <div class="personal_privilege personal_privilege02">
        <?php foreach ($privilege as $value) { ?>
            <div class="item">
                <div class="icoBox">
                        <div class="ico"><img class="img" style="width: 111px;height: 111px;" src="<?= STATIC_SOURCE_URL ?>/zsb/images/v1.0/<?=$value['img']?>" ></div>
                    <p class="tex1"><?=$value['name']?></p>
                    <?php if(!$value['theme']){?>
                        <p class="tex2"><strong class="color2"><?=$value['using']?></strong>人已使用</p>
                    <?php }?>
                </div>
                <div class="info">
                    <div class="texBox <?php  if($value['show_time']!=1){ echo 'texBox02';}; ?> "><?=$value['intro']?></div>
                      <?php if($value['show_time']==1){?>
                    		<div class="timeBox">
                                 <?php  if(isset($value['perioids'])){ ?>
                                <?php
                               
                                        $countDown = '';
                                        if ($value['perioids']['status'] == 1) { 
                                                echo '<p class="title">本期竞投正在进行 </p>';
                                                $nextStart = date("F d,Y H:i:s", strtotime($value['perioids']['end_time']));
                                                $countDown = '<span class="color_p">离结束：</span><span class="time"> ' . $nextStart .' </span>';

                                        } else if ($value['perioids']['status'] == 3) {
                                                echo '<p class="title">本期竞投已结束</p>';
                                                $countDown = '<span class="color_p">结束时间：</span><span class=""> '
                                                                   . date("Y年m月d日 H时i分", strtotime($value['perioids']['end_time'])) .' </span>';
                                        } else { 		
                                                $nextStart = $value['perioids']['start_time'];
                                                echo '<p class="title">上期竞投已结束</p>';
                                                $countDown = '<span class="color_p">离下期开始：</span><span class="time"> '
                                                                   . date("F d,Y H:i:s", strtotime($nextStart)) .' </span>';
                                       } ?>
                                        <div class="show_p"><?=$countDown?>
                                     
                                        </div>
                                <?php }?> 
                                    </div>
                      <?php }?>
                    <?php if($value['levelnoenough']==1){?>
                       <div><a href="javascript:void(0)" class="btn btnColor_p_no btnColor_p_no_w150 radius5">等级不够</a> <a class="sj_link" href="<?=$value['btn']['link']?>" target="_blank">升级攻略</a></div>
                    <?php }else{?>                 
                    <div> <a href="<?=$value['btn']['link']?>" <?php if($value['allow']){ echo 'target="_blank"'; } ?>  class="btn <?=$value['btn']['class']?> radius5"><?=$value['btn']['text']?></a> </div>
                    <?php }?>
                    
               
                </div>
            </div>
        <?php } ?>
        <!---->
        

        <!----->
    </div>
</div>

<?php endif; ?>