public function getCountComments($period = false) {
$query = self::find();
if($this->post_id) {
$query->where(['post_id' => $this->post_id]);
}
if($this->type) {
$query->andWhere(['type' => $this->type]);
}
if($period == 'day') {
$query->andWhere('date_create>=CURDATE()');
}
return $query->count();
}
<!--noindex--> контент НЕ для роботов <!--/noindex-->
<a href="/comments/default/vote" class="upvote"> </a>
<script>
var ajax = {
voteUrl: '/comments/default/vote',
...
};
</script>
<ul>
<li>Комментарий 1</li>
<li>Комментарий 2</li>
<li>Комментарий 3<ul>
<li>подКомментарий 1</li>
<li>подКомментарий 2</li></ul></li>
<li>Комментарий 4</li>
</ul>
public static function getDateUpdate()
{
return DateFormat::load()->dateToBigString(self::$date_update);
}
public function getDateUpdate()
{
return DateFormat::load()->dateToBigString($this->date_update);
}
/**
* @var array|\Closure the HTML attributes for the data cell tag. This can either be an array of
* attributes or an anonymous function that ([[Closure]]) that returns such an array.
* The signature of the function should be the following: `function ($model, $key, $index, $gridView)`.
* A function may be used to assign different attributes to different rows based on the data in that row.
*
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
*/
public $contentOptions = [];
-I OUTPUT -p tcp -o lo --dport 8083 -j DNAT --to-destination 192.168.1.124:8083
iptables -t nat -I OUTPUT -p tcp -o lo --dport 8083 -j DNAT --to-destination 192.168.1.124:8083