main.php
13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<?php
/**
* @var View $this
* @var string $content
* @var SeoComponent $seo
* @var User $user
* @var PageCategory[] $pageCategories
*/
use artbox\core\components\SeoComponent;
use artbox\core\helpers\ImageHelper;
use common\models\Feedback;
use artbox\core\models\PageCategory;
use artbox\core\models\User;
use common\models\Settings;
use frontend\assets\AppAsset;
use frontend\assets\MapAsset;
use artbox\core\components\imagemanager\models\ImageManager;
use yii\bootstrap\ActiveForm;
use yii\bootstrap\Nav;
use yii\bootstrap\Html;
use yii\db\ActiveQuery;
use yii\helpers\Url;
use yii\web\View;
use yii\widgets\Breadcrumbs;
AppAsset::register($this);
MapAsset::register($this);
$user = \Yii::$app->user->identity;
$seo = Yii::$app->get('seo');
$feedback = new Feedback(['scenario' => Feedback::SCENARIO_FEEDBACK]);
$settings = Settings::getInstance();
$controller = Yii::$app->controller;
$default_controller = Yii::$app->defaultRoute;
$isHome = ( ( $controller->id === $default_controller ) && ( $controller->action->id === $controller->defaultAction ) ) ? true : false;
$pageCategories = PageCategory::find()
->with(
[
'lang',
'pages' => function (ActiveQuery $query) {
$query->with('lang.alias')
->where(['in_menu' => true])
->orderBy([ 'sort' => SORT_ASC ]);
},
]
)
->where([ 'status' => true ])
->orderBy([ 'sort' => SORT_ASC ])
->all();
$logo = null;
if ($settings->logo) {
$logo_img = ImageManager::findOne($settings->logo);
if ($logo_img) {
$logo = $logo_img->getImagePathPrivate() ?? $logo;
}
}
$this->registerMetaTag(
[
'name' => 'description',
'content' => $seo->desc,
]
)
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= \Yii::$app->language ?>">
<head>
<meta charset="<?= \Yii::$app->charset ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= Html::csrfMetaTags() ?>
<title>Time Invest Day</title>
<title><?= Html::encode($seo->title) ?></title>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1591060651200152'); // Insert your pixel ID here.
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1591060651200152&ev=PageView&noscript=1"
/></noscript>
<!-- DO NOT MODIFY -->
<!-- End Facebook Pixel Code -->
<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<!-- Google Analytics -->
<script>
(function(i, s, o, g, r, a, m) {
i[ 'GoogleAnalyticsObject' ] = r;
i[ r ] = i[ r ] || function() {
(i[ r ].q = i[ r ].q || []).push(arguments)
}, i[ r ].l = 1 * new Date();
a = s.createElement(o), m = s.getElementsByTagName(o)[ 0 ];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', '<?=$settings->ga_code?>', 'auto');
ga('send', 'pageview');
</script>
<div id="all">
<header>
<!-- *** NAVBAR ***
_________________________________________________________ -->
<div class="navbar-affixed-top" data-spy="affix" data-offset-top="200">
<div class="navbar navbar-default yamm" role="navigation" id="navbar">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand home" href="<?php echo Url::home(); ?>">
<img src="/img/main-logo.png" alt="BeHappy24" style="width: 130px;">
</a>
<div class="navbar-buttons">
<button type="button" class="navbar-toggle btn-template-main" data-toggle="collapse" data-target="#navigation">
<span class="sr-only">Toggle navigation</span>
<i class="fa fa-align-justify"></i>
</button>
</div>
</div>
<div class="navbar-collapse collapse" id="navigation">
<ul id="w0" class="nav navbar-nav navbar-right"><li><a href="#sect1" class="scroll-to">Мероприятие</a></li>
<li><a href="#sect2" class="scroll-to">Где и когда</a></li>
<li><a href="#sect3" class="scroll-to">Программа</a></li>
<li><a href="#sect6" class="scroll-to">Спикеры</a></li>
<li><a href="#sect5" class="scroll-to">Кому будет интересно</a></li>
<li><a href="#sect7" class="scroll-to">Как добраться</a></li></ul>
</div>
<div class="collapse clearfix" id="search">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn btn-template-main"><i class="fa fa-search"></i></button>
</span>
</div>
</form>
</div>
<!--/.nav-collapse -->
</div>
</div>
<!-- /#navbar -->
</div>
<!-- *** NAVBAR END *** -->
</header>
<!-- *** FeedBack MODAL ***
_________________________________________________________ -->
<div class="modal fade" id="feedback-modal" tabindex="-1" role="dialog" aria-labelledby="Login" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 class="modal-title" id="Login">Time Invest Day</h3>
</div>
<div class="modal-body">
<?php $form = ActiveForm::begin(
[
'id' => 'feedback-form',
'method' => 'POST',
'action' => '/site/feedback',
]
); ?>
<div class="col-md-12">
<div class="col-md-6">
<?= $form->field($feedback, 'name')
->textInput()->Label('Имя и фамилия'); ?>
</div>
<div class="col-md-6">
<?= $form->field($feedback, 'email')
->textInput()->Label('Адрес электронной почты'); ?>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6">
<?= $form->field($feedback, 'phone')
->textInput()->Label('Номер телефона'); ?>
</div>
<div class="col-md-6">
<?= $form->field($feedback, 'promocode')
->textInput()->Label('Впишите промокод для получения скидки -20%'); ?>
</div>
</div>
<div class="col-md-10 col-md-offset-1 form-down">
<div style="font-weight:bold;font-size: 18px;padding-bottom: 5px;">Как вам удобно оплатить?<span style="color:red;">*</span></div>
<?= $form->field($feedback, 'oplata')
->radioList(
[
"Перевод на карту Приватбанка без промокода (150 грн)" => 'Перевод на карту Приватбанка (до 15 декабря стоимость билета 150 грн)',
"Перевод на карту Приватбанка с промокода (120 грн)" => 'Перевод на карту Приватбанка (с промокодом стоимость до 15 декабря 120 грн)',
"Наличными представителю" => 'Наличными представителю (в день мероприятия, 16 декабря, цена 200 грн)',
],
[
'unselect' => null,
]
)->label(false);
?>
</div>
<div class="col-md-12">
<p class="text-center">
<?= Html::submitButton(
'Отправить',
[
'class' => 'send-form btn btn-lg btn-template-primary',
]
) ?>
</p>
</div>
<div style="clear:both;"></div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>
</div>
<!-- *** FeedBack MODAL END *** -->
<!-- *** FeedBack MODAL ***
_________________________________________________________ -->
<div class="modal fade" id="success-modal" tabindex="-1" role="dialog" aria-labelledby="Success" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 class="modal-title" id="Success">Спасибо</h3>
</div>
<div class="modal-body">
<p>Заявка отправлена и будет рассмотрена в ближайшее время.</p>
<p class="text-center">
<button type="button" class="btn btn-template-primary" data-dismiss="modal">Close</button>
</p>
</div>
</div>
</div>
</div>
<!-- *** FeedBack MODAL END *** -->
<!-- *** Breadcrumbs *** -->
<?php
if (!$isHome) {
?>
<div id="heading-breadcrumbs">
<div class="container">
<div class="row">
<div class="col-md-7">
<h1><?= $seo->h1 ?></h1>
</div>
<div class="col-md-5">
<?= Breadcrumbs::widget(
[
'links' => isset($this->params[ 'breadcrumbs' ]) ? $this->params[ 'breadcrumbs' ] : [],
]
) ?>
</div>
</div>
</div>
</div>
<?php
}
?>
<!-- *** Breadcrumbs END *** -->
<?= $content ?>
<span id="back-to-top" title="Back to top"><i class="fa fa-arrow-up"></i></span>
</div>
<!-- /#all -->
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>