コード例 #1
0
<?php

include_once 'config.php';
include_once 'app/projects.php';
include_once 'app/users.php';
//include_once('../user.php');
if (empty($_SESSION['logged_in'])) {
    redirect('index.php');
}
if (isset($_GET['uid'])) {
    $user = $_GET['uid'];
} else {
    $user = $_SESSION['uid'];
}
$interactions = getInteractions($user);
if ($interactions) {
    foreach ($interactions as $i) {
        $timestamp = $i['created_on'];
        $user = getUserNameById($i['created_by']);
        $author = getUserNameById($i['author']);
        if ($i['type'] == 'ideathread') {
            $title = getIdeaTitle($i['id']);
            $url = SITE_URL . '/home.php?iid=' . $i['id'];
        }
        if ($i['type'] == 'project') {
            $title = getProjectTitle($i['id']);
            $url = SITE_URL . '/home.php?pid=' . $i['id'];
        }
        if ($i['action'] == 'like') {
            $action = 'liked';
            $icon_image = SITE_URL . '/images/icons/like.png';
コード例 #2
0
<?php

include_once 'config.php';
include_once 'app/projects.php';
include_once 'app/users.php';
if ($_GET['uid']) {
    $user_id = $_GET['uid'];
} else {
    $user_id = $_SESSION['uid'];
}
$interactions = getInteractions($user_id);
$privacy = getPrivacySettings($user_id);
$option_settings = $privacy['selected_option'];
$limit_settings = $privacy['limit_activity'];
if ($interactions) {
    foreach ($interactions as $i) {
        $timestamp = $i['created_on'];
        $user = getUserNameById($i['created_by']);
        $author = getUserNameById($i['author']);
        if ($i['type'] == 'ideathread') {
            $title = getIdeaTitle($i['id']);
            $url = SITE_URL . '/home.php?iid=' . $i['id'];
        }
        if ($i['type'] == 'project') {
            $title = getProjectTitle($i['id']);
            $url = SITE_URL . '/home.php?pid=' . $i['id'];
        }
        if ($i['action'] == 'like') {
            $action = 'liked';
            $icon_image = SITE_URL . '/images/icons/like.png';
        }