$clicks[$key] = $value; } $clickuserlist = array(); $query = DB::query("SELECT * FROM " . DB::table('home_clickuser') . "\n\tWHERE id='{$id}' AND idtype='{$idtype}'\n\tORDER BY dateline DESC\n\tLIMIT 0,24"); while ($value = DB::fetch($query)) { $value['clickname'] = $clicks[$value['clickid']]['name']; $clickuserlist[] = $value; } $article['dateline'] = dgmdate($article['dateline']); foreach ($cat['ups'] as $val) { $cats[] = $val['catname']; } $seodata = array('firstcat' => $cats[0], 'secondcat' => $cats[1], 'curcat' => $cat['catname'], 'subject' => $article['title'], 'user' => $article['username'], 'summary' => $article['summary'], 'page' => intval($_G['gp_page'])); list($navtitle, $metadescription, $metakeywords) = get_seosetting('article', $seodata); if (empty($navtitle)) { $navtitle = get_title_page($article['title'], $_G['page']) . ' - ' . $cat['catname']; $nobbname = false; } else { $nobbname = true; } if (empty($metakeywords)) { $metakeywords = $article['title']; } if (empty($metadescription)) { $metadescription = $article['summary'] ? $article['summary'] : $article['title']; } $seccodecheck = $_G['group']['seccode'] ? $_G['setting']['seccodestatus'] & 4 : 0; $secqaacheck = $_G['group']['seccode'] ? $_G['setting']['secqaa']['status'] & 2 : 0; $catid = $article['catid']; $_G['relatedlinks'] = getrelatedlink('article'); include_once template("diy:portal/view:{$catid}", NULL, NULL, NULL, $cat['articleprimaltplname']);
function viewthread_procpost($post, $lastvisit, $ordertype, $special = 0) { global $_G, $rushreply; if (!$_G['forum_newpostanchor'] && $post['dateline'] > $lastvisit) { $post['newpostanchor'] = '<a name="newpost"></a>'; $_G['forum_newpostanchor'] = 1; } else { $post['newpostanchor'] = ''; } $post['lastpostanchor'] = $ordertype != 1 && $_G['forum_numpost'] == $_G['forum_thread']['replies'] || $ordertype == 1 && $_G['forum_numpost'] == $_G['forum_thread']['replies'] + 2 ? '<a name="lastpost"></a>' : ''; if ($_G['forum_pagebydesc']) { if ($ordertype != 1) { $post['number'] = $_G['forum_numpost'] + $_G['forum_ppp2']--; } else { $post['number'] = $post['first'] == 1 ? 1 : $_G['forum_numpost'] - $_G['forum_ppp2']--; } } else { if ($ordertype != 1) { $post['number'] = ++$_G['forum_numpost']; } else { $post['number'] = $post['first'] == 1 ? 1 : --$_G['forum_numpost']; } } $_G['forum_postcount']++; $post['dbdateline'] = $post['dateline']; if ($_G['setting']['dateconvert']) { $post['dateline'] = dgmdate($post['dateline'], 'u'); } else { $dformat = getglobal('setting/dateformat'); $tformat = getglobal('setting/timeformat'); $post['dateline'] = dgmdate($post['dateline'], $dformat . ' ' . str_replace(":i", ":i:s", $tformat)); } $post['groupid'] = $_G['cache']['usergroups'][$post['groupid']] ? $post['groupid'] : 7; if ($post['username']) { $_G['forum_onlineauthors'][] = $post['authorid']; $post['usernameenc'] = rawurlencode($post['username']); $post['readaccess'] = $_G['cache']['usergroups'][$post['groupid']]['readaccess']; if ($_G['cache']['usergroups'][$post['groupid']]['userstatusby'] == 1) { $post['authortitle'] = $_G['cache']['usergroups'][$post['groupid']]['grouptitle']; $post['stars'] = $_G['cache']['usergroups'][$post['groupid']]['stars']; } $post['upgradecredit'] = false; if ($_G['cache']['usergroups'][$post['groupid']]['type'] == 'member' && $_G['cache']['usergroups'][$post['groupid']]['creditslower'] != 999999999) { $post['upgradecredit'] = $_G['cache']['usergroups'][$post['groupid']]['creditslower'] - $post['credits']; } $post['taobaoas'] = addslashes($post['taobao']); $post['regdate'] = dgmdate($post['regdate'], 'd'); $post['lastdate'] = dgmdate($post['lastactivity'], 'd'); $post['authoras'] = !$post['anonymous'] ? ' ' . addslashes($post['author']) : ''; if ($post['medals']) { loadcache('medals'); foreach ($post['medals'] = explode("\t", $post['medals']) as $key => $medalid) { list($medalid, $medalexpiration) = explode("|", $medalid); if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) { $post['medals'][$key] = $_G['cache']['medals'][$medalid]; $post['medals'][$key]['medalid'] = $medalid; $_G['medal_list'][$medalid] = $_G['cache']['medals'][$medalid]; } else { unset($post['medals'][$key]); } } } $post['avatar'] = avatar($post['authorid']); $post['groupicon'] = $post['avatar'] ? g_icon($post['groupid'], 1) : ''; $post['banned'] = $post['status'] & 1; $post['warned'] = ($post['status'] & 2) >> 1; } else { if (!$post['authorid']) { $post['useip'] = substr($post['useip'], 0, strrpos($post['useip'], '.')) . '.x'; } } $post['attachments'] = array(); $post['imagelist'] = $post['attachlist'] = ''; if ($post['attachment']) { if ($_G['group']['allowgetattach'] || $_G['group']['allowgetimage']) { $_G['forum_attachpids'] .= ",{$post['pid']}"; $post['attachment'] = 0; if (preg_match_all("/\\[attach\\](\\d+)\\[\\/attach\\]/i", $post['message'], $matchaids)) { $_G['forum_attachtags'][$post['pid']] = $matchaids[1]; } } else { $post['message'] = preg_replace("/\\[attach\\](\\d+)\\[\\/attach\\]/i", '', $post['message']); } } $_G['forum_ratelogpid'] .= $_G['setting']['ratelogrecord'] && $post['ratetimes'] ? ',' . $post['pid'] : ''; if ($_G['setting']['commentnumber'] && ($post['first'] && $_G['setting']['commentfirstpost'] || !$post['first'])) { $_G['forum_commonpid'] .= $post['comment'] ? ',' . $post['pid'] : ''; } $post['allowcomment'] = $_G['setting']['commentnumber'] && in_array(1, $_G['setting']['allowpostcomment']) && ($_G['setting']['commentpostself'] || $post['authorid'] != $_G['uid']) && ($post['first'] && $_G['setting']['commentfirstpost'] && in_array($_G['group']['allowcommentpost'], array(1, 3)) || !$post['first'] && in_array($_G['group']['allowcommentpost'], array(2, 3))); $_G['forum']['allowbbcode'] = $_G['forum']['allowbbcode'] ? -$post['groupid'] : 0; $post['signature'] = $post['usesig'] ? $_G['setting']['sigviewcond'] ? strlen($post['message']) > $_G['setting']['sigviewcond'] ? $post['signature'] : '' : $post['signature'] : ''; if (!defined('IN_ARCHIVER')) { $post['message'] = discuzcode($post['message'], $post['smileyoff'], $post['bbcodeoff'], $post['htmlon'] & 1, $_G['forum']['allowsmilies'], $_G['forum']['allowbbcode'], $_G['forum']['allowimgcode'] && $_G['setting']['showimages'] ? 1 : 0, $_G['forum']['allowhtml'], $_G['forum']['jammer'] && $post['authorid'] != $_G['uid'] ? 1 : 0, 0, $post['authorid'], $_G['cache']['usergroups'][$post['groupid']]['allowmediacode'] && $_G['forum']['allowmediacode'], $post['pid'], $_G['setting']['lazyload']); if ($post['first']) { if (!$_G['forum_thread']['isgroup']) { $_G['relatedlinks'] = getrelatedlink('forum'); } else { $_G['relatedlinks'] = getrelatedlink('group'); } } } $_G['forum_firstpid'] = intval($_G['forum_firstpid']); $post['custominfo'] = viewthread_custominfo($post); return $post; }
$summary = cutstr(strip_tags($blog['message']), 140); $seodata = array('subject' => $blog['subject'], 'user' => $blog['username'], 'summary' => $summary, 'tags' => $blogmeta_tag); list($navtitle, $metadescription, $metakeywords) = get_seosetting('blog', $seodata); if (empty($navtitle)) { $navtitle = $blog['subject'] . ' - ' . lang('space', 'sb_blog', array('who' => $blog['username'])); $nobbname = false; } else { $nobbname = true; } if (empty($metakeywords)) { $metakeywords = $blogmeta_tag ? $blogmeta_tag : $blog['subject']; } if (empty($metadescription)) { $metadescription = $summary; } $_G['relatedlinks'] = getrelatedlink('blog'); include_once template("diy:home/space_blog_view"); } else { loadcache('blogcategory'); $category = $_G['cache']['blogcategory']; if (empty($_GET['view'])) { $_GET['view'] = 'we'; } $perpage = 10; $perpage = mob_perpage($perpage); $start = ($page - 1) * $perpage; ckstart($start, $perpage); $summarylen = 300; $classarr = array(); $list = array(); $userlist = array();