谁能帮我翻译一下下面这段asp代码的意思啊?
<%ifrequest("act")="xg"thendate_cx=request("select")sql="select*fromjhgzwheretime=#"&...
<%
if request("act")="xg" then
date_cx = request("select")
sql="select * from jhgz where time=#"&date_cx&"# and name='"&session("name")&"' order by time desc"
'response.write sql
else
sql="select top 1 * from jhgz where name='"&session("name")&"' order by time desc"
end if
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "<script>alert('没有你的工资单!');location.href='index.asp';</script>"
else
%>
<tr>
<%
i=2
Do While i<rs.Fields.Count-5
%>
<td align="center" ><%= rs(i)%> </td>
<% i=i+1
loop
%>
<td align="center" ><a title="<% =rs("bz")%>"> </td>
<%
rs.close
set rs=nothing
%> 展开
if request("act")="xg" then
date_cx = request("select")
sql="select * from jhgz where time=#"&date_cx&"# and name='"&session("name")&"' order by time desc"
'response.write sql
else
sql="select top 1 * from jhgz where name='"&session("name")&"' order by time desc"
end if
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "<script>alert('没有你的工资单!');location.href='index.asp';</script>"
else
%>
<tr>
<%
i=2
Do While i<rs.Fields.Count-5
%>
<td align="center" ><%= rs(i)%> </td>
<% i=i+1
loop
%>
<td align="center" ><a title="<% =rs("bz")%>"> </td>
<%
rs.close
set rs=nothing
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询