Main.asp
资源名称:1.rar [点击查看]
上传用户:yrf020
上传日期:2007-07-24
资源大小:1287k
文件大小:6k
源码类别:

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

开发平台:

HTML/CSS

  1. <!--#include file="Head.asp"-->
  2.   <div id="Bodyer_index">
  3.     <div id="Bodyer_banner_index"> 
  4. <script type="text/javascript">
  5. <!--
  6. var focus_width=850
  7. var focus_height=190
  8. var text_height=0
  9. var swf_height = focus_height+text_height
  10. var pics='<%=pic%>'
  11. var links='<%=link%>'
  12. var texts='<%=texts%>'
  13. document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
  14. document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="../Include/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#000000">');
  15. document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
  16. document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
  17. document.write('<embed ID="focus_flash" src="../Include/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#000000" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
  18. document.write('</object>');
  19. //-->
  20. </script>
  21. </div>
  22. <div id="Bodyer_left_index">
  23.       <div class="Bodyer_left_index_login"><%=Login()%></div>
  24.       <div class="Bodyer_left_index_search"><%=Search()%></div>
  25.       <div class="Bodyer_left_index_links"><%=FriendLink()%></div>
  26.   <br/>
  27. </div>
  28. <div id="Bodyer_right_index">
  29.   <div class="Bodyer_right_index_item"><img src="Images/Main_news.jpg" width="120" height="38" /></div>
  30.   <div class="Bodyer_right_index_more"><a href="newslist.asp"><img src="Images/More.gif" width="29" height="5" border="0" /></a></div>
  31.   <div class="Bodyer_right_index_list">
  32.     <div class="Bodyer_right_index_news"><%=News("0,")%></div>
  33.   </div>
  34.   <div class="Bodyer_right_index_item"><img src="Images/Main_product.jpg" width="120" height="38" /></div>
  35.   <div class="Bodyer_right_index_more"><a href="productlist.asp"><img src="Images/More.gif" width="29" height="5" border="0" /></a></div>
  36.   <div class="Bodyer_right_index_list"><%=Products("0,",2,4)%><br/></div>
  37. </div>
  38.   </div>
  39. <%
  40. function FriendLink()
  41.   dim rs,sql
  42.   set rs = server.createobject("adodb.recordset")
  43.   sql="select top 4 * from CompanyCMS_FriendLink where ViewFlag"&Language&" and LinkType order by id asc"
  44.   rs.open sql,conn,1,1
  45.   if rs.eof then
  46.     response.write "暂无相关信息"
  47.   else
  48.     do while not rs.eof
  49.       response.write "<a href="""&rs("LinkUrl")&""" target=""_blank""><img src="""&rs("LinkFace"&Language)&""" alt="""&rs("LinkName"&Language)&"""></a><br/>"
  50.       rs.movenext
  51.     loop 
  52.   end if
  53.   rs.close
  54.   set rs=nothing
  55. end function
  56. function News(SortPath)
  57.   dim rs,sql,NewsName,NewFlag
  58.   set rs = server.createobject("adodb.recordset")
  59.   sql="select top 7 * from CompanyCMS_News where ViewFlag"&Language&" and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
  60.   rs.open sql,conn,1,1
  61.   if rs.eof then
  62.     response.write "暂无相关信息"
  63.   else
  64.     do while not rs.eof
  65.   if now()-rs("AddTime")<=2 then 
  66.     NewsName=StrLeft(rs("NewsName"&Language),32)
  67.     NewFlag="&nbsp;<font style=""font-size:9px;color:red;""><strong>NEW</strong></font>"
  68.   else
  69.     NewsName=StrLeft(rs("NewsName"&Language),36)
  70.     NewFlag=""
  71.   end if
  72.       response.write "<img src=""Images/Arrow_01.gif"" align=""absmiddle"">&nbsp;&nbsp;"&FormatDate(rs("Addtime"),15)&"&nbsp;|&nbsp;<a href=""NewsView.asp?ID="&rs("id")&""" title="""&rs("NewsName"&Language)&""">"&NewsName&"</a>"&NewFlag&"<br/>"
  73.       rs.movenext
  74.     loop 
  75.   end if
  76.   rs.close
  77.   set rs=nothing
  78. end function
  79. function Products(SortPath,trs,tds)
  80.   dim rs,sql,tr,td,ProductName,SmallPicPath
  81.   set rs = server.createobject("adodb.recordset")
  82.   sql="select top "&trs*tds&" * from CompanyCMS_Products where ViewFlag"&Language&" and CommendFlag order by id desc"
  83.   'sql="select top "&trs*tds&" * from CompanyCMS_Products where ViewFlag"&Language&" and CommendFlag and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
  84.   'sql="select top "&trs*tds&" * from CompanyCMS_Products where ViewFlag"&Language&" and NewFlag order by id desc"
  85.   rs.open sql,conn,1,1
  86.   if rs.eof then
  87.     response.write "暂无相关信息"
  88.   else
  89.     response.write "<table cellpadding=""0"" cellspacing=""0"">"
  90. for tr=1 to trs
  91.     response.write "<tr>"
  92.         for td=1 to tds '填充数据到表格
  93.       if StrLen(rs("ProductName"&Language))<=18 then
  94.             ProductName=rs("ProductName"&Language)
  95.       else 
  96.         ProductName=StrLeft(rs("ProductName"&Language),16)
  97.       end if
  98.       SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
  99.   response.write "<td>"
  100.           response.write "<table cellpadding=""2"" cellspacing=""0"" >" &_
  101.       "<tr><td style=""border: 1px solid #ccc; width:120px; height:120px; text-align:center;"">" &_
  102.  "<a href=""ProductView.asp?ID="&rs("id")&""">" &_
  103.       "<img src="""&SmallPicPath&""" onload=""javascript:DrawImage(this,120,120);"" alt="""&rs("ProductName"&Language)&""" />" &_
  104.  "</a>" &_
  105.      "</td></tr>" &_
  106.  "<tr><td style=""height:24px; text-align:center;"">" &_
  107.  "<a href=""ProductView.asp?ID="&rs("id")&""" title="""&rs("ProductName"&Language)&""">"&ProductName&"</a>" &_
  108.  "</td></tr>" &_
  109.  "</table>"
  110.       response.write"</td><td width=""14""></td>"
  111.       rs.movenext
  112.   if rs.eof then exit for
  113. next
  114.     Response.Write "</tr>"
  115. if rs.eof then exit for
  116. next
  117.     response.write "</table>"
  118.   end if
  119.   rs.close
  120.   set rs=nothing
  121. end function
  122. %>
  123. <!--#include file="Foot.asp"-->
  124. <!--#include file="FocusLoad.asp" -->