ProductView.Asp
上传用户:mtjhgs
上传日期:2021-12-08
资源大小:3755k
文件大小:10k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
  2. <!--#include file="../Include/Const.asp" -->
  3. <!--#include file="../Include/NoHackSql.Asp" -->
  4. <!--#include file="../Include/ConnSiteData.asp" -->
  5. <%
  6. call SiteInfo
  7. if ISHTML = 1 then
  8. Response.expires = 0
  9. Response.expiresabsolute = Now() - 1
  10. Response.addHeader "pragma", "no-cache"
  11. Response.addHeader "cache-control", "private"
  12. Response.CacheControl = "no-cache"
  13. End If
  14. ID=request.QueryString("ID")
  15. if ID <> "" or IsNumeric(ID) then
  16. set rs = server.createobject("adodb.recordset")
  17. sql="select * from Wygkcnflash_Products where ViewFlag"&Language&" and ID="&ID
  18. rs.open sql,conn,1,3
  19. If rs("SeoKeywords"&Language) <> "" Then
  20. SeoKeywords=rs("SeoKeywords"&Language)
  21. Else
  22. SeoKeywords=rs("ProductName"&Language)
  23. End If
  24. If rs("SeoDescription"&Language) <> "" Then
  25. SeoDescription=rs("SeoDescription"&Language)
  26. Else
  27. SeoDescription=rs("ProductName"&Language)
  28. End If
  29. SeoTitle=rs("ProductName"&Language)
  30. End If
  31. rs.close
  32. set rs=nothing
  33. headid=3
  34. %>
  35. <!--#include file="Head.Asp" -->
  36. <div class="clear"></div>
  37. <div id="contant">
  38.   <div class="cleft">
  39. <div class="news">
  40.       <div class="title">
  41.   &nbsp;<b>产品列表</b>
  42.   </div>
  43.   <div>
  44.   <ul>
  45.   <%call CallFolderView()%>
  46.   </ul>
  47.   </div>
  48.     </div>
  49. <div class="news">
  50.       <div class="title">
  51.   &nbsp;<b>热门产品</b>
  52.   </div>
  53.   <div>
  54.   <ul>
  55.   <%=Producthot(10)%>
  56.   </ul>
  57.   </div>
  58.     </div>
  59.   </div>
  60.   <div class="cright">
  61. <div class="crightb">
  62.   <div class="crightbtitle">
  63.     <div class="crightbtitlel">
  64. 当前位置:
  65. </div>
  66. <div class="crightbtitler">
  67. <%=WebLocation()%>
  68. </div>
  69.   </div>
  70.   <div class="crightbcontent">
  71. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  72. <tbody>
  73. <tr>
  74. <td width="26"> </td>
  75. <td>
  76. <p>
  77. <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" border="0" heihgt="">
  78.     <tbody>
  79.         <tr align="center">
  80.                 <td width="1000" align="center" style="color:#000000; font-size:14px; font-weight:bold">
  81. <%
  82.   ID=request.QueryString("ID")
  83.   if ID="" or not IsNumeric(ID) then
  84.     response.write "<center>暂无相关信息</center>"
  85.   elseif conn.execute("select * from Wygkcnflash_Products Where ViewFlag"&Language&" and  ID="&ID).eof then
  86.     response.write "<center>暂无相关信息</center>"
  87.   else
  88. dim rs,sql
  89.     set rs = server.createobject("adodb.recordset")
  90. sql="select * from Wygkcnflash_Products where ViewFlag"&Language&" and ID="&ID
  91.     rs.open sql,conn,1,3
  92. Response.Write ""&rs("ProductName"&Language)&""&VbCrLf
  93.   End If
  94. %></td>
  95.                 
  96.               </tr>
  97.             
  98.        
  99. <%
  100. if ViewNoRight(rs("GroupID"),rs("Exclusive")) Then
  101. Response.Write "  <tr>"&VbCrLf
  102. Response.Write "    <td>"&VbCrLf
  103. Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">"&VbCrLf
  104. Response.Write "  <tr height=""25"">"&VbCrLf
  105. Response.Write "    <td>产品名称:"&rs("ProductName"&Language)&"</td>"&VbCrLf
  106. Response.Write "    <td rowspan=""7"" style=""width:180px; text-align:center""><a href="""&rs("BigPic")&""" title=""点击查看大图片"" target=""_blank""><img src="""&HtmlSmallPic(rs("GroupID"),rs("BigPic"),rs("Exclusive"))&""" title="""&rs("ProductName"&Language)&""" style=""border:1px #ccc;"" border=""0""></a><br /><br /><a href=""ProductBuy.asp?ProductNo="&rs("ProductNo")&""" title=""立即订购:"&rs("ProductName"&Language)&"""><img src=""Images/buy.gif"" border=""0"" /></a></td>"&VbCrLf
  107. Response.Write "  </tr>"&VbCrLf
  108. Response.Write "  <tr height=""25"">"&VbCrLf
  109. Response.Write "    <td>产品编号:"&rs("ProductNo") &"</td>"&VbCrLf
  110. Response.Write "  </tr>"&VbCrLf
  111. Response.Write "  <tr height=""25"">"&VbCrLf
  112. Response.Write "    <td>产品型号:"&rs("ProductModel") &"</td>"&VbCrLf
  113. Response.Write "  </tr>"&VbCrLf
  114. Response.Write "  <tr height=""25"">"&VbCrLf
  115. Response.Write "    <td>市场价格:"&rs("N_Price")&"元/"&rs("Unit"&Language)&" 批发价格:"&rs("P_Price")&"元/"&rs("Unit"&Language)&"</td>"&VbCrLf
  116. Response.Write "  </tr>"&VbCrLf
  117. Response.Write "  <tr height=""25"">"&VbCrLf
  118. Response.Write "    <td>更新时间:"&FormatDate(rs("Addtime"),13)&"</td>"&VbCrLf
  119. Response.Write "  </tr>"&VbCrLf
  120. Response.Write "  <tr height=""25"">"&VbCrLf
  121. Response.Write "    <td>出品单位:"&rs("Maker"&Language) &"</td>"&VbCrLf
  122. Response.Write "  </tr>"&VbCrLf
  123. attribute1=rs("attribute1"&Language)
  124. attribute1_value=rs("attribute1"&Language&"_value")
  125. if attribute1 <> "" and attribute1_value <> "" then
  126. attribute1_1=Split(attribute1,"§§§")
  127. attribute1_value_1=Split(attribute1_value,"§§§")
  128. for i=0 to ubound(attribute1_value_1)
  129. Response.Write "  <tr height=""25"">"&VbCrLf
  130. Response.Write "    <td>"&attribute1_1(i)&":"&attribute1_value_1(i)&"</td>"&VbCrLf
  131. Response.Write "  </tr>"&VbCrLf
  132. Next
  133. End If
  134. Response.Write "  <tr height=""25"">"&VbCrLf
  135. Response.Write "    <td>浏览次数:<script language=""javascript"" src=""HitCount.asp?id="&rs("ID")&"&LX=Wygkcnflash_Products""></script><script language=""javascript"" src=""HitCount.asp?action=count&LX=Wygkcnflash_Products&id="&rs("ID")&"""></script></td>"&VbCrLf
  136. Response.Write "  </tr>"&VbCrLf
  137. Response.Write "</table>"&VbCrLf
  138. Response.Write "    </td>"&VbCrLf
  139. Response.Write "  </tr>"&VbCrLf
  140. Response.Write "  <tr>"&VbCrLf
  141. Response.Write "    <td height=""33"" style=""background:url(Images/bg2.gif) repeat-x left bottom"">&nbsp;<img src=""images/arr.gif"" width=""11"" height=""14"" align=""absmiddle"" />&nbsp;&nbsp;产品详细介绍</td>"&VbCrLf
  142. Response.Write "  </tr>"&VbCrLf
  143. Response.Write "  <tr>"&VbCrLf
  144. Response.Write "    <td height=""25"" style=""padding-left: 8px; padding-right: 8px"">"&rs("Content"&Language)&"</td>"&VbCrLf
  145. Response.Write "  </tr>"&VbCrLf
  146. Else
  147. Response.Write "        <tr>"&VbCrLf
  148. Response.Write "          <td rowspan=""2"" align=""center""><img src=""Images/NoRight.jpg""></td>"&VbCrLf
  149. Response.Write "        </tr>"&VbCrLf
  150. end if
  151. rs.update
  152. rs.close
  153. set rs=Nothing
  154. %>
  155.         <tr>
  156.           <td height="20">&nbsp;</td>
  157.         </tr>
  158.     </tbody>
  159. </table>
  160. </p>
  161. </td>
  162. <td width="26"> </td>
  163. </tr>
  164. <tr>
  165. <td> </td>
  166. </tr>
  167. </tbody>
  168. </table>
  169. </div>
  170. </div>
  171.   </div>
  172. </div>
  173. <!--#include file="Foot.Asp"-->
  174. <%
  175. '调用显示节点------------------------------
  176. Function CallFolderView()
  177. %>
  178. <% Folder(0) %>
  179. <%
  180. End Function
  181. '列出所有节点------------------------------
  182. Function Folder(id)
  183.   Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType,ViewFlag
  184.   Set rs=server.CreateObject("adodb.recordset")
  185.   sql="Select * From Wygkcnflash_ProductSort where ViewFlag"&Language&" and ParentID="&id&" order by id"
  186.   rs.open sql,conn,1,1
  187.   if id=0 and rs.recordcount=0 then
  188.     response.write ("No Information!")
  189.     response.end
  190.   end if  
  191.   i=1
  192.   response.write("<table border='0' cellspacing='0' cellpadding='0' style='margin-left:16px;'>")
  193.   while not rs.eof
  194.     ChildCount=conn.execute("select count(*) from Wygkcnflash_ProductSort where ParentID="&rs("id"))(0)
  195.     if ChildCount=0 then
  196.   if i=rs.recordcount then
  197.     FolderType="SortFileEnd"
  198.   else
  199.     FolderType="SortFile"
  200.   end if
  201.   FolderName=rs("SortNameCh")&"&nbsp;"&ViewFlag
  202.   onMouseUp=""
  203.     else
  204.   if i=rs.recordcount then
  205.   FolderType="SortEndFolderOpen"
  206. ListType="SortEndListline"
  207. onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
  208.   else
  209. FolderType="SortFolderOpen"
  210. ListType="SortListline"
  211. onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
  212.   end if
  213.   FolderName=rs("SortNameCh")&"&nbsp;"&ViewFlag
  214.     end if
  215.     response.write("<tr>")
  216.      response.write("<td nowrap id='b"&rs("id")&"' class='"&FolderType&"' onMouseUp="&onMouseUp&"></td><td nowrap><a href=""ProductList.asp?SortID="&rs("ID")&""">"&FolderName&"</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
  217.     response.write("</td></tr>")
  218.     if ChildCount>0 then
  219. %>
  220.       <tr id="a<%= rs("id")%>" style="display:none"><td class="<%= ListType%>" nowrap></td><td ><% Folder(rs("id")) %></td></tr>
  221. <%
  222.     end if
  223.     rs.movenext
  224.     i=i+1
  225.   wend
  226.   response.write("</table>")
  227.   rs.close
  228.   set rs=nothing
  229. end function
  230. function WebLocation()
  231.   WebLocation="&nbsp;当前位置:<a href=""index.asp"" class=""agray"">首页</a> - <a href=""ProductList.asp"" class=""agray"">产品中心</a>"&VbCrLf
  232.   if request.QueryString("ID")="" then
  233.     WebLocation=WebLocation
  234.   elseif not IsNumeric(request.QueryString("ID")) then
  235.     WebLocation=WebLocation&"读取错误"
  236.   elseif conn.execute("select * from Wygkcnflash_Products Where ViewFlag"&Language&" and  ID="&request.QueryString("ID")).eof then
  237.     WebLocation=WebLocation&"读取错误"
  238.   else
  239.     dim rs,sql
  240.     set rs = server.createobject("adodb.recordset")
  241. sql="select * from Wygkcnflash_Products where ViewFlag"&Language&" and ID="&request.QueryString("ID")
  242.     rs.open sql,conn,1,1
  243. WebLocation=WebLocation&SortPathTXT("Wygkcnflash_ProductSort",rs("SortID"))
  244.     rs.close
  245.     set rs=nothing
  246.   end if
  247. end Function
  248. function SortPathTXT(DataFrom,ID)
  249.   dim rs,sql
  250.   Set rs=server.CreateObject("adodb.recordset")
  251.   sql="Select * From "&DataFrom&" where ViewFlag"&Language&" and ID="&ID
  252.   rs.open sql,conn,1,1
  253.   if not rs.eof Then
  254. If ISHTML = 1 Then
  255. AutoLink = ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
  256. Else
  257. AutoLink = "ProductList.asp?SortID="&rs("ID")&""
  258. End If
  259. SortPathTXT=SortPathTXT(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&"""><span style=""color:#EC0000"">"&rs("SortName"&Language)&"</span></a>"
  260.   end if
  261.   rs.close
  262.   set rs=nothing
  263. end Function
  264. %>