Exemplo n.º 1
0
<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/src/init.php";
$QNA = new QNA();
$posts = $QNA->get_saved(USER_ID);
?>

<div class="tab-saved">
<?php 
foreach ($posts as $post) {
    ?>
	<div class="item" post-id="<?php 
    echo $post->id;
    ?>
">
		<div class="ui grid">
			<div class="fifteen wide column">
				<a href='/questions/question.php?id=<?php 
    echo $post->id;
    ?>
'><h4><?php 
    echo $post->title;
    ?>
</h4></a>
				<div class="time" id="post-date"><?php 
    echo $post->created;
    ?>
</div>
			</div>
			<div class="one wide column">
				<i class="remove large link icon" title="Remove this post" id="saved_remove"></i>
Exemplo n.º 2
0
$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 {
    require_once 'templates/user-profile-pub.php';
}
?>