$result = $db->query("SELECT " . $MOD['fields'] . " FROM {$table} WHERE {$condition} ORDER BY " . $MOD['order'] . " LIMIT {$offset},{$pagesize}", $CFG['db_expires'] && $page == 1 ? 'CACHE' : '', $CFG['db_expires']); while ($r = $db->fetch_array($result)) { if ($r['ontop']) { continue; } $r['adddate'] = timetodate($r['addtime'], 5); $r['editdate'] = timetodate($r['edittime'], 5); if ($lazy && isset($r['thumb']) && $r['thumb']) { $r['thumb'] = DT_SKIN . 'image/lazy.gif" original="' . $r['thumb']; } $r['alt'] = $r['title']; $r['title'] = set_style($r['title'], $r['style']); $r['linkurl'] = $MOD['linkurl'] . $r['linkurl']; if (!$r['username']) { $r['username'] = '******'; } $tags[] = $r; } $db->free_result($result); } $showpage = 1; $datetype = 5; include DT_ROOT . '/include/seo.inc.php'; $seo_title = ($typeid ? $TYPE[$typeid] . $seo_delimiter : '') . $GRP['title'] . $MOD['seo_name'] . $seo_delimiter . $seo_page . $seo_modulename . $seo_delimiter . $seo_sitename; $head_keywords = $GRP['title'] . $MOD['seo_name'] . ',' . $MOD['name']; $head_description = dsubstr(dtrim($GRP['content']), 200); if ($EXT['mobile_enable']) { $head_mobile = $EXT['mobile_url'] . mobileurl($moduleid, $catid, 0, $page); } $template = $GRP['template'] ? $GRP['template'] : 'group'; include template($template, $module);
$items = $db->count($table . '_group', $condition, $DT['cache_search']); $pages = pages($items, $page, $pagesize); if ($items) { $result = $db->query("SELECT * FROM {$table}_group WHERE {$condition} ORDER BY itemid DESC LIMIT {$offset},{$pagesize}", $DT['cache_search'] && $page == 1 ? 'CACHE' : '', $DT['cache_search']); while ($r = $db->fetch_array($result)) { $r['adddate'] = timetodate($r['addtime'], 5); if ($lazy && isset($r['thumb']) && $r['thumb']) { $r['thumb'] = DT_SKIN . 'image/lazy.gif" original="' . $r['thumb']; } $r['alt'] = $r['title']; $r['title'] = set_style($r['title'], $r['style']); if ($kw) { $r['title'] = str_replace($replacef, $replacet, $r['title']); } $r['linkurl'] = $MOD['linkurl'] . $r['linkurl']; $r['introduce'] = dsubstr(dtrim($r['content']), 60, '...'); $r['managers'] = $r['manager'] ? explode('|', $r['manager']) : array(); $tags[] = $r; } $db->free_result($result); } } else { if ($action == 'reply') { $condition = 'status=3'; if ($keyword) { $condition .= " AND content LIKE '%{$keyword}%'"; } if ($username) { $condition .= " AND passport='{$username}'"; } if ($fromtime) {