getRow("show table status like 'content_group'"); //when this table was modified $mtime = strtotime($data['Update_time']); //can't use IF_MODIFIED_SINCE for logged in users as has no concept as uniqueness customCacheControl($mtime,$cacheid,($USER->user_id == 0)); $template = 'content_themes.tpl'; if (!empty($_GET['v'])) { switch ($_GET['v']) { case '2': $source = 'sphinx'; break; case '3': $source = 'user%'; break; default: $source = 'carrot2'; break; } } else { $source = 'carrot2'; } $cacheid = $source.'.'.$USER->registered.'.'.$CONF['forums']; if (!$smarty->is_cached($template, $cacheid)) { $where = ''; if ((isset($CONF['forums']) && empty($CONF['forums'])) || $USER->user_id == 0 ) { $where .= " AND content.`source` != 'themed'"; } $prev_fetch_mode = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; $list = $db->getAll($sql = " select content.content_id,content.user_id,url,title,extract,content.updated,content.created,realname,label,score from content_group inner join content using (content_id) left join user using (user_id) where content_group.`source` like '$source' and `type` = 'info' $where group by content_id,label order by label = '(Other)',content_group.label,content_group.score desc,content_group.sort_order "); #print "
";
#print_r($sql);
#exit;
$smarty->assign_by_ref('list', $list);
if (!empty($_GET['v'])) {
$smarty->assign('v', intval($_GET['v']));
}
}
$smarty->display($template, $cacheid);
?>