news.asp
资源名称:wapjsp.rar [点击查看]
上传用户:xiao85513
上传日期:2010-01-11
资源大小:2160k
文件大小:2k
源码类别:
手机WAP编程
开发平台:
Java
- <%@Language=VBScript%>
- <%Response.ContentType="text/vnd.wap.wml"%>
- <?xml version="1.0" encoding="gb2312"?>
- <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
- "http://www.wapforum.org/DTD/wml_1.1.xml">
- <wml> <head> <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/> </head> <card id="news" title="news" newcontext="true">
- <p>**东大新闻速递**<br/>
- <%
- ''===========================================
- ''新闻频道信息速递
- ''based on Serephine's work modified by Kevin
- ''===========================================
- Dim strSQLServerName
- Dim strSQLDBUserName
- Dim strSQLDBPassword
- Dim strSQLDBName
- strSQLServerName = "127.0.0.1"
- strSQLDBUserName = "sa"
- strSQLDBPassword = "kurtCobain4551306"
- 'strSQLDBPassword = "2003herald"
- strSQLDBName = "newscat1"
- Set conn = Server.CreateObject("ADODB.Connection")
- strCon = "Provider=SQLOLEDB;Server=" & strSQLServerName & ";User ID=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";"
- conn.Open strCon
- %>
- <% set rs1=server.CreateObject("ADODB.RecordSet")
- BigClassName="信息速递"
- rs1.Source="select top 7 NewsID,Title,UpdateTime,BigClassName,SmallClassName,SpecialID,click from News where BigClassName='" & BigClassName &"' order by NewsID DESC"
- rs1.Open rs1.Source,conn,1,1
- while not rs1.EOF
- Title=trim(rs1("Title"))
- Titlelen=left(Title,18)
- %>
- <%=rs1("UpdateTime")%><br/>
- <%=rs1("Title") %>
- <br/>
- <%
- rs1.MoveNext
- wend
- rs1.close
- %>
- <br/>* * * * * * *
- <br/><a href="index.wml">返回主页</a><br/>
- <do type="prev" name="Prev" label="Back"><prev/></do>
- </p> </card> </wml>