12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?
- 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."_norm.jpg";
- if( !file_exists( Yii::getAlias('@webroot').$photo ) ){
- $photo = $assetDir."/img/user1-128x128.jpg";
- }
- ?>
- <div class="col-md-3">
- <div class="card card-primary card-outline">
- <div class="card-body box-profile">
- <div class="text-center">
- <img class="profile-user-img img-fluid img-circle" src="<?=$photo?>" alt="User profile picture">
- </div>
- <h3 class="profile-username text-center"><?=$data['name']?></h3>
- <p class="text-muted text-center"><?=$data['name']?></p>
- <ul class="list-group list-group-unbordered mb-3">
- <li class="list-group-item">
- <b>Неактивен: </b> <i class="far fa-clock mr-1"></i> <?=date("i:s", time()-$data['time'])?><span class="float-right text-sm <?=$markd?>"><i class="<?=$mark?>"></i></span>
- </li>
- <li class="list-group-item">
- <b>Following</b> <a class="float-right">543</a>
- </li>
- <li class="list-group-item">
- <b>Friends</b> <a class="float-right">13,287</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="dropdown-divider"></div>
- <?
- }
- }
|