コード例 #1
0
<?php

include_once 'config.php';
include_once 'app/users.php';
include_once 'app/projects.php';
if (empty($_GET['uid'])) {
    $user_id = $_SESSION['uid'];
} else {
    $user_id = intval($_GET['uid']);
}
$ideas = getIdeas(all);
if ($ideas) {
    foreach ($ideas as $idea) {
        $title = $idea['ideathread_title'];
        $description = $idea['description'];
        $time = TimeAgo(date('Y-m-d', strtotime($idea['created_on'])));
        $ideathread_id = $idea['ideathread_id'];
        $status = $idea['status'];
        $source = $idea['source_url'];
        $source_details = parse_url($source);
        if ($source_details[host] == 'rangeenroute.com' || $source_details[host] == 'www.rangeenroute.com') {
            if ($source_details[path] == '/home.php') {
                parse_str($source_details[query], $output);
                if ($output['pid']) {
                    $project_exists = true;
                    list($url, $project_id) = explode("=", $source);
                }
            }
        }
        if ($idea['thumbnail_img']) {
            $thumbnail = $idea['thumbnail_img'];
コード例 #2
0
include_once 'config.php';
include_once 'app/users.php';
include_once 'app/projects.php';
//if (empty($_GET['uid']))
//    $user_id = $_SESSION['uid'];
//else
//    $user_id = intval($_GET['uid']);
if (empty($_SESSION['logged_in'])) {
    redirect('index.php');
}
if (isset($_GET['uid'])) {
    $user_id = intval($_GET['uid']);
} else {
    $user_id = $_SESSION['uid'];
}
$ideas = getIdeas('all');
if ($ideas) {
    foreach ($ideas as $idea) {
        $title = $idea['ideathread_title'];
        $description = $idea['description'];
        $time = TimeAgo(date('Y-m-d', strtotime($idea['created_on'])));
        $ideathread_id = $idea['ideathread_id'];
        $status = $idea['status'];
        $source = $idea['source_url'];
        global $project_exists;
        $source_details = parse_url($source);
        if ($source_details['host'] == 'rangeenroute.com' || $source_details['host'] == 'www.rangeenroute.com') {
            if ($source_details[path] == '/home.php') {
                parse_str($source_details[query], $output);
                if ($output['pid']) {
                    $project_exists = true;
コード例 #3
0
<?php

include_once 'config.php';
include_once 'app/users.php';
include_once 'app/projects.php';
if (empty($_GET['uid'])) {
    $user_id = $_SESSION['uid'];
} else {
    $user_id = intval($_GET['uid']);
}
$ideas = getIdeas($user_id);
global $project_exists;
if ($ideas) {
    foreach ($ideas as $idea) {
        $title = $idea['ideathread_title'];
        $description = $idea['description'];
        $time = TimeAgo(date('Y-m-d', strtotime($idea['created_on'])));
        $ideathread_id = $idea['ideathread_id'];
        $status = $idea['status'];
        $source = $idea['source_url'];
        $source_details = parse_url($source);
        if ($source_details['host'] == 'host') {
            if ($source_details['path'] == '/home.php') {
                parse_str($source_details[query], $output);
                if ($output['pid']) {
                    $project_exists = true;
                    list($url, $project_id) = explode("=", $source);
                }
            }
        } else {
            $project_exists = false;