Example #1
0
function pcmain_blog_top_ten()
{
    global $pcconfig, $link;
    //$mostVstUsers = getHotUsersByPeriod($link,'day',_PCMAIN_USERS_NUM_); //每日热门
    if (defined("_BLOG_SCORE_STAT_")) {
        $mostVstUsers = getScoreTopUsers($link, _PCMAIN_USERS_NUM_);
    } else {
        $mostVstUsers = getMostVstUsers($link, _PCMAIN_USERS_NUM_);
    }
    ?>
<ul>
<?php 
    foreach ($mostVstUsers as $mostVstUser) {
        echo "<li><a href=\"index.php?id=" . $mostVstUser["username"] . "\"><span title=\"" . html_format($mostVstUser["description"]) . "\">" . html_format($mostVstUser["corpusname"]) . "</span></a>&nbsp;<a href=\"/bbsqry.php?userid=" . $mostVstUser["username"] . "\"><font class=\"low\">" . $mostVstUser["username"] . "</font></a></li>";
    }
    ?>
				
</ul>
<?php 
}
Example #2
0
File: opml.php Project: bianle/www2
}
//10min更新一次
if (pc_update_cache_header()) {
    return;
}
$type = 0;
@($type = intval($_GET["t"]));
$link = pc_db_connect();
if ($type == 3) {
    $blogs = getScoreTopUsers($link, 100);
    $opmlTitle = $pcconfig["BBSNAME"] . "BLOG热门用户组";
} elseif ($type == 2) {
    $blogs = getNewUsers($link, 100);
    $opmlTitle = $pcconfig["BBSNAME"] . "BLOG新用户组";
} elseif ($type == 1) {
    $blogs = getMostVstUsers($link, 100);
    $opmlTitle = $pcconfig["BBSNAME"] . "BLOG热门用户组";
} else {
    $blogs = getLastUpdates($link, 100);
    $opmlTitle = $pcconfig["BBSNAME"] . "BLOG更新用户组";
}
pc_db_close($link);
header("Content-Type: text/xml");
header("Content-Disposition: inline;filename=opml.xml");
pc_opml_init($opmlTitle);
foreach ($blogs as $blog) {
    $title = stripslashes($blog["corpusname"]);
    $htmlUrl = pc_personal_domainname($blog["username"]);
    $xmlUrl = "http://" . $pcconfig["SITE"] . "/pc/rss.php?userid=" . $blog["username"];
    $description = stripslashes($blog["description"]);
    pc_opml_outline($title, $htmlUrl, $xmlUrl, $description);