ca BODO:\knd.crt
<cert>
тут содержимое knd.crt
</cert>
{
"query": {
"bool": {
"should": [
{
"bool": {
"must_not": {
"exists" : { "field" : "active_from" }
}
}
},
{
"range": {
"active_from": {
"lte": "2017-10-24",
"format": "yyyy-MM-dd"
}
}
}
]
}
}
}
// Дергаете страницу
$html = file_get_html('http://slashdot.org/');
// Находите информацию по селектору CSS
foreach($html->find('div.article') as $article) {
// парсите результат и закидываете в массив
$item['title'] = $article->find('div.title', 0)->plaintext;
$item['intro'] = $article->find('div.intro', 0)->plaintext;
$item['details'] = $article->find('div.details', 0)->plaintext;
$articles[] = $item;
}
print_r($articles);
$subQuery = (new Query())->select('COUNT(*)')->from('user');
// SELECT `id`, (SELECT COUNT(*) FROM `user`) AS `count` FROM `post`
$query = (new Query())->select(['id', 'count' => $subQuery])->from('post');
$sql = "SELECT
iu.*, u.banned, u.foto,
(SELECT SUM(rating)/COUNT(*)
FROM `olit_insurance_reviews`
WHERE company_id = u.user_id and rating > :rating AND parent_id IS NULL) as rating,
(SELECT COUNT(*)
FROM `olit_insurance_reviews`
WHERE company_id = u.user_id AND parent_id IS NULL) as reviews_count
FROM `olit_insurance_users` as iu
INNER JOIN `olit_users` as u
ON u.user_id = iu.user_id
WHERE u.user_group = :userGroup ORDER BY u.banned DESC, iu.company_name ASC";
$cmd = Yii::$app->db->createCommand($sql, [':userGroup' => 6, ':rating' => 0]);
$items = $cmd->queryAll();
Html::button($comp->name, ['data-url' => Url::to(['view', 'id' => $comp->id]), 'rel' => 'toggle-modal'])
[
'allow' => true,
'actions' => ['update'],
'roles' => ['updatePost'],
'roleParams' => function() {
return ['post' => Post::findOne(Yii::$app->request->get('id'))];
},
],
[
'allow' => true,
'actions' => ['update'],
'roles' => ['updatePost'],
'roleParams' => ['postId' => Yii::$app->request->get('id')];
],