⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showquestion.asp

📁 问吧程序 问吧程序 问吧程序 问吧程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	  end if
	  rs.close%></TD></TR></TBODY></TABLE>
				</TD></TR></TBODY></TABLE>
				</td>
				<td valign="top"><%if request("id")<>"" then
	id=cint(request("id"))
	end if%>
	<%rs.open"select * from question where id="&id,conn,1,1
	if rs.eof then
	response.write"问题参数出错!"
	else%>
    <table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table15">
      <tr bgcolor="eeeeee">
        <td width="100%" height="24" class=bgtle noWrap>
		<p align="center"><font color=6699ff style="font-weight:800;font-size:20px;"><%=rs("title")%></font></td>
      </tr>
	  <tr bgcolor="eeeeee">
        <td height="24" align="left" bgcolor="#FFFFFF"><br>
      <table width="97%"  border="0" align="center" cellpadding="0" cellspacing="0" style="border:1pt dotted black ">
        <tr>
          <td height="23" align="center" bgcolor="#FFFFFF">
		  <br>浏览数:<font color=red><%=rs("views")%></font> | 回复数:<font color=red><%=rs("replys")%></font> | 主题:<a href=assort.asp?topic=<%=rs("topic")%>><%=rs("topic")%></a><hr size=1 color=cccccc></td>
        </tr>
        <tr>
          <td valign="top" bgcolor="#FFFFFF"><font color=000000 style="font-size:16px "><%=rs("content")%></font></td>
        </tr>
        <tr>
          <td height="20" align="right" bgcolor="#FFFFFF"><hr size=1 color="cccccc"><font color=6699ff style="font-size:14px "><a href=showperson.asp?name=<%=rs("sender")%>><%=rs("sender")%></a>发布于<%=rs("sendtime")%></font></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF"> </td>
        </tr>
      </table>
	  <%rs2.open"select * from reply where replyid="&id&" order by id desc",conn,1,1
	  if rs2.eof then%><table width="97%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="20" bgcolor="eeeeee">暂时没有该问题的回复!</td></tr></table>
	  <%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.update
		  rs3.close
		  rs3.open"select * from person where name='"&replyer&"'",conn,1,3
		  rs3("helpnum")=rs3("helpnum")+1
		  rs3("jifen")=rs3("jifen")+10
		  if rs3("jifen")+10<100 then
		  rs3("touxian")="小孩子"
		  elseif rs3("jifen")+10>=100 and rs3("jifen")+10<1000 then
		  rs3("touxian")="小孩子"
		  elseif rs3("jifen")+10>=1000 and rs3("jifen")+10<3000 then
		  rs3("touxian")="小朋友"
		  elseif rs3("jifen")+10>=3000 and rs3("jifen")+10<6000 then
		  rs3("touxian")="小学生"
		  elseif rs3("jifen")+10>=6000 and rs3("jifen")+10<10000 then
		  rs3("touxian")="中学生"
		  elseif rs3("jifen")+10>=10000 and rs3("jifen")+10<15000 then
		  rs3("touxian")="大学生"
		  elseif rs3("jifen")+10>=15000 and rs3("jifen")+10<21000 then
		  rs3("touxian")="硕士生"
		  elseif rs3("jifen")+10>=21000 and rs3("jifen")+10<28000 then
		  rs3("touxian")="博士生"
		  elseif rs3("jifen")+10>=28000 and rs3("jifen")+10<36000 then
		  rs3("touxian")="博士后"
		  elseif rs3("jifen")+10>=36000 then
		  rs3("touxian")="科学家"
		  end if
		  rs3.update
		  rs3.close
		  end if%>
	  <%for i=1 to rs2.pagesize%>
	  <table width="97%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="20" bgcolor="eeeeee">
		  <%if session("person")="" or (session("person")<>"" and session("person")<>rs("sender")) then%>
		  <%if rs2("isdeal")=1 then%>
		  <input name="deal" type="submit" id="deal" value="解决问题" style="background-color:6699ff;" disabled><br>
		  <%end if%>
		  <%end if%>
		  <%if session("person")=rs("sender") then%>
		  <%if rs2("isdeal")=1 then%>
		  <input name="deal" type="submit" id="deal" value="解决问题" style="background-color:6699ff;" disabled>
		  <%else%><form method=post action=showquestion.asp?id=<%=id%>&rid=<%=rs2("id")%>><table><tr><td>
		  <input name="deal" type="submit" id="deal" value="解决问题" style="background-color:6699ff;"></td></tr></table>
		  </form>
		  <%end if%><%end if%>
          <font color=red>第<%=i%>楼</font><%if rs2("replytitle")<>"" then%> 标题:<font color=red><%=rs2("replytitle")%></font><%end if%>[用户&nbsp;<font color=red style="font-size:16px "><a href=showperson.asp?name=<%=rs2("replyer")%>><%=rs2("replyer")%></a></font>&nbsp;回复于<font color=red><%=rs2("replytime")%></font>]</td>
        </tr>
        <tr>
          <td><%=rs2("replycontent")%><hr size=1 style="border:1pt dotted aaaaaa"></td>
        </tr>
      </table>
	  <%rs2.movenext
	  if rs2.eof then exit for
	  next%>
	  <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>回复:<font color=red><%=maxreply%></font>条 | 页数:<%=maxpage%>页 | 每页10条回复 | 页次:<font color=red><%=p%></font>/<%=maxpage%>
	<a href=showquestion.asp?id=<%=id%>&p=1>首页</a>
	<a href=showquestion.asp?id=<%=id%>&p=<%=p-1%>>上页</a>
	<a href=showquestion.asp?id=<%=id%>&p=<%=p+1%>>下页</a>
	<a href=showquestion.asp?id=<%=id%>&p=<%=maxpage%>>尾页</a></td>
  </tr>
