<?php
use yii\web\View;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
$this->title ='Lucky Draw';
?>

<div class="wrapper-bg"></div>
<nav class="navbar navbar-main">
    <div class="container-fluid">
        <div class="logo">
            <a href="index.php">
                <img src="<?=Yii::$app->urlManager->baseUrl?>/files/images/alahlia-logo.png" alt="Al Ahlia Logo"
                /></a>
        </div>
        <div class="national-logo">
            <img src="<?=Yii::$app->urlManager->baseUrl?>/files/images/national-day.png" alt="50th National Day" />
            <div class="glow glow-01">
                <img src="<?=Yii::$app->urlManager->baseUrl?>/files/images/logo-glow.png" alt="Glow" />
            </div>
            <div class="glow glow-02">
                <img src="<?=Yii::$app->urlManager->baseUrl?>/files/images/logo-glow.png" alt="Glow" />
            </div>
        </div>
    </div>
</nav>
<main class="content-sec">
    <div class="container">
        <div class="row">
            <div class="col-12">
           <!-- <p><h3 style=color:white>PRIZE</h3><br></p>-->
               
                <?php
                $count = 1;
                foreach($prizes as $prize){?>

                <?php  if ($count%3 == 1)
                {  ?>
                <div class="branch-cover">
                <?php } ?>

                <?php if($prize->draw_status=='1'){?>
                <?php if($prize->id==1||$prize->id==2||$prize->id==3){?>
                    <a href="<?=Yii::$app->urlManager->createUrl(['site/lucky-draw', 'id' => Yii::$app->basic->simple_crypt($prize->id,'e') ])?>" class="branch-item">
              <?php }else{?>
                <a href="<?=Yii::$app->urlManager->createUrl(['site/lucky-draw-multiple', 'id' => Yii::$app->basic->simple_crypt($prize->id,'e') ])?>" class="branch-item">
              <?php }?>
                <?php } else { ?>    
                    <a  href="#" class="branch-item is-deactive">
                <?php }?>
                    <div class="btn-glow">
                            <img src="<?=Yii::$app->urlManager->baseUrl?>/files/images/button-glow.png" alt="Glow" />
                        </div>
                        <?=$prize->name?><br>(<?=$prize->draw_status=='1' ? $prize->current_qty :'0'?>)
                    </a>
                <?php  if ($count%3 == 0)
                {  ?>
                </div>
                  <?php }?>
                <?php  $count++; }?>
            </div>
            
        </div>
    </div>
</main>
<a href="javascript:;" id="return-top" class="return-top"
><span><img src="<?=Yii::$app->urlManager->baseUrl?>/files/images/up-icon.svg" alt="Up" /></span
></a>