首页代码:- <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
- <!--#include file="pcfinal.asp"-->
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <title><%=pf_site_name%>- 网站首页</title>
- <meta name="author" content="<%=pf_site_url%>">
- <meta name="keywords" content="<%=pf_site_keywords%>">
- <meta name="description" content="<%=pf_site_description%>">
- <link href="style.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <!--#include file="header.asp"-->
- <div id="content_main">
- <div id="content" class="layout_center">
- <!--#include file="index_left.asp"-->
- <div id="right">
- <%
- Set rs = server.CreateObject("adodb.recordset")
- sql = "select * from pf_custom "
- rs.Open sql, conn, 1, 1
- if not rs.eof then
- %>
- <div class="right_title"><span class="float_right"><a href="custom.asp?id=<%=rs("ID")%>">详情</a></span>
- <h2><%=rs("pf_custom_name")%></h2>
- </div>
- <div class="right_body"> <%=rs("pf_custom_short_content")%> </div>
- <%
- end if
- rs.Close
- Set rs = Nothing
- %>
- <div class="right_bottom"></div>
- <div class="right_title"><span class="float_right"><a href="products.asp">更多</a></span>
- <h2>最新产品</h2>
- </div>
- <div class="right_body">
- <ul class="products">
- <%
- Set rs = server.CreateObject("adodb.recordset")
- sql = "select top 8 * from pf_products order by pf_products_order desc"
- rs.Open sql, conn, 1, 1
- Do While Not rs.EOF
- %>
- <li><a href="products_view.asp?id=<%=rs("ID")%>"><img src="<%=rs("pf_uploadfile")%>" width="124" height="93" alt="<%=rs("pf_products_name")%>" title="<%=rs("pf_products_name")%>" /></a><br />
- <a href="products_view.asp?id=<%=rs("ID")%>"><%=left(rs("pf_products_name"),10)%></a></li>
- <%
- rs.movenext
- Loop
- rs.Close
- Set rs = Nothing
- %>
- </ul>
- </div>
- <div class="right_bottom"> </div>
- <div class="right_title"><span class="float_right"><a href="news.asp">更多</a></span>
- <h2>最新新闻</h2>
- </div>
- <div class="right_body">
- <ul class="news">
- <%
- Set rs = server.CreateObject("adodb.recordset")
- sql = "select top 8 * from pf_news order by pf_news_order desc"
- rs.Open sql, conn, 1, 1
- Do While Not rs.EOF
- Set rsc = server.CreateObject("adodb.recordset")
- sql = "select * from pf_news_category where id = "&rs("pf_news_category")&""
- rsc.Open sql, conn, 1, 1
- %>
- <li><span class="float_right"><%=formatdatetime(rs("pf_news_date"),2)%></span>[<a href="news_category.asp?id=<%=rsc("ID")%>"><%=rsc("pf_news_category_name")%></a>] <a href="news_view.asp?id=<%=rs("ID")%>" title="<%=rs("pf_news_name")%>"><%=left(rs("pf_news_name"),30)%></a></li>
- <%
- rsc.Close
- Set rsc = Nothing
- rs.movenext
- Loop
- rs.Close
- Set rs = Nothing
- %>
- </ul>
- </div>
- <div class="right_bottom"></div>
- </div>
- <div class="float_clear"></div>
- </div>
- </div>
- <!--#include file="footer.asp"-->
- </body>
- </html>
复制代码 |