fetch_all_forum(1); foreach($query as $forum) { if($forum['type'] != 'group') { $threads += $forum['threads']; $posts += $forum['posts']; $todayposts += $forum['todayposts']; if($forum['type'] == 'forum' && isset($catlist[$forum['fup']])) { if(forum($forum)) { $catlist[$forum['fup']]['forums'][] = $forum['fid']; $forum['orderid'] = $catlist[$forum['fup']]['forumscount']++; $forum['subforums'] = ''; $forumlist[$forum['fid']] = $forum; } } elseif(isset($forumlist[$forum['fup']])) { $forumlist[$forum['fup']]['threads'] += $forum['threads']; $forumlist[$forum['fup']]['posts'] += $forum['posts']; $forumlist[$forum['fup']]['todayposts'] += $forum['todayposts']; } } else { $forum['forumscount'] = 0; $catlist[$forum['fid']] = $forum; } } ob_start(); include template('mobile/forum/discuz'); } else { include template('mobile/common/preview'); } function output_preview() { $content = ob_get_contents(); ob_end_clean(); ob_start(); $content = preg_replace_callback("/\(.*?)\<\/a\>/", 'output_preview_callback_replace_href_21', $content); echo $content; exit; } function output_preview_callback_replace_href_21($matches) { return replace_href($matches[2]); } function replace_href($html_str) { $string = "".stripslashes($html_str).""; return $string; } ?>