<?php
/**
 * The profile view file of user module of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Chunsheng Wang <chunsheng@cnezsoft.com>
 * @package     user
 * @version     $Id: profile.html.php 4029 2016-08-26 06:50:41Z liugang $
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.modal.html.php';?>
<?php js::import($jsRoot . 'lightbox/lightbox.js');?>
<table class='table table-data table-borderless'>
  <tbody>
    <tr>
      <td rowspan='4' class='text-top text-center w-180px'>
        <div class='avatar avatar-xxl avatar-user mgb-10' data-id='<?php echo $user->id; ?>' data-name='<?php echo $user->realname; ?>'>
          <?php if(!empty($user->avatar)):?>
          <a href="<?php echo $user->avatar;?>" target="_blank" data-toggle="lightbox"><?php echo html::image($user->avatar . '?v=' . rand(), "class='avatar-img'");?></a>
          <?php endif;?>
        </div>
        <form method='post' action="<?php echo inlink('uploadAvatar', "account={$user->account}");?>" class='form-condensed' id='avatarForm' enctype='multipart/form-data' class='hide'>
        <?php echo html::file('files', "class='form-control hidden' id='avatarUploadControl'");?>
        <?php echo html::a('javascript:;', $lang->user->uploadAvatar, "class='btn btn-avatar submit' id='avatarUploadBtn' data-placement='bottom'");?>
        </form>
      </td>
      <th class='text-right w-100px'><?php echo $lang->user->realname;?></th>
      <td><?php echo $user->realname;?></td>
    </tr>
    <tr>
      <th><?php echo $lang->user->email;?></th>
      <td><?php echo $user->email;?></td>
    </tr>
    <tr>
      <th><?php echo $lang->user->address;?></th>
      <td><?php echo $user->address;?></td>
    </tr>
    <tr>
      <th><?php echo $lang->user->zipcode;?></th>
      <td><?php echo $user->zipcode;?></td>
    </tr>
    <tr>
      <td></td>
      <th><?php echo $lang->user->mobile;?></th>
      <td><?php echo $user->mobile;?></td>
    </tr>
    <tr>
      <td></td>
      <th><?php echo $lang->user->phone;?></th>
      <td><?php echo $user->phone;?></td>
    </tr>
    <tr>
      <td></td>
      <th><?php echo $lang->user->qq;?></th>
      <td><?php echo $user->qq;?></td>
    </tr>
    <tr>
      <td></td>
      <th><?php echo $lang->user->weixin;?></th>
      <td><?php echo $user->weixin;?></td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td></td>
      <th></th>
      <td class='form-actions'><?php echo html::a(inlink('editself'), $lang->user->editProfile, "class='btn btn-primary loadInModal'");?></td>
    </tr>
  </tfoot>
</table>
<?php include '../../common/view/footer.modal.html.php';?>
