productview.asp
来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 271 行
ASP
271 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/NoHackSql.Asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<%
call SiteInfo
if ISHTML = 1 then
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
End If
ID=request.QueryString("ID")
if ID <> "" or IsNumeric(ID) then
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Products where ViewFlag"&Language&" and ID="&ID
rs.open sql,conn,1,3
If rs("SeoKeywords"&Language) <> "" Then
SeoKeywords=rs("SeoKeywords"&Language)
Else
SeoKeywords=rs("ProductName"&Language)
End If
If rs("SeoDescription"&Language) <> "" Then
SeoDescription=rs("SeoDescription"&Language)
Else
SeoDescription=rs("ProductName"&Language)
End If
SeoTitle=rs("ProductName"&Language)
End If
rs.close
set rs=nothing
headid=3
%>
<!--#include file="Head.Asp" -->
<div class="clear"></div>
<div id="contant">
<div class="cleft">
<div class="news">
<div class="title">
<b>Product列表</b>
</div>
<div>
<ul>
<%call CallFolderView()%>
</ul>
</div>
</div>
<div class="news">
<div class="title">
<b>Hot Product</b>
</div>
<div>
<ul>
<%=Producthot(10)%>
</ul>
</div>
</div>
</div>
<div class="cright">
<div class="crightb">
<div class="crightbtitle">
<div class="crightbtitlel">
Location:
</div>
<div class="crightbtitler">
<%=WebLocation()%>
</div>
</div>
<div class="crightbcontent">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="26"> </td>
<td>
<p>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" border="0" heihgt="">
<tbody>
<tr align="center">
<td width="1000" align="center" style="color:#000000; font-size:14px; font-weight:bold">
<%
ID=request.QueryString("ID")
if ID="" or not IsNumeric(ID) then
response.write "<center>No relevant information</center>"
elseif conn.execute("select * from LiangJingCMS_Products Where ViewFlag"&Language&" and ID="&ID).eof then
response.write "<center>No relevant information</center>"
else
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Products where ViewFlag"&Language&" and ID="&ID
rs.open sql,conn,1,3
Response.Write ""&rs("ProductName"&Language)&""&VbCrLf
End If
%></td>
</tr>
<%
if ViewNoRight(rs("GroupID"),rs("Exclusive")) Then
Response.Write " <tr>"&VbCrLf
Response.Write " <td>"&VbCrLf
Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">"&VbCrLf
Response.Write " <tr height=""25"">"&VbCrLf
Response.Write " <td>Product Name:"&rs("ProductName"&Language)&"</td>"&VbCrLf
Response.Write " <td rowspan=""7"" style=""width:180px; text-align:center""><a href="""&rs("BigPic")&""" title=""zoom"" target=""_blank""><img src="""&HtmlSmallPic(rs("GroupID"),rs("BigPic"),rs("Exclusive"))&""" title="""&rs("ProductName"&Language)&""" style=""border:1px #ccc;""></a><br /><br /><a href=""ProductBuy.asp?ProductNo="&rs("ProductNo")&""" title=""buy:"&rs("ProductName"&Language)&"""><img src=""Images/buy.gif"" border=""0"" /></a></td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr height=""25"">"&VbCrLf
Response.Write " <td>Product No:"&rs("ProductNo") &"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr height=""25"">"&VbCrLf
Response.Write " <td>Model:"&rs("ProductModel") &"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr height=""25"">"&VbCrLf
Response.Write " <td>Was Price:"&rs("N_Price")&"Dollar/"&rs("Unit"&Language)&" Now Price:"&rs("P_Price")&"Dollar/"&rs("Unit"&Language)&"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr height=""25"">"&VbCrLf
Response.Write " <td>Last update:"&FormatDate(rs("Addtime"),13)&"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr height=""25"">"&VbCrLf
Response.Write " <td>Manufacturer:"&rs("Maker"&Language) &"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
attribute1=rs("attribute1"&Language)
attribute1_value=rs("attribute1"&Language&"_value")
if attribute1 <> "" and attribute1_value <> "" then
attribute1_1=Split(attribute1,"§§§")
attribute1_value_1=Split(attribute1_value,"§§§")
for i=0 to ubound(attribute1_value_1)
Response.Write " <tr height=""25"">"&VbCrLf
Response.Write " <td>"&attribute1_1(i)&":"&attribute1_value_1(i)&"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Next
End If
Response.Write " <tr height=""25"">"&VbCrLf
Response.Write " <td>Clicks:<script language=""javascript"" src=""HitCount.asp?id="&rs("ID")&"&LX=LiangJingCMS_Products""></script><script language=""javascript"" src=""HitCount.asp?action=count&LX=LiangJingCMS_Products&id="&rs("ID")&"""></script></td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write "</table>"&VbCrLf
Response.Write " </td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr>"&VbCrLf
Response.Write " <td height=""33"" style=""background:url(Images/bg2.gif) repeat-x left bottom""> <img src=""images/arr.gif"" width=""11"" height=""14"" align=""absmiddle"" /> Product details</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr>"&VbCrLf
Response.Write " <td height=""25"" style=""padding-left: 8px; padding-right: 8px"">"&rs("Content"&Language)&"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Else
Response.Write " <tr>"&VbCrLf
Response.Write " <td rowspan=""2"" align=""center""><img src=""Images/NoRight.jpg""></td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
end if
rs.update
rs.close
set rs=Nothing
%>
<tr>
<td height="20"> </td>
</tr>
</tbody>
</table>
</p>
</td>
<td width="26"> </td>
</tr>
<tr>
<td> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!--#include file="Foot.Asp"-->
<%
'调用显示节点------------------------------
Function CallFolderView()
%>
<% Folder(0) %>
<%
End Function
'列出所有节点------------------------------
Function Folder(id)
Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType,ViewFlag
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From LiangJingCMS_ProductSort where ViewFlag"&Language&" and ParentID="&id&" order by id"
rs.open sql,conn,1,1
if id=0 and rs.recordcount=0 then
response.write ("No Information!")
response.end
end if
i=1
response.write("<table border='0' cellspacing='0' cellpadding='0' style='margin-left:16px;'>")
while not rs.eof
ChildCount=conn.execute("select count(*) from LiangJingCMS_ProductSort where ParentID="&rs("id"))(0)
if ChildCount=0 then
if i=rs.recordcount then
FolderType="SortFileEnd"
else
FolderType="SortFile"
end if
FolderName=rs("SortNameEn")&" "&ViewFlag
onMouseUp=""
else
if i=rs.recordcount then
FolderType="SortEndFolderOpen"
ListType="SortEndListline"
onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
else
FolderType="SortFolderOpen"
ListType="SortListline"
onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
end if
FolderName=rs("SortNameEn")&" "&ViewFlag
end if
response.write("<tr>")
response.write("<td nowrap id='b"&rs("id")&"' class='"&FolderType&"' onMouseUp="&onMouseUp&"></td><td nowrap><a href=""ProductList.asp?SortID="&rs("ID")&""">"&FolderName&"</a> ")
response.write("</td></tr>")
if ChildCount>0 then
%>
<tr id="a<%= rs("id")%>" style="display:none"><td class="<%= ListType%>" nowrap></td><td ><% Folder(rs("id")) %></td></tr>
<%
end if
rs.movenext
i=i+1
wend
response.write("</table>")
rs.close
set rs=nothing
end function
function WebLocation()
WebLocation=" Location:<a href=""index.asp"" class=""agray"">Home</a> - <a href=""ProductList.asp"" class=""agray"">Product Center</a>"&VbCrLf
if request.QueryString("ID")="" then
WebLocation=WebLocation
elseif not IsNumeric(request.QueryString("ID")) then
WebLocation=WebLocation&"Read error"
elseif conn.execute("select * from LiangJingCMS_Products Where ViewFlag"&Language&" and ID="&request.QueryString("ID")).eof then
WebLocation=WebLocation&"Read error"
else
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Products where ViewFlag"&Language&" and ID="&request.QueryString("ID")
rs.open sql,conn,1,1
WebLocation=WebLocation&SortPathTXT("LiangJingCMS_ProductSort",rs("SortID"))
rs.close
set rs=nothing
end if
end Function
function SortPathTXT(DataFrom,ID)
dim rs,sql
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From "&DataFrom&" where ViewFlag"&Language&" and ID="&ID
rs.open sql,conn,1,1
if not rs.eof Then
If ISHTML = 1 Then
AutoLink = ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = "ProductList.asp?SortID="&rs("ID")&""
End If
SortPathTXT=SortPathTXT(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&"""><span style=""color:#EC0000"">"&rs("SortName"&Language)&"</span></a>"
end if
rs.close
set rs=nothing
end Function
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?