Ejemplo n.º 1
0
    }
    //点评
    $clickuserlist = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('clickuser') . "\r\n\t\tWHERE id='{$id}' AND idtype='{$idtype}'\r\n\t\tORDER BY dateline DESC\r\n\t\tLIMIT 0,18");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $value['clickname'] = $clicks[$value['clickid']]['name'];
        $clickuserlist[] = $value;
    }
    //热点
    $topic = topic_get($blog['topicid']);
    //实名
    realname_get();
    //获取标签
    $ntags = getntags($blog['uid'], $_GET['do'], $id);
    $_TPL['css'] = 'blog';
    include_once template("space_blog_view");
} else {
    //分页
    $perpage = 10;
    $perpage = mob_perpage($perpage);
    $start = ($page - 1) * $perpage;
    //检查开始数
    ckstart($start, $perpage);
    //摘要截取
    $summarylen = 300;
    $classarr = array();
    $list = array();
    $userlist = array();
    $count = $pricount = 0;
Ejemplo n.º 2
0
    }
}
//￁ᆰᅬ슈ᅧ￁ᅬ
$space['profile_contact'] = 0;
foreach (array('mobile', 'qq', 'msn') as $value) {
    if ($space[$value]) {
        $space['profile_contact'] = 1;
    }
}
//ᄏ�위
$space['star'] = getstar($space['experience']);
//￈ᆬᄉ￴ᄍ ̄ᄌ₩
$_SGLOBAL['ad'] = array();
$_GET['view'] = 'me';
$_TPL['css'] = 'space';
$dept = isDepartment($space['uid']);
$ntags = getntags($space[uid], 'index', 0);
include_once template("space_index");
//ᄒᄎ틔ᅤᅤᅢ
function show_credit()
{
    global $_SGLOBAL, $space;
    $showcredit = getcount('show', array('uid' => $space['uid']), 'credit');
    if ($showcredit > 0) {
        if ($showcredit == 1) {
            //ᅬᅡᄚ￱ᅪ뛹
            notification_add($space['uid'], 'show', cplang('note_show_out'));
        }
        $_SGLOBAL['db']->query("UPDATE " . tname('show') . " SET credit=credit-1 WHERE uid='{$space['uid']}' AND credit>0");
    }
}
Ejemplo n.º 3
0
    }
    //点评
    $clickuserlist = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('clickuser') . "\r\n\t\tWHERE id='{$id}' AND idtype='{$idtype}'\r\n\t\tORDER BY dateline DESC\r\n\t\tLIMIT 0,18");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $value['clickname'] = $clicks[$value['clickid']]['name'];
        $clickuserlist[] = $value;
    }
    //热闹
    $topic = topic_get($pic['topicid']);
    if (empty($eventid)) {
        //实名
        realname_get();
        $ntags = getntags($pic['uid'], $_GET['do'], $picid);
        $_TPL['css'] = 'album';
        include_once template("space_album_pic");
    }
} else {
    //相册列表
    $perpage = 12;
    $perpage = mob_perpage($perpage);
    $start = ($page - 1) * $perpage;
    //检查开始数
    ckstart($start, $perpage);
    //权限过滤
    $_GET['friend'] = intval($_GET['friend']);
    //处理查询
    $default = array();
    $f_index = '';
Ejemplo n.º 4
0
        $newpoll[] = $value;
    }
    //取出最热的投票
    $timerange = $_SGLOBAL['timestamp'] - 2592000;
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('poll') . " WHERE lastvote >= '{$timerange}' ORDER BY voternum DESC LIMIT 0, 10");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        realname_set($value['uid'], $value['username']);
        //实名
        $hotpoll[] = $value;
    }
    //相关热点
    $topic = topic_get($poll['topicid']);
    //实名
    realname_get();
    //获取标签
    $ntags = getntags($poll['uid'], $_GET['do'], $pid);
    $_TPL['css'] = 'poll';
    include_once template("space_poll_view");
} else {
    $_GET['view'] = $_GET['view'] ? trim($_GET['view']) : 'new';
    if ($_GET['view'] == 'all') {
        $_GET['view'] = 'new';
    }
    //分页
    $perpage = 10;
    $start = ($page - 1) * $perpage;
    //检查开始数
    ckstart($start, $perpage);
    $wherearr = $list = array();
    $userlist = array();
    $count = $pricount = 0;
Ejemplo n.º 5
0
        $modlistiid = array();
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            $modlistiid[] = $value['uid'];
            realname_set($value['uid'], $value['username']);
            $modlist[] = $value;
        }
        if ($mtag['grade'] >= 8) {
            //´ýÉó
            $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('tagspace') . " WHERE tagid='{$tagid}' AND grade='-2' LIMIT 0,12");
            while ($value = $_SGLOBAL['db']->fetch_array($query)) {
                realname_set($value['uid'], $value['username']);
                $checklist[] = $value;
            }
        }
        //获取标签
        $ntags = getntags(implode(',', $modlistiid), $_GET['do'], $tagid);
        realname_get();
        $_TPL['css'] = 'thread';
        include_once template("space_mtag_index");
    }
} else {
    $theurl = "space.php?uid={$space['uid']}&do=mtag";
    if (empty($_GET['view'])) {
        $_GET['view'] = 'me';
    }
    if (!in_array($_GET['view'], array('me', 'hot', 'recommend', 'manage'))) {
        $_GET['view'] = 'hot';
    }
    $theurl .= "&view={$_GET['view']}";
    $actives = array($_GET['view'] => ' class="active"');
    $wherearr = array();
Ejemplo n.º 6
0
            }
        }
        // 活动查看数加 1
        if ($event['uid'] != $_SGLOBAL['supe_uid']) {
            $_SGLOBAL['db']->query("UPDATE " . tname("event") . " SET viewnum=viewnum+1 WHERE eventid='{$eventid}'");
            $event['viewnum'] += 1;
        }
        //活动开始倒计时
        if ($event['starttime'] > $_SGLOBAL['timestamp']) {
            $countdown = intval((mktime(0, 0, 0, gmdate('m', $event['starttime']), gmdate('d', $event['starttime']), gmdate('Y', $event['starttime'])) - mktime(0, 0, 0, gmdate('m', $_SGLOBAL['timestamp']), gmdate('d', $_SGLOBAL['timestamp']), gmdate('Y', $_SGLOBAL['timestamp']))) / 86400);
        }
    }
    //相关热点
    $topic = topic_get($event['topicid']);
    //获取标签
    $ntags = getntags($event['uid'], $_GET['do'], $_GET['id']);
    realname_get();
    $menu = array($view => ' class="active"');
    $_TPL['css'] = 'event';
    include template("space_event_view");
} else {
    // 活动列表
    if (!in_array($view, array("friend", "me", "all", "recommend", "city"))) {
        $view = "all";
    }
    if ($view == "friend" && !$space['friendnum']) {
        $view = "me";
    }
    if ($view == "all" || $view == "city") {
        $type = $_GET['type'] == "over" ? $_GET['type'] : "going";
    } elseif ($view == "me" || $view == "friend") {
Ejemplo n.º 7
0
    $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('comment') . " WHERE {$csql} id='{$id}' AND idtype='sid'"), 0);
    if ($count) {
        $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('comment') . " WHERE {$csql} id='{$id}' AND idtype='sid' ORDER BY dateline desc LIMIT {$start},{$perpage}");
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            realname_set($value['authorid'], $value['author']);
            $list[] = $value;
        }
    }
    //分页
    $multi = multi($count, $perpage, $page, "space.php?uid={$share['uid']}&do=share&id={$id}", '', 'comment_ul');
    //相关热点
    $topic = topic_get($share['topicid']);
    realname_get();
    $tpl_title = getstr($share['title_template'], 0, 0, 0, 0, 0, -1);
    //获取标签
    $ntags = getntags($space['uid'], $_GET['do'], $id);
    include_once template("space_share_view");
} else {
    if (empty($_GET['view']) && $space['friendnum'] < $_SCONFIG['showallfriendnum']) {
        $_GET['view'] = 'all';
        //默认显示
    }
    $perpage = 20;
    //检查开始数
    $start = ($page - 1) * $perpage;
    ckstart($start, $perpage);
    //处理查询
    $f_index = '';
    if ($_GET['view'] == 'all') {
        //大家的
        $wheresql = "1";