123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <style>
- .basicinfo {
- margin: 15px 0;
- }
- .basicinfo .row > .col-xs-4 {
- padding-right: 0;
- }
- .basicinfo .row > div {
- margin: 5px 0;
- }
- </style>
- <div id="content-container" class="container">
- <div class="row">
- <div class="col-md-3">
- {include file="common/sidenav" /}
- </div>
- <div class="col-md-9">
- <div class="panel panel-default ">
- <div class="panel-body">
- <h2 class="page-header">
- {:__('Member center')}
- <a href="{:url('user/profile')}" class="btn btn-success pull-right"><i class="fa fa-pencil"></i>
- {:__('Profile')}</a>
- </h2>
- <div class="row user-baseinfo">
- <div class="col-md-3 col-sm-3 col-xs-2 text-center user-center">
- <a href="{:url('user/profile')}" title="{:__('Click to edit')}">
- <span class="avatar-img"><img src="{$user.avatar|cdnurl}" alt=""></span>
- </a>
- </div>
- <div class="col-md-9 col-sm-9 col-xs-10">
- <!-- Content -->
- <div class="ui-content">
- <!-- Heading -->
- <h4><a href="{:url('user/profile')}">{$user.nickname}</a></h4>
- <!-- Paragraph -->
- <p>
- <a href="{:url('user/profile')}">
- {$user.bio|default=__("This guy hasn't written anything yet")}
- </a>
- </p>
- <!-- Success -->
- <div class="basicinfo">
- <div class="row">
- <div class="col-xs-4 col-md-2">{:__('Money')}</div>
- <div class="col-xs-8 col-md-4">
- <a href="javascript:;" class="viewmoney">{$user.money}</a>
- </div>
- <div class="col-xs-4 col-md-2">{:__('Score')}</div>
- <div class="col-xs-8 col-md-4">
- <a href="javascript:;" class="viewscore">{$user.score}</a>
- </div>
- </div>
- <div class="row">
- <div class="col-xs-4 col-md-2">{:__('Successions')}</div>
- <div class="col-xs-8 col-md-4">{$user.successions} {:__('Day')}</div>
- <div class="col-xs-4 col-md-2">{:__('Maxsuccessions')}</div>
- <div class="col-xs-8 col-md-4">{$user.maxsuccessions} {:__('Day')}</div>
- </div>
- <div class="row">
- <div class="col-xs-4 col-md-2">{:__('Logintime')}</div>
- <div class="col-xs-8 col-md-4">{$user.logintime|date="Y-m-d H:i:s",###}</div>
- <div class="col-xs-4 col-md-2">{:__('Prevtime')}</div>
- <div class="col-xs-8 col-md-4">{$user.prevtime|date="Y-m-d H:i:s",###}</div>
- <div class="col-xs-4 col-md-2">总流量</div>
- <div class="col-xs-8 col-md-4">
- <?php
- $val = $user->total_traffic;
- $kb = 1024;
- $Mb = 1024 * $kb;
- $Gb = 1024 * $Mb;
- $Tb = 1024 * $Gb;
- if($val < $Mb){
- echo number_format($val/$kb,2) .' Kb';
- }else if($val < $Gb){
- echo number_format($val/$Mb,2) .' Mb';
- }else if($val < $Tb){
- echo number_format($val/$Gb,2) .' Gb';
- }else{
- echo $val + 'b';
- }
- ?>
- </div>
- <div class="col-xs-4 col-md-2">已使用流量</div>
- <div class="col-xs-8 col-md-4">
- <?php
- $val = $user->traffic;
- $kb = 1024;
- $Mb = 1024 * $kb;
- $Gb = 1024 * $Mb;
- $Tb = 1024 * $Gb;
- if($val < $Mb){
- echo number_format($val/$kb,2) .' Kb';
- }else if($val < $Gb){
- echo number_format($val/$Mb,2) .' Mb';
- }else if($val < $Tb){
- echo number_format($val/$Gb,2) .' Gb';
- }else{
- echo $val + 'b';
- }
- ?>
- </div>
- <div class="col-xs-4 col-md-2">剩余流量</div>
- <div class="col-xs-8 col-md-4">
- <?php
- $val = $user->total_traffic - $user->traffic;
- $kb = 1024;
- $Mb = 1024 * $kb;
- $Gb = 1024 * $Mb;
- $Tb = 1024 * $Gb;
- if($val < $Mb){
- echo number_format($val/$kb,2) .' Kb';
- }else if($val < $Gb){
- echo number_format($val/$Mb,2) .' Mb';
- }else if($val < $Tb){
- echo number_format($val/$Gb,2) .' Gb';
- }else{
- echo $val + 'b';
- }
- ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
|