本文整理汇总了PHP中feed::updateStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP feed::updateStatus方法的具体用法?PHP feed::updateStatus怎么用?PHP feed::updateStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类feed
的用法示例。
在下文中一共展示了feed::updateStatus方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
} else {
// Start displaying the Feed
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->per_page = $settings['perpage'];
$feed->time = $settings['time'];
$feed->censor = $settings['censor'];
$feed->smiles = $settings['smiles'];
$feed->c_per_page = $settings['cperpage'];
$feed->c_start = 0;
$feed->l_per_post = $settings['lperpost'];
$feed->online_time = $settings['conline'];
$feed->friends_online = $settings['ronline'];
$feed->subscriptionsList = $feed->getSubs($verify['idu'], 0);
$feed->subscribersList = $feed->getSubs($verify['idu'], 1);
$feed->updateStatus($verify['offline']);
// Useed in timeline javascript which checks for new messages
$TMPL['subs'] = 1;
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('shared/rows');
$rows = '';
if (empty($_GET['filter'])) {
$_GET['filter'] = '';
}
// Allowed types
list($timeline, $message) = $feed->getFeed(0, $_GET['filter']);
$TMPL['messages'] = $timeline;
$rows = $skin->make();
$skin = new skin('feed/sidebar');
$sidebar = '';
$TMPL['editprofile'] = $feed->fetchProfileWidget($verify['username'], realName($verify['username'], $verify['first_name'], $verify['last_name']), $verify['image']);
$TMPL['sidebar'] = $feed->sidebarTypes($_GET['filter'], $feed->subscriptions);
$TMPL['dates'] = $feed->sidebarDates($_GET['filter'], $feed->subscriptions);
$TMPL['trending'] = $feed->sidebarTrending($_GET['tag'], 5);
$TMPL['users'] = $feed->onlineUsers();
$TMPL['subscriptions'] = $feed->sidebarSubs(0, 0);
$TMPL['subscribers'] = $feed->sidebarSubs(1, 0);
$TMPL['friendsactivity'] = $feed->sidebarFriendsActivity(20, 1);
if (count($feed->subscriptionsList[0]) < 6) {
$TMPL['suggestions'] = $feed->sidebarSuggestions();
}
$TMPL['ad'] = generateAd($settings['ad3']);
$sidebar = $skin->make();
$skin = new skin('shared/top');
$top = '';
// $TMPL['top'] = $feed->getForm();
$TMPL['theme_url'] = $CONF['theme_url'];
$TMPL['private_message'] = $verify['privacy'];
$TMPL['avatar'] = $verify['image'];
$TMPL['url'] = $CONF['url'];
$top = $skin->make();
$TMPL = $TMPL_old;
unset($TMPL_old);
$TMPL['top'] = $top;
$TMPL['rows'] = $rows;
$TMPL['sidebar'] = $sidebar;
// If the username input string is an e-mail, switch the query
if (isset($_SESSION['username'])) {
if (filter_var($_SESSION['username'], FILTER_VALIDATE_EMAIL)) {
$result = $db->query("SELECT * FROM `users` WHERE `email` = '" . $_SESSION['username'] . "' AND `password` = '" . $_SESSION['password'] . "'");
} else {
$result = $db->query("SELECT * FROM `users` WHERE `username` = '" . $_SESSION['username'] . "' AND `password` = '" . $_SESSION['password'] . "'");
}
} elseif (isset($_COOKIE['username'])) {
if (filter_var($_COOKIE['username'], FILTER_VALIDATE_EMAIL)) {
$result = $db->query("SELECT * FROM `users` WHERE `email` = '" . $_COOKIE['username'] . "' AND `password` = '" . $_COOKIE['password'] . "'");
} else {
$result = $db->query("SELECT * FROM `users` WHERE `username` = '" . $_COOKIE['username'] . "' AND `password` = '" . $_COOKIE['password'] . "'");
}
}
while ($row = $result->fetch_assoc()) {
$status = $row['status'];
}
if ($status == 0) {
header("Location: " . $CONF['url'] . "/index.php?a=contact");
} elseif ($status == 1) {
header("Location: " . $CONF['url'] . "/index.php?a=employee");
}
}
} else {
// If the session or cookies are not set, redirect to home-page
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
if (isset($_GET['logout']) == 1) {
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
//.........这里部分代码省略.........
示例2: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
} else {
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->time = $settings['time'];
$feed->updateStatus($verify['offline']);
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('track/edit');
$rows = '';
$TMPL['url'] = $CONF['url'];
$TMPL['page_title'] = $LNG['upload'];
$TMPL['form_url'] = $CONF['url'] . '/requests/post_track.php';
$feed->art_size = $settings['artsize'];
$feed->art_format = $settings['artformat'];
$feed->paypalapp = $settings['paypalapp'];
$feed->track_size_total = $feed->getProStatus($feed->id, 1) ? $settings['protracktotal'] : $settings['tracksizetotal'];
$feed->track_size = $feed->getProStatus($feed->id, 1) ? $settings['protracksize'] : $settings['tracksize'];
$feed->track_format = $settings['trackformat'];
$TMPL['art'] = 'default.png';
$date = explode('-', $TMPL['release']);
$TMPL['years'] = generateDateForm(0, $date[0]);
$TMPL['months'] = generateDateForm(1, $date[1]);
$TMPL['days'] = generateDateForm(2, $date[2]);
// Se the download to off by default
$TMPL['doff'] = ' selected="selected"';
// Set the visiblity to public by default
$TMPL['pon'] = ' selected="selected"';
if ($TMPL['license'] == 0) {
$TMPL['ar'] = 'checked';
} else {
$TMPL['cc'] = 'checked';
$license = str_split($TMPL['license']);
$TMPL['nc'] = $license[1];
$TMPL['nd_sa'] = $license[2];
}
$TMPL['display'] = 'inhert';
$TMPL['onclick'] = 'startUpload()';
$TMPL['btntext'] = $LNG['upload'];
$rows = $skin->make();
$skin = new skin('upload/sidebar');
$sidebar = '';
$TMPL['statistics'] = $feed->sidebarStatistics(null, 2);
$TMPL['go_pro'] = $feed->goProMessage(1, 1);
$sidebar = $skin->make();
$TMPL = $TMPL_old;
unset($TMPL_old);
$TMPL['rows'] = $rows;
$TMPL['sidebar'] = $sidebar;
}
} else {
// If the session or cookies are not set, redirect to home-page
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
if (isset($_GET['logout']) == 1) {
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
$TMPL['url'] = $CONF['url'];
$TMPL['title'] = $LNG['upload'] . ' - ' . $settings['title'];
$skin = new skin('upload/content');
return $skin->make();
}
示例3: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
$_GET['u'] = htmlspecialchars($_GET['u']);
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
// If the $_GET user is empty, define default user as current logged in user, else redirect to home-page
if ($_GET['u'] == '') {
$_GET['u'] = !empty($verify['username']) ? $verify['username'] : header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
}
// Start displaying the Feed
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->per_page = $settings['perpage'];
$feed->categories = $feed->getCategories();
$feed->time = $settings['time'];
$feed->c_per_page = $settings['cperpage'];
$feed->c_start = 0;
$feed->l_per_post = $settings['lperpost'];
if ($verify['username']) {
$feed->updateStatus($verify['offline']);
}
// If the $_GET user is empty, define default user as current logged in user, else redirect to home-pag
if ($_GET['u'] == '') {
$_GET['u'] = !empty($feed->username) ? $feed->username : header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
$feed->profile = $_GET['u'];
$feed->profile_data = $feed->profileData($_GET['u']);
$feed->subscriptionsList = $feed->getSubs($feed->profile_data['idu'], 0, null);
$feed->subscribersList = $feed->getSubs($feed->profile_data['idu'], 1, null);
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('shared/rows');
$rows = '';
if (empty($_GET['filter'])) {
$_GET['filter'] = '';
}
// Allowed types
list($timeline, $message) = $feed->getProfile(0, $_GET['filter']);
if ($_GET['r'] == 'subscriptions') {
if ($message !== 1) {
$feed->s_per_page = $settings['sperpage'];
$feed->subsList = $feed->getSubs($feed->profile_data['idu'], 0, 0);
$TMPL['messages'] = $feed->listSubs(0);
} else {
$TMPL['messages'] = $timeline;
}
$title = $LNG['subscriptions'];
} elseif ($_GET['r'] == 'subscribers') {
if ($message !== 1) {
$feed->s_per_page = $settings['sperpage'];
$feed->subsList = $feed->getSubs($feed->profile_data['idu'], 1, 0);
$TMPL['messages'] = $feed->listSubs(1);
} else {
$TMPL['messages'] = $timeline;
}
$title = $LNG['subscribers'];
} elseif ($_GET['r'] == 'likes') {
if ($message !== 1) {
$likes = $feed->getLikes(0, 1);
$TMPL['messages'] = $likes[0];
} else {
$TMPL['messages'] = $timeline;
}
$title = $LNG['likes'];
} elseif ($_GET['r'] == 'playlists') {
if ($message !== 1) {
$TMPL['messages'] = $feed->getPlaylists(0, 1);
} else {
$TMPL['messages'] = $timeline;
}
$title = $LNG['playlists'];
} else {
$TMPL['messages'] = $timeline;
}
$rows = $skin->make();
$skin = new skin('profile/sidebar');
$sidebar = '';
// If the username doesn't exist
if ($message !== 1) {
$TMPL['about'] = $feed->fetchProfileInfo($feed->profileData($_GET['u']));
$TMPL['dates'] = $feed->sidebarDates($_GET['filter'], 'profile');
$TMPL['ad'] = generateAd($settings['ad4']);
} else {
$skin = new skin('profile/sidebar');
$sidebar = '';
$TMPL['ad'] = generateAd($settings['ad4']);
}
$sidebar = $skin->make();
$TMPL = $TMPL_old;
//.........这里部分代码省略.........
示例4: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
} else {
// Start displaying the Feed
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->per_page = $settings['perpage'];
$feed->time = $settings['time'];
$feed->censor = $settings['censor'];
$feed->smiles = $settings['smiles'];
$feed->c_per_page = $settings['cperpage'];
$feed->c_start = 0;
$feed->l_per_post = $settings['lperpost'];
$feed->online_time = $settings['conline'];
$feed->friends_online = $settings['ronline'];
$feed->subscriptionsList = $feed->getSubs($verify['idu'], 0);
$feed->subscribersList = $feed->getSubs($verify['idu'], 1);
$feed->updateStatus($verify['offline']);
$TMPL['uid'] = $verify['idu'];
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('shared/rows');
$rows = '';
if (empty($_GET['filter'])) {
$_GET['filter'] = '';
}
// Allowed types
list($timeline, $message) = $feed->getTimeline(0, $_GET['filter']);
$TMPL['messages'] = $timeline;
$rows = $skin->make();
$skin = new skin('timeline/sidebar');
$sidebar = '';
$TMPL['editprofile'] = $feed->fetchProfileWidget($verify['username'], realName($verify['username'], $verify['first_name'], $verify['last_name']), $verify['image']);
$TMPL['sidebar'] = $feed->sidebarTypes($_GET['filter'], 'timeline');
$TMPL['dates'] = $feed->sidebarDates($_GET['filter'], 'timeline');
$TMPL['trending'] = $feed->sidebarTrending($_GET['tag'], 5);
$TMPL['users'] = $feed->onlineUsers();
$TMPL['subscriptions'] = $feed->sidebarSubs(0, 0);
$TMPL['subscribers'] = $feed->sidebarSubs(1, 0);
$TMPL['friendsactivity'] = $feed->sidebarFriendsActivity(20, 1);
if (count($feed->subscriptionsList[0]) < 6) {
$TMPL['suggestions'] = $feed->sidebarSuggestions();
}
$TMPL['ad'] = generateAd($settings['ad2']);
$sidebar = $skin->make();
$skin = new skin('shared/top');
$top = '';
// $TMPL['top'] = $feed->getForm();
$TMPL['theme_url'] = $CONF['theme_url'];
$TMPL['private_message'] = $verify['privacy'];
$TMPL['avatar'] = $verify['image'];
$TMPL['url'] = $CONF['url'];
$top = $skin->make();
$TMPL = $TMPL_old;
unset($TMPL_old);
$TMPL['top'] = $top;
$TMPL['rows'] = $rows;
$TMPL['sidebar'] = $sidebar;
}
} else {
// If the session or cookies are not set, redirect to home-page
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
if (isset($_GET['logout']) == 1) {
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
$TMPL['url'] = $CONF['url'];
$TMPL['title'] = $LNG['title_timeline'] . ' - ' . $settings['title'];
$skin = new skin('shared/timeline');
return $skin->make();
}
示例5: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
} else {
// Start displaying the Feed
}
}
// Start the music feed
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->per_page = $settings['perpage'];
$feed->categories = $feed->getCategories();
$feed->time = $settings['time'];
$feed->l_per_post = $settings['lperpost'];
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('shared/rows');
$rows = '';
if (empty($_GET['filter'])) {
$_GET['filter'] = '';
}
// Allowed types
list($timeline, $message) = $feed->explore(0, $_GET['filter']);
$TMPL['messages'] = $timeline;
$rows = $skin->make();
$skin = new skin('explore/sidebar');
$sidebar = '';
$feed->online_time = $settings['conline'];
$feed->friends_online = $settings['ronline'];
$feed->updateStatus($verify['offline']);
if ($verify['username']) {
$TMPL['upload'] = $feed->sidebarButton();
$TMPL['suggestions'] = $feed->sidebarSuggestions();
}
$TMPL['categories'] = $feed->sidebarCategories($_GET['filter']);
$TMPL['ad'] = generateAd($settings['ad2']);
$sidebar = $skin->make();
$TMPL = $TMPL_old;
unset($TMPL_old);
$TMPL['rows'] = $rows;
$TMPL['sidebar'] = $sidebar;
if (isset($_GET['logout']) == 1) {
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
$TMPL['url'] = $CONF['url'];
$TMPL['title'] = $LNG['explore'] . (!empty($_GET['filter']) ? ' - ' . htmlspecialchars($_GET['filter']) . ' - ' : ' - ') . $settings['title'];
$TMPL['header'] = pageHeader($LNG['explore'] . (!empty($_GET['filter']) ? ' - ' . $_GET['filter'] : ''));
$skin = new skin('shared/content');
return $skin->make();
}
示例6: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
// Seconds to microseconds
$TMPL['chatr'] = $settings['chatr'] * 1000;
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
} else {
// Start displaying the Feed
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->username = $verify['username'];
$feed->id = $verify['idu'];
$feed->per_page = $settings['perpage'];
$feed->time = $settings['time'];
$feed->c_per_page = $settings['cperpage'];
$feed->c_start = 0;
$feed->m_per_page = $settings['mperpage'];
$feed->l_per_post = $settings['lperpost'];
$feed->online_time = $settings['conline'];
$feed->sound_new_chat = $verify['sound_new_chat'];
$feed->subscriptionsList = $feed->getSubs($verify['idu'], 0);
$feed->subscribersList = $feed->getSubs($verify['idu'], 1);
$feed->updateStatus($verify['offline']);
$TMPL['uid'] = $verify['idu'];
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('messages/rows');
$rows = '';
if (empty($_GET['filter'])) {
$_GET['filter'] = '';
}
// Allowed types
$TMPL['messages'] = $feed->getChat($_GET['id'], $feed->profileData($_GET['u']));
$rows = $skin->make();
$skin = new skin('messages/sidebar');
$sidebar = '';
$TMPL['users'] = $feed->onlineUsers(1, $_GET['u']);
$sidebar = $skin->make();
$TMPL = $TMPL_old;
unset($TMPL_old);
$TMPL['rows'] = $rows;
$TMPL['sidebar'] = $sidebar;
}
} else {
// If the session or cookies are not set, redirect to home-page
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
if (isset($_GET['logout']) == 1) {
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
$TMPL['url'] = $CONF['url'];
$TMPL['title'] = $LNG['title_messages'] . ' - ' . $settings['title'];
$skin = new skin('messages/content');
return $skin->make();
}
示例7: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
} else {
// Start displaying the Feed
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->time = $settings['time'];
$feed->paypalapp = $settings['paypalapp'];
$feed->trackList = implode(',', $feed->getTrackList(!empty($feed->profile_id) ? $feed->profile_id : $feed->id));
$feed->updateStatus($verify['offline']);
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('stats/rows');
$rows = '';
$TMPL['title'] = $LNG['stats_' . (empty($_GET['filter']) ? 'today' : $_GET['filter'])];
if (empty($_GET['filter'])) {
$_GET['filter'] = '';
}
$stats = $feed->getUserStats($_GET['filter'], 0);
$most = $feed->getUserStats($_GET['filter'], 1, 10);
$TMPL['plays'] = $stats['plays'];
$TMPL['likes'] = $stats['likes'];
$TMPL['comments'] = $stats['comments'];
$TMPL['downloads'] = $stats['downloads'];
$TMPL['most_played'] = $most['plays'];
$TMPL['most_liked'] = $most['likes'];
$TMPL['most_commented'] = $most['comments'];
$TMPL['played_most'] = $most['played'];
$TMPL['downloaded_most'] = $most['downloaded'];
$TMPL['top_countries'] = $most['countries'];
$TMPL['top_cities'] = $most['cities'];
$TMPL['go_pro'] = $most['gopro'];
$rows = $skin->make();
$skin = new skin('stats/sidebar');
$sidebar = '';
$TMPL['filter'] = $feed->sidebarStatsFilters($_GET['filter']);
$sidebar = $skin->make();
$TMPL = $TMPL_old;
unset($TMPL_old);
$TMPL['rows'] = $rows;
$TMPL['sidebar'] = $sidebar;
}
} else {
// If the session or cookies are not set, redirect to home-page
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
if (isset($_GET['logout']) == 1) {
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
$TMPL['url'] = $CONF['url'];
$TMPL['title'] = $LNG['statistics'] . ' - ' . $settings['title'];
$skin = new skin('stats/content');
return $skin->make();
}
示例8: PageMain
function PageMain()
{
global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$verify = $loggedIn->verify();
if (empty($verify['username'])) {
// If fake cookies are set, or they are set wrong, delete everything and redirect to home-page
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
} else {
// Start displaying the Feed
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
$feed->user = $verify;
$feed->id = $verify['idu'];
$feed->username = $verify['username'];
$feed->per_page = $settings['perpage'];
$feed->categories = $feed->getCategories();
$feed->time = $settings['time'];
$feed->c_per_page = $settings['cperpage'];
$feed->c_start = 0;
$feed->l_per_post = $settings['lperpost'];
$feed->paypalapp = $settings['paypalapp'];
$feed->online_time = $settings['conline'];
$feed->friends_online = $settings['ronline'];
$feed->subscriptionsList = $feed->getSubs($verify['idu'], 0);
$feed->trackList = implode(',', $feed->getTrackList(!empty($feed->profile_id) ? $feed->profile_id : $feed->id));
$feed->updateStatus($verify['offline']);
// Useed in timeline javascript which checks for new messages
$TMPL['subs'] = 1;
$TMPL_old = $TMPL;
$TMPL = array();
$skin = new skin('shared/rows');
$rows = '';
if (empty($_GET['filter'])) {
$_GET['filter'] = '';
}
// Allowed types
list($timeline, $message) = $feed->stream(0, $_GET['filter']);
$TMPL['messages'] = $timeline;
$rows = $skin->make();
$skin = new skin('stream/sidebar');
$sidebar = '';
$TMPL['upload'] = $feed->sidebarButton();
$TMPL['go_pro'] = $feed->goProMessage(null, 1, 1);
$TMPL['statistics'] = $feed->sidebarStatistics(null, 0);
$TMPL['users'] = $feed->onlineUsers();
$TMPL['friendsactivity'] = $feed->sidebarFriendsActivity(5, 1);
if (count($feed->subscriptionsList[0]) < 3) {
$TMPL['suggestions'] = $feed->sidebarSuggestions();
}
$TMPL['ad'] = generateAd($settings['ad3']);
$sidebar = $skin->make();
$TMPL = $TMPL_old;
unset($TMPL_old);
$TMPL['rows'] = $rows;
$TMPL['sidebar'] = $sidebar;
}
} else {
// If the session or cookies are not set, redirect to home-page
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
if (isset($_GET['logout']) == 1) {
$loggedIn->logOut();
header("Location: " . $CONF['url'] . "/index.php?a=welcome");
}
$TMPL['url'] = $CONF['url'];
$date = explode('-', wordwrap($_GET['filter'], 4, '-', true));
$month = intval($date[1]);
$TMPL['title'] = $LNG['stream'] . (!empty($_GET['filter']) ? ' - ' . $LNG["month_{$month}"] . ' ' . $date[0] . ' - ' : ' - ') . $settings['title'];
// $TMPL['header'] = pageHeader($LNG['stream']);
$skin = new skin('shared/content');
return $skin->make();
}