Esempio n. 1
0
<?php

/* @var $this yii\web\View */
use app\modules\admin\models\BImages;
use app\modules\admin\models\BSettings;
$this->title = 'Мужской спа-салон «Барон»';
$settings = BSettings::find()->where(['site' => 1])->one();
$this->registerMetaTag(['name' => 'keywords', 'content' => $settings->keywords]);
$this->registerMetaTag(['name' => 'description', 'content' => $settings->description]);
?>
<!--Content-->
<div id="content" class="clearfix">
	<section id="main_page">
		<a href="/masters/"><h1>Наши мастера</h1></a>
		<div class="owl-container"  style="margin-bottom:-15px;">
			<div class="owl-carousel owl-theme slideimage">
				<img src="/images/521953.png" alt="">									 
				<img src="/images/main1.png" alt="">									 
				<img src="/images/main2.png" alt="">									 
			</div>
			<div class="owl-prev"></div>
			<div class="owl-next"></div>
		</div>
		<a href="/interior/"><h1>Интерьер</h1></a>
		<div class="main_interior_block">
			<div id="ca-container2" class="ca-container">
				<div class="ca-wrapper">
				<?php 
$model_images = json_decode($images);
for ($i = 0; $i < count($model_images); $i++) {
    $BImages = BImages::findOne($model_images[$i]);
Esempio n. 2
0
 public function actionSettings()
 {
     if (Yii::$app->user->isGuest) {
         $this->redirect(Yii::$app->user->loginUrl);
     }
     $model = BSettings::find()->where(['site' => 1])->one();
     if (!$model) {
         $model = new BSettings();
         $model->site = 1;
     }
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->render('settings', ['model' => $model, 'success' => true]);
     }
     return $this->render('settings', ['model' => $model]);
 }