当前位置: 首页>>代码示例>>PHP>>正文


PHP feed::explore方法代码示例

本文整理汇总了PHP中feed::explore方法的典型用法代码示例。如果您正苦于以下问题:PHP feed::explore方法的具体用法?PHP feed::explore怎么用?PHP feed::explore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在feed的用法示例。


在下文中一共展示了feed::explore方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
        }
    }
    // 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();
}
开发者ID:Jeg72,项目名称:php_sound,代码行数:61,代码来源:explore.php

示例2: feed

$settings = $resultSettings->fetch_assoc();
// The theme complete url
$CONF['theme_url'] = $CONF['theme_path'] . '/' . $settings['theme'];
if (!empty($_POST['start'])) {
    $feed = new feed();
    $feed->db = $db;
    $feed->url = $CONF['url'];
    if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
        $loggedIn = new loggedIn();
        $loggedIn->db = $db;
        $loggedIn->url = $CONF['url'];
        $loggedIn->username = isset($_SESSION['username']) ? $_SESSION['username'] : $_COOKIE['username'];
        $loggedIn->password = isset($_SESSION['password']) ? $_SESSION['password'] : $_COOKIE['password'];
        $verify = $loggedIn->verify();
        $feed->user = $verify;
        $feed->id = $verify['idu'];
        $feed->username = $verify['username'];
    }
    $feed->per_page = $settings['perpage'];
    $feed->categories = $feed->getCategories();
    $feed->c_per_page = $settings['cperpage'];
    $feed->c_start = 0;
    $feed->l_per_post = $settings['lperpost'];
    $feed->profile = $_POST['profile'];
    $feed->profile_data = $feed->profileData($_POST['profile']);
    if (empty($_POST['filter'])) {
        $_POST['filter'] = '';
    }
    $messages = $feed->explore($_POST['start'], $_POST['filter']);
    echo $messages[0];
}
开发者ID:Jeg72,项目名称:php_sound,代码行数:31,代码来源:load_explore.php


注:本文中的feed::explore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。