fetch_all_by_sql($wheresql, '', 0, 0, 1); if($count) { $query = C::t('portal_article_title')->fetch_all_by_sql($wheresql, 'ORDER BY dateline DESC', $start, $perpage); foreach($query as $value) { if($value['pic']) $value['pic'] = pic_get($value['pic'], 'portal', $value['thumb'], $value['remote']); $value['dateline'] = dgmdate($value['dateline']); $value['allowmanage'] = ($allowmanage || !empty($permission[$value['catid']]['allowmanage'])) ? true : false; $value['allowpublish'] = ($value['allowmanage'] || $allowpost || !empty($permission[$value['catid']]['allowpublish'])) ? true : false; $value['taghtml'] = ''; $tags = article_parse_tags($value['tag']); foreach($tags as $k=>$v) { if($v) { $value['taghtml'] .= "[{$article_tags[$k]}] "; } } $style = array(); if($value['highlight']) { $style = explode('|', $value['highlight']); $value['highlight'] = ' style="'; $value['highlight'] .= $style[0] ? 'color: '.$style[0].';' : ''; $value['highlight'] .= $style[1] ? 'font-weight: bold;' : ''; $value['highlight'] .= $style[2] ? 'font-style: italic;' : ''; $value['highlight'] .= $style[3] ? 'text-decoration: underline;' : ''; $value['highlight'] .= '"'; } $list[] = $value; } $multi = multi($count, $perpage, $page, $theurl); $categoryselect = category_showselect('portal', 'catid', false, $catid); } include_once template("portal/portalcp_category"); ?>