news.asp
资源名称:shop2.rar [点击查看]
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:2k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
DOS
- <table width="189" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="skin/skin<%=skinid%>/newtop.gif" width="189" height="40" border="0" usemap="#Map" /></td>
- </tr>
- <tr>
- <td background="skin/skin<%=skinid%>/newbg.gif" >
- <table width="98%" height="22" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <%dim i
- i=0
- set rs=server.CreateObject("adodb.recordset")
- rs.open "select top 6 newsname,adddate,newsid from news order by newsname desc",conn,1,1
- if rs.eof and rs.bof then
- response.write "目前还没有商城新闻"
- else
- do while not rs.eof
- i=i+1%>
- <td width="10%" valign="middle">
- <div align="center"><img src="skin/skin<%=skinid%>/blit_01.gif" height="3" width="2" /></div></td>
- <td width="90%"height="18" valign="middle"><span class="noti_text">
- <a href="trends.asp?id=<%=rs("newsid")%>"><%=InterceptString(rs("newsname"),25)%></a>
- </span></td>
- </tr>
- <%rs.movenext
- loop
- end if
- rs.close
- set rs=nothing%>
- </table></td>
- </tr>
- <tr>
- <td ><img src="skin/skin<%=skinid%>/newbot.gif" width="189" height="14" /></td>
- </tr>
- </table>
- <map name="Map" id="Map">
- <area shape="rect" coords="40,10,138,34" href="trend.asp" />
- <area shape="rect" coords="144,6,181,23" href="trend.asp">
- </map>
- <%
- function InterceptString(txt,length)
- txt=trim(txt)
- x = len(txt)
- y = 0
- if x >= 1 then
- for ii = 1 to x
- if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then
- y = y + 2
- else
- y = y + 1
- end if
- if y >= length then
- txt = left(trim(txt),ii)
- exit for
- end if
- next
- InterceptString = txt
- else
- InterceptString = ""
- end if
- End Function
- %>
English
