www.gusucode.com > 艺帆全站DIV+CSS体育用品公司网站源码 1.7.5源码程序 > qz081.7.5.asp
<%function OneF_news_all(m,n)'首页文章列表%> <% set right_news=server.createobject("adodb.recordset") exec="select top "&n&" * from [news] order by data desc " right_news.open exec,conn,1,1 if right_news.eof and right_news.bof then response.Write(" 暂无新闻 !") end if %> <% i=1 do while not right_news.eof dim right_url,right_color if IsNull(right_news("url")) or trim(right_news("url")&"")="" then right_url="/ShowNews/?"&right_news("id")&"-"&right_news("ssfl")&".html" else right_url=""&right_news("url")&"" end if if IsNull(right_news("color")) or trim(right_news("color")&"")="" then right_color="" else right_color="color:"&right_news("color")&"" end if %> <li><a href="<%=right_url%>" style="<%=right_color%>;" title="<%=right_news("title")%>"><span class="span_txt"><%=i5808(right_news("title"),26)%></span></a><span class="span_time">[<%=year(right_news("data"))&"-"&month(right_news("data"))&"-"&day(right_news("data"))%>]</span></li> <% if i mod 1 =0 then end if i=i+1 right_news.movenext loop right_news.close set right_news=nothing %> <%end function%> <%function OneF_news_tuijian_all(m,n)'首页文章列表%> <% set right_news=server.createobject("adodb.recordset") exec="select top "&n&" * from [news] tuijian=1 order by data desc " right_news.open exec,conn,1,1 if right_news.eof and right_news.bof then response.Write(" 暂无新闻 !") end if %> <% i=1 do while not right_news.eof dim right_url,right_color if IsNull(right_news("url")) or trim(right_news("url")&"")="" then right_url="/ShowNews/?"&right_news("id")&"-1.html" else right_url=""&right_news("url")&"" end if if IsNull(right_news("color")) or trim(right_news("color")&"")="" then right_color="#00a0e9" else right_color=""&right_news("color")&"" end if %> <h2 class="title"><img src="<%=right_news("img")%>" alt="<%=right_news("title")%>" width="60" height="60" /><strong><%=i5808(right_news("title"),28)%></strong></h2> <p><%=i5808(right_news("body"),126)%></p> <p class="readmore"><a href="<%=right_url%>" style="color:<%=right_color%>;"><%=i5808(right_news("title"),26)%></a></p> <% if i mod 1 =0 then end if i=i+1 right_news.movenext loop right_news.close set right_news=nothing %> <%end function%> <%function OneF_Product_all(m,n,w,h)'首页产品显示%> <% set new_products=server.createobject("adodb.recordset") exec="select top "&n&" * from [products] order by data desc " new_products.open exec,conn,1,1 if new_products.eof and new_products.bof then response.Write(" 暂无新产品 !") end if %> <% dim np np=1 do while not new_products.eof %> <li><a href="/ShowProducts/?<%=new_products("id")%>-1.html" title="<%=new_products("title")%>"><img src="<%=new_products("img")%>" width="<%=w%>" height="<%=h%>" alt="<%=new_products("title")%>"/></a><br><%=i5808(new_products("title"),15)%></li> <% if np mod 2 =0 then end if np=np+1 new_products.movenext loop new_products.close set new_products=nothing %> <%end function%>