1234567891011121314151617181920212223242526272829303132333435 |
- <?
- use yii\web\View;
- $assetDir = Yii::$app->assetManager->getPublishedUrl('@vendor/almasaeed2010/adminlte/dist');
- foreach($users as $userid => $data){
- $op = ( $userid == $id )?0.5:1;
- $mark = ( time()-$data['time'] < $obj::sleep )?'fas fa-user-check':'fas fa-mug-hot';
- $mark = ( time()-$data['time'] < $obj::dead )?'fas fa-user-check':'fas fa-bed';
- $markd = ( time()-$data['time'] < $obj::sleep )?'text-success':'text-warning';
- $markd = ( time()-$data['time'] < $obj::dead )?'text-success':'text-danger';
- if( time()-$data['time'] < $obj::kill ) {
- $photo = "/images/users/".$userid."_sm.jpg";
- if( !file_exists( Yii::getAlias('@webroot').$photo ) ){
- $photo = $assetDir."/img/user1-128x128.jpg";
- }
- ?>
- <a href="#" class="dropdown-item">
- <!-- Message Start -->
- <div class="media" style="opacity:<?=$op?>">
- <img src="<?=$photo?>" alt="User Avatar" class="img-size-50 mr-3 img-circle">
- <div class="media-body">
- <h3 class="dropdown-item-title">
- <?=$data['name']?>
- <span class="float-right text-sm <?=$markd?>"><i class="<?=$mark?>"></i></span>
- </h3>
- <p class="text-sm">Думает...</p>
- <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> <?=date("i:s", time()-$data['time'])?> м:сек</p>
- </div>
- </div>
- <!-- Message End -->
- </a>
- <div class="dropdown-divider"></div>
- <?
- }
- }
|