奇怪的多条件判断转向---求解
各位大虾,又给大家提出一个比较烦恼的问题,望大家能够协助解决为盼:这个问题是我想通过查询的内容来打开或转移到不同的页面。而且,如果两种以上查询的结果都存在,我该怎么设计,才能打开两个以上的页面,我该怎么做呢?请指教,谢谢!
<%set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='每次登陆提醒' "
rs.open sql,conn,1,3%>
<% if rs.eof then%>
<%set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='每周定期提醒' "
rs.open sql,conn,1,3%>
<%else%>
<script language="javascript">
parent.getMsg2();
parent.popalertcontent.location="../weeknotice.asp";
</script>
<% if rs.eof then%>
<%set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='每月定期提醒' and rishu='"&day(date())&"' "
rs.open sql,conn,1,3%>
<%else%>
<script language="javascript">
parent.getMsg2();
parent.popalertcontent.location="../monthnotice.asp";
</script>
<% if rs.eof then%>
<%set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='每天定时提醒' and szsj< time() "
rs.open sql,conn,1,3%>
<% if rs.eof then%>
<%set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='固定时间提醒' and szrq>=date() and szsj< time() "
rs.open sql,conn,1,3%>
<%else%>
<script language="javascript">
parent.getMsg2();
parent.popalertcontent.location="../realtimenotice.asp";
</script>
<% if rs.eof then%>
<% rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
Response.End%>
<%else%>
<script language="javascript">
parent.getMsg2();
parent.popalertcontent.location="../popalertnotice.asp";
</script>
<% rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing%>
<%end if%><%end if%><%end if%><%end if%><%end if%>