 <?php

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

 //$model=VideoCategory::model()->findAll(array('order'=>'id DESC'));
 
?>
<section class="videoCategories">
    <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'?'Video':'معرض الفيديو');?>
                       <!--انضم إلينا  -->
                    </h1>
                </div>
            </div>
             <div class="row">
                 <?php $model=VideoCategory::model()->findAll(array('order'=>'id DESC'));
                 if(!empty($model))
                 {
                     foreach($model as $cat){
                  ?>
                <div class=" col-sm-4  col-xs-12 video-cat-card">
                    <a href="<?php echo Yii::app()->request->baseUrl.'/site/Video?id='.$cat->id  ?>">  
                <div class="col-xs-8 video-cat-center">
                    <h2 class="video-cat-text text-center"><?php echo ($lang=='ar'?$cat->name_ar:$cat->name_en) ?>                   
                    </h2>
                </div>  
                </a>
            </div>
                     <?php } }?>
            
</div>
        </div> 
    </section>
</section>


