public function actionDistributeremergentemail()
 {
     $count = Email_user_rs::find()->count();
     $emergent_cont = 0;
     $Emails = Email_user_rs::find()->asArray()->all();
     foreach ($Emails as $demail) {
         if ($demail['dead_time'] != NULL) {
             $emergent_cont++;
         }
     }
     $pagination = new Pagination(['defaultPageSize' => 8, 'totalCount' => $emergent_cont]);
     $dealEmail = Email_user_rs::find()->offset($pagination->offset)->limit($pagination->limit)->asArray()->all();
     //$dealEmail=Email_user_rs::find()->count();
     //print_r($dealEmail);
     $emails = array();
     foreach ($dealEmail as $key) {
         $useremail = Email::find()->orderBy(['sendtime' => SORT_DESC])->where(['id' => $key['email_id']])->asArray()->one();
         $emails[] = $useremail;
     }
     return $this->render('/Users\\distributer\\emergent', ['emails' => $emails, 'dealEmail' => $dealEmail, 'pagination' => $pagination, 'count' => $count, 'emergent_count' => $emergent_cont]);
 }
示例#2
0
                        <span class="title">&nbsp;&nbsp;已分发</span>
                    </a>
                </li>
                <li>
                    <a href="<?php 
echo \yii\helpers\Url::toRoute(['site/distributeremergentemail']);
?>
">
                        <i class="glyphicon glyphicon-time"></i>
                        <span class="title">&nbsp;&nbsp;紧急邮件</span>
                        <span class="sr-only">(current)</span>
                        
                        	<?php 
use app\models\Email_user_rs;
$emergent_cont = 0;
$dealEmail = Email_user_rs::find()->asArray()->all();
foreach ($dealEmail as $demail) {
    if ($demail['dead_time'] != NULL && $demail['handle_status'] != 3) {
        $emergent_cont++;
    }
}
if ($emergent_cont > 0) {
    echo '<i class="pull-right glyphicon glyphicon-send" style="color:red"></i>';
}
?>
                    </a>
                </li>
                <li>
                    <a href="<?php 
echo \yii\helpers\Url::toRoute(['site/list', 'permission' => 1]);
?>
示例#3
0
                        <i class="glyphicon glyphicon-ok-circle"></i>
                        <span class="title">&nbsp;&nbsp;已发送</span>
                    </a>
                </li>
                <li>
                    <a href="<?php 
echo \yii\helpers\Url::toRoute(['site/emergentemail', 'user_id' => $session['user']['id']]);
?>
">
                        <i class="glyphicon glyphicon-time"></i>
                        <span class="title">&nbsp;&nbsp;紧急邮件提醒</span>
                        <span class="sr-only">(current)</span>
                        
                        	<?php 
$emergent_cont = 0;
$dealEmail = Email_user_rs::find()->where(['user_id' => $session['user']['id']])->asArray()->all();
foreach ($dealEmail as $demail) {
    if ($demail['dead_time'] != NULL && $demail['handle_status'] != 3) {
        $emergent_cont++;
    }
}
if ($emergent_cont > 0) {
    echo '<i class="glyphicon glyphicon-send" style="margin-left:20px;color:red"></i>';
}
?>
                    </a>
                </li>

                <li>
                    <a href="#" id="pull">
                        <i class="glyphicon glyphicon-eye-open"></i>