Archived
1
0
This repository has been archived on 2020-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
old/application/views/network/user/user_profile_card.php

90 lines
4.7 KiB
PHP
Raw Normal View History

2018-10-16 16:28:42 +00:00
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 profile-card">
<a href="<?= base_url('user/' . $data['username']) ?>">
<h1 class="profile-displayname"><?= $data['displayname'] ?></h1>
</a>
<a href="<?= base_url('user/' . $data['username']) ?>">
<h2 class="profile-username">@<?= $data['username'] ?></h2>
</a>
<br>
<a class="subscribe-button <?= isset($_SESSION['user']) && $_SESSION['user']['ID'] == $data['ID'] ? 'disabled' : '' ?> <?= $isCurrentUserFollowing ? 'subbed' : '' ?>"
data-count="<?= $stats['followerCount'] ?>">
<svg xmlns="http://www.w3.org/2000/svg">
<g>
<rect class="plus__line1" width="2" height="12" x="5" y="0"></rect>
<rect class="plus__line2" width="12" height="2" x="0" y="5"></rect>
</g>
</svg>
<span class="subscribe-text" data-follow="<?= lang('profile_follow') ?>" data-following="<?= lang('profile_following') ?>" data-unfollow="<?= lang('profile_unfollow') ?>"></span>
</a>
<p class="profile-biography"><?= $data['about'] ?></p>
<ul class="info-list">
<?php if (isset($data['country']) && $data['country'] != null): ?>
<li>
<a href="<?= base_url('posts/search?q=&type=type-users&country=' . $data['country']) ?>" data-toggle="tooltip" data-placement="left" title="<?= lang('profile_country') ?>">
<i class="fa fa-map-marker-alt"></i>
<?= lang('country_' . $data['country']) ?>
<span class="flag-icon squared rounded flag-icon-<?= strtolower($data['country']) ?>"></span>
<?php endif;
if (isset($data['language']) && $data['language'] != null): ?>
<li>
<a href="<?= base_url('posts/search?q=&type=type-users&lang=' . $data['language']) ?>" data-toggle="tooltip" data-placement="left" title="<?= lang('profile_language') ?>">
<i class="fa fa-language"></i>
<?= lang('lang_' . strtolower($data['language'])) ?>
<span class="flag-icon squared rounded flag-icon-<?= strtolower($data['language']) ?>"></span>
</a>
</li>
<?php endif;
if (isset($data['gender']) && $data['gender'] != null): ?>
<li>
<span data-toggle="tooltip" data-placement="left" title="<?= lang('profile_gender') ?>">
<?php if ($data['gender'] == 'male'): ?>
<i class="fa fa-mars"></i> <?= lang('profile_gender_male') ?>
<?php elseif ($data['gender'] == 'female'): ?>
<i class="fa fa-venus"></i> <?= lang('profile_gender_female') ?>
<?php else: ?>
<i class="fa fa-transgender"></i> <?= lang('profile_gender_other') ?>
<?php endif; ?>
</span>
</li>
<?php endif; ?>
<li>
<a href="<?= base_url('posts/search?q=&type=type-users&rank=' . $data['rank']) ?>" data-toggle="tooltip" data-placement="left" title="<?= lang('profile_user_rank') ?>">
<i class="fa fa-sitemap"></i> <?= lang('profile_rank') ?>: <?= $this->GeneralModel->getRankName($data['rank']) ?>
</a>
</li>
<li>
<span data-toggle="tooltip" data-placement="left" title="<?= lang('profile_account_age') ?>">
<i class="far fa-calendar"></i> <?= sprintf(lang('profile_account_created'), $data['time_existing']) ?>
</span>
</li>
<?php if (isset($data['birthdate']) && $data['birthdate'] != null): ?>
<li>
<span data-toggle="tooltip" data-placement="left" title="<?= lang('profile_birth_date') ?>">
<i class="fa fa-birthday-cake"></i>
<?= lang('profile_born') ?> <?= $data['birthdate'] ?> <?php if (isset($data['birthyear'])) {
echo $data['birthyear'];
} ?>
</span>
</li>
<?php endif; ?>
</ul>
<?php if (isset($data['social_networks']) && $data['social_networks'] != NULL):
$networks = explode('@', $data['social_networks']); ?>
<ul class="info-list">
<?php foreach ($networks as $network):
$networkData = explode('-', $network); ?>
<li>
<a href="<?= $networkData[2] ?>" target="_BLANK">
<i class="fab fa-<?= strtolower($networkData[0]) ?>"></i>
<?= $networkData[1] ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>