<% #Posting Detail Page require 'cgi' require 'worldgeeks/page' require 'worldgeeks/login' require 'worldgeeks/postings' cgi = CGI.new('html4') vars = cgi.params content_id = vars['content_id'][0] display = vars['display'][0] if display and display.length > 0 #do nothing else display = "noreply" end db = DB.new res = db.query("select title, bboard from content_items where content_id = \'" + content_id + "\'") title = res.getvalue(0,0) anchor = res.getvalue(0,1) posting = BBoardPosting.new(content_id, anchor), display) article = cgi.p { "Back to the " + cgi.a ("/worldgeeks/bboard?bboard_id=#{anchor}") { "BBoard" } + "." } com = posting.render + article.to_s page = Page.new(title, "/worldgeeks/posting?content_id=" + content_id, com, "") print CGI.pretty (page.render) %>