📄 showquestion.asp
字号:
end if
if request("id")<>"" then
id=CLNG(request("id"))
end if
rs1.open"select * from pj where pjuser='"&session("person")&"' and jiaid="&id&"",conn,1,1
if not rs1.eof then
response.write"<script>alert('对不起,您不能重复评价!');history.back();</script>"
response.End()
end if
rs1.close
rs1.open"select * from pj",conn,1,3
rs1.addnew
rs1("jiaid")=id
rs1("pjuser")=session("person")
rs1("hao")=1
rs1("huai")=0
rs1.update
rs1.close
response.write"<script>alert('您的评价成功!');window.navigate('showquestion.asp?id="&id&"');</script>"
end if
if request("submitpj")="不好" then
if session("person")="" then
response.redirect "login.asp"
end if
if session("person")=rs2("replyer") then
Response.Write ("<script>alert('友情提示!\n\您不能对自己的答案进行评价!');history.back();</script>")
Response.end
end if
if not IsNumeric(request("id")) or request("id")="" then
Response.Write ("<script>alert('友情提示!\n\参数错误!');history.back();</script>")
Response.end
end if
if request("id")<>"" then
id=CLNG(request("id"))
end if
rs1.open"select * from pj where pjuser='"&session("person")&"' and jiaid="&id&"",conn,1,1
if not rs1.eof then
response.write"<script>alert('对不起,您不能重复评价!');history.back();</script>"
response.End()
end if
rs1.close
rs1.open"select * from pj",conn,1,3
rs1.addnew
rs1("jiaid")=id
rs1("pjuser")=session("person")
rs1("hao")=0
rs1("huai")=1
rs1.update
rs1.close
response.write"<script>alert('您的评价成功!');window.navigate('showquestion.asp?id="&id&"');</script>"
end if
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" colspan=2><hr size="1" color="#999999"></td>
</tr>
<tr>
<td height="25" nowrap class="f14weB"><%if now>rs2("jiatime")+30 then%><%if zongping<=200 then%>评价已经被关闭<%end if%><%else%>您觉得最佳答案好不好?<%end if%></td>
<td align="right" class="f12we">目前有 <%=pjmax%> 个人评价</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top"> <form method=post name=fpj action=showquestion.asp?id=<%=id%>>
<input type=hidden name=id value=<%=id%>>
<td width="120" height="25" class="f14">
<%if now>rs2("jiatime")+30 then
if zongping<=200 then
%>好<%else%><input type="submit" name="submitpj" value="好" class="bn100"><%end if%><%else%><%if zongping>=200 then%>好<%else%><input type="submit" name="submitpj" value="好" class="bn100"><%end if%><%end if%>
<br>
<span class="f12rd"><%if haomax=0 then hao=0 else hao=(haomax/pjmax)*100 end if%><%=round(hao,2)%>%</span> (<%=haomax%>)</td>
<td class="f14">
<%if now>rs2("jiatime")+30 then
if zongping<=200 then
%>不好<%else%><input type="submit" name="submitpj" value="不好" class="bn100"><%end if%><%else%><%if zongping>=200 then%>不好<%else%><input type="submit" name="submitpj" value="不好" class="bn100"><%end if%><%end if%>
<br>
<span class="f12gn"><%if huaimax=0 then huai=0 else huai=(huaimax/pjmax)*100 end if%><%=round(huai,2)%>%</span>(<%=huaimax%>)</td></form>
</tr>
</table>
</td></tr></table>
</td>
</tr>
</table>
<br>
<%
rs1.open"select top 3 * from ping where replyid="&rs2("id")&" order by pingtime desc",conn,1,1
if not rs1.eof then
%>
<table width="588" border="0" cellpadding="0" cellspacing="0" class=zhtable>
<tr>
<td nowrap class="bgtle"> 对最佳答案的评论</td>
</tr>
<tr><td class="bgcntLn">
<%while not rs1.eof
rs3.open"select * from person where name='"&rs1("pingname")&"'",conn,1,1
touxianp=rs3("touxian")
rs3.close
%>
<div class="f14"><%=ubb(rs1("ping"))%></div>
<div align="right"><span class="f12gy">评论者:</span> <a href=showperson.asp?name=<%=rs1("pingname")%> target=_blank><%=rs1("pingname")%></a> - <a href="help.asp#n5" target=_blank><%=touxianp%></a> </div>
<div style="padding-top:5px;padding-bottom:5px;"><hr size="1" color="#999999"></div>
<%rs1.movenext
wend
if rs1.recordcount>2 then
%><table width="588" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td ><a href="ping.asp?id=<%=jiaid%>" class="lmore" target="_blank">更多>></a></td>
</tr>
</table>
<%end if%>
<table width="588" border="0" cellspacing="0" cellpadding="0" >
</table>
</td></tr>
</table>
<br>
<%
rs1.close
end if
%>
<%
rs2.close
end if
rs2.open"select * from reply where replyid="&id&" and isdeal<>1 and tou<>1 order by replytime",conn,1,1
if rs2.eof then
if session("person")="" then
if request("reply")="提交回答" then
if session("person")="" then
response.redirect "login.asp"
end if
end if
end if
else
maxreply=rs2.recordcount
rs2.pagesize=10
maxpage=rs2.pagecount
if request("p")="" then
p=1
else
p=cint(request("p"))
end if
if p>maxpage then
p=maxpage
end if
if p=0 then
p=1
end if
if p<>1 then
rs2.move (p-1)*rs2.pagesize
end if
if request("deal")="采纳为答案" then
rs3.open"select * from reply where isdeal=1 and replyid="&request("id"),conn,1,1
if not rs3.eof then
response.write"<script>alert('该问题已经解决!');history.back();</script>"
response.End()
end if
rs3.close
rs3.open"select * from reply where id="&request("rid"),conn,1,3
replyer=rs3("replyer")
rs3("isdeal")=1
rs3("jiatime")=now
rs3.update
rs3.close
rs3.open"select * from question where id="&id&"",conn,1,3
rs3("jie")=1
rs3("jieuser")=replyer
rs3.update
rs3.close
rs3.open"select * from person where name='"&replyer&"'",conn,1,3
rs3("helpnum")=rs3("helpnum")+1
rs3("jifen")=rs3("jifen")+dajiadf+shang
if rs3("jifen")+dajiadf+shang<fen1 then
rs3("touxian")=""&ji1&" 一级"
elseif rs3("jifen")+dajiadf+shang>=fen1 and rs3("jifen")+dajiadf+shang<fen2 then
rs3("touxian")=""&ji1&" 一级"
elseif rs3("jifen")+dajiadf+shang>=fen2 and rs3("jifen")+dajiadf+shang<fen3 then
rs3("touxian")=""&ji2&" 二级"
elseif rs3("jifen")+dajiadf+shang>=fen3 and rs3("jifen")+dajiadf+shang<fen4 then
rs3("touxian")=""&ji3&" 三级"
elseif rs3("jifen")+dajiadf+shang>=fen4 and rs3("jifen")+dajiadf+shang<fen5 then
rs3("touxian")=""&ji4&" 四级"
elseif rs3("jifen")+dajiadf+shang>=fen5 and rs3("jifen")+dajiadf+shang<fen6 then
rs3("touxian")=""&ji5&" 五级"
elseif rs3("jifen")+dajiadf+shang>=fen6 and rs3("jifen")+dajiadf+shang<fen7 then
rs3("touxian")=""&ji6&" 六级"
elseif rs3("jifen")+dajiadf+shang>=fen7 and rs3("jifen")+dajiadf+shang<fen8 then
rs3("touxian")=""&ji7&" 七级"
elseif rs3("jifen")+dajiadf+shang>=fen8 and rs3("jifen")+dajiadf+shang<fen9 then
rs3("touxian")=""&ji8&" 八级"
elseif rs3("jifen")+dajiadf+shang>=fen9 and rs3("jifen")+dajiadf+shang<fen10 then
rs3("touxian")=""&ji9&" 九级"
elseif rs3("jifen")+dajiadf+shang>=fen10 then
rs3("touxian")=""&ji10&" 十级"
end if
rs3.update
rs3.close
rs3.open"select * from question where id="&id&"",conn,1,1
leiname=rs3("topic")
rs3.close
rs3.open"select * from assort where topic='"&leiname&"'",conn,1,1
flid=rs3("id")
rs3.close
rs3.open"select * from zhuanjia where flid="&flid&" and user='"&replyer&"'",conn,1,3
rs3("fljifen")=rs3("fljifen")+dajiadf
rs3.update
rs3.close
if rs("jie")=3 then
rs3.open"select * from person where name='"&rs("sender")&"'",conn,1,3
rs3("fa")=rs3("fa")-clwendf
rs3("jifen")=rs3("jifen")+clwendf
if rs3("jifen")+clwendf<fen1 then
rs3("touxian")=""&ji1&" 一级"
elseif rs3("jifen")+clwendf>=fen1 and rs3("jifen")+clwendf<fen2 then
rs3("touxian")=""&ji1&" 一级"
elseif rs3("jifen")+clwendf>=fen2 and rs3("jifen")+clwendf<fen3 then
rs3("touxian")=""&ji2&" 二级"
elseif rs3("jifen")+clwendf>=fen3 and rs3("jifen")+clwendf<fen4 then
rs3("touxian")=""&ji3&" 三级"
elseif rs3("jifen")+clwendf>=fen4 and rs3("jifen")+clwendf<fen5 then
rs3("touxian")=""&ji4&" 四级"
elseif rs3("jifen")+clwendf>=fen5 and rs3("jifen")+clwendf<fen6 then
rs3("touxian")=""&ji5&" 五级"
elseif rs3("jifen")+clwendf>=fen6 and rs3("jifen")+clwendf<fen7 then
rs3("touxian")=""&ji6&" 六级"
elseif rs3("jifen")+clwendf>=fen7 and rs3("jifen")+clwendf<fen8 then
rs3("touxian")=""&ji7&" 七级"
elseif rs3("jifen")+clwendf>=fen8 and rs3("jifen")+clwendf<fen9 then
rs3("touxian")=""&ji8&" 八级"
elseif rs3("jifen")+clwendf>=fen9 and rs3("jifen")+clwendf<fen10 then
rs3("touxian")=""&ji9&" 九级"
elseif rs3("jifen")+clwendf>=fen10 then
rs3("touxian")=""&ji10&" 十级"
end if
rs3.update
rs3.close
end if
response.redirect "showquestion.asp?id="&id&""
end if%>
<table width="588" border="0" cellpadding="0" cellspacing="0" class=zhtable>
<tr>
<td height="25" class="bgtle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="f14weB" nowrap><%if rs("jie")=1 or rs("jie")=4 then%>其他答案<%else%>答复<%end if%></td>
<td align="right" nowrap class="f12we">共 <%=maxreply%> 条</td>
</tr>
</table></td>
</tr>
<tr><td class="bgcntLn">
<%for i=1 to rs2.pagesize
if session("person")=rs2("replyer") and rs("jie")=0 then%>
<input type="button" value="修改答复" onClick="fixReply('yes');">
<%end if
rs3.open"select * from person where name='"&rs2("replyer")&"'",conn,1,1
touxian2=rs3("touxian")
rs3.close
%>
<a name="14624473"><div class="f14"><%=ubb(rs2("replycontent"))%><%if rs2("ck")<>"" then%><br><br><SPAN style="COLOR: #666666">参考资料:<%=ubb(rs2("ck"))%></SPAN><%end if%></div>
<div align="right" class="f12gy">回答者:<a href=showperson.asp?name=<%=rs2("replyer")%> target=_blank><%=rs2("replyer")%></a> - <a href="help.asp#n5" target=_blank><%=touxian2%></a> <%=rs2("replytime")%></div>
<%
if rs("jie")<>1 and rs("jie")<>2 and rs("jie")<>4 then
if session("person")<>rs("sender") then
if rs2("isdeal")=1 then%>
<input name="deal" type="submit" id="deal" value="采纳为答案" disabled>
<%end if
end if
if session("person")=rs("sender") then
if rs2("isdeal")=1 then%>
<input name="deal" type="submit" id="deal" value="采纳为答案" disabled>
<%else%><form method=post action=showquestion.asp?id=<%=id%>&rid=<%=rs2("id")%>>
<input name="deal" type="submit" id="deal" value="采纳为答案">
</form>
<%
end if
end if
end if
%>
<%if session("person")=rs2("replyer") and rs("jie")=0 then%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="replyTB" style="display:none;">
<form name="myform" method="post" action="showquestion.asp?id=<%=id%>" onSubmit="return checkcoAndsn(this,'回答');">
<tr>
<td class="bgcntBor4"><table width="100%" border="0" cellpadding="0" cellspacing="0" class=zhtable>
<tr valign="top">
<td width="22%" nowrap class="f14">修改答复:</td>
<td width="78%"><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td nowrap><span class="f14"><%=session("person")%>,您要修改的答复如下:</span> <a href="help.asp#n4" target="_blank">积分规则</a></td><td align=right nowrap><a href=#gohere onClick="fixReply('no');" ><font color=#777777>关闭</font></a></td></tr></table>
<br><textarea name="co" cols="50" rows="10"><%=rs2("replycontent")%></textarea>
<br>
回答字数10000字以内 </td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class=zhtable>
<tr valign="top">
<td width="22%" nowrap class="f14">参考资料:</td>
<td width="78%"><input name="sn" type="text" size="50" value="<%=rs2("ck")%>">
<br>
<span class="style3">如果您的回答是从其他地方引用,请表明出处。</span> </td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -