#1208 - Правки сайта ИЮНЬ 2016 (формы, верстка)

parent 881935a4
<?php
use yii\helpers\Html;
/* @var $this \yii\web\View view component instance */
/* @var $message \yii\mail\MessageInterface the message being composed */
/* @var $content string main view render result */
?>
<?php $this->beginPage() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?= Yii::$app->charset ?>" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta name="format-detection" content="telephone=no" />
<title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?>
<style type="text/css">
body {
margin:0;
padding:0;
}
@media only screen and (max-width:600px) {
body[merkle] .hide {
display:none !important;
width:0px !important;
height:0px !important;
}
body[merkle] .width270 {
width:270px !important;
}
body[merkle] .width230{
width: 230px;
}
.btn_resp {
width: 190px;
display: block;
overflow: hidden;
word-wrap: break-word;
}
body[merkle] .aligncenter {
text-align:center !important;
}
body[merkle] .padding0 {
padding:0px !important;
}
body[merkle] .paddingbottom6 {
padding:6px !important;
}
body[merkle] .alignleft {
text-align:left !important;
}
body[merkle] .bgwhite {
background-color:#FFFFFF !important;
background-image:none !important;
width:inherit !important;
height:inherit !important;
}
body[merkle] .bggray {
background-color:#efefef !important;
}
body[merkle] .drop {
width:270px !important;
float:left !important;
}
body[merkle] .desktop{visibility:hidden; display:none !important;}
body[merkle] .mobile{max-height: none !important; font-family:Arial, Helvetica, sans-serif; display: block !important; }
body[merkle] .yellow{color:#ffc222 !important;}
body[merkle] .head_space_height{height:2px;}
body[merkle] .right_col_height{height:280px;}
}
</style>
<style type="text/css">
.desktop{visibility:visible;}
.mobile { max-height: 0px !important; font-size: 0 !important; display: none; }
.ExternalClass {
width:100%;
}
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
mso-line-height-rule:exactly;
mso-line-height-rule:exactly;
line-height: 100%;
}
body {
-webkit-text-size-adjust:none;
-ms-text-size-adjust:none;
}
table td {
border-collapse:collapse;
}
p {
margin:0;
padding:0;
margin-bottom:0;
}
h1, h2, h3, h4, h5, h6 {
mso-line-height-rule:exactly;
mso-line-height-rule:exactly;
line-height: 100%;
}
a, a:link {
text-decoration: underline;
}
span.yshortcuts {
color:#000;
background-color:none;
border:none;
}
span.yshortcuts:hover, span.yshortcuts:active, span.yshortcuts:focus {
background-color:none;
border:none;
}
a:visited {
text-decoration: none
}
a:focus {
text-decoration: underline
}
a:hover {
text-decoration: underline
}
.head_space_height{height:80px;}
.Img_Descrip{font-size:12px; font-weight:normal; font-family:Arial, Helvetica, sans-serif;}
.right_col_height{height:328px;}
</style>
</head>
<body>
<body merkle="fix" style="margin:0; padding:0; -webkit-text-size-adjust: none;" bgcolor="#f2f2f2" >
<?php $this->beginBody() ?>
<?= $content ?>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
\ No newline at end of file
<?php
use yii\helpers\Html;
/* @var $this \yii\web\View view component instance */
/* @var $message \yii\mail\MessageInterface the message being composed */
/* @var $content string main view render result */
?>
<?php $this->beginPage() ?>
<?php $this->beginBody() ?>
<?= $content ?>
<?php $this->endBody() ?>
<?php $this->beginBody() ?>
<?= $content ?>
<?php $this->endBody() ?>
<?php $this->endPage() ?>
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use common\models\Settings;
use common\modules\bids\models\Bid;
use common\modules\bids\models\BidFile;
?>
Зравствуйте,
Уведомляем Вас о том, что на сайте <?=Url::home(true);?> была оставлена следующая информация:
Введенные пользователем данные:
Имя: <?php echo ((isset($model->name)) ? $model->name : 'Не указано');?>
Телефон: <?php echo ((isset($model->phone)) ? $model->phone : 'Не указано');?>
Email: <?php echo ((isset($model->email)) ? $model->email : 'Не указано'); ?>
Сообщение: <?php echo ((isset($model->text)) ? $model->text : 'Не указано');?>
<?php if(count($model->files)>0) : ?>
Приложенные файлы:
<?php foreach ($model->files as $file)
{
echo \Yii::$app->params['frontUrl'].BidFile::FILE_FOLDER.$file->filename;
} ?>
<?php endif; ?>
Отправлено с элемента дизайна: <?=Bid::$form_titles[$model->form]?>
Дата добавления заявки: <?=date('d.m.Y H:i:s', $model->created_at)?>
<?php if($session) : ?>
Запрос отправлен со страницы: <?=Url::to([$session->lastUrl->url], true)?>
<?php if($lasts = $session->lastThreeUrls) : ?>
<?php foreach ($lasts as $url) : ?>
<?=date('d.m.Y H:i', $url->created_at)?> - <?=Url::to([$url->url], true)?>
<?php endforeach; ?>
<?php if(count($session->urls)>3) : ?>
Смотреть полную историю: http://taskon.task-on.com/sessions/statistics-admin/details/<?=$session->id;?>
<?php endif; ?>
<?php else : ?>
Это первая страница, дальше пользователь никуда не переходил.
<?php endif; ?>
<?php if($session->utmUrls) : ?>
Данные о рекламных источниках:
<?php foreach ($session->utmUrls as $url) :
$params = $url->parseUrl(); ?>
Рекламная площадка: <?=$params['utm_medium']?>
Компания: <?=$params['utm_campaign']?>
Номер объявления: <?=$params['utm_content']?>
Ключевое слово: <?=$params['keyword']?>
Тип блока: <?=$params['position_type']?>
Позиция объявления в блоке: <?=$params['position']?>
Дата посещения: <?=date('d.m.Y H:i', $url->created_at)?>
Время пребывания на посадочной странице: <?=date('H:i:s', mktime(0, 0, $url->time))?>
<?php endforeach; ?>
<?php else : ?>
Данных о рекламных источниках нет
<?php endif; ?>
<?php endif; ?>
Данное сообщение было отправлено Вам на основании Вашего согласия получать информационные письма об обновлениях на сайте <?=Url::home(true);?>. В случае если Вы хотите приостановить получение подобных информационных писем, пожалуйста, напишите в службу поддержки <?=Settings::getValue('bids-support-email-su');?>.
Просьба не отвечать на данное сообщение. По всем вопросам просьба обращаться: <?=Settings::getValue('bids-support-email-admin');?>
......@@ -7,124 +7,9 @@ use yii\helpers\Html;
use common\models\Settings;
$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_change_code]);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta name="format-detection" content="telephone=no" />
<style type="text/css">
body {
margin:0;
padding:0;
}
@media only screen and (max-width:600px) {
body[merkle] .hide {
display:none !important;
width:0px !important;
height:0px !important;
}
body[merkle] .width270 {
width:270px !important;
}
body[merkle] .width230{
width: 230px;
}
.btn_resp {
width: 190px;
display: block;
overflow: hidden;
word-wrap: break-word;
}
body[merkle] .aligncenter {
text-align:center !important;
}
body[merkle] .padding0 {
padding:0px !important;
}
body[merkle] .paddingbottom6 {
padding:6px !important;
}
body[merkle] .alignleft {
text-align:left !important;
}
body[merkle] .bgwhite {
background-color:#FFFFFF !important;
background-image:none !important;
width:inherit !important;
height:inherit !important;
}
body[merkle] .bggray {
background-color:#efefef !important;
}
body[merkle] .drop {
width:270px !important;
float:left !important;
}
body[merkle] .desktop{visibility:hidden; display:none !important;}
body[merkle] .mobile{max-height: none !important; font-family:Arial, Helvetica, sans-serif; display: block !important; }
body[merkle] .yellow{color:#ffc222 !important;}
body[merkle] .head_space_height{height:2px;}
body[merkle] .right_col_height{height:280px;}
}
</style>
<style type="text/css">
.desktop{visibility:visible;}
.mobile { max-height: 0px !important; font-size: 0 !important; display: none; }
.ExternalClass {
width:100%;
}
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
mso-line-height-rule:exactly;
mso-line-height-rule:exactly;
line-height: 100%;
}
body {
-webkit-text-size-adjust:none;
-ms-text-size-adjust:none;
}
table td {
border-collapse:collapse;
}
p {
margin:0;
padding:0;
margin-bottom:0;
}
h1, h2, h3, h4, h5, h6 {
mso-line-height-rule:exactly;
mso-line-height-rule:exactly;
line-height: 100%;
}
a, a:link {
text-decoration: underline;
}
span.yshortcuts {
color:#000;
background-color:none;
border:none;
}
span.yshortcuts:hover, span.yshortcuts:active, span.yshortcuts:focus {
background-color:none;
border:none;
}
a:visited {
text-decoration: none
}
a:focus {
text-decoration: underline
}
a:hover {
text-decoration: underline
}
.head_space_height{height:80px;}
.Img_Descrip{font-size:12px; font-weight:normal; font-family:Arial, Helvetica, sans-serif;}
.right_col_height{height:328px;}
</style>
</head>
<body merkle="fix" style="margin:0; padding:0; -webkit-text-size-adjust: none;" bgcolor="#f2f2f2" >
<div style="background-color:#f2f2f2;" align="center">
<!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
......@@ -399,6 +284,3 @@ a:hover {
<!--end spacer -->
</div>
</body>
</html>
This diff is collapsed.
......@@ -119,8 +119,6 @@ class Bid extends \common\components\ActiveRecordModel
}
public function send()
{
try
{
$session = null;
if(Yii::$app->session->has('SessionId'))
......@@ -128,26 +126,14 @@ class Bid extends \common\components\ActiveRecordModel
$session = Session::findOne(Yii::$app->session->get('SessionId'));
}
$email = Settings::getValue('bids-support-email');
$message = Yii::$app->controller->view->render('@common/modules/bids/views/bid/mail-all', [
return Yii::$app->mailer->compose(['html' => 'messageBid-html', 'text' => 'messageBid-text'], [
'model' => $this,
'session' => $session,
]);
$headers = "MIME-Version: 1.0\r\n".
"Content-Transfer-Encoding: 8bit\r\n".
"Content-Type: text/html; charset=\"UTF-8\"\r\n".
"X-Mailer: PHP v.".phpversion()."\r\n".
"From: Заявка с сайта TaskOn <".Settings::getValue('bids-support-email-from').">\r\n";
$subject = "Заявка №".$this->id.". С сайта task-on.com поступила заявка с формы: ".static::$form_titles[$this->form];
@mail($email, $subject, $message, $headers);
}
catch (Exception $e)
{
}
])
->setFrom([Settings::getValue('bids-support-email-from') => 'Заявка с сайта TaskOn'])
->setTo(Settings::getValue('bids-support-email'))
->setSubject("Заявка №".$this->id.". С сайта task-on.com поступила заявка с формы: ".static::$form_titles[$this->form])
->send();
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment