示例#1
0
文件: u.php 项目: adi00/wumaproject
    require_once R_P . 'require/forum.php';
    $feed = array();
    $frienddb = array($userdb['uid']);
    (!is_numeric($page) || $page < 1) && ($page = 1);
    $limit = pwLimit(($page - 1) * $db_perpage, $db_perpage);
    if ($isU) {
        $query = $db->query("SELECT friendid FROM pw_friends WHERE uid=" . pwEscape($userdb['uid']));
        while ($rt = $db->fetch_array($query)) {
            $frienddb[] = $rt['friendid'];
        }
    }
    $count = $db->get_value("SELECT COUNT(*) AS count FROM pw_feed WHERE uid IN(" . pwImplode($frienddb) . ")");
    $pages = numofpage($count, $page, ceil($count / $db_perpage), "u.php?action={$action}&uid={$uid}&");
    $query = $db->query('SELECT f.*,m.username FROM pw_feed f LEFT JOIN pw_members m ON f.uid=m.uid WHERE f.uid IN(' . pwImplode($frienddb) . ") ORDER BY timestamp DESC {$limit}");
    while ($rt = $db->fetch_array($query)) {
        $rt['descrip'] = descriplog($rt['descrip']);
        $feed[] = $rt;
    }
    require_once PrintEot('u');
    footer();
} elseif ($action == 'show') {
    if (!$winduid && !$_G['allowprofile']) {
        Showmsg('not_login');
    }
    include_once D_P . 'data/bbscache/md_config.php';
    require_once R_P . 'require/credit.php';
    require_once R_P . 'require/forum.php';
    require_once R_P . 'require/postfunc.php';
    $customdata = $custominfo = $colonydb = array();
    $user_icon = explode('|', $userdb['icon']);
    if ($user_icon[4] && $userdb['tooltime'] < $timestamp - 86400) {
示例#2
0
function parseFeedRead($message)
{
    global $m;
    $message = str_replace(array("\r", "\n"), array('', ''), $message);
    $message = descriplog($message);
    if (strpos($message, '{#APPS_BASEURL#}') !== false) {
        $baseurl = $m == 'o' ? 'mode.php?m=o&' : 'apps.php?';
        $message = str_replace('{#APPS_BASEURL#}', $baseurl, $message);
    }
    if (strpos($message, '[/SHARE]') !== false || strpos($message, '[/share]') !== false) {
        $message = preg_replace("/\\[share\\]([\\w\\.]+),([^\\[,]+?),([\\d]{1,10})\\[\\/share\\]/eis", "", $message);
    }
    if (strpos($message, '[/IMG]') !== false || strpos($message, '[/img]') !== false) {
        $message = preg_replace("/\\[img\\](https?)?([^\\[]+?)\\[\\/img\\]/is", "", $message);
    }
    return $message;
}
示例#3
0
/**
 * share应用动态解析
 */
function parseFeed($message)
{
    global $m;
    $message = descriplog($message);
    if (strpos($message, '{#APPS_BASEURL#}') !== false) {
        $baseurl = $m == 'o' ? 'mode.php?m=o&' : 'apps.php?';
        $message = str_replace('{#APPS_BASEURL#}', $baseurl, $message);
    }
    if (strpos($message, '[/SHARE]') !== false || strpos($message, '[/share]') !== false) {
        $message = preg_replace("/\\[share\\]([\\w\\.]+),([^\\[,]+?),([\\d]{1,10})\\[\\/share\\]/eis", "shareEvea('\\1','\\2','\\3')", $message);
    }
    if (strpos($message, '[/IMG]') !== false || strpos($message, '[/img]') !== false) {
        $message = preg_replace("/\\[img\\](https?)?([^\\[]+?)\\[\\/img\\]/is", "<img src=\"\\1\\2\"  width=\"80px\" height=\"80px\" />", $message);
    }
    return $message;
}