</table>

	  <%end if
	  rs2.close
	  if request("reply")="回复" then
	  if request("content")="" then
	  response.write"<script>alert('回复内容不能为空!');history.back();</script>"
	  else
	  title=request("title")
	  content=request("content")
	  rs3.open"select * from reply",conn,1,3
	  rs3.addnew
	  rs3("replyer")=session("person")
	  rs3("replytitle")=title
	  rs3("replycontent")=content
	  rs3("replyid")=id
	  rs3("replytime")=now
	  rs3.update
	  rs3.close
	  rs3.open"select * from person where name='"&session("person")&"'",conn,1,3
		  rs3("replynum")=rs3("replynum")+1
		  rs3("jifen")=rs3("jifen")+1
		  if rs3("jifen")+1<100 then
		  rs3("touxian")="小孩子"
		  elseif rs3("jifen")+1>=100 and rs3("jifen")+1<1000 then
		  rs3("touxian")="小孩子"
		  elseif rs3("jifen")+1>=1000 and rs3("jifen")+1<3000 then
		  rs3("touxian")="小朋友"
		  elseif rs3("jifen")+1>=3000 and rs3("jifen")+1<6000 then
		  rs3("touxian")="小学生"
		  elseif rs3("jifen")+1>=6000 and rs3("jifen")+1<10000 then
		  rs3("touxian")="中学生"
		  elseif rs3("jifen")+1>=10000 and rs3("jifen")+1<15000 then
		  rs3("touxian")="大学生"
		  elseif rs3("jifen")+1>=15000 and rs3("jifen")+1<21000 then
		  rs3("touxian")="硕士生"
		  elseif rs3("jifen")+1>=21000 and rs3("jifen")+1<28000 then
		  rs3("touxian")="博士生"
		  elseif rs3("jifen")+1>=28000 and rs3("jifen")+1<36000 then
		  rs3("touxian")="博士后"
		  elseif rs3("jifen")+1>=36000 then
		  rs3("touxian")="科学家"
		  end if
		  rs3.update
		  rs3.close
	  response.write"<script>alert('回复成功!');window.navigate('showquestion.asp?id="&id&"');</script>"
	  
	  end if
	  end if
	  if session("person")<>"" and session("person")<>rs("sender") then
	  %>
	  <br><form method=post action=showquestion.asp?id=<%=id%>>
	  <table width="97%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20" bgcolor="#EEEEEE">回复该问题</td>
  </tr>
  <tr>
    <td height="30">标题:
      <input type="text" name="title"></td>
  </tr>
  <tr>
    <td height="30" valign="top">内容:<br>
      <textarea name="content" cols="40" rows="10"></textarea>
      *</td>
  </tr>
  <tr>
    <td height="30"><input name="reply" type="submit" id="reply" value="回复" style="background-color:6699ff;">
      <input type="reset" name="Submit" value="重写" style="background-color:6699ff;"></td>
  </tr>	  
</table></td></tr>
    </table></form> <%end if
	  end if
	  rs.close%>
    			</td>
			</tr></table>
	</div>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -