注册 登录
编程论坛 ASP技术论坛

请教高手如何写条件中的条件语句

HST686 发布于 2011-09-01 11:50, 365 次点击
response.write "<td><div align=center>"   
    if rs("weixiu")="0"  then
    response.write "<font color=red>未出票</font>"
    end if
    if rs("weixiu")="1" then
    response.write "<font color=#669900>已出票</font>"        
    end if
    if rs("weixiu")="2" then
    response.write "<font color=blue>待出票</font>"        
    end if
        if rs("weixiu")="3" then
    response.write "已取消"               
    end if
    response.write "</div></td>"
    response.write "</tr>"
在上的条件语句要再加上一个条件:如果是登录状态就可以看到以上的已出票或未出票或待出票,如果没有登录只能看到******,请教高手该如何写代码?

类似下面的代码:if shenfen="1" or realname=rs("bxry") or (shenfen="3" and (wxlb=rs("wxlb") or wxlb="all") and (wxqy=rs("wxqy") or wxqy="all")) then
response.write "<td><div align=center>"&rs("time")&"</div></td>"
        else
        response.write "<td><div align=center>**************</div></td>"
        end if
2 回复
#2
yms1232011-09-01 12:29
if shenfen="1" or realname=rs("bxry") or (shenfen="3" and (wxlb=rs("wxlb") or wxlb="all") and (wxqy=rs("wxqy") or wxqy="all")) then
    response.write "<div align=center>"   
    if rs("weixiu")="0"  then
       response.write "<font color=red>未出票</font>"
    end if
    if rs("weixiu")="1" then
       response.write "<font color=#669900>已出票</font>"        
    end if
    if rs("weixiu")="2" then
       response.write "<font color=blue>待出票</font>"        
    end if
    if rs("weixiu")="3" then
       response.write "已取消"               
    end if
    response.write "</div>"
 else
    response.write "<div align=center>**************</div>"
 end if
#3
HST6862011-09-01 13:08
搞定,非常感谢!
1