Example #1
0
            if ($uploadPhoto) {
                //$database->insert('cover_applies',array('cover_id' => $cover_id, 'user_id' => $user));
                $jsonurl = "https://graph.facebook.com/" . $uploadPhoto["id"] . "&?access_token=" . $access_token;
                $json = file_get_contents($jsonurl, 0, null, null);
                $json_output = json_decode($json);
                echo $uploadPhoto["id"];
            }
        }
    }
    //end post fb
}
//--fetch all pages--//
$all_pages = all_pages($database);
$tpl->all_pages = $all_pages;
//--fetch all topic with limit--//
$get_topics = all_topic($database);
$tpl->all_topics = $get_topics;
//--fetch all author with limit--//
$get_author = all_author($database);
$tpl->all_author = $get_author;
//--fetch all author with limit--//
$get_users = all_users($database);
$tpl->all_users = $get_users;
//--get poem of the day--//
$get_poem_of_day = poem_of_day($database);
$tpl->poem_of_day = $get_poem_of_day;
//--get user information--//
$user_image = get_user_info($database);
$tpl->user_image = $user_image;
//--get ad_zones--//
$getads = get_ad_zones($database);
Example #2
0
$page_array['param_vars'] = $vars;
$page_array['page_no_var'] = $page_no_var;
$tpl->page_array = $page_array;
//--get poem data--//
if (!empty($get_topic_poems['data'])) {
    $topic_poems_info = array();
    //get poems information for each poem received
    foreach ($get_topic_poems['data'] as $poem_id) {
        if (check_poem($database, $poem_id)) {
            $topic_poems_info[] = get_poem($database, $poem_id);
        }
    }
}
$tpl->topic_poems_info = $topic_poems_info;
//--get all topics and count poem of topic--//
$get_sidebar_topics = all_topic($database);
//--count sidebar topics poems--//
if (!empty($get_sidebar_topics)) {
    foreach ($get_sidebar_topics as $key => $sidebar_topic) {
        $sidebar_topic_id = $sidebar_topic['topic_id'];
        $get_sidebar_topics[$key]['poems_count'] = get_topic_poems($database, $sidebar_topic_id, array("ONLYCOUNT" => TRUE));
    }
}
$tpl->sidebar_topics = $get_sidebar_topics;
// Send SEO Data
if (!$get_topic_info['seo_title']) {
    $tpl->page_title = $get_topic_info['topic_name'];
} else {
    $tpl->page_title = $get_topic_info['seo_title'];
}
if (!$get_topic_info['seo_description']) {