$multipage = multi($getcount, $perpage, $page, $url . "&orderby={$orderby}"); } } $groupviewed_list = get_viewedgroup(); if (empty($sgid) && empty($gid)) { foreach ($first as $key => $val) { if (is_array($val['secondlist']) && !empty($val['secondlist'])) { $first[$key]['secondlist'] = array_slice($val['secondlist'], 0, 8); } } } if (!$navtitle || !empty($sgid) || !empty($gid)) { if (!$navtitle) { $navtitle = !empty($gid) ? $nav['first']['name'] : (!empty($sgid) ? $nav['second']['name'] : ''); } $navtitle = (!empty($sgid) || !empty($gid) ? get_title_page($navtitle, $_G['page']) . ' - ' : '') . $_G['setting']['navs'][3]['navname']; $nobbname = false; } else { $nobbname = true; } if (!$metakeywords) { $metakeywords = $_G['setting']['navs'][3]['navname']; } if (!$metadescription) { $metadescription = $_G['setting']['navs'][3]['navname']; } if (empty($curtype)) { include template('diy:group/index'); } else { if (empty($sgid)) { include template('diy:group/type:' . $gid);
$_G['forum']['dateline'] = dgmdate($_G['forum']['dateline'], 'd'); $nav = get_groupnav($_G['forum']); $groupnav = $nav['nav']; $onlinemember = grouponline($_G['fid']); $groupmanagers = $_G['forum']['moderators']; $groupcache = getgroupcache($_G['fid'], array('replies', 'views', 'digest', 'lastpost', 'ranking', 'activityuser', 'newuserlist')); $seotype = 'grouppage'; $seodata['first'] = $nav['first']['name']; $seodata['second'] = $nav['second']['name']; $seodata['gdes'] = $_G['forum']['description']; $forumseoset = array(); } $_G['forum']['banner'] = get_forumimg($_G['forum']['banner']); list($navtitle, $metadescription, $metakeywords) = get_seosetting($seotype, $seodata, $forumseoset); if (!$navtitle) { $navtitle = get_title_page($_G['forum']['name'], $_G['page']); $nobbname = false; } else { $nobbname = true; } if (!empty($_G['gp_typeid']) && !empty($_G['forum']['threadtypes']['types'][$_G['gp_typeid']])) { $navtitle = strip_tags($_G['forum']['threadtypes']['types'][$_G['gp_typeid']]) . ' - ' . $navtitle; } if (!$metakeywords) { $metakeywords = $_G['forum']['name']; } if (!$metadescription) { $metadescription = $_G['forum']['name']; } if ($_G['forum']['viewperm'] && !forumperm($_G['forum']['viewperm']) && !$_G['forum']['allowview']) { showmessagenoperm('viewperm', $_G['fid'], $_G['forum']['formulaperm']);
} } $postlist[$post['pid']] = $post; } } $seodata = array('forum' => $_G['forum']['name'], 'fup' => $_G['cache']['forums'][$fup]['name'], 'subject' => $_G['forum_thread']['subject'], 'summary' => $summary, 'tags' => @implode(',', $tagnames), 'page' => intval($_G['gp_page'])); if ($_G['forum']['status'] != 3) { $seotype = 'viewthread'; } else { $seotype = 'viewthread_group'; $seodata['first'] = $nav['first']['name']; $seodata['second'] = $nav['second']['name']; } list($navtitle, $metadescription, $metakeywords) = get_seosetting($seotype, $seodata); if (!$navtitle) { $navtitle = get_title_page($_G['forum_thread']['subject'], $_G['page']) . ' - ' . strip_tags($_G['forum']['name']); $nobbname = false; } else { $nobbname = true; } if (!$metakeywords) { $metakeywords = strip_tags($thread['subject']); } if (!$metadescription) { $metadescription = $summary . ' ' . strip_tags($_G['forum_thread']['subject']); } $postno =& $_G['cache']['custominfo']['postno']; if ($postusers) { $verifyadd = ''; $fieldsadd = $_G['cache']['custominfo']['fieldsadd']; if ($_G['setting']['verify']['enabled']) {
} $groupcache = getgroupcache($_G['fid'], array('replies', 'views', 'digest', 'lastpost', 'ranking', 'activityuser', 'newuserlist'), 604800); $_G['forum']['icon'] = get_groupimg($_G['forum']['icon'], 'icon'); $_G['forum']['banner'] = get_groupimg($_G['forum']['banner']); $_G['forum']['dateline'] = dgmdate($_G['forum']['dateline'], 'd'); $_G['forum']['posts'] = intval($_G['forum']['posts']); $_G['grouptypeid'] = $_G['forum']['fup']; $groupuser = DB::fetch_first("SELECT * FROM " . DB::table('forum_groupuser') . " WHERE fid='{$_G['fid']}' AND uid='{$_G['uid']}'"); $onlinemember = grouponline($_G['fid'], 1); $groupmanagers = $_G['forum']['moderators']; $nav = get_groupnav($_G['forum']); $groupnav = $nav['nav']; $seodata = array('forum' => $_G['forum']['name'], 'first' => $nav['first']['name'], 'second' => $nav['second']['name'], 'gdes' => $_G['forum']['description']); list($navtitle, $metadescription, $metakeywords) = get_seosetting('grouppage', $seodata); if (!$navtitle) { $navtitle = get_title_page($_G['forum']['name'], $_G['page']) . ' - ' . $_G['setting']['navs'][3]['navname']; $nobbname = false; } else { $nobbname = true; } if (!$metakeywords) { $metakeywords = $_G['forum']['name']; } if (!$metadescription) { $metadescription = $_G['forum']['name']; } $_G['seokeywords'] = $_G['setting']['seokeywords']['group']; $_G['seodescription'] = $_G['setting']['seodescription']['group']; } if (in_array($action, array('out', 'viewmember', 'manage', 'index', 'memberlist'))) { $status = groupperm($_G['forum'], $_G['uid'], $action, $groupuser);
$navid = 'mn_P' . $cat['topid']; foreach ($_G['setting']['navs'] as $navsvalue) { if ($navsvalue['navid'] == $navid && $navsvalue['available'] && $navsvalue['level'] == 0) { $_G['mnid'] = $navid; break; } } $page = max(1, intval($_GET['page'])); foreach ($cat['ups'] as $val) { $cats[] = $val['catname']; } $catseoset = array('seotitle' => $cat['seotitle'], 'seokeywords' => $cat['keyword'], 'seodescription' => $cat['description']); $seodata = array('firstcat' => $cats[0], 'secondcat' => $cats[1], 'curcat' => $cat['catname'], 'page' => intval($_G['gp_page'])); list($navtitle, $metadescription, $metakeywords) = get_seosetting('articlelist', $seodata, $catseoset); if (!$navtitle) { $navtitle = get_title_page($cat['catname'], $_G['page']); $nobbname = false; } else { $nobbname = true; } if (!$metakeywords) { $metakeywords = $cat['catname']; } if (!$metadescription) { $metadescription = $cat['catname']; } $file = 'portal/list:' . $catid; include template('diy:' . $file, NULL, NULL, NULL, $cat['primaltplname']); function category_get_wheresql($cat) { $wheresql = '';
$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']);
} else { $navtitle = lang('core', 'title_friend_blog'); } } else { if ($_G['gp_order'] == 'hot') { $navtitle = lang('core', 'title_recommend_blog'); } else { $navtitle = lang('core', 'title_newest_blog'); } } if ($space['username']) { $navtitle = lang('space', 'sb_blog', array('who' => $space['username'])); } $metakeywords = $navtitle; $metadescription = $navtitle; $navtitle = get_title_page($navtitle, $_G['page']); space_merge($space, 'field_home'); include_once template("diy:home/space_blog_list"); } function blog_get_stick($uid, $stickblogs, $summarylen) { $list = array_flip($stickblogs); $stickblogs = dimplode($stickblogs); if ($stickblogs) { $query = DB::query("SELECT bf.*, b.* FROM " . DB::table('home_blog') . " b {$f_index}\r\n\t\t\tLEFT JOIN " . DB::table('home_blogfield') . " bf ON bf.blogid=b.blogid\r\n\t\t\tWHERE b.blogid IN ({$stickblogs})"); while ($value = DB::fetch($query)) { $value['message'] = getstr($value['message'], $summarylen, 0, 0, 0, -1); $value['message'] = preg_replace("/&[a-z]+\\;/i", '', $value['message']); if ($value['pic']) { $value['pic'] = pic_cover_get($value['pic'], $value['picflag']); }