谁能帮我翻译这段代码,有关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)
展开
 我来答
帐号已注销
2007-07-14 · TA获得超过662个赞
知道小有建树答主
回答量:386
采纳率:0%
帮助的人:0
展开全部
sub tName根据typesid(类型编号)查询typesname(类型名称),如果找到则显示在页面上,如果没有,则显示“产品世界”字样。
接下来根据类型编号查询产品的编号、名称、图片文件名,并以分页和表格形式显示产品图片和名称的超链接,每12个产品为一页。单击每个产品图片会调用openProWin函数显示某一个产品的详细信息。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式