'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@app/mail',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'email-smtp.us-west-2.amazonaws.com',
'username' => 'anu4yzgRtf3YP6Vq431QA6iqlatm',
'password' => 'erBYPWIDq/banu4yzgRtf',
'port' => '587',
'encryption' => 'tls',
],
//'useFileTransport' => true,
],
$HTML = \Yii::$app->view->render('@app/mail/remind', [
'token' => $user->password_reset_token,
'email' => $user->email,
'url' => $url
]);
Yii::$app->mailer->compose()
->setFrom('ОТ кого')
->setTo('Кому')
->setSubject('Тема')
->setHtmlBody( $HTML )
->send();
Yii::$app->mailer->compose('contact/html')
->setFrom('from@domain.com')
->setTo($form->email)
->setSubject($form->subject)
->send();
<?php $arrAttr = ['icq' => 'Label ICQ' , 'email' => 'Ваш email' ]; ?>
<?php foreach($arrAttr as $key=> $attr):?>
<?php if (property_exists($user, $key)) : ?>
<p class='attr'><?= $attr?></p><p><?=$user->{$key}; ?></p>
<?php endif; ?>
<?php endforeach;?>
$connection = new \yii\db\Connection([
'dsn' => $dsn,
'username' => $username,
'password' => $password,
]);
$connection->open();
# Услуги, списать баланс раз в день в 24:00 по мск
0 0 * * * /usr/bin/php -f /home/user/data/www/setename.biz/yii service/index
## Базовый конфиг для всех источников
source sitename_config
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass = mysql
sql_db = new_site
sql_port = 3306
sql_query_pre = SET NAMES utf8
sql_query_pre = SET CHARACTER SET utf8
}
# применили конфиг путем наследования
source sitename_audio :sitename_config
{
sql_query = \
SELECT a.* \
FROM audio a
# указываем какие поля мы хотим индексировать
sql_attr_uint = user_id
sql_field_string = id3_title
sql_field_string = id3_artist
sql_field_string = description
sql_attr_json = id3_json
}
index sitename_audio
{
source = sitename_audio
path = e:/Server/sphinx/data/sitename_audio
docinfo = extern
charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
min_word_len = 3
html_strip = 1
min_infix_len = 3
index_exact_words = 1
blend_chars = &,U+23
#morphology = stem_en
#morphology = stem_enru, soundex, metaphone
# морфология через словари словоформ...
morphology = lemmatize_ru_all
}
##################
# Comon config
##################
indexer
{
mem_limit = 128M
}
searchd
{
listen = 9312
listen = 9306:mysql41
log = e:/Server/sphinx/log/searchd.log
query_log = e:/Server/sphinx/log/query.log
read_timeout = 5
max_children = 30
pid_file = e:/Server/sphinx/log/searchd.pid
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = e:/Server/sphinx/data
}
common
{
lemmatizer_base = e:/Server/sphinx/dicts/
}
<ul><li class="active">1</li><li>2</li><li>3</li></ul>
// ищем текущий таб который играет
var next = $('.tab.active').next();
if(next.length >0) next.trigger('click'); // посылаем событие клика на таб