Файл: Space race/profile.php
Строк: 146
<?php include_once('classes/profile.class.php');?>
<?php include_once('header.php');?>
<h1>
<?php if ($profile->getOption('custom-avatar-enable')): ?>
<form class="hide" action="profile.php" method="post" enctype="multipart/form-data">
<input type="file" name="uploadAvatar" id="uploadAvatar" onchange="this.form.submit();">
</form>
<a href="#" class="a-tooltip" onclick="document.getElementById('uploadAvatar').click()" data-rel="tooltip-bottom" title="Нажмите, что бы сменить аватар">
<img class="gravatar img-thumbnail" style="width:54px;" src="<?php echo $profile->get_gravatar($profile->getField('email'), false, 54); ?>"/>
</a>
<?php else: ?>
<a href="http://gravatar.com/emails/" class="a-tooltip" data-rel="tooltip-bottom" title="Выбор аватара на Gravatar.com">
<img class="gravatar img-thumbnail" src="<?php echo $profile->get_gravatar($profile->getField('email'), false, 54); ?>"/>
</a>
<?php endif ?>
<?php echo $profile->getField('username') . ' (' . $profile->getField('name') . ')'; ?>
</h1>
<br>
<div class="tabs-left">
<ul class="nav nav-tabs">
<?php if ( !$profile->guest ) : ?>
<li class="active"><a href="#usr-control" data-toggle="tab"><i class="glyphicon glyphicon-cog"></i> Настройки профиля</a></li>
<?php endif; ?>
<?php $profile->generateProfileTabs($profile->guest); ?>
<?php if (!$profile->guest && !$profile->denyAccessLogs()) : ?>
<li><a href="#usr-access-logs" data-toggle="tab"><i class="glyphicon glyphicon-list-alt"></i> Логи доступа</a></li>
<?php endif; ?>
<?php if ( !$profile->guest && !empty( $starrace_integration->enabledMethods ) ) : ?>
<li><a href="#usr-integration" data-toggle="tab"><i class="glyphicon glyphicon-random"></i> Интеграция</a></li>
<?php endif; ?>
</ul>
<form class="" method="post" action="profile.php">
<div class="tab-content">
<?php if ( !$profile->guest ) : ?>
<div class="tab-pane fade in active" id="usr-control">
<fieldset>
<legend>Основное</legend>
<div class="form-group">
<label class="control-label" for="CurrentPass">Текущий пароль</label>
<div class="controls">
<input type="password" autocomplete="off" class="form-control input-xlarge" id="CurrentPass" name="CurrentPass">
</div>
</div>
<div class="form-group">
<label class="control-label" for="name">Имя</label>
<div class="controls">
<input type="text" class="form-control input-xlarge" id="name" name="name" value="<?php echo $profile->getField('name'); ?>">
</div>
</div>
<div class="form-group">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="email" class="form-control input-xlarge" id="email" name="email" value="<?php echo $profile->getField('email'); ?>">
</div>
</div>
<div class="form-group">
<label class="control-label" for="password">Новый пароль</label>
<div class="controls">
<input type="password" autocomplete="off" class="form-control input-xlarge" id="password" name="password" placeholder="Не заполняйте, если не собираетесь менять пароль">
</div>
</div>
<div class="form-group">
<label class="control-label" for="confirm">Подтверждение нового пароля</label>
<div class="controls">
<input type="password" autocomplete="off" class="form-control input-xlarge" id="confirm" name="confirm">
</div>
</div>
<?php if ( $profile->getOption('profile-public-enable') ) : ?>
<div class="form-group">
<label class="control-label" for="confirm">Публичные ссылки</label>
<div class="controls">
<span class="uneditable-input"><?php echo SITE_PATH . 'profile.php?uid=' . $profile->getField('user_id'); ?></span>
</div>
</div>
<?php endif; ?>
</fieldset>
</div>
<?php endif; ?>
<?php $profile->generateProfilePanels($profile->guest); ?>
<?php if (!$profile->guest && !$profile->denyAccessLogs()) : ?>
<div class="tab-pane fade" id="usr-access-logs">
<fieldset>
<legend>Логи доступа</legend>
<?php $profile->generateAccessLogs(); ?>
</fieldset>
</div>
<?php endif; ?>
<?php if ( !$profile->guest && !empty( $starrace_integration->enabledMethods ) ) : ?>
<div class="tab-pane fade" id="usr-integration">
<fieldset>
<legend>Интеграция</legend><br>
<p>Использовать соц. ссылки для авторизации</p><br>
<?php
foreach ($starrace_integration->enabledMethods as $key ) :
$inUse = $starrace_integration->isUsed($key);
?><div class="col-md-3">
<a class="a-tooltip" href="#" data-rel="tooltip" tabindex="99" title="<?php echo ucwords($key); ?>">
<img src="assets/img/<?php echo $key; ?>.png" alt="<?php echo $key; ?>">
</a>
<a href="<?php echo $inUse ? '#' : '?link='.$key; ?>" class="btn btn-sm btn-info<?php echo $inUse ? ' disabled' : ''; ?>">Привязать</a>
<a href="<?php echo !$inUse ? '#' : '?unlink='.$key; ?>" class="btn btn-sm<?php echo !$inUse ? ' disabled' : ''; ?>">Отвязать</a>
</div><?php
endforeach;
?>
</fieldset>
</div>
<?php endif; ?>
<?php if ( !$profile->guest ) : ?>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Сохранить настройки</button>
</div>
<?php endif; ?>
</div>
</form>
</div>
<?php include ('footer.php'); ?>