Your IP : 216.73.216.79


Current Path : /var/www/html/ekursusv2/frontend/runtime/frontendpage/
Upload File :
Current File : /var/www/html/ekursusv2/frontend/runtime/frontendpage/81_1720539043069660600-content-251.php

<?php 
/*** CONTENT_ID-251***/
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use backend\modules\contentPhoto\models\ContentPhotoGallery;

echo '
<style>
.widget-search input {
    border:1px solid #aaa;
}
.pagination > li > a, .pagination > li > span {
    border:1px solid #aaa;
}
.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover {
    border:1px solid #02536A;
}
</style>
<div class="col-lg-3" style="border-left: 1px dashed #aaa;padding-left: 30px;">';

//SEARCH
$form = ActiveForm::begin(['action' => ['portal-main/photo-gallery-list'], 'method' => 'get',]);
echo '<div class="sidebar-widget">
    <h6 class="mb-20">Carian</h6>
    <div class="widget-search">
        <i class="fa fa-search"></i>
        '.Html::input('text','search_keyword',Yii::$app->getRequest()->getQueryParam('search_keyword'), $options=['class'=>'form-control','placeholder'=>'Kata kunci']).'
        
    </div>
</div>';
ActiveForm::end(); 

//LATEST
echo '<div class="sidebar-widget">
    <h6 class="mt-50 mb-20">Aktiviti Terkini </h6>';
    
$modellatest = ContentPhotoGallery::find()->where(['=','gallery_main','1'])->andwhere(['=','gallery_status','active'])->orderBy(['gallery_date' => SORT_DESC])->limit(3)->all();
if (!empty($modellatest)) {
    foreach ($modellatest as $rowlatest) {
        $gallery_date = date("j", strtotime($rowlatest->gallery_date)).' '.Yii::t('app', date("F", strtotime($rowlatest->gallery_date))).' '.date("Y", strtotime($rowlatest->gallery_date));
        echo '<div class="recent-post clearfix">
            <div class="recent-post-image"><img class="img-fluid" src="'.$baseUrl.'/uploads/photo-gallery/'.$rowlatest->gallery_thumbnail.'" alt=""></div>
            <div class="recent-post-info">
                <a href="'.$baseUrl.'/portal-main/photo-gallery-details?id='.$rowlatest->gallery_code.'">'.$rowlatest->gallery_title.'</a>
                <span><i class="fa fa-calendar-o"></i> '.$gallery_date.'</span>
            </div>
        </div>';    
    }
}
echo '</div>';

//categories
echo '<div class="sidebar-widget">
    <h6 class="mt-50 mb-10">Kategori </h6>
     <ul class="widget-categories">';
$modelCategory = \backend\modules\refdynawebv2\models\Ref::find()->where(['cat' => 'GALLERYCAT'])->orderBy(['descr' => SORT_ASC])->all();
if (!empty($modelCategory)) {
    foreach ($modelCategory as $rowCategory) {
        echo '<li><a href="'.$baseUrl.'/portal-main/photo-gallery-list?category='.$rowCategory->code.'"><i class="fa fa-angle-double-right"></i> '.$rowCategory->descr.'</a></li>';
    }
}
echo '</ul></div>';
                
echo '</div>';
?>