谁能帮我翻译这段代码,有关ASP内容
<%SubtName()Dimrs,typesId,typesNametypesId=Int(ABS(Request("typesId")))'Response.Writ...
<%Sub tName()
Dim rs,typesId,typesName
typesId = Int(ABS(Request("typesId")))
'Response.Write(typesId)
'Response.End()
If Not IsNumeric(typesId) Or IsEmpty(typesId) Or typesId <=0 Then
%>
<img src="images/arrow_se.gif" width="12" height="12" align="top"><font color="#990000"> 产品世界</font>
<% Else
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From tTypes Where typesId = " & typesId,conn,3,1
typesName = rs("typesName")
rs.Close
Set rs = Nothing
%>
<img src="images/arrow_se.gif" width="12" height="12" align="top">
<font color="#990000"> <% = typesName %></font>
<% End If
End Sub
Call tName()
%>
</td> </tr>
</table>
<hr width="96%" size="3" noshade color="#EFEFEF">
<%Sub listNewProducts()
Dim rs,typesId,productsId,productsName,productsImage,trFlag
Dim pageNum,totalRecord,totalPage,recordPerPage,recordNum
Dim dbType
dbType = 0
typesId = Int(ABS(Request("typesId")))
trFlag = 0
Response.Write(" <table width='600' border='0' cellpadding='0' cellspacing='0' align='center'>" & VBCrlf)
pageNum = Request("pageNum")
If IsEmpty(pageNum) Or Not IsNumeric(pageNum) Or pageNum <= 0 Then
pageNum = 1
Else pageNum = Int(ABS(pageNum))
End If
Set rs = Server.CreateObject("ADODB.Recordset")
If Not IsNumeric(typesId) Or IsEmpty(typesId) Or typesId <=0 Then
dbType = 0
Else dbType = 1
End If
If dbType = 1 Then
rs.Open "Select * From tProducts Where productsType = " & typesId & " Order By productsNum",conn,3,1
Else rs.Open "Select * From tProducts Order By productsNum",conn,3,1
End If
totalRecord = rs.RecordCount
recordPerPage = 12
rs.PageSize = recordPerPage
'rs.PageSize = 20
'recordPerPage = rs.PageSize
totalPage = rs.PageCount
If pageNum > totalPage Then pageNum = 1
End If
If totalRecord > 0 Then rs.AbsolutePage = pageNum
End If
recordNum = 0
Do While Not rs.BOF And Not rs.EOF
productsId = rs("productsId")
productsName = htmlCode3(rs("productsName"))
productsImage = htmlCode3(rs("productsImage"))
'======================================
'绘制3x5表格
'不足部分空单元格
'======================================
If trFlag = 0 Then
Response.Write(" <tr>" & VBCrlf)
Response.Write("<td align='center' valign='middle' width='200' height='200'>" & VBCrlf)
Response.Write(" <a href=javascript:openProWin('" & productsId & "')><img src='proImg/" & productsImage & "' width='180' height='180' border='0'><br>" & productsName & "</a>" & VBCrlf)
Response.Write(" </td>" & VBCrlf)
trFlag = 1
Else 'If trFlag = 1 or trFlag = 2 Then
If trFlag = 1 Then
Response.Write(" <td align='center' valign='middle' width='200' height='200'>" & VBCrlf)
Response.Write(" <a href=javascript:openProWin('" & productsId & "')><img src='proImg/" & productsImage & "' width='180' height='180' border='0'><br>" & productsName & "</a>" & VBCrlf)
Response.Write(" </td>" & VBCrlf) 展开
Dim rs,typesId,typesName
typesId = Int(ABS(Request("typesId")))
'Response.Write(typesId)
'Response.End()
If Not IsNumeric(typesId) Or IsEmpty(typesId) Or typesId <=0 Then
%>
<img src="images/arrow_se.gif" width="12" height="12" align="top"><font color="#990000"> 产品世界</font>
<% Else
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From tTypes Where typesId = " & typesId,conn,3,1
typesName = rs("typesName")
rs.Close
Set rs = Nothing
%>
<img src="images/arrow_se.gif" width="12" height="12" align="top">
<font color="#990000"> <% = typesName %></font>
<% End If
End Sub
Call tName()
%>
</td> </tr>
</table>
<hr width="96%" size="3" noshade color="#EFEFEF">
<%Sub listNewProducts()
Dim rs,typesId,productsId,productsName,productsImage,trFlag
Dim pageNum,totalRecord,totalPage,recordPerPage,recordNum
Dim dbType
dbType = 0
typesId = Int(ABS(Request("typesId")))
trFlag = 0
Response.Write(" <table width='600' border='0' cellpadding='0' cellspacing='0' align='center'>" & VBCrlf)
pageNum = Request("pageNum")
If IsEmpty(pageNum) Or Not IsNumeric(pageNum) Or pageNum <= 0 Then
pageNum = 1
Else pageNum = Int(ABS(pageNum))
End If
Set rs = Server.CreateObject("ADODB.Recordset")
If Not IsNumeric(typesId) Or IsEmpty(typesId) Or typesId <=0 Then
dbType = 0
Else dbType = 1
End If
If dbType = 1 Then
rs.Open "Select * From tProducts Where productsType = " & typesId & " Order By productsNum",conn,3,1
Else rs.Open "Select * From tProducts Order By productsNum",conn,3,1
End If
totalRecord = rs.RecordCount
recordPerPage = 12
rs.PageSize = recordPerPage
'rs.PageSize = 20
'recordPerPage = rs.PageSize
totalPage = rs.PageCount
If pageNum > totalPage Then pageNum = 1
End If
If totalRecord > 0 Then rs.AbsolutePage = pageNum
End If
recordNum = 0
Do While Not rs.BOF And Not rs.EOF
productsId = rs("productsId")
productsName = htmlCode3(rs("productsName"))
productsImage = htmlCode3(rs("productsImage"))
'======================================
'绘制3x5表格
'不足部分空单元格
'======================================
If trFlag = 0 Then
Response.Write(" <tr>" & VBCrlf)
Response.Write("<td align='center' valign='middle' width='200' height='200'>" & VBCrlf)
Response.Write(" <a href=javascript:openProWin('" & productsId & "')><img src='proImg/" & productsImage & "' width='180' height='180' border='0'><br>" & productsName & "</a>" & VBCrlf)
Response.Write(" </td>" & VBCrlf)
trFlag = 1
Else 'If trFlag = 1 or trFlag = 2 Then
If trFlag = 1 Then
Response.Write(" <td align='center' valign='middle' width='200' height='200'>" & VBCrlf)
Response.Write(" <a href=javascript:openProWin('" & productsId & "')><img src='proImg/" & productsImage & "' width='180' height='180' border='0'><br>" & productsName & "</a>" & VBCrlf)
Response.Write(" </td>" & VBCrlf) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询