.append("<link href=\"/css/scenario.css\" rel=\"stylesheet\" type=\"text/css\">");
buffer.append("<div id=\"center2\" ><div class=\"bai\" >");
buffer
.append("<div class=\"mb12 bai\" style=\"display:none\" id=\"problem_main\"> <div class=\"rg_1\"></div><div class=\"rg_2\"></div><div class=\"rg_3\"></div><div class=\"rg\" id=\"problem\">");
Problem result = new Problem();
// ArrayList results = cdp.query(problem);
result = (Problem) cdp.get(problem);
ArrayList solutions = result.getSolutions();
if (result.getProblemStatus().equals("最终解决方案征集中")) {
buffer
.append("<div class=\"t1\" id=\"question_status\"><div class=\"ico\"><div class=\"iwhy\"></div></div>问题状态:"
+ result.getProblemStatus() + " </div>");
} else {
buffer
.append("<div class=\"t1\" id=\"question_status\"><div class=\"ico\"><div class=\"iok\"></div></div>问题状态:"
+ result.getProblemStatus() + " </div>");
}
// 读取中该问题的解决方案的总数和正在投票中的解决方案的数目
int total_num = solutions.size();
int voting_num = 0;
Solution solution = new Solution();
for (int i = 0; i < solutions.size(); i++) {
solution = (Solution) solutions.get(i);
if (solution.getIsVoting().equals("Y")) {
voting_num++;
}
}
buffer
.append("<div class =\"t1\" id=\"solution_status\">现共有<span style=\"color:#FF0099\">"
+ total_num
+ "</span>个解决方案,其中<span style=\"color:#FF0099\">"
+ voting_num + "</span>个解决方案在投票中</div>");
// buffer.append("<div class =\"t1\" id=\"solution_status\"><A
// class=\"bluelink\" onclick=;
// href=\"javascript:showProblem(<%=problemId%>);\">查看所有评论</A> </div>");
// 取出消息的主体
buffer.append("<div class=\"bc0\"><div class=\"p90\">");
// 标题
buffer
.append("<div class=\"f14 B wr\" id=\"question_title\"> <cq>问题标题: <br> "
+ result.getProblemTitle() + "</cq></div>");
// 悬赏分
buffer
.append("<div class=\"wr\" id=\"question_info\"><span class=\"award\"></span><span class=\"red\">悬赏分:"
+ result.getProblemAward() + "</span> </div>");
// 问题内容
ProblemVersion problemversion = new ProblemVersion();
problemversion.setProblemId(result.getProblemId());
ArrayList problemversions = cdp.query(problemversion);
problemversion = (ProblemVersion) problemversions.get(0);
buffer.append("<div class=\"f14 wr\" id=\"question_content\"><cd>"
+ problemversion.getProblemContent() + "</cd></div>");
// 嵌入两个div,modify_problem和ambiguity_list用于修改问题
buffer.append("<div class=\"f14 wr\" id=\"modify_problem\"></div>");
buffer.append("<div class=\"f14 wr\" id=\"ambiguity_list\"></div>");
buffer.append("<div class=\"f14 wr\" id=\"question_sup\"></div></div>");
// 加入修改按钮,modifyProblem,false是没有修改权限,true是有修改权限
if (modifyProblem == true) {
buffer
.append("<div align=\"left\" id=\"modify_problem_button\"><a href=\"javascript:Problem.modifyProblem("
+ problem.getProblemId()
+ ")\" style=\"padding:5px 10px 5px 10px !important;padding:4px 10px 4px 10px;height:1px;border:1px solid #7AA9DF;background-color:#EAF3FC;font-size:12px\">修改问题</a></div>");
}
// 得到提问者
buffer
.append("<div align=\"right\" class=\"gray wr\" id=\"question_author\" >提问者:<a href=\"#\" target=_blank>"
+ result.getUserName()
+ "</a> 时间:"
+ result.getBuildTime()
+ "<a href=\"#\" style=\"display:none\" target=_blank> - 魔法师 五级</a> </div></div>");
buffer
.append("</div><div class=\"rg_4\"></div><div class=\"rg_5\"></div><div class=\"rg_1\"></div></div>");
buffer.append("<div id=\"tabs\" style=\"display:none\">");