fetch_all_by_sql($wheresql, '', 0, 0, 1, 'at'); if($count) { $query = C::t('portal_article_title')->fetch_all_by_sql($wheresql, 'ORDER BY at.dateline DESC', $start, $perpage, 0, 'at'); foreach($query as $value) { $value['catname'] = $_G['cache']['portalcategory'][$value['catid']]['catname']; $value['onerror'] = ''; if($value['pic']) { $value['pic'] = pic_get($value['pic'], '', $value['thumb'], $value['remote'], 1, 1); } $value['dateline'] = dgmdate($value['dateline']); if($value['status'] == 0 || $value['uid'] == $_G['uid'] || $_G['adminid'] == 1) { $list[] = $value; } else { $pricount++; } } $multi = multi($count, $perpage, $page, 'portal.php', 1000); } return $return = array('list'=>$list, 'count'=>$count, 'multi'=>$multi, 'pricount'=>$pricount); } function article_title_style($value = array()) { $style = array(); $highlight = ''; if($value['highlight']) { $style = explode('|', $value['highlight']); $highlight = ' style="'; $highlight .= $style[0] ? 'color: '.$style[0].';' : ''; $highlight .= $style[1] ? 'font-weight: bold;' : ''; $highlight .= $style[2] ? 'font-style: italic;' : ''; $highlight .= $style[3] ? 'text-decoration: underline;' : ''; $highlight .= '"'; } return $highlight; }