function viewContent($s) { $s = wap_cv($s); $s = wap_code($s); $s = strip_tags($s, "<p><br/>"); $s = wap_cv_after($s); $s = stripContent($s); return $s; }
$currentPosts[$value]['author'] = wap_cv($currentPosts[$value]['author']); $postdb[] = $currentPosts[$value]; } else { $postdb[] = array('postdate' => 'N', 'content' => getLangInfo('bbscode', 'post_deleted')); } } } } else { $query = $db->query("SELECT subject,author,content,postdate,anonymous FROM {$pw_posts} WHERE tid=" . pwEscape($rt[tid]) . " AND ifcheck=1 ORDER BY postdate {$limit}"); while ($ct = $db->fetch_array($query)) { if ($ct['content']) { $id++; $ct['subject'] = str_replace(' ', '', wap_cv($ct['subject'])); $ct['content'] = strip_tags($ct['content']); $ct['content'] = substrs($ct['content'], $db_waplimit); $ct['content'] = wap_cv($ct['content']); $ct['content'] = wap_code($ct['content']); $ct['postdate'] = get_date($ct['postdate'], "m-d H:i"); $ct['id'] = $id; $ct['author'] = $ct['anonymous'] ? $db_anonymousname : $ct['author']; $ct['author'] = wap_cv($ct['author']); $postdb[] = $ct; } } } } else { wap_msg('illegal_tid'); } wap_header('read', $db_bbsname); require_once PrintEot('wap_read'); wap_footer();
} require_once PrintEot('wap_msg'); wap_footer(); } elseif ($action == 'read') { S::gp(array('mid'), 'GP', 2); $rt = $db->get_one("SELECT m.*,mc.title,mc.content FROM pw_msg m LEFT JOIN pw_msgc mc USING(mid) WHERE m.touid=" . S::sqlEscape($winduid) . " AND m.type='rebox' AND m.mid=" . S::sqlEscape($mid)); if (!$rt) { wap_msg('no_msg'); } if ($rt['ifnew']) { $db->update("UPDATE pw_msg SET ifnew=0 WHERE mid=" . S::sqlEscape($rt['mid'])); } $rt['content'] = strip_tags($rt['content']); $rt['content'] = substrs($rt['content'], $db_waplimit); $rt['content'] = wap_cv($rt['content']); $rt['content'] = wap_code($rt['content']); $rt['title'] = wap_cv($rt['title']); $rt['username'] = wap_cv($rt['username']); $rt['mdate'] = get_date($rt['mdate']); require_once PrintEot('wap_msg'); wap_footer(); } elseif ($action == 'write') { if (!$_POST['pwuser'] || !$_POST['title'] || !$_POST['content']) { S::gp(array('touid'), 'GP', 2); if ($touid) { $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $rt = $userService->get($touid); if ($rt) { $pwuser = $rt['username']; }