示例#1
0
文件: .php 项目: rinodung/EduSec3.0.0
    public static function getAllRoledNotifications($role = 'admin')
    {
        $criteria = new CDbCriteria(array(
                    'condition' => ':now >= t.alert_after_date AND :now <= t.alert_before_date AND t.role = :role',
                    'params' => array(
                        ':now' => date('Y-m-d'),
                        ':role' => $role,
                    )
                ));

        $notifiche = ModelNotifyii::model()
                ->findAll($criteria);

        return $notifiche;
    }