From 7b70215a1e5f4f84621cb843635567ce70f92114 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 19 Apr 2016 18:43:06 +0300 Subject: [PATCH] 15.04.16 seo widget --- frontend/controllers/SiteController.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index f777f79..94dde93 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -94,16 +94,26 @@ class SiteController extends Controller public function actionMail(){ - $num = Yii::$app->request->post('num'); + $type = Yii::$app->request->post('type'); switch ($type) { case 'call_me': + $num = Yii::$app->request->post('num'); if(!empty($num)){ return json_encode(Mailer::widget(['text' => $num, 'subject' => 'Обратный звонок'])); } break; + case "consultation": + $num = Yii::$app->request->post('num'); + $name = Yii::$app->request->post('name'); + + if(!empty($num)){ + return json_encode(Mailer::widget(['text' => "Номер телефона".$num.";
Имя:".$name, 'subject' => 'Обратный звонок'])); + } + break; + } } -- libgit2 0.21.4