<?php

 Yii::app()->setLanguage(isset(Yii::app()->session['lang']) ? Yii::app()->session['lang'] : 'ar'); 
 $lang=Yii::app()->getLanguage();

 
?>
<section class="questionnaireAll">
    <section class="joinUs-section1">
        <div class="container">
		 <div class="row">
                <div class="col-sm-offset-1 col-sm-10 col-xs-offset-0 col-xs-12">
                
                </div>
            </div>
            <div class="row">
                <div class="col-sm-offset-1 col-sm-10 col-xs-offset-0 col-xs-12">
                    <h1 class="page-title"><?php echo ($lang=='en'?'Questionnaires':'الاستبيانات');?>
                    </h1>
                </div>
            </div>
  
             <div class="row">              
                 <?php $questionnaires=Questionnaire::model()->findAll();
                 if(!empty($questionnaires))
                 {
                   foreach($questionnaires as $questionnaire)
                   {
                     if($questionnaire->end_datetime >= date("Y-m-d") && $questionnaire->featured == 1 )
                   {
                  ?>
                <div class=" col-sm-4  col-xs-12 questionnaireAll-card">
                    <a href="<?php echo Yii::app()->request->baseUrl.'/site/questionnaire/'.$questionnaire->id ?>">  
                <div class="col-xs-8 questionnaireAll-center">
                    <h2 class="questionnaireAll-text text-center"><?php echo ($lang=='ar'?$questionnaire->title:$questionnaire->title_en) ?>                   
                    </h2>
                </div>  
                </a>
            </div>
              <?php } }}?>
            
</div>
        </div> 
    </section>
</section>


