index.jsp **************** <%@ page contentType="text/vnd.wap.wml;charset=gb2312"%> <%@ page import="ite.com.*,java.util.*"%> <?xml version="1.0" encoding="gb2312"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd" > <wml> <card id="maincard" title="龙行WAP"> <img src="http://www.wapzj.com/html/33/89/html/images/csj.gif" alt="pic" align="middle"/> <center>娱乐场</center> <p align="left"> <% List rslist=new ArrayList(); DBManager dbm=new DBManager(); rslist=dbm.Select_Data("select iokesort,iokename from ioketype where tn=0"); for(int i=0;i<rslist.size();i++){ out.println("<a href=>} dbm=null; %> </p> </card> </wml>
indexlist.jsp **************** <%@ page contentType="text/vnd.wap.wml;charset=gb2312"%> <%@ page import="ite.com.*,java.util.*"%> <?xml version="1.0" encoding="gb2312"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd" > <wml> <card id="maincard" title="龙行WAP"> <p align="left"> <% String cardid=request.getParameter("card"); if (cardid!=null&&(!cardid.equals(""))){ String sql="select iokesort,iokename from ioketype where tn="+cardid; // out.println(" <small><a href=>List rslist=new ArrayList(); DBManager dbm=new DBManager(); rslist=dbm.Select_Data(sql); for(int i=0;i<rslist.size();i++){ out.println(" <small><a href=>} dbm=null; } %> <a href=></p> </card> </wml>
list.jsp ****************** <%@ page language="java" contentType="text/vnd.wap.wml;charset=gb2312" %> <%@ page import="ite.com.*,java.util.*"%> <?xml version="1.0" encoding="gb2312"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd" > <wml> <card id="listcard" title="龙行科技笑话"> <p align="left"> <% String card=request.getParameter("card"); String iokesort=request.getParameter("iokesort"); int RowCount; //记录总数 int PageSize=8; //一页显示的记录数 int PageCount; //总页数 int PageNo; //待显示页码
String Page= request.getParameter("page");//取得要显示的页码 if(Page==null){ PageNo=1; }else{ PageNo= java.lang.Integer.parseInt(Page); if(PageNo<1) PageNo=1; }
List rslist=new ArrayList(); DBManager dbm=new DBManager(); String sql="select id,title from iokecontent where iokesort="+iokesort; //取得符合条件的总记录数 RowCount=dbm.Select_Count_SQL(sql); if(RowCount!=0){ //计算总页数 PageCount=(RowCount+PageSize-1)/PageSize; rslist=dbm.queryByPage_SQL_OrderBy(RowCount,PageSize,PageNo,sql+" order by id desc");//按id降序排序 for(int i=0;i<rslist.size();i++){ out.println("<small><a href=>} if(PageNo>1){ %> <a href=><%} if(PageNo<PageCount){ %> <a href=><%} }else{ out.println("<b>对不起此类栏目没有新增内容!</b>"); }
sql="select iokename from ioketype where iokesort="+card; String iokename=""; rslist=dbm.Select_Data(sql); for(int i=0;i<rslist.size();i++){ iokename=((ArrayList)rslist.get(i)).get(0).toString(); } dbm=null; %> <br/> <a href=><a href=></p> </card> </wml>
view.jsp ************************ <%@ page language="java" contentType="text/vnd.wap.wml;charset=gb2312" %> <%@ page import="ite.com.*,java.util.*"%> <?xml version="1.0" encoding="gb2312"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd" > <wml> <card id="listcard" title="龙行科技笑话"> <p align="left"> <% String card=request.getParameter("card"); String iokesort=request.getParameter("iokesort"); String id=request.getParameter("id"); String PageNo=request.getParameter("page");
String sql="select info from iokecontent where id="+id; List rslist=new ArrayList(); DBManager dbm=new DBManager(); rslist=dbm.Select_Data(sql); for(int i=0;i<rslist.size();i++){ String content=new String(""); content=((ArrayList)rslist.get(i)).get(0).toString(); content=content.replaceAll("<br> <br>","<br/>"); content=content.replaceAll("<br><br>","<br/>"); content=content.replaceAll("<br>","<br/>"); out.println(content+"<br/>");
} dbm=null; %> <a href=></p> </card> </wml>
|
|