Example #1
0
$self = $session->userCheck($user);
$emailP = $user->email_privacy;
$locationP = $user->location_privacy;
$phoneNumberP = $user->phoneNumber_privacy;
$genderP = $user->gender_privacy;
$birthP = $user->birthDate_privacy;
$pub = $emailP && $locationP && $phoneNumberP && $genderP && $birthP ? true : false;
$custom = ($emailP || $locationP || $phoneNumberP || $genderP || $birthP) && !$pub ? true : false;
$linksP = $user->links_privacy;
$public = "<i title=\"Public\" class=\"world icon\"></i>";
$private = "<i title=\"Private\" class=\"lock icon\"></i>";
$has_pic = Images::has_pic($id);
$q_count = count($QNA->get_questions_by_user($id));
$following = $userg->get_flwing($id);
$following_count = count($following);
$followers = $userg->get_flwers($id);
$followers_count = count($followers);
if (USER_ID) {
    $saved_count = count($QNA->get_saved(USER_ID));
}
$pageTitle = $name;
$sec = 'profile';
include ROOT_PATH . "inc/head.php";
?>
<div class="ui ui container section">
<?php 
if ($session->is_logged_in() && !$self) {
    require 'templates/user-profile-user.php';
} elseif ($self) {
    require_once 'templates/user-profile-self.php';
} else {
Example #2
0
<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/src/init.php";
$id = $_POST['uid'];
$user = new User();
$following = $user->get_flwers($id);
?>
<div class="ui three stackable cards">
<?php 
foreach ($following as $f) {
    if (!is_object($f)) {
        continue;
    }
    $is_frnd = $user->is_friend($f->id, USER_ID);
    ?>
	<div class="card">
			<a class="image" href="/user/<?php 
    echo $f->id;
    ?>
/">
				<img src="<?php 
    echo $f->img_path;
    ?>
">
			</a>
		<div class="content">
			<div class="header"><a href="/user/<?php 
    echo $f->id;
    ?>
/"><?php 
    echo $f->full_name;