<div class="plate">
    <div class="plate_ttl __secondary ic_user"><h1><?=$this->PAGE['name']?></h1></div>

    <div class="inner-wrap pad-wrap">
    <?if($this->error){?>
    	<div class="warning"><?=$this->error?></div>
    <?}?>
        <div class="user-info_avatar"><img src="<?=Serval::call('Auth')->Data['avatar'] ? Serval::call('Auth')->Data['avatar'] : (isset($this->config['http_dir']) ? $this->config['http_dir'] : '/').'skin/images/no-photo.png'?>" alt="Аватар"></div>
        <table class="tbl-base">
            <tr>
                <td class="sbold">ФИО пользователя:</td>
                <td><?=Serval::call('Auth')->Data['fio']?></td>
            </tr>
            <tr>
                <td class="sbold">E-mail:</td>
                <td><?=Serval::call('Auth')->Data['email']?></td>
            </tr>
            <tr>
                <td class="sbold">Статус пользователя:</td>
                <td>
						    <?
									switch(Serval::call('Auth')->Data['type']){
										case 'admin':
											?><span class="__admin">Администратор</span><?
										break;
										case 'user':
											?>Пользователь<?
										break;
									}
								?>					
								</td>
            </tr>
        </table>
        <div class="bttns-wrap">
            <a href="javascript:history.back()" class="btn __base-inverse __light ic_arr-left">Назад</a>
            <a href="#change-pass" data-width="640" data-height="380" class="btn open-dialog __base-inverse __light">Изменить пароль</a>
            <a href="#user" data-width="640" data-height="480" class="open-dialog btn __primary ic_edit" data-title="Редактирование пользователя">Редактировать</a>
        </div>
    </div>

</div>

<div id="change-pass" class="popup">
    <form method="post" name="password_save" class="form-base" enctype="multipart/form-data">
        <div class="grid">
            <div class="grid_cell form-base_lbl">Старый пароль:</div>
            <div class="grid_cell form-base_inp"><input required class="inp-base" type="password" name="oldpassword" value=""></div>
        </div>
        <div class="grid">
            <div class="grid_cell form-base_lbl">Новый пароль:</div>
            <div class="grid_cell form-base_inp"><input required class="inp-base" type="password" name="password" value=""></div>
        </div>
        <div class="grid">
            <div class="grid_cell form-base_lbl">Повторите пароль:</div>
            <div class="grid_cell form-base_inp"><input required class="inp-base" type="password" name="password2" value=""></div>
        </div>
        <div class="form-base_bttns">
            <button name="password_save" class="btn __primary ic_edit">Сохранить</button>
        </div>
    </form>
</div>

<div id="user" class="popup">
    <form method="post" name="add_user" class="form-base" enctype="multipart/form-data">
        <div class="grid">
            <div class="grid_cell form-base_lbl">	
                <div class="user-info_avatar"><img src="<?=Serval::call('Auth')->Data['avatar'] ? Serval::call('Auth')->Data['avatar'] : (isset($this->config['http_dir']) ? $this->config['http_dir'] : '/').'skin/images/no-photo.png'?>" alt="Аватар"></div>
            </div>
            <div class="grid_cell form-base_inp">
                <label class="file-upload ic_file">
                    <span class="file-upload_mark">Загрузить аватар</span>
                    <input type="file" name="avatar">
                </label>
            </div>
        </div>
        <div class="grid">
            <div class="grid_cell form-base_lbl">ФИО пользователя:</div>
            <div class="grid_cell form-base_inp"><input class="inp-base" type="text" name="fio" value="<?=escape( Serval::call('Auth')->Data['fio'] )?>"></div>
        </div>
        <div class="form-base_bttns">
            <button name="save" class="btn __primary ic_edit">Сохранить</button>
        </div>
    </form>
</div>