Файл: modules/user/avatar.php
Строк: 37
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$title = _t('user_avatar');
$locate = 'in_profile';
include_header($title);
$tpl->div('title', '<b>'._t('user_avatar').'</b>');
?>
<div class="post">
<?php echo avatar($user['id']); ?>
<br/>
<?php echo _t('choose_avatar'); ?>:<br/>
<form action="/user/load_avatar/" method="post" enctype="multipart/form-data">
<input type="file" accept="image/*" name="avatar" /><br/>
<input value="<? echo _t('send'); ?>" type="submit" />
</form>
<?php
if(file_exists(ROOT.'/files/avatars/'.$user['id'].'.jpg'))
{
echo '<a href="/user/delete_avatar/">'._t('delete').' '. _t('current_user_avatar') .'</a>';
}
?>
</div>
<?php
$tpl->div('block', NAV .'<a href="/user/panel/">'._t('user_panel').'</a><br/>'
. HICO .'<a href="/">'. _t('home').'</a>');
include_footer();
?>